/* ==========================================================================
   Bethlemitas Ibarra — Plantilla institucional
   Paleta basada en la identidad original:
   rojo #E00404 · azul #0345BF · amarillo #EFF700
   Sin dependencias externas. Bootstrap 5 del núcleo se usa solo como base
   para formularios y componentes de Joomla; todo lo visual es propio.
   ========================================================================== */

:root {
    --red: #e00404;
    --red-dark: #b00303;
    --blue: #0345bf;
    --blue-dark: #022e80;
    --blue-900: #031a4d;
    --yellow: #eff700;
    --yellow-soft: #fbfdc8;
    --ink: #1a2233;
    --muted: #5b667a;
    --paper: #ffffff;
    --soft: #f4f6fb;
    --line: #e2e7f0;
    --radius: 20px;
    --shadow: 0 18px 45px rgba(3, 26, 77, 0.10);
    --shadow-lg: 0 30px 70px rgba(3, 26, 77, 0.16);
    --container: 1180px;
    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    overflow-x: clip;
}

body {
    margin: 0;
    overflow-x: clip;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.15;
    color: var(--blue-900);
    margin-top: 0;
    font-optical-sizing: auto;
}

p { margin-top: 0; }

a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--red); }

img { max-width: 100%; height: auto; }

::selection { background: var(--yellow); color: var(--blue-900); }

:focus-visible {
    outline: 3px solid var(--yellow);
    outline-offset: 2px;
}

.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: clamp(18px, 4vw, 32px);
}

.visually-hidden {
    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;
    top: -60px;
    left: 16px;
    z-index: 200;
    background: var(--blue-900);
    color: #fff;
    padding: 10px 18px;
    border-radius: 0 0 10px 10px;
    font-weight: 700;
    transition: top .2s;
}
.skip-link:focus { top: 0; color: #fff; }

/* --------------------------------------------------------------------------
   Botones
   -------------------------------------------------------------------------- */

.bm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 13px 24px;
    border: 2px solid transparent;
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .05em;
    line-height: 1;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: transform .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

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

.bm-btn--primary {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
    box-shadow: 0 12px 26px rgba(224, 4, 4, .22);
}
.bm-btn--primary:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; }

.bm-btn--blue {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
}
.bm-btn--blue:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; }

.bm-btn--ghost {
    background: rgba(255, 255, 255, .06);
    border-color: rgba(255, 255, 255, .55);
    color: #fff;
}
.bm-btn--ghost:hover { background: #fff; border-color: #fff; color: var(--blue-900); }

.bm-btn--white {
    background: #fff;
    border-color: #fff;
    color: var(--red);
}
.bm-btn--white:hover { background: var(--yellow); border-color: var(--yellow); color: var(--blue-900); }

.bm-btn--outline {
    background: transparent;
    border-color: var(--blue);
    color: var(--blue);
}
.bm-btn--outline:hover { background: var(--blue); color: #fff; }

.bm-btn--sm { padding: 10px 17px; font-size: .74rem; }

/* Botones de componentes Joomla */
.btn { border-radius: 10px; font-weight: 600; }
.btn-primary,
.btn.btn-primary {
    background-color: var(--blue);
    border-color: var(--blue);
}
.btn-primary:hover,
.btn.btn-primary:hover {
    background-color: var(--blue-dark);
    border-color: var(--blue-dark);
}

/* --------------------------------------------------------------------------
   Barra superior
   -------------------------------------------------------------------------- */

.topbar {
    background: linear-gradient(90deg, var(--red-dark) 0%, var(--red) 100%);
    color: rgba(255, 255, 255, .82);
    font-size: .78rem;
    position: relative;
    z-index: 90;
}

.topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 40px;
    flex-wrap: wrap;
}

.topbar__list {
    display: flex;
    align-items: center;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.topbar__item { display: inline-flex; align-items: center; gap: 7px; }
.topbar__item i { color: var(--yellow); font-size: .85em; }
.topbar a { color: inherit; text-decoration: none; }
.topbar a:hover { color: #fff; }

.topbar__social { display: inline-flex; gap: 14px; }
.topbar__social a { display: inline-flex; font-size: .9rem; }
.topbar__social a:hover { color: var(--yellow); }

/* --------------------------------------------------------------------------
   Cabecera y navegación
   -------------------------------------------------------------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(255, 255, 255, .97);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    transition: box-shadow .25s ease;
}
.site-header.is-scrolled { box-shadow: 0 12px 30px rgba(3, 26, 77, .08); }

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 88px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: inherit;
    flex: none;
}
.brand:hover { color: inherit; }

.brand__mark {
    width: 64px;
    height: 64px;
    flex: none;
    display: block;
    object-fit: contain;
    padding: 4px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 50%;
    box-shadow: 0 8px 20px rgba(3, 26, 77, .08);
}

.brand__text { display: flex; flex-direction: column; gap: 3px; line-height: 1.08; }

.brand__kicker {
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--red);
}

.brand__name {
    font-family: var(--font-display);
    font-size: clamp(1.18rem, 1.45vw, 1.46rem);
    font-weight: 700;
    color: var(--blue-900);
    letter-spacing: -.015em;
    line-height: 1.08;
}

.brand__tag {
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: 0;
}

.header-actions { display: inline-flex; align-items: center; gap: 12px; flex: none; }
.header-actions .bm-btn { display: none; }

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    color: var(--blue-900);
    font-size: 1.1rem;
    cursor: pointer;
}

.nav-panel { display: flex; align-items: center; }
.nav-panel__head { display: none; }
.nav-overlay { display: none; }

.bm-menu {
    display: flex;
    align-items: center;
    gap: 2px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.bm-menu__item { position: relative; }

.bm-menu__link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 9px;
    border: 0;
    border-radius: 9px;
    background: none;
    font-family: var(--font-body);
    font-size: .76rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ink);
    text-decoration: none;
    cursor: pointer;
    transition: color .18s ease, background-color .18s ease;
    text-align: left;
}

.bm-menu__link:hover,
.bm-menu__link:focus-visible { color: var(--red); background: var(--soft); }

.bm-menu__item.current > .bm-menu__link,
.bm-menu__item.current > .bm-menu__toggle { color: var(--red); }

.bm-menu__caption { cursor: default; }

.bm-chevron {
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform .2s ease;
    flex: none;
}

.bm-submenu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    z-index: 95;
    min-width: 275px;
    margin: 0;
    padding: 10px;
    list-style: none;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}

.bm-menu__item:hover > .bm-submenu,
.bm-menu__item:focus-within > .bm-submenu,
.bm-menu__item.is-open > .bm-submenu {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .18s ease, transform .18s ease;
}

.bm-menu__item:hover > .bm-menu__toggle .bm-chevron,
.bm-menu__item.is-open > .bm-menu__toggle .bm-chevron { transform: rotate(-135deg) translateY(-2px); }

.bm-submenu .bm-menu__item { position: relative; }

.bm-submenu .bm-menu__link {
    display: block;
    width: 100%;
    padding: 9px 12px;
    font-size: .88rem;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    border-radius: 9px;
    color: var(--ink);
}

.bm-submenu .bm-menu__link:hover { color: var(--red); background: var(--soft); }

.bm-submenu .bm-submenu {
    top: -10px;
    left: calc(100% + 8px);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    padding: clamp(58px, 7vw, 96px) 0 clamp(96px, 11vw, 140px);
    color: #fff;
    background-color: var(--blue-900);
    background-image:
        linear-gradient(118deg, rgba(3, 26, 77, .96) 0%, rgba(3, 69, 191, .88) 56%, rgba(2, 46, 128, .96) 100%),
        var(--hero-img, none);
    background-size: cover;
    background-position: center;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: radial-gradient(rgba(255, 255, 255, .16) 1px, transparent 1px);
    background-size: 26px 26px;
    opacity: .32;
    mask-image: linear-gradient(105deg, #000 0%, transparent 65%);
    -webkit-mask-image: linear-gradient(105deg, #000 0%, transparent 65%);
}

.hero::after {
    content: '';
    position: absolute;
    width: 560px;
    height: 560px;
    right: -180px;
    top: -220px;
    z-index: -1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(239, 247, 0, .18) 0%, transparent 66%);
}

.hero__grid {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
    align-items: center;
    gap: clamp(34px, 5vw, 72px);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 16px;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--red);
}

.eyebrow__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--red);
    flex: none;
}

.eyebrow--light { color: rgba(255, 255, 255, .86); }
.eyebrow--light .eyebrow__dot { background: var(--yellow); box-shadow: 0 0 0 4px rgba(239, 247, 0, .16); }

.hero__title {
    margin: 0 0 18px;
    font-size: clamp(2.45rem, 5.3vw, 4.35rem);
    line-height: 1.02;
    letter-spacing: -.025em;
    color: #fff;
}

.hero__title em {
    font-style: italic;
    font-weight: 600;
    color: var(--yellow);
}

.hero__lead {
    max-width: 52ch;
    margin: 0 0 28px;
    font-size: clamp(1rem, 1.25vw, 1.12rem);
    color: rgba(255, 255, 255, .82);
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }

.hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.hero__meta li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 13px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 999px;
    background: rgba(255, 255, 255, .06);
    font-size: .76rem;
    font-weight: 500;
    color: rgba(255, 255, 255, .86);
}
.hero__meta i { color: var(--yellow); }

.hero-card {
    position: relative;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 24px;
    background: rgba(255, 255, 255, .08);
    box-shadow: 0 30px 70px rgba(2, 16, 48, .35);
    backdrop-filter: blur(14px);
}

.hero-card__label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--yellow);
}

.hero-card__year {
    margin: 6px 0 4px;
    font-family: var(--font-display);
    font-size: 2.3rem;
    font-weight: 700;
    line-height: 1;
    color: #fff;
}

.hero-card__note { margin: 0 0 18px; font-size: .88rem; color: rgba(255, 255, 255, .72); }

.hero-card__list {
    display: grid;
    gap: 11px;
    margin: 0 0 22px;
    padding: 0;
    list-style: none;
}

.hero-card__list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: .89rem;
    color: rgba(255, 255, 255, .86);
}
.hero-card__list i { margin-top: 3px; color: var(--yellow); }

.hero-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, .18);
}

.hero-card__phone {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
}
.hero-card__phone i { color: var(--yellow); }
.hero-card__phone:hover { color: var(--yellow); }

/* --------------------------------------------------------------------------
   Accesos rápidos
   -------------------------------------------------------------------------- */

.access {
    position: relative;
    z-index: 10;
    margin-top: -72px;
}

.access__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    padding: 12px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow-lg);
}

.access__item {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border: 1px solid transparent;
    border-radius: 15px;
    color: inherit;
    text-decoration: none;
    transition: background-color .2s ease, border-color .2s ease, transform .2s ease;
}
.access__item > span:last-child {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.access__item:hover {
    background: var(--soft);
    border-color: var(--line);
    transform: translateY(-2px);
    color: inherit;
}

.access__icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    flex: none;
    border-radius: 13px;
    background: rgba(3, 69, 191, .09);
    color: var(--blue);
    font-size: 1.1rem;
}

.access__item:nth-child(2) .access__icon { background: rgba(224, 4, 4, .09); color: var(--red); }
.access__item:nth-child(3) .access__icon { background: rgba(3, 26, 77, .08); color: var(--blue-900); }
.access__item:nth-child(4) .access__icon { background: rgba(239, 247, 0, .38); color: #6b7000; }

.access__title { display: block; margin: 0; font-family: var(--font-body); font-size: .9rem; font-weight: 700; line-height: 1.2; color: var(--blue-900); }
.access__desc { display: block; margin: 0; font-size: .74rem; line-height: 1.35; color: var(--muted); }

/* --------------------------------------------------------------------------
   Secciones
   -------------------------------------------------------------------------- */

.section { padding: clamp(56px, 7vw, 94px) 0; }
.section--soft { background: var(--soft); }
.section--flush { padding-top: 0; }

.section-head { max-width: 720px; margin-bottom: clamp(28px, 4vw, 46px); }
.section-head--center { margin-inline: auto; text-align: center; }

.section-title {
    margin: 0 0 12px;
    font-size: clamp(1.8rem, 3.2vw, 2.65rem);
    letter-spacing: -.02em;
}

.section-lead { margin: 0; font-size: 1.02rem; color: var(--muted); }

/* Bienvenida */
.welcome__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    align-items: center;
    gap: clamp(32px, 5vw, 66px);
}

.welcome__media { position: relative; padding-right: 18px; padding-bottom: 18px; }

.welcome__img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: center;
    border-radius: 24px;
    box-shadow: var(--shadow);
    background: var(--soft);
}

.welcome__badge {
    position: absolute;
    right: 0;
    bottom: 0;
    max-width: 230px;
    padding: 18px 22px;
    border-radius: 18px;
    background: var(--red);
    color: #fff;
    box-shadow: 0 18px 42px rgba(224, 4, 4, .32);
}
.welcome__badge strong {
    display: block;
    font-family: var(--font-display);
    font-size: 1.85rem;
    line-height: 1;
}
.welcome__badge span {
    display: block;
    margin-top: 4px;
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    opacity: .92;
}

.welcome__copy h2 {
    margin: 0 0 14px;
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    letter-spacing: -.02em;
}
.welcome__copy > p:first-of-type { font-size: 1.08rem; font-weight: 600; color: var(--blue-900); }
.welcome__copy p { color: var(--muted); }
.welcome__copy p:last-of-type { margin-bottom: 0; }

/* Contenido de artículos */
.bm-inner .com-content-article .page-header,
.bm-inner .com-content-article .article-info { display: none; }

.com-content-article__body { font-size: 1rem; line-height: 1.75; color: var(--muted); }
.com-content-article__body h2 { margin: 2rem 0 .85rem; color: var(--blue-900); font-size: clamp(1.35rem, 2.2vw, 1.75rem); }
.com-content-article__body h2:first-child { margin-top: 0; }
.com-content-article__body p { margin: 0 0 1rem; }
.com-content-article__body ul { margin: 0 0 1.4rem; padding-left: 1.2rem; }
.com-content-article__body li { margin-bottom: .45rem; }
.com-content-article__body strong { color: var(--blue-900); }
.com-content-article__body a { color: var(--red); text-decoration: underline; text-underline-offset: 3px; }

/* Los botones dentro del contenido conservan el contraste de su variante. */
.com-content-article__body a.bm-btn { text-decoration: none; }
.com-content-article__body a.bm-btn--primary,
.com-content-article__body a.bm-btn--blue,
.com-content-article__body a.bm-btn--ghost,
.com-content-article__body a.bm-btn--primary:hover,
.com-content-article__body a.bm-btn--blue:hover,
.com-content-article__body a.bm-btn--ghost:hover { color: #fff; }
.com-content-article__body a.bm-btn--white,
.com-content-article__body a.bm-btn--outline { color: var(--red); }
.com-content-article__body a.bm-btn--white:hover { color: var(--blue-900); }
.com-content-article__body a.bm-btn--outline:hover { color: #fff; }

/* Galería institucional */
.home-gallery {
    background: var(--soft);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.beth-carrusel {
    position: relative;
    max-width: 1180px;
    margin: 0 auto;
}

.beth-carrusel-pista {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    border-radius: 22px;
    box-shadow: var(--shadow);
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.beth-carrusel-pista::-webkit-scrollbar { display: none; }

.beth-slide {
    flex: 0 0 100%;
    margin: 0;
    scroll-snap-align: center;
    background: #dde3ee;
}

.beth-slide img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 2048 / 840;
    object-fit: cover;
}

.beth-carrusel-controles {
    display: flex;
    justify-content: center;
    gap: 9px;
    margin-top: 18px;
}

.beth-carrusel-controles a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--blue-900);
    font-size: .82rem;
    font-weight: 700;
    text-decoration: none;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.beth-carrusel-controles a:hover,
.beth-carrusel-controles a:focus-visible,
.beth-carrusel-controles a.is-active {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
}

.checklist { display: grid; gap: 12px; margin: 22px 0 28px; padding: 0; list-style: none; }
.checklist li { display: flex; align-items: flex-start; gap: 11px; font-size: .95rem; }
.checklist i { margin-top: 4px; color: var(--blue); }
.checklist strong { color: var(--blue-900); }

/* Niveles */
.levels-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }

.level-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 28px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.level-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: var(--blue);
}
.level-card:nth-child(2)::before { background: var(--red); }
.level-card:nth-child(3)::before { background: var(--yellow); }
.level-card:hover { transform: translateY(-5px); border-color: transparent; box-shadow: var(--shadow); }

.level-card__icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 15px;
    background: rgba(3, 69, 191, .09);
    color: var(--blue);
    font-size: 1.25rem;
}
.level-card:nth-child(2) .level-card__icon { background: rgba(224, 4, 4, .09); color: var(--red); }
.level-card:nth-child(3) .level-card__icon { background: rgba(239, 247, 0, .38); color: #6b7000; }

.level-card h3 { margin: 16px 0 8px; font-size: 1.28rem; }
.level-card p { margin: 0 0 18px; font-size: .92rem; color: var(--muted); }

.level-card ul { display: grid; gap: 7px; margin: 0 0 24px; padding: 0; list-style: none; }
.level-card li { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); }
.level-card li i { font-size: .65rem; color: var(--blue); }

.level-card__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--blue);
    text-decoration: none;
}
.level-card__link:hover { color: var(--red); gap: 12px; }

/* Sello / features */
.features {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(118deg, #031a4d 0%, #022e80 58%, #0345bf 100%);
}
.features::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .12) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: .28;
    mask-image: linear-gradient(180deg, #000, transparent 80%);
    -webkit-mask-image: linear-gradient(180deg, #000, transparent 80%);
}
.features .container { position: relative; }
.features .section-title { color: #fff; }
.features .section-lead { color: rgba(255, 255, 255, .75); }

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 34px;
}

.feature {
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 18px;
    background: rgba(255, 255, 255, .045);
    transition: transform .25s ease, background-color .25s ease;
}
.feature:hover { transform: translateY(-4px); background: rgba(255, 255, 255, .075); }

.feature__icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-bottom: 15px;
    border-radius: 14px;
    background: rgba(239, 247, 0, .13);
    color: var(--yellow);
    font-size: 1.15rem;
}

.feature h3 {
    margin: 0 0 7px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
}
.feature p { margin: 0; font-size: .86rem; color: rgba(255, 255, 255, .72); }

/* Noticias */
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }

.news-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    transition: transform .25s ease, box-shadow .25s ease;
}
.news-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }

.news-card__media {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, var(--blue) 0%, var(--blue-900) 100%);
    color: rgba(255, 255, 255, .85);
    font-size: 1.9rem;
}
.news-card:nth-child(2) .news-card__media { background: linear-gradient(135deg, var(--red) 0%, #6d0202 100%); }
.news-card:nth-child(3) .news-card__media { background: linear-gradient(135deg, #0345bf 0%, #022e80 60%, #031a4d 100%); }

.news-card__media img { width: 100%; height: 100%; object-fit: cover; }

.news-card__body { display: flex; flex-direction: column; flex: 1; padding: 20px 22px 24px; }

.news-card__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
}
.news-card__tag {
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(3, 69, 191, .09);
    color: var(--blue);
    font-weight: 700;
}

.news-card h3 { margin: 0 0 10px; font-size: 1.14rem; line-height: 1.25; }
.news-card p { margin: 0 0 18px; font-size: .89rem; color: var(--muted); }

.news-card__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--blue);
    text-decoration: none;
}
.news-card__link:hover { color: var(--red); gap: 12px; }

/* CTA */
.cta-band {
    position: relative;
    overflow: hidden;
    padding: clamp(44px, 5vw, 64px) 0;
    color: #fff;
    background: linear-gradient(118deg, #e00404 0%, #b00303 100%);
}
.cta-band::after {
    content: '';
    position: absolute;
    right: -120px;
    top: -120px;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(239, 247, 0, .18), transparent 68%);
    pointer-events: none;
}
.cta-band__inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 26px;
    flex-wrap: wrap;
}
.cta-band h2 { margin: 0 0 6px; font-size: clamp(1.6rem, 2.8vw, 2.35rem); color: #fff; }
.cta-band p { margin: 0; color: rgba(255, 255, 255, .86); }

/* --------------------------------------------------------------------------
   Pie de página
   -------------------------------------------------------------------------- */

.site-footer {
    padding-top: 64px;
    background: var(--blue-900);
    color: rgba(255, 255, 255, .72);
    font-size: .89rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.45fr .9fr 1.15fr;
    gap: 40px;
    padding-bottom: 44px;
}

.footer-brand .brand__kicker { color: var(--yellow); }
.footer-brand .brand__name { color: #fff; }
.footer-brand .brand__tag { color: rgba(255, 255, 255, .55); }
.footer-brand .brand__mark { width: 76px; height: 76px; padding: 6px; background: #fff; border-radius: 50%; }
.footer-brand p { max-width: 36ch; margin: 16px 0 20px; }
.footer-brand .footer-credit { margin: 16px 0 0; font-size: .78rem; color: rgba(255, 255, 255, .48); }
.footer-brand .footer-credit a { color: rgba(255, 255, 255, .78); font-weight: 600; text-decoration: none; }
.footer-brand .footer-credit a:hover { color: var(--yellow); }

.footer-title {
    margin: 0 0 16px;
    font-family: var(--font-body);
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #fff;
}

.footer-links ul { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.footer-links .bm-menu { display: grid; gap: 9px; }
.footer-links .bm-menu__item { border: 0; }
.footer-links .bm-menu__link { padding: 0; font-size: .89rem; font-weight: 500; letter-spacing: 0; text-transform: none; color: rgba(255, 255, 255, .72); }
.footer-links .bm-menu__link:hover { color: var(--yellow); background: none; }
.footer-links .bm-submenu { display: none; }
.footer-links .bm-chevron { display: none; }

.footer-contact { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.footer-contact li { display: flex; align-items: flex-start; gap: 10px; }
.footer-contact i { width: 16px; margin-top: 4px; color: var(--yellow); }
.footer-contact a { color: rgba(255, 255, 255, .78); text-decoration: none; }
.footer-contact a:hover { color: #fff; }

.social { display: inline-flex; gap: 9px; }
.social a {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .09);
    color: #fff;
    text-decoration: none;
    transition: background-color .2s ease, transform .2s ease;
}
.social a:hover { background: var(--red); color: #fff; transform: translateY(-2px); }

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding: 18px 0;
    border-top: 1px solid rgba(255, 255, 255, .12);
    font-size: .76rem;
    color: rgba(255, 255, 255, .52);
}
.footer-bottom a { color: rgba(255, 255, 255, .68); text-decoration: none; }
.footer-bottom a:hover { color: #fff; }
.footer-visits {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    color: rgba(255, 255, 255, .8);
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    line-height: 1;
}
.footer-visits i { color: var(--yellow); font-size: .9rem; }
.footer-visits strong { color: var(--yellow); font-size: 1.08rem; font-weight: 800; letter-spacing: .01em; }

/* --------------------------------------------------------------------------
   Páginas internas
   -------------------------------------------------------------------------- */

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 42px 0 38px;
    color: #fff;
    background:
        radial-gradient(circle at 85% 20%, rgba(239, 247, 0, .16), transparent 32%),
        linear-gradient(118deg, #7a0202 0%, var(--red) 56%, #031a4d 100%);
}
.page-hero::after {
    content: '';
    position: absolute;
    right: -140px;
    bottom: -220px;
    width: 460px;
    height: 460px;
    border-radius: 50%;
    border: 60px solid rgba(255, 255, 255, .05);
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { margin: 8px 0 0; font-size: clamp(1.9rem, 3.6vw, 2.95rem); color: #fff; }

.breadcrumb { margin: 0; padding: 0; background: none; }
.mod-breadcrumbs__wrapper { font-size: .79rem; }
.mod-breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; color: rgba(255, 255, 255, .66); }
.mod-breadcrumbs__here { display: none; }
.mod-breadcrumbs__item { display: inline-flex; align-items: center; gap: 8px; }
.mod-breadcrumbs__item + .mod-breadcrumbs__item::before { content: '/'; color: rgba(255, 255, 255, .4); }
.mod-breadcrumbs a { color: rgba(255, 255, 255, .82); text-decoration: none; }
.mod-breadcrumbs a:hover { color: var(--yellow); }

.bm-main { padding: clamp(38px, 5vw, 66px) 0; }

.bm-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; }
.bm-layout.has-sidebar { grid-template-columns: minmax(0, 1fr) 300px; }
.bm-content { min-width: 0; }

/* El título lo pinta la banda .page-hero */
.bm-content .page-header { display: none; }

.bm-content h2 { margin: 1.5em 0 .55em; font-size: clamp(1.45rem, 2.3vw, 1.95rem); }
.bm-content h3 { margin: 1.35em 0 .5em; font-size: clamp(1.15rem, 1.7vw, 1.35rem); }
.bm-content h2:first-child,
.bm-content h3:first-child { margin-top: 0; }
.bm-content p { margin: 0 0 1.1em; }
.bm-content ul,
.bm-content ol { margin: 0 0 1.2em; padding-left: 1.25em; }
.bm-content li { margin-bottom: .35em; }
.bm-content img { border-radius: 16px; }
.bm-content blockquote {
    margin: 1.4em 0;
    padding: 16px 22px;
    border-left: 4px solid var(--red);
    border-radius: 0 12px 12px 0;
    background: var(--soft);
    color: var(--muted);
}
.bm-content table { width: 100%; margin-bottom: 1.4em; border-collapse: collapse; font-size: .93rem; }
.bm-content th,
.bm-content td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; }
.bm-content th { background: var(--soft); color: var(--blue-900); }
.bm-content hr { margin: 2em 0; border: 0; border-top: 1px solid var(--line); }

/* Ficha del artículo */
.article-info { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 24px; font-size: .8rem; color: var(--muted); }
.article-info i { color: var(--blue); margin-right: 5px; }

/* Paginación */
.pagination { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 32px; padding: 0; list-style: none; }
.pagination .page-link { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); text-decoration: none; }
.pagination .page-link:hover { border-color: var(--blue); color: var(--blue); }
.pagination .active .page-link { background: var(--blue); border-color: var(--blue); color: #fff; }

/* Mensajes del sistema */
#system-message-container { margin-bottom: 24px; }
#system-message-container:empty { display: none; }
.bm-messages:has(#system-message-container:empty) { display: none; }
.alert { padding: 13px 18px; border: 1px solid transparent; border-radius: 12px; font-size: .92rem; }
.alert-info { background: #eef4ff; border-color: #cfe0ff; color: #0b3a8f; }
.alert-success { background: #eefaf0; border-color: #c9efcf; color: #146c2e; }
.alert-warning { background: #fff8e6; border-color: #ffe7a8; color: #7a5600; }
.alert-danger, .alert-error { background: #fdeeee; border-color: #f7c9c9; color: #8f1414; }

/* Formularios de Joomla */
.form-control, .form-select {
    border-color: var(--line);
    border-radius: 10px;
    padding: 11px 13px;
    font-size: .95rem;
}
.form-control:focus, .form-select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(3, 69, 191, .14);
}
.form-label { font-weight: 600; font-size: .88rem; color: var(--blue-900); }

/* --------------------------------------------------------------------------
   Módulos y utilidades
   -------------------------------------------------------------------------- */

.mod-custom > :first-child { margin-top: 0; }
.mod-custom > :last-child { margin-bottom: 0; }

.bm-sidebar .card,
.bm-sidebar .mod-custom {
    padding: 20px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    margin-bottom: 18px;
}
.bm-sidebar h3 { font-size: 1.05rem; margin-bottom: 12px; }

/* Animación de entrada */
[data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .6s ease, transform .6s ease;
}
[data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
    [data-reveal] { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1160px) {
    .site-header {
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        background: rgba(255, 255, 255, .99);
    }
    .nav-toggle { display: inline-flex; }
    .header-actions .bm-btn { display: none; }

    .nav-panel {
        position: fixed;
        top: 0;
        right: 0;
        z-index: 120;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        width: min(88vw, 380px);
        height: 100dvh;
        padding: 0 22px 32px;
        overflow-y: auto;
        background: #fff;
        box-shadow: -20px 0 60px rgba(3, 10, 30, .25);
        visibility: hidden;
        transform: translateX(102%);
    }

    body.nav-open .nav-panel { visibility: visible; transform: none; }

    .nav-panel__head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        position: sticky;
        top: 0;
        z-index: 2;
        padding: 18px 0;
        background: #fff;
        border-bottom: 1px solid var(--line);
    }
    .nav-panel__title { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; color: var(--blue-900); }

    .nav-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border: 1px solid var(--line);
        border-radius: 10px;
        background: #fff;
        color: var(--ink);
        font-size: 1rem;
        cursor: pointer;
    }

    .bm-menu { flex-direction: column; align-items: stretch; gap: 0; padding-top: 8px; }
    .bm-menu__item { border-bottom: 1px solid var(--line); }
    .bm-menu__item:last-child { border-bottom: 0; }

    .bm-menu__link {
        justify-content: space-between;
        width: 100%;
        padding: 14px 2px;
        font-size: .8rem;
        border-radius: 0;
    }

    .bm-submenu {
        position: static;
        display: none;
        min-width: 0;
        padding: 0 0 10px 14px;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .bm-menu__item.is-open > .bm-submenu { display: block; }
    .bm-menu__item:hover > .bm-submenu { display: none; }
    .bm-menu__item.is-open:hover > .bm-submenu { display: block; }

    .bm-submenu .bm-menu__link { padding: 9px 2px; font-size: .86rem; }
    .bm-submenu .bm-menu__item { border-bottom: 0; }

    .bm-menu__item.is-open > .bm-menu__toggle .bm-chevron { transform: rotate(-135deg); }

    .nav-overlay {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 110;
        background: rgba(3, 10, 30, .55);
        opacity: 0;
        visibility: hidden;
    }
    body.nav-open .nav-overlay { opacity: 1; visibility: visible; }
    body.nav-open { overflow: hidden; }
}

@media (max-width: 960px) {
    .hero { padding-bottom: 110px; }
    .hero__grid { grid-template-columns: minmax(0, 1fr); }
    .hero-card { max-width: 520px; }

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

    .welcome__grid { grid-template-columns: minmax(0, 1fr); }
    .welcome__media { max-width: 620px; }

    .levels-grid { grid-template-columns: minmax(0, 1fr); }
    .level-card { max-width: 640px; }

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

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

    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }

    .bm-layout.has-sidebar { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 720px) {
    .topbar__inner { justify-content: center; }
    .topbar__list { justify-content: center; gap: 14px; }
    .topbar__social { display: none; }

    .site-header__inner { min-height: 76px; gap: 12px; }
    .brand { gap: 11px; min-width: 0; }
    .brand__mark { width: 52px; height: 52px; padding: 3px; }
    .brand__text { min-width: 0; }
    .brand__name { font-size: clamp(1.05rem, 3.8vw, 1.24rem); }
    .brand__kicker { font-size: .56rem; letter-spacing: .13em; }

    .hero__title { font-size: clamp(2.1rem, 9vw, 3rem); }

    .access { margin-top: -54px; }
    .access__grid { grid-template-columns: minmax(0, 1fr); padding: 10px; }

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

    .cta-band__inner { flex-direction: column; align-items: flex-start; }

    .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 30px; }
    .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
    .site-header__inner { gap: 10px; }
    .brand { gap: 9px; }
    .brand__mark { width: 44px; height: 44px; padding: 3px; }
    .brand__kicker { font-size: .52rem; letter-spacing: .11em; }
    .brand__name { font-size: .98rem; line-height: 1.08; }
    .brand__tag { display: none; }
    .nav-toggle { width: 42px; height: 42px; flex: none; }
    .hero__actions .bm-btn { width: 100%; }
    .welcome__badge { position: static; margin-top: 14px; max-width: none; }
    .welcome__media { padding: 0; }
}

@media (max-width: 370px) {
    .brand__mark { width: 40px; height: 40px; }
    .brand__kicker { font-size: .48rem; }
    .brand__name { font-size: .9rem; }
    .nav-toggle { width: 40px; height: 40px; }
}

/* --------------------------------------------------------------------------
   Páginas de error y mantenimiento
   -------------------------------------------------------------------------- */

.bm-error__main {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 48px 0;
    background: var(--soft);
}

.bm-error__card {
    max-width: 640px;
    margin-inline: auto;
    padding: clamp(28px, 5vw, 48px);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.bm-error__card .brand { margin-bottom: 8px; }

.bm-error__code {
    margin: 26px 0 6px;
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 4.6rem);
    font-weight: 700;
    line-height: 1;
    color: var(--red);
}

.bm-error__card h1 { margin: 0 0 10px; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.bm-error__text { margin-bottom: 26px; color: var(--muted); }
.bm-error__actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ==========================================================================
   Ajustes de identidad: rojo institucional dominante
   ========================================================================== */

:root {
    --red-soft: #fdecec;
    --red-ink: #7a0202;
}

.topbar {
    background: linear-gradient(90deg, var(--red-dark) 0%, var(--red) 100%);
    color: rgba(255, 255, 255, .86);
}
.topbar a:hover { color: var(--yellow); }
.topbar__social a:hover { color: var(--yellow); }

.btn-primary,
.btn.btn-primary {
    background-color: var(--red);
    border-color: var(--red);
}
.btn-primary:hover,
.btn.btn-primary:hover {
    background-color: var(--red-dark);
    border-color: var(--red-dark);
}

.bm-btn--outline {
    border-color: var(--red);
    color: var(--red);
}
.bm-btn--outline:hover {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
}

.hero {
    background-color: var(--blue-900);
    background-image:
        radial-gradient(circle at 82% 18%, rgba(224, 4, 4, .38) 0%, rgba(224, 4, 4, .10) 34%, transparent 60%),
        linear-gradient(112deg, rgba(3, 26, 77, .97) 0%, rgba(3, 26, 77, .90) 52%, rgba(3, 26, 77, .70) 100%),
        var(--hero-img, none);
}
.hero .eyebrow--light .eyebrow__dot {
    background: var(--red);
    box-shadow: 0 0 0 4px rgba(224, 4, 4, .20);
}
.hero::after { background: radial-gradient(circle, rgba(239, 247, 0, .18) 0%, transparent 66%); }

.page-hero {
    background:
        radial-gradient(circle at 88% 14%, rgba(224, 4, 4, .32) 0%, rgba(224, 4, 4, .08) 38%, transparent 58%),
        linear-gradient(112deg, rgba(3, 26, 77, .98) 0%, rgba(3, 26, 77, .94) 58%, rgba(3, 26, 77, .86) 100%);
}

.site-footer { border-top: 4px solid var(--red); }

.section-head .section-title { position: relative; }
.section-head .section-title::after {
    content: '';
    display: block;
    width: 58px;
    height: 4px;
    margin-top: 14px;
    border-radius: 999px;
    background: var(--red);
}
.section-head--center .section-title::after { margin-inline: auto; }
.features .section-title::after { background: var(--yellow); }

.access__item:hover { border-color: rgba(224, 4, 4, .38); }
.level-card__link { color: var(--red); }
.level-card__link:hover { color: var(--red-dark); }
.checklist i { color: var(--red); }
.article-info i { color: var(--red); }
.news-card__tag { background: var(--red-soft); color: var(--red-ink); }
.news-card__link { color: var(--red); }
.news-card__link:hover { color: var(--red-dark); }
.form-control:focus,
.form-select:focus {
    border-color: rgba(224, 4, 4, .55);
    box-shadow: 0 0 0 .2rem rgba(224, 4, 4, .12);
}
.pagination .page-item.active .page-link {
    background-color: var(--red);
    border-color: var(--red);
}

/* ==========================================================================
   Contenido editorial de las páginas internas
   ========================================================================== */

.bm-content .article-info { display: none; }

.article-lead {
    max-width: 74ch;
    margin: 0 0 1.6em;
    font-size: clamp(1.04rem, 1.5vw, 1.18rem);
    line-height: 1.7;
    color: var(--muted);
}

.article-section { margin: 2.3em 0; }

.article-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--red);
    font-size: .69rem;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.article-section h2 { margin-top: .1em; }

.history-highlight {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 1.6em 0 2.2em;
}
.history-highlight > div {
    padding: 22px;
    border-radius: 18px;
    background: linear-gradient(180deg, #fff 0%, #fff8f8 100%);
    border: 1px solid var(--line);
    border-top: 4px solid var(--red);
    box-shadow: var(--shadow);
}
.history-highlight strong {
    display: block;
    margin-bottom: 6px;
    font-family: var(--font-display);
    font-size: 2rem;
    line-height: 1;
    color: var(--red);
}
.history-highlight span { display: block; color: var(--muted); font-size: .88rem; line-height: 1.5; }

.timeline {
    position: relative;
    display: grid;
    gap: 20px;
    margin: 1.8em 0 2.4em;
    padding-left: 32px;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 9px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    border-radius: 2px;
    background: linear-gradient(var(--red), var(--blue));
    opacity: .28;
}
.timeline__item { position: relative; }
.timeline__item::before {
    content: '';
    position: absolute;
    left: -29px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--red);
    box-shadow: 0 0 0 4px #fff;
}
.timeline__year {
    display: inline-block;
    margin-bottom: 2px;
    color: var(--red);
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.timeline__item h3 { margin: 2px 0 4px; font-size: 1.05rem; }
.timeline__item p { margin: 0; color: var(--muted); font-size: .92rem; }

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin: 1.6em 0;
}
.info-card {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow);
}
.info-card--wide { grid-column: 1 / -1; }
.info-card__icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin-bottom: 14px;
    border-radius: 14px;
    background: var(--red-soft);
    color: var(--red);
    font-size: 1.1rem;
}
.info-card h3 { margin: 0 0 8px; font-size: 1.06rem; }
.info-card p { margin: 0; color: var(--muted); font-size: .93rem; }

.person-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin: 1.7em 0;
}
.person-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(150px, 180px) minmax(0, 1fr);
    gap: 22px;
    align-items: stretch;
    padding: 24px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow);
}
.person-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 6px;
    background: linear-gradient(90deg, var(--red), var(--yellow));
}
.person-card__monogram {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    border-radius: 50%;
    background: var(--red-soft);
    color: var(--red);
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
}
.person-card__photo {
    width: 100%;
    min-height: 270px;
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--soft);
    box-shadow: 0 8px 20px rgba(15, 23, 42, .10);
}
.person-card__photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 18%;
}
.person-card__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}
.person-card__body .article-eyebrow { margin-bottom: 6px; }
.person-card h2 { margin-top: 0; font-size: 1.35rem; }
.person-card__body p { margin-bottom: 0; }
.person-card p { margin-bottom: 0; color: var(--muted); }

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 1.2em 0;
    padding: 0;
    list-style: none;
}
.chips li {
    margin: 0;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--red-soft);
    color: var(--red-ink);
    font-size: .82rem;
    font-weight: 700;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 1.6em 0;
}
.gallery-item {
    margin: 0;
    overflow: hidden;
    border-radius: 16px;
    background: var(--soft);
    border: 1px solid var(--line);
}
.gallery-item img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform .4s ease;
}
.gallery-item:hover img { transform: scale(1.04); }
.gallery-item figcaption { padding: 10px 12px; color: var(--muted); font-size: .76rem; }
.gallery-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gallery-grid.gallery-grid--single { grid-template-columns: minmax(0, 620px); justify-content: center; }
.gallery-item--contain img { object-fit: contain; background: #fff; }
.gallery-item--contain:hover img { transform: none; }

.gallery-item__zoom {
    position: relative;
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    line-height: 0;
    cursor: zoom-in;
    -webkit-appearance: none;
    appearance: none;
}
.gallery-item__zoom::after {
    content: 'Ampliar';
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 1;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(3, 10, 30, .78);
    color: #fff;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .04em;
    line-height: 1;
    pointer-events: none;
    transition: background .2s ease, transform .2s ease;
}
.gallery-item__zoom:hover::after,
.gallery-item__zoom:focus-visible::after { background: var(--red); transform: translateY(-2px); }
.gallery-item__zoom:focus-visible { outline: 3px solid var(--yellow); outline-offset: -3px; }
.gallery-item .gallery-item__zoom { cursor: zoom-in; }
@media (hover: hover) {
    .gallery-item__zoom::after { opacity: 0; transform: translateY(4px); }
    .gallery-item__zoom:hover::after,
    .gallery-item__zoom:focus-visible::after { opacity: 1; transform: none; }
}
body.lightbox-open { overflow: hidden; }

.bm-lightbox {
    width: min(96vw, 1400px);
    max-width: none;
    max-height: 92vh;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 20px;
    background: #fff;
    color: var(--ink);
    box-shadow: 0 30px 90px rgba(3, 10, 30, .45);
}
.bm-lightbox[open] { display: flex; flex-direction: column; }
.bm-lightbox::backdrop { background: rgba(3, 10, 30, .86); backdrop-filter: blur(3px); }
.bm-lightbox__stage {
    display: grid;
    flex: 1 1 auto;
    place-items: center;
    min-height: 0;
    padding: 12px;
    overflow: auto;
    background: #0b1220;
}
.bm-lightbox__image {
    display: block;
    max-width: 100%;
    max-height: calc(92vh - 100px);
    width: auto;
    height: auto;
    object-fit: contain;
    cursor: zoom-in;
}
.bm-lightbox__stage.is-zoomed {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
}
.bm-lightbox__stage.is-zoomed .bm-lightbox__image {
    flex: 0 0 auto;
    margin: 0;
    max-width: none;
    max-height: none;
    cursor: zoom-out;
}
.bm-lightbox__close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .96);
    color: var(--ink);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(3, 10, 30, .25);
}
.bm-lightbox__close:hover { background: var(--red); color: #fff; }
.bm-lightbox__close:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.bm-lightbox__footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    padding: 12px 18px;
    border-top: 1px solid var(--line);
    background: #fff;
}
.bm-lightbox__meta { flex: 1 1 220px; min-width: 0; }
.bm-lightbox__caption { margin: 0; color: var(--ink); font-size: .9rem; font-weight: 700; }
.bm-lightbox__hint { display: block; margin-top: 2px; color: var(--muted); font-size: .72rem; }
.bm-lightbox__original { flex: 0 0 auto; color: var(--red); font-size: .8rem; font-weight: 800; text-decoration: underline; text-underline-offset: 2px; }
.bm-lightbox__original:hover { color: var(--red-ink); }
@media (max-width: 560px) {
    .bm-lightbox {
        width: 100vw;
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
    }
    .bm-lightbox__image { max-height: calc(100dvh - 120px); }
    .bm-lightbox__footer { padding: 10px 14px; }
    .bm-lightbox__close { top: 8px; right: 8px; }
}

.table-wrap {
    margin: 1.5em 0;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
}
.bm-content .schedule-table {
    width: 100%;
    min-width: 760px;
    margin: 0;
    border-collapse: collapse;
    font-size: .87rem;
}
.bm-content .schedule-table th {
    padding: 13px 14px;
    background: var(--red);
    color: #fff;
    border: 0;
    font-size: .72rem;
    letter-spacing: .09em;
    text-transform: uppercase;
    white-space: nowrap;
}
.bm-content .schedule-table td {
    padding: 12px 14px;
    border: 0;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    vertical-align: top;
}
.bm-content .schedule-table tbody tr:nth-child(even) { background: #fafbfe; }
.bm-content .schedule-table tbody tr:hover { background: #fff5f5; }
.bm-content .schedule-table td:first-child { color: var(--red); font-weight: 800; }
.schedule-signature { margin-top: 1.4em; color: var(--muted); font-size: .86rem; line-height: 1.5; }

.steps {
    display: grid;
    gap: 14px;
    margin: 1.6em 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
}
.steps li {
    position: relative;
    margin: 0;
    padding: 18px 20px 18px 64px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(3, 26, 77, .05);
}
.steps li::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 18px;
    top: 50%;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--red);
    color: #fff;
    font-size: .82rem;
    font-weight: 800;
    transform: translateY(-50%);
}

.callout {
    display: flex;
    gap: 14px;
    margin: 1.7em 0;
    padding: 20px 22px;
    border-left: 5px solid var(--red);
    border-radius: 16px;
    background: var(--soft);
}
.callout--red { background: #fff5f5; }
.callout__icon { flex: none; color: var(--red); font-size: 1.2rem; }
.callout strong { display: block; margin-bottom: 4px; color: var(--blue-900); }
.callout p { margin: 0 0 12px; color: var(--muted); }
.callout p:last-child { margin-bottom: 0; }

.uniform-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin: 1.5em 0;
}
.uniform-card {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow);
}
.uniform-card__tag {
    display: inline-block;
    margin-bottom: 10px;
    padding: 5px 11px;
    border-radius: 999px;
    background: var(--red-soft);
    color: var(--red-ink);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.uniform-card h3 { margin-top: 0; }
.uniform-card h4 { color: var(--red); }
.uniform-note { margin: 12px 0 0; color: var(--muted); font-size: .82rem; font-style: italic; }
.checklist { margin: 0.8em 0 0; padding: 0; list-style: none; }
.checklist li { display: flex; gap: 9px; margin-bottom: .45em; color: var(--ink); }
.checklist li::before { content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900; color: var(--red); font-size: .8em; margin-top: .35em; }

.payment-code {
    margin: 4px 0 10px;
    font-family: var(--font-display);
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1;
    color: var(--red);
}

.club-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 1.6em 0;
}
.club-card {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.club-card:hover {
    transform: translateY(-3px);
    border-color: rgba(224, 4, 4, .3);
    box-shadow: var(--shadow);
}
.club-card__icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-bottom: 12px;
    border-radius: 12px;
    background: var(--red-soft);
    color: var(--red);
}
.club-card h3 { margin: 0 0 8px; font-size: 1.02rem; }
.club-card p { margin: 0; color: var(--muted); font-size: .87rem; line-height: 1.65; }

.event-grid { display: grid; gap: 18px; margin: 1.6em 0; }
.event-card {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 22px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--shadow);
}
.event-card__date {
    display: grid;
    place-items: center;
    align-content: center;
    padding: 14px;
    border-radius: 14px;
    background: linear-gradient(160deg, var(--red), var(--red-dark));
    color: #fff;
    text-align: center;
}
.event-card__date strong { display: block; font-family: var(--font-display); font-size: 1.9rem; line-height: 1; }
.event-card__date span { display: block; margin-top: 4px; font-size: .66rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.event-card h3 { margin: 0 0 7px; }
.event-card p { margin: 0 0 .7em; color: var(--muted); font-size: .92rem; }
.event-card p:last-child { margin-bottom: 0; }
.event-card__tag {
    display: inline-block;
    margin-bottom: 7px;
    color: var(--red);
    font-size: .67rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin: 1.6em 0;
}
.project-card {
    padding: 24px;
    border: 1px solid var(--line);
    border-top: 4px solid var(--red);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow);
}
.project-card__icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-bottom: 12px;
    border-radius: 12px;
    background: var(--red-soft);
    color: var(--red);
}
.project-card h3 { margin: 0 0 8px; color: var(--red-ink); font-size: 1.15rem; }
.project-card p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.68; }

.hymn {
    margin: 1.7em 0;
    padding: clamp(24px, 4vw, 42px);
    border: 1px solid var(--line);
    border-radius: 24px;
    background: linear-gradient(160deg, #fff 0%, #fff7f7 100%);
    box-shadow: var(--shadow);
}
.hymn__head { display: flex; align-items: center; gap: 20px; margin-bottom: 24px; }
.hymn__head img { width: 78px; height: 78px; object-fit: contain; }
.hymn__head h2 { margin: 0 0 5px; }
.hymn__credits { margin: 0; color: var(--muted); font-size: .84rem; }
.hymn__verse { padding: 18px 0; border-top: 1px solid var(--line); }
.hymn__label {
    display: inline-block;
    margin-bottom: 7px;
    color: var(--red);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
}
.hymn__verse p {
    margin: 0;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 1.04rem;
    line-height: 1.82;
    white-space: pre-line;
}

.symbol-card {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    align-items: center;
    gap: 26px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--shadow);
}
.symbol-card img { width: 100%; max-height: 150px; object-fit: contain; }

.quote-card {
    position: relative;
    margin: 1.6em 0;
    padding: 32px 32px 28px 58px;
    border-left: 5px solid var(--red);
    border-radius: 20px;
    background: var(--soft);
}
.quote-card::before {
    content: '\201C';
    position: absolute;
    left: 18px;
    top: 6px;
    color: var(--red);
    font-family: var(--font-display);
    font-size: 4rem;
    line-height: 1;
    opacity: .24;
}
.quote-card p { margin: 0; color: var(--ink); font-size: 1.02rem; font-style: italic; }
.quote-card cite { display: block; margin-top: 12px; color: var(--red-ink); font-size: .83rem; font-style: normal; font-weight: 700; }

.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 1.6em 0;
}
.contact-card {
    display: flex;
    gap: 14px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(3, 26, 77, .05);
}
.contact-card__icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--red-soft);
    color: var(--red);
}
.contact-card strong { display: block; margin-bottom: 2px; color: var(--blue-900); font-size: .87rem; }
.contact-card span,
.contact-card a { color: var(--muted); font-size: .88rem; text-decoration: none; }
.contact-card a:hover { color: var(--red); }

.contact-actions,
.article-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 1.5em 0 0;
}
.article-cta { padding-top: 1.3em; border-top: 1px solid var(--line); }

/* ==========================================================================
   Responsive de los componentes editoriales
   ========================================================================== */

@media (max-width: 1160px) {
    .person-grid { grid-template-columns: 1fr; max-width: 920px; margin-inline: auto; }
    .person-card { grid-template-columns: minmax(200px, 220px) minmax(0, 1fr); }
}

@media (max-width: 980px) {
    .history-highlight { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
    .person-grid { grid-template-columns: 1fr; }
    .info-grid { grid-template-columns: 1fr; }
    .uniform-grid { grid-template-columns: 1fr; }
    .club-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .project-grid { grid-template-columns: 1fr; }
    .history-highlight { grid-template-columns: 1fr; gap: 12px; }
    .symbol-card { grid-template-columns: 1fr; text-align: center; }
    .symbol-card img { max-height: 120px; margin-inline: auto; }
}

@media (max-width: 720px) {
    .article-lead { font-size: 1rem; }
    .article-section { margin: 1.9em 0; }
    .timeline { padding-left: 26px; }
    .timeline::before { left: 6px; }
    .timeline__item::before { left: -26px; }
    .event-card { grid-template-columns: 1fr; gap: 14px; }
    .event-card__date {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        padding: 10px 14px;
    }
    .event-card__date strong { font-size: 1.45rem; }
    .event-card__date span { margin-top: 0; }
    .hymn__head { align-items: flex-start; flex-direction: column; gap: 12px; }
    .hymn__head img { width: 62px; height: 62px; }
    .quote-card { padding: 26px 22px 22px 48px; }
    .quote-card::before { left: 12px; font-size: 3.2rem; }
    .callout { flex-direction: column; gap: 8px; }
    .steps li { padding: 16px 16px 16px 54px; }
    .steps li::before { left: 14px; }
    .article-cta,
    .contact-actions { gap: 10px; }
}

@media (max-width: 560px) {
    .gallery-grid,
    .gallery-grid.gallery-grid--single { grid-template-columns: 1fr; }
    .gallery-item figcaption { font-size: .74rem; }
    .person-card { grid-template-columns: 1fr; gap: 18px; padding: 20px; }
    .person-card__photo { min-height: 0; aspect-ratio: 4 / 3; }
    .person-card__body { justify-content: flex-start; }
    .hymn { padding: 20px 18px; }
    .hymn__verse p { font-size: .98rem; line-height: 1.75; }
    .history-highlight > div { padding: 18px; }
    .info-card,
    .uniform-card,
    .club-card,
    .project-card,
    .event-card { padding: 18px; }
    .contact-card { padding: 16px; }
    .article-cta .bm-btn,
    .contact-actions .bm-btn { width: 100%; justify-content: center; }
    .table-wrap { border-radius: 12px; }
    .bm-content .schedule-table { font-size: .82rem; }
    .bm-content .schedule-table th,
    .bm-content .schedule-table td { padding: 10px 11px; }
}

/* --------------------------------------------------------------------------
   Impresión
   -------------------------------------------------------------------------- */

@media print {
    .topbar, .site-header, .nav-overlay, .site-footer, .hero__actions, .cta-band { display: none !important; }
    body { color: #000; background: #fff; }
    .page-hero { background: none; color: #000; padding: 0 0 12px; }
    .page-hero h1 { color: #000; }
    .bm-main { padding: 0; }
}
