/* =====================================================================
   AJUSTES.CSS  –  Colegio Psicopedagógico El Arte del Saber
   Correcciones de diseño + nuevas secciones (noviembre 2026).
   Se carga DESPUÉS de estilo.css / estilo_1.css / estilos9.css,
   por eso sus reglas tienen prioridad. Mantiene la paleta institucional:
   azul oscuro (#0b1b52 / darkblue / #1a237e), dorado (#FFD700) y blanco.
===================================================================== */

/* Fuente única para el texto de contenido (los títulos siguen en Rowdies) */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');

:root {
    --cas-azul-oscuro: #0b1b52;
    --cas-azul: #00008b;
    --cas-azul-medio: #1a237e;
    --cas-azul-claro: #51bcfa;
    --cas-dorado: #FFD700;
    --cas-dorado-suave: #ffe766;
    --cas-blanco: #ffffff;
    --cas-texto: #111827;
    --fuente-titulos: 'Rowdies', cursive;
    --fuente-texto: 'Nunito', 'Segoe UI', Roboto, Arial, sans-serif;
    --texto-tamano: clamp(1rem, 0.3vw + 0.92rem, 1.15rem);
}

/* =====================================================================
   TIPOGRAFÍA UNIFICADA EN TODAS LAS PÁGINAS
   Antes se mezclaban Times New Roman (25px), Chelsea Market y Arial.
   Ahora: títulos en Rowdies y todo el texto de contenido en Nunito,
   con el mismo tamaño, interlineado y color.
===================================================================== */
body p,
body li,
body td,
body th,
body label,
body input,
body textarea,
body select,
.inscripcion-lead,
.gallery-subtitle,
.gallery-item .caption,
.candidate-names,
.info-item p,
.info-item ul li,
.container-nosotros8 ul,
.ruta-title,
.ruta-subtitle,
.ruta-docs li a {
    font-family: var(--fuente-texto);
}

body p {
    font-size: var(--texto-tamano);
    line-height: 1.7;
    color: #1f2937;
}

/* Párrafos y listas de las páginas internas */
.container-project p,
.container-nosotros p,
.container-nosotros2 p,
.container-nosotros3 p,
.container-nosotros4 p,
.container-nosotros6 p,
.container-nosotros7 p,
.container-nosotros8 ul,
.container-nosotros8 li {
    font-size: var(--texto-tamano);
    font-weight: 400;
    line-height: 1.75;
    color: #1f2937;
    text-align: justify;
    hyphens: auto;
}

.container-nosotros8 ul {
    margin-left: 0;
    padding-left: 22px;
}

.container-nosotros8 li {
    margin-bottom: 6px;
}

/* Subtítulos de las secciones con el mismo tamaño en todas las páginas */
.sub-title-nosotros,
.sub-title-project,
.container-project h2,
.container-project h1.sub-title-project,
.ruta-title {
    font-family: var(--fuente-titulos);
    font-size: clamp(1.5rem, 2.6vw, 2.2rem);
    line-height: 1.25;
    color: var(--cas-azul);
}

.ruta-subtitle {
    font-size: 0.95rem;
    color: #475569;
}

.ruta-docs li a {
    font-size: 1rem;
    font-weight: 600;
}

/* Títulos grandes de sección (Opiniones, Páginas de Interés, Cronograma...) */
h2.title {
    font-size: clamp(1.9rem, 4.5vw, 3.6rem);
    line-height: 1.2;
    padding: 0 16px;
}

/* Galería: título de la página */
main > h1 {
    font-size: clamp(1.8rem, 4vw, 3rem);
    margin: 24px 16px 12px;
}

/* Pie de página */
.content-foo p {
    font-family: var(--fuente-texto);
}

.final-title {
    font-family: var(--fuente-titulos);
}

/* Formulario de contacto */
form input[type="text"],
form input[type="email"],
form textarea {
    font-family: var(--fuente-texto);
    font-size: 1rem;
}

@media (max-width: 768px) {
    .container-project p,
    .container-nosotros p,
    .container-nosotros2 p,
    .container-nosotros3 p,
    .container-nosotros4 p,
    .container-nosotros6 p,
    .container-nosotros7 p,
    .container-nosotros8 ul,
    .container-nosotros8 li,
    .cards .card > .container-text-card p {
        text-align: left;
    }
}

/* ---------- Base: evita desbordes horizontales (sobre todo en celular) ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    overflow-x: hidden;
    /* "clip" evita el desborde sin romper position: sticky (navegadores modernos) */
    overflow-x: clip;
}

/* Footer siempre al final de la pantalla aunque la página sea corta */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body > footer {
    margin: auto 0 0;
    width: 100%;
}

img {
    max-width: 100%;
}

/* Imágenes que no cargan (ajustes.js les agrega esta clase) */
.img-rota {
    display: none !important;
}

/* ---------- Slogan: que no se monte sobre los títulos ---------- */
.slogan p {
    margin: 28px 16px 12px;
    font-size: clamp(1rem, 2vw, 1.7rem);
    line-height: 1.35;
}

/* ---------- Títulos de páginas internas (se salían por la derecha) ---------- */
.title-project,
.title-nosotros {
    width: calc(100% - 32px);
    max-width: 1000px;
    margin: 24px auto 10px;
    padding: clamp(24px, 4vw, 48px) 20px;
    font-size: clamp(2rem, 5vw, 3.6rem);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.container-project {
    width: calc(100% - 32px);
    border-radius: 20px;
    margin-left: auto;
    margin-right: auto;
}

.container-nosotros,
.container-nosotros2,
.container-nosotros3,
.container-nosotros4,
.container-nosotros6,
.container-nosotros7,
.container-nosotros8,
.container-nosotros9 {
    width: calc(100% - 32px);
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    .container-project,
    .container-nosotros,
    .container-nosotros2,
    .container-nosotros3,
    .container-nosotros4,
    .container-nosotros6,
    .container-nosotros7,
    .container-nosotros8,
    .container-nosotros9 {
        padding: 24px 18px;
    }

    .container-project img,
    .container-nosotros img,
    .container-nosotros2 img,
    .container-nosotros3 img,
    .container-nosotros4 img,
    .container-nosotros6 img,
    .container-nosotros8 img {
        float: none;
        display: block;
        width: 100%;
        max-width: 360px;
        height: auto;
        margin: 0 auto 12px;
    }
}

/* ---------- Cronograma: visor centrado ---------- */
.cronograma2023 iframe {
    display: block;
    width: min(1000px, calc(100% - 32px));
    height: 75vh;
    margin: 0 auto 40px;
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

/* ---------- Títulos de tarjetas (Personería, etc.) ---------- */
h2.gallery-title,
.gallery-title {
    font-size: clamp(1.7rem, 4.2vw, 3.2rem);
    line-height: 1.2;
}

.gallery-subtitle {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
}

.inscripcion-container {
    padding: 40px 16px;
}

.inscripcion-content {
    padding: clamp(22px, 4vw, 40px);
    border-radius: 20px;
}

/* =====================================================================
   BARRA LATERAL – pulso animado en TODOS los íconos, cada uno con su
   color, en forma de ola (uno detrás de otro)
===================================================================== */
.BarraLateral ul li a {
    --pulso: 255, 255, 255;
    animation: iconoPulso 2.8s ease-out infinite;
}

.BarraLateral ul li:nth-child(1) a { animation-delay: 0s; }
.BarraLateral ul li:nth-child(2) a { animation-delay: 0.35s; }
.BarraLateral ul li:nth-child(3) a { animation-delay: 0.7s; }
.BarraLateral ul li:nth-child(4) a { animation-delay: 1.05s; }
.BarraLateral ul li:nth-child(5) a { animation-delay: 1.4s; }
.BarraLateral ul li:nth-child(6) a { animation-delay: 1.75s; }
.BarraLateral ul li:nth-child(7) a { animation-delay: 2.1s; }
.BarraLateral ul li:nth-child(8) a { animation-delay: 2.45s; }

.BarraLateral ul li .icon-akademik   { --pulso: 34, 197, 94; }
.BarraLateral ul li .icon-robotica   { --pulso: 6, 182, 212; }
.BarraLateral ul li .icon-notisaber  { --pulso: 99, 102, 241; }
.BarraLateral ul li .icon-circulares { --pulso: 239, 68, 68; }
.BarraLateral ul li .icon-galeria    { --pulso: 251, 191, 36; }
.BarraLateral ul li .icon-cronograma { --pulso: 168, 85, 247; }
.BarraLateral ul li .icon-facebook   { --pulso: 59, 130, 246; }
.BarraLateral ul li .icon-whatsapp   { --pulso: 37, 211, 102; }

.BarraLateral ul li .icon-whatsapp {
    border-color: rgba(37, 211, 102, 0.8);
}

.BarraLateral ul li .icon-whatsapp img {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    filter: none;
}

/* ---------- Efecto al pasar el cursor (hover) ----------
   1. El círculo da un pequeño rebote elástico (sin salirse de la barra).
   2. Se rellena con un degradado del color propio del ícono y brilla.
   3. Un destello de luz cruza el círculo en diagonal.
   4. La imagen se balancea y crece un poco.
   5. Aparece una etiqueta con el nombre (la crea ajustes.js).          */
.BarraLateral ul li a::after {
    content: '';
    position: absolute;
    top: -30%;
    left: -120%;
    width: 60%;
    height: 160%;
    background: linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, 0.75) 50%, transparent 100%);
    transform: rotate(18deg);
    pointer-events: none;
    opacity: 0;
}

.BarraLateral ul li a[class]:hover,
.BarraLateral ul li a[class]:focus-visible {
    animation: iconoRebote 0.55s cubic-bezier(.34, 1.56, .64, 1) forwards;
    border-color: rgba(var(--pulso), 1);
    background: radial-gradient(circle at 50% 35%,
                rgba(var(--pulso), 0.55) 0%,
                rgba(var(--pulso), 0.22) 60%,
                rgba(var(--pulso), 0.1) 100%);
    box-shadow: 0 0 0 2px rgba(var(--pulso), 0.55),
                0 0 16px 2px rgba(var(--pulso), 0.7),
                inset 0 1px 0 rgba(255, 255, 255, 0.5);
    outline: none;
}

.BarraLateral ul li a:hover::after,
.BarraLateral ul li a:focus-visible::after {
    animation: iconoDestello 0.7s ease-out forwards;
}

.BarraLateral ul li a:hover img,
.BarraLateral ul li a:focus-visible img {
    animation: iconoBalanceo 0.6s ease-in-out forwards;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
}

.BarraLateral ul li a:active {
    transform: scale(0.94);
}

@keyframes iconoRebote {
    0%   { transform: scale(1); }
    45%  { transform: scale(1.16); }
    70%  { transform: scale(1.06); }
    100% { transform: scale(1.12); }
}

@keyframes iconoDestello {
    0%   { left: -120%; opacity: 0; }
    20%  { opacity: 1; }
    100% { left: 140%; opacity: 0; }
}

@keyframes iconoBalanceo {
    0%   { transform: rotate(0) scale(1); }
    25%  { transform: rotate(-12deg) scale(1.12); }
    50%  { transform: rotate(9deg) scale(1.15); }
    75%  { transform: rotate(-4deg) scale(1.13); }
    100% { transform: rotate(0) scale(1.12); }
}

/* Etiqueta con el nombre del ícono (se muestra a la derecha de la barra) */
.barra-etiqueta {
    position: fixed;
    z-index: 10001;
    padding: 7px 14px 7px 12px;
    font-family: var(--fuente-titulos);
    font-size: 0.85rem;
    color: #ffffff;
    white-space: nowrap;
    background: rgba(11, 27, 82, 0.95);
    border: 1px solid rgba(var(--pulso, 255, 215, 0), 0.9);
    border-left: 4px solid rgba(var(--pulso, 255, 215, 0), 1);
    border-radius: 0 999px 999px 0;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35), 0 0 12px rgba(var(--pulso, 255, 215, 0), 0.35);
    pointer-events: none;
    opacity: 0;
    transform: translate(-10px, -50%);
    transition: opacity 0.2s ease, transform 0.25s cubic-bezier(.34, 1.56, .64, 1);
}

.barra-etiqueta.visible {
    opacity: 1;
    transform: translate(0, -50%);
}

/* En pantallas táctiles no hay cursor: no se muestra la etiqueta */
@media (hover: none) {
    .barra-etiqueta {
        display: none;
    }
}

@keyframes iconoPulso {
    0%   { box-shadow: 0 0 0 0 rgba(var(--pulso), 0.6), 0 3px 12px rgba(0, 0, 0, 0.25); }
    70%  { box-shadow: 0 0 0 7px rgba(var(--pulso), 0), 0 3px 12px rgba(0, 0, 0, 0.25); }
    100% { box-shadow: 0 0 0 0 rgba(var(--pulso), 0), 0 3px 12px rgba(0, 0, 0, 0.25); }
}

/* La barra recortaba el aro del pulso por los lados */
.BarraLateral {
    padding-left: 8px;
    padding-right: 8px;
}

/* En celular los íconos no se achicaban porque min-width: 44px lo impedía */
@media (max-width: 600px) {
    .BarraLateral ul li a {
        width: 38px;
        height: 38px;
        min-width: 38px;
        min-height: 38px;
    }

    .BarraLateral ul li a img {
        width: 24px;
        height: 24px;
        min-width: 24px;
        min-height: 24px;
    }
}

/* Hueco vacío sobre el carrusel en tablet/celular */
@media (max-width: 992px) {
    .holayo {
        padding-top: 0;
        margin-top: 84px;
    }
}

@media (max-width: 480px) {
    .BarraLateral ul li .icon-whatsapp img {
        width: 26px;
        height: 26px;
        min-width: 26px;
        min-height: 26px;
    }
}

/* =====================================================================
   LOGO CAS con rotación (reemplaza al logo PSE). Solo decorativo:
   no es un enlace ni lleva texto.
===================================================================== */
.pse.logo-cas {
    position: fixed;
    right: 16px;
    top: auto;
    bottom: 96px;
    width: auto;
    z-index: 9990;
    perspective: 700px;
    pointer-events: none;
}

.pse.logo-cas .cas-moneda {
    width: clamp(86px, 7.5vw, 116px);
    height: clamp(86px, 7.5vw, 116px);
    border-radius: 50%;
    animation: casGiro 3.2s linear infinite;
    transform-style: preserve-3d;
    will-change: transform;
}

.pse.logo-cas img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    border: 3px solid var(--cas-dorado);
    box-shadow: 0 0 0 3px rgba(11, 27, 82, 0.85),
                0 8px 24px rgba(0, 0, 0, 0.45),
                0 0 22px rgba(81, 188, 250, 0.55);
}

/* Giro tipo moneda: a ±90° el logo queda de canto (invisible), así el
   salto del final al inicio no se nota y el logo siempre se lee bien. */
@keyframes casGiro {
    from { transform: rotateY(-90deg); }
    to   { transform: rotateY(90deg); }
}

/* En celular antes se ocultaba; ahora se muestra más pequeño */
@media (max-width: 768px) {
    .pse.logo-cas {
        display: block;
        right: 10px;
        bottom: 70px;
        top: auto;
        width: auto;
    }

    .pse.logo-cas .cas-moneda {
        width: 58px;
        height: 58px;
    }
}

/* =====================================================================
   PAGO CON CÓDIGO QR – botón flotante (todas las páginas), bloque en
   Matrículas y ventana con el QR en grande
===================================================================== */
.btn-qr-flotante {
    position: fixed;
    right: 16px;
    bottom: 20px;
    z-index: 9991;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px 10px 12px;
    font-family: 'Rowdies', cursive;
    font-size: 0.95rem;
    color: var(--cas-azul-oscuro);
    background: linear-gradient(135deg, var(--cas-dorado) 0%, var(--cas-dorado-suave) 100%);
    border: 2px solid rgba(11, 27, 82, 0.85);
    border-radius: 999px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    animation: qrLlamado 2.6s ease-out infinite;
    transition: transform 0.25s ease;
}

.btn-qr-flotante:hover,
.btn-qr-flotante:focus-visible {
    transform: translateY(-3px) scale(1.04);
    animation-play-state: paused;
}

.btn-qr-flotante svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

@keyframes qrLlamado {
    0%   { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.6), 0 8px 22px rgba(0, 0, 0, 0.4); }
    70%  { box-shadow: 0 0 0 12px rgba(255, 215, 0, 0), 0 8px 22px rgba(0, 0, 0, 0.4); }
    100% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0), 0 8px 22px rgba(0, 0, 0, 0.4); }
}

@media (max-width: 768px) {
    .btn-qr-flotante {
        right: 10px;
        bottom: 12px;
        padding: 8px 14px 8px 10px;
        font-size: 0.8rem;
    }

    .btn-qr-flotante svg {
        width: 20px;
        height: 20px;
    }
}

/* Bloque de pago dentro de Matrículas */
.pago-qr-bloque {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(18px, 4vw, 40px);
    flex-wrap: wrap;
    max-width: 820px;
    margin: 36px auto 0;
    padding: 22px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 6px solid var(--cas-dorado);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
    text-align: left;
}

.pago-qr-miniatura {
    width: 150px;
    padding: 0;
    border: 3px solid var(--cas-azul-oscuro);
    border-radius: 14px;
    overflow: hidden;
    background: #2b2b2b;
    cursor: zoom-in;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.pago-qr-miniatura:hover {
    transform: scale(1.05) rotate(-1deg);
}

.pago-qr-miniatura img {
    display: block;
    width: 100%;
    height: auto;
}

.pago-qr-texto {
    flex: 1 1 260px;
}

.pago-qr-texto h3 {
    font-family: 'Rowdies', cursive;
    font-size: clamp(1.15rem, 2vw, 1.5rem);
    color: var(--cas-azul);
    margin-bottom: 8px;
}

.matricula-content .pago-qr-texto p {
    font-family: var(--fuente-texto);
    font-size: 1rem;
    line-height: 1.5;
    color: var(--cas-texto);
    margin: 0 0 6px;
}

.matricula-content .pago-qr-texto .pago-qr-llave strong {
    font-family: 'Rowdies', cursive;
    color: var(--cas-azul-oscuro);
    letter-spacing: 1px;
}

.btn-qr {
    margin-top: 10px;
    display: inline-block;
    padding: 10px 24px;
    font-family: 'Rowdies', cursive;
    font-size: 0.95rem;
    color: var(--cas-dorado);
    background: var(--cas-azul-oscuro);
    border: 2px solid var(--cas-dorado);
    border-radius: 999px;
    cursor: pointer;
    transition: transform 0.25s ease;
}

.btn-qr:hover {
    transform: translateY(-2px);
}

@media (max-width: 600px) {
    .pago-qr-bloque {
        text-align: center;
    }
}

/* Ventana con el QR */
.qr-modal {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(5, 10, 40, 0.9);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.qr-modal.abierto {
    opacity: 1;
    visibility: visible;
}

.qr-modal-caja {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: min(420px, 100%);
    max-height: calc(100vh - 32px);
    padding: 22px 20px 20px;
    border-radius: 22px;
    background: #ffffff;
    border-top: 6px solid var(--cas-dorado);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
    text-align: center;
    transform: translateY(14px) scale(0.97);
    transition: transform 0.25s ease;
}

.qr-modal.abierto .qr-modal-caja {
    transform: none;
}

.qr-modal-caja h2 {
    font-family: 'Rowdies', cursive;
    font-size: 1.35rem;
    color: var(--cas-azul);
    margin: 0;
}

.qr-modal-caja img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: calc(100vh - 250px);
    min-height: 0;
    border-radius: 12px;
    object-fit: contain;
}

.qr-modal-caja p {
    font-family: var(--fuente-texto);
    font-size: 0.95rem;
    line-height: 1.4;
    color: var(--cas-texto);
    margin: 0;
}

.qr-modal-acciones {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.qr-modal-acciones a,
.qr-modal-acciones button.qr-copiar {
    display: inline-block;
    padding: 9px 18px;
    font-family: 'Rowdies', cursive;
    font-size: 0.85rem;
    text-decoration: none;
    border-radius: 999px;
    cursor: pointer;
}

.qr-modal-acciones button.qr-copiar {
    color: var(--cas-azul-oscuro);
    background: var(--cas-dorado);
    border: 2px solid var(--cas-dorado);
}

.qr-modal-acciones a {
    color: var(--cas-dorado);
    background: var(--cas-azul-oscuro);
    border: 2px solid var(--cas-azul-oscuro);
}

.qr-modal-cerrar {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 42px;
    height: 42px;
    border: 2px solid var(--cas-dorado);
    border-radius: 50%;
    background: var(--cas-azul-oscuro);
    color: var(--cas-dorado);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

@media (max-width: 480px) {
    .qr-modal-cerrar {
        top: 6px;
        right: 6px;
    }

    .qr-modal-caja h2 {
        font-size: 1.1rem;
        padding: 0 40px;
    }
}

/* =====================================================================
   MENÚ SUPERIOR – el submenú ya no se cierra al bajar el cursor
   (antes había un espacio de 8px entre la opción y el submenú)
===================================================================== */
@media (min-width: 993px) {
    .object li ul {
        display: block;
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
        animation: none;
        transform: translateX(-50%) translateY(-6px);
        /* al salir espera un momento antes de ocultarse */
        transition: opacity 0.2s ease 0.25s,
                    transform 0.2s ease 0.25s,
                    visibility 0s linear 0.45s;
    }

    .object li:hover > ul,
    .object li:focus-within > ul {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
        transform: translateX(-50%) translateY(0);
        transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s;
    }

    /* Puente invisible que cubre el espacio entre la opción y el submenú */
    .object li ul::before {
        content: '';
        position: absolute;
        left: -10px;
        right: -10px;
        top: -16px;
        height: 16px;
    }
}

/* =====================================================================
   MATRÍCULAS ABIERTAS 2027
===================================================================== */
.matricula-container {
    padding: 36px 16px 10px;
}

.matricula-content {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: clamp(26px, 4vw, 50px) clamp(16px, 4vw, 50px);
    border-radius: 24px;
    text-align: center;
    color: var(--cas-blanco);
    background:
        radial-gradient(circle at 12% 18%, rgba(255, 215, 0, 0.22), transparent 40%),
        radial-gradient(circle at 88% 82%, rgba(81, 188, 250, 0.22), transparent 42%),
        linear-gradient(135deg, var(--cas-azul-oscuro) 0%, var(--cas-azul-medio) 55%, #0d2a8a 100%);
    border: 2px solid rgba(255, 215, 0, 0.55);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

.matricula-badge {
    display: inline-block;
    font-family: 'Rowdies', cursive;
    font-size: clamp(0.85rem, 1.2vw, 1rem);
    color: var(--cas-azul-oscuro);
    background: var(--cas-dorado);
    padding: 6px 20px;
    border-radius: 999px;
    box-shadow: 0 4px 14px rgba(255, 215, 0, 0.4);
    animation: matriculaLatido 2.2s ease-in-out infinite;
}

@keyframes matriculaLatido {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.07); }
}

.matricula-title {
    font-family: 'Rowdies', cursive;
    font-size: clamp(2rem, 5.2vw, 4rem);
    line-height: 1.1;
    color: var(--cas-dorado);
    margin: 16px 0 8px;
    text-shadow: 3px 3px 0 var(--cas-azul), 0 8px 20px rgba(0, 0, 0, 0.45);
}

.matricula-content p.matricula-subtitle {
    font-family: var(--fuente-texto);
    font-size: clamp(1rem, 1.6vw, 1.3rem);
    color: var(--cas-blanco);
    margin: 0 0 30px;
}

.matricula-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    max-width: 1000px;
    margin: 0 auto 34px;
}

.matricula-dato {
    background: rgba(255, 255, 255, 0.96);
    border-radius: 18px;
    padding: 22px 18px;
    border-bottom: 6px solid var(--cas-dorado);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.matricula-dato:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.3);
}

.matricula-icono {
    display: block;
    font-size: 2.3rem;
    line-height: 1;
    margin-bottom: 8px;
}

.matricula-dato h3 {
    font-family: 'Rowdies', cursive;
    font-size: 1.15rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--cas-azul);
    margin-bottom: 6px;
}

.matricula-content .matricula-dato p {
    font-family: var(--fuente-texto);
    font-size: clamp(1.05rem, 1.6vw, 1.35rem);
    line-height: 1.4;
    color: var(--cas-azul-oscuro);
    margin: 0;
}

.matricula-galeria {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 26px;
    align-items: center;
    max-width: 980px;
    margin: 0 auto;
}

.matricula-poster {
    position: relative;
    display: block;
    padding: 8px;
    border-radius: 20px;
    background: var(--cas-blanco);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    cursor: zoom-in;
}

.matricula-poster img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 14px;
}

.matricula-poster:hover {
    transform: translateY(-8px) rotate(-0.6deg);
    box-shadow: 0 22px 44px rgba(0, 0, 0, 0.5);
}

.matricula-poster-label {
    position: absolute;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    font-family: 'Rowdies', cursive;
    font-size: 0.9rem;
    color: var(--cas-dorado);
    background: rgba(11, 27, 82, 0.92);
    padding: 6px 16px;
    border-radius: 999px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.matricula-poster-label::before {
    content: '🔍 ';
}

.matricula-poster:hover .matricula-poster-label {
    opacity: 1;
}

.matricula-acciones {
    margin-top: 30px;
}

.btn-matricula {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Rowdies', cursive;
    font-size: clamp(0.95rem, 1.5vw, 1.2rem);
    color: var(--cas-azul-oscuro);
    background: linear-gradient(135deg, var(--cas-dorado) 0%, var(--cas-dorado-suave) 100%);
    padding: 14px 30px;
    border-radius: 999px;
    text-decoration: none;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-matricula img {
    width: 28px;
    height: 28px;
}

.btn-matricula:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

/* =====================================================================
   PERSONERA Y PERSONERITO 2026
===================================================================== */
.personeria-card {
    display: grid;
    grid-template-columns: minmax(240px, 360px) 1fr;
    gap: clamp(20px, 4vw, 40px);
    align-items: center;
    max-width: 900px;
    margin: 10px auto 0;
}

.personeria-foto {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    border: 5px solid var(--cas-blanco);
    box-shadow: 0 0 0 3px var(--cas-dorado), 0 16px 32px rgba(0, 0, 0, 0.3);
}

.personeria-foto img {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.personeria-foto:hover img {
    transform: scale(1.05);
}

.personeria-numero {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 62px;
    height: 62px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Rowdies', cursive;
    font-size: 1.8rem;
    color: var(--cas-dorado);
    background: var(--cas-azul);
    border: 3px solid var(--cas-dorado);
    border-radius: 50%;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.personeria-info {
    text-align: left;
}

.personeria-etiqueta {
    display: inline-block;
    font-family: 'Rowdies', cursive;
    font-size: 1rem;
    color: var(--cas-azul-oscuro);
    background: var(--cas-dorado);
    padding: 6px 18px;
    border-radius: 999px;
    margin-bottom: 18px;
}

.personeria-rol {
    background: rgba(17, 5, 68, 0.05);
    border-left: 5px solid var(--cas-azul);
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 14px;
}

.personeria-rol span {
    display: block;
    font-family: 'Rowdies', cursive;
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--cas-azul);
    margin-bottom: 4px;
}

.personeria-rol strong {
    font-family: var(--fuente-texto);
    font-weight: normal;
    font-size: clamp(1.1rem, 1.8vw, 1.4rem);
    color: var(--cas-texto);
}

.personeria-content p.personeria-texto {
    font-family: var(--fuente-texto);
    font-size: 1rem;
    line-height: 1.6;
    color: #37474f;
    margin-top: 6px;
}

@media (max-width: 720px) {
    .personeria-card {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .personeria-foto {
        max-width: 340px;
    }

    .personeria-info {
        text-align: center;
        width: 100%;
    }
}

/* =====================================================================
   OPINIONES DE ESTUDIANTES (texto diminuto y tarjetas desiguales)
===================================================================== */
.cards {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 28px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px 50px;
}

.cards .card {
    flex: 1 1 300px;
    width: auto;
    max-width: 380px;
    margin: 70px 0 0;
    padding: 0 0 22px;
    text-align: center;
    background: rgba(255, 255, 255, 0.93);
    border-radius: 20px;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s ease;
}

.cards .card:hover {
    transform: translateY(-6px);
}

.cards .card img {
    width: 130px;
    height: 130px;
    margin: -65px auto 14px;
    border: 4px solid var(--cas-blanco);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.container-text-card h2 {
    font-size: 1.05rem !important;
    line-height: 1.35;
    color: var(--cas-blanco);
    background: var(--cas-azul);
    padding: 10px 14px;
    margin: 0 18px 14px;
    border-radius: 12px;
}

.cards .card > .container-text-card p {
    font-size: 1.02rem !important;
    line-height: 1.6;
    text-align: justify;
    color: var(--cas-texto);
    background: none;
    padding: 0 22px;
}

@media (max-width: 992px) {
    .cards {
        flex-direction: row;
        align-items: stretch;
    }

    .cards .card {
        width: auto;
        max-width: 520px;
        margin: 70px 0 0;
    }
}

/* =====================================================================
   PÁGINAS DE INTERÉS
===================================================================== */
.service-cont {
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.service-ind {
    flex: 1 1 160px;
    max-width: 220px;
}

@media (min-width: 993px) {
    .service-ind h3 {
        font-size: clamp(0.85rem, 1.1vw, 1.05rem);
    }
}

/* =====================================================================
   FOOTER (tamaños de texto legibles)
===================================================================== */
@media (min-width: 993px) {
    .content-foo h4 {
        font-size: clamp(1.1rem, 1.8vw, 1.6rem);
    }

    .content-foo p {
        font-size: clamp(0.95rem, 1.3vw, 1.2rem);
    }

    .final-title {
        font-size: clamp(0.8rem, 1vw, 1rem);
    }
}

/* =====================================================================
   VISOR DE IMÁGENES (afiches de matrícula)
===================================================================== */
.visor-cas {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(5, 10, 40, 0.92);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.visor-cas.abierto {
    opacity: 1;
    visibility: visible;
}

.visor-cas img {
    max-width: min(900px, 100%);
    max-height: 90vh;
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.visor-cas button {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 46px;
    height: 46px;
    border: 2px solid var(--cas-dorado);
    border-radius: 50%;
    background: var(--cas-azul-oscuro);
    color: var(--cas-dorado);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}

/* ---------- Accesibilidad: menos movimiento si el usuario lo pide ---------- */
@media (prefers-reduced-motion: reduce) {
    .pse.logo-cas .cas-moneda,
    .matricula-badge,
    .btn-qr-flotante,
    .BarraLateral ul li a {
        animation: none !important;
    }
}

/* =====================================================================
   NOSOTROS – ORGANIGRAMA centrado y ampliable
===================================================================== */
.container-nosotros9 {
    text-align: center;
}

.organigrama-marco {
    position: relative;
    display: block;
    width: 100%;
    max-width: 900px;
    margin: 10px auto 0;
    padding: 10px;
    background: #ffffff;
    border-radius: 18px;
    border: 3px solid rgba(0, 0, 139, 0.15);
    box-shadow: 0 12px 30px rgba(11, 27, 82, 0.18);
    cursor: zoom-in;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.organigrama-marco:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 38px rgba(11, 27, 82, 0.26);
}

.container-nosotros9 .organigrama-img,
.container-nosotros9 .organigrama-img:hover {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: 10px;
    transform: none;
}

.organigrama-ampliar {
    position: absolute;
    right: 18px;
    bottom: 18px;
    padding: 6px 14px;
    font-family: var(--fuente-texto);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--cas-dorado);
    background: rgba(11, 27, 82, 0.9);
    border-radius: 999px;
    opacity: 0.85;
    transition: opacity 0.25s ease;
}

.organigrama-marco:hover .organigrama-ampliar {
    opacity: 1;
}

@media (max-width: 600px) {
    .organigrama-marco {
        padding: 6px;
    }

    .organigrama-ampliar {
        right: 10px;
        bottom: 10px;
        font-size: 0.75rem;
    }
}

/* Valores: los <br> entre ítems dejaban espacios dobles */
.container-nosotros8 ul br {
    display: none;
}

.container-nosotros8 li {
    margin-bottom: 12px;
}

/* =====================================================================
   NOSOTROS Y PROYECTO EDUCATIVO – REDISEÑO
   Bloques foto + texto, tarjetas, galerías y animaciones de imágenes.
===================================================================== */
html {
    scroll-behavior: smooth;
}

.cas-pagina {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 16px 50px;
}

.cas-pagina > * + * {
    margin-top: 44px;
}

/* Al saltar desde el menú, que el título no quede debajo de la barra fija */
.cas-pagina [id],
.cas-pagina a[name] {
    scroll-margin-top: 110px;
}

/* ---------- Bloque base ---------- */
.cas-bloque {
    position: relative;
    display: flex;
    align-items: center;
    gap: clamp(22px, 4vw, 48px);
    padding: clamp(22px, 4vw, 46px);
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    border-bottom: 5px solid var(--cas-dorado);
    box-shadow: 0 16px 40px rgba(11, 27, 82, 0.2);
}

.cas-bloque--invertido {
    flex-direction: row-reverse;
}

.cas-bloque--texto {
    display: block;
}

.cas-bloque > .cas-foto {
    flex: 0 0 42%;
    max-width: 42%;
    /* marco dorado desplazado detrás de la foto */
    box-shadow: 14px 14px 0 -2px rgba(255, 215, 0, 0.9),
                0 14px 30px rgba(11, 27, 82, 0.28);
}

.cas-bloque--invertido > .cas-foto {
    box-shadow: -14px 14px 0 -2px rgba(255, 215, 0, 0.9),
                0 14px 30px rgba(11, 27, 82, 0.28);
}

.cas-texto {
    flex: 1;
    min-width: 0;
}

.cas-icono {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-bottom: 12px;
    font-size: 1.65rem;
    line-height: 1;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--cas-azul-oscuro), var(--cas-azul-medio));
    border: 2px solid var(--cas-dorado);
    box-shadow: 0 8px 18px rgba(11, 27, 82, 0.3);
}

.cas-subtitulo {
    position: relative;
    margin: 0 0 18px;
    padding-bottom: 12px;
    font-family: var(--fuente-titulos);
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    line-height: 1.2;
    color: var(--cas-azul);
}

.cas-subtitulo::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 70px;
    height: 4px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--cas-dorado), var(--cas-azul-claro));
}

.cas-subtitulo-2 {
    margin: 36px 0 16px;
    font-family: var(--fuente-titulos);
    font-size: clamp(1.3rem, 2.2vw, 1.7rem);
    color: var(--cas-azul);
}

.cas-texto p {
    margin: 0 0 14px;
    text-align: justify;
    hyphens: auto;
}

.cas-texto p:last-child {
    margin-bottom: 0;
}

.cas-pagina p.cas-bajada {
    margin-top: -8px;
    font-family: var(--fuente-titulos);
    font-size: clamp(1.1rem, 1.8vw, 1.35rem);
    color: var(--cas-azul-medio);
    text-align: left;
}

/* ---------- Fotos: marco, zoom suave y lupa al pasar el cursor ---------- */
.cas-foto {
    position: relative;
    display: block;
    overflow: hidden;
    isolation: isolate;
    aspect-ratio: 4 / 3;
    border-radius: 18px;
    background: #e8eef9;
    box-shadow: 0 12px 28px rgba(11, 27, 82, 0.25);
    cursor: zoom-in;
    transition: transform 0.45s cubic-bezier(.2, .8, .2, 1), box-shadow 0.45s ease;
}

.cas-foto img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 35%;
    transition: transform 0.9s cubic-bezier(.2, .8, .2, 1), filter 0.5s ease;
}

.cas-foto::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, transparent 40%, rgba(11, 27, 82, 0.6) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.cas-foto::after {
    content: '\1F50D';
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    font-size: 1.35rem;
    border-radius: 50%;
    background: rgba(255, 215, 0, 0.95);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.4);
    transition: opacity 0.3s ease, transform 0.4s cubic-bezier(.34, 1.56, .64, 1);
}

.cas-foto:hover,
.cas-foto:focus-visible {
    transform: translateY(-6px);
}

.cas-foto:hover img,
.cas-foto:focus-visible img {
    transform: scale(1.08);
    filter: saturate(1.1);
}

.cas-foto:hover::before,
.cas-foto:focus-visible::before {
    opacity: 1;
}

.cas-foto:hover::after,
.cas-foto:focus-visible::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.cas-foto:focus-visible {
    outline: 3px solid var(--cas-dorado);
    outline-offset: 4px;
}

/* ---------- Lista con viñetas de verificación ---------- */
.cas-lista-check {
    list-style: none;
    display: grid;
    gap: 12px;
    margin: 6px 0 0;
    padding: 0;
}

.cas-bloque--texto .cas-lista-check {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cas-lista-check li {
    position: relative;
    padding: 14px 16px 14px 54px;
    font-size: var(--texto-tamano);
    line-height: 1.6;
    color: #1f2937;
    background: rgba(17, 5, 68, 0.04);
    border-left: 4px solid var(--cas-azul);
    border-radius: 14px;
    transition: transform 0.3s ease, background 0.3s ease;
}

.cas-lista-check li:hover {
    transform: translateX(4px);
    background: rgba(255, 215, 0, 0.14);
}

.cas-lista-check li::before {
    content: '\2713';
    position: absolute;
    left: 14px;
    top: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--cas-azul-oscuro);
    background: var(--cas-dorado);
    border-radius: 50%;
    transform: translateY(-50%);
}

/* ---------- Lema Saber · Ciencia · Virtud ---------- */
.cas-lema {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 22px;
}

.cas-lema span {
    padding: 10px 24px;
    font-family: var(--fuente-titulos);
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--cas-dorado);
    background: linear-gradient(135deg, var(--cas-azul-oscuro), var(--cas-azul-medio));
    border-radius: 999px;
    box-shadow: 0 8px 18px rgba(11, 27, 82, 0.3);
}

/* ---------- Tarjetas de documentos (Manual y PIAR) ---------- */
.cas-documentos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 22px;
}

.doc-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    border-bottom: 5px solid var(--cas-dorado);
    box-shadow: 0 14px 32px rgba(11, 27, 82, 0.18);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.doc-card:hover,
.doc-card:focus-visible {
    transform: translateY(-6px);
    box-shadow: 0 22px 40px rgba(11, 27, 82, 0.28);
}

.doc-card-icono {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    font-size: 2.1rem;
    border-radius: 16px;
    background: linear-gradient(135deg, #eef3ff, #dbe5fb);
    transition: transform 0.45s cubic-bezier(.34, 1.56, .64, 1);
}

.doc-card:hover .doc-card-icono {
    transform: rotate(-10deg) scale(1.12);
}

.doc-card-texto {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 2px;
}

.doc-card-texto strong {
    font-family: var(--fuente-titulos);
    font-size: 1.15rem;
    font-weight: normal;
    color: var(--cas-azul);
}

.doc-card-texto small {
    font-family: var(--fuente-texto);
    font-size: 0.9rem;
    color: #64748b;
}

.doc-card-boton {
    padding: 8px 14px;
    font-family: var(--fuente-titulos);
    font-size: 0.85rem;
    white-space: nowrap;
    color: var(--cas-azul-oscuro);
    background: var(--cas-dorado);
    border-radius: 999px;
}

/* ---------- Valores ---------- */
.valores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 6px;
}

.valor-card {
    padding: 18px 18px 16px;
    background: linear-gradient(160deg, #ffffff 0%, #f1f5ff 100%);
    border: 1px solid rgba(0, 0, 139, 0.1);
    border-top: 4px solid var(--cas-dorado);
    border-radius: 16px;
    box-shadow: 0 6px 16px rgba(11, 27, 82, 0.08);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.valor-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 28px rgba(11, 27, 82, 0.18);
}

.valor-card h3 {
    margin-bottom: 6px;
    font-family: var(--fuente-titulos);
    font-size: 1.1rem;
    color: var(--cas-azul);
}

.cas-texto .valor-card p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    text-align: left;
}

/* ---------- Historia ---------- */
.cas-bloque--historia {
    align-items: flex-start;
}

.cas-bloque--historia > .cas-foto {
    position: sticky;
    top: 110px;
    flex-basis: 32%;
    max-width: 32%;
    aspect-ratio: 3 / 4;
}

.cas-bloque--historia .cas-texto p:first-of-type::first-letter {
    float: left;
    margin: 6px 10px 0 0;
    font-family: var(--fuente-titulos);
    font-size: 3.4em;
    line-height: 0.85;
    color: var(--cas-azul);
}

/* ---------- DETENTE ---------- */
.cas-detente > .cas-texto {
    margin-bottom: 28px;
}

.pilares-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 22px;
}

.pilar-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 139, 0.08);
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(11, 27, 82, 0.14);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.pilar-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 36px rgba(11, 27, 82, 0.24);
}

.pilar-fotos {
    display: grid;
    gap: 3px;
}

.pilar-fotos--2 {
    grid-template-columns: 1fr 1fr;
}

.pilar-fotos .cas-foto {
    border-radius: 0;
    box-shadow: none;
}

.pilar-fotos--2 .cas-foto {
    aspect-ratio: 2 / 3;
}

.pilar-fotos .cas-foto:hover {
    transform: none;
}

.pilar-cuerpo {
    padding: 16px 18px 20px;
}

.pilar-cuerpo h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-family: var(--fuente-titulos);
    font-size: 1.1rem;
    font-weight: normal;
    color: var(--cas-azul);
}

.pilar-cuerpo p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
}

.detente-lema {
    position: relative;
    margin: 34px 0 0;
    padding: 26px 28px 26px 76px;
    font-family: var(--fuente-texto);
    font-size: clamp(1.05rem, 1.6vw, 1.25rem);
    font-weight: 700;
    line-height: 1.6;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cas-azul-oscuro), var(--cas-azul-medio));
    border-left: 6px solid var(--cas-dorado);
    border-radius: 18px;
    box-shadow: 0 14px 30px rgba(11, 27, 82, 0.3);
}

.detente-lema::before {
    content: '\201C';
    position: absolute;
    left: 20px;
    top: 4px;
    font-family: var(--fuente-titulos);
    font-size: 4.6rem;
    line-height: 1;
    color: var(--cas-dorado);
}

.leyes-lista {
    list-style: none;
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
}

.leyes-lista li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    background: rgba(17, 5, 68, 0.04);
    border-radius: 14px;
}

.ley-num {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    font-family: var(--fuente-titulos);
    color: var(--cas-dorado);
    background: var(--cas-azul);
    border-radius: 10px;
}

.leyes-lista li p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.65;
    text-align: left;
}

.btn-cas {
    display: inline-block;
    margin-top: 22px;
    padding: 12px 26px;
    font-family: var(--fuente-titulos);
    text-decoration: none;
    color: var(--cas-azul-oscuro);
    background: linear-gradient(135deg, var(--cas-dorado), var(--cas-dorado-suave));
    border-radius: 999px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-cas:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28);
}

/* ---------- Galería Escuela de Padres (afiches 16:9, sin recorte) ---------- */
.galeria-fotos {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.galeria-fotos .cas-foto {
    aspect-ratio: 16 / 9;
    border-radius: 14px;
}

.galeria-fotos .cas-foto img {
    object-position: center;
}

/* ---------- Entrada animada al bajar por la página ----------
   Usa la propiedad "translate" para no chocar con el "transform" del hover. */
.js-revelar .revelar {
    opacity: 0;
    translate: 0 36px;
    transition: opacity 0.8s ease var(--retraso, 0s),
                translate 0.8s cubic-bezier(.2, .8, .2, 1) var(--retraso, 0s),
                transform 0.45s cubic-bezier(.2, .8, .2, 1),
                box-shadow 0.45s ease,
                background 0.3s ease;
}

.js-revelar .revelar.desde-izq {
    translate: -50px 0;
}

.js-revelar .revelar.desde-der {
    translate: 50px 0;
}

.js-revelar .revelar.visible {
    opacity: 1;
    translate: 0 0;
}

/* ---------- Tablet y celular ---------- */
@media (max-width: 860px) {
    .cas-bloque,
    .cas-bloque--invertido {
        flex-direction: column;
        align-items: stretch;
    }

    .cas-bloque > .cas-foto,
    .cas-bloque--historia > .cas-foto {
        position: relative;
        top: auto;
        flex-basis: auto;
        max-width: 100%;
        width: 100%;
        box-shadow: 0 12px 28px rgba(11, 27, 82, 0.25);
    }

    .cas-bloque--historia > .cas-foto {
        max-width: 340px;
        margin: 0 auto;
    }

    .cas-texto p {
        text-align: left;
    }

    .cas-bloque--texto .cas-lista-check {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 480px) {
    .cas-pagina {
        padding: 0 12px 40px;
    }

    .doc-card {
        flex-wrap: wrap;
    }

    .doc-card-boton {
        width: 100%;
        text-align: center;
    }

    .detente-lema {
        padding: 56px 20px 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cas-foto,
    .cas-foto img,
    .pilar-card,
    .valor-card,
    .doc-card {
        transition: none;
    }
}

/* ---------- Visor: flechas, contador y entrada de la imagen ---------- */
.visor-cas .visor-flecha {
    position: absolute;
    top: 50%;
    bottom: auto;
    z-index: 2;
    width: 52px;
    height: 52px;
    font-size: 2.2rem;
    line-height: 1;
    color: var(--cas-dorado);
    background: rgba(11, 27, 82, 0.85);
    border: 2px solid var(--cas-dorado);
    border-radius: 50%;
    cursor: pointer;
    transform: translateY(-50%);
    transition: transform 0.25s ease, background 0.25s ease;
}

.visor-cas .visor-flecha:hover {
    background: var(--cas-azul-oscuro);
    transform: translateY(-50%) scale(1.1);
}

.visor-cas .visor-anterior {
    left: 16px;
    right: auto;
}

.visor-cas .visor-siguiente {
    right: 16px;
    left: auto;
}

.visor-contador {
    position: absolute;
    bottom: 16px;
    left: 50%;
    padding: 5px 14px;
    font-family: var(--fuente-texto);
    font-weight: 700;
    color: #ffffff;
    background: rgba(11, 27, 82, 0.85);
    border-radius: 999px;
    transform: translateX(-50%);
}

.visor-cas img.visor-entra {
    animation: visorEntra 0.35s ease;
}

@keyframes visorEntra {
    from { opacity: 0; transform: scale(0.94); }
    to   { opacity: 1; transform: scale(1); }
}

@media (max-width: 600px) {
    .visor-cas .visor-flecha {
        width: 42px;
        height: 42px;
        font-size: 1.8rem;
    }

    .visor-cas .visor-anterior {
        left: 6px;
    }

    .visor-cas .visor-siguiente {
        right: 6px;
    }
}

/* =====================================================================
   CELULAR – la barra lateral fija tapaba el borde izquierdo del contenido.
   Se hace más angosta y el contenido deja un margen a la izquierda.
===================================================================== */
@media (max-width: 600px) {
    .BarraLateral {
        width: auto;
        left: 3px;
        padding-left: 5px;
        padding-right: 5px;
    }

    .BarraLateral ul li a {
        width: 34px;
        height: 34px;
        min-width: 34px;
        min-height: 34px;
    }

    .BarraLateral ul li a img {
        width: 21px;
        height: 21px;
        min-width: 21px;
        min-height: 21px;
    }

    .BarraLateral ul li .icon-whatsapp img {
        width: 24px;
        height: 24px;
        min-width: 24px;
        min-height: 24px;
    }

    body > main,
    body > .matricula-container,
    body > .inscripcion-container,
    body > .slogan {
        padding-left: 50px;
        padding-right: 8px;
    }

    .cas-pagina {
        padding: 0 0 40px;
    }

    .matricula-content,
    .inscripcion-content {
        padding-left: 14px;
        padding-right: 14px;
    }

    .cas-bloque {
        padding: 20px 16px;
    }
}
