/* ==========================================================================
   CCP v2 — estilos
   Paleta del tema anterior, con verdes oscurecidos donde hay texto para
   cumplir contraste AA.
   ========================================================================== */

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Playfair Display";
  src: url("../fonts/playfair-display.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --green: #579C3F;
  --green-text: #3A7527;     /* 5.3:1 sobre blanco */
  --green-dark: #2C5B1D;
  --green-deep: #1E3D12;
  --green-soft: #EEF6E8;
  --gold: #C9A227;
  --gold-light: #E8C84A;
  --ink: #1C2A1F;
  --muted: #4A5A4D;          /* 7:1 sobre blanco */
  --line: #DEE6D8;
  --bg: #F7F9F4;
  --white: #FFFFFF;
  --danger: #B32D2E;

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Playfair Display", Georgia, serif;

  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 6px 24px rgba(30, 61, 18, .08);
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
}

/* Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--green-text); text-underline-offset: .18em; }
a:hover { color: var(--green-dark); }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; color: var(--ink); margin: 0 0 .5em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }

.screen-reader-text {
  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: 12px; top: -60px; z-index: 1000;
  background: var(--green-deep); color: #fff; padding: 10px 16px; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 12px; color: #fff; }
.site-main:focus { outline: none; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 860px; }
.icon { flex: none; vertical-align: middle; }

/* Botones -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 22px; border-radius: 999px;
  font: 600 1rem/1.2 var(--font-body); text-decoration: none; cursor: pointer;
  border: 2px solid transparent; transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: .9375rem; }
.btn-primary { background: var(--green-text); color: #fff; }
.btn-primary:hover { background: var(--green-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--green-text); border-color: var(--green-text); }
.btn-outline:hover { background: var(--green-soft); color: var(--green-dark); }
.btn-gold { background: var(--gold-light); color: var(--green-deep); }
.btn-gold:hover { background: var(--gold); color: var(--green-deep); }
.btn-outline-light { color: #fff; border-color: rgba(255,255,255,.7); }
.btn-outline-light:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; }
.link-arrow:hover { text-decoration: underline; }

/* Aviso superior --------------------------------------------------------- */
.aviso { background: var(--green-deep); color: #fff; font-size: .9375rem; }
.aviso-inner { display: flex; align-items: center; gap: 10px; padding-top: 10px; padding-bottom: 10px; }
.aviso .icon { color: var(--gold-light); }
.aviso-texto { margin: 0; }
.aviso a { color: var(--gold-light); font-weight: 600; margin-left: 6px; white-space: nowrap; }
.aviso a:hover { color: #fff; }

/* Header -------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.96); backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); flex: none; }
.brand-logo { width: 46px; height: auto; }
.brand-text { display: flex; flex-direction: column; max-width: 11.5rem; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; line-height: 1.15; }
.brand-slogan { display: none; }
.brand:hover { color: var(--ink); }

.site-nav { display: flex; align-items: center; gap: 12px; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2px; }
.nav-list a {
  display: block; padding: 10px 12px; border-radius: 10px;
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: .96875rem;
}
.nav-list a:hover { background: var(--green-soft); color: var(--green-dark); }
.nav-list .current-menu-item > a,
.nav-list .current_page_item > a,
.nav-list .current-menu-ancestor > a,
.nav-list .current_page_parent > a { color: var(--green-text); font-weight: 700; }
.nav-list .sub-menu { list-style: none; margin: 0; padding: 0; }
.btn-portal { background: var(--green-deep); color: #fff; min-height: 42px; padding: 8px 16px; font-size: .9375rem; white-space: nowrap; }
.btn-portal:hover { background: var(--green-dark); color: #fff; }
.nav-toggle { display: none; }

@media (max-width: 1360px) {
  .nav-list a { padding: 10px 8px; }
}
@media (max-width: 1240px) {
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 48px; height: 48px; border-radius: 12px; border: 1px solid var(--line);
    background: #fff; color: var(--ink); cursor: pointer;
  }
  .nav-toggle-close { display: none; }
  .nav-open .nav-toggle-open { display: none; }
  .nav-open .nav-toggle-close { display: inline-flex; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 12px;
    background: #fff; padding: 12px var(--gutter) 20px; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow); max-height: calc(100vh - 76px); overflow-y: auto;
  }
  .nav-open .site-nav { display: flex; }
  .nav-list { flex-direction: column; align-items: stretch; }
  .nav-list a { padding: 14px 12px; font-size: 1.0625rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav-list .sub-menu a { padding-left: 28px; }
  .btn-portal { align-self: flex-start; }
  html:not(.js) .site-nav { display: flex; position: static; box-shadow: none; }
}

/* Secciones ------------------------------------------------------------ */
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section-tight { padding: clamp(32px, 5vw, 56px) 0; }
.section-alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-green { background: var(--green-deep); color: #E6F0E2; }
.section-green .section-title { color: #fff; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin-bottom: 24px; }
.section-title { font-size: clamp(1.75rem, 3.2vw, 2.375rem); margin: 0; }
.section-title-sm { font-size: clamp(1.375rem, 2.4vw, 1.75rem); margin: 0 0 16px; }
.section-head .section-title-sm { margin: 0; }
.section-lead { font-size: 1.125rem; margin: 8px 0 32px; color: inherit; opacity: .9; }
.eyebrow {
  display: inline-block; margin: 0 0 16px; padding: 6px 14px; border-radius: 999px;
  background: var(--green-soft); color: var(--green-dark);
  font-size: .8125rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.empty { color: var(--muted); padding: 24px; background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); text-align: center; }

/* Hero ------------------------------------------------------------------ */
/* Foto del colegio a todo ancho (imagen destacada de la página Inicio) con degradado verde. */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--green-deep); color: #fff;
  min-height: clamp(460px, 62vh, 680px); display: flex; align-items: center;
}
.hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero-pattern { position: absolute; right: 0; bottom: 0; width: min(70%, 900px); height: 100%; color: var(--green-dark); z-index: -2; }
.hero-shade {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(20,40,14,.94) 0%, rgba(20,40,14,.78) 45%, rgba(20,40,14,.15) 100%);
}
.hero:not(.has-photo) .hero-shade { background: linear-gradient(90deg, rgba(20,40,14,.6) 0%, rgba(20,40,14,0) 70%); }
.hero-inner { padding-top: clamp(56px, 8vw, 96px); padding-bottom: clamp(96px, 11vw, 140px); }
.hero-inner > * { max-width: 680px; }
.hero-eyebrow {
  display: inline-block; margin: 0 0 20px; padding: 6px 14px; border-radius: 999px;
  border: 1px solid rgba(232,200,74,.6); color: var(--gold-light);
  font-size: .8125rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.hero-title { color: #fff; font-size: clamp(2.25rem, 5vw, 3.75rem); line-height: 1.06; margin-bottom: 20px; }
.hero-lead { font-size: clamp(1.0625rem, 1.6vw, 1.25rem); color: #DCE8D6; margin-bottom: 28px; }
@media (max-width: 700px) {
  .hero-shade { background: linear-gradient(180deg, rgba(20,40,14,.7) 0%, rgba(20,40,14,.92) 100%); }
  .hero-pattern { width: 100%; opacity: .6; }
}

/* Panel de accesos directos (sube sobre el borde inferior de la portada) ---- */
.shortcuts { position: relative; z-index: 2; margin-top: -56px; background: linear-gradient(to bottom, transparent 56px, #FAF6EA 56px); }
.shortcuts-panel {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px rgba(30, 61, 18, .14); padding: 20px 24px 24px;
}
.shortcuts-title {
  font-family: var(--font-body); font-size: .8125rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 14px;
}
.shortcuts-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; }
.shortcut {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 10px; height: 100%;
  padding: 14px 6px; border-radius: 14px; text-align: center; text-decoration: none; color: var(--ink);
  font-weight: 600; font-size: .9375rem; line-height: 1.25; transition: background .2s, color .2s;
}
.shortcut-icon {
  display: inline-flex; width: 52px; height: 52px; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--green-deep); color: #fff; transition: background .2s, transform .2s;
}
.shortcut:hover { background: var(--green-soft); color: var(--green-dark); }
.shortcut:hover .shortcut-icon { background: var(--green-text); transform: translateY(-2px); }
@media (max-width: 1100px) { .shortcuts-list { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 520px) {
  .shortcuts { margin-top: -32px; background: linear-gradient(to bottom, transparent 32px, #FAF6EA 32px); }
  .shortcuts-panel { padding: 16px 12px 18px; }
  .shortcuts-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shortcut { flex-direction: row; justify-content: flex-start; text-align: left; padding: 10px; font-size: .875rem; }
  .shortcut-icon { width: 40px; height: 40px; flex: none; }
}
/* La sección siguiente necesita aire bajo el panel. */
.shortcuts + .section { padding-top: clamp(40px, 6vw, 72px); }

/* Tarjetas de noticia ---------------------------------------------------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.card-media { display: block; aspect-ratio: 16 / 10; background: var(--green-soft); }
.card-media img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.card-placeholder { display: flex; height: 100%; align-items: center; justify-content: center; color: var(--green); }
/* Sin imagen: franja corta en vez de un recuadro grande vacío */
.card-media-empty { aspect-ratio: auto; height: 88px; }
.card-body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-meta { display: flex; align-items: center; gap: 10px; margin: 0; font-size: .875rem; color: var(--muted); }
.card-title { font-size: 1.375rem; line-height: 1.25; margin: 0; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--green-text); text-decoration: underline; }
.card-excerpt { margin: 0; color: var(--muted); font-size: 1.0625rem; line-height: 1.55; }

.tag {
  display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700;
  background: var(--green-soft); color: var(--green-dark); letter-spacing: .02em;
}
.tag-salud { background: #E3EEF9; color: #1D4F7A; }
.tag-eventos { background: #FFF3C4; color: #5C4500; }
.tag-academico { background: #F1E8FA; color: #5B2E86; }

/* Listas de documentos / comunicados ------------------------------------ */
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(20px, 3vw, 32px); }
.section-alt .panel { background: var(--bg); }

.doc-list { list-style: none; margin: 0; padding: 0; }
.doc-item { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.doc-item:last-child { border-bottom: 0; }
.doc-list-lg .doc-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 12px; }
.doc-date {
  flex: none; width: 56px; height: 60px; border-radius: 12px; background: var(--green-soft); color: var(--green-dark);
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1;
}
.doc-day { font-weight: 800; font-size: 1.25rem; }
.doc-month { font-size: .75rem; text-transform: uppercase; font-weight: 600; }
.doc-icon { flex: none; display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 12px; background: var(--green-soft); color: var(--green-text); }
.doc-body { flex: 1; min-width: 0; }
.doc-title { font-family: var(--font-body); font-size: 1rem; font-weight: 600; margin: 4px 0 2px; }
.doc-title a { color: var(--ink); text-decoration: none; }
.doc-title a:hover { color: var(--green-text); text-decoration: underline; }
.doc-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.doc-head .doc-title { margin: 0; }
.tag-lg { font-size: .875rem; padding: 5px 14px; }
.doc-meta { margin: 0; font-size: .8125rem; color: var(--muted); }
.doc-desc { margin: 6px 0 0; font-size: .9375rem; color: var(--muted); }
.doc-download {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 14px;
  border-radius: 999px; border: 1px solid var(--line); color: var(--green-text); text-decoration: none; font-weight: 600; font-size: .875rem;
}
.doc-download:hover { border-color: var(--green-text); background: var(--green-soft); }
@media (max-width: 560px) { .doc-download-text { display: none; } .doc-download { padding: 8px 12px; } }

.doc-group { margin-bottom: 40px; }
.doc-group-year { font-weight: 700; color: var(--muted); font-size: .875rem; text-transform: uppercase; letter-spacing: .06em; margin: 16px 0 4px; }
.archive-details { margin-top: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 0 18px; }
.archive-details summary { cursor: pointer; padding: 14px 0; font-weight: 600; color: var(--green-text); }

/* Pestañas, chips y filtros -------------------------------------------- */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 2px solid var(--line); margin-bottom: 20px; }
.tab {
  display: inline-block; padding: 10px 18px; margin-bottom: -2px; border: 0; border-bottom: 3px solid transparent;
  background: none; font: 600 1rem var(--font-body); color: var(--muted); text-decoration: none; cursor: pointer; min-height: 44px;
}
.tab:hover { color: var(--green-dark); }
.tab.is-active { color: var(--green-text); border-bottom-color: var(--green-text); }
.filters { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.filters .chips { margin: 0; }
.chip {
  display: inline-flex; align-items: center; min-height: 40px; padding: 6px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; font-size: .9375rem; font-weight: 500;
}
.chip:hover { border-color: var(--green-text); color: var(--green-dark); }
.chip.is-active { background: var(--green-text); border-color: var(--green-text); color: #fff; }
.search-inline { display: flex; align-items: center; gap: 8px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); min-width: 240px; }
.search-inline input { border: 0; outline: 0; background: none; font: inherit; padding: 10px 0; width: 100%; color: var(--ink); }
.search-inline:focus-within { border-color: var(--green-text); box-shadow: 0 0 0 3px rgba(87,156,63,.2); }
@media (max-width: 560px) { .search-inline { min-width: 0; width: 100%; } }

/* Matrícula -------------------------------------------------------------- */
.tab-panel { padding-top: 8px; }
.js .tab-panel-title { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
html:not(.js) .tab-panel + .tab-panel { margin-top: 48px; }
.docs-title { font-size: 1.375rem; margin-top: 32px; }
.docs-help { color: var(--muted); }
.edit-hint { font-size: .875rem; margin-top: 16px; }
.callout { display: flex; gap: 12px; align-items: flex-start; margin-top: 40px; padding: 18px 20px; border-radius: var(--radius); background: var(--green-soft); color: var(--green-deep); }
.callout p { margin: 0; }

/* Niveles ---------------------------------------------------------------- */
.intro { margin-bottom: 32px; }
.ciclo + .ciclo { margin-top: clamp(40px, 6vw, 64px); }
.ciclo-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 2px solid var(--line); }
.ciclo-head .section-title-sm { margin: 0; }
.ciclo-sub { margin: 0; color: var(--muted); font-weight: 600; }
.nivel-grid { display: grid; gap: 20px; }
.nivel-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.nivel-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1100px) { .nivel-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .nivel-grid-4, .nivel-grid-2 { grid-template-columns: 1fr; } }
.nivel { display: flex; flex-direction: column; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; }
.nivel-head { display: flex; align-items: center; gap: 14px; }
.nivel-icon { flex: none; display: inline-flex; width: 56px; height: 56px; align-items: center; justify-content: center; border-radius: 50%; }
.ciclo-parvularia .nivel-icon { background: #FFF3C4; color: #6B5100; }
.ciclo-primer .nivel-icon { background: var(--green-soft); color: var(--green-text); }
.ciclo-segundo .nivel-icon { background: var(--green-deep); color: #fff; }
.nivel-title { font-size: 1.25rem; margin: 0; }
.nivel-code { display: inline-block; margin-top: 2px; font-size: .8125rem; font-weight: 700; color: var(--muted); letter-spacing: .04em; }
.nivel-desc { color: var(--muted); margin: 0; flex: 1; }
.nivel-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.nivel-pending { font-size: .875rem; color: var(--muted); margin: 0; }

/* Equipo ----------------------------------------------------------------- */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; margin-bottom: 48px; }
/* Tarjeta del equipo (opción B): foto, nombre sobre blanco y cargo en franja verde oscuro.
   Nombre y franja tienen alto fijo (2 líneas) para que todas las tarjetas sean iguales. */
.person { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; text-align: center; display: flex; flex-direction: column; }
.person-photo, .person-initials { display: block; width: 100%; aspect-ratio: 4 / 5; height: auto; margin: 0; border-radius: 0; object-fit: cover; object-position: center 20%; background: #fff; }
.person-initials { display: flex; align-items: center; justify-content: center; background: var(--green-soft); color: var(--green-dark); font-family: var(--font-head); font-weight: 800; font-size: 2.5rem; }
.person-name {
  --lh: 1.25em;
  margin: 0; padding: 0 14px; box-sizing: content-box;
  height: calc(var(--lh) * 2); padding-top: 14px; padding-bottom: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.0625rem; line-height: var(--lh);
}
.person-name span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.person-role {
  --lh: 1.35em;
  margin: 0; padding: 10px 14px; box-sizing: content-box;
  height: calc(var(--lh) * 2);
  display: flex; align-items: center; justify-content: center;
  background: var(--green-deep); color: var(--gold-light);
  font-size: .8125rem; font-weight: 700; letter-spacing: .03em; line-height: var(--lh);
  margin-top: auto;
}
.person-role span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 600px) {
  /* Celular: dos tarjetas por fila */
  .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .person-name { font-size: .9375rem; padding: 10px 10px; }
  .person-role { font-size: .6875rem; letter-spacing: .02em; padding: 8px 10px; }
  .person-initials { font-size: 2rem; }
}

/* Sellos ----------------------------------------------------------------- */
.sellos-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.sello { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius-lg); padding: 28px; }
.sello h3 { color: #fff; font-size: 1.375rem; margin: 12px 0 10px; }
.sello p { margin: 0; color: #D9E7D3; }
.sello-icon { color: var(--gold-light); }
@media (max-width: 860px) { .sellos-grid { grid-template-columns: 1fr; } }
/* Sellos bajo la portada: fondo crema, sin tarjetas y con acento dorado,
   para que no se confunda con las tarjetas blancas de accesos rápidos. */
.section-sellos { background: #FAF6EA; border-bottom: 1px solid #EDE4C8; text-align: center; }
.section-sellos .section-title { color: var(--green-deep); }
.section-sellos .section-lead { color: #5E5A45; margin-left: auto; margin-right: auto; }
.section-sellos .sellos-grid { gap: 0; }
.section-sellos .sello { background: none; border: 0; border-radius: 0; padding: 8px 36px; }
.section-sellos .sello + .sello { border-left: 1px solid #E6DCBC; }
.section-sellos .sello h3 { color: var(--green-deep); font-size: 1.5rem; }
.section-sellos .sello p { color: #4F4B3A; }
.section-sellos .sello-icon {
  display: inline-flex; width: 64px; height: 64px; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--gold-light); color: var(--green-deep);
  transition: background-color .25s ease, color .25s ease, transform .25s ease, box-shadow .25s ease;
}
/* Al pasar el puntero: el ícono se invierte y sube, y aparece una línea dorada bajo el título */
.section-sellos .sello h3 { position: relative; padding-bottom: 12px; transition: color .25s ease; }
.section-sellos .sello h3::after {
  content: ""; position: absolute; left: 50%; bottom: 0; width: 0; height: 3px; border-radius: 2px;
  background: var(--gold); transform: translateX(-50%); transition: width .3s ease;
}
.section-sellos .sello:hover .sello-icon {
  background: var(--green-deep); color: var(--gold-light);
  transform: translateY(-4px) scale(1.06); box-shadow: 0 10px 22px rgba(30, 61, 18, .22);
}
.section-sellos .sello:hover h3 { color: var(--green); }
.section-sellos .sello:hover h3::after { width: 48px; }
@media (prefers-reduced-motion: reduce) {
  .section-sellos .sello-icon, .section-sellos .sello h3, .section-sellos .sello h3::after { transition: none; }
  .section-sellos .sello:hover .sello-icon { transform: none; }
}
@media (max-width: 860px) {
  .section-sellos .sello { padding: 24px 8px; }
  .section-sellos .sello + .sello { border-left: 0; border-top: 1px solid #E6DCBC; }
}

/* CTA -------------------------------------------------------------------- */
.cta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px;
  padding: clamp(28px, 5vw, 48px); border-radius: 28px; background: var(--green-text); color: #fff;
}
.cta-title { color: #fff; font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 8px; }
.cta p { margin: 0; color: #E8F2E3; max-width: 40em; }

/* Páginas interiores ----------------------------------------------------- */
.page-hero { background: #fff; border-bottom: 1px solid var(--line); padding: clamp(36px, 6vw, 64px) 0 clamp(28px, 4vw, 44px); }
.page-title { font-size: clamp(2rem, 4.4vw, 3rem); margin: 0; }
.page-lead { margin: 10px 0 0; color: var(--muted); font-size: 1.125rem; }
.breadcrumb { margin: 0 0 8px; font-size: .9375rem; color: var(--muted); }

.prose { font-size: 1.0625rem; }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: 1.75rem; margin-top: 1.6em; }
.prose h3 { font-size: 1.375rem; margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .35em; }
.prose blockquote, .prose .wp-block-quote {
  margin: 1.2em 0; padding: 18px 22px; border-radius: var(--radius); background: var(--green-soft);
  border: 0; font-family: var(--font-head); font-size: 1.25rem; font-style: italic; color: var(--green-deep);
}
.prose blockquote p { margin: 0; }
.prose img { border-radius: var(--radius); }
/* Tablas del contenido (p. ej. calendario de matrícula) */
.prose .wp-block-table { margin: 1.4em 0; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; box-shadow: 0 6px 20px rgba(30, 61, 18, .06); }
.prose table, .prose .wp-block-table table { width: 100%; border-collapse: collapse; border: 0; font-size: 1rem; margin: 0; }
.prose th, .prose td, .prose .wp-block-table th, .prose .wp-block-table td { padding: 14px 20px; border: 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.prose thead th, .prose .wp-block-table thead th { background: var(--green-deep); color: #fff; font-size: .8125rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.prose .wp-block-table thead { border: 0; }
.prose tbody tr:nth-child(even) td { background: #F7FAF4; }
.prose tbody tr:last-child td { border-bottom: 0; }
.prose tbody tr:hover td { background: var(--green-soft); }
.prose tbody td:first-child { font-weight: 700; color: var(--green-dark); white-space: nowrap; }
.prose tbody td:last-child { font-weight: 600; }
/* En celular cada fila pasa a ser una tarjeta con su etiqueta. */
@media (max-width: 600px) {
  .prose .wp-block-table { border: 0; background: none; box-shadow: none; overflow: visible; }
  .prose .wp-block-table thead { display: none; }
  .prose .wp-block-table tr { display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; overflow: hidden; }
  .prose .wp-block-table td { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: normal; text-align: right; }
  .prose .wp-block-table td::before { content: attr(data-label); font-weight: 600; color: var(--muted); text-align: left; }
  .prose .wp-block-table tr td:last-child { border-bottom: 0; }
  .prose tbody tr:nth-child(even) td { background: #fff; }
}
.prose details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 20px; }
.prose details + details { margin-top: 10px; }
.prose summary { cursor: pointer; padding: 16px 0; font-weight: 600; list-style-position: outside; }
.prose details[open] summary { color: var(--green-text); }
.prose details > :not(summary) { padding-bottom: 16px; margin: 0; }
.featured { margin: 0 0 24px; }
.featured img { width: 100%; border-radius: var(--radius-lg); }
.pdf-embed { width: 100%; height: 80vh; min-height: 480px; border: 1px solid var(--line); border-radius: var(--radius); margin-top: 24px; }
@media (max-width: 700px) { .pdf-embed { display: none; } }

.pagination { margin-top: 32px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: #fff; text-decoration: none; }
.pagination .current { background: var(--green-text); color: #fff; border-color: var(--green-text); }

/* Portada: cada bloque con su propio fondo -------------------------------
   Sellos: crema · Comunicados/Documentos: blanco con paneles de color ·
   Noticias: verde suave con tarjetas blancas · Matrícula: verde oscuro. */
.section-avisos { background: #fff; border-bottom: 1px solid var(--line); }
.section-avisos .panel { background: #fff; border-top-width: 6px; box-shadow: 0 8px 24px rgba(30, 61, 18, .06); }
.panel-avisos { border-top-color: var(--green-text); }
.panel-docs { border-top-color: var(--gold); }
.panel-avisos .doc-date { background: var(--green-deep); color: #fff; }
.panel-docs .doc-icon { background: #FFF3C4; color: #6B5100; }
.section-noticias { background: var(--green-soft); }
.section-noticias .card { box-shadow: 0 6px 20px rgba(30, 61, 18, .07); }
.section-noticias .card-media { background: #DCEBD3; }

/* Conócenos -------------------------------------------------------------- */
.about-hero { background: var(--green-deep); color: #fff; padding: clamp(48px, 7vw, 88px) 0; position: relative; overflow: hidden; }
.about-hero::after {
  content: ""; position: absolute; right: -60px; bottom: -40px; width: 420px; height: 320px; opacity: .5;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 420 320'%3E%3Cg fill='none' stroke='%232C5B1D' stroke-width='2'%3E%3Cpath d='M210 10 150 150h120zM210 80 130 250h160zM350 110 310 210h80zM350 160 300 290h100zM80 150 45 240h70zM80 200 30 300h100z'/%3E%3C/g%3E%3C/svg%3E");
}
.about-title { color: #fff; font-size: clamp(2.5rem, 6vw, 4rem); margin: 0 0 12px; position: relative; z-index: 1; }
.about-lema { margin: 0; font-family: var(--font-head); font-style: italic; font-size: clamp(1.25rem, 2.4vw, 1.625rem); color: var(--gold-light); position: relative; z-index: 1; }

.about-intro { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 64px); align-items: start; }
@media (max-width: 900px) { .about-intro { grid-template-columns: 1fr; } }
.about-intro .prose p:first-of-type { font-size: 1.1875rem; color: var(--ink); }
.about-facts { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; position: sticky; top: 100px; }
.about-facts-title { font-family: var(--font-body); font-size: .8125rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 16px; }
.about-facts dl { margin: 0 0 24px; display: grid; gap: 16px; }
.about-facts dl div { border-left: 3px solid var(--gold); padding-left: 14px; }
.about-facts dt { font-size: .8125rem; font-weight: 600; color: var(--muted); }
.about-facts dd { margin: 2px 0 0; font-weight: 600; }

.about-vm { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: clamp(48px, 7vw, 88px) 0; }
.about-vm-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 24px; }
@media (max-width: 860px) { .about-vm-grid { grid-template-columns: 1fr; } }
.vm-card { border-radius: var(--radius-lg); padding: clamp(28px, 4vw, 44px); }
.vm-label { margin: 0 0 14px; font-size: .8125rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.vm-vision { background: var(--green-deep); color: #fff; display: flex; flex-direction: column; justify-content: center; }
.vm-vision .vm-label { color: var(--gold-light); }
.vm-vision-text { margin: 0; font-family: var(--font-head); font-weight: 700; font-size: clamp(1.75rem, 3.2vw, 2.375rem); line-height: 1.2; }
.vm-mision { background: #FAF6EA; border: 1px solid #EDE4C8; }
.vm-mision .vm-label { color: var(--green-text); }
.vm-mision-text { margin: 0; font-size: 1.125rem; line-height: 1.7; color: #3B4A3E; }

.about-next { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 700px) { .about-next { grid-template-columns: 1fr; } }
.about-next-card {
  display: flex; align-items: center; gap: 16px; padding: 22px 24px; border-radius: var(--radius-lg);
  background: #fff; border: 1px solid var(--line); color: var(--muted); text-decoration: none;
}
.about-next-card strong { color: var(--ink); font-size: 1.125rem; }
.about-next-card > .icon:last-child { margin-left: auto; color: var(--green-text); }
.about-next-card:hover { border-color: var(--green-text); color: var(--muted); }
.about-next-icon { flex: none; display: inline-flex; width: 52px; height: 52px; align-items: center; justify-content: center; border-radius: 50%; background: var(--green-deep); color: #fff; }

/* Contacto --------------------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 32px; align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 520px) { .contact-cards { grid-template-columns: 1fr; } }
.contact-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.contact-card .contact-icon { margin-bottom: 10px; }
.contact-label { margin: 0 0 2px; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.contact-value { margin: 0; font-weight: 600; font-size: .9375rem; color: var(--ink); text-decoration: none; line-height: 1.5; }
/* Correo y horarios en una sola línea cuando hay espacio. */
@media (min-width: 1000px) { .contact-email, .contact-hours .contact-value { white-space: nowrap; } }
a.contact-value:hover { color: var(--green-text); text-decoration: underline; }
.contact-email { overflow-wrap: normal; word-break: normal; }
.contact-link { margin-top: 8px; display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: .9375rem; text-decoration: none; }
.contact-link:hover { text-decoration: underline; }
.contact-icon { flex: none; display: inline-flex; width: 48px; height: 48px; align-items: center; justify-content: center; border-radius: 50%; background: var(--green-deep); color: #fff; }
.contact-grid .map-box.is-loaded { aspect-ratio: auto; height: 100%; min-height: 360px; border-radius: var(--radius-lg); border: 1px solid var(--line); }
.contact-grid { align-items: stretch; }
.map-box { border-radius: var(--radius-lg); border: 1px dashed var(--line); background: #fff; padding: 24px; text-align: center; color: var(--muted); min-height: 320px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.map-box.is-loaded { padding: 0; border: 0; overflow: hidden; display: block; aspect-ratio: 4 / 3; }
.map-box iframe { width: 100%; height: 100%; border: 0; display: block; }

/* Footer ----------------------------------------------------------------- */
.site-footer { background: var(--green-deep); color: #D3E2CD; padding-top: 56px; font-size: .9375rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 40px; }
@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand { display: flex; gap: 14px; align-items: flex-start; }
.footer-name { font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; color: #fff; margin: 0 0 4px; }
.footer-sub { margin: 0 0 8px; }
.footer-motto { font-style: italic; color: var(--gold-light); margin: 0; }
.footer-title { font-family: var(--font-body); font-size: .8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #fff; margin: 0 0 14px; }
.footer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-list li { display: flex; gap: 10px; align-items: flex-start; }
.footer-list .icon { margin-top: 3px; color: var(--gold-light); }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--gold-light); text-decoration: underline; }
.footer-hours { margin: 0 0 16px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 12px; background: rgba(255,255,255,.08); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 20px; padding-bottom: 28px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: .875rem; }
.footer-bottom p { margin: 0; }

.whatsapp-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 58px; height: 58px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; background: #1F8F4E; color: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.2);
}
.whatsapp-float:hover { background: #17733E; color: #fff; }

/* Impresión -------------------------------------------------------------- */
@media print {
  .aviso, .site-header, .site-footer, .whatsapp-float, .btn-row, .filters, .tabs { display: none !important; }
  body { background: #fff; }
  .tab-panel[hidden] { display: block !important; }
}
