:root {
  --color-primary: #17315f;
  --color-primary-dark: #0f2142;
  --color-accent: #a8791f;
  --color-bg-soft: #f7f9fc;
  --color-surface: #ffffff;
  --color-text: #1a2433;
  --color-text-soft: #5f6b7a;
  --color-border: rgba(23, 49, 95, 0.12);
  --color-border-strong: rgba(255, 255, 255, 0.14);
  --shadow-card: 0 10px 24px rgba(23, 49, 95, 0.06);
  --shadow-hero: 0 18px 40px rgba(15, 33, 66, 0.18);
  --radius-button: 12px;
  --radius-card: 16px;
  --container-width: 1180px;
  --transition: 180ms ease;
  /* Header sticky: espacio extra al saltar a #anclas para que el título no quede tapado */
  --anchor-scroll-padding: 6rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--anchor-scroll-padding);
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  color: var(--color-text);
  background: radial-gradient(
      circle at top left,
      rgba(168, 121, 31, 0.08),
      transparent 26%
    ),
    linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
  line-height: 1.6;
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--color-primary-dark);
}

button,
input,
textarea {
  font: inherit;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.75rem;
  font-family: "Hind", sans-serif;
  line-height: 1.08;
  color: var(--color-primary);
}

p,
ul {
  margin: 0 0 1rem;
}

.container {
  width: min(calc(100% - 2rem), var(--container-width));
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 1000;
  padding: 0.8rem 1rem;
  border-radius: 10px;
  background: var(--color-surface);
}

.topbar {
  display: none;
  background: var(--color-primary-dark);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.92rem;
}

.topbar-inner,
.topbar-links,
.nav-wrap,
.site-nav,
.hero-actions,
.hero-stats,
.section-header,
.news-meta,
.footer-bottom {
  display: flex;
}

.topbar-inner {
  justify-content: flex-end;
  gap: 1rem;
  padding: 0.65rem 0;
}

.topbar-links {
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

.topbar a {
  color: rgba(255, 255, 255, 0.88);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 33, 66, 0.94);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 22px rgba(15, 33, 66, 0.16);
}

.nav-wrap {
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 0;
  position: relative;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  color: #fff;
}

.brand img {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.brand-logo-only {
  gap: 0;
}

.brand-logo-only img {
  width: clamp(170px, 24vw, 300px);
  height: auto;
  max-height: 74px;
}

.brand span {
  display: flex;
  flex-direction: column;
  line-height: 1.08;
}

.brand strong,
.brand small {
  color: #fff;
}

.menu-toggle {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  padding: 0.72rem 1rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}

.site-nav {
  display: none;
  flex-direction: column;
  gap: 0.85rem;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.45rem);
  padding: 1rem;
  border-radius: 18px;
  background: #11264b;
  box-shadow: 0 20px 34px rgba(15, 33, 66, 0.28);
}

.site-nav.is-open {
  display: flex;
}

.site-nav a {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
}

.site-nav > a.is-current,
.submenu-panel a.is-current,
.submenu-toggle.is-current {
  color: var(--color-accent);
}

.header-cta.is-current {
  background: var(--color-accent);
  color: var(--color-primary-dark);
  border-color: var(--color-accent);
}

.submenu-panel a {
  margin: 0;
}

.submenu-link-disabled {
  margin: 0;
  color: rgba(255, 255, 255, 0.52);
  cursor: not-allowed;
}

.nav-item {
  position: relative;
}

.has-submenu {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.submenu-toggle {
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.submenu-panel {
  display: none;
  padding-left: 0.8rem;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
}

.nav-item.is-open .submenu-panel,
.nav-item.is-open .submenu-panel {
  display: grid;
  gap: 0.5rem;
}

.header-cta {
  display: none;
}

.header-home-link {
  display: inline-flex;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.65);
  color: rgba(255, 255, 255, 0.95);
  font-weight: 600;
  text-decoration: none;
}

.header-home-link:hover,
.header-home-link:focus-visible {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.eyebrow,
.card-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--color-accent);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 14px 22px;
  border-radius: var(--radius-button);
  font-weight: 700;
  transition:
    transform var(--transition),
    background var(--transition),
    color var(--transition),
    border-color var(--transition);
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--color-accent);
  color: #fff;
}

.button-primary:hover,
.button-primary:focus-visible {
  background: #8f6718;
  color: #fff;
}

.button-outline,
.button-outline-dark {
  border: 1px solid currentColor;
  background: transparent;
}

.button-outline {
  color: #fff;
}

.button-outline-dark {
  color: var(--color-primary);
}

.hero-home {
  position: relative;
  width: 100%;
  height: clamp(250px, 36vw, 440px);
  background: var(--color-primary-dark) url("/assets/images/hero-portada.png")
    center center / cover no-repeat;
}

.hero-layout,
.pillars-grid,
.formation-layout,
.level-grid,
.specialties-shell,
.specialty-side-grid,
.news-grid,
.news-feed,
.admission-layout,
.steps-grid,
.contact-layout,
.contact-data-grid,
.contact-side-grid,
.footer-grid,
.hero-note-grid {
  display: grid;
  gap: 1rem;
}

.hero-layout {
  position: relative;
  z-index: 1;
  gap: 1.5rem;
}

.hero-copy h1 {
  max-width: 12ch;
  font-size: clamp(2.4rem, 7vw, 4.9rem);
  color: #fff;
}

.hero-lead {
  max-width: 62ch;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.02rem;
}

.hero-actions {
  gap: 0.85rem;
  flex-wrap: wrap;
  margin: 1.5rem 0;
}

.hero-stats {
  flex-wrap: wrap;
  gap: 0.8rem;
}

.stat-chip,
.hero-note-card,
.pillar-card,
.card-surface,
.level-card,
.specialty-feature,
.specialty-mini,
.news-card,
.support-card,
.step-card,
.contact-panel,
.media-card {
  border-radius: var(--radius-card);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.stat-chip {
  min-width: 168px;
  padding: 1rem 1.05rem;
  border: 1px solid var(--color-border-strong);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
}

.stat-chip strong,
.stat-chip span {
  display: block;
  color: #fff;
}

.stat-chip strong {
  margin-bottom: 0.2rem;
  font-size: 1.08rem;
}

.hero-aside {
  display: grid;
  gap: 1rem;
}

.media-card {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-hero);
}

.media-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.media-card-body,
.pillar-card,
.formation-intro,
.level-card,
.specialty-feature-body,
.specialty-mini div,
.news-card-content,
.step-card,
.contact-panel,
.support-card,
.hero-note-card {
  padding: 1.3rem;
}

.card-label {
  margin-bottom: 0.55rem;
}

.text-link {
  font-weight: 700;
}

.hero-note-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.hero-note-card span {
  display: block;
  margin-bottom: 0.35rem;
  color: #fff;
  font-weight: 700;
}

.hero-note-card p {
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 0;
}

.section-video {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.video-layout {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}

.video-copy {
  max-width: 62ch;
}

.video-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.1rem;
}

.section-video .eyebrow {
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.section-video h2 {
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  margin-bottom: 0.9rem;
  max-width: 30ch;
  line-height: 1.18;
}

.section-video .section-description {
  font-size: 1.05rem;
  line-height: 1.75;
  max-width: 50ch;
  text-align: justify;
  text-wrap: pretty;
}

.section-institucion .video-copy h2 {
  font-size: clamp(1.55rem, 3.1vw, 2.3rem);
}

.section-institucion .video-copy .section-description {
  font-size: 1.1rem;
  line-height: 1.8;
}

.video-card {
  border-radius: var(--radius-card);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border);
  padding: 1rem;
}

.video-iframe-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(15, 33, 66, 0.06);
}

.video-iframe-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.hero-note-card.accent {
  background: linear-gradient(
    180deg,
    rgba(168, 121, 31, 0.22),
    rgba(255, 255, 255, 0.12)
  );
}

.section {
  padding: 4.5rem 0;
}

.page-hero {
  padding-top: 3.5rem;
}

.equipo-hero-clean .page-hero-grid {
  grid-template-columns: 1fr;
}

.docentes-hero-clean .page-hero-grid {
  grid-template-columns: 1fr;
}

.parvularia-hero-clean .page-hero-grid {
  grid-template-columns: 1fr;
}

.basica-hero-clean .page-hero-grid {
  grid-template-columns: 1fr;
}

.media-hero-clean .page-hero-grid {
  grid-template-columns: 1fr;
}

.page-hero-soft {
  background: linear-gradient(180deg, #f9fbff 0%, #eef3fa 100%);
}

.page-hero-tight {
  padding-top: 2.5rem;
}

/* Reduce el espacio inferior del hero en páginas sin ilustración */
.page-hero-compact {
  padding-bottom: 2.5rem;
}

.equipo-director-compact {
  padding-bottom: 2rem;
}

.equipo-directivo-compact {
  padding-top: 2rem;
}

.docentes-section-compact {
  padding: 2.5rem 0;
}

.docentes-section-header-compact {
  margin-bottom: 1.2rem;
}

.parvularia-section-compact {
  padding: 2.5rem 0;
}

.basica-section-compact {
  padding: 2.5rem 0;
}

.media-section-compact {
  padding: 2.5rem 0;
}

.admision-section-compact {
  padding: 2.5rem 0;
}

.specialty-section-compact {
  padding: 2.5rem 0;
}

.specialty-section-bottom {
  padding-top: 1.5rem;
}

.specialty-wide-card {
  width: 100%;
}

.admision-cta-centered {
  text-align: center;
  margin-top: 1.1rem;
}

.admision-cta-centered .cta-row {
  justify-content: center;
}

.admision-wide-item {
  grid-column: 1 / -1;
}

.page-hero-grid,
.info-grid,
.contact-page-grid,
.document-sections,
.profiles-grid,
.article-gallery-grid,
.specialty-hero-grid {
  display: grid;
  gap: 1rem;
}

.page-side-card,
.content-block,
.leader-card,
.profile-card,
.map-embed,
.cta-banner,
.article-card {
  border-radius: var(--radius-card);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border);
}

.page-side-card,
.content-block,
.profile-card,
.cta-banner {
  padding: 1.35rem;
}

.page-intro-centered {
  text-align: center;
  max-width: 64ch;
  margin: 0 auto 1.5rem;
}

/* Separador entre tarjetas (por ejemplo Visión/Misión) */
.divider {
  height: 1.25rem;
}

.content-list {
  padding-left: 1.1rem;
}

.level-photo-slot {
  display: grid;
  gap: 0.9rem;
}

.level-photo-image {
  width: 100%;
  min-height: 250px;
  max-height: 360px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--color-border);
}

.level-photo-placeholder {
  min-height: 250px;
  border-radius: 14px;
  border: 1px dashed rgba(23, 49, 95, 0.25);
  background: linear-gradient(180deg, #f8fbff 0%, #eef3fa 100%);
}

.level-photo-note {
  margin-bottom: 0;
}

.leader-card {
  display: grid;
  gap: 1rem;
  padding: 1.5rem;
}

.profile-avatar {
  width: 88px;
  height: 88px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(
    180deg,
    rgba(23, 49, 95, 0.14),
    rgba(168, 121, 31, 0.14)
  );
  color: var(--color-primary);
  font-family: "Hind", sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 999px;
  object-position: center;
}

.profile-avatar.small {
  width: 62px;
  height: 62px;
  font-size: 1.2rem;
}

/* Dirección: avatar más grande y centrado en el recuadro */
.director-leader.leader-card {
  align-items: center;
  grid-template-columns: 0.35fr 1fr;
}

.director-avatar {
  width: 188px;
  height: 188px;
  justify-self: center;
  align-self: center;
}

.director-avatar img {
  object-position: center;
}

.profile-name {
  color: var(--color-primary);
  font-weight: 700;
}

.profiles-grid {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.profile-card {
  display: grid;
  gap: 0.8rem;
}

.specialty-page-hero {
  padding-bottom: 3rem;
}

.specialty-hero-image {
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-hero);
}

.specialty-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.document-sections,
.contact-page-grid {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.document-link {
  display: block;
  padding: 0.95rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  background: #fff;
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: 0.7rem;
}

.muted-link {
  color: var(--color-text-soft);
}

.document-list {
  display: grid;
}

.cta-row {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.faq-list {
  display: grid;
  gap: 0.9rem;
}

.faq-item {
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid var(--color-border);
  background: #fff;
}

.map-embed {
  overflow: hidden;
}

.map-embed iframe {
  width: 100%;
  min-height: 360px;
  border: 0;
}

.map-note {
  padding: 1rem 1.3rem 1.2rem;
}

.article-shell {
  max-width: 960px;
}

.article-card {
  overflow: hidden;
}

.article-card > img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 14px 14px 0 0;
  border: 1px solid rgba(168, 121, 31, 0.65);
  border-bottom: 0;
}

.article-gallery {
  margin-top: 1.75rem;
}

.article-gallery-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.8rem;
}

.article-gallery-actions {
  display: inline-flex;
  gap: 0.5rem;
}

.gallery-nav-btn {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(23, 49, 95, 0.28);
  background: #fff;
  color: var(--color-primary);
  font-size: 1.25rem;
  line-height: 1;
  padding: 0;
}

.article-gallery-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(300px, 1fr);
  gap: 0.9rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.4rem;
}

.article-gallery-item {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: #fff;
  display: flex;
  justify-content: center;
  scroll-snap-align: start;
}

.article-gallery-item img {
  width: 100%;
  max-width: 560px;
  max-height: 420px;
  height: auto;
  object-fit: contain;
}

@media (max-width: 640px) {
  .article-gallery-track {
    grid-auto-columns: minmax(250px, 1fr);
  }
}

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

.section-niveles {
  background: radial-gradient(
      circle at top right,
      rgba(168, 121, 31, 0.1),
      transparent 38%
    ),
    linear-gradient(180deg, #f9fbff 0%, #f5f8ff 100%);
}

.section-niveles .section-header {
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
}

.section-niveles .section-header > div {
  width: 100%;
  text-align: right;
}

.section-niveles .section-header .eyebrow {
  max-width: none;
  width: 100%;
  text-align: right;
  color: var(--color-primary);
  font-size: clamp(1.55rem, 3.1vw, 2.3rem);
  font-family: "Hind", sans-serif;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: 0;
  text-transform: none;
  margin: 0;
  display: flex;
  justify-content: flex-end;
}

.section-news-highlight {
  background: linear-gradient(180deg, #f6f9ff 0%, #ffffff 100%);
  border-top: 1px solid rgba(23, 49, 95, 0.06);
  border-bottom: 1px solid rgba(23, 49, 95, 0.06);
}

.niveles-circles {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  margin-top: 1.2rem;
}

.nivel-circle {
  border-radius: var(--radius-card);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border);
  padding: 1.2rem 1rem 1.2rem;
  text-align: center;
  text-decoration: none;
  display: grid;
  justify-items: center;
  gap: 0.9rem;
  position: relative;
  overflow: hidden;
  transition:
    transform var(--transition),
    border-color var(--transition);
}

.nivel-circle:hover,
.nivel-circle:focus-visible {
  transform: translateY(-2px);
}

.nivel-circle-media {
  width: clamp(140px, 30vw, 190px);
  aspect-ratio: 1 / 1;
  border-radius: 999px;
  border: 1px solid rgba(23, 49, 95, 0.16);
  background: linear-gradient(
    180deg,
    rgba(15, 33, 66, 0.06) 0%,
    rgba(23, 49, 95, 0.02) 100%
  );
  background-image: var(--level-img);
  background-size: cover;
  background-position: center;
}

.nivel-circle-text {
  font-weight: 800;
  color: var(--color-primary);
}

.nivel-circle-plus {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(168, 121, 31, 0.16);
  color: var(--color-accent);
  border: 1px solid rgba(168, 121, 31, 0.35);
  font-size: 1.5rem;
  line-height: 1;
}

.section-institucion {
  background: radial-gradient(
      circle at top left,
      rgba(15, 33, 66, 0.08),
      transparent 38%
    ),
    linear-gradient(180deg, #f7faff 0%, #f2f7ff 100%);
}

.section-dark {
  background: radial-gradient(
      circle at top right,
      rgba(168, 121, 31, 0.12),
      transparent 24%
    ),
    linear-gradient(180deg, #112449 0%, #17315f 100%);
}

.section-header {
  flex-direction: column;
  gap: 0.9rem;
  margin-bottom: 1.6rem;
}

.section-header h2,
.section-dark h2,
.section-dark h1,
.section-dark h3 {
  max-width: 14ch;
}

.section-dark .admin-hero-title {
  max-width: 21ch;
}

.section-header-news {
  align-items: center;
  justify-content: center;
  text-align: center;
}

.section-header-news > div {
  width: 100%;
  display: flex;
  justify-content: center;
}

.section-header-news h2 {
  max-width: none;
  width: auto;
  margin: 0;
  color: var(--color-accent);
  font-size: clamp(1.8rem, 4.2vw, 3rem);
  letter-spacing: 0.02em;
  text-align: center;
}

.section-description,
.page-intro,
.news-meta,
.site-footer p,
.site-footer a,
.support-card p,
.media-card p,
.level-card p,
.pillar-card p,
.step-card p,
.contact-panel p,
.formation-intro p,
.news-card-content p,
.footer-title + p {
  color: var(--color-text-soft);
}

.section-dark .section-description,
.section-dark .eyebrow,
.section-dark p,
.section-dark li,
.section-dark .text-link,
.section-dark h1,
.section-dark h2,
.section-dark h3 {
  color: #fff;
}

.section-dark .eyebrow,
.section-dark .card-label {
  color: #f3cf8a;
}

.pillars-grid {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.pillar-card {
  border: 1px solid var(--color-border);
}

.pillar-index {
  display: inline-flex;
  margin-bottom: 0.9rem;
  color: var(--color-accent);
  font-weight: 700;
}

.formation-intro {
  background: linear-gradient(180deg, #ffffff 0%, #f6f8fc 100%);
  border: 1px solid var(--color-border);
}

.level-card {
  border: 1px solid var(--color-border);
}

.specialties-shell {
  align-items: start;
}

.section-specialties .section-header {
  align-items: flex-start;
}

.section-specialties .section-header > div {
  width: 100%;
  text-align: left;
}

.section-specialties .section-header h2 {
  max-width: none;
  width: 100%;
  text-align: left;
  color: #fff;
  font-size: clamp(1.55rem, 3.1vw, 2.3rem);
  line-height: 1.12;
  margin: 0;
}

.specialties-collage {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1.1rem;
}

.specialty-tile {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 18px rgba(15, 33, 66, 0.18);
  aspect-ratio: 1 / 1;
  padding: 0;
  margin: 0;
  display: grid;
  align-content: end;
  text-decoration: none;
}

.specialty-tile-media {
  position: absolute;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.95);
  background-image: var(--tile-img);
  background-size: cover;
  background-position: center;
  filter: saturate(1.05) contrast(1.05);
  transform: scale(1.02);
}

.specialty-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
      180deg,
      rgba(15, 33, 66, 0) 0%,
      rgba(15, 33, 66, 0.35) 70%,
      rgba(15, 33, 66, 0.55) 100%
    ),
    var(--tile-tone);
}

.specialty-tile-label {
  position: relative;
  z-index: 1;
  padding: 0.95rem 1rem 0.75rem;
  font-weight: 800;
  color: #fff;
  text-align: left;
  backdrop-filter: blur(10px);
  background: rgba(0, 0, 0, 0.18);
}

.specialty-tile-plus {
  position: absolute;
  right: 0.75rem;
  bottom: 0.7rem;
  z-index: 2;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.65);
  color: #fff;
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1;
  background: rgba(15, 33, 66, 0.35);
}

.specialty-tile:nth-child(1),
.specialty-tile:nth-child(2),
.specialty-tile:nth-child(3),
.specialty-tile:nth-child(4) {
  transform: none;
}

.specialty-feature,
.specialty-mini {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
}

.specialty-feature img,
.specialty-mini img {
  width: 100%;
  object-fit: cover;
}

.specialty-feature img {
  aspect-ratio: 16 / 10;
}

.specialty-feature ul {
  padding-left: 1rem;
  margin-bottom: 0;
}

.specialty-mini img {
  height: 170px;
}

.news-grid,
.news-feed {
  grid-template-columns: repeat(1, minmax(0, 1fr));
  align-items: stretch;
}

.news-card {
  overflow: hidden;
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.news-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 14px 14px 0 0;
  border: 1px solid rgba(168, 121, 31, 0.65);
  border-bottom: 0;
}

.news-card h3,
.news-card h2 {
  margin-bottom: 0.55rem;
}

.news-card-content {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.news-card-content h3 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-content p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-content .text-link {
  margin-top: auto;
}

.news-media-link {
  display: block;
  text-decoration: none;
}

.news-media-link:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.news-title-link {
  color: inherit;
  text-decoration: none;
}

.news-title-link:hover,
.news-title-link:focus-visible {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

.news-meta {
  gap: 0.45rem;
  align-items: center;
  font-size: 0.92rem;
  margin-bottom: 0.45rem;
}

.placeholder-card {
  padding: 1.4rem;
}

.admission-layout {
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  background: linear-gradient(180deg, #ffffff 0%, #eff4fb 100%);
}

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

.step-card {
  border: 1px solid var(--color-border);
}

.step-card strong {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0.6rem;
  color: var(--color-accent);
  font-size: 1.1rem;
}

.step-icon {
  margin-right: 0.35rem;
}

.admission-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.contact-layout {
  align-items: start;
}

.contact-panel {
  border: 1px solid var(--color-border);
}

.contact-data-grid {
  grid-template-columns: repeat(1, minmax(0, 1fr));
  margin-top: 1.2rem;
}

.contact-data-grid p:last-child {
  margin-bottom: 0;
}

.contact-data-grid a {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.contact-mail-link {
  display: inline-block;
  max-width: 100%;
}

.page-side-card p:last-child {
  margin-bottom: 0;
}

.support-card {
  display: block;
  border: 1px solid var(--color-border);
  color: inherit;
}

.support-card h3 {
  margin-bottom: 0.45rem;
}

.site-footer {
  padding: 3rem 0 1.5rem;
  background: var(--color-primary-dark);
  color: rgba(255, 255, 255, 0.9);
}

.site-footer h2,
.site-footer h3,
.footer-title {
  color: #fff;
}

.footer-grid {
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1.4rem;
}

.footer-brand-block {
  max-width: 340px;
}

.footer-brand {
  display: inline-flex;
  margin-bottom: 0.8rem;
}

.footer-brand img {
  width: clamp(150px, 26vw, 240px);
  height: auto;
  object-fit: contain;
}

.site-footer a {
  display: block;
  margin-bottom: 0.5rem;
  color: rgba(255, 255, 255, 0.82);
}

.site-footer p {
  color: rgba(255, 255, 255, 0.78);
}

.footer-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.footer-socials a {
  display: inline-flex;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  font-size: 0.92rem;
  background: rgba(255, 255, 255, 0.06);
}

.footer-socials-icons a {
  width: 40px;
  height: 40px;
  padding: 0;
  justify-content: center;
  align-items: center;
}

.footer-socials-icons svg {
  width: 19px;
  height: 19px;
}

.contact-socials a {
  border-color: rgba(23, 49, 95, 0.22);
  background: #fff;
  color: var(--color-primary);
}

.contact-socials a:hover,
.contact-socials a:focus-visible {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.contacto-compact .container {
  width: min(calc(100% - 1rem), var(--container-width));
}

.contacto-compact .contact-page-grid {
  gap: 0.7rem;
}

.contacto-compact .content-block {
  padding: 1rem;
}

.contact-icon {
  display: inline-flex;
  width: 1.15rem;
  margin-right: 0.35rem;
  align-items: center;
  justify-content: center;
}

.site-footer .footer-grid > div > p {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-bottom: 0.45rem;
}

.site-footer .footer-grid > div > p a {
  margin: 0;
  display: inline-flex;
  align-items: center;
}

.footer-title {
  margin-bottom: 0.65rem;
}

.footer-bottom {
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
}

.footer-bottom p {
  margin: 0;
}

.compact-header {
  position: static;
  background: var(--color-primary-dark);
}

.simple-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.compact-header .button-outline-dark,
.compact-header .button-primary,
.compact-header .button-secondary {
  color: var(--color-primary);
  background: #fff;
  border: 0;
}

.news-feed .news-card {
  max-width: 860px;
}

.news-body {
  color: var(--color-text);
}

.news-body p {
  margin-bottom: 0.9rem;
}

.news-body img {
  display: block;
  width: 100%;
  max-width: 560px;
  max-height: 420px;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  margin: 0.85rem auto;
}

.article-card > img,
.news-body img,
.article-gallery-item img {
  cursor: zoom-in;
}

body.lightbox-open {
  overflow: hidden;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(10, 20, 38, 0.84);
  z-index: 2000;
}

.image-lightbox.is-open {
  display: flex;
}

.image-lightbox img {
  width: auto;
  max-width: min(94vw, 1200px);
  max-height: 88vh;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

.image-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  background: rgba(11, 22, 42, 0.86);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  padding: 0;
  z-index: 1;
}

.image-lightbox-nav.prev {
  left: 1rem;
}

.image-lightbox-nav.next {
  right: 1rem;
}

.image-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  background: rgba(11, 22, 42, 0.85);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  padding: 0;
}

.news-page-title {
  text-align: center;
  max-width: none;
  width: 100%;
  margin: 0 0 1.2rem;
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  color: var(--color-accent);
}

.news-page .news-feed {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
}

.news-page .news-feed .news-card {
  max-width: none;
}

@media (min-width: 760px) {
  .news-page .news-feed {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .news-page .news-feed {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.news-pagination {
  margin-top: 1.2rem;
  display: flex;
  justify-content: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.news-page-btn {
  min-width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(23, 49, 95, 0.2);
  background: #fff;
  color: var(--color-primary);
  font-weight: 700;
  cursor: pointer;
}

.news-page-btn.is-active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

@media (min-width: 760px) {
  :root {
    --anchor-scroll-padding: 8.75rem;
  }

  .topbar {
    display: block;
  }

  .video-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
  }

  .section-header {
    flex-direction: row;
    align-items: end;
    justify-content: space-between;
  }

  /* Esta sección debe conservar el subtítulo en ancho completo */
  .section-institucion .section-header {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
  }

  .section-institucion .section-header h2 {
    max-width: none;
    width: 100%;
    text-align: center;
    font-size: clamp(1.5rem, 3vw, 2.3rem);
    line-height: 1.12;
    margin: 0;
  }

  /* El bloque de "Bienvenida institucional" debe ocupar ancho completo */
  .section-institucion .section-header .section-description {
    max-width: none;
    width: 100%;
    text-align: justify;
  }

  /* Encabezado "Niveles educativos" alineado a la derecha */
  .section-niveles .section-header {
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
  }

  .section-niveles .section-header > div {
    width: 100%;
    text-align: right;
  }

  .section-niveles .section-header h2 {
    max-width: none;
    width: 100%;
    text-align: right;
    font-size: clamp(1.5rem, 3vw, 2.3rem);
    line-height: 1.12;
    margin: 0;
  }

  .section-niveles .section-header .eyebrow {
  max-width: none;
  width: 100%;
  text-align: right;
  color: var(--color-primary);
  font-size: clamp(1.55rem, 3.1vw, 2.3rem);
  font-family: "Hind", sans-serif;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: 0;
  text-transform: none;
  margin: 0;
  }

  .section-description {
    max-width: 56ch;
  }

  .hero-layout,
  .formation-layout,
  .contact-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-hero-grid,
  .info-grid,
  .contact-page-grid,
  .specialty-hero-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .equipo-hero-clean .page-hero-grid {
    grid-template-columns: 1fr;
  }

  .docentes-hero-clean .page-hero-grid {
    grid-template-columns: 1fr;
  }

  .parvularia-hero-clean .page-hero-grid {
    grid-template-columns: 1fr;
  }

  .basica-hero-clean .page-hero-grid {
    grid-template-columns: 1fr;
  }

  .media-hero-clean .page-hero-grid {
    grid-template-columns: 1fr;
  }

  .specialty-wide-card {
    grid-column: 1 / -1;
  }

  .document-sections,
  .profiles-grid,
  .article-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-layout {
    align-items: center;
  }

  .leader-card {
    grid-template-columns: 0.3fr 1fr;
    align-items: start;
  }

  .pillars-grid,
  .level-grid,
  .steps-grid,
  .news-grid,
  .news-feed,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .specialties-shell {
    grid-template-columns: 1.15fr 0.85fr;
  }

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

  .contact-data-grid,
  .contact-side-grid,
  .hero-note-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .menu-toggle {
    display: none;
  }

  .site-nav {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0;
    background: transparent;
    box-shadow: none;
    gap: 1rem;
    overflow: visible;
  }

  .has-submenu {
    gap: 0;
  }

  .nav-item {
    padding-bottom: 0.55rem;
    margin-bottom: -0.55rem;
  }

  .submenu-panel {
    position: absolute;
    top: calc(100% - 1px);
    left: 0;
    min-width: 100%;
    width: max-content;
    padding: 0.55rem;
    border-left: 0;
    border-radius: 12px;
    background: #11264b;
    box-shadow: 0 14px 26px rgba(15, 33, 66, 0.24);
  }

  .nav-item:hover .submenu-panel,
  .nav-item:focus-within .submenu-panel,
  .nav-item.is-open .submenu-panel {
    display: grid;
  }

  .header-cta {
    display: inline-flex;
  }

  .header-home-link {
    display: inline-flex;
    padding: 0.5rem 0.95rem;
    border-radius: 999px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.65);
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
  }

  .header-home-link:hover,
  .header-home-link:focus-visible {
    border-color: var(--color-accent);
    color: var(--color-accent);
  }

  .brand-logo-only img {
    max-height: 90px;
  }

  .hero-home {
    height: clamp(280px, 30vw, 500px);
  }

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

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

  .specialty-side-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }

  .specialties-collage {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

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

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

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

  .footer-grid {
    grid-template-columns: 1.25fr 0.8fr 0.8fr 0.9fr;
  }
}
