/* ── SHARED NAVBAR + FOOTER ──
   Standardized across every page of the Estude Idiomas site.
   Relies on --navy, --navy-light, --red, --red-dark, --cream, --white, --dark, --gray, --gray-light
   being defined in each page's own :root block. */

/* NAVBAR */
nav { background: var(--navy); position: sticky; top: 0; z-index: 200; padding: 0 5%; }
.nav-inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 68px; }
.nav-logo { display: flex; align-items: center; }
.nav-logo img { height: 32px; width: auto; display: block; }
.nav-logo span { font-family: 'Poppins', sans-serif; font-weight: 800; color: white; font-size: 1.2rem; }
.nav-logo span em { color: var(--red); font-style: normal; }
.nav-links { display: flex; gap: 0.25rem; list-style: none; align-items: center; }
.nav-links > li { position: relative; }
.nav-links > li > a { display: flex; align-items: center; gap: 4px; color: rgba(255,255,255,0.8); font-family: 'Mulish', sans-serif; font-size: 0.88rem; font-weight: 600; padding: 0.5rem 0.75rem; border-radius: 4px; transition: color 0.2s, background 0.2s; }
.nav-links > li > a:hover { color: white; background: rgba(255,255,255,0.07); }
.nav-links > li > a .chev { font-size: 0.65rem; opacity: 0.6; transition: transform 0.2s; }
.has-dropdown.dd-open > .dd-trigger .chev { transform: rotate(180deg); }

.dropdown { display: none; position: absolute; top: calc(100% + 8px); left: 0; background: var(--white); border-radius: 10px; box-shadow: 0 12px 40px rgba(13,27,75,0.18); min-width: 260px; padding: 0.6rem; flex-direction: column; gap: 0.15rem; }
.has-dropdown.dd-open .dropdown { display: flex; }
.dd-item { display: flex; align-items: center; gap: 0.6rem; padding: 0.55rem 0.6rem; border-radius: 6px; color: var(--dark); font-size: 0.85rem; font-weight: 600; transition: background 0.15s; }
.dd-item:hover { background: var(--cream); }
.dd-item .flag { font-size: 1rem; }
.dd-item .dd-sub { font-size: 0.72rem; font-weight: 400; color: var(--gray); display: block; }

.nav-cta { background: var(--red); color: var(--white) !important; padding: 0.45rem 1.2rem; border-radius: 4px; font-weight: 700 !important; font-size: 0.88rem !important; transition: background 0.2s !important; }
.nav-cta:hover { background: var(--red-dark) !important; }
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: 4px; }
.hamburger span { display: block; width: 24px; height: 2px; background: white; }

/* FOOTER */
footer { background: #080f28; padding: 50px 5% 28px; }
.footer-inner { max-width: 1100px; margin: 0 auto; }
.footer-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2.5rem; margin-bottom: 2.5rem; }
.footer-brand-name img { height: 30px; width: auto; display: block; }
.footer-brand-name { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 1.1rem; color: white; }
.footer-brand-name em { color: var(--red); font-style: normal; }
.footer-brand p { font-size: 0.83rem; line-height: 1.7; color: rgba(255,255,255,0.45); max-width: 240px; margin-top: 0.8rem; }
.footer-col h5 { font-family: 'Poppins', sans-serif; font-size: 0.75rem; font-weight: 700; color: white; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.9rem; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.55rem; }
.footer-col a { color: rgba(255,255,255,0.45); font-size: 0.85rem; transition: color 0.2s; }
.footer-col a:hover { color: var(--red); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 1.4rem; display: flex; justify-content: space-between; align-items: center; font-size: 0.78rem; color: rgba(255,255,255,0.3); flex-wrap: wrap; gap: 0.5rem; }

/* MOBILE */
@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1/-1; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open { display: flex; flex-direction: column; align-items: stretch; gap: 0; position: absolute; top: 68px; left: 0; right: 0; width: auto; background: var(--navy); padding: 0.75rem 5%; }
  .nav-links.open > li { border-bottom: 1px solid rgba(255,255,255,0.07); width: 100%; }
  .nav-links.open > li > a { padding: 0.75rem 0; width: 100%; justify-content: space-between; }
  .nav-links.open .dropdown { position: static; box-shadow: none; margin: 0 0 0.5rem; min-width: 0; width: 100%; background: rgba(255,255,255,0.05); }
  .nav-links.open .dd-item { color: rgba(255,255,255,0.85); }
  .nav-links.open .dd-item:hover { background: rgba(255,255,255,0.08); }
  .nav-links.open .dd-sub { color: rgba(255,255,255,0.5); }
  .hamburger { display: flex; }
}
@media (max-width: 480px) {
  .footer-top { grid-template-columns: 1fr; }
}

/* Aviso de saída para a Hotmart */
#hotmart-aviso { position: fixed; inset: 0; background: rgba(13, 27, 75, 0.6); z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 1rem; }
#hotmart-aviso .hotmart-caixa { background: #fff; border-radius: 16px; max-width: 440px; width: 100%; padding: 1.8rem 1.6rem; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3); text-align: center; }
#hotmart-aviso h3 { font-family: 'Poppins', sans-serif; color: #0D1B4B; font-size: 1.25rem; margin-bottom: 0.7rem; }
#hotmart-aviso p { font-family: 'Mulish', sans-serif; color: #444; line-height: 1.65; margin-bottom: 1.3rem; }
#hotmart-aviso .hotmart-botoes { display: flex; gap: 0.7rem; justify-content: center; flex-wrap: wrap; }
#hotmart-aviso .hotmart-voltar { background: none; border: 1.5px solid #E2E2DC; color: #0D1B4B; font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 0.9rem; border-radius: 100px; padding: 0.7rem 1.4rem; cursor: pointer; }
#hotmart-aviso .hotmart-seguir { background: #E8000D; color: #fff; font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 0.9rem; border-radius: 100px; padding: 0.7rem 1.4rem; text-decoration: none; }
#hotmart-aviso .hotmart-seguir:hover { background: #b80009; }

/* Botão flutuante do WhatsApp (criado por nav-footer.js) */
#wa-flutuante { position: fixed; right: max(1rem, env(safe-area-inset-right, 0px)); bottom: max(1rem, env(safe-area-inset-bottom, 0px)); z-index: 150; width: 58px; height: 58px; border-radius: 50%; background: #25D366; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3); transition: transform 0.15s, box-shadow 0.15s; }
#wa-flutuante:hover { transform: scale(1.08); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); }
/* nas páginas de venda com a barra fixa "Quero me inscrever" (celular), o botão sobe para não ficar por cima */
body:has(.pg-fixo) #wa-flutuante { bottom: calc(4.4rem + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 761px) { body:has(.pg-fixo) #wa-flutuante { bottom: max(1rem, env(safe-area-inset-bottom, 0px)); } }

@media (max-width: 600px) { .nav-logo img { height: 24px !important; width: auto !important; } }

/* menu aberto no celular: painel destacado do fundo da página e botão Entrar com respiro */
@media (max-width: 768px) {
  .nav-links.open { background: #16255f; border-top: 1px solid rgba(255,255,255,0.12); box-shadow: 0 14px 28px rgba(0,0,0,0.35); padding: 0.5rem 5% 1.25rem; }
  .nav-links.open > li:has(.nav-cta) { border-bottom: 0; margin-top: 1rem; }
  .nav-links.open .nav-cta { justify-content: center; text-align: center; padding: 0.9rem 1rem; border-radius: 8px; font-size: 1rem !important; }
}

/* rodapé no celular: tudo centralizado, logo menor e colunas mais compactas */
@media (max-width: 600px) {
  footer { padding: 36px 6% 24px; }
  .footer-top { gap: 1.6rem; margin-bottom: 1.6rem; text-align: center; }
  .footer-brand-name { display: flex; justify-content: center; }
  .footer-brand-name img { height: 24px !important; }
  .footer-brand p { max-width: 280px; margin: 0.7rem auto 0; }
  .footer-col h5 { margin-bottom: 0.6rem; }
  .footer-col ul { align-items: center; gap: 0.4rem; }
  .footer-bottom { justify-content: center; text-align: center; }
}
@media (max-width: 480px) and (min-width: 340px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand, .footer-col:last-child { grid-column: 1 / -1; }
}
