/* ==========================================================================
   VALIDAR DNE — STYLE.CSS (MODERNO) v3.3 (FINAL)
   - Dropdown: SOMENTE POR CLIQUE (classe .open no <li>)
   - Mobile: hamburger ok + dropdown só abre com menu aberto
   - Footer: sem duplicações + redes sociais alinhadas à direita
   ========================================================================== */

/* ==========================================================================
   0. VARIÁVEIS (IDENTIDADE VISUAL)
   ========================================================================== */
:root{
  --brand-dark: #0B1F33;      /* azul profundo */
  --brand: #2563EB;           /* azul moderno */
  --brand-2: #22D3EE;         /* ciano */
  --brand-soft: #E8F1FF;      /* fundo suave azul */
  --bg: #ffffff;
  --bg-soft: #F3F6FA;         /* cinza/azul bem claro */

  --text: #0B1F33;
  --muted: #516173;

  --border: rgba(11, 31, 51, 0.12);
  --shadow-sm: 0 8px 18px rgba(0,0,0,0.08);
  --shadow: 0 18px 50px rgba(0,0,0,0.12);
  --radius: 14px;

  --nav-height: 88px;
}

/* ==========================================================================
   1. RESET / BASE
   ========================================================================== */
*{ box-sizing: border-box; }
html, body{ height: 100%; }

body, h1, h2, h3, h4, p, ul, details, summary{
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
}

body{ background: var(--bg); }
a{ text-decoration: none; color: inherit; }
main{ min-height: 60vh; }

.container{
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

img{ max-width: 100%; height: auto; display: block; }

/* ==========================================================================
   2. HEADER / NAV (MODERNO + DROPDOWN + CTA)
   ========================================================================== */
.main-header{
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 9999;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.main-nav{
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;

  position: relative;
  min-height: var(--nav-height);
  z-index: 10000;
}

/* LOGO */
.main-nav .logo{
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  z-index: 2;
}
.main-nav .logo img{
  height: 150px;
  width: auto;
}

/* HAMBURGER */
.hamburger-menu{
  display: none;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  margin-left: auto;
  z-index: 2;
}

.hamburger-menu .bar{
  display: block;
  width: 26px;
  height: 3px;
  margin: 5px auto;
  transition: all 0.25s ease-in-out;
  background: var(--brand-dark);
  border-radius: 10px;
}

.hamburger-menu.active .bar:nth-child(1){ transform: translateY(8px) rotate(45deg); }
.hamburger-menu.active .bar:nth-child(2){ opacity: 0; }
.hamburger-menu.active .bar:nth-child(3){ transform: translateY(-8px) rotate(-45deg); }

/* MENU (DESKTOP BASE) */
.nav-links{
  list-style: none;
  margin: 0;
  padding: 0;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;

  position: static;
  transform: none;

  flex: 1 1 auto;
  width: auto;
  flex-wrap: wrap;
}

/* itens */
.nav-links > li{
  position: relative;
  display: flex;
  align-items: center;
}

/* Links normais */
.nav-links > li > a{
  display: inline-flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 999px;

  color: var(--brand-dark);
  font-weight: 800;

  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.nav-links > li > a:hover{
  background: rgba(37,99,235,0.10);
  color: var(--brand);
  transform: translateY(-1px);
}

/* botão do dropdown */
.dropdown-toggle{
  appearance: none;
  background: none;
  border: 0;
  cursor: pointer;
  font: inherit;

  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 10px 12px;
  border-radius: 999px;

  color: var(--brand-dark);
  font-weight: 800;

  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.dropdown-toggle:hover{
  background: rgba(37,99,235,0.10);
  color: var(--brand);
  transform: translateY(-1px);
}

/* setinha */
.dropdown-toggle i{
  display: inline-block;
  transition: transform .2s ease;
}
.has-dropdown.open .dropdown-toggle i{
  transform: rotate(180deg);
}

/* CTA */
.header-cta{
  box-shadow: 0 10px 26px rgba(0,0,0,0.18);
}
.header-cta-desktop{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 14px;
  font-weight: 900;
  white-space: nowrap;
  flex: 0 0 auto;
}

/* CTA MOBILE (se usar dentro do UL futuramente) */
.nav-cta-mobile{ display: none; }

/* ajuste fino desktop intermediário */
@media (min-width: 769px) and (max-width: 980px){
  .nav-links{ gap: 8px; }
  .nav-links > li > a,
  .dropdown-toggle{
    padding: 8px 8px;
    font-size: 14px;
  }
}

/* ==========================================================================
   2.1 DROPDOWN — SOMENTE CLIQUE (classe .open)
   ========================================================================== */
.nav-links > li.has-dropdown{
  position: relative;
  z-index: 10001;
}

/* default: fechado */
.nav-links > .has-dropdown .dropdown-menu{
  display: none;
  list-style: none;
  margin: 0;
  padding: 10px 0;
}

/* Desktop: flutuante */
@media (min-width: 769px){
  .nav-links > .has-dropdown .dropdown-menu{
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 240px;

    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);

    padding: 10px;
    z-index: 10002;
  }

  .nav-links > .has-dropdown .dropdown-menu li a{
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 12px 12px;
    border-radius: 12px;

    color: var(--brand-dark);
    font-weight: 800;

    transition: background .15s ease, transform .15s ease, color .15s ease;
    white-space: nowrap;
  }

  .nav-links > .has-dropdown .dropdown-menu li a:hover{
    background: rgba(37,99,235,0.10);
    color: var(--brand);
    transform: translateX(2px);
  }
}

/* Mobile: sanfona dentro do menu */
@media (max-width: 768px){
  .nav-links > .has-dropdown .dropdown-menu{
    position: static;
    padding: 6px 0;
    background: rgba(37,99,235,0.06);
  }

  .nav-links > .has-dropdown .dropdown-menu li a{
    display: block;
    padding: 12px 22px;
    color: var(--brand-dark);
    font-weight: 800;
    font-size: 15px;
  }

  .nav-links > .has-dropdown .dropdown-menu li a:hover{
    background: rgba(37,99,235,0.12);
    color: var(--brand);
  }
}

/* ✅ Abre apenas com classe .open (JS) */
.has-dropdown.open .dropdown-menu{
  display: block;
}

/* ==========================================================================
   2.2 MOBILE HEADER (hamburger / layout)
   ========================================================================== */
@media (max-width: 768px){
  .hamburger-menu{ display: block; }

  :root{ --nav-height: 66px; }

  .main-nav{
    padding: 10px 14px;
    gap: 12px;
    min-height: var(--nav-height);
  }

  .main-nav .logo img{
    height: 58px;
    max-height: 58px;
    width: auto;
  }

  .header-cta-desktop{ display: none !important; }

  /* Menu mobile card */
  .nav-links{
    position: absolute;
    top: calc(100% + 10px);
    left: 12px;
    right: 12px;
    width: auto;

    display: none;
    flex-direction: column;
    gap: 0;

    background: #fff;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    border-radius: 16px;

    overflow: hidden;
    z-index: 10003;
  }
  .nav-links.active{ display: flex; }

  .nav-links > li{ width: 100%; display: block; }

  .nav-links > li > a{
    width: 100%;
    border-radius: 0;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    padding: 14px 16px;
    font-size: 16px;
  }

  .dropdown-toggle{
    width: 100%;
    padding: 14px 16px;
    justify-content: space-between;
    border-radius: 0;
    border-bottom: 1px solid var(--border);
    font-size: 16px;
  }

  /* Hamburger toque */
  .hamburger-menu{
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }
  .hamburger-menu .bar{ width: 22px; }
}

/* remove busca/lupa se existir */
.search-btn,
.search-overlay,
.nav-search,
.search-form,
.search-box,
.search-close{
  display: none !important;
}

/* ==========================================================================
   3. HOME — HERO
   ========================================================================== */
.home-hero{
  background: var(--brand-dark);
  color: #fff;
  padding: 56px 0;
  position: relative;
  z-index: 1;
}

.home-hero__grid{
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 50px;
  align-items: center;
}

.home-hero__media{
  display: flex;
  justify-content: flex-start;
}

.home-hero__media img{
  width: 100%;
  max-width: 420px;
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.25);
}

.home-hero__text h1{
  font-size: 38px;
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  color: #fff;
}

.home-hero__text p{
  font-size: 16px;
  line-height: 1.7;
  color: rgba(255,255,255,0.85);
  max-width: 720px;
  margin-bottom: 18px;
}

.home-hero__actions{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ==========================================================================
   3.1 BOTÕES (PADRÃO DO SITE)
   ========================================================================== */
.btn-primary,
.btn-secondary,
.btn-success{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  padding: 12px 18px;
  border-radius: 10px;

  font-size: 14px;
  font-weight: 900;

  border: 0;
  cursor: pointer;
  text-decoration: none;

  transition: transform 0.15s ease, opacity 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 10px 26px rgba(0,0,0,0.18);
}

.btn-primary{
  background: #1E5A8A;
  color: #fff !important;
}

.btn-primary:hover{
  transform: translateY(-2px);
  opacity: .96;
}

.btn-secondary{
  background: #ffffff;
  color: var(--brand-dark) !important;
  border: 2px solid rgba(11,31,51,0.25);
  box-shadow: none;
}

.btn-secondary:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.92);
}

.btn-secondary--light{
  background: #fff;
  border: 2px solid rgba(255,255,255,0.65);
}

/* ==========================================================================
   4. HOME — COMO FUNCIONA (3 cards)
   ========================================================================== */
.home-how{
  padding: 46px 0 56px;
  background: #fff;
}

.home-section-title{
  text-align: center;
  font-size: 22px;
  font-weight: 900;
  color: var(--brand-dark);
  margin-bottom: 26px;
}

.home-cards-3{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.home-card{
  background: var(--bg-soft);
  border: 1px solid rgba(0,0,0,0.03);
  border-radius: 10px;
  padding: 18px 18px;
}

.home-card h3{
  font-size: 14px;
  font-weight: 900;
  margin-bottom: 8px;
  color: var(--brand-dark);
}

.home-card p{
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

/* ==========================================================================
   5. HOME — ITENS DE SEGURANÇA (pills)
   ========================================================================== */
.home-security{
  background: var(--bg-soft);
  padding: 34px 0 44px;
}

.home-pills{
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.home-pill{
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 10px;
  padding: 14px 12px;
  text-align: center;
  font-weight: 800;
  font-size: 13px;
  color: var(--brand-dark);
  transition: transform .15s ease, background .15s ease;
}

.home-pill:hover{
  transform: translateY(-2px);
  background: rgba(37,99,235,0.06);
}

/* ==========================================================================
   6. HOME — BASE LEGAL
   ========================================================================== */
.home-legal{
  background: #fff;
  padding: 54px 0 64px;
}

.home-legal__grid{
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: 28px;
  align-items: center;
}

.home-legal__text h2{
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 8px;
  color: var(--brand-dark);
}

.home-legal__text p{
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 720px;
}

.home-legal__actions{
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}

.home-legal__actions .btn-secondary{
  width: 180px;
  justify-content: center;
}

/* ==========================================================================
   7. HOME — API OFICIAL
   ========================================================================== */
.home-api{
  background: #1E5A8A;
  color: #fff;
  padding: 44px 0 54px;
  text-align: center;
}

.home-api h2{
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 10px;
  color: #fff;
}

.home-api p{
  font-size: 13px;
  line-height: 1.7;
  color: rgba(255,255,255,0.88);
  max-width: 820px;
  margin: 0 auto 18px;
}

.home-api__actions{
  display: inline-flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ==========================================================================
   8. FAQ
   ========================================================================== */
.faq-section{
  padding: 64px 0;
  background: #fff;
}

.faq-section h2{
  text-align: center;
  font-size: 22px;
  color: var(--brand-dark);
  margin-bottom: 10px;
  font-weight: 900;
}

.faq-intro{
  text-align: center;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 13px;
}

.faq-item details{
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.85);
  margin-bottom: 12px;
  border-radius: 14px;
  overflow: hidden;
}

.faq-item summary{
  font-weight: 900;
  color: var(--brand-dark);
  font-size: 14px;
  cursor: pointer;
  list-style: none;

  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 16px;
  align-items: center;
}

.faq-item summary::-webkit-details-marker{ display: none; }

.faq-item summary::after{
  content: "▾";
  color: var(--brand);
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  flex-shrink: 0;
}

.faq-item details[open] summary::after{ content: "▴"; }

.faq-item p{
  margin-top: 0;
  padding: 0 16px 16px 16px;
  line-height: 1.7;
  color: var(--muted);
  font-size: 13px;
}

/* ==========================================================================
   9. FOOTER — PADRÃO INSTITUCIONAL (SEM DUPLICAÇÃO)
   ========================================================================== */
.main-footer{
  background: #0B1F33;
  color: rgba(255,255,255,0.9);
  padding: 54px 6% 30px;
}

.footer-content{
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255,255,255,0.14);
}

.footer-column{ min-width: 0; }

.footer-column h4{
  color: #ffffff;
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 900;
  font-size: 14px;
}

.footer-column ul{
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-column ul li{ margin: 6px 0; }

.footer-column ul li a{
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.9;
  transition: color .2s ease;
}
.footer-column ul li a:hover{
  color: #ffffff;
  text-decoration: underline;
}

.footer-certificados{
  display: flex;
  justify-content: center;
  align-items: center;
}

.footer-certificados img{
  max-width: 180px;
  width: 100%;
  height: auto;
}

/* REDES SOCIAIS (COLUNA DIREITA) */
.footer-social-column{ text-align: left; }

.footer-social{
  display: flex;
  justify-content: flex-start;
  gap: 14px;
  margin-top: 12px;
}

.footer-social a{
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 16px;
  transition: background .2s ease, transform .2s ease;
}

.footer-social a:hover{
  background: rgba(255,255,255,0.28);
  transform: translateY(-2px);
}

.footer-copyright{
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  margin-top: 14px;
}

/* RESPONSIVO FOOTER */
@media (max-width: 900px){
  .footer-content{
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer-social-column{ text-align: center; }
  .footer-social{ justify-content: center; }
}

/* ==========================================================================
   10. COOKIES
   ========================================================================== */
.cookie-banner{
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 16px 18px;
  background: #fff;
  color: var(--brand-dark);
  display: none;
  justify-content: center;
  align-items: center;
  gap: 16px;
  z-index: 9999;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.12);
  font-size: 14px;
  border-top: 1px solid var(--border);
}

.cookie-banner p{
  margin: 0;
  max-width: 850px;
  line-height: 1.6;
  font-weight: 700;
  color: var(--muted);
}

.cookie-banner a{
  color: var(--brand);
  text-decoration: underline;
  font-weight: 900;
}

.cookie-banner button#cookie-accept{
  border: none;
  padding: 10px 14px;
  cursor: pointer;
  border-radius: 10px;
  font-weight: 900;
  background: var(--brand);
  color: #fff;
  flex-shrink: 0;
  transition: 0.2s ease;
}

.cookie-banner button#cookie-accept:hover{
  background: #1D4ED8;
}

/* ==========================================================================
   11. VOLTAR AO TOPO (mobile)
   ========================================================================== */
.back-to-top{
  position: fixed;
  bottom: 80px;
  right: 16px;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  border: none;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(0,0,0,0.25);
  z-index: 9998;
  transition: transform .2s ease, opacity .2s ease;
}

.back-to-top i{ font-size: 18px; }

.back-to-top.show{
  transform: translateY(0);
  opacity: 1;
}

/* ==========================================================================
   12. RESPONSIVIDADE HOME
   ========================================================================== */
@media (max-width: 1024px){
  .home-hero__grid{ grid-template-columns: 1fr 1.2fr; gap: 32px; }
  .home-pills{ grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px){
  .home-hero{ padding: 42px 0; }

  .home-hero__grid{
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .home-hero__media{ justify-content: center; }
  .home-hero__text{ text-align: center; }
  .home-hero__text h1{ font-size: 26px; }
  .home-hero__actions{ justify-content: center; }

  .home-cards-3{ grid-template-columns: 1fr; }
  .home-pills{ grid-template-columns: 1fr 1fr; }

  .home-legal__grid{ grid-template-columns: 1fr; gap: 18px; }
  .home-legal__actions{ align-items: center; }

  .cookie-banner{ flex-direction: column; text-align: center; }

  .back-to-top{
    display: flex;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
  }
  .back-to-top.show{
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
}
