/* ============================================================
   COLEGIO JUAN XXIII — Tema visual
   Se carga DESPUÉS de style.css y efectos.css: lo que está acá
   pisa lo de ellos. Misma paleta (azul marino + azul + dorado),
   con más profundidad: degradés, texturas suaves, tipografía
   display para títulos y tarjetas con más carácter.
   ============================================================ */

:root {
    --navy-900: #071630;
    --navy-800: #0a1e3d;
    --navy-700: #12305c;
    --navy-600: #1a3a6e;
    --ink: #1c2638;
    --muted: #5d6882;
    --line: #e3e8f2;
    --paper: #f6f8fc;
    --gold-500: #f0a11e;
    --gold-300: #f7c35e;
    --gold-100: #fdf1da;
    --font-display: 'Fraunces', 'Merriweather', Georgia, serif;
    --shadow-1: 0 1px 2px rgba(10,30,61,.06), 0 4px 14px rgba(10,30,61,.06);
    --shadow-2: 0 2px 4px rgba(10,30,61,.06), 0 18px 40px -12px rgba(10,30,61,.22);
    --radius-lg: 22px;
}

body {
    color: var(--ink);
    background-color: var(--paper);
    /* Trama de puntos muy suave: rompe el "plano" sin ensuciar. */
    background-image: radial-gradient(rgba(26,58,110,.07) 1px, transparent 1px);
    background-size: 22px 22px;
}

/* ── Tipografía ─────────────────────────────────────────────── */
.section-title,
.page-hero-title,
.hero-title,
.contacto-card-title,
.info-card-title {
    font-family: var(--font-display);
    font-optical-sizing: auto;
    letter-spacing: -.01em;
}
.section-title {
    font-weight: 700;
    color: var(--navy-800);
    -webkit-text-fill-color: var(--navy-800);
    background: none;
}
.section-title::after {
    width: 48px; height: 3px;
    background: var(--gold-500);
}
.section-subtitle { color: var(--muted); }

.section-eyebrow {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--gold-500);
    margin-bottom: 10px;
}
.section-eyebrow::before,
.section-eyebrow::after {
    content: '';
    width: 22px; height: 1.5px;
    background: currentColor;
    opacity: .6;
}

/* ── Barra superior y navbar ───────────────────────────────── */
.top-bar { background: var(--navy-900); }
.bg-primary-custom,
.navbar.scrolled {
    background: linear-gradient(90deg, var(--navy-800), var(--navy-600)) !important;
}
.navbar { box-shadow: 0 1px 0 rgba(255,255,255,.06), 0 8px 24px -14px rgba(0,0,0,.5); }
.navbar .nav-link::after { background: var(--gold-500); height: 2px; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
    position: relative;
    background: var(--navy-900);
    isolation: isolate;
}
.hero-slider {
    /* La caja tiene la proporción de las fotos (16:9), con techo para
       que en pantallas grandes no ocupe más que la ventana. */
    height: auto;
    aspect-ratio: 16 / 9;
    max-height: min(80vh, 720px);
    min-height: 0;
    box-shadow: none;
    background: var(--navy-900);
}
.hero-slide { transform: none; transition: opacity 1.1s ease; }
.hero-slide.active { transform: none; }
.hero-slide::before { display: none; }
.hero-slide::after { box-shadow: inset 0 0 120px rgba(7,22,48,.35); }

/* Capa 1: la misma foto, desenfocada, rellenando todo. */
.hero-slide-backdrop {
    position: absolute;
    inset: -40px;
    background: var(--hero-img) center / cover no-repeat;
    filter: blur(28px) saturate(1.1) brightness(.55);
    transform: scale(1.05);
}
/* Capa 2: la foto real, entera (contain): nunca se corta. */
.hero .hero-slide-bg,
.hero .hero-slide.active .hero-slide-bg,
.hero .hero-slide:hover .hero-slide-bg {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    animation: none;
    transform: none;
    transition: none;
}
/* El "Ken Burns" pasa al fondo difuminado: hay movimiento sin
   recortar la foto. */
@media (prefers-reduced-motion: no-preference) {
    .hero-slide.active .hero-slide-backdrop {
        animation: fxKenBurns 22s ease-in-out infinite alternate;
    }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    pointer-events: none;
    background: linear-gradient(90deg,
        rgba(7,22,48,.92) 0%,
        rgba(7,22,48,.72) 34%,
        rgba(7,22,48,.18) 62%,
        rgba(7,22,48,0) 80%);
}
.hero-copy {
    max-width: 540px;
    color: #fff;
    pointer-events: auto;
    animation: heroIn .9s cubic-bezier(.22,1,.36,1) both;
}
@keyframes heroIn {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: none; }
}
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .04em;
    color: var(--gold-300);
    background: rgba(240,161,30,.12);
    border: 1px solid rgba(240,161,30,.35);
    backdrop-filter: blur(6px);
}
.hero-title {
    margin: 18px 0 14px;
    font-size: clamp(2rem, 4.4vw, 3.6rem);
    font-weight: 500;
    line-height: 1.05;
    color: #fff;
}
.hero-title span {
    font-weight: 700;
    background: linear-gradient(90deg, var(--gold-300), var(--gold-500));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero-lead {
    font-size: clamp(.95rem, 1.3vw, 1.1rem);
    line-height: 1.6;
    color: rgba(255,255,255,.82);
    margin-bottom: 26px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-hero {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 24px;
    border-radius: 999px;
    font-weight: 700;
    font-size: .92rem;
    text-decoration: none;
    transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease;
}
.btn-hero-gold {
    background: var(--gold-500);
    color: var(--navy-900);
    box-shadow: 0 10px 30px -8px rgba(240,161,30,.65);
}
.btn-hero-gold:hover {
    background: var(--gold-300);
    color: var(--navy-900);
    transform: translateY(-2px);
}
.btn-hero-gold i { transition: transform .25s ease; }
.btn-hero-gold:hover i { transform: translateX(4px); }
.btn-hero-ghost {
    color: #fff;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.35);
    backdrop-filter: blur(6px);
}
.btn-hero-ghost:hover { background: rgba(255,255,255,.18); color: #fff; transform: translateY(-2px); }

.hero-arrow {
    position: absolute;
    bottom: 22px;
    z-index: 3;
    width: 46px; height: 46px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.35);
    background: rgba(7,22,48,.35);
    color: #fff;
    font-size: 1.1rem;
    backdrop-filter: blur(6px);
    cursor: pointer;
    transition: background .25s ease, border-color .25s ease, transform .25s ease;
}
.hero-arrow:hover { background: var(--gold-500); border-color: var(--gold-500); color: var(--navy-900); transform: scale(1.06); }
.hero-arrow-prev { right: 80px; }
.hero-arrow-next { right: 24px; }
.hero-dots { bottom: 38px; left: auto; right: 150px; transform: none; gap: 8px; }
.hero-dot { width: 8px; height: 8px; border: 0; background: rgba(255,255,255,.45); }
.hero-dot.active { width: 28px; border-radius: 999px; transform: none; background: var(--gold-500); box-shadow: none; }
.hero-dot:hover { transform: none; }

/* Celular: el texto va debajo de la foto, no encima; así la foto se
   ve completa y el texto se lee bien. */
@media (max-width: 767.98px) {
    .hero-slider { max-height: none; }
    .hero-overlay {
        position: static;
        background: linear-gradient(180deg, var(--navy-900), var(--navy-800));
        padding: 26px 0 34px;
    }
    .hero-copy { max-width: none; }
    .hero-title { margin-top: 14px; }
    .hero-arrow { display: none; }
    .hero-dots { left: 50%; right: auto; transform: translateX(-50%); bottom: 12px; }
    .btn-hero { flex: 1 1 auto; justify-content: center; }
}

/* ============================================================
   NOTICIAS
   ============================================================ */
.section-noticias { position: relative; overflow: hidden; }
.section-noticias::before {
    /* Halo dorado detrás del título: da profundidad sin otra foto. */
    content: '';
    position: absolute;
    top: -120px; left: 50%;
    width: 640px; height: 320px;
    transform: translateX(-50%);
    background: radial-gradient(closest-side, rgba(240,161,30,.14), transparent);
    pointer-events: none;
}

.filter-btn {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--navy-700);
    margin: 3px;
    box-shadow: var(--shadow-1);
}
.filter-btn:hover, .filter-btn.active {
    background: var(--navy-800);
    border-color: var(--navy-800);
    color: #fff;
    box-shadow: 0 6px 18px -6px rgba(10,30,61,.5);
}

.news-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    box-shadow: var(--shadow-1);
    transition: transform .35s cubic-bezier(.22,1,.36,1), box-shadow .35s ease, border-color .35s ease;
}
.news-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-2);
    border-color: rgba(240,161,30,.45);
    color: inherit;
}
.news-card-media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--navy-800);
}
.news-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .7s cubic-bezier(.22,1,.36,1);
}
.news-card:hover .news-card-media img { transform: scale(1.06); }
.news-card-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(7,22,48,.45));
}
.news-card-date {
    position: absolute;
    top: 14px; left: 14px;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 52px;
    padding: 6px 8px;
    border-radius: 14px;
    background: #fff;
    color: var(--muted);
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .08em;
    line-height: 1.1;
    box-shadow: 0 6px 16px -6px rgba(0,0,0,.35);
}
.news-card-date strong {
    font-family: var(--font-display);
    font-size: 1.35rem;
    color: var(--navy-800);
    letter-spacing: 0;
}
.news-card-flag {
    position: absolute;
    top: 14px; right: 14px;
    z-index: 1;
    padding: 5px 11px;
    border-radius: 999px;
    background: var(--gold-500);
    color: var(--navy-900);
    font-size: .72rem;
    font-weight: 700;
}
.news-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 20px 22px 22px;
}
.news-card-tag {
    align-self: flex-start;
    margin-bottom: 10px;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--gold-100);
    color: #9a5f00;
    font-size: .72rem;
    font-weight: 700;
}
.news-card-title {
    font-family: var(--font-display);
    font-size: 1.22rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--navy-800);
    margin-bottom: 8px;
    overflow-wrap: break-word;
}
.news-card-text {
    flex: 1;
    color: var(--muted);
    font-size: .92rem;
    line-height: 1.55;
    margin-bottom: 16px;
}
.news-card-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .86rem;
    font-weight: 700;
    color: var(--accent);
}
.news-card-more i { transition: transform .25s ease; }
.news-card:hover .news-card-more i { transform: translateX(5px); }

/* ============================================================
   ENCABEZADO DE PÁGINA INTERNA (Contacto, etc.)
   ============================================================ */
.page-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(48px, 8vw, 88px) 0 clamp(72px, 10vw, 120px);
    text-align: center;
    color: #fff;
    background:
        radial-gradient(600px 260px at 85% 0%, rgba(240,161,30,.22), transparent 70%),
        radial-gradient(500px 300px at 0% 100%, rgba(30,95,187,.45), transparent 70%),
        linear-gradient(135deg, var(--navy-900), var(--navy-600));
}
.page-hero::before {
    /* Líneas diagonales muy tenues. */
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(135deg, rgba(255,255,255,.035) 0 1px, transparent 1px 18px);
    pointer-events: none;
}
.page-hero .container { position: relative; }
.page-hero-title {
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
}
.page-hero-lead {
    max-width: 520px;
    margin: 0 auto;
    color: rgba(255,255,255,.78);
    font-size: 1.05rem;
}

/* ============================================================
   CONTACTO
   ============================================================ */
.contacto-section { padding-top: 0; }
.contacto-section > .container { margin-top: clamp(-80px, -7vw, -48px); position: relative; }

.contacto-card {
    position: relative;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: clamp(22px, 4vw, 40px);
    box-shadow: var(--shadow-2);
}
.contacto-card::before {
    content: '';
    position: absolute;
    top: 0; left: 28px; right: 28px;
    height: 3px;
    border-radius: 0 0 4px 4px;
    background: linear-gradient(90deg, var(--accent), var(--gold-500));
}
.contacto-card-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--navy-800);
    margin-bottom: 4px;
}
.contacto-card-sub { color: var(--muted); margin-bottom: 24px; }
.contacto-card .form-label { color: var(--navy-800); font-size: .92rem; }
.contacto-card .form-control {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 14px;
}
.contacto-card .form-control:focus { background: #fff; }

/* Chips de selección: sin íconos, sin bloques. Una pastilla con un
   puntito que se llena al elegir. */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-input {
    position: absolute;
    opacity: 0;
    width: 1px; height: 1px;
    pointer-events: none;
}
.chip {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 42px;
    padding: 8px 16px 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: background .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.chip::before {
    content: '';
    width: 16px; height: 16px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1.5px solid var(--gray-300);
    background: #fff;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.chip:hover { border-color: var(--navy-600); }
.chip-input:checked + .chip {
    background: var(--navy-800);
    border-color: var(--navy-800);
    color: #fff;
    box-shadow: 0 8px 20px -10px rgba(10,30,61,.7);
}
.chip-input:checked + .chip::before {
    border-color: var(--gold-500);
    background: var(--gold-500);
    box-shadow: inset 0 0 0 3px var(--navy-800);
}
.chip-input:focus-visible + .chip { outline: 3px solid var(--gold-500); outline-offset: 2px; }
.bloque-cursos { margin-top: 4px; }

.btn-enviar {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--navy-700), var(--accent));
    color: #fff;
    font-weight: 700;
    box-shadow: 0 12px 28px -12px rgba(30,95,187,.8);
    transition: transform .25s ease, box-shadow .25s ease;
}
.btn-enviar:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -12px rgba(30,95,187,.9); }
.btn-enviar i { transition: transform .25s ease; }
.btn-enviar:hover i { transform: translate(3px, -3px); }

/* Tarjeta de datos */
.info-card {
    position: sticky;
    top: 96px;
    overflow: hidden;
    border-radius: var(--radius-lg);
    padding: clamp(22px, 3.5vw, 34px);
    color: #fff;
    background:
        radial-gradient(400px 200px at 100% 0%, rgba(240,161,30,.22), transparent 70%),
        linear-gradient(160deg, var(--navy-800), var(--navy-600));
    box-shadow: var(--shadow-2);
}
.info-card-eyebrow {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--gold-300);
}
.info-card-title {
    font-size: 1.45rem;
    font-weight: 700;
    color: #fff;
    margin: 6px 0 20px;
}
.info-list { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 16px; }
.info-list li { display: flex; gap: 14px; align-items: flex-start; }
.info-list small {
    display: block;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(255,255,255,.55);
    margin-bottom: 2px;
}
.info-list a { color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.25); }
.info-list a:hover { color: var(--gold-300); border-color: var(--gold-300); }
.info-ico {
    flex-shrink: 0;
    width: 40px; height: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(240,161,30,.15);
    color: var(--gold-300);
    font-size: 1.05rem;
}
.info-map {
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    border: 1px solid rgba(255,255,255,.15);
    background: rgba(255,255,255,.06);
}
.info-map iframe { width: 100%; height: 100%; border: 0; display: block; }
.info-cta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding: 12px;
    border-radius: 999px;
    background: var(--gold-500);
    color: var(--navy-900);
    font-weight: 700;
    text-decoration: none;
    transition: background .25s ease, transform .25s ease;
}
.info-cta:hover { background: var(--gold-300); color: var(--navy-900); transform: translateY(-2px); }
.info-vacio { color: rgba(255,255,255,.7); margin: 0; }

@media (max-width: 991.98px) {
    .info-card { position: static; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    padding: 56px 0 0;
    color: rgba(255,255,255,.7);
    background:
        radial-gradient(700px 260px at 10% 0%, rgba(30,95,187,.35), transparent 70%),
        radial-gradient(500px 220px at 100% 100%, rgba(240,161,30,.12), transparent 70%),
        var(--navy-900);
}
.footer-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.footer-brand img { width: 56px; height: 56px; object-fit: contain; }
.footer-brand-name { display: block; font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; color: #fff; }
.footer-brand-sub { display: block; font-size: .8rem; color: rgba(255,255,255,.55); }
.footer-text { font-size: .9rem; line-height: 1.6; max-width: 400px; margin-bottom: 18px; }
.footer-heading {
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--gold-300);
    margin-bottom: 16px;
}
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: .92rem; }
.footer-links a { color: rgba(255,255,255,.78); text-decoration: none; transition: color .2s ease; }
.footer-links a:hover { color: var(--gold-300); }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer-contact i { color: var(--gold-300); margin-top: 2px; }
.footer-social a { width: 40px; height: 40px; font-size: 1.05rem; color: rgba(255,255,255,.75); }
.footer-bottom { margin-top: 44px; }

/* ============================================================
   IMÁGENES DE CABECERA (Pastoral, Sobre nosotros, Centro de
   Estudiantes, niveles). Misma proporción en todas: 21:9 en
   escritorio, 16:9 en el celular, recortadas desde el centro.
   ============================================================ */
.page-banner,
.nivel-imagen {
    display: block;
    width: 100%;
    max-height: none !important;
    aspect-ratio: 21 / 9;
    object-fit: cover;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-2);
}
@media (max-width: 767.98px) {
    .page-banner, .nivel-imagen { aspect-ratio: 16 / 9; }
}
/* En el listado de Niveles la imagen va en media columna: más alta. */
.col-lg-7 > .nivel-imagen { aspect-ratio: 16 / 9; }

/* Botón "Ver todas las noticias" */
.btn-ver-mas {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 26px;
    border-radius: 999px;
    border: 1.5px solid var(--navy-800);
    color: var(--navy-800);
    font-weight: 700;
    text-decoration: none;
    background: #fff;
    transition: background .25s ease, color .25s ease, transform .25s ease;
}
.btn-ver-mas:hover { background: var(--navy-800); color: #fff; transform: translateY(-2px); }
