/* ===========================
   Colegio Elumar — estilos generales
   =========================== */

:root {
  /* Colores extraídos del logo institucional */
  --color-purple: #8E5FA3;
  --color-purple-dark: #6B3F7E;
  --color-orange: #ED7120;
  --color-blue: #63C5E7;
  --color-green: #1B9F57;

  --color-primary: var(--color-purple);
  --color-primary-dark: var(--color-purple-dark);
  --color-accent: var(--color-orange);
  --color-accent-dark: #D45F12;
  --color-bg: #FAF8FB;
  --color-bg-alt: #FFFFFF;
  --color-text: #434343;
  --color-text-light: #6B6B6B;
  --color-border: #E6E1EA;

  --font-heading: 'Baloo 2', 'Segoe UI', sans-serif;
  --font-body: 'Nunito', 'Segoe UI', sans-serif;

  --radius: 16px;
  --shadow: 0 4px 16px rgba(110, 63, 126, 0.1);
  --shadow-hover: 0 8px 24px rgba(110, 63, 126, 0.16);

  --max-width: 1160px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
}

h1, h2, h3, h4, p {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-primary-dark);
  line-height: 1.25;
}

h2.section-title {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  text-align: center;
  margin-bottom: 8px;
}

.section-subtitle {
  text-align: center;
  color: var(--color-text-light);
  max-width: 640px;
  margin: 0 auto 40px;
}

section {
  padding: 64px 0;
}

.bg-alt {
  background: var(--color-bg-alt);
}

/* ===== Botones ===== */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-family: var(--font-heading);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-primary-dark);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn-outline {
  background: transparent;
  border: 2px solid #ffffff;
  color: #ffffff;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ===== Franja de marca (paneles del edificio) ===== */
.brand-stripe {
  display: flex;
  height: 6px;
}

.brand-stripe span {
  flex: 1;
}

.brand-stripe .s1 { background: var(--color-purple); }
.brand-stripe .s2 { background: var(--color-blue); }
.brand-stripe .s3 { background: var(--color-green); }
.brand-stripe .s4 { background: var(--color-orange); }

/* ===== Header / Nav ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg-alt);
  box-shadow: var(--shadow);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-primary-dark);
}

.nav-brand img {
  height: 92px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav-links a {
  font-weight: 600;
  color: var(--color-text);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-accent);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 26px;
  height: 3px;
  background: var(--color-primary-dark);
  border-radius: 2px;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 12%, rgba(237, 113, 32, 0.35), transparent 40%),
    radial-gradient(circle at 6% 82%, rgba(99, 197, 231, 0.3), transparent 42%),
    linear-gradient(135deg, var(--color-purple), var(--color-primary-dark));
  color: #fff;
  padding: 76px 0 108px;
}

.hero-watermark {
  position: absolute;
  top: -8%;
  right: -6%;
  width: 46%;
  max-width: 520px;
  opacity: 0.14;
  transform: rotate(8deg);
  pointer-events: none;
  filter: brightness(0) invert(1);
}

.hero .container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.hero h1 {
  color: #fff;
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 16px;
}

.hero p {
  font-size: 1.1rem;
  opacity: 0.92;
  margin-bottom: 28px;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-image,
.hero-photo {
  border-radius: var(--radius);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  box-shadow: 0 20px 44px rgba(30, 15, 40, 0.35);
  border: 4px solid rgba(255, 255, 255, 0.25);
}

.hero-image {
  background: rgba(255, 255, 255, 0.08);
  border: 2px dashed rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
  text-align: center;
  padding: 20px;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  width: 100%;
  height: 70px;
  line-height: 0;
}

.hero-wave svg {
  width: 100%;
  height: 100%;
  display: block;
}

.page-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 92% 0%, rgba(27, 159, 87, 0.35), transparent 45%),
    linear-gradient(135deg, var(--color-purple), var(--color-primary-dark));
  color: #fff;
  padding: 64px 0 86px;
  text-align: center;
}

.page-hero h1 {
  color: #fff;
}

.page-hero p {
  opacity: 0.9;
  max-width: 600px;
  margin: 12px auto 0;
}

.page-hero .hero-watermark {
  width: 30%;
  max-width: 320px;
  top: -10%;
  right: 2%;
}

.cta-band {
  background:
    radial-gradient(circle at 10% 20%, rgba(99, 197, 231, 0.35), transparent 40%),
    radial-gradient(circle at 90% 85%, rgba(237, 113, 32, 0.35), transparent 42%),
    linear-gradient(135deg, var(--color-purple), var(--color-primary-dark));
}

.cta-band .section-title {
  margin-bottom: 12px;
}

/* ===== Cards / Grids ===== */
.grid {
  display: grid;
  gap: 28px;
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.card {
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.card .icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(142, 95, 163, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.icon-purple { background: rgba(142, 95, 163, 0.14); }
.icon-orange { background: rgba(237, 113, 32, 0.14); }
.icon-blue { background: rgba(99, 197, 231, 0.18); }
.icon-green { background: rgba(27, 159, 87, 0.14); }

.step .step-num.n-purple { background: var(--color-purple); color: #fff; }
.step .step-num.n-orange { background: var(--color-orange); color: #fff; }
.step .step-num.n-blue { background: var(--color-blue); color: var(--color-primary-dark); }
.step .step-num.n-green { background: var(--color-green); color: #fff; }

.card h3 {
  margin-bottom: 8px;
  font-size: 1.15rem;
}

.card p {
  color: var(--color-text-light);
}

/* ===== Placeholder de imagen ===== */
.img-placeholder {
  background: linear-gradient(135deg, #E3E8F0, #F7F9FC);
  border: 2px dashed var(--color-border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
  font-weight: 600;
  text-align: center;
  padding: 16px;
  aspect-ratio: 4 / 3;
}

/* ===== Novedades ===== */
.news-card {
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.news-card .img-placeholder {
  border-radius: 0;
  border: none;
  aspect-ratio: 16 / 9;
}

.news-card-body {
  padding: 22px;
}

.news-date {
  color: var(--color-accent-dark);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.news-card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.news-card p {
  color: var(--color-text-light);
  font-size: 0.95rem;
}

/* ===== Galería ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.gallery-grid .img-placeholder {
  aspect-ratio: 1 / 1;
}

/* ===== Tablas / listas info familias ===== */
.info-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.info-table th,
.info-table td {
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.info-table th {
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-heading);
}

.info-table tr:last-child td {
  border-bottom: none;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  counter-reset: step;
}

.step {
  text-align: center;
}

.step .step-num {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  margin: 0 auto 12px;
}

.step h4 {
  margin-bottom: 6px;
  font-size: 1rem;
}

.step p {
  color: var(--color-text-light);
  font-size: 0.9rem;
}

/* ===== Contacto ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.contact-form {
  display: grid;
  gap: 16px;
}

.contact-form label {
  font-weight: 700;
  margin-bottom: 6px;
  display: block;
  font-size: 0.92rem;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--color-bg-alt);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
}

.contact-info .card {
  margin-bottom: 20px;
}

.map-placeholder {
  aspect-ratio: 16 / 9;
  margin-top: 20px;
}

/* ===== Barra de niveles (estilo flyer) ===== */
.levels-bar {
  display: flex;
  flex-direction: column;
  max-width: 360px;
  margin: 28px auto 0;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.levels-bar span {
  padding: 10px 24px;
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  text-align: center;
}

.levels-bar .lvl-maternal { background: var(--color-orange); }
.levels-bar .lvl-inicial { background: var(--color-green); }
.levels-bar .lvl-primario { background: var(--color-purple); }

.tagline {
  color: var(--color-green);
  font-weight: 800;
  font-family: var(--font-heading);
}

/* ===== Redes sociales footer ===== */
.social-links {
  display: flex;
  gap: 12px;
  margin-top: 14px;
}

.social-links a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: background 0.15s ease;
}

.social-links a:hover {
  background: var(--color-accent);
}

/* ===== Footer ===== */
.site-footer {
  background: var(--color-primary-dark);
  color: rgba(255, 255, 255, 0.85);
  padding: 48px 0 24px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-grid h4 {
  color: #fff;
  margin-bottom: 14px;
  font-size: 1rem;
}

.footer-grid p,
.footer-grid a {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.75);
}

.footer-grid ul li {
  margin-bottom: 8px;
}

.footer-grid ul a:hover {
  color: var(--color-accent);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .hero .container {
    grid-template-columns: 1fr;
  }

  .hero-image {
    order: -1;
  }

  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg-alt);
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 24px;
    box-shadow: var(--shadow);
    display: none;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-brand img {
    height: 64px;
  }
}

@media (max-width: 520px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps {
    grid-template-columns: 1fr;
  }
}

/* ===== Popup promocional ===== */
.promo-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(30, 15, 40, 0.6);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.promo-overlay.open {
  display: flex;
}

.promo-modal {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  line-height: 0;
}

.promo-modal a {
  display: block;
  line-height: 0;
}

.promo-modal img {
  display: block;
  width: auto;
  height: auto;
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius);
}

.promo-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  color: var(--color-primary-dark);
  border: none;
  font-size: 1.2rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
}
