/* ==========================================================================
   Colégio Cristo Rei · Matrículas 2027
   Paleta extraída do logo (coração vermelho "CR") + dourado de destaque.
   ========================================================================== */

:root {
  --cor-principal: #c8102e;
  --cor-principal-escura: #9e0c24;
  --cor-principal-clara: #fdecef;
  --cor-destaque: #f5b700;
  --cor-destaque-escura: #c99400;
  --cor-whatsapp: #25d366;
  --cor-whatsapp-escura: #1da851;
  --cor-whatsapp-texto: #0b3d1f;
  --fundo: #ffffff;
  --fundo-alt: #f6f6f8;
  --texto: #1d1d2b;
  --texto-suave: #55576b;
  --borda: #e6e6ec;

  --raio: 18px;
  --raio-sm: 14px;
  --sombra: 0 6px 24px rgba(29, 29, 43, 0.08);
  --sombra-forte: 0 16px 40px rgba(29, 29, 43, 0.14);

  --fonte-titulo: "Nunito", "Poppins", system-ui, sans-serif;
  --fonte-texto: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --container: 1180px;
  --header-h: 72px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--fonte-texto);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--texto);
  background: var(--fundo);
  /* espaço para o botão sticky do celular */
  padding-bottom: 76px;
}

@media (min-width: 900px) { body { padding-bottom: 0; } }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--cor-principal); }

h1, h2, h3 {
  font-family: var(--fonte-titulo);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 0.6em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 1000;
  background: var(--texto); color: #fff; padding: 0.75rem 1rem; border-radius: 10px;
}
.skip-link:focus { top: 1rem; }

:focus-visible {
  outline: 3px solid var(--cor-destaque);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Faixa de aviso ---------- */
.aviso {
  display: block;
  background: var(--cor-destaque);
  color: var(--texto);
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  padding: 0.6rem 1rem;
  line-height: 1.35;
}
.aviso strong { font-weight: 900; }
.aviso:hover { background: #ffc61a; }
.aviso svg { width: 1em; height: 1em; vertical-align: -0.15em; margin-left: 0.3em; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--borda);
}
.header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: var(--header-h);
}
.marca {
  display: flex; align-items: center; gap: 0.6rem;
  text-decoration: none; color: var(--texto);
  font-family: var(--fonte-titulo); font-weight: 800; font-size: 1.1rem;
}
.marca img { width: 44px; height: 44px; object-fit: contain; }

.nav { display: none; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.25rem; }
.nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.75rem;
  text-decoration: none; color: var(--texto); font-weight: 600; font-size: 0.95rem;
  border-radius: 10px;
}
.nav a:hover { background: var(--cor-principal-clara); color: var(--cor-principal); }

.header__acoes { display: flex; align-items: center; gap: 0.5rem; }
.header__cta { display: none; }

.menu-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border: 1px solid var(--borda); border-radius: 12px;
  background: #fff; color: var(--texto); cursor: pointer;
}
.menu-toggle svg { width: 24px; height: 24px; }
.menu-toggle .icone-fechar { display: none; }
.menu-toggle[aria-expanded="true"] .icone-abrir { display: none; }
.menu-toggle[aria-expanded="true"] .icone-fechar { display: block; }

.menu-mobile {
  border-top: 1px solid var(--borda);
  background: #fff;
  padding: 0.75rem 0 1.25rem;
}
.menu-mobile[hidden] { display: none; }
.menu-mobile ul { list-style: none; margin: 0 0 1rem; padding: 0; }
.menu-mobile a:not(.btn) {
  display: flex; align-items: center; min-height: 48px; padding: 0 0.5rem;
  text-decoration: none; color: var(--texto); font-weight: 600; font-size: 1.05rem;
  border-bottom: 1px solid var(--fundo-alt);
}
.menu-mobile .btn { width: 100%; }

@media (min-width: 1040px) {
  .nav { display: block; }
  .header__cta { display: inline-flex; }
  .menu-toggle, .menu-mobile { display: none !important; }
}

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  min-height: 48px; padding: 0.75rem 1.4rem;
  border: 2px solid transparent; border-radius: 999px;
  font-family: var(--fonte-titulo); font-weight: 800; font-size: 1rem; line-height: 1.2;
  text-decoration: none; text-align: center; cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}
.btn svg { width: 1.3em; height: 1.3em; flex-shrink: 0; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--whatsapp { background: var(--cor-whatsapp); color: var(--cor-whatsapp-texto); box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3); }
.btn--whatsapp:hover { background: #2ee374; box-shadow: 0 12px 26px rgba(37, 211, 102, 0.4); }

.btn--principal { background: var(--cor-principal); color: #fff; }
.btn--principal:hover { background: var(--cor-principal-escura); }

.btn--contorno { background: transparent; color: var(--cor-principal); border-color: var(--cor-principal); }
.btn--contorno:hover { background: var(--cor-principal-clara); }

.btn--claro { background: #fff; color: var(--cor-principal); }
.btn--claro:hover { background: var(--cor-principal-clara); }

.btn--grande { min-height: 60px; padding: 1rem 2rem; font-size: 1.15rem; }

/* ---------- Selos e etiquetas ---------- */
.selo {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--cor-destaque); color: var(--texto);
  font-family: var(--fonte-titulo); font-weight: 900; font-size: 0.8rem; letter-spacing: 0.08em;
  padding: 0.45rem 0.95rem; border-radius: 999px; text-transform: uppercase;
}
.selo__ponto {
  width: 9px; height: 9px; border-radius: 50%; background: var(--cor-principal);
}
.selo--pulso { animation: pulso 2.2s ease-in-out infinite; }
.selo--pulso .selo__ponto { animation: ponto 1.4s ease-in-out infinite; }

@keyframes pulso {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 183, 0, 0.55); transform: scale(1); }
  50% { box-shadow: 0 0 0 12px rgba(245, 183, 0, 0); transform: scale(1.04); }
}
@keyframes ponto {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.etiqueta {
  display: inline-block;
  color: var(--cor-principal);
  font-weight: 700; font-size: 0.9rem; letter-spacing: 0.04em; text-transform: uppercase;
  margin-bottom: 0.75rem;
}

/* ---------- Seções ---------- */
.secao { padding: clamp(3.5rem, 8vw, 6rem) 0; scroll-margin-top: var(--header-h); }
.secao--alt { background: var(--fundo-alt); }
.secao__topo { max-width: 680px; margin-bottom: 2.5rem; }
.secao__topo--centro { margin-inline: auto; text-align: center; }
.secao__topo p { color: var(--texto-suave); font-size: 1.1rem; }

/* ---------- Hero ---------- */
.hero { padding: clamp(2rem, 6vw, 4.5rem) 0 clamp(3rem, 7vw, 5rem); scroll-margin-top: var(--header-h); overflow: hidden; }
.hero__grid { display: grid; gap: 2.5rem; align-items: center; }
.hero__titulo-linha { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; margin-bottom: 0.5rem; }
.hero h1 { margin: 0; }
.hero h1 span { color: var(--cor-principal); }
.hero__sub { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--texto-suave); margin: 1rem 0 1.5rem; max-width: 36ch; }

.chips { list-style: none; padding: 0; margin: 0 0 2rem; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.chips li {
  display: inline-flex; align-items: center; gap: 0.45rem;
  background: #fff; border: 1px solid var(--borda); box-shadow: var(--sombra);
  padding: 0.55rem 0.95rem; border-radius: 999px; font-weight: 600; font-size: 0.92rem;
}
.chips svg { width: 18px; height: 18px; color: var(--cor-principal); flex-shrink: 0; }

.hero__botoes { display: flex; flex-wrap: wrap; gap: 0.85rem; }
.hero__botoes .btn { flex: 1 1 auto; }

.hero__foto { position: relative; }
.hero__foto::before {
  content: ""; position: absolute; inset: 8% -6% -6% 8%;
  background: var(--cor-destaque); border-radius: 28px; z-index: -1; opacity: 0.9;
}
.hero__foto img {
  width: 100%; aspect-ratio: 680 / 606; object-fit: cover;
  border-radius: 24px; box-shadow: var(--sombra-forte);
}
.hero__foto-selo {
  position: absolute; left: -0.5rem; bottom: 1.25rem;
  background: #fff; border-radius: var(--raio-sm); box-shadow: var(--sombra-forte);
  padding: 0.75rem 1rem; display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--fonte-titulo); font-weight: 800; font-size: 0.95rem;
}
.hero__foto-selo img { width: 34px; height: 34px; box-shadow: none; border-radius: 0; aspect-ratio: 1; object-fit: contain; }

@media (min-width: 900px) {
  .hero__grid { grid-template-columns: 1.05fr 1fr; gap: 3.5rem; }
  .hero__botoes .btn { flex: 0 0 auto; }
}

/* ---------- Turmas ---------- */
.turmas { display: grid; gap: 1.25rem; counter-reset: etapa; list-style: none; padding: 0; margin: 0 0 2.5rem; position: relative; }
.turma {
  position: relative; background: #fff; border-radius: var(--raio); box-shadow: var(--sombra);
  padding: 1.75rem 1.5rem 1.5rem; border-top: 6px solid var(--cor-principal);
}
.turma__num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--cor-principal-clara); color: var(--cor-principal);
  font-family: var(--fonte-titulo); font-weight: 900; font-size: 1.25rem; margin-bottom: 1rem;
}
.turma h3 { margin-bottom: 0.25rem; }
.turma p { color: var(--texto-suave); margin: 0; }
.turma:nth-child(2) { border-top-color: var(--cor-destaque); }
.turma:nth-child(2) .turma__num { background: #fff6d9; color: #8a6400; }
.turma:nth-child(3) { border-top-color: var(--texto); }
.turma:nth-child(3) .turma__num { background: #ececf2; color: var(--texto); }

@media (min-width: 768px) {
  .turmas { grid-template-columns: repeat(3, 1fr); }
  .turmas::before {
    content: ""; position: absolute; top: 50px; left: 12%; right: 12%; height: 3px;
    background: repeating-linear-gradient(90deg, var(--borda) 0 10px, transparent 10px 18px); z-index: 0;
  }
  .turma { z-index: 1; }
}
.centro { text-align: center; }

/* ---------- Extracurriculares ---------- */
.atividades { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr); }
.atividade {
  background: #fff; border-radius: var(--raio); box-shadow: var(--sombra);
  padding: 2rem 1rem 1.5rem; text-align: center; border: 1px solid var(--borda);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.atividade:hover { transform: translateY(-8px); box-shadow: var(--sombra-forte); }
.atividade__icone {
  width: 88px; height: 88px; margin: 0 auto 1rem; border-radius: 24px;
  display: flex; align-items: center; justify-content: center;
  background: var(--cor-principal-clara); color: var(--cor-principal);
}
.atividade__icone svg { width: 52px; height: 52px; }
.atividade:nth-child(even) .atividade__icone { background: #fff6d9; color: #8a6400; }
.atividade h3 { margin: 0; font-size: 1.3rem; }
@media (min-width: 900px) { .atividades { grid-template-columns: repeat(4, 1fr); gap: 1.5rem; } }

/* ---------- Tempo Integral ---------- */
.integral {
  position: relative; overflow: hidden;
  background: var(--cor-principal); color: #fff;
  border-radius: 28px; padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 5vw, 4rem);
  display: grid; gap: 2rem; align-items: center;
}
.integral::after {
  content: ""; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px;
  border-radius: 50%; border: 40px solid rgba(255, 255, 255, 0.08); pointer-events: none;
}
.integral h2 { color: #fff; margin-top: 1rem; }
.integral p { font-size: 1.15rem; max-width: 52ch; color: #ffeef1; }
.integral__icone { display: none; }
.integral__icone svg { width: 100%; height: auto; }
@media (min-width: 900px) {
  .integral { grid-template-columns: 1fr 220px; }
  .integral__icone { display: block; color: rgba(255, 255, 255, 0.9); }
}

/* ---------- Galeria ---------- */
.galeria {
  list-style: none; padding: 0 1.25rem; margin: 0 -1.25rem;
  display: grid; grid-auto-flow: column; grid-auto-columns: 82%; gap: 1rem;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 1.25rem;
  -webkit-overflow-scrolling: touch; padding-bottom: 0.75rem;
}
.galeria li { scroll-snap-align: start; }
.galeria button {
  display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in;
  border-radius: var(--raio); overflow: hidden; box-shadow: var(--sombra);
}
.galeria img {
  width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform 0.4s ease;
}
.galeria button:hover img { transform: scale(1.05); }
.galeria__dica { color: var(--texto-suave); font-size: 0.9rem; text-align: center; margin-top: 0.5rem; }
@media (min-width: 768px) {
  .galeria { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); overflow: visible; padding: 0; margin: 0; gap: 1.5rem; }
  .galeria__dica { display: none; }
}

/* Lightbox */
.lightbox {
  border: 0; padding: 0; background: transparent; max-width: min(92vw, 900px); max-height: 92vh;
}
.lightbox::backdrop { background: rgba(10, 10, 20, 0.88); }
.lightbox img { width: 100%; max-height: 80vh; object-fit: contain; border-radius: var(--raio-sm); }
.lightbox__legenda { color: #fff; text-align: center; margin: 0.75rem 0 0; }
.lightbox__fechar, .lightbox__nav {
  position: fixed; width: 48px; height: 48px; border-radius: 50%; border: 0;
  background: #fff; color: var(--texto); cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--sombra-forte);
}
.lightbox__fechar { top: 1rem; right: 1rem; }
.lightbox__nav { top: 50%; transform: translateY(-50%); }
.lightbox__nav--ant { left: 1rem; }
.lightbox__nav--prox { right: 1rem; }
.lightbox svg { width: 24px; height: 24px; }

/* ---------- Chamada final ---------- */
.final {
  text-align: center; background: #fff; border-radius: 28px; box-shadow: var(--sombra-forte);
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.25rem, 5vw, 4rem); max-width: 880px; margin-inline: auto;
  border: 1px solid var(--borda);
}
.final h2 { margin-top: 1.25rem; }
.final > p { color: var(--texto-suave); font-size: 1.15rem; max-width: 50ch; margin-inline: auto; margin-bottom: 2rem; }
.final__numero { display: block; margin-top: 1rem; font-family: var(--fonte-titulo); font-weight: 800; font-size: 1.35rem; color: var(--texto); text-decoration: none; }
.final__numero:hover { color: var(--cor-principal); }
.final__endereco {
  display: inline-flex; align-items: flex-start; gap: 0.5rem; margin-top: 2rem; padding-top: 2rem;
  border-top: 1px solid var(--borda); color: var(--texto-suave); text-align: left; max-width: 520px;
}
.final__endereco svg { width: 22px; height: 22px; color: var(--cor-principal); flex-shrink: 0; margin-top: 0.15rem; }
.final__endereco a { font-weight: 700; }

/* ---------- Rodapé ---------- */
.rodape { background: #15151f; color: #c9c9d6; padding: 3.5rem 0 2rem; font-size: 0.95rem; }
.rodape a { color: #fff; }
.rodape__grid { display: grid; gap: 2rem; }
.rodape .marca { color: #fff; margin-bottom: 1rem; }
.rodape .marca img { background: #fff; border-radius: 12px; padding: 4px; }
.rodape h2 { font-size: 1rem; color: #fff; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.75rem; }
.rodape ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.rodape li { display: flex; gap: 0.6rem; align-items: flex-start; }
.rodape li svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 0.15rem; color: var(--cor-destaque); }
.rodape__base {
  margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem; font-size: 0.85rem;
}
.rodape__avaliar { color: #c9c9d6 !important; }
@media (min-width: 768px) { .rodape__grid { grid-template-columns: 1.3fr 1fr 1fr; } }

/* ---------- WhatsApp flutuante + sticky mobile ---------- */
.wa-flutuante {
  position: fixed; right: 1rem; bottom: 88px; z-index: 90;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--cor-whatsapp); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.45);
  transition: transform 0.2s ease;
}
.wa-flutuante:hover { transform: scale(1.08); }
.wa-flutuante svg { width: 32px; height: 32px; }
@media (min-width: 900px) { .wa-flutuante { bottom: 1.5rem; right: 1.5rem; } }

.barra-mobile {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 95;
  padding: 0.65rem 0.75rem calc(0.65rem + env(safe-area-inset-bottom));
  background: #fff; border-top: 1px solid var(--borda); box-shadow: 0 -8px 24px rgba(29, 29, 43, 0.08);
}
.barra-mobile .btn { width: 100%; }
@media (min-width: 900px) { .barra-mobile { display: none; } }

/* ---------- Página de avaliação ---------- */
.avaliacao { padding: clamp(2.5rem, 6vw, 5rem) 0; }
.avaliacao__grid { display: grid; gap: 2.5rem; align-items: start; }
.voltar { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 44px; font-weight: 700; text-decoration: none; margin-bottom: 1.5rem; }
.voltar svg { width: 20px; height: 20px; }
.voltar:hover { text-decoration: underline; }
.avaliacao__intro p { font-size: 1.15rem; color: var(--texto-suave); max-width: 46ch; }
.estrelas { display: flex; gap: 0.35rem; margin: 1.25rem 0 1.75rem; color: var(--cor-destaque); }
.estrelas svg { width: clamp(36px, 7vw, 48px); height: clamp(36px, 7vw, 48px); filter: drop-shadow(0 3px 6px rgba(245, 183, 0, 0.35)); }
.passos { list-style: none; padding: 0; margin: 2rem 0 1rem; display: grid; gap: 0.85rem; counter-reset: passo; }
.passos li {
  counter-increment: passo; display: flex; gap: 1rem; align-items: center;
  background: var(--fundo-alt); border-radius: var(--raio-sm); padding: 1rem 1.25rem; font-weight: 600;
}
.passos li::before {
  content: counter(passo); flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%;
  background: var(--cor-principal); color: #fff; display: flex; align-items: center; justify-content: center;
  font-family: var(--fonte-titulo); font-weight: 900;
}
.obs { font-size: 0.95rem; color: var(--texto-suave); display: flex; gap: 0.5rem; align-items: center; }
.obs svg { width: 18px; height: 18px; flex-shrink: 0; }

.qr-cartao {
  background: #fff; border-radius: 24px; box-shadow: var(--sombra-forte); border: 1px solid var(--borda);
  padding: 2rem; text-align: center; max-width: 380px; margin-inline: auto; width: 100%;
}
.qr-cartao__codigo {
  width: 100%; max-width: 260px; aspect-ratio: 1; margin: 0 auto 1.25rem;
  display: flex; align-items: center; justify-content: center;
  background: #fff; border-radius: var(--raio-sm); border: 2px dashed var(--borda); color: var(--texto-suave); font-size: 0.9rem; padding: 0.5rem;
}
.qr-cartao__codigo svg { width: 100%; height: auto; }
.qr-cartao__codigo.tem-qr { border: 0; padding: 0; }
.qr-cartao p { font-family: var(--fonte-titulo); font-weight: 800; font-size: 1.1rem; margin: 0 0 1.5rem; }
.qr-cartao .btn { width: 100%; }
@media (min-width: 900px) { .avaliacao__grid { grid-template-columns: 1.2fr 1fr; gap: 4rem; } }

/* ---------- Animações de entrada ---------- */
.js .revelar { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js .revelar.visivel { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .revelar { opacity: 1; transform: none; }
}
