/* ============================================================
   sections.css — disciplinas · niveles · ubicación · contacto · footer
   Fondo OSCURO
   ============================================================ */

.section {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 120px 24px;
}

.section__head { margin-bottom: 60px; }

.section__label {
  display: inline-block;
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue-bright);
  margin-bottom: 14px;
}
.section__label--light { color: rgba(255, 255, 255, 0.9); }

.section__title {
  font-size: clamp(1.95rem, 4.5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.025em;
}

/* ============ DISCIPLINAS ============ */
.disciplines__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}
.discipline {
  padding: 46px 34px 46px 0;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  position: relative;
  transition: background 0.35s var(--ease), transform 0.35s var(--ease);
}
.discipline:first-child { padding-left: 0; }
.discipline:not(:first-child) { padding-left: 34px; }
.discipline:last-child { border-right: none; }

/* Línea azul que crece de 0 a 100% del ancho al entrar en viewport */
.discipline::before {
  content: "";
  position: absolute;
  left: 0;
  top: -1px;
  height: 2px;
  width: 0;
  background: var(--blue-bright);
  box-shadow: 0 0 12px rgba(74, 127, 224, 0.6);
  transition: width 0.8s var(--ease-precise);
  transition-delay: var(--reveal-delay, 0ms);
}
.discipline.is-visible::before { width: 100%; }

.discipline__num {
  display: block;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 1.55rem;
  color: var(--blue-bright);
  margin-bottom: 26px;
  letter-spacing: -0.02em;
  transition: color 0.3s var(--ease), text-shadow 0.3s var(--ease);
}
.discipline__name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
  transition: color 0.25s var(--ease);
}
.discipline__desc {
  color: var(--muted);
  font-size: 0.98rem;
  max-width: 30ch;
}
.discipline:hover {
  background: linear-gradient(180deg, rgba(74, 127, 224, 0.06), transparent);
  transform: translateY(-4px);
  border-right-color: var(--line-strong);
  box-shadow: inset 0 0 0 1px var(--line);
}
.discipline:hover .discipline__name { color: var(--blue-glow); }
.discipline:hover .discipline__num {
  color: var(--blue-glow);
  text-shadow: 0 0 18px rgba(107, 155, 245, 0.6);
}

/* ============ NIVELES (ruptura azul sólido) ============ */
.levels {
  position: relative;
  max-width: none;
  background:
    radial-gradient(800px 400px at 80% 20%, rgba(107, 155, 245, 0.25), transparent 60%),
    linear-gradient(135deg, var(--blue-dark), var(--blue));
  color: #fff;
  padding-left: 24px;
  padding-right: 24px;
  overflow: hidden;
}
.levels__inner {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  text-align: center;
}
.levels__title {
  color: #fff;
  font-size: clamp(1.95rem, 4.6vw, 3.1rem);
  font-weight: 700;
  letter-spacing: -0.025em;
}
.levels__lead {
  margin: 20px auto 0;
  max-width: 52ch;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.05rem;
}
.levels__grid {
  margin: 58px 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.level {
  text-align: left;
  padding: 32px 28px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(2px);
  transition: background 0.35s var(--ease), transform 0.35s var(--ease),
              border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.level:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
}
.level__num {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.3s var(--ease);
}
.level:hover .level__num { color: #fff; }
.level__name {
  color: #fff;
  font-size: 1.3rem;
  margin: 14px 0 8px;
}
.level__desc {
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.96rem;
}

/* ============ UBICACIÓN ============ */
.location__grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 56px;
  align-items: center;
}
.location__address {
  margin: 26px 0 30px;
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--ink);
}
.location__map {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(74, 127, 224, 0.08);
  line-height: 0;
}
.location__map iframe {
  width: 100%;
  height: 420px;
  display: block;
  filter: grayscale(0.3) invert(0.92) hue-rotate(180deg) brightness(0.95) contrast(0.9);
}

/* ============ CONTACTO ============ */
.contact__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.contact__card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 36px 30px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease),
              box-shadow 0.35s var(--ease), background 0.35s var(--ease);
}
.contact__card:hover {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  background: var(--bg-3);
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(74, 127, 224, 0.15);
}
.contact__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(74, 127, 224, 0.12);
  color: var(--blue-bright);
  margin-bottom: 8px;
  transition: background 0.35s var(--ease), color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.contact__card:hover .contact__icon {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 0 22px rgba(74, 127, 224, 0.5);
}
.contact__label {
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
}
.contact__value { color: var(--muted); font-size: 0.96rem; }

/* ============ FOOTER ============ */
.footer {
  position: relative;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
}
.footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 54px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
}
.footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer__logo {
  width: 44px;
  height: 44px;
  filter: drop-shadow(0 2px 12px rgba(74, 127, 224, 0.4));
}
.footer__name {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
.footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 26px;
}
.footer__links a {
  font-size: 0.94rem;
  color: var(--muted);
  transition: color 0.2s var(--ease);
}
.footer__links a:hover { color: var(--blue-bright); }
.footer__meta {
  font-size: 0.88rem;
  color: var(--muted);
}
.footer__credit {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 18px;
  font-family: 'Sora', sans-serif;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--blue-bright);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.footer__credit:hover {
  border-color: var(--line-strong);
  background: rgba(74, 127, 224, 0.08);
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .section { padding: 84px 24px; }
  .section__head { margin-bottom: 44px; }

  .disciplines__grid { grid-template-columns: 1fr; }
  .discipline,
  .discipline:not(:first-child) {
    padding: 32px 0;
    border-right: none;
  }

  .levels__grid { grid-template-columns: 1fr; gap: 16px; margin: 44px 0; }

  .location__grid { grid-template-columns: 1fr; gap: 32px; }
  .location__map iframe { height: 340px; }

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

  /* Deja aire para que el chatbot no tape el crédito del footer */
  .footer__inner { padding-bottom: 96px; }
}

@media (max-width: 420px) {
  .section { padding: 64px 16px; }
  .levels { padding-left: 16px; padding-right: 16px; }
  .footer__inner { padding-left: 16px; padding-right: 16px; }
}
