/* Refinamiento de interiores. Cargar después de las hojas de cada módulo.
   Conserva rejillas, proporciones, índices sticky y controles existentes. */
:is(.about-page, .staff-presentation, .workshops-page, .courses-content, .documents-layout, .contact-grid, .contact-convivencia, .contact-socials) {
  --interior-blue: #174291;
  --interior-navy: #10264a;
  --interior-red: #cc1b29;
  --interior-line: #d3e0f0;
  --interior-shadow: 0 3px 8px #10264a06, 0 22px 45px -26px #10264a52;
}

/* Identidad: los cambios de superficie organizan la página larga. */
.about-page {
  background: linear-gradient(180deg, #f0f5fd, #fffefa 38%);
  border-top: 1px solid #e1e8f2;
}

.about-page .about-hero::before { background: #eaf1fb; }
.about-page .about-hero .eyebrow {
  padding: 6px 11px;
  border: 1px solid #cbdaf0;
  border-radius: 7px;
  color: #174291;
  background: #ffffffb8;
}

.about-page .about-intro-photo > img {
  border-color: #fff;
  box-shadow: 0 9px 25px #10264a0c, 0 35px 60px -32px #17429165;
}

.about-page .about-intro-photo figcaption {
  border: 1px solid #d6e2f2;
  border-top: 3px solid #174291;
}

.about-page .about-year {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 7px;
  background: #174291;
  color: #fff;
  font-size: .95rem;
  letter-spacing: 0;
}

.about-page .about-timeline li::before { background: #cc1b29; }
.about-page .about-timeline article > i { color: #174291; }
.about-page .about-timeline h3 { color: #10264a; }

.about-page .about-recognition {
  border-color: #d3e0f0;
  background: linear-gradient(120deg, #eaf1fb, #f5f8fd);
  box-shadow: var(--interior-shadow);
}

.about-page .about-badge {
  border-color: #d9e3f0;
  background: #fff;
  box-shadow: 0 3px 9px #10264a04, 0 12px 22px -16px #17429138;
}

.about-page .about-purpose {
  border-color: #285292;
  background: radial-gradient(ellipse at 100% 0, #2454a8, transparent 70%), linear-gradient(125deg, #10264a, #173f7e);
  box-shadow: 0 9px 20px #10264a0d, 0 30px 50px -30px #17429170;
}

.about-page .about-purpose .section-heading h2,
.about-page .about-purpose-card h3 { color: #fff; }
.about-page .about-purpose-card p { color: #e0e9f7; }
.about-page .about-purpose-card .about-icon {
  border: 1px solid #ffffff29;
  background: #ffffff17;
  color: #fff;
}

.about-page .about-seal {
  border-color: #d6e1ef;
  border-top: 4px solid #174291;
  background: #fff;
  box-shadow: var(--interior-shadow);
}

.about-page .about-seal:nth-child(even) { border-top-color: #cc1b29; }
.about-page .about-seal .about-icon { background: #174291; color: #fff; }
.about-page .about-seal:nth-child(even) .about-icon { background: #cc1b29; color: #fff; }
.about-page .about-seal h3 { color: #10264a; }

.about-page .about-values li {
  border-color: #dae4f1;
  border-left: 3px solid #174291;
  box-shadow: 0 3px 9px #10264a03;
}

.about-page .about-infrastructure-photo {
  border-color: #cbdaf0;
  box-shadow: 0 7px 20px #10264a09, 0 24px 40px -28px #17429165;
}

.about-page .about-hymn {
  border-color: #d3e0f0;
  background: #edf3fc;
  box-shadow: var(--interior-shadow);
}

.about-page .about-life-card {
  border-color: #d6e1ef;
  border-top: 3px solid #174291;
  box-shadow: var(--interior-shadow);
}

.about-page .about-life-card:nth-child(2) { border-top-color: #cc1b29; }
.about-page .about-life-action { color: #174291; }

/* Portadillas interiores; no afecta encabezado ni portada de noticias. */
main:is([data-page="cursos"], [data-page="documentos"], [data-page="cuenta-publica"], [data-page="contacto"], [data-page="equipos-trabajo"]) .inner-hero {
  border-bottom-color: #d4e0ef;
  background: radial-gradient(ellipse at 86% 0, #dce9fb, transparent 65%), linear-gradient(120deg, #fffefa, #f0f5fd);
}

.staff-heading h1,
.workshops-heading h1 { color: #174291; }
.staff-heading h1::after {
  width: 94px;
  height: 4px;
  background: linear-gradient(90deg, #cc1b29 0 66%, #d4e1f3 66%);
}

.staff-members-title { color: #10264a; }
.staff-group.staff-feature {
  border-color: #cbdaf0;
  box-shadow: 0 7px 19px #10264a08, 0 30px 48px -29px #17429165;
}

.staff-path {
  border-color: #d0dff1;
  box-shadow: var(--interior-shadow);
}

.staff-path-icon { border-color: #d7e3f3; background: #eaf1fc; }
.staff-path > .arrow { border-color: #cbdaf0; background: #edf3fc; }
.staff-portrait,
.courses-content a.course-person-card {
  border-color: #17429130;
  box-shadow: 0 5px 12px #10264a12, 0 24px 38px -23px #10264a65;
}

:is(.staff-presentation, main[data-page="equipos-trabajo"]) .area-card {
  border-color: #d2dff0;
  box-shadow: 0 5px 13px #10264a07, 0 23px 38px -26px #17429150;
}

/* Índices: activo inequívoco sin cambiar posición, tamaño ni desplazamiento. */
.courses-content .course-selector,
.documents-index {
  border-color: #c9d9ee;
  background: #fff;
  box-shadow: inset 0 3px #174291, 0 12px 28px -20px #10264a50;
}

.course-index-label,
.documents-index-label { color: #455e80; }
.courses-content .course-selector a.course-index-link[aria-current="location"],
.documents-index a.document-index-link[aria-current="location"] {
  background: #174291;
  color: #fff;
  box-shadow: inset 3px 0 #cc1b29;
}

.course-featured-photo-container {
  border-color: #c9d9ee;
  box-shadow: 0 6px 17px #10264a0c, 0 29px 45px -27px #17429165;
}

.course-cycle-ribbon {
  background: linear-gradient(110deg, #cc1b29, #ad1825);
  box-shadow: 0 5px 16px #10264a2b;
}

/* Documentos: metadatos, acciones y vista previa se leen como un conjunto. */
.doc-card {
  border-color: #d0def0;
  background: #fff;
  box-shadow: 0 5px 13px #10264a06, 0 24px 42px -27px #17429148;
}

.doc-card > .eyebrow { color: #174291; background: #eaf1fc; }
.doc-card > h2 { border-left-color: #cc1b29; }
.doc-card .doc-actions { border-color: #dae4f1; background: #f0f5fc; }
.doc-card .doc-viewer-tools { background: linear-gradient(110deg, #10264a, #174291); }
.doc-preview-surface { border-color: #cfdded; background: #e9eff7; }

/* Contacto: la atención y el mapa ganan una jerarquía compartida. */
.contact-panel {
  border-color: #d1dff0;
  border-top: 4px solid #174291;
  box-shadow: var(--interior-shadow);
}

.contact-panel > h2 { color: #10264a; }
.contact-panel .contact-icon { border: 1px solid #d3dff0; }
.contact-panel .contact-row:first-of-type .contact-icon { border-color: #cc1b29; background: #cc1b29; color: #fff; }
.contact-map { border-color: #d1dff0; box-shadow: var(--interior-shadow); }
.contact-map figcaption { border-top-color: #d2dff0; background: #edf3fc; }
.contact-map figcaption .text-link { font-weight: 700; }
.contact-convivencia {
  border-color: #285292;
  background: radial-gradient(ellipse at 100% 0, #2454a8, transparent 70%), linear-gradient(125deg, #10264a, #173f7e);
  box-shadow: 0 9px 20px #10264a0d, 0 30px 50px -30px #17429165;
}

.contact-convivencia p { color: #e0e9f7; }
.detail-content .contact-socials .family-card { border-color: #d1dff0; box-shadow: var(--interior-shadow); }

/* Talleres: se mantienen fotos completas, nombre del monitor y carrusel. */
.workshop-panel { border-color: #cfdded; box-shadow: var(--interior-shadow); }
.workshop-visual { background: linear-gradient(135deg, #e8f0fc, #f3f6fb); }
.workshop-panel .workshop-monitor div { border-color: #cddcf0; box-shadow: 0 5px 13px #10264a0b; }
.workshop-details h2 { color: #10264a; }
.workshop-bottom { border-top-color: #d5e1f1; }
.workshop-play { border-color: #c3d5ed; background: #e8f0fc; }
.workshop-dot[aria-pressed="true"] { background: #174291; }
.workshop-dot[aria-pressed="true"]::before { border-color: #fff; background: #fff; }

@media (hover: hover) and (pointer: fine) {
  .about-page .about-life-card:hover,
  :is(.staff-presentation, main[data-page="equipos-trabajo"]) .area-card:hover {
    border-color: #8dadd9;
    box-shadow: 0 6px 16px #10264a0d, 0 25px 38px -25px #17429165;
  }

  .courses-content .course-selector a.course-index-link:not([aria-current="location"]):hover,
  .documents-index a.document-index-link:not([aria-current="location"]):hover { background: #e7f0fd; color: #174291; }
  .workshop-play:hover { background: #dce9fc; border-color: #8aa9d7; }
}

@media (max-width: 900px) {
  .courses-content .course-selector,
  .documents-index { box-shadow: inset 0 2px #174291, 0 9px 19px -15px #10264a55; }
  .courses-content .course-selector a.course-index-link[aria-current="location"],
  .documents-index a.document-index-link[aria-current="location"] { box-shadow: inset 0 -3px #cc1b29; }
}

@media (max-width: 600px) {
  .about-page .about-year { font-size: .88rem; }
  .about-page .about-seal { border-top-width: 3px; }
  .contact-panel { border-top-width: 3px; }
  .staff-group.staff-feature { box-shadow: 0 5px 15px #10264a0d; }
  .staff-portrait,
  .courses-content a.course-person-card { box-shadow: 0 4px 12px #10264a18; }
}

@media (prefers-reduced-motion: reduce) {
  .about-page .about-life-card,
  .staff-path,
  .courses-content .course-selector a.course-index-link,
  .documents-index a.document-index-link,
  .workshop-play,
  .workshop-dot { transition: none; }
}
