/* Hoja de estilos dedicada para el tema visual del catalogo publico (aislamiento CSS segun Regla 05) */

:root {
    /* Paleta Institucional y Tokens Semanticos del Catalogo */
    --ipn-guinda: #6b1d42;
    --ipn-guinda-rgb: 107, 29, 66;
    --ipn-guinda-dark: #531533;
    --ipn-guinda-light: var(--ipn-guinda-light, #8e2150);
    --ipn-dorado: #c59b27;
    --ipn-neon: var(--ipn-neon, #FF2A7A);
    --ipn-neon-rgb: 255, 42, 122;
    --theme-surface-light: var(--theme-surface-light, #fdf2f7);
    --theme-border-subtle: rgba(var(--ipn-guinda-rgb, 107, 29, 66), 0.25);
}

body {
    background-color: #08090c;
    background-image: radial-gradient(circle at 50% 0%, rgba(var(--ipn-guinda-rgb, 107, 29, 66), 0.18), transparent 45%);
    color: #e2e8f0;
}

.cyber-cut {
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

.cyber-panel-cut {
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
}

.carousel-perspective {
    perspective: 1200px;
}

/* Modificaciones de DataTables para interfaz de contraste */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_processing,
.dataTables_wrapper .dataTables_paginate {
    color: #94a3b8 !important;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
}

table.dataTable {
    width: 100% !important;
    max-width: 100% !important;
    border-color: #242a36 !important;
    color: #e2e8f0 !important;
}

table.dataTable thead th {
    background-color: #12151b !important;
    color: #ffffff !important;
    border-bottom: 2px solid var(--ipn-guinda, #6b1d42) !important;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

table.dataTable tbody tr {
    background-color: #0c0e12 !important;
    border-bottom: 1px solid #181c24 !important;
}

table.dataTable tbody tr:hover {
    background-color: #181c24 !important;
}

/* Disposición horizontal ergonómica y botones de paginación en tema oscuro */
.dataTables_paginate,
#catalogPagination .dataTables_paginate {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    margin: 0 !important;
    padding: 0 !important;
    white-space: nowrap !important;
}

.dataTables_paginate ul.pagination,
#catalogPagination .dataTables_paginate ul.pagination {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    flex-wrap: wrap !important;
}

.dataTables_paginate ul.pagination li,
#catalogPagination .dataTables_paginate ul.pagination li {
    display: inline-flex !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.dataTables_paginate .page-link,
.dataTables_paginate .paginate_button,
#catalogPagination .dataTables_paginate .page-link,
#catalogPagination .dataTables_paginate .paginate_button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 36px !important;
    height: 36px !important;
    padding: 0 12px !important;
    font-family: 'Share Tech Mono', monospace !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    color: #94a3b8 !important;
    background-color: #12151b !important;
    border: 1px solid #242a36 !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    cursor: pointer !important;
    user-select: none !important;
    transition: all 0.2s ease !important;
}

.dataTables_paginate .page-link:hover,
.dataTables_paginate .paginate_button:hover:not(.disabled):not(.current),
#catalogPagination .dataTables_paginate .page-link:hover,
#catalogPagination .dataTables_paginate .paginate_button:hover:not(.disabled):not(.current) {
    color: #ffffff !important;
    background-color: #181c24 !important;
    border-color: var(--ipn-neon, #FF2A7A) !important;
    box-shadow: 0 0 10px rgba(var(--ipn-neon-rgb, 255, 42, 122), 0.3) !important;
}

.dataTables_paginate li.active .page-link,
.dataTables_paginate .paginate_button.current,
.dataTables_paginate .paginate_button.current:hover,
#catalogPagination .dataTables_paginate li.active .page-link,
#catalogPagination .dataTables_paginate .paginate_button.current,
#catalogPagination .dataTables_paginate .paginate_button.current:hover {
    color: #ffffff !important;
    background-color: var(--ipn-guinda, #6b1d42) !important;
    border-color: var(--ipn-dorado, #c59b27) !important;
    box-shadow: 0 0 12px rgba(var(--ipn-guinda-rgb, 107, 29, 66), 0.6) !important;
    font-weight: 700 !important;
}

.dataTables_paginate li.disabled .page-link,
.dataTables_paginate .paginate_button.disabled,
.dataTables_paginate .paginate_button.disabled:hover,
#catalogPagination .dataTables_paginate li.disabled .page-link,
#catalogPagination .dataTables_paginate .paginate_button.disabled,
#catalogPagination .dataTables_paginate .paginate_button.disabled:hover {
    color: #475569 !important;
    background-color: #0c0e12 !important;
    border-color: #181c24 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    opacity: 0.55 !important;
    box-shadow: none !important;
}

.collapse:not(.show) {
    display: none !important;
}

.modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 1055 !important;
    display: none !important;
    width: 100vw !important;
    height: 100vh !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    outline: 0 !important;
}

.modal.show {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.modal-dialog {
    position: relative !important;
    width: 95% !important;
    max-width: 1100px !important;
    margin: auto !important;
    pointer-events: auto !important;
}

.modal-content {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    background-color: #12151b !important;
    border: 1px solid #242a36 !important;
    border-radius: 1rem !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.9), 0 0 25px rgba(var(--ipn-guinda-rgb, 107, 29, 66), 0.25) !important;
    overflow: hidden !important;
}

.modal-backdrop {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 1050 !important;
    width: 100vw !important;
    height: 100vh !important;
    background-color: #07080a !important;
}

.modal-backdrop.fade {
    opacity: 0;
    transition: opacity 0.15s linear;
}

.modal-backdrop.show {
    opacity: 0.85 !important;
}

.to-top-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 44px;
    height: 44px;
    background-color: #181c24;
    color: var(--ipn-dorado, #c59b27);
    border: 1px solid var(--ipn-guinda, #6b1d42);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(var(--ipn-guinda-rgb, 107, 29, 66), 0.4);
    z-index: 1050;
    cursor: pointer;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.to-top-btn.visible {
    opacity: 1;
    visibility: visible;
}

.to-top-btn:hover {
    background-color: var(--ipn-guinda, #6b1d42);
    color: #ffffff;
    box-shadow: 0 0 20px rgba(var(--ipn-guinda-rgb, 107, 29, 66), 0.8);
    transform: translateY(-3px);
}

/* ==========================================================================
   Armonización del Tema Claro para el Catálogo Institucional POLIVERSO
   Garantiza contraste WCAG AAA, armonía cromática IPN y eliminación de parches oscuros
   ========================================================================== */

/* Fondo general y canvas */
html:not(.dark) body,
[data-bs-theme="light"] body {
    background-color: #f8fafc;
    background-image: radial-gradient(circle at 50% 0%, rgba(var(--ipn-guinda-rgb, 107, 29, 66), 0.05), transparent 60%);
    color: #1e293b;
}

#cyberGridCanvas {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    pointer-events: none !important;
    z-index: 0 !important;
    display: block !important;
}

html:not(.dark) #cyberGridCanvas,
[data-bs-theme="light"] #cyberGridCanvas {
    opacity: 1 !important;
}

/* Integración directa de logos institucionales sin recuadros de fondo */
.header-logo-img {
    transition: transform 0.25s ease, filter 0.25s ease;
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.45));
}

.header-logo-img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 10px rgba(var(--ipn-neon-rgb, 255, 42, 122), 0.6));
}

html:not(.dark) .header-logo-img,
[data-bs-theme="light"] .header-logo-img {
    filter: none !important;
}

/* Conmutación de logos según el esquema visual activo */
html.dark .header-logo-color,
[data-bs-theme="dark"] .header-logo-color {
    display: none !important;
}

html.dark .header-logo-blanco,
[data-bs-theme="dark"] .header-logo-blanco {
    display: block !important;
}

html:not(.dark) .header-logo-color,
[data-bs-theme="light"] .header-logo-color {
    display: block !important;
}

html:not(.dark) .header-logo-blanco,
[data-bs-theme="light"] .header-logo-blanco {
    display: none !important;
}

/* Escala de dimensiones institucionales para logos de cabecera */
.header-logo-ipn {
    height: 6rem;
}

@media (min-width: 640px) {
    .header-logo-ipn {
        height: 8rem;
    }
}

.header-logo-dev {
    height: 4.5rem;
}

@media (min-width: 640px) {
    .header-logo-dev {
        height: 6rem;
    }
}

html:not(.dark) header,
[data-bs-theme="light"] header {
    background-color: rgba(255, 255, 255, 0.98) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

html:not(.dark) nav,
[data-bs-theme="light"] nav {
    background-color: rgba(248, 250, 252, 0.96) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
}

html:not(.dark) header h1,
[data-bs-theme="light"] header h1 {
    color: #0f172a !important;
}

html:not(.dark) header p,
[data-bs-theme="light"] header p {
    color: #64748b !important;
}

html:not(.dark) .btn-theme-toggle,
[data-bs-theme="light"] .btn-theme-toggle {
    color: #475569 !important;
}

html:not(.dark) .btn-theme-toggle:hover,
[data-bs-theme="light"] .btn-theme-toggle:hover {
    color: var(--ipn-guinda, #6b1d42) !important;
}

/* Sección Hero / Portada con fondo transparente para permitir visibilidad de la red de nodos */
html:not(.dark) section.relative.pt-12,
[data-bs-theme="light"] section.relative.pt-12 {
    background-color: transparent !important;
    border-bottom: 1px solid #e2e8f0;
}

/* Modo Oscuro: Portada Hero */
html.dark .hero-title,
[data-bs-theme="dark"] .hero-title {
    color: #ffffff !important;
    filter: drop-shadow(0 2px 15px rgba(0, 0, 0, 0.9));
}

/* Modo Claro: Portada Hero Armonizada */
html:not(.dark) .hero-badge,
[data-bs-theme="light"] .hero-badge {
    background-color: var(--theme-surface-light, #fdf2f7) !important;
    border-color: rgba(var(--ipn-guinda-rgb, 107, 29, 66), 0.25) !important;
    color: var(--ipn-guinda, #6b1d42) !important;
}

html:not(.dark) .hero-title,
[data-bs-theme="light"] .hero-title {
    color: #0f172a !important;
    filter: none !important;
    text-shadow: none !important;
}

html:not(.dark) .hero-title-highlight,
[data-bs-theme="light"] .hero-title-highlight {
    background-image: linear-gradient(135deg, var(--ipn-guinda, #6b1d42), var(--ipn-guinda-light, #8e2150), var(--ipn-guinda-dark, #531533)) !important;
    color: transparent !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
}

html:not(.dark) section.relative.pt-12 p.text-slate-300,
[data-bs-theme="light"] section.relative.pt-12 p.text-slate-300 {
    color: #475569 !important;
}

/* Sección Recién Agregados & Carousel Coverflow */
html:not(.dark) h3.font-tech,
[data-bs-theme="light"] h3.font-tech {
    color: #0f172a !important;
}

html:not(.dark) .swiper-slide,
[data-bs-theme="light"] .swiper-slide {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06) !important;
}

html:not(.dark) .swiper-slide-active,
[data-bs-theme="light"] .swiper-slide-active {
    border: 2px solid var(--ipn-guinda, #6b1d42) !important;
    box-shadow: 0 10px 30px rgba(var(--ipn-guinda-rgb, 107, 29, 66), 0.18) !important;
}

html:not(.dark) .swiper-pagination-bullet,
[data-bs-theme="light"] .swiper-pagination-bullet {
    background: #cbd5e1 !important;
}

html:not(.dark) .swiper-pagination-bullet-active,
[data-bs-theme="light"] .swiper-pagination-bullet-active {
    background: var(--ipn-guinda, #6b1d42) !important;
    box-shadow: 0 0 8px rgba(var(--ipn-guinda-rgb, 107, 29, 66), 0.4) !important;
}

/* Métricas institucionales (KPIs) con fondo translúcido para integración de partículas */
html:not(.dark) section[aria-label="Estadísticas institucionales"],
[data-bs-theme="light"] section[aria-label="Estadísticas institucionales"] {
    background-color: rgba(248, 250, 252, 0.65) !important;
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #e2e8f0 !important;
}

html:not(.dark) section[aria-label="Estadísticas institucionales"] .rounded-lg,
[data-bs-theme="light"] section[aria-label="Estadísticas institucionales"] .rounded-lg {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03) !important;
}

html:not(.dark) section[aria-label="Estadísticas institucionales"] .w-8.h-8,
[data-bs-theme="light"] section[aria-label="Estadísticas institucionales"] .w-8.h-8 {
    background-color: rgba(var(--ipn-guinda-rgb, 107, 29, 66), 0.08) !important;
    border-color: rgba(var(--ipn-guinda-rgb, 107, 29, 66), 0.2) !important;
    color: var(--ipn-guinda, #6b1d42) !important;
}

html:not(.dark) section[aria-label="Estadísticas institucionales"] p.font-tech,
[data-bs-theme="light"] section[aria-label="Estadísticas institucionales"] p.font-tech {
    color: #0f172a !important;
}

html:not(.dark) section[aria-label="Estadísticas institucionales"] p.font-mono,
[data-bs-theme="light"] section[aria-label="Estadísticas institucionales"] p.font-mono {
    color: #64748b !important;
}

/* Controles de Búsqueda y Filtros con fondo translúcido */
html:not(.dark) section#catalogo,
[data-bs-theme="light"] section#catalogo {
    background-color: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #e2e8f0 !important;
}

html:not(.dark) section#catalogo h2,
[data-bs-theme="light"] section#catalogo h2 {
    color: #0f172a !important;
}

html:not(.dark) section#catalogo p,
[data-bs-theme="light"] section#catalogo p {
    color: #64748b !important;
}

html:not(.dark) section#catalogo span.text-ipn-neon,
[data-bs-theme="light"] section#catalogo span.text-ipn-neon {
    color: var(--ipn-guinda, #6b1d42) !important;
}

html:not(.dark) #customSearch,
html:not(.dark) #customCategory,
html:not(.dark) #customSort,
html:not(.dark) #searchKeywordChip,
[data-bs-theme="light"] #customSearch,
[data-bs-theme="light"] #customCategory,
[data-bs-theme="light"] #customSort,
[data-bs-theme="light"] #searchKeywordChip {
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
}

html:not(.dark) #customSearch::placeholder,
html:not(.dark) #searchKeywordChip::placeholder,
[data-bs-theme="light"] #customSearch::placeholder,
[data-bs-theme="light"] #searchKeywordChip::placeholder {
    color: #94a3b8 !important;
}

html:not(.dark) #customSearch:focus,
html:not(.dark) #customCategory:focus,
html:not(.dark) #customSort:focus,
html:not(.dark) #searchKeywordChip:focus,
[data-bs-theme="light"] #customSearch:focus,
[data-bs-theme="light"] #customCategory:focus,
[data-bs-theme="light"] #customSort:focus,
[data-bs-theme="light"] #searchKeywordChip:focus {
    border-color: var(--ipn-guinda, #6b1d42) !important;
    box-shadow: 0 0 0 3px rgba(var(--ipn-guinda-rgb, 107, 29, 66), 0.12) !important;
}

html:not(.dark) #btnClearFilters,
[data-bs-theme="light"] #btnClearFilters {
    background-color: #f8fafc !important;
    border-color: rgba(var(--ipn-guinda-rgb, 107, 29, 66), 0.3) !important;
    color: var(--ipn-guinda, #6b1d42) !important;
}

html:not(.dark) #btnClearFilters:hover,
[data-bs-theme="light"] #btnClearFilters:hover {
    background-color: var(--ipn-guinda, #6b1d42) !important;
    color: #ffffff !important;
}

html:not(.dark) .keyword-chip,
[data-bs-theme="light"] .keyword-chip {
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #475569 !important;
}

html:not(.dark) .keyword-chip:hover,
[data-bs-theme="light"] .keyword-chip:hover {
    border-color: var(--ipn-guinda, #6b1d42) !important;
    color: var(--ipn-guinda, #6b1d42) !important;
}

html:not(.dark) .keyword-chip.active,
[data-bs-theme="light"] .keyword-chip.active {
    background-color: var(--ipn-guinda, #6b1d42) !important;
    border-color: var(--ipn-guinda, #6b1d42) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(var(--ipn-guinda-rgb, 107, 29, 66), 0.25) !important;
}

/* Rejilla de Videos y Tarjetas */
html:not(.dark) main.bg-punk-void\/70,
[data-bs-theme="light"] main.bg-punk-void\/70 {
    background-color: #f8fafc !important;
}

html:not(.dark) #gridVideos article,
[data-bs-theme="light"] #gridVideos article {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04) !important;
}

html:not(.dark) #gridVideos article:hover,
[data-bs-theme="light"] #gridVideos article:hover {
    border-color: rgba(var(--ipn-guinda-rgb, 107, 29, 66), 0.4) !important;
    box-shadow: 0 12px 28px rgba(var(--ipn-guinda-rgb, 107, 29, 66), 0.12) !important;
}

html:not(.dark) #gridVideos article h3,
[data-bs-theme="light"] #gridVideos article h3 {
    color: #0f172a !important;
}

html:not(.dark) #gridVideos article:hover h3,
[data-bs-theme="light"] #gridVideos article:hover h3 {
    color: var(--ipn-guinda, #6b1d42) !important;
}

html:not(.dark) #gridVideos article span.font-mono,
html:not(.dark) #gridVideos article div.font-mono,
[data-bs-theme="light"] #gridVideos article span.font-mono,
[data-bs-theme="light"] #gridVideos article div.font-mono {
    color: #64748b !important;
}

html:not(.dark) #gridVideos article .bg-punk-panel,
[data-bs-theme="light"] #gridVideos article .bg-punk-panel {
    background-color: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
    color: #475569 !important;
}

html:not(.dark) #gridVideos article .eq-container,
[data-bs-theme="light"] #gridVideos article .eq-container {
    background-color: rgba(255, 255, 255, 0.9) !important;
    border-color: rgba(var(--ipn-guinda-rgb, 107, 29, 66), 0.3) !important;
}

html:not(.dark) #gridVideos article .btn-view-video,
[data-bs-theme="light"] #gridVideos article .btn-view-video {
    background-color: var(--ipn-guinda, #6b1d42) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(var(--ipn-guinda-rgb, 107, 29, 66), 0.2) !important;
}

html:not(.dark) #gridVideos article .btn-view-video:hover,
[data-bs-theme="light"] #gridVideos article .btn-view-video:hover {
    background-color: var(--ipn-guinda-dark, #531533) !important;
    box-shadow: 0 4px 12px rgba(var(--ipn-guinda-rgb, 107, 29, 66), 0.35) !important;
}

/* Vista de Tabla */
html:not(.dark) #tableVideosContainer,
[data-bs-theme="light"] #tableVideosContainer {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03) !important;
}

html:not(.dark) #tableVideos thead th,
[data-bs-theme="light"] #tableVideos thead th {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
    border-bottom: 2px solid var(--ipn-guinda, #6b1d42) !important;
}

html:not(.dark) #tableVideos tbody tr,
[data-bs-theme="light"] #tableVideos tbody tr {
    background-color: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
    color: #1e293b !important;
}

html:not(.dark) #tableVideos tbody tr:hover,
[data-bs-theme="light"] #tableVideos tbody tr:hover {
    background-color: #f8fafc !important;
}

/* Espaciado, respiración visual y estilos generales para tabla de videos */
#tableVideos {
    border-collapse: separate !important;
    border-spacing: 0 !important;
    width: 100% !important;
}

#tableVideos thead th {
    padding: 0.85rem 0.75rem !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
}

#tableVideos tbody td {
    padding: 0.95rem 0.75rem !important;
    vertical-align: middle !important;
}

#tableVideos tbody tr {
    transition: background-color 0.15s ease !important;
}

#tableVideos tbody tr:hover {
    background-color: rgba(var(--ipn-guinda-rgb, 107, 29, 66), 0.15) !important;
}

.video-title-link {
    color: #f1f5f9 !important;
    transition: color 0.15s ease !important;
}

.video-title-link:hover {
    color: var(--ipn-neon, #FF2A7A) !important;
}

html:not(.dark) .video-title-link,
[data-bs-theme="light"] .video-title-link {
    color: #0f172a !important;
}

html:not(.dark) .video-title-link:hover,
[data-bs-theme="light"] .video-title-link:hover {
    color: var(--ipn-guinda, #6b1d42) !important;
}

.video-metrics-badge {
    background-color: rgba(10, 10, 18, 0.85) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #cbd5e1 !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
}

html:not(.dark) .video-metrics-badge,
[data-bs-theme="light"] .video-metrics-badge {
    background-color: #f8fafc !important;
    border-color: #e2e8f0 !important;
    color: #475569 !important;
}

.video-tag-chip {
    background-color: rgba(25, 25, 38, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #94a3b8 !important;
}

html:not(.dark) .video-tag-chip,
[data-bs-theme="light"] .video-tag-chip {
    background-color: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    color: #475569 !important;
}

/* Badges de Categoría Distinguibles */
.category-badge-pill {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.28rem 0.85rem !important;
    border-radius: 9999px !important;
    font-family: var(--font-mono, monospace) !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    white-space: nowrap !important;
    color: #ffffff !important;
    background: linear-gradient(135deg, var(--ipn-guinda, #6b1d42) 0%, #8c2356 100%) !important;
    border: 1px solid rgba(var(--ipn-neon-rgb, 255, 42, 122), 0.55) !important;
    box-shadow: 0 0 10px rgba(var(--ipn-neon-rgb, 255, 42, 122), 0.22) !important;
}

.category-badge-muted {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.25rem 0.75rem !important;
    border-radius: 9999px !important;
    font-family: var(--font-mono, monospace) !important;
    font-size: 0.7rem !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    color: #94a3b8 !important;
    background-color: rgba(15, 23, 42, 0.65) !important;
    border: 1px solid rgba(71, 85, 105, 0.45) !important;
}

html:not(.dark) .category-badge-pill,
[data-bs-theme="light"] .category-badge-pill {
    background: var(--ipn-guinda, #6b1d42) !important;
    border: 1px solid var(--ipn-guinda-dark, #531533) !important;
    box-shadow: 0 2px 6px rgba(var(--ipn-guinda-rgb, 107, 29, 66), 0.25) !important;
    color: #ffffff !important;
}

html:not(.dark) .category-badge-muted,
[data-bs-theme="light"] .category-badge-muted {
    background-color: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    color: #64748b !important;
}

/* Paginación y contador de registros DataTables en tema claro */
html:not(.dark) #catalogPagination,
[data-bs-theme="light"] #catalogPagination {
    border-top-color: #e2e8f0 !important;
}

html:not(.dark) .dataTables_info,
html:not(.dark) #catalogPagination .dataTables_info,
[data-bs-theme="light"] .dataTables_info,
[data-bs-theme="light"] #catalogPagination .dataTables_info {
    color: #64748b !important;
}

html:not(.dark) .dataTables_paginate .page-link,
html:not(.dark) .dataTables_paginate .paginate_button,
html:not(.dark) #catalogPagination .dataTables_paginate .page-link,
html:not(.dark) #catalogPagination .dataTables_paginate .paginate_button,
[data-bs-theme="light"] .dataTables_paginate .page-link,
[data-bs-theme="light"] .dataTables_paginate .paginate_button,
[data-bs-theme="light"] #catalogPagination .dataTables_paginate .page-link,
[data-bs-theme="light"] #catalogPagination .dataTables_paginate .paginate_button {
    color: #334155 !important;
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

html:not(.dark) .dataTables_paginate .page-link:hover,
html:not(.dark) .dataTables_paginate .paginate_button:hover:not(.disabled):not(.current),
html:not(.dark) #catalogPagination .dataTables_paginate .page-link:hover,
html:not(.dark) #catalogPagination .dataTables_paginate .paginate_button:hover:not(.disabled):not(.current),
[data-bs-theme="light"] .dataTables_paginate .page-link:hover,
[data-bs-theme="light"] .dataTables_paginate .paginate_button:hover:not(.disabled):not(.current),
[data-bs-theme="light"] #catalogPagination .dataTables_paginate .page-link:hover,
[data-bs-theme="light"] #catalogPagination .dataTables_paginate .paginate_button:hover:not(.disabled):not(.current) {
    color: var(--ipn-guinda, #6b1d42) !important;
    background-color: var(--theme-surface-light, #fdf2f7) !important;
    border-color: var(--ipn-guinda, #6b1d42) !important;
    box-shadow: 0 2px 6px rgba(var(--ipn-guinda-rgb, 107, 29, 66), 0.15) !important;
}

html:not(.dark) .dataTables_paginate li.active .page-link,
html:not(.dark) .dataTables_paginate .paginate_button.current,
html:not(.dark) .dataTables_paginate .paginate_button.current:hover,
html:not(.dark) #catalogPagination .dataTables_paginate li.active .page-link,
html:not(.dark) #catalogPagination .dataTables_paginate .paginate_button.current,
html:not(.dark) #catalogPagination .dataTables_paginate .paginate_button.current:hover,
[data-bs-theme="light"] .dataTables_paginate li.active .page-link,
[data-bs-theme="light"] .dataTables_paginate .paginate_button.current,
[data-bs-theme="light"] .dataTables_paginate .paginate_button.current:hover,
[data-bs-theme="light"] #catalogPagination .dataTables_paginate li.active .page-link,
[data-bs-theme="light"] #catalogPagination .dataTables_paginate .paginate_button.current,
[data-bs-theme="light"] #catalogPagination .dataTables_paginate .paginate_button.current:hover {
    color: #ffffff !important;
    background-color: var(--ipn-guinda, #6b1d42) !important;
    border-color: var(--ipn-dorado, #c59b27) !important;
    box-shadow: 0 2px 8px rgba(var(--ipn-guinda-rgb, 107, 29, 66), 0.35) !important;
    font-weight: 700 !important;
}

html:not(.dark) .dataTables_paginate li.disabled .page-link,
html:not(.dark) .dataTables_paginate .paginate_button.disabled,
html:not(.dark) .dataTables_paginate .paginate_button.disabled:hover,
html:not(.dark) #catalogPagination .dataTables_paginate li.disabled .page-link,
html:not(.dark) #catalogPagination .dataTables_paginate .paginate_button.disabled,
html:not(.dark) #catalogPagination .dataTables_paginate .paginate_button.disabled:hover,
[data-bs-theme="light"] .dataTables_paginate li.disabled .page-link,
[data-bs-theme="light"] .dataTables_paginate .paginate_button.disabled,
[data-bs-theme="light"] .dataTables_paginate .paginate_button.disabled:hover,
[data-bs-theme="light"] #catalogPagination .dataTables_paginate li.disabled .page-link,
[data-bs-theme="light"] #catalogPagination .dataTables_paginate .paginate_button.disabled,
[data-bs-theme="light"] #catalogPagination .dataTables_paginate .paginate_button.disabled:hover {
    color: #94a3b8 !important;
    background-color: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    opacity: 0.55 !important;
    box-shadow: none !important;
}

/* Botón flotante To-Top */
html:not(.dark) .to-top-btn,
[data-bs-theme="light"] .to-top-btn {
    background-color: #ffffff !important;
    color: var(--ipn-guinda, #6b1d42) !important;
    border-color: rgba(var(--ipn-guinda-rgb, 107, 29, 66), 0.25) !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08) !important;
}

html:not(.dark) .to-top-btn:hover,
[data-bs-theme="light"] .to-top-btn:hover {
    background-color: var(--ipn-guinda, #6b1d42) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 20px rgba(var(--ipn-guinda-rgb, 107, 29, 66), 0.3) !important;
}

/* Pie de página institucional armonizado */
html:not(.dark) footer.bg-ipn-deep,
[data-bs-theme="light"] footer.bg-ipn-deep {
    background-color: var(--ipn-guinda-dark, #531533) !important;
    border-top: 3px solid var(--ipn-dorado, #c59b27) !important;
    color: #f1f5f9 !important;
}

html:not(.dark) footer span.font-tech,
[data-bs-theme="light"] footer span.font-tech,
html:not(.dark) footer h6,
[data-bs-theme="light"] footer h6 {
    color: #ffffff !important;
}

html:not(.dark) footer span.text-ipn-chrome,
[data-bs-theme="light"] footer span.text-ipn-chrome {
    color: var(--ipn-dorado, #c59b27) !important;
}

html:not(.dark) footer p,
[data-bs-theme="light"] footer p {
    color: #e2e8f0 !important;
}

html:not(.dark) footer a,
[data-bs-theme="light"] footer a {
    color: #cbd5e1 !important;
}

html:not(.dark) footer a:hover,
[data-bs-theme="light"] footer a:hover {
    color: #ffffff !important;
}

.footer-privacy-link {
    color: var(--ipn-neon, #FF2A7A);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

.footer-privacy-link:hover {
    color: #ffffff;
    text-shadow: 0 0 8px rgba(var(--ipn-neon-rgb, 255, 42, 122), 0.6);
}

html:not(.dark) .footer-privacy-link,
[data-bs-theme="light"] .footer-privacy-link {
    color: var(--ipn-dorado, #c59b27) !important;
}

html:not(.dark) .footer-privacy-link:hover,
[data-bs-theme="light"] .footer-privacy-link:hover {
    color: #ffffff !important;
    text-shadow: 0 0 6px rgba(197, 155, 39, 0.5) !important;
}


html:not(.dark) footer .bg-punk-void\/80,
[data-bs-theme="light"] footer .bg-punk-void\/80 {
    background-color: rgba(0, 0, 0, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: #e2e8f0 !important;
}

/* Adaptación de esquinas HUD y ecualizador multimedia en modo claro */
html:not(.dark) .hud-corner,
[data-bs-theme="light"] .hud-corner {
    border-color: rgba(var(--ipn-guinda-rgb, 107, 29, 66), 0.25) !important;
}

html:not(.dark) .hud-corners:hover .hud-corner,
html:not(.dark) .group:hover .hud-corner,
[data-bs-theme="light"] .hud-corners:hover .hud-corner,
[data-bs-theme="light"] .group:hover .hud-corner {
    border-color: var(--ipn-guinda, #6b1d42) !important;
    box-shadow: 0 0 6px rgba(var(--ipn-guinda-rgb, 107, 29, 66), 0.35) !important;
}

html:not(.dark) .eq-bar,
[data-bs-theme="light"] .eq-bar {
    background: linear-gradient(to top, var(--ipn-guinda, #6b1d42), #a42c55) !important;
}

/* Conmutador de vista de cuadrícula / lista */
html:not(.dark) .btn-view-toggle,
[data-bs-theme="light"] .btn-view-toggle {
    background-color: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    color: #475569 !important;
}

html:not(.dark) .btn-view-toggle.active,
[data-bs-theme="light"] .btn-view-toggle.active {
    background-color: var(--ipn-guinda, #6b1d42) !important;
    border-color: var(--ipn-guinda, #6b1d42) !important;
    color: #ffffff !important;
}

/* Adaptación integral del modal de detalles en modo claro */
html:not(.dark) .modal-content,
[data-bs-theme="light"] .modal-content {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15) !important;
    color: #1e293b !important;
}

html:not(.dark) .modal-content .bg-punk-void\/95,
[data-bs-theme="light"] .modal-content .bg-punk-void\/95 {
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
}

html:not(.dark) .modal-content #mv-titulo,
[data-bs-theme="light"] .modal-content #mv-titulo {
    color: #0f172a !important;
}

html:not(.dark) .modal-content .bg-punk-base,
[data-bs-theme="light"] .modal-content .bg-punk-base {
    background-color: #f8fafc !important;
}

html:not(.dark) .modal-content button[data-bs-dismiss="modal"],
[data-bs-theme="light"] .modal-content button[data-bs-dismiss="modal"] {
    background-color: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    color: #475569 !important;
}

html:not(.dark) .modal-content button[data-bs-dismiss="modal"]:hover,
[data-bs-theme="light"] .modal-content button[data-bs-dismiss="modal"]:hover {
    color: var(--ipn-guinda, #6b1d42) !important;
    border-color: var(--ipn-guinda, #6b1d42) !important;
}

/* ==========================================================================
   HOMOLOGACIÓN INTEGRAL EN MODO CLARO (PALETA INSTITUCIONAL DEV - IPN)
   Armonización de contenedores centrales, tarjetas y formularios para mitigar
   contrastes excesivos y garantizar balance estético sobre fondo claro.
   ========================================================================== */

/* Contenedores principales de información institucional (Inicio, Objetivo, Login) */
html:not(.dark) .institutional-card,
[data-bs-theme="light"] .institutional-card {
    background-color: rgba(255, 255, 255, 0.94) !important;
    border: 1px solid rgba(var(--ipn-guinda-rgb, 107, 29, 66), 0.16) !important;
    box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.06), 0 0 1px 1px rgba(var(--ipn-guinda-rgb, 107, 29, 66), 0.08) !important;
    backdrop-filter: blur(16px);
}

/* Barra superior decorativa institucional con gradiente sutil guinda */
html:not(.dark) .institutional-card .absolute.top-0,
[data-bs-theme="light"] .institutional-card .absolute.top-0 {
    background: linear-gradient(90deg, transparent, var(--ipn-guinda, #6b1d42), transparent) !important;
    opacity: 0.75 !important;
}

/* Atenuación del halo ambiental de fondo en modo claro para evitar saturación */
html:not(.dark) .bg-ipn-guinda\/15.blur-\[120px\],
html:not(.dark) .bg-ipn-guinda\/20.blur-\[120px\],
[data-bs-theme="light"] .bg-ipn-guinda\/15.blur-\[120px\],
[data-bs-theme="light"] .bg-ipn-guinda\/20.blur-\[120px\] {
    opacity: 0.25 !important;
}

/* Iconos de cabecera con fondo perla y tono guinda institucional */
html:not(.dark) .institutional-card-icon,
[data-bs-theme="light"] .institutional-card-icon {
    background-color: var(--theme-surface-light, #fdf2f7) !important;
    border: 1px solid rgba(var(--ipn-guinda-rgb, 107, 29, 66), 0.25) !important;
    color: var(--ipn-guinda, #6b1d42) !important;
    box-shadow: 0 4px 15px rgba(var(--ipn-guinda-rgb, 107, 29, 66), 0.12) !important;
}

/* Píldora de metadatos institucional armonizada */
html:not(.dark) .institutional-card-badge,
[data-bs-theme="light"] .institutional-card-badge {
    background-color: #f8fafc !important;
    border: 1px solid rgba(var(--ipn-guinda-rgb, 107, 29, 66), 0.22) !important;
    color: var(--ipn-guinda, #6b1d42) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
}

html:not(.dark) .institutional-card-badge span.bg-ipn-neon,
[data-bs-theme="light"] .institutional-card-badge span.bg-ipn-neon {
    background-color: var(--ipn-guinda, #6b1d42) !important;
}

/* Títulos con contraste limpio y gradiente institucional */
html:not(.dark) .institutional-card-title,
[data-bs-theme="light"] .institutional-card-title {
    color: #0f172a !important;
    filter: none !important;
}

html:not(.dark) .institutional-card-title span,
[data-bs-theme="light"] .institutional-card-title span {
    background-image: linear-gradient(135deg, var(--ipn-guinda, #6b1d42), var(--ipn-guinda-light, #8e2150), #531533) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    color: transparent !important;
}

/* Líneas de acento decorativas bajo el título */
html:not(.dark) .institutional-card .w-16.h-1.rounded-full,
[data-bs-theme="light"] .institutional-card .w-16.h-1.rounded-full {
    background: linear-gradient(90deg, var(--ipn-guinda, #6b1d42), var(--ipn-dorado, #c59b27)) !important;
}

html:not(.dark) .institutional-card-divider,
[data-bs-theme="light"] .institutional-card-divider {
    border-top-color: #e2e8f0 !important;
}

/* Tipografía de cuerpo en las tarjetas institucionales */
html:not(.dark) .institutional-card .space-y-6,
html:not(.dark) .institutional-card p,
[data-bs-theme="light"] .institutional-card .space-y-6,
[data-bs-theme="light"] .institutional-card p {
    color: #334155 !important;
}

html:not(.dark) .institutional-card strong,
[data-bs-theme="light"] .institutional-card strong {
    color: #0f172a !important;
}

html:not(.dark) .institutional-card span.text-ipn-chrome,
[data-bs-theme="light"] .institutional-card span.text-ipn-chrome {
    color: var(--ipn-guinda, #6b1d42) !important;
}

/* Botones principales dentro de tarjetas institucionales */
html:not(.dark) .institutional-card-btn,
[data-bs-theme="light"] .institutional-card-btn {
    background-color: var(--ipn-guinda, #6b1d42) !important;
    border-color: var(--ipn-guinda, #6b1d42) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(var(--ipn-guinda-rgb, 107, 29, 66), 0.25) !important;
}

html:not(.dark) .institutional-card-btn:hover,
[data-bs-theme="light"] .institutional-card-btn:hover {
    background-color: var(--ipn-guinda-dark, #531533) !important;
    box-shadow: 0 6px 20px rgba(var(--ipn-guinda-rgb, 107, 29, 66), 0.4) !important;
}

/* Formulario de Login institucional adaptado al modo claro */
html:not(.dark) .institutional-card label,
[data-bs-theme="light"] .institutional-card label {
    color: #334155 !important;
}

html:not(.dark) .institutional-card input[type="email"],
html:not(.dark) .institutional-card input[type="password"],
[data-bs-theme="light"] .institutional-card input[type="email"],
[data-bs-theme="light"] .institutional-card input[type="password"] {
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
}

html:not(.dark) .institutional-card input[type="email"]::placeholder,
html:not(.dark) .institutional-card input[type="password"]::placeholder,
[data-bs-theme="light"] .institutional-card input[type="email"]::placeholder,
[data-bs-theme="light"] .institutional-card input[type="password"]::placeholder {
    color: #94a3b8 !important;
}

html:not(.dark) .institutional-card input[type="email"]:focus,
html:not(.dark) .institutional-card input[type="password"]:focus,
[data-bs-theme="light"] .institutional-card input[type="email"]:focus,
[data-bs-theme="light"] .institutional-card input[type="password"]:focus {
    border-color: var(--ipn-guinda, #6b1d42) !important;
    box-shadow: 0 0 0 3px rgba(var(--ipn-guinda-rgb, 107, 29, 66), 0.12) !important;
}

html:not(.dark) .institutional-card .border-t.border-punk-border,
[data-bs-theme="light"] .institutional-card .border-t.border-punk-border {
    border-top-color: #e2e8f0 !important;
}

html:not(.dark) .institutional-card a.text-ipn-neon,
[data-bs-theme="light"] .institutional-card a.text-ipn-neon {
    color: var(--ipn-guinda, #6b1d42) !important;
}

/* Escaparate visual institucional de la mascota (Sección Inicio) */
.mascot-showcase-panel {
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.mascot-showcase-panel:hover {
    border-color: rgba(var(--ipn-neon-rgb, 255, 42, 122), 0.45);
    box-shadow: 0 10px 30px -10px rgba(var(--ipn-guinda-rgb, 107, 29, 66), 0.35);
}

.mascot-hero-img {
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.25)) drop-shadow(0 8px 20px rgba(0, 0, 0, 0.5));
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
}

.mascot-showcase-panel:hover .mascot-hero-img {
    filter: drop-shadow(0 0 16px rgba(var(--ipn-neon-rgb, 255, 42, 122), 0.45)) drop-shadow(0 12px 24px rgba(0, 0, 0, 0.6));
}

html:not(.dark) .mascot-showcase-panel,
[data-bs-theme="light"] .mascot-showcase-panel {
    background: linear-gradient(145deg, #ffffff, #fdf4f8) !important;
    border: 1px solid rgba(var(--ipn-guinda-rgb, 107, 29, 66), 0.18) !important;
    box-shadow: 0 12px 30px -8px rgba(107, 29, 66, 0.1), inset 0 0 0 1px rgba(255, 255, 255, 0.9) !important;
}

html:not(.dark) .mascot-showcase-panel:hover,
[data-bs-theme="light"] .mascot-showcase-panel:hover {
    border-color: rgba(var(--ipn-guinda-rgb, 107, 29, 66), 0.35) !important;
    box-shadow: 0 16px 36px -8px rgba(107, 29, 66, 0.18) !important;
}

html:not(.dark) .mascot-aura-radial,
[data-bs-theme="light"] .mascot-aura-radial {
    opacity: 0.12 !important;
}

html:not(.dark) .mascot-hero-img,
[data-bs-theme="light"] .mascot-hero-img {
    filter: drop-shadow(0 8px 18px rgba(107, 29, 66, 0.15)) !important;
}

html:not(.dark) .mascot-showcase-panel:hover .mascot-hero-img,
[data-bs-theme="light"] .mascot-showcase-panel:hover .mascot-hero-img {
    filter: drop-shadow(0 12px 24px rgba(107, 29, 66, 0.25)) !important;
}

html:not(.dark) .mascot-pill,
[data-bs-theme="light"] .mascot-pill {
    background-color: #fdf2f7 !important;
    border-color: rgba(var(--ipn-guinda-rgb, 107, 29, 66), 0.25) !important;
    color: var(--ipn-guinda, #6b1d42) !important;
    box-shadow: 0 2px 6px rgba(107, 29, 66, 0.08) !important;
}

html:not(.dark) .mascot-pill i,
[data-bs-theme="light"] .mascot-pill i {
    color: var(--ipn-guinda, #6b1d42) !important;
}

html:not(.dark) .mascot-caption,
[data-bs-theme="light"] .mascot-caption {
    color: #64748b !important;
}

html:not(.dark) .institutional-card-btn-alt,
[data-bs-theme="light"] .institutional-card-btn-alt {
    background-color: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #334155 !important;
}

html:not(.dark) .institutional-card-btn-alt:hover,
[data-bs-theme="light"] .institutional-card-btn-alt:hover {
    background-color: #f1f5f9 !important;
    color: var(--ipn-guinda, #6b1d42) !important;
    border-color: var(--ipn-guinda, #6b1d42) !important;
}


/* Homologación general de superficies dark en vistas públicas */
html:not(.dark) .bg-punk-surface,
html:not(.dark) .bg-punk-surface\/80,
html:not(.dark) .bg-punk-surface\/90,
html:not(.dark) .bg-punk-surface\/60,
[data-bs-theme="light"] .bg-punk-surface,
[data-bs-theme="light"] .bg-punk-surface\/80,
[data-bs-theme="light"] .bg-punk-surface\/90,
[data-bs-theme="light"] .bg-punk-surface\/60 {
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
}

html:not(.dark) .bg-punk-panel,
[data-bs-theme="light"] .bg-punk-panel {
    background-color: #f8fafc !important;
    border-color: #e2e8f0 !important;
    color: #334155 !important;
}

/* Homologación de páginas de detalles (Videos y Podcasts) en modo claro */
html:not(.dark) .lg\:col-span-8 .bg-punk-surface,
html:not(.dark) .lg\:col-span-4 .bg-punk-surface,
[data-bs-theme="light"] .lg\:col-span-8 .bg-punk-surface,
[data-bs-theme="light"] .lg\:col-span-4 .bg-punk-surface {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04) !important;
}

html:not(.dark) .lg\:col-span-8 h1,
html:not(.dark) .lg\:col-span-8 h2,
html:not(.dark) .lg\:col-span-4 h3,
[data-bs-theme="light"] .lg\:col-span-8 h1,
[data-bs-theme="light"] .lg\:col-span-8 h2,
[data-bs-theme="light"] .lg\:col-span-4 h3 {
    color: #0f172a !important;
}

html:not(.dark) .lg\:col-span-8 p,
html:not(.dark) .lg\:col-span-4 p,
[data-bs-theme="light"] .lg\:col-span-8 p,
[data-bs-theme="light"] .lg\:col-span-4 p {
    color: #334155 !important;
}

html:not(.dark) .lg\:col-span-8 .bg-punk-base,
[data-bs-theme="light"] .lg\:col-span-8 .bg-punk-base {
    background-color: #f8fafc !important;
    border-color: #e2e8f0 !important;
    color: #334155 !important;
}

html:not(.dark) .lg\:col-span-8 .bg-black\/40,
[data-bs-theme="light"] .lg\:col-span-8 .bg-black\/40 {
    background-color: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
}

/* Homologación de métricas y catálogo de Podcasts */
html:not(.dark) section[aria-label="Estadísticas de podcasts"],
[data-bs-theme="light"] section[aria-label="Estadísticas de podcasts"] {
    background-color: rgba(248, 250, 252, 0.65) !important;
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #e2e8f0 !important;
}

html:not(.dark) section[aria-label="Estadísticas de podcasts"] .rounded-lg,
[data-bs-theme="light"] section[aria-label="Estadísticas de podcasts"] .rounded-lg {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03) !important;
}

html:not(.dark) section[aria-label="Estadísticas de podcasts"] .w-8.h-8,
[data-bs-theme="light"] section[aria-label="Estadísticas de podcasts"] .w-8.h-8 {
    background-color: rgba(var(--ipn-guinda-rgb, 107, 29, 66), 0.08) !important;
    border-color: rgba(var(--ipn-guinda-rgb, 107, 29, 66), 0.2) !important;
    color: var(--ipn-guinda, #6b1d42) !important;
}

html:not(.dark) section[aria-label="Estadísticas de podcasts"] p.font-tech,
[data-bs-theme="light"] section[aria-label="Estadísticas de podcasts"] p.font-tech {
    color: #0f172a !important;
}

html:not(.dark) section[aria-label="Estadísticas de podcasts"] p.font-mono,
[data-bs-theme="light"] section[aria-label="Estadísticas de podcasts"] p.font-mono {
    color: #64748b !important;
}

/* Sección de contenido del catálogo de Podcasts en modo claro (Zero-Darkness) */
html:not(.dark) main.bg-punk-void\/90,
html:not(.dark) section.bg-punk-void\/90,
html:not(.dark) .bg-punk-void\/90,
html:not(.dark) main.bg-punk-void\/70,
html:not(.dark) section.bg-punk-void\/70,
html:not(.dark) .bg-punk-void\/70,
[data-bs-theme="light"] main.bg-punk-void\/90,
[data-bs-theme="light"] section.bg-punk-void\/90,
[data-bs-theme="light"] .bg-punk-void\/90,
[data-bs-theme="light"] main.bg-punk-void\/70,
[data-bs-theme="light"] section.bg-punk-void\/70,
[data-bs-theme="light"] .bg-punk-void\/70 {
    background-color: transparent !important;
}

/* Rejilla de Podcasts en modo claro */
html:not(.dark) #gridPodcasts article,
[data-bs-theme="light"] #gridPodcasts article {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04) !important;
}

html:not(.dark) #gridPodcasts article:hover,
[data-bs-theme="light"] #gridPodcasts article:hover {
    border-color: rgba(var(--ipn-guinda-rgb, 107, 29, 66), 0.4) !important;
    box-shadow: 0 12px 28px rgba(var(--ipn-guinda-rgb, 107, 29, 66), 0.12) !important;
}

html:not(.dark) #gridPodcasts article .bg-punk-panel,
[data-bs-theme="light"] #gridPodcasts article .bg-punk-panel {
    background-color: #f1f5f9 !important;
}

html:not(.dark) #gridPodcasts article .bg-gradient-to-t,
[data-bs-theme="light"] #gridPodcasts article .bg-gradient-to-t {
    display: none !important;
}

html:not(.dark) #gridPodcasts article h3,
[data-bs-theme="light"] #gridPodcasts article h3 {
    color: #0f172a !important;
}

html:not(.dark) #gridPodcasts article:hover h3,
[data-bs-theme="light"] #gridPodcasts article:hover h3 {
    color: var(--ipn-guinda, #6b1d42) !important;
}

html:not(.dark) #gridPodcasts article p,
html:not(.dark) #gridPodcasts article span.text-ipn-chrome,
html:not(.dark) #gridPodcasts article span.text-slate-400,
html:not(.dark) #gridPodcasts article div.text-slate-400,
[data-bs-theme="light"] #gridPodcasts article p,
[data-bs-theme="light"] #gridPodcasts article span.text-ipn-chrome,
[data-bs-theme="light"] #gridPodcasts article span.text-slate-400,
[data-bs-theme="light"] #gridPodcasts article div.text-slate-400 {
    color: #64748b !important;
}

html:not(.dark) #gridPodcasts article span.text-slate-300,
[data-bs-theme="light"] #gridPodcasts article span.text-slate-300 {
    background-color: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
    color: #475569 !important;
}

html:not(.dark) #gridPodcasts article .border-t,
[data-bs-theme="light"] #gridPodcasts article .border-t {
    border-top-color: #e2e8f0 !important;
}

html:not(.dark) #gridPodcasts article a.bg-punk-surface,
[data-bs-theme="light"] #gridPodcasts article a.bg-punk-surface {
    background-color: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    color: #475569 !important;
}

html:not(.dark) #gridPodcasts article a.bg-punk-surface:hover,
[data-bs-theme="light"] #gridPodcasts article a.bg-punk-surface:hover {
    background-color: var(--ipn-guinda, #6b1d42) !important;
    border-color: var(--ipn-guinda, #6b1d42) !important;
    color: #ffffff !important;
}

/* Tabla de Podcasts en modo claro */
html:not(.dark) #tablePodcastsContainer,
[data-bs-theme="light"] #tablePodcastsContainer {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03) !important;
}

html:not(.dark) #tablePodcasts,
[data-bs-theme="light"] #tablePodcasts {
    color: #1e293b !important;
    background-color: #ffffff !important;
}

html:not(.dark) #tablePodcasts thead th,
[data-bs-theme="light"] #tablePodcasts thead th {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
    border-bottom: 2px solid var(--ipn-guinda, #6b1d42) !important;
}

html:not(.dark) #tablePodcasts tbody tr,
[data-bs-theme="light"] #tablePodcasts tbody tr {
    background-color: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
    color: #1e293b !important;
}

html:not(.dark) #tablePodcasts tbody tr:hover,
[data-bs-theme="light"] #tablePodcasts tbody tr:hover {
    background-color: #f8fafc !important;
}

html:not(.dark) #tablePodcasts tbody td,
[data-bs-theme="light"] #tablePodcasts tbody td {
    color: #334155 !important;
    border-bottom-color: #e2e8f0 !important;
}

/* Paginación de Podcasts en modo claro */
html:not(.dark) #catalogPodcastsPagination,
[data-bs-theme="light"] #catalogPodcastsPagination {
    border-top: 1px solid #e2e8f0 !important;
    padding-top: 1.25rem !important;
}

html:not(.dark) #catalogPodcastsPagination .dataTables_info,
[data-bs-theme="light"] #catalogPodcastsPagination .dataTables_info {
    color: #64748b !important;
    font-family: 'Share Tech Mono', monospace !important;
    font-size: 0.85rem !important;
}

html:not(.dark) #catalogPodcastsPagination .dataTables_paginate .page-link,
html:not(.dark) #catalogPodcastsPagination .dataTables_paginate .paginate_button,
html:not(.dark) #catalogPodcastsPagination .paginate_button,
[data-bs-theme="light"] #catalogPodcastsPagination .dataTables_paginate .page-link,
[data-bs-theme="light"] #catalogPodcastsPagination .dataTables_paginate .paginate_button,
[data-bs-theme="light"] #catalogPodcastsPagination .paginate_button {
    color: #334155 !important;
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    font-family: 'Share Tech Mono', monospace !important;
    font-weight: 600 !important;
    font-size: 0.82rem !important;
    padding: 0 12px !important;
    min-width: 36px !important;
    height: 36px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    cursor: pointer !important;
    margin: 0 2px !important;
}

html:not(.dark) #catalogPodcastsPagination .dataTables_paginate .page-link:hover,
html:not(.dark) #catalogPodcastsPagination .dataTables_paginate .paginate_button:hover:not(.disabled):not(.current),
html:not(.dark) #catalogPodcastsPagination .paginate_button:hover:not(.disabled):not(.current),
[data-bs-theme="light"] #catalogPodcastsPagination .dataTables_paginate .page-link:hover,
[data-bs-theme="light"] #catalogPodcastsPagination .dataTables_paginate .paginate_button:hover:not(.disabled):not(.current),
[data-bs-theme="light"] #catalogPodcastsPagination .paginate_button:hover:not(.disabled):not(.current) {
    color: var(--ipn-guinda, #6b1d42) !important;
    background-color: var(--theme-surface-light, #fdf2f7) !important;
    border-color: var(--ipn-guinda, #6b1d42) !important;
    box-shadow: 0 2px 6px rgba(var(--ipn-guinda-rgb, 107, 29, 66), 0.15) !important;
}

html:not(.dark) #catalogPodcastsPagination .dataTables_paginate li.active .page-link,
html:not(.dark) #catalogPodcastsPagination .dataTables_paginate .paginate_button.current,
html:not(.dark) #catalogPodcastsPagination .paginate_button.current,
[data-bs-theme="light"] #catalogPodcastsPagination .dataTables_paginate li.active .page-link,
[data-bs-theme="light"] #catalogPodcastsPagination .dataTables_paginate .paginate_button.current,
[data-bs-theme="light"] #catalogPodcastsPagination .paginate_button.current {
    color: #ffffff !important;
    background-color: var(--ipn-guinda, #6b1d42) !important;
    border-color: var(--ipn-dorado, #c59b27) !important;
    box-shadow: 0 2px 8px rgba(var(--ipn-guinda-rgb, 107, 29, 66), 0.35) !important;
    font-weight: 700 !important;
}

html:not(.dark) #catalogPodcastsPagination .dataTables_paginate li.disabled .page-link,
html:not(.dark) #catalogPodcastsPagination .dataTables_paginate .paginate_button.disabled,
html:not(.dark) #catalogPodcastsPagination .paginate_button.disabled,
[data-bs-theme="light"] #catalogPodcastsPagination .dataTables_paginate li.disabled .page-link,
[data-bs-theme="light"] #catalogPodcastsPagination .dataTables_paginate .paginate_button.disabled,
[data-bs-theme="light"] #catalogPodcastsPagination .paginate_button.disabled {
    color: #94a3b8 !important;
    background-color: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    opacity: 0.55 !important;
    box-shadow: none !important;
}

/* Modal Reproductor Institucional de Audio en modo claro */
html:not(.dark) #modalPodcastDetalle .modal-content,
[data-bs-theme="light"] #modalPodcastDetalle .modal-content {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15) !important;
    color: #1e293b !important;
}

html:not(.dark) #modalPodcastDetalle .modal-header,
[data-bs-theme="light"] #modalPodcastDetalle .modal-header {
    border-bottom: 1px solid #e2e8f0 !important;
}

html:not(.dark) #modalPodcastDetalle #mp-titulo,
[data-bs-theme="light"] #modalPodcastDetalle #mp-titulo {
    color: #64748b !important;
}

html:not(.dark) #modalPodcastDetalle #mp-portada,
[data-bs-theme="light"] #modalPodcastDetalle #mp-portada {
    border: 1px solid #e2e8f0 !important;
}

html:not(.dark) #modalPodcastDetalle #mp-nombre,
[data-bs-theme="light"] #modalPodcastDetalle #mp-nombre {
    color: #0f172a !important;
}

html:not(.dark) #modalPodcastDetalle #mp-autor,
[data-bs-theme="light"] #modalPodcastDetalle #mp-autor {
    color: #64748b !important;
}

html:not(.dark) #modalPodcastDetalle .btn-close-white,
[data-bs-theme="light"] #modalPodcastDetalle .btn-close-white {
    filter: invert(1) grayscale(100%) brightness(0.2) !important;
}

/* ==========================================================================
   OPTIMIZACIÓN DE CONTRASTE Y ACCESIBILIDAD EN MODO CLARO (WCAG AA / AAA)
   Garantiza máxima legibilidad en barra de navegación, tarjetas y modales
   conforme a las directrices institucionales IPN - DEV.
   ========================================================================== */

/* 1. Barra de Navegación Superior */
html:not(.dark) nav,
[data-bs-theme="light"] nav {
    background-color: rgba(255, 255, 255, 0.98) !important;
    border-bottom: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04) !important;
}

/* Enlaces de navegación inactivos */
html:not(.dark) nav a.text-slate-400,
html:not(.dark) nav a:not([class*="border-ipn-neon"]):not([class*="btn-theme-toggle"]),
[data-bs-theme="light"] nav a.text-slate-400,
[data-bs-theme="light"] nav a:not([class*="border-ipn-neon"]):not([class*="btn-theme-toggle"]) {
    color: #334155 !important;
    font-weight: 500 !important;
}

html:not(.dark) nav a.text-slate-400 i,
html:not(.dark) nav a:not([class*="border-ipn-neon"]) i,
[data-bs-theme="light"] nav a.text-slate-400 i,
[data-bs-theme="light"] nav a:not([class*="border-ipn-neon"]) i {
    color: #64748b !important;
}

html:not(.dark) nav a:hover,
[data-bs-theme="light"] nav a:hover {
    color: var(--ipn-guinda, #6b1d42) !important;
    background-color: #f1f5f9 !important;
}

html:not(.dark) nav a:hover i,
[data-bs-theme="light"] nav a:hover i {
    color: var(--ipn-guinda, #6b1d42) !important;
}

/* Enlace activo de navegación (Videos, Podcasts, Inicio) */
html:not(.dark) nav a.border-ipn-neon,
[data-bs-theme="light"] nav a.border-ipn-neon {
    color: var(--ipn-guinda, #6b1d42) !important;
    background-color: var(--theme-surface-light, #fdf2f7) !important;
    border-bottom: 2px solid var(--ipn-guinda, #6b1d42) !important;
    font-weight: 700 !important;
}

html:not(.dark) nav a.border-ipn-neon i,
[data-bs-theme="light"] nav a.border-ipn-neon i {
    color: var(--ipn-guinda, #6b1d42) !important;
}

/* Selector de Tema en Navbar */
html:not(.dark) .theme-switch-pill,
[data-bs-theme="light"] .theme-switch-pill {
    background-color: #e2e8f0 !important;
    border-color: #cbd5e1 !important;
}

html:not(.dark) .theme-switch-label-light,
[data-bs-theme="light"] .theme-switch-label-light {
    color: #0f172a !important;
    font-weight: 800 !important;
}

/* 2. Tarjetas de Videos y Podcasts en Cuadrícula (Grid & Swiper) */
html:not(.dark) #gridVideos article,
html:not(.dark) #gridPodcasts article,
[data-bs-theme="light"] #gridVideos article,
[data-bs-theme="light"] #gridPodcasts article {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04) !important;
}

html:not(.dark) #gridVideos article:hover,
html:not(.dark) #gridPodcasts article:hover,
[data-bs-theme="light"] #gridVideos article:hover,
[data-bs-theme="light"] #gridPodcasts article:hover {
    border-color: rgba(var(--ipn-guinda-rgb, 107, 29, 66), 0.35) !important;
    box-shadow: 0 10px 25px rgba(var(--ipn-guinda-rgb, 107, 29, 66), 0.12) !important;
}

html:not(.dark) #gridVideos article h3,
html:not(.dark) #gridPodcasts article h3,
[data-bs-theme="light"] #gridVideos article h3,
[data-bs-theme="light"] #gridPodcasts article h3 {
    color: #0f172a !important;
    font-weight: 700 !important;
}

html:not(.dark) #gridVideos article:hover h3,
html:not(.dark) #gridPodcasts article:hover h3,
[data-bs-theme="light"] #gridVideos article:hover h3,
[data-bs-theme="light"] #gridPodcasts article:hover h3 {
    color: var(--ipn-guinda, #6b1d42) !important;
}

/* Fecha y metadatos de tarjeta */
html:not(.dark) #gridVideos article .text-ipn-chrome,
html:not(.dark) #gridPodcasts article .text-ipn-chrome,
[data-bs-theme="light"] #gridVideos article .text-ipn-chrome,
[data-bs-theme="light"] #gridPodcasts article .text-ipn-chrome {
    color: #475569 !important;
    font-weight: 600 !important;
}

html:not(.dark) #gridVideos article .text-ipn-chrome i,
html:not(.dark) #gridPodcasts article .text-ipn-chrome i,
[data-bs-theme="light"] #gridVideos article .text-ipn-chrome i,
[data-bs-theme="light"] #gridPodcasts article .text-ipn-chrome i {
    color: var(--ipn-guinda, #6b1d42) !important;
}

/* Autor en podcasts */
html:not(.dark) #gridPodcasts article p.text-slate-400,
[data-bs-theme="light"] #gridPodcasts article p.text-slate-400 {
    color: #475569 !important;
    font-weight: 500 !important;
}

html:not(.dark) #gridPodcasts article p.text-slate-400 i,
[data-bs-theme="light"] #gridPodcasts article p.text-slate-400 i {
    color: var(--ipn-guinda, #6b1d42) !important;
}

/* Badges de métricas YouTube en tarjetas */
html:not(.dark) #gridVideos article div[class*="bg-red-950"],
html:not(.dark) #gridPodcasts article div[class*="bg-red-950"],
[data-bs-theme="light"] #gridVideos article div[class*="bg-red-950"],
[data-bs-theme="light"] #gridPodcasts article div[class*="bg-red-950"] {
    background-color: #fef2f2 !important;
    border: 1px solid #fca5a5 !important;
    color: #991b1b !important;
}

html:not(.dark) #gridVideos article div[class*="bg-red-950"] span,
html:not(.dark) #gridPodcasts article div[class*="bg-red-950"] span,
[data-bs-theme="light"] #gridVideos article div[class*="bg-red-950"] span,
[data-bs-theme="light"] #gridPodcasts article div[class*="bg-red-950"] span {
    color: #7f1d1d !important;
    font-weight: 700 !important;
}

html:not(.dark) #gridVideos article div[class*="bg-red-950"] i,
html:not(.dark) #gridPodcasts article div[class*="bg-red-950"] i,
[data-bs-theme="light"] #gridVideos article div[class*="bg-red-950"] i,
[data-bs-theme="light"] #gridPodcasts article div[class*="bg-red-950"] i {
    color: #dc2626 !important;
}

/* Badges de métricas POLIVERSO / IPN en tarjetas */
html:not(.dark) #gridVideos article div[class*="bg-ipn-guinda"],
html:not(.dark) #gridPodcasts article div[class*="bg-ipn-guinda"],
[data-bs-theme="light"] #gridVideos article div[class*="bg-ipn-guinda"],
[data-bs-theme="light"] #gridPodcasts article div[class*="bg-ipn-guinda"] {
    background-color: var(--theme-surface-light, #fdf2f7) !important;
    border: 1px solid #f472b6 !important;
    color: var(--ipn-guinda, #6b1d42) !important;
}

html:not(.dark) #gridVideos article div[class*="bg-ipn-guinda"] span,
html:not(.dark) #gridPodcasts article div[class*="bg-ipn-guinda"] span,
[data-bs-theme="light"] #gridVideos article div[class*="bg-ipn-guinda"] span,
[data-bs-theme="light"] #gridPodcasts article div[class*="bg-ipn-guinda"] span {
    color: #4a0e2e !important;
    font-weight: 700 !important;
}

html:not(.dark) #gridVideos article div[class*="bg-ipn-guinda"] span.text-ipn-neon,
html:not(.dark) #gridPodcasts article div[class*="bg-ipn-guinda"] span.text-ipn-neon,
[data-bs-theme="light"] #gridVideos article div[class*="bg-ipn-guinda"] span.text-ipn-neon,
[data-bs-theme="light"] #gridPodcasts article div[class*="bg-ipn-guinda"] span.text-ipn-neon {
    color: var(--ipn-guinda, #6b1d42) !important;
}

html:not(.dark) #gridVideos article div[class*="bg-ipn-guinda"] span.text-slate-600,
html:not(.dark) #gridPodcasts article div[class*="bg-ipn-guinda"] span.text-slate-600,
[data-bs-theme="light"] #gridVideos article div[class*="bg-ipn-guinda"] span.text-slate-600,
[data-bs-theme="light"] #gridPodcasts article div[class*="bg-ipn-guinda"] span.text-slate-600 {
    color: #cbd5e1 !important;
}

html:not(.dark) #gridVideos article div[class*="bg-ipn-guinda"] i,
html:not(.dark) #gridPodcasts article div[class*="bg-ipn-guinda"] i,
[data-bs-theme="light"] #gridVideos article div[class*="bg-ipn-guinda"] i,
[data-bs-theme="light"] #gridPodcasts article div[class*="bg-ipn-guinda"] i {
    color: var(--ipn-guinda, #6b1d42) !important;
}

html:not(.dark) #gridVideos article div[class*="bg-ipn-guinda"] i.fa-heart,
html:not(.dark) #gridPodcasts article div[class*="bg-ipn-guinda"] i.fa-heart,
[data-bs-theme="light"] #gridVideos article div[class*="bg-ipn-guinda"] i.fa-heart,
[data-bs-theme="light"] #gridPodcasts article div[class*="bg-ipn-guinda"] i.fa-heart {
    color: #e11d48 !important;
}

/* Badges de métricas en tabla DataTables */
html:not(.dark) .video-metrics-badge,
[data-bs-theme="light"] .video-metrics-badge {
    background-color: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #1e293b !important;
    font-weight: 600 !important;
}

html:not(.dark) .video-metrics-badge .text-danger,
[data-bs-theme="light"] .video-metrics-badge .text-danger {
    color: #dc2626 !important;
    font-weight: 700 !important;
}

html:not(.dark) .video-metrics-badge .text-success,
[data-bs-theme="light"] .video-metrics-badge .text-success {
    color: #166534 !important;
    font-weight: 700 !important;
}

/* Chips de palabras clave en tarjetas */
html:not(.dark) #gridVideos article .bg-punk-panel,
html:not(.dark) #gridPodcasts article .bg-punk-panel,
[data-bs-theme="light"] #gridVideos article .bg-punk-panel,
[data-bs-theme="light"] #gridPodcasts article .bg-punk-panel {
    background-color: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    color: #334155 !important;
    font-weight: 500 !important;
}

/* 3. Modales de Detalle (Videos y Podcasts) */
html:not(.dark) #modalVideoDetalle .modal-content,
html:not(.dark) #modalPodcastDetalle .modal-content,
[data-bs-theme="light"] #modalVideoDetalle .modal-content,
[data-bs-theme="light"] #modalPodcastDetalle .modal-content {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.16) !important;
    color: #0f172a !important;
}

/* Cabecera del modal */
html:not(.dark) #modalVideoDetalle .border-b.border-punk-border,
html:not(.dark) #modalPodcastDetalle .border-b.border-punk-border,
[data-bs-theme="light"] #modalVideoDetalle .border-b.border-punk-border,
[data-bs-theme="light"] #modalPodcastDetalle .border-b.border-punk-border {
    border-color: #e2e8f0 !important;
    background-color: #ffffff !important;
}

html:not(.dark) #modalVideoDetalle #mv-titulo,
html:not(.dark) #modalPodcastDetalle #mp-titulo,
[data-bs-theme="light"] #modalVideoDetalle #mv-titulo,
[data-bs-theme="light"] #modalPodcastDetalle #mp-titulo {
    color: #0f172a !important;
    font-weight: 700 !important;
}

/* Botón cerrar cabecera */
html:not(.dark) #modalVideoDetalle button[data-bs-dismiss="modal"],
html:not(.dark) #modalPodcastDetalle button[data-bs-dismiss="modal"],
[data-bs-theme="light"] #modalVideoDetalle button[data-bs-dismiss="modal"],
[data-bs-theme="light"] #modalPodcastDetalle button[data-bs-dismiss="modal"] {
    background-color: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    color: #334155 !important;
}

html:not(.dark) #modalVideoDetalle button[data-bs-dismiss="modal"]:hover,
html:not(.dark) #modalPodcastDetalle button[data-bs-dismiss="modal"]:hover,
[data-bs-theme="light"] #modalVideoDetalle button[data-bs-dismiss="modal"]:hover,
[data-bs-theme="light"] #modalPodcastDetalle button[data-bs-dismiss="modal"]:hover {
    color: var(--ipn-guinda, #6b1d42) !important;
    border-color: var(--ipn-guinda, #6b1d42) !important;
}

/* Columna lateral de metadatos y detalles */
html:not(.dark) #modalVideoDetalle .lg\:col-span-4,
html:not(.dark) #modalPodcastDetalle .lg\:col-span-7,
[data-bs-theme="light"] #modalVideoDetalle .lg\:col-span-4,
[data-bs-theme="light"] #modalPodcastDetalle .lg\:col-span-7 {
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
}

/* Fecha y señal en vivo en modal */
html:not(.dark) #modalVideoDetalle #mv-fecha,
html:not(.dark) #modalPodcastDetalle #mp-fecha,
[data-bs-theme="light"] #modalVideoDetalle #mv-fecha,
[data-bs-theme="light"] #modalPodcastDetalle #mp-fecha {
    color: #475569 !important;
    font-weight: 600 !important;
}

/* Títulos de sección en modal (Autor, Palabras Clave, Descripción) */
html:not(.dark) #modalVideoDetalle p.text-slate-400,
html:not(.dark) #modalPodcastDetalle p.text-slate-400,
[data-bs-theme="light"] #modalVideoDetalle p.text-slate-400,
[data-bs-theme="light"] #modalPodcastDetalle p.text-slate-400 {
    color: #475569 !important;
    font-weight: 700 !important;
}

/* Nombres de Autor y Episodio */
html:not(.dark) #modalVideoDetalle #mv-autor,
html:not(.dark) #modalPodcastDetalle #mp-autor,
html:not(.dark) #modalPodcastDetalle #mp-nombre,
[data-bs-theme="light"] #modalVideoDetalle #mv-autor,
[data-bs-theme="light"] #modalPodcastDetalle #mp-autor,
[data-bs-theme="light"] #modalPodcastDetalle #mp-nombre {
    color: #0f172a !important;
    font-weight: 700 !important;
}

html:not(.dark) #modalVideoDetalle #mv-autor i,
html:not(.dark) #modalPodcastDetalle #mp-autor i,
[data-bs-theme="light"] #modalVideoDetalle #mv-autor i,
[data-bs-theme="light"] #modalPodcastDetalle #mp-autor i {
    color: var(--ipn-guinda, #6b1d42) !important;
}

/* Bloque YouTube en modal */
html:not(.dark) #modalVideoDetalle div[class*="bg-red-950"],
[data-bs-theme="light"] #modalVideoDetalle div[class*="bg-red-950"] {
    background-color: #fef2f2 !important;
    border-color: #fecaca !important;
}

html:not(.dark) #modalVideoDetalle div[class*="bg-red-950"] span.text-red-400,
[data-bs-theme="light"] #modalVideoDetalle div[class*="bg-red-950"] span.text-red-400 {
    color: #991b1b !important;
    font-weight: 700 !important;
}

html:not(.dark) #modalVideoDetalle div[class*="bg-red-950"] span[class*="text-red-500"],
[data-bs-theme="light"] #modalVideoDetalle div[class*="bg-red-950"] span[class*="text-red-500"] {
    color: #b91c1c !important;
}

html:not(.dark) #modalVideoDetalle #mv-vistas-yt,
html:not(.dark) #modalVideoDetalle #mv-likes-yt,
[data-bs-theme="light"] #modalVideoDetalle #mv-vistas-yt,
[data-bs-theme="light"] #modalVideoDetalle #mv-likes-yt {
    color: #7f1d1d !important;
    font-weight: 700 !important;
}

html:not(.dark) #modalVideoDetalle div[class*="bg-red-950"] i,
[data-bs-theme="light"] #modalVideoDetalle div[class*="bg-red-950"] i {
    color: #dc2626 !important;
}

/* Bloque POLIVERSO en modal */
html:not(.dark) #modalVideoDetalle #box-metricas-poliverso,
[data-bs-theme="light"] #modalVideoDetalle #box-metricas-poliverso {
    background-color: var(--theme-surface-light, #fdf2f7) !important;
    border-color: #fbcfe8 !important;
}

html:not(.dark) #modalVideoDetalle #box-metricas-poliverso span.text-ipn-neon,
[data-bs-theme="light"] #modalVideoDetalle #box-metricas-poliverso span.text-ipn-neon {
    color: var(--ipn-guinda, #6b1d42) !important;
    font-weight: 700 !important;
}

html:not(.dark) #modalVideoDetalle #box-metricas-poliverso span[class*="text-ipn-neon"],
[data-bs-theme="light"] #modalVideoDetalle #box-metricas-poliverso span[class*="text-ipn-neon"] {
    color: #831843 !important;
}

html:not(.dark) #modalVideoDetalle #mv-vistas-locales,
html:not(.dark) #modalVideoDetalle #mv-likes-locales,
[data-bs-theme="light"] #modalVideoDetalle #mv-vistas-locales,
[data-bs-theme="light"] #modalVideoDetalle #mv-likes-locales {
    color: #4a0e2e !important;
    font-weight: 700 !important;
}

html:not(.dark) #modalVideoDetalle #box-metricas-poliverso i,
[data-bs-theme="light"] #modalVideoDetalle #box-metricas-poliverso i {
    color: var(--ipn-guinda, #6b1d42) !important;
}

html:not(.dark) #modalVideoDetalle #box-metricas-poliverso i.fa-heart,
[data-bs-theme="light"] #modalVideoDetalle #box-metricas-poliverso i.fa-heart {
    color: #e11d48 !important;
}

/* Barra Total y Duración en modal */
html:not(.dark) #modalVideoDetalle .bg-punk-panel.border-punk-border,
[data-bs-theme="light"] #modalVideoDetalle .bg-punk-panel.border-punk-border {
    background-color: #f8fafc !important;
    border-color: #e2e8f0 !important;
    color: #475569 !important;
}

html:not(.dark) #modalVideoDetalle #mv-vistas,
html:not(.dark) #modalVideoDetalle #mv-likes,
html:not(.dark) #modalVideoDetalle #mv-duracion,
html:not(.dark) #modalVideoDetalle .bg-punk-panel.border-punk-border .text-white,
[data-bs-theme="light"] #modalVideoDetalle #mv-vistas,
[data-bs-theme="light"] #modalVideoDetalle #mv-likes,
[data-bs-theme="light"] #modalVideoDetalle #mv-duracion,
[data-bs-theme="light"] #modalVideoDetalle .bg-punk-panel.border-punk-border .text-white {
    color: #0f172a !important;
    font-weight: 700 !important;
}

html:not(.dark) #modalVideoDetalle .bg-punk-panel.border-punk-border i,
[data-bs-theme="light"] #modalVideoDetalle .bg-punk-panel.border-punk-border i {
    color: var(--ipn-guinda, #6b1d42) !important;
}

/* Métricas consolidadas en modal podcast (Escuchas, Likes, Duración) */
html:not(.dark) #modalPodcastDetalle .grid-cols-3,
[data-bs-theme="light"] #modalPodcastDetalle .grid-cols-3 {
    background-color: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
}

html:not(.dark) #modalPodcastDetalle .grid-cols-3 .border-punk-border,
[data-bs-theme="light"] #modalPodcastDetalle .grid-cols-3 .border-punk-border {
    border-color: #e2e8f0 !important;
}

html:not(.dark) #modalPodcastDetalle .grid-cols-3 span.text-slate-400,
[data-bs-theme="light"] #modalPodcastDetalle .grid-cols-3 span.text-slate-400 {
    color: #64748b !important;
    font-weight: 600 !important;
}

html:not(.dark) #modalPodcastDetalle #mp-escuchas,
html:not(.dark) #modalPodcastDetalle #mp-likes,
html:not(.dark) #modalPodcastDetalle #mp-duracion,
[data-bs-theme="light"] #modalPodcastDetalle #mp-escuchas,
[data-bs-theme="light"] #modalPodcastDetalle #mp-likes,
[data-bs-theme="light"] #modalPodcastDetalle #mp-duracion {
    color: #0f172a !important;
    font-weight: 700 !important;
}

html:not(.dark) #modalPodcastDetalle .grid-cols-3 i,
[data-bs-theme="light"] #modalPodcastDetalle .grid-cols-3 i {
    color: var(--ipn-guinda, #6b1d42) !important;
}

html:not(.dark) #modalPodcastDetalle .grid-cols-3 i.fa-heart,
[data-bs-theme="light"] #modalPodcastDetalle .grid-cols-3 i.fa-heart {
    color: #e11d48 !important;
}

/* Botón Me Gusta en modales */
html:not(.dark) #mv-btn-like,
html:not(.dark) #mp-btn-like,
[data-bs-theme="light"] #mv-btn-like,
[data-bs-theme="light"] #mp-btn-like {
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
}

html:not(.dark) #mv-btn-like:hover,
html:not(.dark) #mp-btn-like:hover,
[data-bs-theme="light"] #mv-btn-like:hover,
[data-bs-theme="light"] #mp-btn-like:hover {
    background-color: var(--theme-surface-light, #fdf2f7) !important;
    border-color: #f472b6 !important;
}

html:not(.dark) #mv-like-text,
html:not(.dark) #mp-like-text,
[data-bs-theme="light"] #mv-like-text,
[data-bs-theme="light"] #mp-like-text {
    color: #0f172a !important;
    font-weight: 700 !important;
}

html:not(.dark) #mv-like-subtext,
html:not(.dark) #mp-like-subtext,
[data-bs-theme="light"] #mv-like-subtext,
[data-bs-theme="light"] #mp-like-subtext {
    color: #64748b !important;
    font-weight: 500 !important;
}

html:not(.dark) #mv-like-local-count,
html:not(.dark) #mp-like-count,
[data-bs-theme="light"] #mv-like-local-count,
[data-bs-theme="light"] #mp-like-count {
    background-color: var(--theme-surface-light, #fdf2f7) !important;
    border: 1px solid #fbcfe8 !important;
    color: var(--ipn-guinda, #6b1d42) !important;
    font-weight: 700 !important;
}

html:not(.dark) #mv-like-icon,
html:not(.dark) #mp-like-icon,
[data-bs-theme="light"] #mv-like-icon,
[data-bs-theme="light"] #mp-like-icon {
    color: #e11d48 !important;
}

/* Botón Apoyar en YouTube */
html:not(.dark) #mv-btn-youtube,
[data-bs-theme="light"] #mv-btn-youtube {
    background-color: #fef2f2 !important;
    border: 1px solid #fca5a5 !important;
}

html:not(.dark) #mv-btn-youtube span.text-white,
[data-bs-theme="light"] #mv-btn-youtube span.text-white {
    color: #991b1b !important;
    font-weight: 700 !important;
}

html:not(.dark) #mv-btn-youtube span.text-red-400\/80,
[data-bs-theme="light"] #mv-btn-youtube span.text-red-400\/80 {
    color: #b91c1c !important;
}

html:not(.dark) #mv-btn-youtube i,
[data-bs-theme="light"] #mv-btn-youtube i {
    color: #dc2626 !important;
}

/* Botón Ver Ficha en modal podcast */
html:not(.dark) #mp-btn-ficha,
[data-bs-theme="light"] #mp-btn-ficha {
    background-color: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    color: #1e293b !important;
    font-weight: 600 !important;
}

html:not(.dark) #mp-btn-ficha:hover,
[data-bs-theme="light"] #mp-btn-ficha:hover {
    background-color: #f1f5f9 !important;
    border-color: var(--ipn-guinda, #6b1d42) !important;
    color: var(--ipn-guinda, #6b1d42) !important;
}

/* Palabras Clave en modal */
html:not(.dark) #mv-keywords span,
html:not(.dark) #mp-keywords span,
[data-bs-theme="light"] #mv-keywords span,
[data-bs-theme="light"] #mp-keywords span {
    background-color: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    color: #1e293b !important;
    font-weight: 600 !important;
}

/* DESCRIPCIÓN EN MODAL (VIDEOS Y PODCASTS) - WCAG AAA */
html:not(.dark) #mv-descripcion,
html:not(.dark) #mp-descripcion,
[data-bs-theme="light"] #mv-descripcion,
[data-bs-theme="light"] #mp-descripcion {
    color: #0f172a !important;
    font-weight: 400 !important;
    line-height: 1.65 !important;
    background-color: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 0.5rem !important;
    padding: 0.85rem 1rem !important;
}

/* Botón Cerrar Ventana al pie del modal */
html:not(.dark) #modalVideoDetalle button[data-bs-dismiss="modal"]:not(.w-8),
html:not(.dark) #modalPodcastDetalle button[data-bs-dismiss="modal"]:not(.w-8),
[data-bs-theme="light"] #modalVideoDetalle button[data-bs-dismiss="modal"]:not(.w-8),
[data-bs-theme="light"] #modalPodcastDetalle button[data-bs-dismiss="modal"]:not(.w-8) {
    background-color: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    color: #334155 !important;
    font-weight: 700 !important;
}

html:not(.dark) #modalVideoDetalle button[data-bs-dismiss="modal"]:not(.w-8):hover,
html:not(.dark) #modalPodcastDetalle button[data-bs-dismiss="modal"]:not(.w-8):hover,
[data-bs-theme="light"] #modalVideoDetalle button[data-bs-dismiss="modal"]:not(.w-8):hover,
[data-bs-theme="light"] #modalPodcastDetalle button[data-bs-dismiss="modal"]:not(.w-8):hover {
    background-color: #f1f5f9 !important;
    border-color: var(--ipn-guinda, #6b1d42) !important;
    color: var(--ipn-guinda, #6b1d42) !important;
}

/* ===================================================
   UTILIDADES HUD Y TABLAS DE CATÁLOGO (ZERO INLINE STYLES)
=================================================== */
.table-catalogo {
    width: 100% !important;
    min-width: 1180px;
}

.th-miniatura { width: 125px; }
.th-caratula { width: 95px; }
.th-titulo { min-width: 220px; width: 250px; }
.th-autor { min-width: 140px; width: 160px; }
.th-fecha { width: 120px; }
.th-vistas { width: 140px; }
.th-likes { width: 135px; }
.th-duracion { width: 95px; }
.th-escuchas { width: 110px; }
.th-categoria { width: 145px; min-width: 135px; }
.th-palabras-clave { width: 160px; }
.th-acciones { width: 110px; }

.hud-corner-lg {
    width: 14px !important;
    height: 14px !important;
    border-width: 2.5px !important;
}

.eq-container-inline {
    height: 10px !important;
    padding: 0 2px !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

#tableVideosContainer,
#tablePodcastsContainer {
    display: none;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
}

/* ==========================================================================
   DataTables Responsive - Filas Colapsables y Boton de Control Institucional
   ========================================================================== */
table.dataTable.dtr-column > tbody > tr > td.dtr-control,
table.dataTable.dtr-column > tbody > tr > th.dtr-control,
table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control,
table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control {
    position: relative !important;
    text-align: center !important;
    vertical-align: middle !important;
    cursor: pointer !important;
    width: 32px !important;
    max-width: 38px !important;
    padding: 0.5rem 0.25rem !important;
}

table.dataTable th.th-control {
    width: 32px !important;
    max-width: 38px !important;
    padding: 0.5rem 0.25rem !important;
}

table.dataTable.dtr-column > tbody > tr > td.dtr-control:before,
table.dataTable.dtr-column > tbody > tr > th.dtr-control:before,
table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control:before,
table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control:before {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 20px !important;
    width: 20px !important;
    margin: 0 auto !important;
    border-radius: 50% !important;
    border: 1px solid var(--ipn-neon, #FF2A7A) !important;
    color: #ffffff !important;
    background-color: var(--ipn-guinda, #6b1d42) !important;
    box-shadow: 0 0 8px rgba(var(--ipn-guinda-rgb, 107, 29, 66), 0.5) !important;
    content: "+" !important;
    font-family: monospace !important;
    font-size: 14px !important;
    font-weight: bold !important;
    line-height: 1 !important;
    cursor: pointer !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease !important;
}

table.dataTable.dtr-column > tbody > tr > td.dtr-control:hover:before,
table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control:hover:before {
    transform: scale(1.15) !important;
    box-shadow: 0 0 12px rgba(var(--ipn-neon-rgb, 255, 42, 122), 0.8) !important;
}

table.dataTable.dtr-column > tbody > tr.parent > td.dtr-control:before,
table.dataTable.dtr-column > tbody > tr.parent > th.dtr-control:before,
table.dataTable.dtr-inline.collapsed > tbody > tr.parent > td.dtr-control:before,
table.dataTable.dtr-inline.collapsed > tbody > tr.parent > th.dtr-control:before {
    content: "−" !important;
    background-color: var(--ipn-neon, #FF2A7A) !important;
    border-color: #ffffff !important;
    box-shadow: 0 0 10px rgba(var(--ipn-neon-rgb, 255, 42, 122), 0.6) !important;
}

/* Subfila expandible (Child Row) */
table.dataTable > tbody > tr.child {
    background-color: rgba(18, 21, 27, 0.95) !important;
    border-bottom: 2px solid var(--ipn-guinda, #6b1d42) !important;
}

table.dataTable > tbody > tr.child td.child {
    padding: 0.75rem 1rem !important;
}

.dtr-child-list {
    background: rgba(12, 14, 18, 0.85);
    border: 1px solid rgba(36, 42, 54, 0.8);
    backdrop-filter: blur(8px);
}

.dtr-child-item:last-child {
    border-bottom: none !important;
}

/* Adaptacion a Modo Claro */
html:not(.dark) table.dataTable.dtr-column > tbody > tr > td.dtr-control:before,
[data-bs-theme="light"] table.dataTable.dtr-column > tbody > tr > td.dtr-control:before,
html:not(.dark) table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control:before,
[data-bs-theme="light"] table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control:before {
    background-color: var(--ipn-guinda, #6b1d42) !important;
    border-color: var(--ipn-dorado, #c59b27) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 5px rgba(107, 29, 66, 0.3) !important;
}

html:not(.dark) table.dataTable > tbody > tr.child,
[data-bs-theme="light"] table.dataTable > tbody > tr.child {
    background-color: #f8fafc !important;
    border-bottom: 2px solid var(--ipn-guinda, #6b1d42) !important;
}

html:not(.dark) .dtr-child-list,
[data-bs-theme="light"] .dtr-child-list {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
}
