/* Colegio Héroes de la Patria — página pública.
   Colores tomados del logo: marino del texto, azules del círculo y la llama como acentos.
   El logo va siempre sobre blanco (indicación de la escuela). */
:root {
  --navy: #091c41;
  --blue: #06338d;
  --sky: #016dd4;
  --flame-y: #f5b422;
  --flame-g: #1f9d4a;
  --flame-r: #e62828;
  --flame-o: #f07828;
  --wa: #15803d;
  --wa-hover: #116b33;
  --ink: #1d2433;
  --muted: #5a6478;
  --line: #e3e8f0;
  --bg: #ffffff;
  --tint: #f3f6fb;
  --radius: 18px;
  --font: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }
a { color: var(--blue); }
h1, h2, h3 { color: var(--navy); line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 4.4vw, 3.1rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.sprite { display: none; }

.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--navy); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 30;
}
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 6px; }

.eyebrow {
  text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; font-weight: 800;
  color: var(--sky); margin-bottom: .4em;
}

/* Barra superior */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,.95);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 52px; height: 52px; }
.brand__name { font-weight: 800; color: var(--navy); line-height: 1.1; font-size: 1rem; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a { text-decoration: none; color: var(--ink); font-weight: 600; }
.nav a:hover { color: var(--sky); }
.nav .nav__cta { background: var(--blue); color: #fff; padding: 9px 16px; border-radius: 12px; }
.nav .nav__cta:hover { background: var(--navy); color: #fff; }
@media (max-width: 760px) { .nav a:not(.nav__cta) { display: none; } }

/* Portada: foto a todo lo ancho con panel blanco curvo */
.hero { position: relative; }
.hero__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 60%; }
.hero__wrap {
  position: relative; z-index: 1; min-height: min(78vh, 720px);
  display: flex; align-items: flex-end; padding: 120px 0 48px;
}
.hero__panel {
  display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center;
  max-width: 760px; background: #fff;
  padding: 32px 36px; border-radius: 28px 140px 28px 28px;
  box-shadow: 0 24px 60px rgba(9,28,65,.22);
}
.hero__logo { width: 168px; height: 168px; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 36ch; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff7e3; color: #7a4e00; border: 1px solid #f6dc9c;
  font-weight: 700; font-size: .9rem; padding: 6px 14px; border-radius: 999px; margin-bottom: 14px;
}
.pill__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--flame-o); box-shadow: 0 0 0 4px rgba(240,120,40,.18); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.nowrap { white-space: nowrap; }

@media (max-width: 820px) {
  .hero__photo { position: static; height: 300px; }
  .hero__wrap { display: block; min-height: 0; padding: 0 0 8px; margin-top: -64px; }
  .hero__panel {
    grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 12px;
    padding: 24px 20px 28px; border-radius: 28px 72px 28px 28px;
  }
  .hero__logo { width: 120px; height: 120px; margin-top: -84px; background: #fff; border-radius: 24px; padding: 8px; box-shadow: 0 10px 24px rgba(9,28,65,.16); }
  .lead { margin-inline: auto; }
  .actions { justify-content: center; }
  .pill { font-size: .82rem; }
  .hero .btn { padding-inline: 16px; font-size: .98rem; }
}

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 12px 22px; border-radius: 14px;
  font: inherit; font-weight: 700; text-decoration: none; border: 2px solid transparent;
  transition: background-color .15s, color .15s, border-color .15s, transform .15s;
}
.btn svg { flex: none; }
.btn:active { transform: translateY(1px); }
.btn--wa { background: var(--wa); color: #fff; }
.btn--wa:hover { background: var(--wa-hover); }
.btn--ghost { background: #fff; color: var(--blue); border-color: #c9d5ea; }
.btn--ghost:hover { border-color: var(--blue); }
.btn--blue { background: var(--blue); color: #fff; margin-top: 6px; }
.btn--blue:hover { background: var(--navy); }
.btn--lg { min-height: 60px; padding: 14px 30px; font-size: 1.1rem; }

/* Accesos rápidos */
.tiles { background: var(--navy); }
.tiles__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.tile {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 22px 12px; color: #fff; text-decoration: none; font-weight: 700;
  border-right: 1px solid rgba(255,255,255,.12);
}
.tile:last-child { border-right: 0; }
.tile:hover { background: rgba(255,255,255,.06); }
.tile__icon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.tile__icon svg { width: 22px; height: 22px; }
.tile__icon--y { background: var(--flame-y); color: var(--navy); }
.tile__icon--g { background: var(--flame-g); color: #fff; }
.tile__icon--r { background: var(--flame-r); color: #fff; }
.tile__icon--o { background: var(--flame-o); color: #fff; }
@media (max-width: 820px) {
  .tiles__grid { grid-template-columns: repeat(2, 1fr); }
  .tile { flex-direction: column; gap: 8px; padding: 18px 8px; font-size: .95rem; }
  .tile:nth-child(2) { border-right: 0; }
  .tile:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,.12); }
}

/* Secciones */
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section--tint { background: var(--tint); }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 24px; }
@media (max-width: 860px) { .cards { grid-template-columns: 1fr; } }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px 22px; position: relative; overflow: hidden;
}
.card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; }
.card--y::before { background: var(--flame-y); }
.card--g::before { background: var(--flame-g); }
.card--r::before { background: var(--flame-r); }
.card p { color: var(--muted); margin: 0; }
.muted { color: var(--muted); font-weight: 600; }

/* Aprender jugando */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.feature__photo { position: relative; }
.feature__photo::before {
  content: ""; position: absolute; inset: 18px -18px -18px 18px; border-radius: 28px;
  background: linear-gradient(135deg, var(--flame-y), var(--flame-o));
}
.feature__photo img { position: relative; border-radius: 28px; width: 100%; }
.feature__text p { color: var(--muted); font-size: 1.08rem; }
.checks { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.checks li { display: flex; align-items: center; gap: 12px; font-weight: 700; color: var(--navy); }
.checks li::before {
  content: ""; width: 24px; height: 24px; border-radius: 50%; flex: none;
  background: var(--flame-g) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center / 16px no-repeat;
}
@media (max-width: 820px) {
  .feature { grid-template-columns: 1fr; gap: 40px; }
  .feature__photo { margin-right: 18px; }
}

/* Galería de instalaciones */
.gallery {
  display: grid; gap: 18px; margin-top: 24px;
  grid-template-columns: 2fr 1fr; grid-template-rows: auto auto;
}
.gallery__item { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--tint); }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; }
.gallery__item--wide { grid-column: 1; grid-row: 1; aspect-ratio: 3 / 2; }
.gallery__item--tall { grid-column: 2; grid-row: 1 / span 2; }
.gallery__item:not(.gallery__item--wide):not(.gallery__item--tall) { grid-column: 1; grid-row: 2; aspect-ratio: 3 / 1.3; }
.gallery figcaption {
  position: absolute; left: 12px; bottom: 12px;
  background: rgba(255,255,255,.94); color: var(--navy); font-weight: 700; font-size: .95rem;
  padding: 6px 12px; border-radius: 10px;
}
@media (max-width: 820px) {
  .gallery { grid-template-columns: 1fr; grid-template-rows: none; }
  .gallery__item--wide, .gallery__item--tall, .gallery__item:not(.gallery__item--wide):not(.gallery__item--tall) {
    grid-column: auto; grid-row: auto; aspect-ratio: 4 / 3;
  }
}

/* Franja de inscripciones */
.cta {
  background: var(--blue); color: #e6edfa; position: relative; overflow: hidden;
  padding: clamp(40px, 6vw, 64px) 0;
}
.cta::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 6px;
  background: linear-gradient(90deg, var(--flame-y) 0 25%, var(--flame-g) 25% 50%, var(--flame-r) 50% 75%, var(--flame-o) 75%);
}
.cta__inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.cta h2 { color: #fff; }
.cta p { margin: 0; max-width: 52ch; }
.cta__kicker { color: var(--flame-y) !important; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; margin-bottom: .5em !important; }
.cta .btn--wa { background: #fff; color: var(--wa); }
.cta .btn--wa:hover { background: #effaf2; }
@media (max-width: 820px) { .cta__inner { flex-direction: column; align-items: stretch; text-align: center; } .cta p { margin-inline: auto; } }

/* Ubicación y contacto */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }
.addr { font-style: normal; font-size: 1.1rem; margin-bottom: 18px; }
.contact { list-style: none; padding: 0; margin: 0; }
.contact li {
  display: flex; justify-content: space-between; gap: 16px; align-items: baseline;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.contact span { color: var(--muted); font-weight: 600; }
.contact a { font-weight: 700; text-decoration: none; font-size: 1.1rem; }

/* Página 404 */
.center { text-align: center; }
.center .lead { margin-inline: auto; }
.logo-404 { margin: 0 auto 20px; }

/* Pie */
.footer { background: var(--navy); color: #d5def0; padding: 34px 0 96px; }
.footer__inner { display: flex; align-items: center; gap: 20px; }
.footer__logo { width: 72px; height: 72px; background: #fff; border-radius: 16px; padding: 4px; flex: none; }
.footer__inner p { margin: 0 0 .4em; }
.footer strong { color: #fff; }
.footer a { color: #fff; }
.small { font-size: .88rem; }

/* Botón flotante de WhatsApp (solo celular) */
.fab {
  position: fixed; right: 16px; bottom: 16px; z-index: 15;
  width: 60px; height: 60px; border-radius: 50%;
  display: none; align-items: center; justify-content: center;
  background: var(--wa); color: #fff; box-shadow: 0 10px 24px rgba(0,0,0,.22);
}
@media (max-width: 820px) { .fab { display: flex; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
