/* =========================================================
   EAF Flow — base.css
   Estilos globais: variáveis, reset, navegação, rodapé,
   botões genéricos, transições de página, FAQ, componente
   de mídia reutilizável
   ========================================================= */

:root {
  --bg: #070910;
  --surface: #0f1117;
  --surface2: #161b26;
  --border: #1e2535;
  --grad: linear-gradient(135deg, #00e5a0, #00b8ff);
  --grad-gold: linear-gradient(135deg, #f5c842, #e8960a);
  --green: #00e5a0;
  --blue: #00b8ff;
  --text: #f0f2f8;
  --muted: #5a6380;
  --soft: #8a9ab8;
  --danger: #ff4d6d;
  --orange: #ff6b1a;
  --yellow: #ffd11a;
  --gold: #f5c842;
  --gold-dark: #c9920a;
  --header-h: 68px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  padding-top: var(--header-h);
}

/* Trava o scroll da pagina quando o menu mobile esta aberto */
body.nav-open {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- Navegacao ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9990;
  background: rgba(7,9,16,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-container {
  width: 100%;
  max-width: 1180px;
  min-height: var(--header-h);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.nav-logo {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  text-decoration: none;
}
.nav-logo img {
  height: 34px;
  width: auto;
  display: block;
}
.nav-brand-text {
  margin-left: 8px;
  white-space: nowrap;
}
.main-nav {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  gap: 6px;
}
.main-nav a {
  padding: 8px 13px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  color: var(--soft);
  border: 1px solid transparent;
  white-space: nowrap;
  transition: color .2s, background .2s;
}
.main-nav a.active,
.main-nav a:hover {
  color: var(--text);
  background: var(--surface2);
}
.main-nav a.active { color: var(--green); }
.nav-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: var(--surface2);
  color: var(--text);
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
  padding: 11px 16px;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid var(--border);
  transition: border-color .2s, color .2s;
}
.nav-action:hover {
  border-color: var(--green);
  color: var(--green);
}

/* Botao hamburguer - oculto no desktop, so aparece no breakpoint mobile/tablet estreito */
.nav-toggle {
  display: none;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
}
.nav-toggle:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}
.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--home-navy, #17263A);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 1040px) and (min-width: 901px) {
  .nav-container {
    gap: 12px;
    padding: 0 18px;
  }
  .main-nav { gap: 2px; }
  .main-nav a {
    padding: 8px 9px;
    font-size: 12px;
  }
  .nav-action {
    padding: 10px 12px;
    font-size: 11px;
  }
}

/* Mobile e tablet estreito: nav vira painel suspenso, controlado pelo hamburguer */
@media (max-width: 900px) {
  .nav-action { display: none; }
  .nav-toggle { display: inline-flex; }

  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex: none;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 2px;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 10px 16px 18px;
    box-shadow: 0 16px 30px rgba(0,0,0,.35);
    z-index: 9991;

    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
  }
  .main-nav.is-open {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    transition: opacity .18s ease, transform .18s ease;
  }
  .main-nav a {
    width: 100%;
    padding: 13px 12px;
    font-size: 15px;
    border-radius: 8px;
  }
}

@media (max-width: 640px) {
  :root { --header-h: 62px; }
  .nav-container {
    padding: 0 14px;
    gap: 10px;
  }
  .nav-logo img { height: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  .main-nav {
    transition: none;
  }
}

/* ---------- Botões genéricos ---------- */
.btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--grad); color: #000; font-family: 'DM Sans', sans-serif;
  font-size: 15px; font-weight: 800; padding: 15px 36px; border-radius: 100px;
  text-decoration: none; border: none; cursor: pointer;
  transition: opacity .2s, transform .2s;
}
.btn-primary:hover { opacity: .9; transform: translateY(-1px); }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 10px;
  background: transparent; color: var(--text); font-family: 'DM Sans', sans-serif;
  font-size: 14px; font-weight: 700; padding: 13px 30px; border-radius: 100px;
  text-decoration: none; border: 1px solid var(--border); cursor: pointer;
  transition: border-color .2s, color .2s;
}
.btn-secondary:hover { border-color: var(--green); color: var(--green); }

/* ---------- Estrutura genérica de seção ---------- */
.sep { border: none; border-top: 1px solid var(--border); }
.section { padding: 72px 24px; max-width: 860px; margin: 0 auto; }
.label { font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.title { font-family: 'Bebas Neue', sans-serif; font-size: clamp(30px, 4.5vw, 50px); line-height: 1.08; color: var(--text); margin-bottom: 14px; letter-spacing: .5px; }
.subtitle { font-size: 15px; color: var(--soft); line-height: 1.7; margin-bottom: 32px; max-width: 620px; }

/* ---------- FAQ (usado em várias páginas) ---------- */
.faq-list { margin-top: 24px; }
.faq-item { border-bottom: 1px solid var(--border); padding: 16px 0; }
.faq-q { font-weight: 700; font-size: 14px; color: var(--text); margin-bottom: 6px; }
.faq-a { font-size: 13px; color: var(--soft); line-height: 1.65; }

/* ---------- Contato (presente em todas as páginas) ---------- */
.contato-block { text-align: center; padding: 64px 24px; }
.contato-block .title { margin-bottom: 10px; }
.contato-block p { font-size: 14px; color: var(--soft); max-width: 460px; margin: 0 auto 26px; line-height: 1.65; }

/* ---------- Rodapé ---------- */
footer { border-top: 1px solid var(--border); padding: 28px 24px; text-align: center; font-size: 12px; color: var(--muted); }
.footer-links { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; }
.footer-links a { color: var(--muted); font-size: 11px; text-decoration: none; }
.footer-links a:hover { color: var(--soft); }
.footer-logo { height: 24px; width: auto; opacity: .35; margin-bottom: 10px; }

/* ---------- Animação reveal ao rolar ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Componente de mídia reutilizável ---------- */
.media-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 28px; }
.media-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; text-decoration: none; display: block; transition: border-color .2s; }
.media-card:hover { border-color: rgba(0,229,160,.25); }
.media-frame { position: relative; aspect-ratio: 4 / 3; background: var(--surface2); display: flex; align-items: center; justify-content: center; }
.media-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-body { padding: 14px 16px 18px; }
.media-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.media-desc { font-size: 12px; color: var(--soft); line-height: 1.55; }

/* ---------- Etapas do processo (Serviços, EAF Menu, etc.) ---------- */
.process-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-top: 28px; }
.process-step { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px 16px; }
.process-num { font-family: 'Bebas Neue', sans-serif; font-size: 26px; color: var(--green); line-height: 1; margin-bottom: 8px; }
.process-step p { font-size: 13px; color: var(--soft); line-height: 1.6; }

/* ---------- Lista de módulos (EAF Menu e afins) ---------- */
.module-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 28px; }
.module-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px 16px; }
.module-name { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.module-card p { font-size: 12px; color: var(--soft); line-height: 1.6; }
