/* ============================================================
   ACADEMIA — hoja de estilo del tema
   ------------------------------------------------------------
   IDENTIDAD: tecnológica y limpia, calcada de luisjfortuna.com.
   Fondo gris azulado muy claro con trama de puntos, titulares
   Manrope muy pesados en navy, cuerpo Inter gris, azul #2563EB
   como color de acción, radios generosos y sombras suaves
   teñidas de navy. El teal solo aparece en insignias y puntos
   de estado.

   ESTRATEGIA CSS: (a) EXTENDER LA HOJA COMPARTIDA.

   `asset('css/app.css')` resuelve a este archivo EN LUGAR de
   public/assets/css/app.css, así que lo primero que hacemos es
   volver a importar la hoja base. De este modo:
     - heredamos las ~163 clases de componente del core
       (mega-menú, mini-carrito, buscador, tablas de admin,
       reproductor de lecciones, etc.) y sus arreglos futuros;
     - solo escribimos lo que de verdad cambia de identidad.

   CÓMO SE CARGA: el layout del tema enlaza DOS hojas, en este orden:
       1. assets/css/app.css        (base, con las ~163 clases del core)
       2. themes/academia/css/theme.css   (este archivo, la identidad)
   Las dos pasan por asset(), así que ambas llevan su ?v=<mtime> y el
   navegador revalida cada una por separado.

   Antes esto se hacía con @import desde este archivo. Se descartó: el
   @import NO admite cache-buster, así que al editar la hoja base sin
   tocar esta el navegador seguía sirviendo la base cacheada. Pasó de
   verdad: las reglas nuevas de .lesson-content no llegaban al usuario.

   ORDEN DEL ARCHIVO: tokens :root → tipografía → botones → navbar →
   hero → cards → secciones → footer → responsive.
   ============================================================ */

/* Sin @import a proposito: no admite cache-buster y el navegador se quedaba
   con una copia vieja de la hoja base. El layout enlaza las dos por separado,
   base primero y tema despues, cada una con su ?v=filemtime. */

/* ============================================================
   1. TOKENS — se redefine el bloque :root completo del core.
   Los nombres --ci-* se conservan para no romper las clases
   heredadas; solo cambian los valores.
   ============================================================ */
:root {
    /* Marca — azul de acción */
    --ci-primary: #2563EB;
    --ci-primary-dark: #1D4ED8;
    --ci-primary-light: #EFF6FF;
    --ci-primary-bright: #3B82F6;

    /* Teal — acento de uso MUY escaso: insignias y puntos de estado */
    --ci-orange: #14B8A6;
    --ci-orange-dark: #0F9488;
    --ci-orange-light: #E6FAF7;
    --ci-accent: #14B8A6;
    --ci-accent-dark: #0F9488;

    /* Rosa/rojo — ofertas y descuentos */
    --ci-magenta: #E11D48;
    --ci-magenta-dark: #BE123C;
    --ci-magenta-light: #FFE4E6;

    /* Verde — estados de éxito */
    --ci-green: #10B981;
    --ci-green-dark: #059669;

    /* Neutros fríos — navy y grises azulados */
    --ci-dark: #0B1F3A;
    --ci-gray-900: #111827;
    --ci-gray-700: #374151;
    /* --ci-gray-600 se usa en la hoja base (línea ~249) pero nunca
       se define allí; aquí sí queda definida. */
    --ci-gray-600: #4B5563;
    --ci-gray-500: #667085;
    --ci-gray-400: #98A2B3;
    --ci-gray-300: #D0D5DD;
    --ci-gray-200: #E5E7EB;
    --ci-gray-100: #F6F8FB;
    --ci-white: #ffffff;
    --ci-cream: #F6F8FB;

    /* Superficies y bordes del tema (nombres heredados del tema
       editorial anterior, resemantizados a la identidad nueva) */
    --ac-paper: #F6F8FB;
    --ac-paper-deep: #EEF2F7;
    --ac-rule: #E5E7EB;
    --ac-rule-strong: #D0D5DD;
    --ac-ink-soft: #667085;
    --ac-navy: #0B1F3A;
    --ac-navy-700: #14345c;
    --ac-surface: #ffffff;

    /* La trama de puntos se retiró. Era el rasgo que más delataba la página:
       una retícula decorativa de fondo, repetida en seis sitios, es la firma de
       una plantilla. Las variables se quedan a cero y no se borran para que
       cualquier regla que aún las nombre no se rompa en silencio. */
    --ac-dots: none;
    --ac-dots-light: none;

    /* Tipografía: sans geométrica de titular + sans de lectura */
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Sombras. La jerarquía la lleva el BORDE, no la elevación.
       Antes cada bloque era una tarjeta blanca flotando 34 px sobre el fondo,
       y con todo flotando a la vez nada destaca: solo queda la sensación de
       maqueta con relieve. Ahora son un filo mínimo, y el separador real es
       --ac-rule. La única sombra apreciable se reserva a lo que de verdad se
       superpone: menús desplegables y diálogos. */
    --shadow-sm: 0 1px 2px rgba(11, 31, 58, 0.04);
    --shadow-md: 0 1px 3px rgba(11, 31, 58, 0.06);
    --shadow-lg: 0 8px 24px rgba(11, 31, 58, 0.10);
    --shadow-deep: 0 8px 24px rgba(11, 31, 58, 0.10);
    --shadow-glow: 0 0 0 3px rgba(37, 99, 235, 0.18);

    /* Radios generosos */
    --radius-xs: 6px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-pill: 50rem;

    --transition-fast: 150ms ease;
    --transition-base: 220ms ease;
    --transition-slow: 350ms cubic-bezier(0.22, 0.61, 0.36, 1);

    --sidebar-width: 260px;

    /* Bootstrap */
    --bs-body-color: #111827;
    --bs-body-bg: #F6F8FB;
    --bs-dark-rgb: 11, 31, 58;
    --bs-border-color: #E5E7EB;
    --bs-primary: #2563EB;
    --bs-link-color: #2563EB;
    --bs-link-hover-color: #1D4ED8;
}

/* ============================================================
   2. TIPOGRAFÍA
   ============================================================ */
body {
    font-family: var(--font-body);
    background-color: var(--ac-paper);
    color: var(--ci-gray-900);
    font-size: 1rem;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-family: var(--font-heading);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.14;
    color: var(--ac-navy);
}

h4, h5, h6, .h4, .h5, .h6 { font-weight: 700; letter-spacing: -0.015em; }

h1, .h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.1rem); }
h2, .h2 { font-size: clamp(1.7rem, 1.25rem + 1.7vw, 2.6rem); }
h3, .h3 { font-size: clamp(1.3rem, 1.15rem + 0.8vw, 1.7rem); }

.lead {
    font-size: 1.125rem;
    line-height: 1.65;
    color: var(--ac-ink-soft);
    font-weight: 400;
}

.text-muted { color: var(--ac-ink-soft) !important; }
a { text-decoration-thickness: 1px; text-underline-offset: 0.18em; }

/* Antetítulo de sección: versalitas azules con filete corto delante */
.ac-eyebrow {
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ci-primary);
    margin-bottom: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.ac-eyebrow::before {
    content: "";
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background-color: currentColor;
    display: inline-block;
}

.ac-eyebrow--accent { color: var(--ci-accent-dark); }

/* Cabecera de sección: título grande a la izquierda, enlace a la derecha */
.ac-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2.75rem;
}

.ac-section-head h2 { margin-bottom: 0.5rem; }
.ac-section-head p { margin-bottom: 0; max-width: 52ch; }

.ac-section-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--ci-primary);
    text-decoration: none;
    white-space: nowrap;
    padding: 0.5rem 1rem;
    border: 1px solid var(--ac-rule);
    border-radius: var(--radius-pill);
    background-color: var(--ac-surface);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), color var(--transition-fast);
}

.ac-section-link:hover {
    color: var(--ci-primary-dark);
    border-color: var(--ci-primary);
    box-shadow: var(--shadow-sm);
}

/* Fondos de sección alternos */
.ac-paper { background-color: var(--ac-paper); }
.ac-paper-deep { background-color: var(--ac-paper-deep); }

/* Banda oscura: navy con la trama de puntos en claro */
.ac-ink {
    position: relative;
    background: var(--ac-navy);
    color: rgba(255, 255, 255, 0.78);
    overflow: hidden;
}

.ac-ink > * { position: relative; z-index: 1; }
.ac-ink h1, .ac-ink h2, .ac-ink h3, .ac-ink h4 { color: #ffffff; }
.ac-ink .text-muted { color: rgba(255, 255, 255, 0.7) !important; }

/* Separador sutil entre secciones claras */
.ac-rule-top { border-top: 1px solid var(--ac-rule); }

/* Cabeceras de las páginas heredadas (ofertas, sobre nosotros, políticas,
   business, ficha de curso): pintan su banda con un degradado INLINE
   `var(--ci-primary) → var(--ci-primary-dark)`. Con la paleta nueva salía un
   azul plano muy saturado, así que aquí se lleva a navy con trama de puntos.
   Hace falta !important porque el degradado va en el atributo style. */
main > section[style*="--ci-primary"],
main > section.bg-primary {
    background: var(--ac-navy) !important;
}

/* La base fija `.bg-primary`, `.bg-info` y `.bg-warning` a un color opaco con
   !important, lo que anula `.bg-opacity-*`: los iconos en círculo salían del
   mismo color que su fondo. Aquí se devuelve el canal alfa de Bootstrap. */
.bg-primary.bg-opacity-10 { background-color: rgba(37, 99, 235, 0.1) !important; }
.bg-primary.bg-opacity-25 { background-color: rgba(37, 99, 235, 0.25) !important; }
.bg-primary.bg-opacity-50 { background-color: rgba(37, 99, 235, 0.5) !important; }
.bg-info.bg-opacity-10 { background-color: rgba(59, 130, 246, 0.1) !important; }
.bg-info.bg-opacity-25 { background-color: rgba(59, 130, 246, 0.25) !important; }
.bg-warning.bg-opacity-10 { background-color: rgba(20, 184, 166, 0.1) !important; }
.bg-warning.bg-opacity-25 { background-color: rgba(20, 184, 166, 0.25) !important; }

/* La hoja base tiñe .bg-light/.bg-white; aquí se llevan a la paleta fría */
.bg-light { background-color: var(--ac-paper-deep) !important; }
.bg-white { background-color: #ffffff !important; }

/* ============================================================
   3. BOTONES — radios generosos, primario azul relleno con
   sombra suave en reposo y elevación al pasar el cursor.
   ============================================================ */
.btn {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: 0;
    border-radius: var(--radius-md);
    border-width: 1.5px;
    transition: background-color var(--transition-fast), color var(--transition-fast),
                border-color var(--transition-fast), box-shadow var(--transition-base),
                transform var(--transition-base);
}

.btn-lg { padding: 0.85rem 1.9rem; font-size: 1.02rem; border-radius: var(--radius-md); }
.btn-sm { border-radius: var(--radius-sm); }

.btn-primary {
    --bs-btn-bg: var(--ci-primary);
    --bs-btn-border-color: var(--ci-primary);
    --bs-btn-hover-bg: var(--ci-primary-dark);
    --bs-btn-hover-border-color: var(--ci-primary-dark);
    --bs-btn-active-bg: var(--ci-primary-dark);
    --bs-btn-active-border-color: var(--ci-primary-dark);
    border-radius: var(--radius-md);
}

.btn-primary:hover,
.btn-primary:focus-visible {
}

/* CTA principal de las vistas heredadas (slides, newsletter, navbar
   base, verificador de certificados). En la referencia el CTA es AZUL,
   así que .btn-warning y .btn-accent mapean al primario, no al teal. */
.btn-warning,
.btn-accent {
    --bs-btn-bg: var(--ci-primary);
    --bs-btn-border-color: var(--ci-primary);
    --bs-btn-hover-bg: var(--ci-primary-dark);
    --bs-btn-hover-border-color: var(--ci-primary-dark);
    --bs-btn-color: #ffffff;
    --bs-btn-hover-color: #ffffff;
    --bs-btn-active-bg: var(--ci-primary-dark);
    --bs-btn-active-color: #ffffff;
    background-color: var(--ci-primary);
    border-color: var(--ci-primary);
    color: #ffffff;
    border-radius: var(--radius-md);
}

.btn-warning:hover,
.btn-accent:hover {
    background-color: var(--ci-primary-dark);
    border-color: var(--ci-primary-dark);
    color: #ffffff;
}

/* CTA secundario: blanco con borde fino, como «Ver proyectos» */
.btn-outline-primary,
.btn-outline-dark {
    --bs-btn-color: var(--ac-navy);
    --bs-btn-bg: #ffffff;
    --bs-btn-border-color: var(--ac-rule);
    --bs-btn-hover-bg: var(--ac-paper);
    --bs-btn-hover-border-color: var(--ac-navy);
    --bs-btn-hover-color: var(--ac-navy);
    --bs-btn-active-bg: var(--ac-paper-deep);
    --bs-btn-active-border-color: var(--ac-navy);
    --bs-btn-active-color: var(--ac-navy);
    background-color: #ffffff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.btn-outline-primary:hover,
.btn-outline-dark:hover {
    box-shadow: var(--shadow-md);
}

.btn-outline-danger {
    --bs-btn-color: var(--ci-magenta);
    --bs-btn-border-color: var(--ci-magenta);
    --bs-btn-hover-bg: var(--ci-magenta);
    --bs-btn-hover-border-color: var(--ci-magenta);
    --bs-btn-hover-color: #ffffff;
    border-radius: var(--radius-md);
}

.btn-light {
    --bs-btn-bg: #ffffff;
    --bs-btn-border-color: #ffffff;
    --bs-btn-color: var(--ci-primary);
    --bs-btn-hover-bg: #ffffff;
    --bs-btn-hover-border-color: #ffffff;
    --bs-btn-hover-color: var(--ci-primary-dark);
    box-shadow: var(--shadow-md);
}

.btn-light:hover { box-shadow: var(--shadow-md); }

.btn:focus-visible { box-shadow: var(--shadow-glow); outline: none; }

/* Enlace con flecha, muy usado en este tema */
.ac-link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--ci-primary);
    text-decoration: none;
}

.ac-link-arrow:hover { color: var(--ci-primary-dark); gap: 0.7rem; }
.ac-link-arrow i { transition: transform var(--transition-fast); }
.ac-link-arrow:hover i { transform: translateX(3px); }

/* ============================================================
   4. NAVBAR — una sola barra blanca sobre el fondo claro:
   marca a la izquierda, navegación al centro, acciones y CTA
   azul a la derecha.
   ============================================================ */
.ac-navbar {
    /* Sin cristal esmerilado: el desenfoque tras una barra semitransparente
       es el efecto que más identifica a una plantilla moderna. Blanco opaco y
       una línea de separación. */
    background-color: var(--ac-surface);
    border-bottom: 1px solid transparent;
    box-shadow: 0 6px 24px rgba(11, 31, 58, 0.05);
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
}

.ac-navbar .navbar-toggler {
    padding: 0.25rem 0.5rem;
    color: var(--ac-navy);
    border-radius: var(--radius-sm);
}

.ac-navbar .navbar-toggler:focus { box-shadow: none; }

.ac-brand { display: inline-flex; align-items: center; text-decoration: none; }
.ac-brand img { height: 38px; width: auto; display: block; }

/* Los CTA de la barra nunca parten en dos líneas */
.ac-navbar .btn { white-space: nowrap; }

/* Enlaces de navegación: sans geométrica, pastilla al pasar el cursor */
.ac-nav-link {
    position: relative;
    display: inline-block;
    padding: 0.5rem 0.8rem;
    font-family: var(--font-heading);
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--ac-navy);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: color var(--transition-fast), background-color var(--transition-fast);
}

.ac-nav-link:hover { color: var(--ci-primary); background-color: var(--ac-paper); }
.ac-nav-link.active { color: var(--ci-primary); background-color: var(--ci-primary-light); }

/* Ofertas: única concesión de color fuera del azul en la barra */
/* "Ofertas" se distingue por el peso, no por el color: en la referencia la
   barra es cromáticamente uniforme y el rojo queda reservado a los precios y
   badges de descuento. Pintarlo de magenta metía un tercer color en la
   cabecera y rompía esa disciplina. */
.ac-nav-link--accent { color: var(--ci-gray-900); font-weight: 700; }
.ac-nav-link--accent:hover,
.ac-nav-link--accent.active { color: var(--ci-primary); background-color: var(--ci-primary-light); }

/* Buscador: campo relleno de radio generoso */
.ac-navbar-search { flex: 0 1 clamp(150px, 18vw, 260px); margin-right: 1.25rem; }

.ac-navbar .navbar-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
}

/* La hoja base declara estas reglas con !important, así que el tema
   necesita !important para ganarlas. */
.ac-navbar .navbar-search-icon {
    left: 0.85rem;
    color: var(--ci-gray-400);
    font-size: 0.9rem;
}

.ac-navbar .navbar-search-input {
    width: 100%;
    height: 40px;
    padding: 0.4rem 0.9rem 0.4rem 2.35rem !important;
    font-size: 0.9rem;
    color: var(--ci-gray-900);
    background: var(--ac-paper) !important;
    border: 1px solid var(--ac-rule) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: none !important;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
}

.ac-navbar .navbar-search-input::placeholder { color: var(--ci-gray-400); }

.ac-navbar .navbar-search-input:focus {
    background: #ffffff !important;
    border-color: var(--ci-primary) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
    outline: none;
}

/* El dropdown de sugerencias lo pinta app.js; aquí solo se reviste. */
.ac-navbar .search-suggestions {
    border: 1px solid var(--ac-rule);
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: var(--shadow-md);
    margin-top: 0.45rem;
    overflow: hidden;
}

.ac-navbar .search-suggestion-item { border-bottom: 1px solid var(--ac-rule); }
.ac-navbar .search-suggestion-item:hover,
.ac-navbar .search-suggestion-item.active { background-color: var(--ci-primary-light); }
.ac-navbar .search-suggestions-footer {
    background-color: var(--ac-paper);
    color: var(--ci-primary);
    font-weight: 600;
}

/* Acciones de la derecha */
.ac-icon-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    color: var(--ac-navy);
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.ac-icon-btn:hover { color: var(--ci-primary); background-color: var(--ac-paper); }

.ac-cart-count {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 1.1rem;
    height: 1.1rem;
    padding: 0 0.28rem;
    font-family: var(--font-heading);
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1.1rem;
    text-align: center;
    color: #ffffff;
    background-color: var(--ci-primary);
    border-radius: var(--radius-pill);
    box-shadow: 0 0 0 2px #ffffff;
}

.ac-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 700;
    color: #ffffff;
    background: var(--ac-navy);
    border-radius: 50%;
    overflow: hidden;
}

.ac-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* Menús desplegables del tema */
.ac-navbar .dropdown-menu,
.ac-dropdown {
    border: 1px solid var(--ac-rule);
    border-radius: var(--radius-lg);
    background-color: #ffffff;
    box-shadow: var(--shadow-md);
    padding: 0.4rem 0;
    overflow: hidden;
}

.ac-navbar .dropdown-item,
.ac-dropdown .dropdown-item {
    font-size: 0.9rem;
    padding: 0.55rem 1rem;
    color: var(--ci-gray-700);
}

.ac-navbar .dropdown-item:hover,
.ac-dropdown .dropdown-item:hover {
    background-color: var(--ci-primary-light);
    color: var(--ci-primary-dark);
}

.ac-dropdown-header {
    padding: 0.6rem 1rem 0.4rem;
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ci-gray-400);
}

/* Mini carrito del tema */
.ac-cart-menu { width: 22rem; max-width: calc(100vw - 2rem); }

.ac-cart-item {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding: 0.6rem 1rem;
    color: var(--ci-gray-900);
    text-decoration: none;
    border-bottom: 1px solid var(--ac-rule);
}

.ac-cart-item:hover { background-color: var(--ci-primary-light); }

.ac-cart-thumb {
    flex: 0 0 auto;
    width: 52px;
    height: 40px;
    object-fit: cover;
    background-color: var(--ac-paper-deep);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ci-gray-400);
}

.ac-cart-title {
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.35;
}

.ac-cart-foot { padding: 0.85rem 1rem 0.6rem; }

/* ============================================================
   5. HERO — titular Manrope 800 en navy sobre la trama de
   puntos de la referencia (sin imágenes externas).
   ============================================================ */
.ac-hero {
    position: relative;
    background-color: var(--ac-surface);
    overflow: hidden;
}

.ac-hero > * { position: relative; z-index: 1; }

.ac-hero-title {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: clamp(2.3rem, 1.3rem + 4.2vw, 4.2rem);
    line-height: 1.06;
    letter-spacing: -0.035em;
    color: var(--ac-navy);
    margin-bottom: 1.35rem;
}

/* Palabra clave del titular en azul */
.ac-hero-title em {
    font-style: normal;
    color: var(--ci-primary);
}

.ac-hero-lead {
    font-size: clamp(1.08rem, 1rem + 0.4vw, 1.25rem);
    line-height: 1.65;
    color: var(--ac-ink-soft);
    max-width: 52ch;
}

/* Cuando el slide trae imagen de fondo el texto va en claro */
.ac-hero--media {
    background-color: var(--ac-navy);
    background-image: none;
}

.ac-hero--media .ac-hero-veil {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(11, 31, 58, 0.92) 0%, rgba(11, 31, 58, 0.55) 100%);
}

.ac-hero--media .ac-hero-title { color: #ffffff; }
.ac-hero--media .ac-hero-title em { color: #60A5FA; }
.ac-hero--media .ac-eyebrow { color: #60A5FA; }
.ac-hero--media .ac-hero-lead { color: rgba(255, 255, 255, 0.78); }

/* Ficha de datos junto al titular */
.ac-hero-facts {
    padding: 1.75rem 2rem;
    background-color: #ffffff;
    border: 1px solid var(--ac-rule);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

.ac-hero--media .ac-hero-facts {
    background-color: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow: none;
}

.ac-fact + .ac-fact { margin-top: 1.6rem; }

.ac-fact-number {
    font-family: var(--font-heading);
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
    color: var(--ac-navy);
    display: block;
}

.ac-hero--media .ac-fact-number { color: #ffffff; }

.ac-fact-label {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ci-gray-500);
}

.ac-hero--media .ac-fact-label { color: rgba(255, 255, 255, 0.7); }

/* Banda de cifras bajo la portada */
.ac-facts {
    background-color: #ffffff;
    border-bottom: 1px solid var(--ac-rule);
    padding: 1.75rem 0;
}

.ac-facts-col { padding: 0.75rem 0; }

@media (min-width: 768px) {
    .ac-facts-col + .ac-facts-col {
        border-left: 1px solid var(--ac-rule);
        padding-left: 2rem;
    }
}

@media (max-width: 767.98px) {
    .ac-facts-col + .ac-facts-col { border-top: 1px solid var(--ac-rule); }
}

/* Indicadores del carrusel: barritas redondeadas, la activa en azul */
.ac-hero-carousel .carousel-indicators {
    margin-bottom: 1.5rem;
    justify-content: flex-start;
    padding-left: max(1.5rem, calc((100vw - 1320px) / 2 + 0.75rem));
}

.ac-hero-carousel .carousel-indicators [data-bs-target] {
    width: 0.5rem;
    height: 0.5rem;
    margin-right: 0.4rem;
    margin-left: 0;
    border: 0;
    border-radius: var(--radius-pill);
    background-color: var(--ac-rule-strong);
    opacity: 1;
    transition: width var(--transition-base), background-color var(--transition-base);
}

.ac-hero-carousel .carousel-indicators .active {
    width: 1.8rem;
    background-color: var(--ci-primary);
}

.ac-hero--media .carousel-indicators [data-bs-target] { background-color: rgba(255, 255, 255, 0.35); }

/* ============================================================
   6. TARJETAS DE CURSO — tarjeta blanca de radio grande, sombra
   suave en reposo y elevación al pasar el cursor.
   Se redefine .course-card porque las vistas heredadas
   (catálogo, ofertas, partials/course-card.php) la usan.
   ============================================================ */
.course-card,
.ac-course-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background-color: #ffffff;
    border: 1px solid var(--ac-rule) !important;
    border-radius: var(--radius-xl) !important;
    box-shadow: var(--shadow-sm) !important;
    transition: box-shadow var(--transition-base), transform var(--transition-base), border-color var(--transition-base);
}

.course-card:hover,
.ac-course-card:hover {
    border-color: transparent !important;
    box-shadow: var(--shadow-md) !important;
}

.ac-course-media {
    position: relative;
    aspect-ratio: 3 / 2;
    background-color: var(--ac-paper-deep);
    overflow: hidden;
}

.ac-course-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--transition-slow);
}

.ac-course-card:hover .ac-course-media img { transform: scale(1.04); }

.ac-course-media-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--ci-gray-400);
    font-size: 2rem;
}

.ac-course-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 1.35rem;
}

.ac-course-kicker {
    display: inline-block;
    align-self: flex-start;
    padding: 0.25rem 0.7rem;
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ci-primary);
    background-color: var(--ci-primary-light);
    border-radius: var(--radius-pill);
    margin-bottom: 0.75rem;
}

.ac-course-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.32;
    margin-bottom: 0.5rem;
}

.ac-course-title a { color: var(--ac-navy); text-decoration: none; }
.ac-course-title a:hover { color: var(--ci-primary); }

.ac-course-excerpt {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--ac-ink-soft);
    margin-bottom: 1rem;
}

.ac-course-foot {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 0.95rem;
    border-top: 1px solid var(--ac-rule);
}

.ac-course-author {
    font-size: 0.8rem;
    color: var(--ci-gray-500);
    line-height: 1.35;
}

.ac-course-author strong {
    display: block;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--ac-navy);
}

/* Precios (marcado generado por renderPriceHtml) */
.price-with-discount { text-align: right; line-height: 1.3; }

.price-original {
    font-size: 0.8rem;
    color: var(--ci-gray-400);
    text-decoration: line-through;
}

.price-sale,
.ac-course-foot .fw-bold.text-primary {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--ac-navy) !important;
}

.discount-badge {
    display: inline-block;
    padding: 0.1rem 0.45rem;
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 700;
    color: #ffffff;
    background-color: var(--ci-magenta);
    border-radius: var(--radius-pill);
}

/* Distintivo de oferta: píldora flotante sobre la imagen */
.sale-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 3;
    padding: 0.3rem 0.75rem;
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #ffffff;
    background-color: var(--ci-magenta);
    border-radius: var(--radius-pill);
    box-shadow: 0 6px 16px rgba(225, 29, 72, 0.28);
    animation: none;
}

.sale-badge.ending-soon { background-color: var(--ci-magenta-dark); }

.sale-timer,
.sale-countdown {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ci-magenta);
}

.btn-wishlist {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 3;
    width: 2.1rem;
    height: 2.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 0.85rem;
    color: var(--ci-gray-700);
    background-color: rgba(255, 255, 255, 0.94);
    border: 0;
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
}

.btn-wishlist:hover { color: var(--ci-magenta); background-color: #ffffff; box-shadow: var(--shadow-md); }
.btn-wishlist.active { color: var(--ci-magenta); }

/* Badges genéricos */
.badge.bg-primary-subtle {
    background-color: var(--ci-primary-light) !important;
    color: var(--ci-primary) !important;
    border-radius: var(--radius-pill);
    font-weight: 600;
}

.badge.bg-success { background-color: var(--ci-green) !important; border-radius: var(--radius-pill); }
.badge.bg-danger { background-color: var(--ci-magenta) !important; border-radius: var(--radius-pill); }
.badge.bg-primary { background-color: var(--ci-primary) !important; border-radius: var(--radius-pill); }

/* ============================================================
   7. CATEGORÍAS Y PILARES — filas de lista con realce azul y
   tarjetas de valor con numeración
   ============================================================ */
.ac-index-item {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1rem 1.1rem;
    margin-bottom: 0.6rem;
    color: var(--ac-navy);
    text-decoration: none;
    background-color: #ffffff;
    border: 1px solid var(--ac-rule);
    border-radius: var(--radius-lg);
    transition: color var(--transition-fast), box-shadow var(--transition-base),
                transform var(--transition-base), border-color var(--transition-fast);
}

.ac-index-item:hover {
    color: var(--ci-primary);
    border-color: transparent;
    box-shadow: var(--shadow-md);
}

.ac-index-num {
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--ci-primary);
    min-width: 1.75rem;
}

.ac-index-name {
    font-family: var(--font-heading);
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    flex: 1 1 auto;
}

.ac-index-meta { font-size: 0.8rem; color: var(--ci-gray-500); }

/* Pilares de propuesta de valor */
.ac-pillar {
    padding: 1.6rem;
    background-color: #ffffff;
    border: 1px solid var(--ac-rule);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.ac-pillar:hover { border-color: var(--ci-primary); }

.ac-pillar-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--ci-primary);
    background-color: var(--ci-primary-light);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.ac-pillar h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.ac-pillar p { font-size: 0.92rem; color: var(--ac-ink-soft); margin-bottom: 0; }

/* Cita destacada sobre banda navy */
.ac-quote {
    font-family: var(--font-heading);
    font-size: clamp(1.7rem, 1.1rem + 2.4vw, 3rem);
    font-style: normal;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.14;
    color: #ffffff;
    margin-bottom: 1.5rem;
}

/* Punto de estado: el único teal recurrente de la interfaz */
.ac-status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--ci-accent);
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.18);
}

/* ============================================================
   8. NEWSLETTER (partial heredado) Y FORMULARIOS
   ============================================================ */
.newsletter-section { background: var(--ac-paper-deep) !important; border-top: 1px solid var(--ac-rule); }
.newsletter-section .card {
    background-color: #ffffff;
    border: 1px solid var(--ac-rule) !important;
    border-radius: var(--radius-xl) !important;
    box-shadow: var(--shadow-md) !important;
}
.newsletter-section .text-white-50 { color: var(--ci-gray-500) !important; }

/* El editor de texto enriquecido se viste como un campo más. El fondo blanco
   y el radio se lo da el parcial compartido; el color de la línea es nuestro,
   igual que en .form-control, y por eso se dice aquí y no allí. */
.note-editor.note-frame { border-color: var(--ac-rule); }

.form-control, .form-select {
    border-radius: var(--radius-md);
    border-color: var(--ac-rule);
    background-color: #ffffff;
    color: var(--ci-gray-900);
    padding: 0.6rem 0.9rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--ci-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-label { font-family: var(--font-heading); font-size: 0.88rem; font-weight: 600; color: var(--ac-navy); }

.card { border-radius: var(--radius-lg); }

/* ============================================================
   9. FOOTER — banda navy con la trama de puntos
   ============================================================ */
.ac-footer {
    position: relative;
    background-color: var(--ac-navy);
    background-size: 30px 30px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.92rem;
}

.ac-footer a { color: rgba(255, 255, 255, 0.72); text-decoration: none; transition: color var(--transition-fast); }
.ac-footer a:hover { color: #ffffff; }
.ac-footer img { height: 36px; width: auto; }

.ac-footer-title {
    font-family: var(--font-heading);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 1rem;
}

.ac-footer-links { list-style: none; padding: 0; margin: 0; }
.ac-footer-links li + li { margin-top: 0.55rem; }

.ac-footer-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    background-color: rgba(255, 255, 255, 0.06);
    border: 0;
    border-radius: var(--radius-md);
    transition: background-color var(--transition-fast);
}

.ac-footer-social:hover { background-color: var(--ci-primary); }

.ac-footer .form-control {
    background-color: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.ac-footer .form-control::placeholder { color: rgba(255, 255, 255, 0.42); }
.ac-footer .form-control:focus {
    background-color: rgba(255, 255, 255, 0.12);
    border-color: var(--ci-primary-bright);
    box-shadow: none;
    color: #ffffff;
}

.ac-footer .input-group .form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.ac-footer .input-group .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.ac-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.55);
}

.ac-footer-bottom a.active { color: #ffffff; font-weight: 600; }

/* ============================================================
   10. RESPONSIVE
   ============================================================ */
/* Entre 992 y 1400 px la barra va justa: se aprieta la navegación */
@media (min-width: 992px) and (max-width: 1399.98px) {
    .ac-nav-link { padding-left: 0.55rem; padding-right: 0.55rem; font-size: 0.88rem; }
    .ac-navbar-search { margin-right: 0.75rem; }
}

@media (max-width: 991.98px) {
    .ac-navbar-search { flex: 1 1 auto; margin-right: 0; }
    .ac-navbar .navbar-collapse {
        border-top: 1px solid var(--ac-rule);
        margin-top: 0.85rem;
        padding-top: 0.85rem;
    }
    .ac-nav-link { display: block; padding: 0.65rem 0.75rem; }
    .ac-hero-facts { margin-top: 2.5rem; }
    .ac-hero-carousel .carousel-indicators { padding-left: 1.5rem; }
    .ac-section-head { margin-bottom: 2rem; }
}

@media (max-width: 575.98px) {
    .ac-course-body { padding: 1.1rem; }
    .ac-fact-number { font-size: 2rem; }
    .ac-hero-facts { padding: 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
    .course-card, .ac-course-card, .ac-link-arrow i, .ac-index-item,
    .ac-pillar, .btn, .ac-course-media img { transition: none; }
    .course-card:hover, .ac-course-card:hover, .ac-index-item:hover,
    .ac-pillar:hover, .btn:hover { transform: none; }
    .ac-course-card:hover .ac-course-media img { transform: none; }
}

/* ============================================================
   11. PÁGINAS INTERNAS — cabecera de banda navy
   ------------------------------------------------------------
   La usan catálogo, ficha de curso y carrito. Es la misma tinta
   del pie y de la sección de cita, para que el sitio tenga una
   sola banda oscura reconocible.
   ============================================================ */
.ac-page-head {
    position: relative;
    background-color: var(--ac-navy);
    background: var(--ac-navy);
    background-size: 30px 30px, auto;
    color: rgba(255, 255, 255, 0.78);
}

.ac-page-head h1 { color: #ffffff; }
.ac-page-head .ac-eyebrow { color: #60A5FA; }

.ac-page-head-lead {
    font-size: 1.05rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.72);
    max-width: 62ch;
}

/* Variante corta, para páginas sin subtítulo largo (carrito) */
.ac-page-head--tight h1 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem); }

/* Miga de pan sobre la banda */
.ac-breadcrumb {
    --bs-breadcrumb-divider-color: rgba(255, 255, 255, 0.38);
    --bs-breadcrumb-item-active-color: rgba(255, 255, 255, 0.72);
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
}

.ac-breadcrumb a { color: rgba(255, 255, 255, 0.72); text-decoration: none; }
.ac-breadcrumb a:hover { color: #ffffff; }
.ac-breadcrumb .breadcrumb-item.active { color: rgba(255, 255, 255, 0.72); }

/* Datos del curso bajo el titular */
.ac-page-head-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.7);
}

.ac-page-head-meta i { margin-right: 0.4rem; color: #60A5FA; }

/* Botón claro sobre la banda (vaciar carrito) */
.ac-page-head .btn-outline-light {
    --bs-btn-color: rgba(255, 255, 255, 0.82);
    --bs-btn-border-color: rgba(255, 255, 255, 0.28);
    --bs-btn-hover-bg: rgba(255, 255, 255, 0.1);
    --bs-btn-hover-border-color: #ffffff;
    --bs-btn-hover-color: #ffffff;
}

/* ============================================================
   12. PANELES DE CONTENIDO Y RAÍL DE FILTROS
   ============================================================ */
.ac-panel {
    padding: 1.75rem;
    background-color: var(--ac-surface);
    border: 1px solid var(--ac-rule);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
}

.ac-panel-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--ac-navy);
    margin-bottom: 1.15rem;
}

.ac-panel-title i { color: var(--ci-primary); font-size: 1.05rem; }

/* Texto largo que llega desde el editor del panel */
.ac-prose { color: var(--ci-gray-700); }
.ac-prose :last-child { margin-bottom: 0; }
.ac-prose h1, .ac-prose h2, .ac-prose h3, .ac-prose h4 { font-size: 1.05rem; margin-top: 1.4rem; }
.ac-prose ul, .ac-prose ol { padding-left: 1.15rem; }
.ac-prose li { margin-bottom: 0.4rem; }
.ac-prose img { max-width: 100%; height: auto; border-radius: var(--radius-md); }
.ac-prose table { width: 100%; display: block; overflow-x: auto; }

/* Marco de vídeo/portada de la ficha de curso */
.ac-media-frame {
    overflow: hidden;
    background-color: var(--ac-paper-deep);
    border: 1px solid var(--ac-rule);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
}

/* Raíl de filtros del catálogo */
.ac-rail {
    position: sticky;
    top: 88px;
    padding: 1.4rem;
    background-color: var(--ac-surface);
    border: 1px solid var(--ac-rule);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
}

.ac-rail-search { position: relative; }

.ac-rail-search i {
    position: absolute;
    top: 50%;
    left: 0.85rem;
    transform: translateY(-50%);
    color: var(--ci-gray-400);
    font-size: 0.9rem;
    pointer-events: none;
}

.ac-rail-search .form-control {
    padding-left: 2.35rem;
    background-color: var(--ac-paper);
}

.ac-rail-search .form-control:focus { background-color: #ffffff; }

.ac-rail-title {
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ci-gray-400);
    margin-bottom: 0.75rem;
}

/* Plegado de categorías en móvil */
.ac-rail-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.6rem 0.6rem;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ac-navy);
    background-color: var(--ac-paper);
    border: 1px solid var(--ac-rule);
    border-radius: var(--radius-sm);
}

.ac-rail-toggle i { transition: transform var(--transition-fast); }
.ac-rail-toggle[aria-expanded="true"] i { transform: rotate(180deg); }
/* Solo separa cuando el plegado está abierto: en lg+ el titulillo ya deja aire */
.ac-rail-list.show { margin-top: 0.65rem; }

.ac-rail-list, .ac-rail-sublist { list-style: none; padding: 0; margin: 0; }
.ac-rail-sublist { margin: 0.15rem 0 0.35rem 0.75rem; border-left: 1px solid var(--ac-rule); padding-left: 0.6rem; }

.ac-rail-link {
    display: block;
    padding: 0.4rem 0.6rem;
    font-size: 0.9rem;
    color: var(--ci-gray-700);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: color var(--transition-fast), background-color var(--transition-fast);
}

.ac-rail-link:hover { color: var(--ci-primary); background-color: var(--ac-paper); }

.ac-rail-link.active {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--ci-primary);
    background-color: var(--ci-primary-light);
}

.ac-rail-link--sub { font-size: 0.85rem; color: var(--ci-gray-500); }

/* Estado vacío */
.ac-empty { padding: 3.5rem 1.5rem; text-align: center; }
.ac-empty > i { display: block; font-size: 2.6rem; color: var(--ci-gray-300); margin-bottom: 1rem; }

/* ============================================================
   13. FICHA DE CURSO — datos, acordeón y bloque de compra
   ============================================================ */
.ac-course-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
    font-size: 0.78rem;
    color: var(--ci-gray-500);
    margin-bottom: 0.35rem;
}

.ac-course-meta i { margin-right: 0.3rem; }

/* Acordeón del temario */
.ac-accordion .accordion-item {
    border: 1px solid var(--ac-rule);
    border-radius: var(--radius-lg) !important;
    margin-bottom: 0.6rem;
    overflow: hidden;
    background-color: var(--ac-surface);
}

.ac-accordion .accordion-button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-heading);
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--ac-navy);
    background-color: var(--ac-paper);
    box-shadow: none;
}

.ac-accordion .accordion-button:not(.collapsed) {
    color: var(--ci-primary-dark);
    background-color: var(--ci-primary-light);
}

.ac-accordion .accordion-button:focus { box-shadow: var(--shadow-glow); }

.ac-accordion-num {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--ci-primary);
    flex: 0 0 auto;
}

.ac-accordion-count {
    font-family: var(--font-body);
    font-size: 0.76rem;
    font-weight: 500;
    color: var(--ci-gray-500);
    white-space: nowrap;
    margin-right: 0.5rem;
}

.ac-lesson-list { list-style: none; padding: 0; margin: 0; }

.ac-lesson-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1.25rem;
    font-size: 0.92rem;
    color: var(--ci-gray-700);
    border-top: 1px solid var(--ac-rule);
}

.ac-lesson-list li i { color: var(--ci-primary); flex: 0 0 auto; }

/* Bloque de compra */
.ac-buybox {
    padding: 1.6rem;
    background-color: var(--ac-surface);
    border: 1px solid var(--ac-rule);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

.ac-buybox-price { text-align: center; margin-bottom: 1.35rem; }

.ac-buybox-amount {
    font-family: var(--font-heading);
    font-size: 2.1rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--ac-navy);
}

.ac-buybox .price-original-lg {
    font-size: 0.95rem;
    color: var(--ci-gray-400);
    text-decoration: line-through;
}

.ac-buybox-title {
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ci-gray-400);
    margin: 1.5rem 0 0.85rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--ac-rule);
}

/* Cuando el titulillo abre la caja (resumen del carrito) no lleva filete arriba */
.ac-buybox-title--first { margin-top: 0; padding-top: 0; border-top: 0; }

.ac-includes { list-style: none; padding: 0; margin: 0; font-size: 0.88rem; }

.ac-includes li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: 0.55rem;
    color: var(--ci-gray-700);
}

.ac-includes i { color: var(--ci-primary); line-height: 1.6; }

/* Llamada a empresas: la única tarjeta navy de la columna */
.ac-business-cta {
    padding: 1.5rem;
    background: var(--ac-navy);
    background-size: 24px 24px, auto;
    border-radius: var(--radius-xl);
    color: rgba(255, 255, 255, 0.76);
    box-shadow: var(--shadow-md);
}

.ac-business-cta h3 { color: #ffffff; }

/* Tarjeta compacta de recomendaciones */
.ac-mini-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background-color: var(--ac-surface);
    border: 1px solid var(--ac-rule);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-base), transform var(--transition-base), border-color var(--transition-base);
}

.ac-mini-card:hover { border-color: var(--ci-primary); }

.ac-mini-media { position: relative; aspect-ratio: 16 / 9; background-color: var(--ac-paper-deep); }
.ac-mini-media img { width: 100%; height: 100%; object-fit: cover; display: block; }

.ac-mini-tag {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    padding: 0.15rem 0.55rem;
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 700;
    color: #ffffff;
    background-color: rgba(11, 31, 58, 0.78);
    border-radius: var(--radius-pill);
}

.ac-mini-body { padding: 1rem; flex: 1 1 auto; }

.ac-mini-title {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.01em;
    margin-bottom: 0.25rem;
}

.ac-mini-title a { color: var(--ac-navy); text-decoration: none; }
.ac-mini-title a:hover { color: var(--ci-primary); }

/* ============================================================
   14. CARRITO
   ============================================================ */
/* La fila del carrito es ahora una columna: arriba las tres piezas de siempre
   —portada, texto, precio— y debajo los avisos a todo el ancho. Antes se
   resolvió con flex-wrap sobre esta misma fila, y el precio se caía a la
   segunda línea en cuanto el título ocupaba lo suyo. */
.ac-cart-row {
    display: flex;
    flex-direction: column;
    padding: 1.35rem 1.6rem;
}

.ac-cart-row-main {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.ac-cart-row.has-rule { border-bottom: 1px solid var(--ac-rule); }

.ac-cart-row-media {
    flex: 0 0 132px;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background-color: var(--ac-paper-deep);
    border-radius: var(--radius-md);
}

.ac-cart-row-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ac-cart-row-body { flex: 1 1 auto; min-width: 0; }
.ac-cart-row-price { flex: 0 0 auto; text-align: right; }

/* Los avisos —«este curso se actualizó», «ya tienes otra versión»— a todo el
   ancho. Metidos en la columna de texto quedaban en una tira de 250 px
   compitiendo con el precio, y un aviso que hay que leer en cinco renglones
   cortos no se lee. */
.ac-cart-row-avisos .alert { margin-top: 0.85rem; margin-bottom: 0; }

.ac-cart-remove {
    padding: 0;
    font-size: 0.82rem;
    color: var(--ci-magenta);
    background: none;
    border: 0;
}

.ac-cart-remove:hover { color: var(--ci-magenta-dark); text-decoration: underline; }

.ac-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.92rem;
    margin-bottom: 0.5rem;
}

.ac-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding-top: 1rem;
    margin-bottom: 1.25rem;
    border-top: 1px solid var(--ac-rule);
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--ac-navy);
}

.ac-summary-total .ac-buybox-amount { font-size: 1.6rem; }

/* ============================================================
   15. ACCESO Y REGISTRO — pantalla partida
   ============================================================ */
.ac-auth {
    padding: 2.5rem 0 4rem;
    background-color: var(--ac-paper);
    background-size: 26px 26px;
}

.ac-auth-shell {
    overflow: hidden;
    background-color: var(--ac-surface);
    border: 1px solid var(--ac-rule);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.ac-auth-aside {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    padding: 3rem 2.5rem;
    background: var(--ac-navy);
    background-size: 30px 30px, auto;
    color: rgba(255, 255, 255, 0.75);
}

.ac-auth-aside-brand { display: inline-block; margin-bottom: 2.5rem; }
.ac-auth-aside-brand img { height: 38px; width: auto; display: block; }

.ac-auth-quote {
    font-family: var(--font-heading);
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
    color: #ffffff;
    margin-bottom: 2rem;
}

.ac-auth-points { list-style: none; padding: 0; margin: 0; font-size: 0.92rem; }

.ac-auth-points li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.ac-auth-panel { padding: 3rem 2.5rem; }
.ac-auth-head { margin-bottom: 1.75rem; }

.ac-auth-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 1.75rem 0 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--ac-rule);
    font-size: 0.9rem;
}

/* El ojo de «mostrar contraseña» no debe leerse como acción primaria */
.ac-auth-panel .input-group .btn-outline-primary {
    color: var(--ci-gray-500);
    box-shadow: none;
}

.ac-auth-panel .input-group .btn-outline-primary:hover {
    color: var(--ci-primary);
    box-shadow: none;
    transform: none;
}

/* ============================================================
   16. CHECKOUT (vistas heredadas: student/checkout, business/checkout)
   ------------------------------------------------------------
   No se duplican: son ~1.600 líneas con la lógica de pago dentro.
   Aquí solo se les da el papel y las superficies del tema.
   ============================================================ */
.checkout-section {
    background-color: var(--ac-paper) !important;
    background-size: 26px 26px;
}

.checkout-section .card {
    border: 1px solid var(--ac-rule);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
}

.checkout-section .card-header {
    background-color: var(--ac-surface);
    border-bottom: 1px solid var(--ac-rule);
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--ac-navy);
}

/* ============================================================
   17. PANELES (admin, estudiante, empresa, soporte)
   ------------------------------------------------------------
   Las vistas de app/Views/admin/ NO se duplican (~14.000 líneas
   de tablas y formularios de Bootstrap). Solo se sobrescriben
   los layouts y se ajusta aquí lo que la identidad necesita.
   `.ac-console` la pone el <body> de los cuatro layouts.
   ============================================================ */
.ac-console { background-color: var(--ac-paper); }
.admin-body.ac-console { background: var(--ac-paper); --admin-surface: var(--ac-paper); }

.ac-console .admin-sidebar {
    background-color: var(--ac-surface);
    border-right: 1px solid var(--ac-rule);
}

.ac-console .sidebar-brand,
.ac-console .sidebar-footer { border-color: var(--ac-rule) !important; }

.ac-console .sidebar-brand img { height: 30px; width: auto; }

/* `.admin-content` es un hijo flex sin `min-width`, así que su `min-width: auto`
   implícito lo hacía crecer con la tabla más ancha en vez de dejar que
   `.table-responsive` desplazara: en móvil el documento entero se iba hacia la
   derecha. Con `min-width: 0` la tabla vuelve a desplazarse dentro de su caja. */
.ac-console .admin-content { min-width: 0; }

.ac-console .admin-topbar {
    background-color: var(--ac-surface) !important;
    border-bottom: 1px solid var(--ac-rule) !important;
}

/* Enlaces de la barra lateral: misma pastilla que la navegación pública */
.ac-console .sidebar-link {
    font-family: var(--font-heading);
    font-weight: 600;
    border-radius: var(--radius-sm);
}

.ac-console .sidebar-link.active { font-weight: 700; }

/* Titulillos de grupo de la barra lateral */
.ac-console .sidebar-nav p.text-uppercase {
    font-family: var(--font-heading);
    letter-spacing: 0.14em !important;
    color: var(--ci-gray-400) !important;
}

/* Tarjetas y tablas del panel */
.ac-console .card {
    border: 1px solid var(--ac-rule);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.ac-console .card-header {
    background-color: var(--ac-surface);
    border-bottom: 1px solid var(--ac-rule);
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--ac-navy);
}

.ac-console .stat-card { border: 1px solid var(--ac-rule); border-radius: var(--radius-lg); }
.ac-console .stat-card .stat-icon { border-radius: var(--radius-md); }

.ac-console .table thead th {
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--ci-gray-500);
    background-color: var(--ac-paper);
    border-bottom: 1px solid var(--ac-rule);
    border-bottom-width: 1px;
}

.ac-console .table > :not(caption) > * > * { border-color: var(--ac-rule); }
.ac-console .table-light > :not(caption) > * > * { background-color: var(--ac-paper); }

/* Los títulos del panel iban en la escala del sitio público y quedaban enormes
   junto a las tablas; aquí se bajan a una escala de herramienta.
   Se acota a la zona de contenido (`.admin-content` en admin/empresa/soporte,
   `main` en estudiante) porque el pie navy queda FUERA de ambas y su
   `.ac-footer-title` es un <h2>: sin acotar, los titulillos del pie salían
   con el cuerpo de un titular. */
.ac-console :is(main, .admin-content) :is(h1, .h1) { font-size: 1.65rem; }
.ac-console :is(main, .admin-content) :is(h2, .h2) { font-size: 1.35rem; }
.ac-console :is(main, .admin-content) :is(h3, .h3) { font-size: 1.15rem; }
.ac-console :is(main, .admin-content) :is(h4, .h4) { font-size: 1.05rem; }

/* El degradado azul→teal de la base metía el acento donde no toca */
.ac-console .progress-bar { background: var(--ci-primary); }

/* Sidebar del estudiante: el layout la envuelve en una .card */
.ac-console .sidebar-link i { width: 1.1rem; text-align: center; }

/* ============================================================
   18. RESPONSIVE DE LAS PIEZAS NUEVAS
   ============================================================ */
@media (max-width: 991.98px) {
    .ac-rail { position: static; }
    .ac-auth-panel { padding: 2.25rem 1.75rem; }
    .ac-page-head-lead { max-width: none; }

    /* La barra superior del panel lleva cuatro acciones en una fila fija de
       56 px; por debajo de lg no caben y desbordaban. Aquí se le deja envolver. */
    .ac-console .admin-topbar {
        height: auto;
        flex-wrap: wrap;
        row-gap: 0.5rem;
    }
    .ac-console .admin-topbar > .d-flex { flex-wrap: wrap; row-gap: 0.5rem; }

    /* Varias cabeceras de tarjeta del panel ponen el título y un grupo de
       botones en la misma fila sin permitir salto (por ejemplo el filtro de
       actividad del escritorio de admin). */
    .ac-console .card-header.d-flex { flex-wrap: wrap; row-gap: 0.5rem; }
}

@media (max-width: 767.98px) {
    .ac-cart-row-main { flex-wrap: wrap; }
    .ac-cart-row-media { flex-basis: 96px; }
    .ac-cart-row-price { flex: 1 1 100%; text-align: left; }
    .ac-cart-row-price form { display: inline-block; }
    .ac-panel { padding: 1.25rem; }
    .ac-buybox { padding: 1.25rem; }
    .ac-accordion .accordion-count { display: none; }
}

@media (max-width: 575.98px) {
    .ac-auth { padding: 1.25rem 0 2.5rem; }
    .ac-auth-panel { padding: 1.75rem 1.25rem; }
    .ac-accordion .accordion-button { font-size: 0.9rem; padding-left: 0.9rem; padding-right: 0.9rem; }
    .ac-accordion-count { display: none; }
    .ac-lesson-list li { padding-left: 0.9rem; padding-right: 0.9rem; }
}

@media (prefers-reduced-motion: reduce) {
    .ac-mini-card { transition: none; }
    .ac-mini-card:hover { transform: none; }
}


/* Unidades dentro del temario público de la ficha de curso */
.ac-lesson-list .ac-unit-head {
    display: flex; align-items: center; gap: .55rem;
    background: var(--ci-gray-100);
    border-top: 1px solid var(--ci-gray-200);
    border-bottom: 1px solid var(--ci-gray-200);
    padding: .5rem 1rem;
    font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
    color: var(--ci-gray-600);
}
.ac-lesson-list .ac-unit-head i { color: var(--ci-primary); font-size: .95rem; }
.ac-lesson-list .ac-unit-head small { font-size: .72rem; letter-spacing: 0; text-transform: none; }

/* Riel a la izquierda: marca dónde empieza y dónde acaba la unidad, para que
   una lección suelta posterior no parezca formar parte de ella. */
.ac-lesson-list li.in-unit { position: relative; padding-left: 2.25rem; }
.ac-lesson-list li.in-unit::before {
    content: ''; position: absolute; left: 1.25rem; top: 0; bottom: 0;
    width: 2px; background: var(--ci-gray-200);
}

/* ============================================================
   Degradados heredados del CSS base
   ============================================================
   public/assets/css/app.css lo comparten las dos marcas, así que no se toca:
   CILearning se queda como está. Aquí se aplanan los degradados que llegan de
   allí y que en esta marca se veían como relieve.

   Se dejan DOS a propósito, porque no son decoración:
     .skeleton          el barrido que indica «esto está cargando»
     .brand-gradient    solo lo usa el logotipo de CILearning, que aquí no sale
   ============================================================ */
.navbar-accent-line,
.footer-gradient-border { background: var(--ac-rule) !important; }

.hero-section,
.cta-section,
.newsletter-section { background: var(--ac-navy) !important; }

.hero-section::before,
.hero-section::after { background: none !important; }

.auth-section { background: var(--ac-paper) !important; }

.continue-hero {
    background: var(--ac-surface) !important;
    border: 1px solid var(--ac-rule);
}

/* Las barras de progreso pasan a un color plano: un degradado de dos tonos
   dentro de una barra de 4 px no se lee como progreso, se lee como adorno. */
.progress-bar,
.student-course-card .thumb-progress-bar { background: var(--ci-primary) !important; }
