/* ═══════════════════════════════════════════════════════════════════
   Colégio Alternativo — REVISÃO GERAL (site-fixes)
   ───────────────────────────────────────────────────────────────────
   Importar DEPOIS dos estilos da página em cada HTML:
     <link rel="stylesheet" href="./_site-fixes.css">

   Trata:
   1. Textos brancos sobre branco (contraste seguro em todo lugar)
   2. Modais (header sky sólido, botão de fechar contrastado)
   3. Heros das páginas internas (sky sólido + textura SVG)
   4. Form do site institucional (aba "Indique um Amigo")
   5. Micro-ajustes (foco visível, cores de placeholder, etc.)
   ═══════════════════════════════════════════════════════════════════ */

/* Re-declara tokens caso a página não importe _vars.css */
:root {
  --sky:        #089DD9;
  --sky-hover:  #0789BD;
  --sky-light:  #4AB8E8;
  --sky-soft:   #BDE5F5;
  --ice:        #E8F6FD;
  --white:      #FFFFFF;
  --navy:       #0D2137;
  --ink:        #0D2137;
  --ink-2:      #3D4A5C;
  --ink-3:      #6B7785;
  --line:       #E2E8F0;

  --shadow-cta: 0 6px 22px rgba(8,157,217,0.35);
  --shadow-md:  0 8px 32px rgba(8,157,217,0.13);
}

/* ───────────────────────────────────────────────────────────────────
   1) MODAIS — header sempre sky sólido com texto branco LEGÍVEL
   ─────────────────────────────────────────────────────────────────── */
/* Garantir que a caixa do modal sempre apareça visível
   (a animação modalIn às vezes não completa em iframes/reduced-motion) */
.modal-box {
  opacity: 1 !important;
  animation-fill-mode: forwards !important;
}
@media (prefers-reduced-motion: reduce) {
  .modal-box { animation: none !important; transform: none !important; }
}
.modal-header,
[class*="modal"] .modal-header {
  background: var(--sky) !important;
  color: #fff !important;
}
.modal-header h1,
.modal-header h2,
.modal-header h3,
.modal-header h2 *,
.modal-header > div > h2 {
  color: #fff !important;
}
.modal-header p,
.modal-header .modal-sub,
.modal-header > p {
  color: rgba(255,255,255,0.92) !important;
}
.modal-close-btn {
  background: rgba(255,255,255,0.20) !important;
  color: #fff !important;
  border: 1px solid rgba(255,255,255,0.25) !important;
}
.modal-close-btn:hover {
  background: rgba(255,255,255,0.34) !important;
}

/* Modal body — garante texto navy sobre branco */
.modal-body { color: var(--navy); }
.modal-body label,
.modal-field label { color: var(--navy) !important; }
.modal-body input,
.modal-body select,
.modal-body textarea,
.modal-field input,
.modal-field select {
  color: var(--navy) !important;
  background: #fff !important;
}
.modal-body input::placeholder,
.modal-field input::placeholder { color: #94A3B8 !important; opacity: 1; }

/* ───────────────────────────────────────────────────────────────────
   2) HEROES das páginas internas — sky SÓLIDO + textura SVG
   ─────────────────────────────────────────────────────────────────── */
.page-hero,
.seg-hero {
  background-color: var(--sky) !important;
  background-image: url("./_hero-pattern.svg") !important;
  background-repeat: repeat !important;
  background-size: 480px 480px !important;
  background-position: 0 0 !important;
  position: relative !important;
  overflow: hidden !important;
}

/* remove os gradientes radiais antigos do ::before */
.page-hero::before,
.seg-hero::before {
  background: linear-gradient(180deg, rgba(8,157,217,0) 0%, rgba(8,157,217,0.28) 100%) !important;
  opacity: 1 !important;
}

/* Textos do hero permanecem em branco, mais legíveis */
.page-hero h1,
.seg-hero h1,
.seg-hero-content h1 {
  color: #fff !important;
  text-shadow: 0 2px 24px rgba(7,75,108,0.35);
}
.page-hero p,
.seg-hero p,
.seg-hero-content p {
  color: rgba(255,255,255,0.94) !important;
  text-shadow: 0 1px 12px rgba(7,75,108,0.28);
}
.page-hero-tag,
.seg-hero-tag,
.hero-tag {
  color: #fff !important;
  background: rgba(255,255,255,0.18);
  padding: 0.35rem 0.9rem;
  border-radius: 9999px;
  display: inline-block;
  letter-spacing: 0.14em !important;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.22);
}

/* wave do bottom do hero — branco */
.page-hero-wave svg path,
.seg-hero-wave svg path,
.hero-wave svg path {
  fill: #fff !important;
}

/* esconde as bolhas decorativas das páginas antigas — a textura SVG já dá o efeito */
.page-hero .hero-deco,
.seg-hero .seg-hero-deco {
  display: none !important;
}

/* ───────────────────────────────────────────────────────────────────
   3) Contrast safety — banir branco-em-branco genérico
   ─────────────────────────────────────────────────────────────────── */
body { color: var(--ink-2); }
.section-title,
.about-text h2,
.diferenciais-header h2,
.depoimentos-header h2,
.contato-header h2 {
  color: var(--ink) !important;
}
.section-title span { color: var(--sky) !important; }

/* corrige eventuais labels brancos sobre fundo branco do form principal */
.form-body label,
.form-group label { color: var(--ink) !important; }
.form-control,
.form-control:not(:placeholder-shown) { color: var(--ink) !important; }

/* placeholders sempre cinza-médio (não branco) */
input::placeholder,
textarea::placeholder { color: var(--ink-3) !important; opacity: 1; }

/* Tags / badges em fundo claro — garante texto sky escuro */
.preco-tag.preco-gratis { color: #15803d; }
.preco-tag.preco-pago   { color: #a16207; }

/* EXCEÇÃO: seção .diferenciais tem background azul escuro
   → "Diferenciais" deve ficar branco igual a "Nossos", não sky */
.diferenciais-header .section-title,
.diferenciais-header .section-title span {
  color: #fff !important;
}

/* Página de Tecnologias usa .page-header — adicionamos .page-hero
   ao lado e precisamos forçar TUDO branco (breadcrumb, section-tag, h1 span) */
.page-header.page-hero .breadcrumb a,
.page-header.page-hero .breadcrumb span,
.page-header.page-hero .breadcrumb .current,
.page-header.page-hero .breadcrumb svg {
  color: #fff !important;
  stroke: #fff !important;
}
.page-header.page-hero .breadcrumb a {
  opacity: 0.85;
  text-decoration: none;
}
.page-header.page-hero .breadcrumb a:hover { opacity: 1; }
.page-header.page-hero .section-tag {
  color: #fff !important;
  background: rgba(255,255,255,0.18);
  padding: 0.35rem 0.9rem;
  border-radius: 9999px;
  letter-spacing: 0.14em !important;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.22);
}
.page-header.page-hero .section-tag::before { display: none; }
.page-header.page-hero h1,
.page-header.page-hero h1 span {
  color: #fff !important;
}
.page-header.page-hero p {
  color: rgba(255,255,255,0.92) !important;
}
.page-header.page-hero {
  padding: 4rem 0 5rem !important;
}

/* ───────────────────────────────────────────────────────────────────
   4) Painel "Indique um Amigo" (substituto do antigo "Tirar dúvidas")
   ─────────────────────────────────────────────────────────────────── */
.referral-intro {
  font-size: 0.92rem;
  color: var(--ink-2);
  line-height: 1.65;
  margin-bottom: 1.5rem;
}
.referral-steps {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.6rem;
}
.referral-step {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  padding: 1rem 1.1rem;
  background: var(--ice);
  border: 1.5px solid var(--sky-soft);
  border-radius: 14px;
  align-items: start;
  transition: 0.28s cubic-bezier(0.4,0,0.2,1);
}
.referral-step:hover {
  border-color: var(--sky-light);
  transform: translateX(2px);
}
.referral-step-num {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--sky);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1rem;
  box-shadow: var(--shadow-cta);
  flex-shrink: 0;
}
.referral-step-body {
  display: flex; flex-direction: column; gap: 3px;
  padding-top: 4px;
}
.referral-step-title {
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.25;
}
.referral-step-desc {
  font-size: 0.84rem;
  color: var(--ink-3);
  line-height: 1.55;
}
.referral-prize {
  display: flex; align-items: center; gap: 12px;
  padding: 0.85rem 1rem;
  background: linear-gradient(135deg, var(--sky) 0%, var(--sky-hover) 100%);
  color: #fff;
  border-radius: 14px;
  margin-bottom: 1.4rem;
}
.referral-prize-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: rgba(255,255,255,0.18);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.referral-prize-icon svg { width: 20px; height: 20px; stroke: #fff; fill: none; stroke-width: 2.2; }
.referral-prize-text {
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.4;
}
.referral-prize-text strong { font-weight: 800; }

/* ───────────────────────────────────────────────────────────────────
   5) Foco visível padrão em links de navegação (a11y)
   ─────────────────────────────────────────────────────────────────── */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--sky);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ───────────────────────────────────────────────────────────────────
   6) Footer — garante que TODOS os textos do footer fiquem legíveis
   ─────────────────────────────────────────────────────────────────── */
footer {
  color: rgba(255,255,255,0.78) !important;
}
footer .footer-col-title { color: #fff !important; }
footer .footer-links a { color: rgba(255,255,255,0.68) !important; }
footer .footer-links a:hover { color: var(--sky-light) !important; }
footer .footer-contact-item span,
footer .footer-desc { color: rgba(255,255,255,0.78) !important; }
footer .footer-bottom p { color: rgba(255,255,255,0.52) !important; }

/* ───────────────────────────────────────────────────────────────────
   9) Botão lateral "Fale Conosco" — não pode se camuflar sobre
      fundos azuis. Borda branca fina + halo escuro para destacar.
   ─────────────────────────────────────────────────────────────────── */
.side-cta {
  border: 1.5px solid rgba(255,255,255,0.9) !important;
  box-shadow:
    -3px 0 22px rgba(8,157,217,0.45),
    0 0 0 1px rgba(13,33,55,0.18),
    0 6px 20px rgba(13,33,55,0.28) !important;
}
.side-cta:hover {
  border-color: #ffffff !important;
  box-shadow:
    -5px 0 28px rgba(8,157,217,0.6),
    0 0 0 1px rgba(13,33,55,0.22),
    0 8px 26px rgba(13,33,55,0.34) !important;
}

/* ───────────────────────────────────────────────────────────────────
   10) Ícones decorativos temáticos espalhados nos heros internos
   ─────────────────────────────────────────────────────────────────── */
.hero-icons {
  position: absolute; inset: 0;
  z-index: 1; pointer-events: none; overflow: hidden;
}
/* texto/figuras sempre acima dos ícones */
.page-hero .container,
.seg-hero .container { position: relative; z-index: 3 !important; }

.hero-ic {
  position: absolute;
  color: #fff;
  opacity: 0.16;
  animation: heroFloat var(--dur, 8s) ease-in-out infinite;
  will-change: transform;
}
.hero-ic svg {
  width: 100%; height: 100%; display: block;
  stroke: currentColor; fill: none;
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.hero-ic.solid svg { fill: currentColor; stroke: none; }
/* ícones reais (svgrepo) carregados como imagem — pintados de branco */
.hero-ic img {
  width: 100%; height: 100%; display: block;
  filter: brightness(0) invert(1);
}
@keyframes heroFloat {
  0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); }
  50%      { transform: translateY(-18px) rotate(var(--rot, 0deg)); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-ic { animation: none !important; }
}
/* em telas pequenas, menos poluição visual */
@media (max-width: 640px) {
  .hero-ic { opacity: 0.12; }
  .hero-ic[data-hide-mobile] { display: none; }
}

/* ───────────────────────────────────────────────────────────────────
   7) Botão de fechar de TODOS os modais (cobre o emoji "X" também)
   ─────────────────────────────────────────────────────────────────── */
.modal-close-btn,
.modal-close,
button[aria-label="Fechar"] {
  color: #fff !important;
}

/* ───────────────────────────────────────────────────────────────────
   8) Hero principal (home) — proteção
   ─────────────────────────────────────────────────────────────────── */
.hero-title { color: var(--ink) !important; }
.hero-title .accent { color: var(--sky) !important; }
.hero-subtitle { color: var(--ink-2) !important; }

/* Fim */
