/* ==========================================================================
   CSS VARIABLES & DESIGN SYSTEM (Prensa Digital - El Cóndor Digital)
   ========================================================================== */

:root {
    --primary-color: #0068d6;
    /* Azul institucional */
    --secondary-color: #800c2c;
    /* Bordó elegante */
    --secondary-hover: #5d081e;
    --primary-hover: #0056b3;

    /* Neutros (Modo Claro) */
    --bg-primary: #fbfbfb;
    /* Blanco papel periódico */
    --bg-card: #ffffff;
    /* Blanco puro */
    --text-main: #1a1a1a;
    /* Negro lectura */
    --text-muted: #555555;
    /* Gris información */
    --border-color: #e5e5e5;
    /* Gris grilla de diario */
    --bg-crema: #fdfaf4;
    /* Crema de opinión */
    --overlay-color: rgba(0, 0, 0, 0.5);

    /* Fuentes */
    --font-title: 'Playfair Display', Georgia, serif;
    --font-body: 'Lora', Georgia, serif;
    --font-sans: 'Inter', system-ui, sans-serif;

    /* Sombras y bordes */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08);
    --border-radius: 4px;

    /* Transiciones */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Modo Lectura / Tema Oscuro */
body.dark-theme {
    --bg-primary: #121212;
    /* Negro fondo */
    --bg-card: #1d1d1d;
    /* Gris oscuro */
    --text-main: #eaeaea;
    /* Gris muy claro */
    --text-muted: #a0a0a0;
    /* Gris medio */
    --border-color: #2d2d2d;
    /* Separador oscuro */
    --bg-crema: #191612;
    /* Crema oscuro */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.4);
}

/* Reset y base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-main);
    line-height: 1.6;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

button {
    font-family: var(--font-sans);
    cursor: pointer;
    border: none;
    outline: none;
    background: none;
    transition: all var(--transition-fast);
}

/* ==========================================================================
   TOP BAR (Utilidades superiores)
   ========================================================================== */

.top-bar {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 0;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    color: var(--text-muted);
}

.top-bar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.top-bar-left .divider {
    color: var(--border-color);
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.edition-tag {
    color: var(--secondary-color);
    font-weight: 700;
    letter-spacing: 0.05em;
}

.admin-auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    padding: 0 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: all var(--transition-fast);
}

.admin-auth-btn:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.admin-auth-btn.admin-logged-in {
    background-color: rgba(128, 12, 44, 0.08);
    color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.admin-login-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.theme-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background-color: var(--bg-primary);
    padding: 0;
    box-sizing: border-box;
}

.theme-btn:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.theme-btn svg {
    fill: currentColor;
}

/* ==========================================================================
   HEADER (Logotipo y marca del periódico)
   ========================================================================== */

.main-header {
    background-color: var(--bg-card);
    padding: 30px 0 20px 0;
    border-bottom: 4px double var(--border-color);
    text-align: center;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.school-name {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.logo-title {
    font-family: var(--font-title);
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: var(--text-main);
    cursor: pointer;
    user-select: none;
    line-height: 1;
    margin-bottom: 6px;
}

.logo-title::selection {
    background-color: var(--primary-color);
    color: #fff;
}

.logo-subtitle {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.05em;
}

/* ==========================================================================
   NAVIGATION (Menú y Buscador)
   ========================================================================== */

.main-nav {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: box-shadow var(--transition-normal)
}

.main-nav.sticky-active {
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 20px;
}

.nav-link {
    display: block;
    padding: 18px 0;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Submenús Dropdown */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    list-style: none;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast);
    z-index: 200;
    border-radius: var(--border-radius);
    padding: 5px 0;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    width: 100%;
}

.dropdown-link {
    display: block;
    padding: 10px 18px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.dropdown-link:last-child {
    border-bottom: none;
}

.dropdown-link:hover {
    background-color: var(--bg-primary);
    color: var(--primary-color);
    padding-left: 22px;
}

.nav-link .arrow {
    font-size: 0.6rem;
    margin-left: 3px;
    vertical-align: middle;
}

.nav-link.disabled-menu {
    cursor: not-allowed !important;
    opacity: 0.65;
}

.disabled-menu {
    opacity: 0.65;
    cursor: not-allowed !important;
}

.disabled-menu:hover {
    color: var(--text-muted) !important;
    background-color: transparent !important;
}

.dropdown-link.disabled-menu:hover {
    padding-left: 18px !important;
    background-color: transparent !important;
    color: var(--text-muted) !important;
}

.nav-proximamente-badge {
    display: inline-block;
    font-size: 0.58rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background-color: rgba(128, 12, 44, 0.12);
    color: var(--secondary-color);
    border: 1px solid rgba(128, 12, 44, 0.3);
    padding: 1px 6px;
    border-radius: 10px;
    margin-left: 5px;
    vertical-align: middle;
    line-height: 1.3;
}

body.dark-theme .nav-proximamente-badge {
    background-color: rgba(244, 63, 94, 0.16);
    color: #fda4af;
    border-color: rgba(244, 63, 94, 0.35);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-box {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0 8px;
    background-color: var(--bg-primary);
    width: 170px;
    height: 30px;
    box-sizing: border-box;
    transition: width var(--transition-normal), border-color var(--transition-normal);
}

.search-box:focus-within {
    width: 220px;
    border-color: var(--primary-color);
}

.search-box input {
    border: none;
    background: none;
    outline: none;
    width: 100%;
    font-size: 0.75rem;
    color: var(--text-main);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-btn {
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    color: var(--primary-color);
}

.publish-trigger-btn {
    background-color: var(--primary-color);
    color: white;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.7rem;
    padding: 0 12px;
    height: 30px;
    border-radius: var(--border-radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid transparent;
    box-sizing: border-box;
}

.publish-trigger-btn:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 2px 6px rgba(0, 104, 214, 0.2);
}

.publish-trigger-btn .icon-plus {
    font-size: 0.95rem;
    font-weight: 700;
}

/* ==========================================================================
   TICKER BAR (Último Momento)
   ========================================================================== */

.ticker-bar {
    background-color: var(--bg-crema);
    border-bottom: 1px solid var(--border-color);
    padding: 8px 0;
    overflow: hidden;
}

.ticker-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
}

.ticker-label {
    background-color: var(--secondary-color);
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 3px 6px;
    margin-right: 15px;
    white-space: nowrap;
    letter-spacing: 0.1em;
    border-radius: 2px;
}

.ticker-wrapper {
    overflow: hidden;
    width: 100%;
}

.ticker-content {
    display: inline-block;
    white-space: nowrap;
    animation: ticker-slide 30s linear infinite;
    font-size: 0.8rem;
    color: var(--text-main);
    font-family: var(--font-body);
}

.ticker-content:hover {
    animation-play-state: paused;
}

.ticker-item {
    display: inline-block;
    padding-right: 50px;
    cursor: pointer;
}

.ticker-item:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.ticker-bullet {
    margin: 0 10px;
    color: var(--secondary-color);
}

@keyframes ticker-slide {
    0% {
        transform: translate3d(100%, 0, 0);
    }

    100% {
        transform: translate3d(-100%, 0, 0);
    }
}

/* ==========================================================================
   GRID LAYOUT PRINCIPAL (Home)
   ========================================================================== */

.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px 60px 20px;
}

.view-section {
    animation: fade-in 0.4s ease;
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.newspaper-grid {
    display: grid;
    grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
    gap: 30px;
    align-items: start;
}

.grid-main-panel {
    border-right: 1px solid var(--border-color);
    padding-right: 30px;
    min-width: 0;
}

.grid-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

/* Separadores */
.separator-single {
    border: 0;
    height: 1px;
    background-color: var(--border-color);
    margin: 25px 0;
}

.separator-double {
    border: 0;
    height: 4px;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin: 30px 0;
}

/* Títulos de Widgets */
.widget-title {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--secondary-color);
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--secondary-color);
    display: inline-block;
}

.category-header-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.category-header-title h2 {
    font-family: var(--font-title);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
}

.category-header-title h2 span {
    color: var(--primary-color);
}

.clear-filter-btn {
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.clear-filter-btn:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background-color: var(--bg-card);
}

/* ==========================================================================
   CARDS DE ARTÍCULOS - VISTA DE PORTADA
   ========================================================================== */

/* Artículo Destacado (Lead Story) */
.lead-story {
    display: flex;
    flex-direction: column;
    gap: 15px;
    cursor: pointer;
}

.lead-story-image-container {
    width: 100%;
    height: 420px;
    overflow: hidden;
    border-radius: var(--border-radius);
    position: relative;
}

.lead-story-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.lead-story:hover .lead-story-image-container img {
    transform: scale(1.03);
}

.article-category {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--secondary-color);
    letter-spacing: 0.05em;
    display: inline-block;
}

.article-category.opinion-cat {
    color: var(--secondary-color);
}

.article-category.sports-cat {
    color: #2b8a3e;
}

.article-category.news-cat {
    color: var(--primary-color);
}

.lead-story-title {
    font-family: var(--font-title);
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1.15;
    color: var(--text-main);
}

.lead-story:hover .lead-story-title {
    color: var(--primary-color);
    text-decoration: underline;
    text-decoration-thickness: 1px;
}

.lead-story-subtitle {
    font-family: var(--font-body);
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.article-meta {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.author-name {
    font-weight: 700;
    color: var(--text-main);
}

/* Grilla de Secundarias */
.secondary-stories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.secondary-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    cursor: pointer;
    padding-bottom: 10px;
}

.secondary-card-img {
    width: 100%;
    height: 180px;
    overflow: hidden;
    border-radius: var(--border-radius);
}

.secondary-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.secondary-card:hover .secondary-card-img img {
    transform: scale(1.03);
}

.secondary-card-title {
    font-family: var(--font-title);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-main);
}

.secondary-card:hover .secondary-card-title {
    color: var(--primary-color);
    text-decoration: underline;
    text-decoration-thickness: 1px;
}

.secondary-card-desc {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==========================================================================
   SIDEBAR COMPONENTS
   ========================================================================== */

/* Tribuna de Opinión */
.opinion-widget {
    background-color: var(--bg-crema);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: var(--border-radius);
}

.opinion-story-card {
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
}

.opinion-story-card:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.opinion-story-card:first-of-type {
    padding-top: 0;
}

.opinion-author-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.opinion-author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--secondary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.opinion-author-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-main);
}

.opinion-story-title {
    font-family: var(--font-title);
    font-size: 1.1rem;
    font-style: italic;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-main);
}

.opinion-story-card:hover .opinion-story-title {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Lo Más Leído */
.popular-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.popular-item {
    display: flex;
    gap: 15px;
    cursor: pointer;
    padding-bottom: 15px;
    border-bottom: 1px dashed var(--border-color);
}

.popular-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.popular-number {
    font-family: var(--font-title);
    font-size: 2rem;
    font-weight: 900;
    color: var(--border-color);
    line-height: 1;
    transition: color var(--transition-fast);
}

.popular-item:hover .popular-number {
    color: var(--secondary-color);
}

.popular-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.popular-title {
    font-family: var(--font-title);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.3;
}

.popular-item:hover .popular-title {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Info del Taller Seal */
.info-box-content {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.info-box-content p {
    margin-bottom: 10px;
}

.school-seal {
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    display: inline-block;
    padding: 6px 12px;
    font-weight: 800;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 10px;
    border-radius: 4px;
    transform: rotate(-3deg);
}

/* ==========================================================================
   MULTIMEDIA SECTION (Banners horizontales)
   ========================================================================== */

.multimedia-section {
    margin-top: 50px;
}

.section-divider-title {
    display: flex;
    align-items: center;
    text-align: center;
    margin-bottom: 25px;
}

.section-divider-title::before,
.section-divider-title::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.section-divider-title span {
    padding: 0 15px;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    color: var(--text-muted);
}

.multimedia-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.multimedia-card {
    position: relative;
    height: 250px;
    border-radius: var(--border-radius);
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.multimedia-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.multimedia-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
    padding: 20px;
    color: white;
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: flex-end;
    height: 60%;
}

.multimedia-badge {
    align-self: flex-start;
    background-color: var(--primary-color);
    color: white;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.multimedia-card-title {
    font-family: var(--font-title);
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.25;
}

.multimedia-card:hover img {
    transform: scale(1.05);
}

.multimedia-card:hover .multimedia-card-title {
    text-decoration: underline;
}

/* ==========================================================================
   ARTICLE VIEW (Visor de nota completa)
   ========================================================================== */

.article-navigation-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 10px;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 4px;
    background-color: var(--bg-card);
}

.back-btn:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.back-btn svg {
    transition: transform var(--transition-fast);
}

.back-btn:hover svg {
    transform: translateX(-4px);
}



.single-article {
    max-width: 800px;
    margin: 0 auto 50px auto;
    background-color: var(--bg-card);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.article-header {
    margin-bottom: 25px;
}

.single-article .article-category {
    font-size: 0.8rem;
    margin-bottom: 15px;
}

.article-main-title {
    font-family: var(--font-title);
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-main);
    margin-bottom: 15px;
}

.article-main-subtitle {
    font-family: var(--font-body);
    font-size: 1.25rem;
    color: var(--text-muted);
    line-height: 1.45;
    margin-bottom: 20px;
    font-style: normal;
}

.article-header-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.article-author-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.author-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}

.author-details {
    display: flex;
    flex-direction: column;
}

.author-role {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.article-featured-image {
    width: 100%;
    margin-bottom: 30px;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.article-featured-image img {
    width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: cover;
    display: block;
}

.image-caption {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 8px 12px;
    background-color: var(--bg-primary);
    border-left: 3px solid var(--secondary-color);
}

.article-body {
    font-family: var(--font-body);
    font-size: 1.15rem;
    line-height: 1.75;
    color: var(--text-main);
}

.article-body a {
    color: var(--primary-color) !important;
    text-decoration: underline !important;
    font-weight: 600;
    transition: color var(--transition-fast);
}

.article-body a:hover {
    color: var(--secondary-color) !important;
}

.article-body p {
    margin-bottom: 20px;
}

.article-body h2,
.article-body h3 {
    font-family: var(--font-title);
    color: var(--text-main);
    font-weight: 800;
    line-height: 1.25;
    margin: 28px 0 14px 0;
}

.article-body h2 {
    font-size: 1.55rem;
}

.article-body h3 {
    font-size: 1.3rem;
}

.article-body ul,
.article-body ol {
    margin: 0 0 20px 24px;
}

.article-body li {
    margin-bottom: 8px;
}

/* Imágenes y figuras dentro del cuerpo de la noticia (evita fotos desbordadas o gigantes) */
.article-body figure,
.article-inline-figure {
    max-width: 620px;
    margin: 26px auto;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    text-align: center;
}

.article-body img,
.article-inline-img {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    max-height: 420px !important;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    border-radius: 2px;
}

.article-body figcaption,
.article-inline-caption {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--text-muted);
    padding: 10px 14px;
    text-align: left;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-primary);
}

/* Letra Capital */
.article-body p:first-of-type::first-letter {
    font-family: var(--font-title);
    font-size: 4.2rem;
    font-weight: 800;
    float: left;
    line-height: 0.8;
    margin: 4px 10px 0 0;
    color: var(--secondary-color);
}

/* Citas */
.article-body blockquote {
    font-family: var(--font-title);
    font-size: 1.4rem;
    font-style: italic;
    color: var(--secondary-color);
    border-left: 4px solid var(--secondary-color);
    padding-left: 20px;
    margin: 30px 0;
    line-height: 1.4;
}

/* ==========================================================================
   FEEDBACK, COMENTARIOS Y REACCIONES
   ========================================================================== */

.article-feedback-section {
    max-width: 800px;
    margin: 0 auto;
}

.feedback-container {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow-sm);
}

.reactions-box {
    margin-bottom: 35px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.reactions-box h4 {
    font-family: var(--font-title);
    font-size: 1.25rem;
    margin-bottom: 15px;
}

.reaction-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.reaction-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}

.reaction-btn:hover {
    border-color: var(--primary-color);
    background-color: var(--bg-crema);
}

.reaction-btn.reacted {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.reaction-btn.reacted .count {
    color: rgba(255, 255, 255, 0.9);
}

.reaction-btn .emoji {
    font-size: 1.1rem;
}

.reaction-btn .count {
    background-color: rgba(0, 0, 0, 0.05);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.reaction-btn.reacted .count {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Comentarios */
.comments-box h3 {
    font-family: var(--font-title);
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.comment-form {
    margin-bottom: 30px;
}

.comment-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.comment-form input,
.comment-form select,
.comment-form textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: var(--bg-primary);
    color: var(--text-main);
    outline: none;
    font-size: 0.85rem;
    font-family: var(--font-sans);
}

.comment-form input:focus,
.comment-form select:focus,
.comment-form textarea:focus {
    border-color: var(--primary-color);
}

.submit-comment-btn {
    background-color: var(--secondary-color);
    color: white;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    padding: 10px 20px;
    border-radius: var(--border-radius);
}

.submit-comment-btn:hover {
    background-color: var(--secondary-hover);
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.comment-card {
    padding: 15px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    border-radius: var(--border-radius);
    animation: fade-in 0.3s ease;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.75rem;
}

.comment-author-info {
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.comment-role-badge {
    font-size: 0.65rem;
    font-weight: 700;
    background-color: var(--border-color);
    padding: 2px 6px;
    border-radius: 20px;
    color: var(--text-muted);
}

.comment-date {
    color: var(--text-muted);
}

.comment-body {
    font-size: 0.85rem;
    color: var(--text-main);
}

/* ==========================================================================
   MODAL DE PUBLICACIÓN (Crear Artículos)
   ========================================================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--overlay-color);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
    padding: 20px;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background-color: var(--bg-card);
    width: 100%;
    max-width: 750px;
    max-height: 90vh;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    transform: translateY(20px);
    transition: transform var(--transition-normal);
}

.modal-overlay.open .modal-card {
    transform: translateY(0);
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-family: var(--font-title);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
}

.close-modal-btn {
    font-size: 2rem;
    color: var(--text-muted);
    line-height: 0.5;
}

.close-modal-btn:hover {
    color: var(--secondary-color);
}

.publish-form {
    padding: 25px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: var(--bg-primary);
    color: var(--text-main);
    outline: none;
    font-family: var(--font-sans);
    font-size: 0.9rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    padding-top: 10px;
}

.cancel-btn {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-muted);
}

.cancel-btn:hover {
    background-color: var(--border-color);
}

.submit-publish-btn {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.submit-publish-btn:hover {
    background-color: var(--primary-hover);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.main-footer {
    background-color: var(--bg-card);
    border-top: 4px double var(--border-color);
    padding: 50px 0 30px 0;
    margin-top: 50px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 2fr;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-logo {
    font-family: var(--font-title);
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: -0.01em;
}

.footer-tagline {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.footer-address {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.footer-links-col h4,
.footer-institution h4 {
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-main);
    margin-bottom: 15px;
    letter-spacing: 0.05em;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-institution p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.footer-separator {
    border: 0;
    height: 1px;
    background-color: var(--border-color);
    margin-bottom: 25px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 15px;
}

.footer-tech {
    font-family: var(--font-sans);
    font-style: italic;
}

/* ==========================================================================
   RESPONSIVE DESIGN (Estilos móviles)
   ========================================================================== */

@media (max-width: 992px) {
    .newspaper-grid {
        grid-template-columns: 1fr;
    }

    .grid-main-panel {
        border-right: none;
        padding-right: 0;
    }

    .logo-title {
        font-size: 2.8rem;
    }

    .footer-top {
        grid-template-columns: 1fr 1fr;
    }

    .footer-institution {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {

    .top-bar-left .divider,
    .top-bar-left span:nth-child(3),
    .top-bar-left span:nth-child(4),
    .top-bar-left .weather-widget {
        display: none;
    }

    .logo-title {
        font-size: 2.2rem;
    }

    .nav-container {
        flex-direction: column;
        padding: 10px 20px;
        gap: 10px;
    }

    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    .nav-link {
        padding: 8px 0;
    }

    .nav-right {
        width: 100%;
        justify-content: space-between;
    }

    .search-box {
        flex-grow: 1;
        width: auto;
    }

    .search-box:focus-within {
        width: auto;
    }

    .lead-story-image-container {
        height: 280px;
    }

    .lead-story-title {
        font-size: 1.8rem;
    }

    .secondary-stories-grid {
        grid-template-columns: 1fr;
    }

    .multimedia-grid {
        grid-template-columns: 1fr;
    }

    .single-article {
        padding: 20px;
    }

    .article-main-title {
        font-size: 2rem;
    }

    .comment-form .form-row {
        grid-template-columns: 1fr;
    }

    .form-row-2 {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .footer-top {
        grid-template-columns: 1fr;
    }

    .footer-institution {
        grid-column: span 1;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* ==========================================================================
   PUBLISH VIEW (CMS Redactor / Split Screen)
   ========================================================================== */

.publish-navigation-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 25px;
}

.publish-navigation-top .back-btn {
    height: 38px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.publish-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

.publish-editor-panel,
.publish-preview-panel {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.section-title-editor {
    font-family: var(--font-title);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.publish-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Editor de Texto Pro Wrapper */
.editor-pro-wrapper {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    background-color: var(--bg-primary);
}

.editor-toolbar {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.toolbar-btn {
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--bg-primary);
    color: var(--text-main);
}

.toolbar-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background-color: var(--bg-card);
}

#toggle-html-mode {
    margin-left: auto;
    background-color: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
    font-weight: 700;
}

#toggle-html-mode:hover {
    background-color: var(--secondary-hover);
    border-color: var(--secondary-hover);
    color: white;
}

.editor-visual {
    min-height: 350px;
    max-height: 500px;
    overflow-y: auto;
    padding: 15px;
    outline: none;
    background-color: var(--bg-card);
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-main);
}

.editor-visual[placeholder]:empty:before {
    content: attr(placeholder);
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 0.9rem;
}

.editor-html {
    width: 100%;
    min-height: 350px;
    max-height: 500px;
    font-family: monospace;
    font-size: 0.9rem;
    padding: 15px;
    border: none;
    outline: none;
    resize: vertical;
    background-color: #1e1e1e;
    color: #d4d4d4;
}

.publish-footer {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
}

/* Contenedor de previsualización con scroll */
.preview-card-container {
    height: 750px;
    overflow-y: auto;
    border: 1.5px dashed var(--primary-color);
    padding: 20px;
    background-color: var(--bg-primary);
    border-radius: var(--border-radius);
    transition: background-color var(--transition-normal);
}

.preview-scroll-wrapper {
    pointer-events: none; /* Desactivar clics en vista previa */
}

.preview-mode-article {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
}

.publish-container.single-column-layout {
    grid-template-columns: 1fr;
    max-width: 900px;
    margin: 0 auto;
}

.publish-editor-panel-full {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 35px;
    box-shadow: var(--shadow-md);
    transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.preview-trigger-btn-large {
    background-color: var(--secondary-color);
    color: white;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
    height: 38px;
    padding: 0 16px;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    cursor: pointer;
    box-sizing: border-box;
    gap: 8px;
    transition: background-color var(--transition-normal);
}

.preview-trigger-btn-large:hover {
    background-color: var(--secondary-hover);
}

/* --- Control de Carga de Imagen de Portada --- */
.portada-input-group {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 15px;
    background-color: var(--bg-primary);
    transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.image-source-options {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.radio-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.radio-label input[type="radio"] {
    accent-color: var(--primary-color);
}

.source-container {
    margin-bottom: 8px;
}

.source-container input[type="url"],
.source-container input[type="file"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: var(--bg-card);
    color: var(--text-main);
    font-size: 0.85rem;
    box-sizing: border-box;
}

.helper-text-for-dummies {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-top: 10px;
    border-top: 1px dashed var(--border-color);
    padding-top: 8px;
}

/* --- Elementos de cuerpo insertados --- */
.article-body-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* Relación 16:9 */
    padding-top: 25px;
    height: 0;
    margin: 25px 0;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* --- Controles del Toolbar --- */
.toolbar-separator {
    color: var(--border-color);
    margin: 0 4px;
    align-self: center;
    user-select: none;
}

.toolbar-select {
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--bg-primary);
    color: var(--text-main);
    outline: none;
    cursor: pointer;
}

.toolbar-select:hover {
    border-color: var(--primary-color);
}

/* --- Panel lateral de revisión ortográfica --- */
.editor-pro-layout-container {
    display: flex;
    gap: 20px;
    position: relative;
    align-items: flex-start;
}

.spelling-sidebar {
    width: 280px;
    flex-shrink: 0;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    animation: slide-in-right 0.3s ease-out;
}

.spelling-header {
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.spelling-header h4 {
    font-family: var(--font-title);
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
}

.close-spelling-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-muted);
    cursor: pointer;
}

.close-spelling-btn:hover {
    color: var(--secondary-color);
}

.spelling-content {
    padding: 15px;
    overflow-y: auto;
    max-height: 480px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    box-sizing: border-box;
}

.scanning-text,
.no-errors-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 15px;
}

.spelling-results-count {
    font-size: 0.8rem;
    color: var(--text-main);
    font-weight: bold;
    margin: 0 0 5px 0;
}

.spelling-success {
    text-align: center;
    padding: 20px 10px;
}

.success-icon {
    font-size: 2.2rem;
    display: block;
    margin-bottom: 10px;
}

.spelling-success h4 {
    color: #2e7d32;
    font-size: 1rem;
    margin-bottom: 5px;
}

.spelling-success p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.spelling-error-card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: background-color var(--transition-normal);
}

.error-card-meta {
    display: flex;
    justify-content: flex-start;
}

.error-badge {
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 20px;
    color: white;
}

.error-badge.ortografia {
    background-color: var(--secondary-color);
}

.error-badge.gramatica {
    background-color: var(--primary-color);
}

.error-words {
    font-size: 0.85rem;
    font-weight: bold;
}

.incorrect-word {
    color: var(--secondary-color);
    text-decoration: underline wavy var(--secondary-color);
}

.suggested-word {
    color: #2e7d32;
}

.error-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.3;
}

.correct-word-btn {
    background-color: var(--bg-card);
    border: 1px solid #2e7d32;
    color: #2e7d32;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    margin-top: 5px;
    transition: all var(--transition-fast);
}

.correct-word-btn:hover {
    background-color: #2e7d32;
    color: white;
}

.editor-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 10px;
}

.check-spelling-btn {
    background-color: var(--bg-card);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 20px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.check-spelling-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

/* --- Modal de Previsualización --- */
.preview-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--overlay-color);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
    animation: fade-in-modal 0.25s ease-out;
}

.preview-modal-card {
    width: 90%;
    max-width: 900px;
    height: 85%;
    background-color: var(--bg-primary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: background-color var(--transition-normal);
}

.preview-modal-header-top {
    background-color: var(--secondary-color);
    color: white;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preview-modal-header-top h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.05em;
}

.preview-close-modal-btn {
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1;
}

.preview-close-modal-btn:hover {
    color: white;
}

.preview-modal-body-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background-color: var(--bg-primary);
    transition: background-color var(--transition-normal);
}

.preview-article-scroll {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px 0;
}

@keyframes slide-in-right {
    from { transform: translateX(30px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fade-in-modal {
    from { opacity: 0; transform: scale(0.97); }
    to { opacity: 1; transform: scale(1); }
}

@media (max-width: 992px) {
    .editor-pro-layout-container {
        flex-direction: column;
    }
    .spelling-sidebar {
        width: 100%;
    }
}

/* --- Adaptación del Editor Jodit al Tema Claro/Oscuro --- */
.jodit-container {
    border: 1px solid var(--border-color) !important;
    border-radius: var(--border-radius) !important;
    font-family: var(--font-body) !important;
    transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.dark-theme .jodit-container {
    --jodit-color-text: var(--text-main) !important;
    --jodit-color-border: var(--border-color) !important;
    --jodit-background-color: var(--bg-card) !important;
    --jodit-color-icons: var(--text-main) !important;
    --jodit-background-color-toolbar: var(--bg-primary) !important;
    --jodit-background-color-active: var(--border-color) !important;
    --jodit-background-color-hover: var(--border-color) !important;
    --jodit-color-panel-background: var(--bg-card) !important;
    --jodit-color-button-hover: var(--primary-color) !important;
}

.dark-theme .jodit-wysiwyg {
    background-color: var(--bg-card) !important;
    color: var(--text-main) !important;
}

.dark-theme .jodit-toolbar__box {
    background-color: var(--bg-primary) !important;
    border-bottom: 1px solid var(--border-color) !important;
}

.dark-theme .jodit-toolbar-button__button {
    color: var(--text-main) !important;
}

.dark-theme .jodit-toolbar-button__button:hover {
    background-color: var(--border-color) !important;
}

.dark-theme .jodit-status-bar {
    background-color: var(--bg-primary) !important;
    border-top: 1px solid var(--border-color) !important;
    color: var(--text-muted) !important;
}

/* --- Corrector de Ortografía en Tiempo Real Estilo MS Word --- */
.word-spell-error {
    text-decoration-skip-ink: none !important;
    cursor: pointer !important;
    position: relative !important;
    display: inline-block !important;
}

/* Errores de Ortografía (Rojo) */
.word-spell-error.ortho {
    text-decoration: underline wavy #ff0000 !important;
}

.word-spell-error.ortho:hover {
    background-color: rgba(255, 0, 0, 0.05) !important;
}

/* Errores de Gramática (Azul) */
.word-spell-error.grammar {
    text-decoration: underline wavy var(--primary-color) !important;
}

.word-spell-error.grammar:hover {
    background-color: rgba(0, 104, 214, 0.05) !important;
}

/* Globo flotante de sugerencias (popover) */
.spell-popover {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 6px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15) !important;
    padding: 12px !important;
    width: 200px !important;
    box-sizing: border-box !important;
    font-family: var(--font-sans) !important;
    animation: fade-in-popover 0.15s ease-out !important;
    transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.popover-suggestion-title {
    font-size: 0.7rem !important;
    color: var(--text-muted) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    margin-bottom: 8px !important;
    font-weight: 700 !important;
}

.popover-correct-btn {
    display: block !important;
    width: 100% !important;
    background-color: var(--primary-color) !important;
    color: white !important;
    border: none !important;
    padding: 8px 10px !important;
    border-radius: 4px !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    text-align: left !important;
    cursor: pointer !important;
    margin-bottom: 8px !important;
    transition: background-color var(--transition-fast) !important;
}

.popover-correct-btn:hover {
    background-color: var(--primary-hover) !important;
}

.popover-footer {
    font-size: 0.75rem !important;
    color: var(--secondary-color) !important;
    cursor: pointer !important;
    text-decoration: underline !important;
    font-weight: 600 !important;
    text-align: right !important;
}

.popover-footer:hover {
    color: var(--secondary-hover) !important;
}

@keyframes fade-in-popover {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Estilos para los campos Contenteditable del CMS --- */
.editable-title-field,
.editable-subtitle-field {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: var(--bg-card);
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.5;
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    min-height: 42px;
    box-sizing: border-box;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.editable-title-field:focus,
.editable-subtitle-field:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(0, 104, 214, 0.1) !important;
}

/* Soporte para Placeholder en div contenteditable */
[contenteditable="true"]:empty:before {
    content: attr(placeholder);
    color: var(--text-muted);
    font-style: italic;
    cursor: text;
}

/* Asegurar que las correcciones onduladas se muestren correctamente en los inputs del CMS */
.editable-title-field .word-spell-error,
.editable-subtitle-field .word-spell-error,
.editable-caption-field .word-spell-error {
    display: inline !important;
}

.editable-caption-field {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: var(--bg-card);
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    line-height: 1.4;
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    min-height: 34px;
    box-sizing: border-box;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.editable-caption-field:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(0, 104, 214, 0.1) !important;
}

/* ==========================================================================
   MEJORAS UX/UI: BARRA DE PROGRESO, TOASTS, ACCIONES DE ARTÍCULO Y PRINT
   ========================================================================== */

/* Barra de progreso de lectura */
.reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    z-index: 3000;
    transition: width 0.1s ease-out;
}

/* Acciones en el visor de artículo */
.article-actions-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.font-size-controls {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--bg-card);
    overflow: hidden;
}

.font-ctrl-btn {
    padding: 6px 10px;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-muted);
    border-right: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.font-ctrl-btn:last-child {
    border-right: none;
}

.font-ctrl-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

.author-filter-link {
    cursor: pointer;
    transition: color var(--transition-fast);
}

.author-filter-link:hover {
    color: var(--primary-color) !important;
    text-decoration: underline;
}

.footer-data-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.footer-data-tools .reset-demo-btn {
    margin-top: 0;
}

.action-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 7px 14px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.action-pill-btn:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background-color: var(--bg-primary);
}

.action-pill-btn.edit-pill:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.action-pill-btn.delete-pill:hover {
    color: #c92a2a;
    border-color: #c92a2a;
    background-color: rgba(201, 42, 42, 0.05);
}

.meta-sep {
    margin: 0 8px;
    color: var(--border-color);
}

/* Artículos Relacionados */
.related-articles-section {
    max-width: 800px;
    margin: 0 auto 40px auto;
}

.related-articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.related-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.related-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.related-card-img {
    height: 120px;
    overflow: hidden;
}

.related-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.related-card:hover .related-card-img img {
    transform: scale(1.05);
}

.related-card-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1;
}

.related-card-body h4 {
    font-family: var(--font-title);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-main);
}

.related-card:hover .related-card-body h4 {
    color: var(--primary-color);
}

.related-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: auto;
}

/* Mejoras en el Redactor / CMS */
.publish-top-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.draft-status-badge {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 20px;
}

.clear-draft-btn {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
    padding: 0 14px;
    height: 38px;
    border-radius: 4px;
}

.clear-draft-btn:hover {
    color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.editor-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.editor-panel-header .section-title-editor {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.editor-Editing-badge {
    background-color: var(--primary-color);
    color: white;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 4px;
    letter-spacing: 0.05em;
}

.label-with-counter {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.char-counter {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
}

.char-counter.limit-near {
    color: var(--secondary-color);
    font-weight: 800;
}

.editor-tools-right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.word-reading-stats {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.reset-demo-btn {
    margin-top: 12px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    border: 1px dashed var(--border-color);
    padding: 6px 10px;
    border-radius: 4px;
    background-color: var(--bg-primary);
}

.reset-demo-btn:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Notificaciones Toast */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 5000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 360px;
}

.toast-notification {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: var(--bg-card);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
    padding: 12px 16px;
    border-radius: 6px;
    box-shadow: var(--shadow-lg);
    font-size: 0.85rem;
    font-weight: 600;
    animation: toast-slide-in 0.25s ease-out;
}

.toast-notification.toast-success {
    border-left-color: #2b8a3e;
}

.toast-notification.toast-error {
    border-left-color: var(--secondary-color);
}

.toast-fade-out {
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.25s ease-in;
}

@keyframes toast-slide-in {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal de Confirmación */
.confirm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--overlay-color);
    z-index: 4000;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(3px);
    padding: 20px;
}

.confirm-modal-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    max-width: 420px;
    width: 100%;
    padding: 25px;
    box-shadow: var(--shadow-lg);
    animation: fade-in-modal 0.2s ease-out;
}

.confirm-modal-card h3 {
    font-family: var(--font-title);
    font-size: 1.35rem;
    margin-bottom: 10px;
    color: var(--text-main);
}

.confirm-modal-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.5;
}

.confirm-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.danger-btn {
    background-color: var(--secondary-color) !important;
}

.danger-btn:hover {
    background-color: var(--secondary-hover) !important;
}

@media (max-width: 768px) {
    .related-articles-grid {
        grid-template-columns: 1fr;
    }
    .article-navigation-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .publish-navigation-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* Estilos de Impresión para Artículos Escolares */
@media print {
    .top-bar,
    .main-nav,
    .ticker-bar,
    .article-navigation-top,
    .related-articles-section,
    .article-feedback-section,
    .main-footer,
    .reading-progress-bar,
    .toast-container {
        display: none !important;
    }

    body {
        background: #ffffff !important;
        color: #000000 !important;
    }

    .main-header {
        padding: 10px 0 !important;
        border-bottom: 2px solid #000 !important;
    }

    .single-article {
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        max-width: 100% !important;
    }
}

/* ==========================================================================
   HEMEROTECA DE REVISTAS DEL TALLER (PORTADA + ZONA DEDICADA + 3D FLIPBOOK)
   ========================================================================== */

.home-magazines-showcase {
    margin-top: 0;
    margin-bottom: 40px;
    padding: 35px;
    background: linear-gradient(135deg, var(--bg-crema) 0%, var(--bg-card) 100%);
    border: 1px solid var(--border-color);
    border-top: 4px solid var(--secondary-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

.magazines-showcase-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.magazines-showcase-titles {
    max-width: 720px;
}

.kiosco-badge {
    display: inline-block;
    background-color: var(--secondary-color);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    padding: 4px 10px;
    border-radius: 2px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.magazines-showcase-titles h2,
.magazines-hero-banner h2 {
    font-family: var(--font-title);
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--text-main);
    line-height: 1.15;
    margin-bottom: 8px;
}

.magazines-showcase-titles p,
.magazines-hero-banner p {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.view-all-mags-btn {
    background-color: var(--primary-color);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 12px 20px;
    border-radius: var(--border-radius);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-sm);
}

.view-all-mags-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

/* Grilla de Revistas (Estante 3D) */
.magazines-shelf-grid,
.magazines-dedicated-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.magazine-shelf-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 24px 20px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.magazine-shelf-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* Tapa 3D con lomo y canto de hojas */
.mag-3d-cover-wrap {
    perspective: 1000px;
    display: flex;
    justify-content: center;
    padding: 10px 0;
    cursor: pointer;
}

.mag-3d-book {
    width: 200px;
    height: 275px;
    position: relative;
    transform-style: preserve-3d;
    transform: rotateY(-16deg) rotateX(4deg);
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.45s ease;
    box-shadow: 12px 15px 28px rgba(0, 0, 0, 0.28);
    border-radius: 2px 5px 5px 2px;
}

.magazine-shelf-card:hover .mag-3d-book {
    transform: rotateY(-4deg) rotateX(2deg) scale(1.04);
    box-shadow: 16px 20px 35px rgba(0, 0, 0, 0.35);
}

.mag-3d-spine {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 14px;
    background: linear-gradient(90deg, rgba(255,255,255,0.25), rgba(0,0,0,0.45));
    background-color: var(--mag-accent, #800c2c);
    z-index: 3;
    border-radius: 2px 0 0 2px;
}

.mag-3d-front {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: 2px 5px 5px 2px;
    background-color: #222;
    z-index: 2;
}

.mag-3d-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mag-3d-front.real-pdf-cover {
    padding-left: 12px;
    background-color: #ffffff;
}

.mag-3d-front.real-pdf-cover img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    display: block;
}

.mag-cover-overlay {
    position: absolute;
    inset: 0;
    padding: 16px 14px 14px 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #fff;
}

.mag-cover-kicker {
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255, 255, 255, 0.45);
    padding-bottom: 4px;
}

.mag-cover-title {
    font-family: var(--font-title);
    font-size: 1.35rem;
    font-weight: 900;
    line-height: 1.1;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.mag-cover-footer {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.9;
}

.mag-3d-pages-edge {
    position: absolute;
    top: 3px;
    bottom: 3px;
    right: -7px;
    width: 7px;
    background: repeating-linear-gradient(90deg, #f5f5f0 0px, #dcdcdc 1px, #ffffff 2px);
    border-radius: 0 2px 2px 0;
    box-shadow: 2px 0 5px rgba(0,0,0,0.18);
    z-index: 1;
}

.mag-card-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.mag-card-badges {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    flex-wrap: wrap;
}

.mag-course-tag {
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 3px;
    text-transform: uppercase;
}

.mag-type-tag {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--primary-color);
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    padding: 2px 7px;
    border-radius: 3px;
}

.mag-card-heading {
    font-family: var(--font-title);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.25;
}

.mag-card-group {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.mag-card-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.45;
    flex-grow: 1;
}

.mag-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.open-flipbook-btn {
    flex-grow: 1;
    background-color: var(--secondary-color);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 10px 14px;
    border-radius: var(--border-radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.open-flipbook-btn:hover {
    background-color: var(--secondary-hover);
}

.delete-mag-btn {
    border: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    padding: 0 12px;
    border-radius: var(--border-radius);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
}

.delete-mag-btn:hover {
    border-color: #c92a2a;
    color: #c92a2a;
    background-color: rgba(201, 42, 42, 0.1);
}

/* Vista Dedicada de Revistas */
.magazines-dedicated-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 12px;
}

.mag-upload-btn {
    height: 38px;
    padding: 0 18px;
    font-size: 0.78rem;
}

.magazines-hero-banner {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-left: 5px solid var(--primary-color);
    padding: 28px 30px;
    border-radius: var(--border-radius);
    margin-bottom: 28px;
    box-shadow: var(--shadow-sm);
}

.magazines-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.mag-filter-pill {
    padding: 6px 14px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background-color: var(--bg-primary);
    color: var(--text-muted);
}

.mag-filter-pill:hover,
.mag-filter-pill.active {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.upload-magazine-drawer {
    margin-bottom: 30px;
    animation: fade-in 0.25s ease;
}

.upload-magazine-card {
    background-color: var(--bg-card);
    border: 2px dashed var(--primary-color);
    border-radius: 6px;
    padding: 25px;
    box-shadow: var(--shadow-md);
}

.upload-magazine-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.upload-magazine-card-header h3 {
    font-family: var(--font-title);
    font-size: 1.3rem;
    color: var(--text-main);
}

.upload-magazine-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ==========================================================================
   MODAL LECTOR INTERACTIVO 3D FLIPBOOK (HOJEADOR ANIMADO DE REVISTAS)
   ========================================================================== */

.flipbook-modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(10, 12, 16, 0.92);
    z-index: 4500;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(6px);
    animation: fade-in-modal 0.25s ease;
}

.flipbook-Reader-shell {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    color: #f1f3f5;
    user-select: none;
}

.flipbook-topbar {
    background-color: #14171c;
    border-bottom: 1px solid #2b303a;
    padding: 10px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    z-index: 20;
}

.flipbook-meta-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.flipbook-edition-pill {
    background-color: var(--secondary-color);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 4px;
    text-transform: uppercase;
}

.flipbook-titles h3 {
    font-family: var(--font-title);
    font-size: 1.05rem;
    color: #fff;
    margin: 0;
}

.flipbook-titles span {
    font-size: 0.72rem;
    color: #9aa0a6;
}

.flipbook-controls-center {
    display: flex;
    align-items: center;
    gap: 8px;
}

.flip-ctrl-btn,
.flip-icon-btn {
    background-color: #21262d;
    color: #e6edf3;
    border: 1px solid #30363d;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

.flip-ctrl-btn:hover:not(:disabled),
.flip-icon-btn:hover:not(:disabled) {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.flip-ctrl-btn:disabled,
.stage-side-nav:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.flip-page-indicator {
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    min-width: 145px;
    text-align: center;
    background-color: #0d1117;
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid #30363d;
}

.flipbook-controls-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.flip-zoom-label {
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 44px;
    text-align: center;
}

.flip-close-btn {
    font-size: 1.8rem;
    line-height: 1;
    color: #fff;
    padding: 0 8px;
    margin-left: 6px;
}

.flip-close-btn:hover {
    color: #ff6b6b;
}

/* Escenario 3D del Flipbook */
.flipbook-stage-wrapper {
    flex-grow: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: auto;
    padding: 25px 60px;
    background: radial-gradient(circle at center, #232832 0%, #0f1217 100%);
}

.stage-side-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 30;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stage-side-nav:hover:not(:disabled) {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.stage-side-nav.prev {
    left: 22px;
}

.stage-side-nav.next {
    right: 22px;
}

.flipbook-viewport {
    perspective: 2200px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.flipbook-book {
    --page-w: 430px;
    --page-h: 590px;
    --book-zoom: 1;
    width: var(--page-w);
    height: var(--page-h);
    position: relative;
    transform-style: preserve-3d;
    transform: scale(var(--book-zoom));
    transition: transform 0.65s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.flipbook-book.landscape-book {
    --page-w: 540px;
    --page-h: 320px;
}

/* Al abrir el libro, desplazamos el eje del lomo al centro de la pantalla */
.flipbook-book.book-open {
    transform: translateX(50%) scale(var(--book-zoom));
}

.flipbook-book.book-closed-back {
    transform: translateX(100%) scale(var(--book-zoom));
}

.flip-sheet {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform-origin: left center;
    transform-style: preserve-3d;
    transition: transform 0.85s cubic-bezier(0.645, 0.045, 0.355, 1);
    cursor: pointer;
}

.flip-sheet.flipped {
    transform: rotateY(-180deg);
}

.flip-page-face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    background-color: #fdfbf7;
    color: #1a1a1a;
    overflow: hidden;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45);
}

.flip-page-front {
    border-radius: 0 6px 6px 0;
    background: linear-gradient(90deg, #e6e2d8 0%, #fdfbf7 6%, #ffffff 100%);
}

.flip-page-back {
    transform: rotateY(180deg);
    border-radius: 6px 0 0 6px;
    background: linear-gradient(270deg, #e6e2d8 0%, #fdfbf7 6%, #ffffff 100%);
}

/* Maquetación Editorial de las Páginas Demo de la Revista */
.demo-mag-page {
    width: 100%;
    height: 100%;
    padding: 24px 26px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
    font-family: var(--font-sans);
}

.demo-cover-page {
    background: linear-gradient(165deg, #161920 0%, var(--page-accent, #800c2c) 100%);
    color: #ffffff;
    padding: 22px;
}

.demo-cover-top-band {
    display: flex;
    justify-content: space-between;
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.35);
    padding-bottom: 6px;
    text-transform: uppercase;
}

.demo-cover-masthead {
    text-align: center;
    padding: 8px 0;
    border-bottom: 3px double rgba(255, 255, 255, 0.5);
}

.demo-cover-masthead h1 {
    font-family: var(--font-title);
    font-size: 2.55rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 1;
}

.demo-cover-masthead p {
    font-size: 0.65rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    margin-top: 4px;
    opacity: 0.9;
}

.demo-cover-hero {
    position: relative;
    height: 250px;
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.demo-cover-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.demo-cover-headline-box {
    position: absolute;
    inset: auto 0 0 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.92));
    padding: 16px 14px 12px 14px;
}

.cover-exclusive-tag {
    background-color: #f59f00;
    color: #111;
    font-size: 0.55rem;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 2px;
    text-transform: uppercase;
}

.demo-cover-headline-box h2 {
    font-family: var(--font-title);
    font-size: 1.15rem;
    line-height: 1.2;
    margin-top: 6px;
}

.demo-cover-highlights {
    background-color: rgba(0, 0, 0, 0.35);
    padding: 10px 14px;
    border-radius: 4px;
    border-left: 3px solid #f59f00;
}

.demo-cover-highlights h4 {
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    color: #ffd43b;
    margin-bottom: 5px;
}

.demo-cover-highlights ul {
    padding-left: 15px;
    font-size: 0.72rem;
    line-height: 1.4;
}

.demo-page-click-hint {
    text-align: center;
    font-size: 0.65rem;
    font-weight: 700;
    color: #ffd43b;
    letter-spacing: 0.04em;
}

/* Páginas Interiores de la Revista Demo */
.demo-page-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #666;
    border-bottom: 2px solid var(--page-accent, #800c2c);
    padding-bottom: 6px;
}

.demo-page-sec {
    color: var(--page-accent, #800c2c);
}

.demo-editorial-title,
.demo-art-title {
    font-family: var(--font-title);
    font-size: 1.35rem;
    font-weight: 900;
    line-height: 1.18;
    color: #111;
    margin-top: 8px;
}

.demo-editorial-lead {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-style: italic;
    color: #444;
    line-height: 1.4;
}

.demo-editorial-cols,
.demo-art-body {
    font-family: var(--font-body);
    font-size: 0.76rem;
    line-height: 1.52;
    color: #222;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.demo-editorial-quote {
    font-family: var(--font-title);
    font-size: 0.85rem;
    font-style: italic;
    color: var(--page-accent, #800c2c);
    border-left: 3px solid var(--page-accent, #800c2c);
    padding-left: 10px;
    margin: 6px 0;
}

.demo-toc-box {
    background-color: #f3efe6;
    border: 1px solid #dfd9cc;
    padding: 10px 12px;
    border-radius: 4px;
}

.demo-toc-box h4 {
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    color: var(--page-accent, #800c2c);
    margin-bottom: 6px;
}

.demo-toc-item {
    display: flex;
    gap: 8px;
    font-size: 0.68rem;
    padding: 3px 0;
    border-bottom: 1px dashed #d5cfc2;
}

.demo-toc-item:last-child {
    border-bottom: none;
}

.toc-pg {
    font-weight: 900;
    color: var(--page-accent, #800c2c);
}

.demo-art-author {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--page-accent, #800c2c);
    text-transform: uppercase;
}

.demo-art-figure {
    margin: 6px 0;
}

.demo-art-figure img {
    width: 100%;
    height: 155px;
    object-fit: cover;
    border-radius: 3px;
    display: block;
}

.demo-art-figure small {
    display: block;
    font-size: 0.62rem;
    color: #555;
    margin-top: 3px;
    font-style: italic;
}

.demo-stat-callout {
    background-color: #f3efe6;
    border-left: 4px solid var(--page-accent, #800c2c);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 0 4px 4px 0;
}

.demo-stat-callout strong {
    font-family: var(--font-title);
    font-size: 1.35rem;
    color: var(--page-accent, #800c2c);
    white-space: nowrap;
}

.demo-stat-callout span {
    font-size: 0.68rem;
    line-height: 1.3;
    color: #333;
}

.demo-page-footer {
    display: flex;
    justify-content: space-between;
    font-size: 0.62rem;
    font-weight: 700;
    color: #777;
    border-top: 1px solid #ddd;
    padding-top: 6px;
}

.demo-backcover-page {
    background: linear-gradient(160deg, #1d222b 0%, #12151a 100%);
    color: #fff;
}

.backcover-inner {
    margin: auto 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
}

.backcover-seal {
    align-self: center;
    background-color: var(--page-accent, #800c2c);
    font-size: 0.6rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: 0.12em;
}

.backcover-inner h2 {
    font-family: var(--font-title);
    font-size: 1.4rem;
}

.backcover-sub {
    font-size: 0.75rem;
    color: #adb5bd;
}

.backcover-staff-card {
    background-color: rgba(255, 255, 255, 0.06);
    padding: 14px;
    border-radius: 4px;
    text-align: left;
}

.backcover-staff-card h4 {
    font-size: 0.68rem;
    color: #ffd43b;
    margin-bottom: 8px;
    letter-spacing: 0.08em;
}

.backcover-staff-card ul {
    list-style: none;
    font-size: 0.72rem;
    line-height: 1.65;
    color: #e9ecef;
}

.backcover-quote {
    font-family: var(--font-title);
    font-style: italic;
    font-size: 0.9rem;
    color: #ffd43b;
}

.backcover-loc {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #adb5bd;
}

/* Páginas Canvas PDF e Imágenes de Páginas Renderizadas */
.pdf-canvas-face {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
}

.pdf-canvas-face canvas,
.pdf-canvas-face .flip-rendered-page-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
}

.pdf-pg-badge {
    position: absolute;
    bottom: 8px;
    right: 12px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
}

/* Tira de Miniaturas Inferior */
.flipbook-thumbs-strip {
    background-color: #14171c;
    border-top: 1px solid #2b303a;
    padding: 0 20px;
    max-height: 0;
    overflow-x: auto;
    overflow-y: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: max-height 0.25s ease, padding 0.25s ease;
}

.flipbook-thumbs-strip.open {
    max-height: 64px;
    padding: 12px 20px;
}

.flip-thumb-btn {
    background-color: #21262d;
    color: #e6edf3;
    border: 1px solid #30363d;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.flip-thumb-btn:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

@media (max-width: 992px) {
    .magazines-shelf-grid,
    .magazines-dedicated-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .flipbook-book {
        --page-w: 320px;
        --page-h: 450px;
    }
}

@media (max-width: 768px) {
    .magazines-shelf-grid,
    .magazines-dedicated-grid {
        grid-template-columns: 1fr;
    }
    .home-magazines-showcase {
        padding: 20px;
    }
    .flipbook-book {
        --page-w: 280px;
        --page-h: 400px;
    }
    .flipbook-book.book-open {
        transform: scale(var(--book-zoom));
    }
}

/* ==========================================================================
   SECCIÓN DINÁMICA DIARIA: ARTE DEL DÍA (GOOGLE ARTS & CULTURE) + EFEMÉRIDES
   ========================================================================== */

.daily-culture-section {
    margin-top: 45px;
    margin-bottom: 10px;
}

.daily-culture-grid {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 28px;
    align-items: stretch;
}

.daily-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-top: 3px solid var(--secondary-color);
    border-radius: var(--border-radius);
    padding: 24px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
}

.daily-history-card {
    border-top-color: var(--primary-color);
}

.daily-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding-bottom: 14px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--border-color);
}

.daily-kicker {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--secondary-color);
    margin-bottom: 4px;
}

.daily-history-card .daily-kicker {
    color: var(--primary-color);
}

.daily-card-section-title {
    font-family: var(--font-title);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
}

.daily-refresh-btn {
    border: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    color: var(--text-main);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 6px 12px;
    border-radius: 4px;
    white-space: nowrap;
    transition: all var(--transition-fast);
}

.daily-refresh-btn:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
}

/* Tarjeta Obra de Arte del Día */
.daily-art-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex-grow: 1;
}

.daily-art-visual {
    position: relative;
    height: 240px;
    border-radius: 4px;
    overflow: hidden;
    background-color: #16181d;
    border: 1px solid var(--border-color);
}

.daily-art-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.daily-art-card:hover .daily-art-visual img {
    transform: scale(1.03);
}

.daily-art-origin-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 9px;
    border-radius: 3px;
}

.daily-art-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.daily-art-meta-line {
    font-size: 0.78rem;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.daily-art-title {
    font-family: var(--font-title);
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.25;
}

.daily-art-museum {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.daily-art-desc {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-main);
    line-height: 1.55;
    flex-grow: 1;
}

.daily-art-footer {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px dashed var(--border-color);
}

.daily-gac-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--secondary-color);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 9px 16px;
    border-radius: 4px;
    transition: background-color var(--transition-fast);
}

.daily-gac-link-btn:hover {
    background-color: var(--secondary-hover);
    color: #fff;
}

/* Tarjeta Historia del Día / Efemérides */
.daily-history-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.daily-loading-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-style: italic;
    padding: 20px 0;
}

.daily-history-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex-grow: 1;
    justify-content: space-between;
}

.daily-history-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 14px;
    align-items: start;
    padding-bottom: 16px;
    border-bottom: 1px dashed var(--border-color);
}

.daily-history-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.daily-history-year {
    display: inline-block;
    background-color: var(--bg-crema);
    border: 1px solid var(--border-color);
    color: var(--primary-color);
    font-family: var(--font-title);
    font-size: 0.95rem;
    font-weight: 900;
    padding: 4px 10px;
    border-radius: 4px;
    min-width: 58px;
    text-align: center;
}

.daily-history-desc {
    font-family: var(--font-body);
    font-size: 0.88rem;
    color: var(--text-main);
    line-height: 1.5;
    margin-bottom: 6px;
}

.daily-history-links {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.daily-history-links a {
    color: var(--primary-color);
}

.daily-history-links a:hover {
    text-decoration: underline;
}

.daily-history-thumb {
    width: 68px;
    height: 68px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

.daily-history-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 992px) {
    .daily-culture-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .daily-history-item {
        grid-template-columns: 1fr;
    }
    .daily-history-thumb {
        display: none;
    }
}

/* ==========================================================================
   CRÉDITO DE AUTOR Y FUENTE REAL EN ARTÍCULOS IMPORTADOS
   ========================================================================== */
.article-source-credit-box {
    margin-top: 2.25rem;
    padding: 1.1rem 1.35rem;
    border-left: 4px solid var(--primary-color);
    background: var(--bg-secondary);
    border-radius: 0 6px 6px 0;
    font-family: var(--font-sans);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.article-source-credit-title {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary-color);
}

.article-source-credit-details {
    font-size: 0.9rem;
    color: var(--text-color);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.article-source-credit-sep {
    color: var(--text-muted);
}

/* ==========================================================================
   SLIDER DE REVISTAS EN LA SIDEBAR DE PORTADA
   ========================================================================== */
.magazines-sidebar-widget {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-top: 3px solid var(--secondary-color);
    border-radius: var(--border-radius);
    padding: 16px 14px;
    box-shadow: var(--shadow-sm);
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    box-sizing: border-box;
}

.sidebar-mag-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.sidebar-kiosco-badge {
    font-size: 0.56rem;
    padding: 2px 6px;
    margin-bottom: 3px;
    display: inline-block;
}

.sidebar-mag-widget-title {
    margin-bottom: 0 !important;
    border-bottom: none !important;
    padding-bottom: 0 !important;
    font-size: 1.05rem;
    line-height: 1.2;
}

.sidebar-mag-nav-controls {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.sidebar-slider-arrow {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    color: var(--text-main);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.sidebar-slider-arrow:hover {
    background-color: var(--secondary-color);
    color: #ffffff;
    border-color: var(--secondary-color);
}

.sidebar-mag-counter {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    min-width: 32px;
    text-align: center;
}

.sidebar-mag-slider-viewport {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    position: relative;
    border-radius: 4px;
}

.sidebar-mag-slider-track {
    display: flex;
    width: 100%;
    transition: transform 0.48s cubic-bezier(0.25, 0.8, 0.25, 1);
    will-change: transform;
}

.sidebar-mag-slide {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    flex: 0 0 100%;
    box-sizing: border-box;
    padding: 2px;
    overflow: hidden;
}

.sidebar-mag-card {
    border: none !important;
    box-shadow: none !important;
    padding: 2px 0 !important;
    background: transparent !important;
    gap: 10px !important;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.sidebar-mag-card:hover {
    transform: none !important;
}

.sidebar-mag-card .mag-3d-cover-wrap {
    height: 195px;
    padding: 6px 0;
    margin-bottom: 4px;
}

.sidebar-mag-card .mag-3d-book {
    width: 132px;
    height: 182px;
}

.sidebar-mag-card .mag-3d-book.mag-3d-landscape {
    width: 210px !important;
    height: 148px !important;
}

.sidebar-mag-card .mag-card-heading {
    font-size: 1rem;
    line-height: 1.25;
    margin-bottom: 2px;
    word-wrap: break-word;
}

.sidebar-mag-card .mag-card-group {
    font-size: 0.74rem;
}

.sidebar-mag-card .mag-card-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.78rem;
    line-height: 1.4;
    margin-bottom: 6px;
}

.sidebar-mag-card .open-flipbook-btn {
    padding: 8px 10px;
    font-size: 0.72rem;
}

.sidebar-mag-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 12px 0 14px 0;
}

.sidebar-mag-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--border-color);
    transition: all var(--transition-fast);
    padding: 0;
}

.sidebar-mag-dot.active {
    width: 22px;
    border-radius: 10px;
    background-color: var(--secondary-color);
}

.sidebar-mag-footer-actions {
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
}

.sidebar-view-all-btn {
    width: 100%;
    justify-content: center;
    font-size: 0.78rem;
    padding: 9px 12px;
}

/* ==========================================================================
   SLIDER DE VIDEOPODCASTS EN LA SIDEBAR DE PORTADA
   ========================================================================== */
.podcasts-sidebar-widget {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-top: 3px solid #1e3a8a;
    border-radius: var(--border-radius);
    padding: 16px 14px;
    box-shadow: var(--shadow-sm);
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    box-sizing: border-box;
}

.sidebar-pod-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.pod-badge-accent {
    background-color: #1e3a8a !important;
}

.sidebar-pod-widget-title {
    margin-bottom: 0 !important;
    border-bottom: none !important;
    padding-bottom: 0 !important;
    font-size: 1.05rem;
    line-height: 1.2;
}

.sidebar-pod-nav-controls {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.sidebar-pod-counter {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    min-width: 32px;
    text-align: center;
}

.sidebar-pod-slider-viewport {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    position: relative;
    border-radius: 4px;
}

.sidebar-pod-slider-track {
    display: flex;
    width: 100%;
    transition: transform 0.48s cubic-bezier(0.25, 0.8, 0.25, 1);
    will-change: transform;
}

.sidebar-pod-slide {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    flex: 0 0 100%;
    box-sizing: border-box;
    padding: 2px;
    overflow: hidden;
}

.sidebar-pod-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.sidebar-pod-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 6px;
    overflow: hidden;
    background-color: #0b0f19;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.sidebar-pod-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease, filter 0.3s ease;
}

.sidebar-pod-thumb:hover img {
    transform: scale(1.05);
    filter: brightness(0.9);
}

.sidebar-pod-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.55) 100%);
    transition: background 0.3s ease;
}

.sidebar-pod-thumb:hover .sidebar-pod-play-overlay {
    background: radial-gradient(circle, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.7) 100%);
}

.sidebar-pod-play-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: rgba(225, 29, 72, 0.92);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(225, 29, 72, 0.45);
    transition: transform 0.25s ease, background-color 0.2s ease;
}

.sidebar-pod-thumb:hover .sidebar-pod-play-icon {
    transform: scale(1.12);
    background-color: #f43f5e;
}

.sidebar-pod-play-icon svg {
    width: 18px;
    height: 18px;
    margin-left: 2px;
    fill: currentColor;
}

.sidebar-pod-badge-top-left {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(4px);
    color: #ffffff;
    font-family: var(--font-sans);
    font-size: 0.62rem;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 4px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.sidebar-pod-badge-top-right {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(4px);
    color: #38bdf8;
    font-family: var(--font-mono, monospace);
    font-size: 0.62rem;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.sidebar-pod-info {
    display: flex;
    flex-direction: column;
}

.sidebar-pod-show {
    font-family: var(--font-sans);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #1e3a8a;
    margin-bottom: 3px;
}

.sidebar-pod-title {
    font-family: var(--font-title);
    font-size: 1rem;
    line-height: 1.25;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 3px 0;
    word-wrap: break-word;
}

.sidebar-pod-hosts {
    font-size: 0.74rem;
    color: var(--text-muted);
    font-style: italic;
    margin: 0 0 6px 0;
}

.sidebar-pod-desc {
    font-size: 0.78rem;
    line-height: 1.4;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0 0 8px 0;
}

.sidebar-pod-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.sidebar-pod-play-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%);
    color: #ffffff;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    font-family: var(--font-sans);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.sidebar-pod-play-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e3a8a 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

.pod-sidebar-edit-btn {
    padding: 7px 10px;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 4px;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.pod-sidebar-edit-btn:hover {
    background: var(--primary-color);
    color: #ffffff;
}

.pod-sidebar-del-btn {
    padding: 7px 10px;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 4px;
    border: 1px solid #dc2626;
    color: #dc2626;
    background: transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.pod-sidebar-del-btn:hover {
    background: #dc2626;
    color: #ffffff;
}

.sidebar-pod-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 12px 0 14px 0;
}

.sidebar-pod-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--border-color);
    transition: all var(--transition-fast);
    padding: 0;
    border: none;
    cursor: pointer;
}

.sidebar-pod-dot.active {
    width: 22px;
    border-radius: 10px;
    background-color: #1e3a8a;
}

.sidebar-pod-footer-actions {
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
}

.pod-view-all-btn {
    background-color: #1e3a8a !important;
}

.pod-view-all-btn:hover {
    background-color: #2563eb !important;
}

/* ==========================================================================
   EDICIÓN DE REVISTAS + ZONA DE PORTADA (ARCHIVO ADJUNTO O CTRL + V)
   ========================================================================== */
.edit-mag-btn {
    padding: 8px 12px;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-radius: 4px;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    background-color: transparent;
    transition: all var(--transition-fast);
}

.edit-mag-btn:hover {
    background-color: var(--primary-color);
    color: #ffffff;
}

.cover-paste-upload-row {
    display: flex;
    align-items: stretch;
    gap: 14px;
    flex-wrap: wrap;
}

.cover-paste-dropzone {
    flex: 1;
    min-width: 240px;
    border: 2px dashed var(--border-color);
    border-radius: 6px;
    padding: 16px;
    background-color: var(--bg-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all var(--transition-fast);
}

.cover-paste-dropzone:hover,
.cover-paste-dropzone:focus {
    border-color: var(--primary-color);
    background-color: var(--bg-crema);
    outline: none;
}

.paste-zone-instructions {
    font-size: 0.84rem;
    color: var(--text-main);
    line-height: 1.45;
}

.paste-zone-instructions kbd {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    padding: 1px 6px;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 1px 1px rgba(0,0,0,0.08);
}

.cover-paste-preview {
    position: relative;
    width: 110px;
    height: 110px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid var(--primary-color);
    flex-shrink: 0;
    background-color: #000;
}

.cover-paste-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.clear-cover-mini-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background-color: rgba(128, 12, 44, 0.92);
    color: #fff;
    font-size: 0.95rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   BANNER HERO DE AUDIOVISUAL Y RADIO (ALTO CONTRASTE)
   ========================================================================== */
.audiovisual-hero-banner {
    background: linear-gradient(135deg, #181124 0%, #29102b 50%, #0d111a 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-left: 5px solid #e11d48 !important;
    padding: 30px 32px !important;
    border-radius: var(--border-radius);
    margin-bottom: 28px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28) !important;
}

.audiovisual-hero-badge {
    background-color: #e11d48 !important;
    color: #ffffff !important;
    font-size: 0.65rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.08em !important;
    padding: 4px 10px !important;
    border-radius: 3px !important;
    display: inline-block !important;
    margin-bottom: 12px !important;
}

.audiovisual-hero-banner h2 {
    font-family: var(--font-title) !important;
    font-size: 2.25rem !important;
    font-weight: 900 !important;
    color: #ffffff !important;
    line-height: 1.15 !important;
    margin-bottom: 10px !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5) !important;
}

.audiovisual-hero-banner p {
    font-family: var(--font-body) !important;
    font-size: 0.98rem !important;
    color: #e2e8f0 !important;
    line-height: 1.55 !important;
    max-width: 850px !important;
}

.podcasts-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.pod-filter-pill {
    padding: 7px 16px;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.08);
    color: #f1f5f9;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.pod-filter-pill:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

.pod-filter-pill.active {
    background: #e11d48 !important;
    color: #ffffff !important;
    border-color: #e11d48 !important;
    box-shadow: 0 3px 12px rgba(225, 29, 72, 0.45);
}

/* ==========================================================================
   ZONA DE VIDEOPODCASTS (FORMATO VIDEO CON PORTADA Y REPRODUCTOR ESTUDIO)
   ========================================================================== */
.podcasts-studio-section {
    margin: 48px 0;
}

.podcast-studio-shell {
    background: linear-gradient(145deg, #15171e 0%, #1d1522 60%, #121318 100%);
    color: #f3f4f6;
    border-radius: 8px;
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.18);
}

.podcast-studio-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding-bottom: 20px;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.podcast-studio-brand {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.podcast-live-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #e11d48;
    box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.25);
    margin-right: 6px;
}

.podcast-studio-kicker {
    font-family: var(--font-sans);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #fb7185;
}

.podcast-studio-heading {
    font-family: var(--font-title);
    font-size: 1.85rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
}

.podcast-topbar-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.podcasts-filter-pills {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.pod-filter-pill {
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.16);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    transition: all 0.2s ease;
}

.pod-filter-pill:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

.pod-filter-pill.active {
    background: var(--secondary-color);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.35);
}

.podcast-admin-drawer {
    margin-bottom: 24px;
}

.podcast-admin-card {
    background-color: var(--bg-card);
    color: var(--text-main);
    border-radius: 6px;
    padding: 22px;
    border: 1px solid var(--border-color);
}

.podcast-studio-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 26px;
    align-items: start;
}

.podcast-player-main {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.podcast-video-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #090a0f;
    overflow: hidden;
}

.podcast-video-element {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #090a0f;
    display: block;
}

.podcast-cover-stage-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(10, 12, 18, 0.72);
    backdrop-filter: blur(8px);
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.podcast-cover-stage-overlay.video-clean-mode {
    opacity: 0;
}

.podcast-stage-bg-blur {
    position: absolute;
    inset: -20px;
    width: calc(100% + 40px);
    height: calc(100% + 40px);
    object-fit: cover;
    filter: blur(26px) brightness(0.35);
    opacity: 0.65;
    z-index: 0;
}

.podcast-stage-centerpiece {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 24px;
    max-width: 92%;
}

.podcast-stage-artwork-card {
    position: relative;
    width: 165px;
    height: 165px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.55);
    border: 2px solid rgba(255, 255, 255, 0.22);
}

.podcast-stage-artwork-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.podcast-format-pill {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(128, 12, 44, 0.92);
    color: #fff;
    font-size: 0.56rem;
    font-weight: 800;
    padding: 3px 7px;
    border-radius: 3px;
    letter-spacing: 0.08em;
}

.podcast-stage-live-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.podcast-stage-ep-badge {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: #38bdf8;
    text-transform: uppercase;
}

.podcast-stage-ep-title {
    font-family: var(--font-title);
    font-size: 1.35rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.25;
}

.podcast-stage-ep-hosts {
    font-size: 0.84rem;
    color: #cbd5e1;
}

/* Ecualizador animado en vivo */
.podcast-equalizer {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 22px;
    margin-top: 6px;
}

.podcast-equalizer span {
    width: 4px;
    height: 5px;
    border-radius: 2px;
    background: linear-gradient(180deg, #38bdf8, #e11d48);
    transition: height 0.2s ease;
}

.podcast-equalizer.active span {
    animation: podEqBounce 0.85s infinite ease-in-out alternate;
}

.podcast-equalizer.active span:nth-child(2) { animation-delay: 0.15s; }
.podcast-equalizer.active span:nth-child(3) { animation-delay: 0.3s; }
.podcast-equalizer.active span:nth-child(4) { animation-delay: 0.1s; }
.podcast-equalizer.active span:nth-child(5) { animation-delay: 0.4s; }
.podcast-equalizer.active span:nth-child(6) { animation-delay: 0.2s; }
.podcast-equalizer.active span:nth-child(7) { animation-delay: 0.35s; }
.podcast-equalizer.active span:nth-child(8) { animation-delay: 0.12s; }

@keyframes podEqBounce {
    0% { height: 4px; }
    100% { height: 22px; }
}

.podcast-visual-mode-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 4;
    background: rgba(15, 23, 42, 0.78);
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.22);
    padding: 5px 11px;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.podcast-visual-mode-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.podcast-big-play-btn {
    position: absolute;
    bottom: 16px;
    right: 16px;
    z-index: 4;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--secondary-color);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 22px rgba(128, 12, 44, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.podcast-big-play-btn:hover {
    transform: scale(1.07);
    background: #a31039;
}

.podcast-big-play-btn.is-playing {
    opacity: 0;
    pointer-events: none;
}

/* Barra de controles del reproductor */
.podcast-controls-bar {
    background: #0f1117;
    padding: 14px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.podcast-timeline-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.podcast-time-label {
    font-family: var(--font-sans);
    font-size: 0.74rem;
    font-weight: 600;
    color: #94a3b8;
    min-width: 40px;
}

.podcast-scrub-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
}

.podcast-seek-bar {
    width: 100%;
    accent-color: #e11d48;
    cursor: pointer;
    height: 5px;
}

.podcast-buttons-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.podcast-ctrl-left,
.podcast-ctrl-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.podcast-ctrl-btn {
    background: rgba(255, 255, 255, 0.07);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 5px;
    padding: 6px 11px;
    font-size: 0.74rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.podcast-ctrl-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

.podcast-ctrl-btn.primary-play {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
    padding: 7px 14px;
}

.podcast-ctrl-btn.primary-play:hover {
    background: var(--primary-hover);
}

.podcast-volume-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.podcast-volume-slider {
    width: 72px;
    accent-color: #38bdf8;
    cursor: pointer;
}

.podcast-active-meta-box {
    padding: 18px 20px;
}

.podcast-active-meta-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

.podcast-active-badges-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.podcast-active-admin-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.podcast-active-hosts-line {
    font-size: 0.82rem;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 6px;
}

.podcast-active-program {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #38bdf8;
}

.podcast-active-date {
    font-size: 0.72rem;
    color: #94a3b8;
}

.podcast-active-title {
    font-family: var(--font-title);
    font-size: 1.25rem;
    color: #ffffff;
    margin-bottom: 4px;
}

.podcast-active-desc {
    font-size: 0.88rem;
    color: #cbd5e1;
    line-height: 1.5;
}

/* Lista de episodios */
.podcast-playlist-panel {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.podcast-playlist-header {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.podcast-playlist-header h4 {
    font-family: var(--font-title);
    font-size: 1.05rem;
    color: #ffffff;
}

.podcast-count-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}

.podcast-playlist-items {
    max-height: 540px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.podcast-ep-item {
    display: flex;
    gap: 12px;
    padding: 13px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    cursor: pointer;
    transition: background 0.2s ease;
}

.podcast-ep-item:hover {
    background: rgba(255, 255, 255, 0.07);
}

.podcast-ep-item.active {
    background: rgba(0, 104, 214, 0.22);
    border-left: 3px solid #38bdf8;
}

.podcast-ep-thumb {
    position: relative;
    width: 68px;
    height: 68px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.podcast-ep-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.podcast-ep-play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.85rem;
}

.podcast-ep-duration-pill {
    position: absolute;
    bottom: 3px;
    right: 3px;
    background: rgba(0, 0, 0, 0.82);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 2px;
}

.podcast-ep-info {
    flex: 1;
    min-width: 0;
}

.podcast-ep-show {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #fb7185;
    display: block;
    margin-bottom: 2px;
}

.podcast-ep-title {
    font-family: var(--font-sans);
    font-size: 0.86rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
    margin-bottom: 3px;
}

.podcast-ep-hosts {
    font-size: 0.74rem;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.podcast-ep-admin-btns {
    display: flex;
    gap: 6px;
    margin-top: 6px;
}

.pod-edit-btn,
.pod-del-btn {
    font-size: 0.66rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 3px;
    text-transform: uppercase;
}

.pod-edit-btn {
    background: rgba(56, 189, 248, 0.18);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.4);
}

.pod-del-btn {
    background: rgba(225, 29, 72, 0.18);
    color: #fb7185;
    border: 1px solid rgba(225, 29, 72, 0.4);
}

@media (max-width: 992px) {
    .podcast-studio-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .podcast-stage-centerpiece {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    .podcast-stage-artwork-card {
        width: 110px;
        height: 110px;
    }
    .podcast-stage-ep-title {
        font-size: 1rem;
    }
}




