/* ============================================================
   COLÉGIO ALTERNATIVO — base.css
   Design system unificado (tokens, reset, componentes globais)
   Carregar ANTES do CSS específico da página.
   ============================================================ */

/* ─── 1. Tokens ─── */
:root {
  /* Cores de marca */
  --sky:        #089DD9;
  --sky-hover:  #0789BD;
  --sky-light:  #4AB8E8;
  --sky-soft:   #BDE5F5;
  --ice:        #E8F6FD;
  --white:      #FFFFFF;
  --navy:       #0D2137;
  --navy-soft:  #1B3552;

  /* Texto / linhas */
  --ink:    #0D2137;
  --ink-2:  #3D4A5C;
  --ink-3:  #6B7785;
  --line:   #E2E8F0;
  --line-2: #F1F4F8;

  /* Sombras */
  --shadow-sm:  0 2px 12px rgba(8,157,217,0.08);
  --shadow-md:  0 8px 32px rgba(8,157,217,0.13);
  --shadow-lg:  0 20px 60px rgba(8,157,217,0.18);
  --shadow-cta: 0 6px 22px rgba(8,157,217,0.35);

  /* Raios */
  --r-sm: 8px;
  --r: 14px;
  --r-lg: 24px;
  --radius: 14px;
  --radius-lg: 24px;
  --radius-pill: 9999px;

  --transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── 2. Reset / base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Outfit', sans-serif;
  color: var(--ink-2);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
::selection { background: var(--sky-soft); color: var(--navy); }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--line-2); }
::-webkit-scrollbar-thumb { background: var(--sky-light); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--sky); }

/* Acessibilidade */
:focus-visible { outline: 3px solid var(--sky-light); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* Âncoras não ficam escondidas atrás do header sticky */
section[id], div[id], [id] { scroll-margin-top: 96px; }

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

/* ─── 3. Tipografia de seção ─── */
.section-tag {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--sky);
  margin-bottom: 1rem;
}
.section-tag::before {
  content: ''; display: block; width: 28px; height: 3px;
  background: var(--sky); border-radius: 2px;
}
.section-tag.center { justify-content: center; }
.section-title {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 800; color: var(--ink);
  line-height: 1.15; margin-bottom: 1rem;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.section-title span { color: var(--sky); }

/* ─── 4. Botões ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 0.85rem 2rem; border-radius: var(--radius-pill);
  font-family: 'Outfit', sans-serif; font-size: 0.9rem; font-weight: 700;
  cursor: pointer; border: none; transition: var(--transition);
  text-transform: uppercase; letter-spacing: 0.05em;
  text-decoration: none;
}
.btn-primary { background: var(--sky); color: var(--white); box-shadow: var(--shadow-cta); }
.btn-primary:hover { background: var(--sky-hover); transform: translateY(-2px); box-shadow: 0 10px 30px rgba(8,157,217,0.45); }
.btn-outline { background: transparent; color: var(--sky); border: 2px solid var(--sky); padding: calc(0.85rem - 2px) calc(2rem - 2px); }
.btn-outline:hover { background: var(--sky); color: var(--white); transform: translateY(-2px); }
.btn-white { background: var(--white); color: var(--sky); box-shadow: 0 4px 18px rgba(13,33,55,0.12); }
.btn-white:hover { background: var(--ice); transform: translateY(-2px); box-shadow: 0 8px 26px rgba(13,33,55,0.18); }

.btn-ghost-light { background: transparent; color: rgba(255,255,255,0.95); border: 2px solid rgba(255,255,255,0.45); padding: calc(0.85rem - 2px) calc(2rem - 2px); }
.btn-ghost-light:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.7); transform: translateY(-2px); }
.btn svg { flex-shrink: 0; }

/* ─── Ícone Anglo (leão) ─── */
.anglo-lion { width: 18px; height: 18px; fill: currentColor; }
.segment-badge .anglo-lion { fill: var(--sky); }

/* ─── 5. Topbar ─── */
#stickyHeader { position: sticky; top: 0; z-index: 1000; }
.topbar { background: var(--sky); color: rgba(255,255,255,0.85); font-size: 0.82rem; padding: 0.4rem 0; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem; padding-left: 1rem; padding-right: 1rem; max-width: 100%; margin: 0; }
.topbar-left { display: flex; align-items: center; gap: 1.5rem; }
.topbar-item { display: flex; align-items: center; gap: 6px; }
.topbar-item svg { width: 13px; height: 13px; flex-shrink: 0; }
.topbar-right { display: flex; align-items: center; gap: 0.8rem; }
.social-link { width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,0.12); display: flex; align-items: center; justify-content: center; transition: var(--transition); }
.social-link:hover { background: rgba(255,255,255,0.28); transform: translateY(-1px); }
.social-link svg { width: 14px; height: 14px; fill: white; }

/* ─── 6. Navbar ─── */
.navbar { background: var(--white); box-shadow: var(--shadow-sm); transition: var(--transition); }
.navbar.scrolled {
  box-shadow: 0 4px 30px rgba(8,157,217,0.15);
  background: rgba(255,255,255,0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; height: 68px; padding-left: 1rem; padding-right: 1rem; max-width: 100%; margin: 0; }
.nav-logo img { height: 48px; width: auto; }
.nav-menu { display: flex; align-items: center; gap: 0.2rem; }
.nav-item { position: relative; }
.nav-link {
  padding: 0.5rem 0.8rem; border-radius: var(--r-sm);
  font-size: 0.88rem; font-weight: 600; color: var(--ink);
  transition: var(--transition); white-space: nowrap; cursor: pointer;
  display: flex; align-items: center; gap: 5px;
}
.nav-link:hover { color: var(--sky); background: var(--ice); }
.nav-link.active { color: var(--sky); }
.nav-link.active::after { content: ''; position: absolute; left: 0.8rem; right: 0.8rem; bottom: 2px; height: 2.5px; border-radius: 2px; background: var(--sky); }
.nav-item > .nav-link { position: relative; }
.nav-link svg { width: 11px; height: 11px; transition: var(--transition); }
.nav-item:hover .nav-link svg { transform: rotate(180deg); }

/* Dropdown (com "ponte" invisível para não fechar no hover) */
.dropdown-menu {
  position: absolute; top: calc(100% + 8px); left: 0;
  background: var(--white); border-radius: var(--r);
  box-shadow: var(--shadow-lg); min-width: 210px;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: var(--transition); padding: 0.5rem;
  border: 1px solid var(--line); z-index: 50;
}
.dropdown-menu::before { content: ''; position: absolute; top: -10px; left: 0; right: 0; height: 10px; }
.dropdown-menu.right-aligned { right: 0; left: auto; }
.nav-item:hover .dropdown-menu,
.nav-item:focus-within .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-link { display: block; padding: 0.6rem 1rem; font-size: 0.88rem; font-weight: 500; color: var(--ink-2); border-radius: var(--r-sm); transition: var(--transition); }
.dropdown-link:hover { background: var(--ice); color: var(--sky); padding-left: 1.3rem; }

/* CTA dentro da navbar */
.nav-cta { margin-left: 0.6rem; }
.nav-cta .btn { padding: 0.5rem 1.2rem; font-size: 0.78rem; }

.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: 4px; }
.hamburger span { display: block; width: 26px; height: 2.5px; background: var(--ink); border-radius: 2px; transition: var(--transition); }
.hamburger.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ─── 7. Navegação mobile ─── */
.mobile-nav { display: none; position: fixed; inset: 0; z-index: 2000; background: var(--white); flex-direction: column; padding: 2rem; overflow-y: auto; }
.mobile-nav.open { display: flex; }
.mobile-nav-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.6rem; }
.mobile-nav-header img { height: 44px; }
.mobile-close { width: 40px; height: 40px; border-radius: 50%; background: var(--line-2); border: none; cursor: pointer; font-size: 1.2rem; color: var(--ink); display: flex; align-items: center; justify-content: center; }
.mobile-nav-links { display: flex; flex-direction: column; gap: 0.15rem; }
.mobile-nav-link {
  padding: 0.8rem 0.8rem; border-radius: var(--r-sm);
  font-size: 1rem; font-weight: 600; color: var(--ink);
  transition: var(--transition);
}
.mobile-nav-link:hover, .mobile-nav-link:active { background: var(--ice); color: var(--sky); padding-left: 1rem; }
.mobile-nav-link.sub { padding-left: 1.6rem; font-size: 0.94rem; font-weight: 500; color: var(--ink-2); }
.mobile-nav-group-label {
  margin-top: 0.9rem; padding: 0 0.8rem;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-3);
}
.mobile-nav-footer { margin-top: auto; padding-top: 2rem; }

/* ─── 8. Footer ─── */
footer { background: var(--navy); color: rgba(255,255,255,0.7); padding: 4rem 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 3rem; padding-bottom: 3rem; border-bottom: 1px solid rgba(255,255,255,0.08); }
.footer-brand-logo { height: 50px; margin-bottom: 1.2rem; filter: brightness(0) invert(1); }
.footer-desc { font-size: 0.9rem; line-height: 1.75; margin-bottom: 1.5rem; }
.footer-socials { display: flex; gap: 0.8rem; }
.footer-social { width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,0.08); display: flex; align-items: center; justify-content: center; transition: var(--transition); }
.footer-social:hover { background: var(--sky); transform: translateY(-2px); }
.footer-social svg { width: 17px; height: 17px; fill: rgba(255,255,255,0.7); }
.footer-social:hover svg { fill: white; }
.footer-col-title { font-size: 0.82rem; font-weight: 700; color: white; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 1.2rem; }
.footer-links { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-links a { font-size: 0.9rem; color: rgba(255,255,255,0.6); transition: var(--transition); }
.footer-links a:hover { color: white; padding-left: 4px; }
.footer-contact-item { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 1rem; }
.footer-contact-item svg { width: 16px; height: 16px; fill: none; stroke: var(--sky); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; margin-top: 2px; }
.footer-contact-item span { font-size: 0.88rem; line-height: 1.5; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding: 1.5rem 0; flex-wrap: wrap; gap: 1rem; }
.footer-bottom p { font-size: 0.82rem; color: rgba(255,255,255,0.4); }

/* ─── 9. Flutuantes ─── */
.whatsapp-float { position: fixed; bottom: 2rem; right: 2rem; z-index: 999; width: 56px; height: 56px; border-radius: 50%; background: #25D366; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 20px rgba(37,211,102,0.4); transition: var(--transition); }
.whatsapp-float:hover { transform: scale(1.08); box-shadow: 0 8px 30px rgba(37,211,102,0.55); }
.whatsapp-float svg { width: 28px; height: 28px; fill: white; }
.side-cta {
  position: fixed; right: 0; top: 50%; transform: translateY(-50%); z-index: 997;
  background: var(--sky); color: white; writing-mode: vertical-lr; text-orientation: mixed;
  padding: 1.1rem 0.6rem; border-radius: 10px 0 0 10px;
  font-weight: 700; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase;
  box-shadow: -2px 0 18px rgba(8,157,217,0.35);
  transition: transform 0.25s, box-shadow 0.25s; cursor: pointer;
}
.side-cta:hover { transform: translateY(-50%) translateX(-4px); box-shadow: -4px 0 24px rgba(8,157,217,0.5); }

/* ─── 10. Hero interno de página ─── */
.page-hero { background: linear-gradient(135deg, var(--sky) 0%, var(--sky-light) 60%, var(--sky-soft) 100%); position: relative; overflow: hidden; padding: 5rem 0 3rem; text-align: center; color: white; }
.page-hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 70% 50%, rgba(8,157,217,0.25) 0%, transparent 60%); }
.page-hero .container { position: relative; z-index: 1; }
.page-hero-tag { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(255,255,255,0.6); margin-bottom: 0.8rem; }
.page-hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 900; line-height: 1.1; margin-bottom: 1rem; text-wrap: balance; }
.page-hero p { font-size: 1.1rem; color: rgba(255,255,255,0.85); max-width: 580px; margin: 0 auto 2rem; }
.page-hero-wave { position: absolute; bottom: -2px; left: 0; right: 0; }

/* ─── 11. Blocos de conteúdo ─── */
.content-section { padding: 5rem 0; }
.content-card { background: var(--white); border-radius: var(--r-lg); padding: 2.5rem; box-shadow: var(--shadow-sm); border: 1px solid var(--line); margin-bottom: 2rem; }

/* ─── 12. Formulários ─── */
.form-control {
  width: 100%; padding: 0.8rem 1rem;
  border: 1.5px solid var(--line); border-radius: 10px;
  font-family: 'Outfit', sans-serif; font-size: 0.95rem; color: var(--ink);
  background: var(--white); transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus { outline: none; border-color: var(--sky-light); box-shadow: 0 0 0 3px rgba(8,157,217,0.12); }

/* ─── 13. Modal genérico ─── */
.modal-overlay { display: none; position: fixed; inset: 0; z-index: 3000; background: rgba(10,15,40,0.65); backdrop-filter: blur(4px); align-items: center; justify-content: center; padding: 1rem; }
.modal-overlay.open { display: flex; }
.modal-box { background: white; border-radius: 20px; width: 100%; max-width: 660px; max-height: 90vh; overflow-y: auto; box-shadow: 0 30px 80px rgba(0,0,0,0.3); animation: modalIn 0.3s cubic-bezier(0.4,0,0.2,1); }
@keyframes modalIn { from { opacity: 0; transform: scale(0.94) translateY(20px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-header { background: linear-gradient(135deg, var(--sky-hover), var(--sky)); color: white; padding: 2rem 2rem 1.5rem; border-radius: 20px 20px 0 0; position: relative; }
.modal-header h2 { font-size: 1.4rem; font-weight: 800; margin-bottom: 0.3rem; }
.modal-header p { font-size: 0.9rem; color: rgba(255,255,255,0.75); }
.modal-close-btn { position: absolute; top: 1rem; right: 1rem; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,0.15); border: none; color: white; font-size: 1.1rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.2s; }
.modal-close-btn:hover { background: rgba(255,255,255,0.28); }
.modal-body { padding: 1.8rem 2rem 2rem; }
.modal-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.modal-row.single { grid-template-columns: 1fr; }
.modal-field label { font-size: 0.78rem; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.06em; display: block; margin-bottom: 0.35rem; }
.modal-field input, .modal-field select { width: 100%; padding: 0.7rem 1rem; border: 1.5px solid var(--line); border-radius: 10px; font-family: 'Outfit', sans-serif; font-size: 0.93rem; color: var(--ink); transition: border-color 0.2s, box-shadow 0.2s; background: var(--ice); }
.modal-field input:focus, .modal-field select:focus { outline: none; border-color: var(--sky-light); box-shadow: 0 0 0 3px rgba(8,157,217,0.12); background: white; }
.modal-submit { width: 100%; padding: 0.9rem; background: var(--sky); color: white; border: none; border-radius: var(--radius-pill); font-family: 'Outfit', sans-serif; font-size: 1rem; font-weight: 700; cursor: pointer; transition: background 0.2s, transform 0.2s; letter-spacing: 0.04em; margin-top: 0.5rem; }
.modal-submit:hover { background: var(--sky-hover); transform: translateY(-1px); }
.modal-success { display: none; text-align: center; padding: 2.5rem 2rem; }
.modal-success-icon { font-size: 3rem; margin-bottom: 1rem; }
.modal-success h3 { font-size: 1.5rem; font-weight: 800; color: var(--ink); margin-bottom: 0.5rem; }
.modal-success p { color: var(--ink-2); margin-bottom: 0.3rem; }
.modal-success .reg-id { font-size: 1.3rem; font-weight: 800; color: var(--sky); background: var(--ice); border-radius: 10px; padding: 0.6rem 1.2rem; display: inline-block; margin: 0.8rem 0 1.5rem; letter-spacing: 0.08em; }
.btn-wpp { display: inline-flex; align-items: center; gap: 10px; background: #25D366; color: white; padding: 0.85rem 2rem; border-radius: var(--radius-pill); font-weight: 700; font-size: 0.95rem; text-decoration: none; box-shadow: 0 4px 20px rgba(37,211,102,0.4); transition: background 0.2s, transform 0.2s; }
.btn-wpp:hover { background: #1da851; transform: translateY(-2px); }
.btn-wpp svg { width: 22px; height: 22px; fill: white; }

/* ─── 14. Responsivo (componentes globais) ─── */
@media (max-width: 1180px) {
  .nav-link { font-size: 0.8rem; padding: 0.5rem 0.55rem; }
  .nav-cta .btn { font-size: 0.72rem; padding: 0.45rem 0.9rem; }
}
@media (max-width: 1024px) {
  .nav-menu { display: none; }
  .hamburger { display: flex; }
}
@media (max-width: 768px) {
  .container { padding: 0 1.2rem; }
  .topbar-left { display: none; }
  .topbar .container { justify-content: center; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .whatsapp-float { bottom: 1.2rem; right: 1.2rem; }
}
@media (max-width: 600px) {
  .modal-row { grid-template-columns: 1fr; }
  .modal-body { padding: 1.2rem; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { justify-content: center; text-align: center; }
}
