/* =========================
   Fontes
========================= */
@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@300;400;600;700;800&display=swap');

/* =========================
   Reset & Variáveis
========================= */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* Cores */
  --white: #ffffff;
  --primary-color: #5393d7;
  --primary-600: #4077b8;
  --secondary-color: #a5b649;
  --secondary-600: #92a441;
  --dark-gray: #707070;
  --light-gray: #f0f0f0;
  --text-dark: #333333;
  --text-muted: #4a4a4a;
  --text-light: #ffffff;

  /* Dimensões e raios */
  --radius-xl: 30px;
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;

  /* Tipografia */
  --font-family: 'Barlow', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, 'Helvetica Neue', Arial, sans-serif;
  --fs-hero: clamp(2rem, 3vw + 1rem, 3rem);
  --fs-h2: clamp(1.4rem, 1.2vw + 1rem, 2rem);
  --fs-h3: clamp(1.2rem, 1vw + .9rem, 1.5rem);
  --fs-body: 1rem;
  --fs-small: .95rem;

  /* Layout */
  --container-max: 1160px;

  /* espaçamentos verticais “tight/normal/relax” */
  --pad-tight: 36px;
  --pad: 56px;
  --pad-relax: 72px;

  /* Botões do header */
  --header-btn-width: 320px;
  --header-btn-height: 52px;

  /* Sombras */
  --shadow-xs: 0 1px 2px rgba(0,0,0,.06);
  --shadow-sm: 0 2px 6px rgba(0,0,0,.08);
  --shadow-md: 0 6px 16px rgba(0,0,0,.12);
  --shadow-lg: 0 12px 28px rgba(0,0,0,.16);

  /* Transições */
  --ease: cubic-bezier(.2,.7,.2,1);
  --transition-fast: 160ms var(--ease);
  --transition: 260ms var(--ease);
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-family);
  color: var(--text-dark);
  background: var(--white);
  line-height: 1.6;
  font-size: var(--fs-body);
}
body.no-scroll { overflow: hidden; } /* trava scroll com menu aberto */

.container { max-width: var(--container-max); margin: 0 auto; padding: 0 20px; }

/* Estados de foco acessíveis */
a, button {
  outline: none;
  transition: color var(--transition-fast), background var(--transition), border-color var(--transition), transform var(--transition);
}
:focus-visible {
  outline: 3px solid rgba(83,147,215,.35);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* =========================
   Cabeçalho (Header)
========================= */
.header-top {
  background: var(--secondary-color);
  color: var(--text-light);
  padding: 6px 0;
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .2px;
}
.header-top .container {
  display: flex;
  align-items: center;
  justify-content: space-between; /* mobile: menu à esquerda, link à direita */
}
.header-top a { color: var(--white); text-decoration: none; opacity: .95; }
.header-top a:hover { opacity: 1; }

.header-main { background: var(--white); padding: 20px 0; }
.header-main .container {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
}

.logo-container img.sei-logo { width: 600px; max-width: 100%; height: auto; }

/* Ações do header (Login, Treinamento) */
.header-actions {
  display: flex;
  flex-direction: column;   /* empilha verticalmente */
  align-items: center;
  gap: 10px;
}

/* Botões do header */
.header-actions .login-button,
.header-actions .train-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--header-btn-width);
  padding: 13px 22px;
  border-radius: var(--radius-xl);
  font-weight: 700;
  text-decoration: none;
  letter-spacing: .2px;
  box-shadow: var(--shadow-sm);
  will-change: transform, box-shadow;
}
.header-actions .login-button img,
.header-actions .train-button img {
  width: 20px; height: 20px; margin-right: 8px;
}

/* Login */
.login-button { background: var(--secondary-color); color: var(--text-light); }
.login-button:hover { background: var(--secondary-600); box-shadow: var(--shadow-md); transform: translateY(-1px); }

/* Treinamento */
.train-button { background: var(--primary-color); color: var(--text-light); }
.train-button:hover { background: var(--primary-600); box-shadow: var(--shadow-md); transform: translateY(-1px); }
/* ícone do treinamento branco sem trocar arquivo */
.header-actions .train-button img { filter: brightness(0) invert(1); }

/* Menu hamburguer (fica na faixa verde) */
.menu-toggle {
  display: none;          /* aparece no mobile */
  font-size: 2rem;
  cursor: pointer;
  color: var(--text-light);  /* contraste no verde */
  background: none;
  border: none;
  margin: 0;
  line-height: 1;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}
.menu-toggle:active { transform: scale(.96); }

/* =========================
   Navbar (desktop)
========================= */
.navbar {
  background: transparent;
  border-bottom: 3px solid var(--primary-color);
}
.navbar .container { display: flex; justify-content: center; }
.navbar ul { list-style: none; display: flex; gap: 40px; align-items: center; }
.navbar ul li a {
  color: var(--dark-gray);
  text-decoration: none;
  font-weight: 700;
  padding: 12px 0;
  position: relative;
}
.navbar ul li a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -3px;
  width: 0; height: 3px;
  background: var(--primary-color);
  transition: width var(--transition);
}
.navbar ul li a:hover::after,
.navbar ul li a.active::after { width: 100%; }
.navbar ul li a.active { color: var(--primary-color); }

/* =========================
   Menu Mobile (fullscreen)
========================= */
.mobile-menu {
  position: fixed; inset: 0;
  width: auto; height: 100vh; /* evita somar padding com 100vw */
  background: var(--white);
  display: none; /* controlado por .show */
  flex-direction: column; justify-content: center; align-items: center;
  z-index: 9999; padding: 20px; overflow: hidden; box-sizing: border-box;
}
.mobile-menu.show { display: flex; }
.mobile-menu .menu-close {
  position: absolute; top: 20px; right: 20px;
  font-size: 2rem; background: none; border: none; cursor: pointer; color: var(--primary-color);
  transition: transform var(--transition-fast);
}
.mobile-menu .menu-close:active { transform: scale(.96); }
.mobile-menu ul { list-style: none; text-align: center; }
.mobile-menu ul li { margin: 20px 0; }
.mobile-menu ul li a {
  font-size: 1.6em; color: var(--dark-gray); text-decoration: none; font-weight: 800;
}

/* =========================
   Elementos Comuns
========================= */
section { padding: var(--pad) 0; }

h2, h3 { color: var(--text-dark); font-weight: 800; margin-bottom: 18px; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

p { color: var(--text-muted); }

/* Botões genéricos */
.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: var(--radius-lg);
  font-weight: 700;
  text-decoration: none;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
  box-shadow: var(--shadow-xs);
}
.btn-primary { background: var(--primary-color); color: var(--text-light); }
.btn-primary:hover { background: var(--primary-600); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.btn-secondary { background: var(--secondary-color); color: var(--text-light); }
.btn-secondary:hover { background: var(--secondary-600); box-shadow: var(--shadow-md); transform: translateY(-1px); }

/* =========================
   Hero (home)
========================= */
.section-hero { background: var(--white); padding: var(--pad-relax) 0 var(--pad); }
.section-hero .container {
  display: flex; align-items: center; justify-content: space-between; gap: 40px;
}
.hero-content h2 { color: var(--primary-color); font-size: var(--fs-hero); letter-spacing: .2px; }
.hero-content p { font-size: 1.125rem; margin-bottom: 28px; color: var(--text-muted); }
.hero-image img { max-width: 100%; height: auto; filter: drop-shadow(var(--shadow-sm)); }

/* =========================
   Títulos com barra lateral
========================= */
.section-quick-access h3,
.section-video h3,
.section-benefits h3 {
  color: var(--secondary-color);
  font-weight: 800;
  font-size: var(--fs-h3);
  margin-bottom: 20px;
  padding-left: 12px;
  border-left: 6px solid var(--primary-color);
}

/* =========================
   Acesso Rápido (cards)
========================= */
/* + respiro: mais espaço depois do título e antes dos depoimentos */
.section-quick-access { padding: var(--pad) 0 var(--pad); }
.section-quick-access h3 { margin-bottom: 28px; }

.access-buttons {
  display: flex; flex-wrap: wrap; gap: 32px; justify-content: center; align-items: stretch;
}
.access-btn {
  background: var(--light-gray);
  border-radius: var(--radius-xl);
  padding: 26px 30px;
  width: 280px;
  text-decoration: none; color: var(--text-dark); font-weight: 700;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);

  /* layout alinhado: ícone + texto lado a lado */
  display: flex; align-items: center; justify-content: center; gap: 16px; text-align: left; min-height: 140px;
}
.access-btn:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); background: #f6f7f9; }
.access-btn img { width: 56px; height: 56px; margin: 0; flex: 0 0 auto; }
.access-btn span { display: block; line-height: 1.25; font-size: 1.05rem; }

/* =========================
   Vídeos (home)
========================= */
/* Depoimentos com respiro extra no topo para não “colar” nos botões */
.section-video { padding: var(--pad) 0 var(--pad-tight); }

/* aplica “cartão” ao iframe (igual estilo do Fala Prefeito) */
.section-video iframe {
  background: #ffffff;          /* moldura */
  padding: 10px;                /* borda branca ao redor */
  border-radius: var(--radius-lg);
  border: none;
  box-shadow: 0 12px 28px rgba(0,0,0,.14), 0 2px 8px rgba(0,0,0,.06);
  transition: transform var(--transition), box-shadow var(--transition);
}
.section-video iframe:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

/* vídeo horizontal padrão */
.video-normal { width: 100%; height: 500px; margin-bottom: 24px; display: block; }

/* vídeos shorts em 2 colunas */
.shorts-container { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
.video-short { flex: 1 1 48%; max-width: 48%; height: 460px; display: block; }

/* =========================
   Seção 15 anos do SEI
========================= */
.section-15-anos { padding: var(--pad-tight) 0; }
.section-15-anos .video-normal { height: 480px; margin-bottom: 0; }

/* =========================
   Vantagens (home)
========================= */
.section-benefits { background: var(--white); color: var(--text-dark); padding: var(--pad) 0; }
.section-benefits .benefits-content p { margin-bottom: 16px; font-weight: 400; line-height: 1.7; color: var(--text-muted); }

/* =========================
   Multiplicadores (home)
========================= */
.section-multiplicadores-home { background: var(--white); padding: var(--pad-tight) 0; }
.section-multiplicadores-home h3 {
  font-size: 1.6em; margin-bottom: 18px; color: var(--secondary-color);
  font-weight: 800; border-left: 6px solid var(--primary-color); padding-left: 10px;
}
.section-multiplicadores-home p {
  max-width: none; margin: 0 0 20px 0; color: var(--text-muted); line-height: 1.7; text-align: left;
}
.section-multiplicadores-home .btn-wrapper { text-align: center; display: flex; justify-content: center; }
.section-multiplicadores-home .btn {
  padding: 12px 28px; border-radius: var(--radius-lg);
  background: var(--primary-color); color: var(--text-light); font-weight: 800; text-decoration: none;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
  display: inline-block; margin: 0 auto; box-shadow: var(--shadow-sm);
}
.section-multiplicadores-home .btn:hover { background: var(--primary-600); box-shadow: var(--shadow-md); transform: translateY(-1px); }

/* =========================
   Como usar (home)
========================= */
.section-how-to-use {
  background: var(--white); text-align: center; border-top: 18px solid var(--secondary-color); padding: var(--pad) 0;
}
.section-how-to-use h3 { color: var(--primary-color); font-weight: 800; font-size: 2rem; margin-bottom: 18px; }
.section-how-to-use p { max-width: 900px; margin: 0 auto 26px; line-height: 1.7; color: var(--text-muted); }
.section-how-to-use .btn-secondary { font-size: 1rem; padding: 14px 36px; border-radius: var(--radius-xl); font-weight: 800; }

/* =========================
   Rodapé
========================= */
.footer { margin-top: 36px; font-size: .95em; color: var(--text-dark); }
.footer-border { height: 18px; background: linear-gradient(to right, var(--secondary-color) 50%, var(--primary-color) 50%); }
.footer-main { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; padding: 44px 0; gap: 16px; }
.footer-logos { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.footer-logos img { height: 70px; width: auto; max-width: 140px; object-fit: contain; filter: drop-shadow(var(--shadow-xs)); }
.footer-social { text-align: right; font-size: .9em; }
.footer-social p { margin-bottom: 8px; font-weight: 700; color: var(--text-dark); }
.footer-social .social-line { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.footer-social .social-icons { display: flex; gap: 10px; }
.footer-social .social-icons img { height: 28px; width: 28px; transition: transform var(--transition-fast); }
.footer-social .social-icons img:hover { transform: translateY(-2px); }
.footer-social .social-handle { font-weight: 700; color: var(--text-dark); }
.footer-bottom {
  font-weight: 700; background: var(--primary-color); color: var(--text-light);
  text-align: center; padding: 16px; border-radius: 30px 30px 0 0; font-size: .95em; box-shadow: var(--shadow-sm) inset;
}

/* =========================
   Responsividade
========================= */

/* ≤ 800px */
@media (max-width: 800px) {
  .header { border-bottom: 3px solid var(--primary-color); }

  /* faixa verde: menu à esquerda, link à direita */
  .header-top .container { justify-content: space-between; }
  .menu-toggle { display: block; font-size: 1.8rem; }

  .header-main .container { flex-direction: column; align-items: center; text-align: center; }
  .logo-container { margin-bottom: 14px; }
  .sei-logo { width: 220px; max-width: 80%; height: auto; }

  /* Ações do header ocupando largura */
  .header-actions { width: 100%; justify-content: center; }
  .header-actions .login-button,
  .header-actions .train-button { width: 100%; max-width: 320px; }

  /* Esconde a navbar no mobile */
  .navbar { display: none; }

  /* Vídeos */
  .video-short { max-width: 100%; height: 360px; }
  .section-video { padding: 40px 0 24px; }
  .section-15-anos .video-normal { height: 420px; }

  /* Rodapé */
  .footer-main { flex-direction: column; align-items: center; text-align: center; }
  .footer-logos { flex-direction: column; align-items: center; gap: 16px; margin-bottom: 16px; }
  .footer-logos img { max-height: 60px; width: auto; }
  .footer-social { margin-top: 16px; }
}

/* ≤ 768px */
@media (max-width: 768px) {
  .section-hero .container { flex-direction: column-reverse; text-align: center; }
  .hero-content h2 { font-size: clamp(1.8rem, 5vw, 2.2rem); }
  .access-buttons { flex-direction: column; align-items: center; }
  .access-btn { width: 100%; max-width: 100%; }
  .video-short { max-width: 100%; height: 340px; }
}

/* ≥ 801px (desktop refinamentos) */
@media (min-width: 801px) {
  /* Desktop: na faixa verde, como o menu está oculto, empurra o link para a direita */
  .header-top .container { justify-content: flex-end; }

  .header-main .container { align-items: center; }
  .header-actions { align-items: flex-end; } /* bloco da direita encostado e alinhado */
}

/* =========================
   Robustez / Overflow
========================= */

/* Nunca permitir scroll lateral */
html, body { width: 100%; overflow-x: clip; }

/* Clipa transbordo horizontal de grandes blocos */
section, header, footer, .navbar, .header-top, .header-main { overflow-x: clip; }

/* Mídia responsiva */
img, iframe, video { max-width: 100%; height: auto; display: block; }

/* Iframes extra */
.section-video iframe,
.video-normal,
.video-short { display: block; max-width: 100%; }

/* ===== Motion preference ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
/* ---- Fala, Prefeito (2 colunas alinhadas à altura do vídeo) ---- */
.section-fala-prefeito { background: var(--white); }

/* grid: texto (esq) | vídeo (dir) */
#fala-prefeito .fp-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: center;        /* alinha pelo centro do card do vídeo */
  padding-block: 32px;        /* respiro menor para “colar” no vídeo */
}

/* Título — mantém padrão com barra lateral */
#fala-prefeito .fp-text h3 {
  color: var(--secondary-color);
  font-weight: 800;
  font-size: var(--fs-h3);
  margin-bottom: 14px;
  padding-left: 12px;
  border-left: 6px solid var(--primary-color);
}

/* Texto da esquerda ocupando a mesma altura do vídeo */
#fala-prefeito .fp-text {
  /* altura do card do vídeo + “moldura” (10px x 2) */
  min-height: calc(560px + 20px);
  display: flex;
  flex-direction: column;
  justify-content: center;    /* centraliza o conteúdo na altura */
}
#fala-prefeito .fp-text p { color: var(--text-muted); line-height: 1.7; margin-bottom: 10px; }
#fala-prefeito .fp-quote {
  margin-top: 6px;
  padding-left: 14px;
  border-left: 4px solid var(--primary-color);
  color: var(--text-dark);
  font-weight: 700;
}

/* Card do vídeo (mesma estética do portal) */
#fala-prefeito .shorts-spotlight {
  display: flex;
  justify-content: center;
  align-items: center;
}
#fala-prefeito .short-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 10px;
  box-shadow: 0 12px 28px rgba(0,0,0,.14), 0 2px 8px rgba(0,0,0,.06);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
#fala-prefeito .short-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(0,0,0,.16), 0 4px 12px rgba(0,0,0,.08);
}

/* Medidas do short (9:16) */
#fala-prefeito .video-short {
  display: block;
  width: 315px;
  height: 560px;
  border: 0;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}

/* Responsivo: empilha e remove a amarração de altura */
@media (max-width: 960px) {
  #fala-prefeito .fp-wrap {
    grid-template-columns: 1fr;
    gap: 20px;
    justify-items: center;
    text-align: left; /* mantém o h3 padrão */
  }
  #fala-prefeito .fp-text {
    min-height: auto;          /* não força a altura no mobile */
    justify-content: flex-start;
  }
  #fala-prefeito .video-short {
    width: min(92vw, 360px);
    height: calc(min(92vw, 360px) * 16 / 9);
  }
}
