/* ==================================================================
   Centro Educativo Maranatha - Hoja de estilo institucional
   ------------------------------------------------------------------
   Los colores llegan como variables CSS (--m-*) generadas desde el
   panel (App\Services\Theme). Este archivo define el sistema visual:
   tipografia, navegacion, hero, tarjetas, pie y panel administrativo.
   Cambiar un color en el panel reajusta toda la interfaz.
   ================================================================== */

:root {
    /* Paleta base (valores de respaldo si el panel no emite variables) */
    --m-primary: #0d4781;
    --m-primary-dark: #08305c;
    --m-primary-soft: #e7eef7;
    --m-primary-tint: #c2d4e8;
    --m-primary-deep: #0a3a69;
    --m-primary-rgb: 13, 71, 129;
    --m-accent: #f2b705;
    --m-accent-soft: #fdf3d4;
    --m-accent-rgb: 242, 183, 5;
    --m-accent-text: #1a1a1a;
    --m-link: #0d4781;

    /* Neutros y superficies */
    --m-ink: #101f2e;
    --m-muted: #5b6b7c;
    --m-line: #e3e9f1;
    --m-surface: #ffffff;
    --m-surface-alt: #f5f8fc;

    /* Formas y elevacion */
    --m-gradient: linear-gradient(135deg, #08305c 0%, #0d4781 58%, #0a3a69 100%);
    --m-radius: 20px;
    --m-radius-sm: 12px;
    --m-shadow-sm: 0 2px 10px rgba(10, 28, 50, .06);
    --m-shadow: 0 14px 34px rgba(10, 28, 50, .10);
    --m-shadow-lg: 0 28px 64px rgba(10, 28, 50, .18);
    --m-ring: 0 0 0 .25rem rgba(13, 71, 129, .18);
}

/* ------------------------------------------------------------------
   1. Base
   ------------------------------------------------------------------ */
html {
    scroll-behavior: smooth;
}

body {
    font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    color: var(--m-ink);
    background-color: var(--m-surface-alt);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    color: var(--m-ink);
    letter-spacing: -.015em;
}

/* Titulos sobre superficies institucionales: heredan el color claro del
   contenedor (encabezados de admisiones, noticias, eventos, galeria, etc.). */
.bg-primary :is(h1, h2, h3, h4, h5, h6),
.text-white :is(h1, h2, h3, h4, h5, h6),
.hero :is(h1, h2, h3),
.page-hero :is(h1, h2, h3),
.cta-band :is(h1, h2, h3) {
    color: inherit;
}

/* Encabezados de seccion de las paginas no administrables: mismo degradado
   institucional que las paginas construidas con bloques. */
section.bg-primary.text-white {
    background: var(--m-gradient) !important;
}

p {
    line-height: 1.7;
}

a {
    color: var(--m-link);
    text-decoration-color: color-mix(in srgb, var(--m-link) 35%, transparent);
    text-underline-offset: .18em;
}

a:hover,
a:focus {
    color: var(--m-primary-dark);
}

::selection {
    background: var(--m-accent);
    color: var(--m-accent-text);
}

:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--m-primary) 55%, white);
    outline-offset: 2px;
}

.m-icon {
    display: inline-block;
    vertical-align: -.18em;
    flex: 0 0 auto;
}

.icon-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: var(--m-primary-soft);
    color: var(--m-primary);
    flex: 0 0 auto;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 2000;
    padding: .75rem 1.25rem;
    background: var(--m-accent);
    color: var(--m-accent-text);
    font-weight: 700;
    border-radius: 0 0 var(--m-radius-sm) 0;
}

.skip-link:focus {
    left: 0;
}

/* Compatibilidad con utilidades de Bootstrap */
.bg-primary {
    background-color: var(--m-primary) !important;
}

.text-primary {
    color: var(--m-primary) !important;
}

.border-primary {
    border-color: var(--m-primary) !important;
}

.bg-accent {
    background-color: var(--m-accent) !important;
    color: var(--m-accent-text);
}

.text-accent {
    color: var(--m-accent) !important;
}

/* ------------------------------------------------------------------
   2. Botones
   ------------------------------------------------------------------ */
.btn {
    --bs-btn-font-weight: 600;
    border-radius: 999px;
    padding: .6rem 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease;
}

.btn-lg {
    padding: .8rem 1.6rem;
    font-size: 1rem;
}

.btn-sm {
    padding: .4rem .9rem;
    font-size: .82rem;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    --bs-btn-bg: var(--m-primary);
    --bs-btn-border-color: var(--m-primary);
    --bs-btn-hover-bg: var(--m-primary-dark);
    --bs-btn-hover-border-color: var(--m-primary-dark);
    --bs-btn-active-bg: var(--m-primary-dark);
    --bs-btn-active-border-color: var(--m-primary-dark);
    --bs-btn-disabled-bg: var(--m-primary);
    --bs-btn-disabled-border-color: var(--m-primary);
    box-shadow: 0 10px 24px rgba(var(--m-primary-rgb), .22);
}

.btn-outline-primary {
    --bs-btn-color: var(--m-primary);
    --bs-btn-border-color: color-mix(in srgb, var(--m-primary) 45%, white);
    --bs-btn-hover-bg: var(--m-primary);
    --bs-btn-hover-border-color: var(--m-primary);
    --bs-btn-active-bg: var(--m-primary-dark);
    --bs-btn-active-border-color: var(--m-primary-dark);
    --bs-btn-disabled-color: var(--m-muted);
}

.btn-warning,
.btn-accent {
    --bs-btn-color: var(--m-accent-text);
    --bs-btn-bg: var(--m-accent);
    --bs-btn-border-color: var(--m-accent);
    --bs-btn-hover-color: var(--m-accent-text);
    --bs-btn-hover-bg: color-mix(in srgb, var(--m-accent) 88%, white);
    --bs-btn-hover-border-color: color-mix(in srgb, var(--m-accent) 88%, white);
    --bs-btn-active-color: var(--m-accent-text);
    --bs-btn-active-bg: color-mix(in srgb, var(--m-accent) 82%, black);
    --bs-btn-active-border-color: color-mix(in srgb, var(--m-accent) 82%, black);
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(var(--m-accent-rgb), .28);
}

.btn-ghost-light {
    --bs-btn-color: #fff;
    --bs-btn-border-color: rgba(255, 255, 255, .5);
    --bs-btn-hover-color: var(--m-primary-dark);
    --bs-btn-hover-bg: #fff;
    --bs-btn-hover-border-color: #fff;
    --bs-btn-active-color: var(--m-primary-dark);
    --bs-btn-active-bg: #fff;
}

.btn-whatsapp {
    --bs-btn-color: #fff;
    --bs-btn-bg: #1faa53;
    --bs-btn-border-color: #1faa53;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #178c44;
    --bs-btn-hover-border-color: #178c44;
    --bs-btn-active-bg: #178c44;
    --bs-btn-active-border-color: #178c44;
}

.btn .m-icon {
    vertical-align: 0;
}

/* ------------------------------------------------------------------
   3. Formularios
   ------------------------------------------------------------------ */
.form-label {
    font-weight: 600;
    font-size: .9rem;
    color: var(--m-ink);
}

.form-control,
.form-select {
    border-radius: var(--m-radius-sm);
    border-color: var(--m-line);
    padding: .68rem .9rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--m-primary);
    box-shadow: var(--m-ring);
}

.form-check-input:checked {
    background-color: var(--m-primary);
    border-color: var(--m-primary);
}

.form-text {
    color: var(--m-muted);
}

/* ------------------------------------------------------------------
   4. Cabecera publica
   ------------------------------------------------------------------ */
.site-topbar {
    background: var(--m-primary-dark);
    color: rgba(255, 255, 255, .82);
    font-size: .8rem;
}

.site-topbar a {
    color: rgba(255, 255, 255, .86);
    text-decoration: none;
}

.site-topbar a:hover {
    color: #fff;
}

.topbar-list {
    gap: 1.25rem;
}

.topbar-list li {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}

.topbar-list .m-icon {
    opacity: .7;
}

.social-mini {
    display: inline-flex;
    gap: .25rem;
}

.social-mini a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
}

.social-mini a:hover {
    background: rgba(255, 255, 255, .22);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: #fff;
    border-bottom: 1px solid var(--m-line);
    box-shadow: 0 6px 22px rgba(10, 28, 50, .05);
}

.site-header .navbar {
    padding: .7rem 0;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    text-decoration: none;
    position: relative;
}

.brand-logo {
    display: block;
    max-height: 54px;
    width: auto;
    transform-origin: center;
    transition: transform .25s ease;
}

/* Al pasar el mouse o enfocar con el teclado, el logo crece un poco. */
.site-brand:hover .brand-logo,
.site-brand:focus-visible .brand-logo {
    transform: scale(1.08);
}

/* El logotipo de la cabecera se dibuja mas grande que su caja: los margenes
   negativos compensan el alto extra, asi la cabecera no crece y el logo queda
   superpuesto sobre el espacio libre de arriba y abajo. */
.site-header .brand-logo {
    height: 84px;
    max-height: none;
    margin: -6px 0;
    position: relative;
    z-index: 2;
}

.site-header .site-brand {
    overflow: visible;
}

.brand-monogram {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 16px;
    background: var(--m-gradient);
    color: #fff;
    font-weight: 800;
    letter-spacing: -.03em;
    font-size: 1rem;
    box-shadow: var(--m-shadow-sm);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.12;
}

.brand-name {
    font-weight: 800;
    color: var(--m-ink);
    font-size: 1.02rem;
    letter-spacing: -.02em;
}

.brand-tagline {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--m-muted);
    margin-top: .2rem;
}

.nav-toggle {
    border: 0;
    background: transparent;
    color: var(--m-ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
}

.nav-toggle:hover {
    background: var(--m-primary-soft);
    color: var(--m-primary);
}

.nav-main {
    gap: .1rem;
    align-items: center;
}

.nav-main .nav-link {
    position: relative;
    color: var(--m-ink);
    font-weight: 600;
    font-size: .84rem;
    letter-spacing: .015em;
    padding: .6rem .6rem;
    white-space: nowrap;
}

.nav-main .nav-link::after {
    content: "";
    position: absolute;
    left: .6rem;
    right: .6rem;
    bottom: .3rem;
    height: 2px;
    border-radius: 2px;
    background: var(--m-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .18s ease;
}

.nav-main .nav-link:hover,
.nav-main .nav-link:focus,
.nav-main .nav-link.active {
    color: var(--m-primary);
}

.nav-main .nav-link:hover::after,
.nav-main .nav-link:focus::after,
.nav-main .nav-link.active::after {
    transform: scaleX(1);
}

.nav-main .dropdown-toggle::after {
    display: none;
}

.nav-main .dropdown-toggle .m-icon {
    margin-left: .15rem;
    transition: transform .18s ease;
}

.nav-main .dropdown-toggle[aria-expanded="true"] .m-icon {
    transform: rotate(180deg);
}

.dropdown-menu {
    border: 1px solid var(--m-line);
    border-radius: 16px;
    padding: .45rem;
    box-shadow: var(--m-shadow);
    min-width: 15rem;
}

.dropdown-item {
    border-radius: 10px;
    padding: .55rem .7rem;
    font-size: .9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: .6rem;
    color: var(--m-ink);
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: var(--m-primary-soft);
    color: var(--m-primary);
}

.dropdown-item .m-icon {
    color: var(--m-primary);
    opacity: .85;
}

.dropdown-header {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--m-muted);
    padding: .55rem .7rem .25rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.nav-more .dropdown-menu {
    min-width: 17rem;
}

@media (min-width: 992px) {
    .nav-main .dropdown:hover > .dropdown-menu {
        display: block;
        margin-top: 0;
    }
}

/* ------------------------------------------------------------------
   5. Navegacion movil y tablet (offcanvas)
   ------------------------------------------------------------------ */
.mobile-nav {
    --bs-offcanvas-width: 340px;
    border-left: 0;
    background: #fff;
}

.mobile-nav .offcanvas-header {
    background: var(--m-gradient);
    color: #fff;
    padding: 1.15rem 1.25rem;
    align-items: center;
}

.mobile-nav .brand-name,
.mobile-nav .brand-tagline {
    color: #fff;
}

.mobile-nav .brand-tagline {
    opacity: .7;
}

.mobile-nav .btn-close {
    filter: invert(1) grayscale(1) brightness(2);
    opacity: .8;
}

.mobile-nav .offcanvas-body {
    display: flex;
    flex-direction: column;
    padding: 1rem .85rem 1.5rem;
}

.mobile-nav-list {
    gap: .15rem;
}

.mobile-nav-list .nav-link {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: .7rem .7rem;
    border-radius: 14px;
    color: var(--m-ink);
    font-weight: 600;
    font-size: .96rem;
    line-height: 1.25;
}

.mobile-nav-list .nav-link:hover,
.mobile-nav-list .nav-link:focus,
.mobile-nav-list .nav-link.active {
    background: var(--m-primary-soft);
    color: var(--m-primary);
}

.mobile-nav-list .nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--m-primary-soft);
    color: var(--m-primary);
    flex: 0 0 auto;
}

.mobile-nav-list .nav-link:hover .nav-icon,
.mobile-nav-list .nav-link.active .nav-icon {
    background: var(--m-primary);
    color: #fff;
}

.mobile-nav-list .nav-arrow {
    margin-left: auto;
    color: var(--m-muted);
    opacity: .7;
}

.mobile-subnav {
    list-style: none;
    margin: .1rem 0 .4rem 1.9rem;
    padding: .1rem 0 .1rem .9rem;
    border-left: 2px solid var(--m-line);
}

.mobile-subnav a {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .5rem .35rem;
    font-size: .9rem;
    color: var(--m-muted);
    text-decoration: none;
    border-radius: 10px;
}

.mobile-subnav a:hover {
    color: var(--m-primary);
    background: var(--m-primary-soft);
}

.mobile-contact {
    margin-top: auto;
    padding-top: 1.25rem;
    border-top: 1px solid var(--m-line);
    display: grid;
    gap: .6rem;
    font-size: .88rem;
    color: var(--m-muted);
}

.mobile-contact a {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    color: var(--m-ink);
    text-decoration: none;
}

.mobile-contact a:hover {
    color: var(--m-primary);
}

.mobile-social {
    display: flex;
    gap: .4rem;
    margin-top: .4rem;
}

.mobile-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--m-primary-soft);
    color: var(--m-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ------------------------------------------------------------------
   6. Hero (portada y encabezados de seccion)
   ------------------------------------------------------------------ */
.hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background-color: var(--m-primary-dark);
    background-image: var(--m-hero-gradient, var(--m-gradient));
    padding: clamp(2.1rem, 4.6vw, 3.9rem) 0;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .14) 1px, transparent 1px);
    background-size: 22px 22px;
    opacity: .55;
    pointer-events: none;
}

.hero::after {
    content: "";
    position: absolute;
    width: 460px;
    height: 460px;
    right: -140px;
    top: -160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--m-accent-rgb), .34) 0%, transparent 62%);
    pointer-events: none;
}

.hero > .container {
    position: relative;
    z-index: 1;
}

/* Con foto se baja la intensidad del azul para que la imagen se aprecie.
   El primer degradado queda oscuro solo donde va el texto y se aclara
   hacia la derecha; el segundo refuerza la base para el boton y la tarjeta. */
.hero--image {
    background-image:
        linear-gradient(115deg, rgba(var(--m-primary-dark-rgb), .80) 0%, rgba(var(--m-primary-rgb), .52) 52%, rgba(var(--m-primary-dark-rgb), .20) 100%),
        linear-gradient(0deg, rgba(4, 20, 38, .38) 0%, rgba(4, 20, 38, 0) 55%),
        var(--hero-image);
    background-size: cover;
    background-position: center;
}

/* La trama de puntos baja su presencia cuando hay foto de fondo. */
.hero--image::before {
    opacity: .25;
}

.hero--compact {
    padding: clamp(1.3rem, 2.6vw, 2rem) 0;
}

.hero--compact .hero-title {
    font-size: clamp(1.5rem, 2.6vw, 2.1rem);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .4rem .9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .22);
    color: #fff;
    font-size: .78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: clamp(2rem, 4.4vw, 3.35rem);
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.08;
    color: #fff;
    text-wrap: balance;
}

.hero-lead {
    font-size: clamp(1rem, 1.4vw, 1.15rem);
    color: rgba(255, 255, 255, .86);
    max-width: 60ch;
    margin-top: 1rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: 1.6rem;
}

.hero-card {
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: var(--m-radius);
    padding: 1.5rem;
    backdrop-filter: blur(6px);
    box-shadow: 0 20px 48px rgba(4, 20, 38, .28);
}

.hero-card h2,
.hero-card h3 {
    color: #fff;
}

.hero-card .hero-card-row {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    padding: .55rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, .14);
    font-size: .92rem;
    color: rgba(255, 255, 255, .9);
}

.hero-card .hero-card-row:last-child {
    border-bottom: 0;
}

.hero-card .m-icon {
    opacity: .8;
    margin-top: .1rem;
}

.page-hero {
    position: relative;
    overflow: hidden;
    background: var(--m-gradient);
    color: #fff;
    padding: clamp(1rem, 2vw, 1.6rem) 0 clamp(1.1rem, 2.2vw, 1.7rem);
}

/* Icono y titulo en la misma linea */
.page-hero-head {
    display: flex;
    align-items: center;
    gap: .8rem;
    margin-bottom: .2rem;
}

.page-hero-head h1 {
    margin: 0;
}

.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .12) 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: .5;
    pointer-events: none;
}

/* Fondo fotografico administrable: la imagen se mezcla con el degradado
   institucional usando la opacidad elegida en el panel. */
.page-hero--image::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: var(--hero-image-opacity, .25);
    pointer-events: none;
}

/* Con foto de fondo la trama de puntos se atenua para no competir. */
.page-hero--image::before {
    opacity: .22;
}

.page-hero > .container {
    position: relative;
    z-index: 1;
}

.page-hero-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .2);
    color: #fff;
    flex: 0 0 auto;
}

.page-hero h1 {
    color: #fff;
    font-size: clamp(1.4rem, 2.4vw, 1.95rem);
    font-weight: 800;
    letter-spacing: -.025em;
    line-height: 1.15;
    margin: 0;
}

.page-hero .page-hero-lead {
    color: rgba(255, 255, 255, .84);
    max-width: 78ch;
    margin: .3rem 0 0;
    font-size: .94rem;
}

.breadcrumb-light {
    --bs-breadcrumb-divider-color: rgba(255, 255, 255, .45);
    font-size: .76rem;
    margin-bottom: .45rem;
}

.breadcrumb-light .breadcrumb-item,
.breadcrumb-light .breadcrumb-item a {
    color: rgba(255, 255, 255, .72);
    text-decoration: none;
}

.breadcrumb-light .breadcrumb-item a:hover {
    color: #fff;
}

.breadcrumb-light .breadcrumb-item.active {
    color: #fff;
    font-weight: 600;
}

/* ------------------------------------------------------------------
   7. Secciones, titulos y prosa
   ------------------------------------------------------------------ */
.section {
    padding: clamp(2.4rem, 5vw, 4.2rem) 0;
}

.section-alt {
    background: var(--m-surface-alt);
}

.section-head {
    max-width: 62ch;
    margin: 0 auto clamp(1.6rem, 3vw, 2.4rem);
    text-align: center;
}

.section-title {
    position: relative;
    font-size: clamp(1.45rem, 2.4vw, 2rem);
    font-weight: 800;
    letter-spacing: -.02em;
    margin-bottom: .75rem;
}

.section-title.centered {
    justify-content: center;
}

.section-title::after {
    content: "";
    display: block;
    width: 54px;
    height: 4px;
    border-radius: 4px;
    background: var(--m-accent);
    margin-top: .55rem;
}

.section-title.centered::after {
    margin-left: auto;
    margin-right: auto;
}

.section-title .section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--m-accent-soft);
    color: color-mix(in srgb, var(--m-accent) 55%, black);
    vertical-align: -14px;
    margin-right: .55rem;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--m-primary);
    margin-bottom: .5rem;
}

.prose {
    max-width: 78ch;
    color: color-mix(in srgb, var(--m-ink) 88%, white);
}

.prose h3,
.prose h4 {
    margin-top: 1.8rem;
    margin-bottom: .7rem;
    font-weight: 700;
}

.prose p {
    margin-bottom: 1rem;
}

.prose ul,
.prose ol {
    padding-left: 1.2rem;
    margin-bottom: 1rem;
}

.prose li {
    margin-bottom: .4rem;
}

.prose li::marker {
    color: var(--m-primary);
    font-weight: 700;
}

.prose strong {
    color: var(--m-ink);
}

.prose blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    border-left: 4px solid var(--m-accent);
    background: var(--m-primary-soft);
    border-radius: 0 var(--m-radius-sm) var(--m-radius-sm) 0;
    color: var(--m-ink);
}

.prose table {
    width: 100%;
    margin-bottom: 1rem;
}

.prose img {
    max-width: 100%;
    height: auto;
    border-radius: var(--m-radius-sm);
}

/* ------------------------------------------------------------------
   8. Tarjetas y piezas de contenido
   ------------------------------------------------------------------ */
.feature-card {
    height: 100%;
    background: #fff;
    border: 1px solid var(--m-line);
    border-radius: var(--m-radius);
    padding: 1.6rem;
    box-shadow: var(--m-shadow-sm);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--m-shadow);
    border-color: var(--m-primary-tint);
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: var(--m-primary-soft);
    color: var(--m-primary);
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.06rem;
    font-weight: 700;
    margin-bottom: .45rem;
}

.feature-body {
    color: var(--m-muted);
    font-size: .95rem;
}

.feature-body p:last-child {
    margin-bottom: 0;
}

.stat-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.stat {
    background: #fff;
    border: 1px solid var(--m-line);
    border-radius: var(--m-radius-sm);
    padding: 1.1rem 1.25rem;
    box-shadow: var(--m-shadow-sm);
}

.stat .stat-icon {
    color: var(--m-primary);
    margin-bottom: .4rem;
}

.stat .stat-value {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -.02em;
}

.stat .stat-label {
    font-size: .82rem;
    color: var(--m-muted);
}

.cta-band {
    position: relative;
    overflow: hidden;
    background: var(--m-gradient);
    color: #fff;
    border-radius: calc(var(--m-radius) + 4px);
    padding: clamp(1.8rem, 4vw, 3rem);
    box-shadow: var(--m-shadow);
}

.cta-band::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .13) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: .6;
    pointer-events: none;
}

.cta-band > * {
    position: relative;
    z-index: 1;
}

.cta-band h2 {
    color: #fff;
    font-weight: 800;
    letter-spacing: -.02em;
}

.cta-band p {
    color: rgba(255, 255, 255, .86);
}

.cta-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .2);
    color: #fff;
    margin-bottom: 1rem;
}

.contact-card {
    background: #fff;
    border: 1px solid var(--m-line);
    border-radius: var(--m-radius);
    padding: 1.5rem;
    box-shadow: var(--m-shadow-sm);
    height: 100%;
}

.contact-row {
    display: flex;
    align-items: flex-start;
    gap: .8rem;
    padding: .6rem 0;
    border-bottom: 1px dashed var(--m-line);
}

.contact-row:last-child {
    border-bottom: 0;
}

.contact-row .icon-chip {
    width: 38px;
    height: 38px;
    border-radius: 12px;
}

.contact-row .contact-label {
    display: block;
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--m-muted);
    margin-bottom: .1rem;
}

.contact-row .contact-value {
    font-weight: 600;
    color: var(--m-ink);
    word-break: break-word;
}

.contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 1rem;
}

.link-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.link-list li + li {
    border-top: 1px solid var(--m-line);
}

.link-list a {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .75rem .15rem;
    color: var(--m-ink);
    text-decoration: none;
    font-weight: 600;
    font-size: .94rem;
}

.link-list a .m-icon:first-child {
    color: var(--m-primary);
}

.link-list a .link-arrow {
    margin-left: auto;
    color: var(--m-muted);
    transition: transform .15s ease, color .15s ease;
}

.link-list a:hover {
    color: var(--m-primary);
}

.link-list a:hover .link-arrow {
    transform: translateX(3px);
    color: var(--m-primary);
}

.doc-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #fff;
    border: 1px solid var(--m-line);
    border-radius: var(--m-radius);
    padding: 1.15rem 1.3rem;
    box-shadow: var(--m-shadow-sm);
    transition: box-shadow .18s ease, border-color .18s ease;
}

.doc-card:hover {
    box-shadow: var(--m-shadow);
    border-color: var(--m-primary-tint);
}

.doc-card .doc-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--m-accent-soft);
    color: color-mix(in srgb, var(--m-accent) 50%, black);
    flex: 0 0 auto;
}

.doc-card h2,
.doc-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: .15rem;
}

.doc-card p {
    font-size: .86rem;
}

.gallery-item {
    display: block;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: var(--m-shadow-sm);
    background: #fff;
}

.gallery-item img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform .25s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-caption {
    display: block;
    padding: .55rem .8rem;
    font-size: .82rem;
    color: var(--m-muted);
}

.media-frame {
    border-radius: calc(var(--m-radius) + 4px);
    overflow: hidden;
    box-shadow: var(--m-shadow);
    border: 1px solid var(--m-line);
}

.media-frame img {
    display: block;
    width: 100%;
    height: auto;
}

/* Acordeon (preguntas frecuentes) */
.accordion {
    --bs-accordion-border-color: var(--m-line);
    --bs-accordion-border-radius: var(--m-radius-sm);
    --bs-accordion-active-bg: var(--m-primary-soft);
    --bs-accordion-active-color: var(--m-primary);
    --bs-accordion-btn-focus-box-shadow: var(--m-ring);
}

.accordion-item {
    border-radius: var(--m-radius-sm);
    overflow: hidden;
    margin-bottom: .6rem;
    border: 1px solid var(--m-line);
}

.accordion-button {
    font-weight: 600;
    color: var(--m-ink);
}

.accordion-button:not(.collapsed) {
    font-weight: 700;
}

/* ------------------------------------------------------------------
   9. Pie de pagina
   ------------------------------------------------------------------ */
.site-footer {
    position: relative;
    overflow: hidden;
    background: var(--m-gradient);
    color: rgba(255, 255, 255, .74);
    margin-top: auto;
}

.site-footer::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1px);
    background-size: 26px 26px;
    opacity: .5;
    pointer-events: none;
}

.site-footer > .container {
    position: relative;
    z-index: 1;
}

.footer-brand .brand-name {
    color: #fff;
}

.footer-brand .brand-tagline {
    color: rgba(255, 255, 255, .6);
}

.footer-text {
    color: rgba(255, 255, 255, .72);
    font-size: .9rem;
    line-height: 1.65;
}

.footer-title {
    color: #fff;
    font-size: .76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .14em;
    margin-bottom: .9rem;
}

.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links li + li {
    margin-top: .4rem;
}

.footer-links a {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: rgba(255, 255, 255, .74);
    text-decoration: none;
    font-size: .9rem;
}

.footer-links a:hover {
    color: var(--m-accent);
}

.footer-links .m-icon {
    opacity: .5;
}

.footer-contact {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: .7rem;
    font-size: .9rem;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    color: rgba(255, 255, 255, .78);
}

.footer-contact .m-icon {
    color: var(--m-accent);
    margin-top: .12rem;
}

.footer-contact a {
    color: rgba(255, 255, 255, .82);
    text-decoration: none;
}

.footer-contact a:hover {
    color: #fff;
}

.footer-cta {
    background: rgba(255, 255, 255, .09);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: var(--m-radius);
    padding: 1.25rem;
}

.footer-cta .cta-mini-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(var(--m-accent-rgb), .9);
    color: var(--m-accent-text);
    margin-bottom: .7rem;
}

.footer-cta h3 {
    color: #fff;
    font-size: .98rem;
    font-weight: 700;
}

.footer-cta p {
    font-size: .84rem;
    color: rgba(255, 255, 255, .7);
    margin-bottom: .9rem;
}

/* Un logotipo con fondo blanco (sin transparencia) se ve intencional sobre
   las superficies oscuras: pie, menu lateral y barra del panel. */
.site-footer .brand-logo,
.mobile-nav .offcanvas-header .brand-logo,
.admin-sidebar-brand img {
    background: #fff;
    padding: 3px;
    border-radius: 10px;
}

/* Pie y menu lateral: el logo tambien crece sin inflar su contenedor.
   En el pie se muestra al doble del tamano anterior (124 px). */
.site-footer .brand-logo {
    height: 124px;
    max-height: none;
    margin-bottom: .6rem;
}

.mobile-nav .offcanvas-header .brand-logo {
    height: 56px;
    max-height: none;
    margin: -6px 0;
}

.social-row {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 1rem;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    text-decoration: none;
    transition: background-color .15s ease, transform .15s ease;
}

.social-btn:hover {
    background: var(--m-accent);
    color: var(--m-accent-text);
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .14);
    padding: 1.1rem 0;
    font-size: .82rem;
    color: rgba(255, 255, 255, .62);
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.5rem;
    justify-content: space-between;
}

.footer-bottom a {
    color: rgba(255, 255, 255, .72);
    text-decoration: none;
}

.footer-bottom a:hover {
    color: #fff;
}

/* Boton flotante de WhatsApp */
.wa-fab {
    position: fixed;
    right: 1.1rem;
    bottom: 1.1rem;
    z-index: 1040;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #1faa53;
    color: #fff;
    box-shadow: 0 14px 30px rgba(12, 74, 37, .35);
    text-decoration: none;
    transition: transform .18s ease, background-color .18s ease;
}

.wa-fab::after {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid rgba(31, 170, 83, .35);
    animation: wa-pulse 2.4s ease-out infinite;
}

.wa-fab:hover {
    background: #178c44;
    color: #fff;
    transform: translateY(-2px) scale(1.03);
}

@keyframes wa-pulse {
    0% { transform: scale(.92); opacity: .9; }
    70% { transform: scale(1.18); opacity: 0; }
    100% { opacity: 0; }
}

/* ------------------------------------------------------------------
   9.1 Publicidad emergente de la portada
   ------------------------------------------------------------------ */
.promo-modal .modal-content {
    border: 0;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--m-shadow-lg);
}

.promo-close {
    position: absolute;
    top: .9rem;
    right: .9rem;
    z-index: 5;
    width: 2.4rem;
    height: 2.4rem;
    padding: .55rem;
    border: 0;
    border-radius: 50%;
    /* Solo el color de fondo: el icono X de Bootstrap se conserva. */
    background-color: #fff;
    opacity: 1;
    box-shadow: 0 4px 14px rgba(10, 28, 50, .28);
}

.promo-close:hover {
    background-color: #f3f6fa;
}

.promo-close:hover {
    opacity: 1;
}

.promo-media {
    background: var(--m-surface-alt);
}

/* Por defecto la imagen se ve completa; al recortar se limita la altura. */
.promo-media img {
    display: block;
    width: 100%;
    max-height: min(62vh, 440px);
    object-fit: contain;
    object-position: center center;
    background: var(--m-surface-alt);
}

.promo-media--cover img {
    height: min(48vh, 340px);
    max-height: none;
    object-fit: cover;
}

.promo-title {
    font-size: clamp(1.4rem, 2.6vw, 2rem);
    font-weight: 800;
    letter-spacing: -.02em;
    margin-bottom: .75rem;
}

.promo-body {
    color: var(--m-muted);
    font-size: 1rem;
    line-height: 1.7;
}

.promo-hint {
    display: flex;
    align-items: center;
    gap: .4rem;
    color: var(--m-muted);
    opacity: .85;
}

/* Miniatura y vista previa en el panel */
.promo-thumb {
    width: 88px;
    height: 66px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--m-line);
    background: #fff;
    flex: 0 0 auto;
}

.promo-thumb-empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--m-primary);
    background: var(--m-primary-soft);
}

.promo-current-image {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.promo-current-image img {
    max-height: 90px;
    max-width: 170px;
    object-fit: contain;
    border: 1px solid var(--m-line);
    border-radius: 12px;
    background: #fff;
    padding: .25rem;
}

/* Vista previa del encuadre en el formulario del panel */
.promo-frame-preview {
    position: relative;
    height: 220px;
    border: 1px dashed var(--m-line);
    border-radius: 14px;
    background: var(--m-surface-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: .4rem;
}

.promo-frame-preview img {
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    background: var(--m-surface-alt);
}

.promo-frame-empty {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: var(--m-muted);
    font-size: .85rem;
}

/* ------------------------------------------------------------------
   10. Alertas, tablas y paginacion
   ------------------------------------------------------------------ */
.alert {
    border-radius: var(--m-radius-sm);
    border: 1px solid transparent;
}

.page-link {
    color: var(--m-primary);
    border-radius: 10px;
    margin: 0 .15rem;
}

.page-item.active .page-link {
    background-color: var(--m-primary);
    border-color: var(--m-primary);
}

.nav-pills .nav-link.active {
    background-color: var(--m-primary);
}

.list-group-item.active {
    background-color: var(--m-primary);
    border-color: var(--m-primary);
}

.badge.text-bg-primary {
    background-color: var(--m-primary) !important;
}

.table > :not(caption) > * > * {
    padding: .7rem .75rem;
}

.table thead th {
    font-size: .76rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--m-muted);
    font-weight: 700;
    border-bottom-color: var(--m-line);
}

/* ------------------------------------------------------------------
   11. Panel administrativo
   ------------------------------------------------------------------ */
.admin-body {
    background: var(--m-surface-alt);
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    background: #fff;
    border-bottom: 1px solid var(--m-line);
    box-shadow: 0 4px 16px rgba(10, 28, 50, .05);
}

.admin-topbar .navbar-brand {
    font-weight: 700;
    color: var(--m-ink);
}

.admin-user {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .3rem .7rem .3rem .35rem;
    border-radius: 999px;
    background: var(--m-primary-soft);
    color: var(--m-primary);
    font-size: .84rem;
    font-weight: 600;
}

.admin-user .avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--m-primary);
    color: #fff;
    font-size: .78rem;
    font-weight: 700;
}

.admin-sidebar {
    background: var(--m-gradient);
    color: rgba(255, 255, 255, .8);
    position: sticky;
    top: 0;
    align-self: flex-start;
    min-height: 100vh;
    padding: .9rem 0 1.5rem;
    width: 260px;
    flex: 0 0 260px;
}

.admin-sidebar-brand {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .35rem 1.15rem 1rem;
    color: #fff;
    text-decoration: none;
}

.admin-sidebar-brand img {
    max-height: 38px;
    width: auto;
}

.admin-sidebar-brand .brand-monogram {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, .16);
    font-size: .85rem;
}

.admin-sidebar-brand .sidebar-name {
    font-size: .9rem;
    font-weight: 700;
    line-height: 1.15;
}

.admin-sidebar-brand .sidebar-name small {
    display: block;
    font-weight: 500;
    font-size: .7rem;
    color: rgba(255, 255, 255, .6);
    margin-top: .15rem;
}

.admin-nav-group {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: rgba(255, 255, 255, .42);
    padding: 1rem 1.3rem .35rem;
    font-weight: 700;
}

.admin-nav {
    padding: 0 .55rem;
}

.admin-nav .nav-link {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .55rem .7rem;
    margin-bottom: .12rem;
    border-radius: 12px;
    color: rgba(255, 255, 255, .78);
    font-size: .88rem;
    font-weight: 500;
}

.admin-nav .nav-link .m-icon {
    opacity: .75;
}

.admin-nav .nav-link:hover {
    background: rgba(255, 255, 255, .1);
    color: #fff;
}

.admin-nav .nav-link.active {
    background: rgba(255, 255, 255, .17);
    color: #fff;
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--m-accent);
}

.admin-nav .nav-link.active .m-icon {
    opacity: 1;
}

.admin-sidebar-footer {
    margin-top: auto;
    padding: 1rem 1.15rem 0;
    border-top: 1px solid rgba(255, 255, 255, .12);
    font-size: .82rem;
}

.admin-sidebar-footer a {
    color: rgba(255, 255, 255, .75);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .45rem;
}

.admin-sidebar-footer a:hover {
    color: #fff;
}

.admin-main {
    min-width: 0;
    flex: 1 1 auto;
}

.admin-content {
    padding: 1.5rem clamp(1rem, 2.5vw, 2rem) 3rem;
}

.admin-page-title {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -.02em;
    margin: 0;
}

.admin-card {
    background: #fff;
    border: 1px solid var(--m-line);
    border-radius: var(--m-radius);
    box-shadow: var(--m-shadow-sm);
    padding: 1.35rem;
}

.admin-card + .admin-card {
    margin-top: 1rem;
}

.stat-card {
    background: #fff;
    border: 1px solid var(--m-line);
    border-radius: var(--m-radius);
    padding: 1.2rem 1.3rem;
    box-shadow: var(--m-shadow-sm);
    height: 100%;
    display: flex;
    gap: .9rem;
    align-items: flex-start;
}

.stat-card .stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: var(--m-primary-soft);
    color: var(--m-primary);
    flex: 0 0 auto;
}

.stat-card .stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.02em;
}

.stat-card .stat-label {
    font-size: .82rem;
    color: var(--m-muted);
}

.admin-offcanvas {
    --bs-offcanvas-width: 290px;
    background: var(--m-gradient);
    color: #fff;
}

.admin-offcanvas .offcanvas-header {
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.admin-offcanvas .btn-close {
    filter: invert(1) grayscale(1) brightness(2);
}

/* Marca institucional: carga de logotipo y favicon desde el panel */
.brand-upload {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.brand-preview {
    width: 96px;
    height: 96px;
    border: 1px dashed var(--m-line);
    border-radius: 16px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex: 0 0 auto;
    padding: .35rem;
}

.brand-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.brand-preview-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: var(--m-gradient);
    color: #fff;
    font-weight: 800;
    letter-spacing: -.02em;
}

/* Fondo de los encabezados: vista previa en el panel */
/* Foto subida desde el editor de bloques */
.block-upload-preview {
    display: block;
    margin-top: .5rem;
    max-width: 100%;
    max-height: 96px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--m-line);
}

.hero-image-preview {
    position: relative;
    border-radius: var(--m-radius-sm);
    overflow: hidden;
    min-height: 118px;
    padding: 1rem 1.1rem;
    background: var(--m-gradient);
    color: #fff;
    isolation: isolate;
}

.hero-image-preview-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: var(--hero-preview-opacity, .25);
    z-index: -1;
}

.hero-image-preview-content {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    justify-content: center;
    min-height: 86px;
}

.hero-image-preview-content strong {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -.02em;
}

.hero-image-preview-content small {
    opacity: .85;
    font-size: .78rem;
}

.hero-image-preview-empty {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .82rem;
    background: rgba(255, 255, 255, .12);
    border: 1px dashed rgba(255, 255, 255, .35);
    border-radius: 999px;
    padding: .28rem .8rem;
    margin-bottom: .5rem;
}

/* ------------------------------------------------------------------
   12. Acceso administrativo
   ------------------------------------------------------------------ */
.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    position: relative;
    overflow: hidden;
    background: var(--m-gradient);
}

.auth-body::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .12) 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: .55;
    pointer-events: none;
}

.auth-body::after {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    left: -140px;
    bottom: -160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--m-accent-rgb), .3) 0%, transparent 62%);
    pointer-events: none;
}

.auth-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
}

.auth-card {
    background: #fff;
    border-radius: 24px;
    box-shadow: var(--m-shadow-lg);
    padding: 2rem;
}

.auth-logo {
    max-height: 56px;
    width: auto;
    margin-bottom: 1rem;
}

.auth-title {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -.02em;
    margin-bottom: .15rem;
}

.auth-subtitle {
    color: var(--m-muted);
    font-size: .88rem;
    margin-bottom: 1.5rem;
}

.auth-field {
    position: relative;
}

.auth-field .form-control {
    padding-left: 2.7rem;
}

.auth-field .field-icon {
    position: absolute;
    left: .9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--m-muted);
    pointer-events: none;
}

.auth-note {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    color: var(--m-muted);
    font-size: .8rem;
    margin-top: 1.25rem;
    margin-bottom: 0;
}

/* ------------------------------------------------------------------
   13. Utilidades
   ------------------------------------------------------------------ */
.text-balance {
    text-wrap: balance;
}

.hover-lift {
    transition: transform .18s ease, box-shadow .18s ease;
}

.hover-lift:hover {
    transform: translateY(-3px);
    box-shadow: var(--m-shadow);
}

.divider-accent {
    width: 64px;
    height: 4px;
    border-radius: 4px;
    background: var(--m-accent);
    margin: 1rem 0;
}

.img-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ------------------------------------------------------------------
   14. Adaptaciones por tamano de pantalla
   ------------------------------------------------------------------ */
@media (max-width: 1199.98px) {
    .brand-tagline {
        display: none;
    }

    .nav-main .nav-link {
        font-size: .8rem;
        padding: .6rem .45rem;
    }

    .nav-main .nav-link::after {
        left: .45rem;
        right: .45rem;
    }
}

@media (max-width: 991.98px) {
    .site-header .navbar {
        padding: .55rem 0;
    }

    .site-header .brand-logo {
        height: 64px;
        margin: -4px 0;
    }

    .brand-monogram {
        width: 44px;
        height: 44px;
        border-radius: 14px;
        font-size: .9rem;
    }

    .brand-name {
        font-size: .95rem;
    }

    .hero {
        padding: 1.9rem 0 2.2rem;
    }

    .hero-card {
        margin-top: 1.5rem;
    }

    .page-hero {
        padding: .9rem 0 1.1rem;
    }

    .page-hero-icon {
        width: 38px;
        height: 38px;
        border-radius: 12px;
    }

    .page-hero h1 {
        font-size: 1.28rem;
    }

    .page-hero .page-hero-lead {
        font-size: .88rem;
    }

    .breadcrumb-light {
        font-size: .72rem;
        margin-bottom: .3rem;
    }

    .section {
        padding: 2.2rem 0;
    }

    .footer-cta {
        margin-top: 1.5rem;
    }

    .admin-sidebar {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .site-topbar {
        font-size: .74rem;
    }

    .topbar-list {
        gap: .9rem;
    }

    .site-header .navbar {
        padding: .45rem 0;
    }

    .site-header .brand-logo {
        height: 58px;
        margin: -3px 0;
    }

    .hero-title {
        font-size: 1.85rem;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .section-title {
        font-size: 1.35rem;
    }

    .feature-card,
    .contact-card,
    .admin-card {
        padding: 1.2rem;
    }

    .footer-bottom {
        text-align: center;
        justify-content: center;
    }

    .wa-fab {
        width: 52px;
        height: 52px;
        right: .85rem;
        bottom: .85rem;
    }
}

@media (max-width: 575.98px) {
    .brand-name {
        font-size: .88rem;
    }

    .brand-text {
        max-width: 170px;
    }

    .hero-badge {
        font-size: .7rem;
    }

    .auth-card {
        padding: 1.5rem;
        border-radius: 20px;
    }

    .admin-content {
        padding: 1.1rem .85rem 2.5rem;
    }
}

/* ------------------------------------------------------------------
   15. Accesibilidad y medios impresos
   ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
    .brand-logo,
    .site-brand:hover .brand-logo,
    .site-brand:focus-visible .brand-logo {
        transition: none;
        transform: none;
    }

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }

    .wa-fab::after {
        display: none;
    }
}

@media print {
    .site-topbar,
    .site-header,
    .site-footer,
    .wa-fab,
    .admin-sidebar,
    .admin-topbar,
    .btn {
        display: none !important;
    }

    body {
        background: #fff;
    }

    .hero,
    .page-hero,
    .cta-band {
        background: #fff !important;
        color: #000 !important;
        box-shadow: none;
    }

    .hero-title,
    .page-hero h1,
    .cta-band h2 {
        color: #000 !important;
    }
}

/* ------------------------------------------------------------------
   16. Recorte de imagen tipo WhatsApp (formulario de publicidad)
   ------------------------------------------------------------------ */
.promo-cropper {
    margin-top: .5rem;
    padding: .75rem;
    border: 1px dashed var(--m-line);
    border-radius: 16px;
    background: var(--m-surface-alt);
    display: flex;
    justify-content: center;
    overflow: auto;
}

.promo-cropper-stage {
    position: relative;
    line-height: 0;
    max-width: 100%;
    user-select: none;
    touch-action: none;
}

.promo-cropper-stage img {
    display: block;
    max-width: 100%;
    max-height: 380px;
    width: auto;
    height: auto;
    border-radius: 10px;
    pointer-events: none;
}

.promo-crop-box {
    position: absolute;
    border: 2px solid var(--m-accent);
    border-radius: 6px;
    box-shadow: 0 0 0 9999px rgba(10, 28, 50, .55);
    cursor: move;
    touch-action: none;
}

.promo-crop-handle {
    position: absolute;
    right: -9px;
    bottom: -9px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--m-accent);
    cursor: nwse-resize;
}

.promo-cropper-empty {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: 0;
    padding: 2rem 1rem;
    color: var(--m-muted);
    font-size: .88rem;
}

/* ------------------------------------------------------------------
   17. Equipo de trabajo
   ------------------------------------------------------------------ */
.team-filter {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.team-filter-link {
    display: inline-flex;
    align-items: center;
    padding: .35rem .85rem;
    border-radius: 999px;
    border: 1px solid var(--m-line);
    background: #fff;
    color: var(--m-primary);
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.team-filter-link:hover,
.team-filter-link:focus-visible {
    background: var(--m-primary);
    border-color: var(--m-primary);
    color: #fff;
}

.team-group {
    margin-bottom: 2.2rem;
    scroll-margin-top: 110px;
}

.team-group-title {
    display: flex;
    align-items: center;
    gap: .55rem;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--m-ink);
    margin-bottom: 1rem;
}

.team-group-count {
    font-size: .75rem;
    font-weight: 700;
    color: var(--m-primary);
    background: var(--m-primary-soft);
    border-radius: 999px;
    padding: .1rem .55rem;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
    gap: 1rem;
}

.team-card {
    background: #fff;
    border: 1px solid var(--m-line);
    border-radius: var(--m-radius);
    box-shadow: var(--m-shadow-sm);
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}

.team-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--m-shadow);
}

.team-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.team-photo {
    aspect-ratio: 4 / 4.4;
    overflow: hidden;
    background: var(--m-surface-alt);
}

.team-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.team-photo-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--m-primary);
    background: var(--m-primary-soft);
}

.team-body {
    padding: .85rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: .2rem;
    flex: 1;
}

.team-name {
    font-size: 1rem;
    font-weight: 800;
    margin: 0;
    color: var(--m-ink);
}

.team-role {
    margin: 0;
    font-size: .88rem;
    font-weight: 600;
    color: var(--m-primary);
}

.team-role--lg {
    font-size: 1.05rem;
}

.team-area {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--m-muted);
    font-weight: 700;
}

.team-link {
    margin-top: auto;
    padding-top: .55rem;
    font-size: .82rem;
    font-weight: 700;
    color: var(--m-primary);
    display: inline-flex;
    align-items: center;
    gap: .25rem;
}

.team-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--m-muted);
    background: var(--m-surface-alt);
    border-radius: var(--m-radius);
}

.team-profile-photo {
    border-radius: var(--m-radius);
    overflow: hidden;
    background: var(--m-primary-soft);
    aspect-ratio: 4 / 4.6;
    box-shadow: var(--m-shadow);
}

.team-profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.team-profile-name {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--m-ink);
    margin: .2rem 0 .15rem;
}

.team-bio {
    margin-top: 1rem;
}

/* ------------------------------------------------------------------
   18. Fotografias con visor (galeria, portada y equipo)
   ------------------------------------------------------------------ */
.photo-card {
    position: relative;
}

.photo-card-button {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: #0b1220;
    border-radius: var(--m-radius-sm);
    overflow: hidden;
    cursor: zoom-in;
    position: relative;
    aspect-ratio: 4 / 3;
}

.photo-card-button img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s ease, opacity .3s ease;
}

.photo-card-button:hover img,
.photo-card-button:focus-visible img {
    transform: scale(1.05);
    opacity: .88;
}

.photo-card-zoom {
    position: absolute;
    top: .5rem;
    right: .5rem;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    opacity: 0;
    transition: opacity .2s ease;
}

.photo-card-button:hover .photo-card-zoom,
.photo-card-button:focus-visible .photo-card-zoom {
    opacity: 1;
}

.photo-card-caption {
    font-size: .8rem;
    color: var(--m-muted);
    margin-top: .35rem;
}

.photo-modal .modal-content {
    background: #0b1220;
    border: 0;
}

.photo-modal .modal-header {
    padding: .75rem 1rem .25rem;
    border: 0;
}

.photo-modal .modal-body {
    padding: .5rem 1rem 1.1rem;
}

.photo-modal-image {
    max-width: 100%;
    max-height: 78vh;
    width: auto;
    border-radius: 10px;
}

.photo-modal-caption {
    color: rgba(255, 255, 255, .82);
    margin-top: .6rem;
    font-size: .88rem;
}

/* Miniaturas del panel */
.staff-thumb {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    object-fit: cover;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--m-surface-alt);
}

.staff-thumb--empty {
    color: var(--m-primary);
}

.staff-photo-preview {
    width: 100%;
    max-width: 180px;
    aspect-ratio: 4 / 4.6;
    border-radius: 16px;
    overflow: hidden;
    background: var(--m-surface-alt);
    border: 1px dashed var(--m-line);
    display: flex;
    align-items: center;
    justify-content: center;
}

.staff-photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.staff-photo-preview-empty {
    color: var(--m-primary);
}

.staff-gallery-thumb {
    height: 130px;
    object-fit: cover;
}

@media (max-width: 575.98px) {
    .team-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: .75rem;
    }

    .team-body {
        padding: .7rem .75rem .8rem;
    }

    .team-name {
        font-size: .92rem;
    }

    .team-role {
        font-size: .8rem;
    }
}
