/* ================================================
   COMPONENTES REUTILIZÁVEIS
   ================================================ */

/* ── Container ── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--container-px);
}

/* ── Botões ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--r-pill);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.2px;
  transition: all var(--ease);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  border: 2px solid transparent;
  line-height: 1;
}

/* Verde neon — ação principal
   Usar .btn.btn-primary para vencer herança de cor de links em containers */
.btn.btn-primary,
.btn-primary {
  background: var(--color-green);
  color: var(--color-navy) !important; /* garante texto escuro sobre verde em qualquer contexto */
  border-color: var(--color-green);
}
.btn.btn-primary:hover,
.btn-primary:hover {
  background: #1aff1a;
  border-color: #1aff1a;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(6, 255, 0, 0.35);
}

/* Fantasma (para fundo escuro) */
.btn-ghost {
  background: transparent;
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.4);
}
.btn-ghost:hover {
  border-color: var(--color-white);
  background: rgba(255, 255, 255, 0.08);
}

/* Navy — para fundo claro */
.btn-navy {
  background: var(--color-navy);
  color: var(--color-white);
  border-color: var(--color-navy);
}
.btn-navy:hover {
  background: #151a4a;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Outline navy */
.btn-outline-navy {
  background: transparent;
  color: var(--color-navy);
  border-color: var(--color-navy);
}
.btn-outline-navy:hover {
  background: var(--color-navy);
  color: var(--color-white);
}

.btn-sm { padding: 10px 20px; font-size: 14px; }
.btn-lg { padding: 18px 40px; font-size: 17px; }
.btn-full { width: 100%; }

.btn-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ── Tags / Badges ── */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  border: 1.5px solid transparent;
  line-height: 1;
  width: fit-content;    /* nunca estica além do conteúdo */
  white-space: nowrap;
}

/* Para fundos claros */
.tag-lilac {
  background: rgba(231, 150, 248, 0.12);
  border-color: #C966E8;
  color: #6B1E8B;
}
.tag-navy {
  background: transparent;
  border-color: var(--color-navy);
  color: var(--color-navy);
}

/* Para fundos escuros */
.tag-lilac-d {
  background: rgba(231, 150, 248, 0.1);
  border-color: var(--color-lilac);
  color: var(--color-lilac);
}
.tag-green-d {
  background: rgba(6, 255, 0, 0.08);
  border-color: var(--color-green);
  color: var(--color-green);
}
.tag-white-d {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.35);
  color: rgba(255, 255, 255, 0.85);
}

/* ── Cabeçalho de seção ── */
.section-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--s2);
  max-width: 800px;
  margin-inline: auto;
  margin-bottom: var(--s6);
}

.section-head h2 {
  font-size: var(--font-h2);
  color: var(--color-navy);
  font-weight: 800;
}

.section-head p {
  font-size: 17px;
  color: var(--color-text-muted);
  line-height: 1.65;
}

.section-head--light h2 { color: var(--color-white); }
.section-head--light p  { color: rgba(255, 255, 255, 0.6); }

/* ── Carrossel ── */
.carousel-wrapper {
  position: relative;
}

.carousel-container {
  display: flex;
  gap: var(--s2);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: var(--s1);
}

.carousel-container::-webkit-scrollbar { display: none; }

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s3);
  margin-top: var(--s4);
}

.carousel-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-gray-light);
  transition: all var(--ease);
  cursor: pointer;
  padding: 0;
  border: none;
  flex-shrink: 0;
}

.carousel-dot.active {
  width: 24px;
  border-radius: 4px;
  background: var(--color-navy);
}

.carousel-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-white);
  border: 1.5px solid var(--color-gray-light);
  color: var(--color-navy);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--ease);
  cursor: pointer;
}

.carousel-btn:hover {
  background: var(--color-navy);
  border-color: var(--color-navy);
  color: var(--color-white);
}

/* ── Cards de Vídeo (Reels) — formato vertical 9:16 ── */
.video-card {
  flex: 0 0 calc(58% - var(--s2));   /* mostra ~1.5 cards no mobile */
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}

.video-card-thumb {
  position: relative;
  aspect-ratio: 9 / 16;              /* proporção de reel/story */
  border-radius: var(--r-md);
  overflow: hidden;
  cursor: pointer;
  background: linear-gradient(160deg, #1D225E 0%, #2a2f7a 60%, #1a1d4a 100%);
}

.video-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--ease);
}

.video-card-thumb:hover img { transform: scale(1.04); }

.video-play-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-play-icon span {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-green);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--ease);
}

.video-play-icon span svg {
  width: 16px;
  height: 16px;
  fill: var(--color-navy);
  margin-left: 3px;
}

.video-card-thumb:hover .video-play-icon span {
  transform: scale(1.1);
}

.video-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-navy);
  line-height: 1.35;
}

/* ── Cards de Notícia ── */
.news-card {
  flex: 0 0 calc(85% - var(--s2));
  scroll-snap-align: start;
  background: var(--color-white);
  border: 1px solid var(--color-gray-light);
  border-radius: var(--r-md);
  padding: var(--s4);
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  transition: box-shadow var(--ease), transform var(--ease);
}

.news-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.news-card h3 {
  font-size: var(--font-h3);
  font-weight: 700;
  color: var(--color-navy);
  line-height: 1.3;
  flex: 1;
}

.news-card p {
  font-size: 15px;
  color: var(--color-text-muted);
  line-height: 1.65;
}

.news-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: var(--s2);
  border-top: 1px solid var(--color-gray-light);
  gap: var(--s2);
}

.news-card-footer time {
  font-size: 12px;
  color: var(--color-gray);
  font-weight: 500;
}

.news-read-more {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-navy);
  white-space: nowrap;
  transition: color var(--ease);
}

.news-read-more:hover { color: var(--color-emerald); }

/* ── Animação de entrada (scroll reveal) ── */
.will-animate {
  opacity: 0;
  transform: translateY(28px);
}

.will-animate.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

/* stagger para filhos */
.will-animate:nth-child(1) { transition-delay: 0ms; }
.will-animate:nth-child(2) { transition-delay: 80ms; }
.will-animate:nth-child(3) { transition-delay: 160ms; }
.will-animate:nth-child(4) { transition-delay: 240ms; }

/* ── Desktop: carrossel vira grid ── */
@media (min-width: 768px) {
  .carousel-container { overflow-x: visible; scroll-snap-type: none; }

  /* Reels: 4 colunas em formato reel vertical (ficam mais estreitos, estilo feed) */
  .reels .carousel-container  {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--s3);
  }

  /* Notícias: 3 colunas */
  .news .carousel-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--s3);
  }

  .video-card { flex: unset; scroll-snap-align: unset; }
  .news-card  { flex: unset; scroll-snap-align: unset; }

  .carousel-controls { display: none; }
}
