/* TikTok Shorts section (green band) */

.tiktok-section {
  background: #76b829;
  padding: 3rem 0;
  margin-top: 2rem;
}

.tiktok-section__inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 5rem;
}

.tiktok-section__header {
  text-align: center;
  color: #fff;
  margin-bottom: 2rem;
}

.tiktok-section__title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.5rem 0;
  color: #fff;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
}

.tiktok-section__icon {
  flex: 0 0 auto;
}

.tiktok-section__subtitle {
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1rem;
}

.tiktok-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: start;
  justify-items: center;
}

/* TikTok renders its embed at a fixed native size (~325 x 740). To fit 6
   cards in a row like the mockup, scale the whole embed down with transform.
   Nothing is cropped; the full embed remains visible, just smaller. */
.tiktok-card {
  --tt-w: 325px;
  --tt-h: 740px;
  --tt-scale: 0.55;
  width: calc(var(--tt-w) * var(--tt-scale));
  height: calc(var(--tt-h) * var(--tt-scale));
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #0b0b0b;
}

.tiktok-card__embed {
  width: var(--tt-w);
  height: var(--tt-h);
  transform: scale(var(--tt-scale));
  transform-origin: top left;
}

.tiktok-card__embed .tiktok-embed,
.tiktok-card__embed iframe {
  width: var(--tt-w) !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  border: 0 !important;
  display: block;
}

.tiktok-card__embed iframe {
  height: var(--tt-h) !important;
}

/* Hide pre-embed fallback markup so the card stays dark while loading. */
.tiktok-card__embed .tiktok-embed > section {
  display: none !important;
}

.tiktok-section__footer {
  text-align: center;
  margin-top: 2rem;
}

.tiktok-follow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: #fff;
  color: #111;
  border-radius: 9999px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tiktok-follow:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  color: #111;
  text-decoration: none;
}

@media (max-width: 1200px) {
  .tiktok-section__inner { padding: 0 3rem; }
  .tiktok-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tiktok-card { --tt-scale: 0.75; }
}

@media (max-width: 768px) {
  .tiktok-section { padding: 2rem 0; }
  .tiktok-section__inner { padding: 0 1rem; }
  .tiktok-section__title { font-size: 1.5rem; }
  .tiktok-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
  .tiktok-card { --tt-scale: 0.65; }
}

@media (max-width: 480px) {
  .tiktok-grid { grid-template-columns: 1fr; }
  .tiktok-card { --tt-scale: 0.9; }
}

/* TikTok embed on individual video detail page (page--video.html.twig). */
.video-embed--tiktok {
  display: flex;
  justify-content: center;
  margin: 1.5rem 0;
}

.video-embed--tiktok .tiktok-embed {
  margin: 0 auto !important;
}
