/* ========================================================
   BIBLIOTECA VIRTUAL UNIVERSAL - ESTILOS PRINCIPALES
   ======================================================== */

:root {
    --gold: #b8975a;
    --gold-light: #dfc085;
    --gold-dark: #8a6c27;
    --gold-bg: rgba(184, 151, 90, 0.12);
    --gold-border: rgba(184, 151, 90, 0.3);
    --card-bg: rgba(22, 20, 18, 0.7);
    --card-border: rgba(255, 255, 255, 0.08);
    --card-hover-border: rgba(184, 151, 90, 0.45);
    --font-heading: 'Outfit', 'Inter', sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;
}

/* Abstract Subtle Glows */
.bg-glow-platform {
    position: fixed;
    top: 10%;
    left: 45%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(184, 151, 90, 0.07) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: 0;
    pointer-events: none;
}

/* Nav Bar Search Box */
.nav-search-wrapper {
    display: none; /* Mobile default */
    flex: 1;
    max-width: 420px;
    margin: 0 1rem;
    position: relative;
}
@media (min-width: 901px) {
    .nav-search-wrapper {
        display: block;
    }
}

.nav-search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50px;
    padding: 0.5rem 1rem 0.5rem 2.4rem;
    color: #fff;
    font-size: 0.88rem;
    font-family: inherit;
    outline: none;
    transition: all 0.25s ease;
}

.nav-search-input:focus {
    background: rgba(0, 0, 0, 0.8);
    border-color: var(--gold);
    box-shadow: 0 0 15px rgba(184, 151, 90, 0.25);
}

.nav-search-icon {
    position: absolute;
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gold);
    width: 16px;
    height: 16px;
    pointer-events: none;
}

/* Sidebar Styles */
.sidebar-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0.9rem;
    margin-bottom: 0.25rem;
    color: var(--ink);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
}

.sidebar-link:hover {
    background: rgba(184, 151, 90, 0.1);
    color: #fff;
    transform: translateX(3px);
}

.sidebar-link.active {
    background: linear-gradient(90deg, rgba(184, 151, 90, 0.25), rgba(184, 151, 90, 0.05));
    border-left: 3px solid var(--gold);
    color: #fff;
    font-weight: 600;
}

.sidebar-link i {
    width: 16px;
    height: 16px;
    margin-right: 0.6rem;
    color: var(--gold);
    flex-shrink: 0;
}

.cat-nav-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cat-nav-badge {
    font-size: 0.72rem;
    background: rgba(255, 255, 255, 0.12);
    color: var(--ink);
    padding: 0.15rem 0.45rem;
    border-radius: 12px;
    font-weight: 600;
    margin-left: 0.5rem;
    opacity: 0.7;
}

.sidebar-link.active .cat-nav-badge {
    background: var(--gold);
    color: #000;
    font-weight: 700;
}

/* Catálogo Header Banner */
.catalogo-header-bar {
    display: flex;
    flex-direction: column; /* Mobile default */
    align-items: flex-start; /* Mobile default */
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.2rem;
    margin-bottom: 2rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid var(--card-border);
}
@media (min-width: 901px) {
    .catalogo-header-bar {
        flex-direction: row;
        align-items: flex-end;
    }
}

.catalogo-header-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: var(--ink, #fff);
    margin: 0;
    line-height: 1.2;
}

.catalogo-header-count {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--gold);
    background: var(--gold-bg);
    border: 1px solid var(--gold-border);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    margin-top: 0.4rem;
    font-weight: 600;
}

.catalogo-filters-bar {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.custom-select-catalog {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--card-border);
    color: #fff;
    padding: 0.5rem 0.9rem;
    border-radius: 8px;
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.2s;
}

.custom-select-catalog:focus {
    border-color: var(--gold);
}

/* Grilla de Tarjetas de Libros */
.books-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Mobile default */
    gap: 0.8rem; /* Mobile default */
    margin-bottom: 3rem;
}

@media (min-width: 601px) {
    .books-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.2rem;
    }
}

@media (min-width: 901px) {
    .books-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }
}

@media (min-width: 1301px) {
    .books-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 1.8rem;
    }
}




.book-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transform-origin: center bottom;
}

.book-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(212, 175, 55, 0.15);
    border-color: rgba(212, 175, 55, 0.3);
    z-index: 2;
}

.book-cover-wrapper::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.8) 100%);
    pointer-events: none;
}

.book-cover-wrapper {
    width: 100%;
    aspect-ratio: 2/3;
    background: #111;
    overflow: hidden;
    position: relative;
}

.book-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.book-card:hover .book-cover-img {
    transform: scale(1.08) rotate(1deg);
    filter: brightness(1.1) contrast(1.1);
}

.book-card-content {
    padding: 0.8rem; /* Mobile */
    display: flex;
    flex-direction: column;
    flex: 1;
}
@media (min-width: 601px) {
    .book-card-content {
        padding: 1rem;
    }
}

.book-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    border-radius: 16px 0 0 16px;
    background: transparent;
    transition: background 0.3s ease;
}

.book-card:hover {
    transform: translateY(-5px);
    border-color: var(--card-hover-border);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(184, 151, 90, 0.12);
}

.book-card:hover::before {
    background: var(--gold);
}

.book-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.book-cat-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--gold);
    background: var(--gold-bg);
    border: 1px solid var(--gold-border);
    padding: 0.15rem 0.45rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    max-width: 110px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
}

/* Silicon Valley Modern Pill Tag */
.modern-pill-tag {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(20, 20, 25, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #e0e0e0;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255,255,255,0.1);
    text-transform: none; /* Look more modern/casual */
    transition: all 0.3s ease;
    max-width: calc(100% - 24px); /* Full width minus margins */
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    overflow: hidden;
}

.modern-pill-tag span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.book-cover-wrapper:hover .modern-pill-tag {
    background: rgba(30, 30, 35, 0.85);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255,255,255,0.2);
}

.book-fav-btn {
    background: transparent;
    border: none;
    color: var(--muted, #666);
    cursor: pointer;
    padding: 0.2rem;
    transition: transform 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.book-fav-btn:hover {
    transform: scale(1.25);
    color: #f59e0b;
}

.book-fav-btn.active {
    color: #f59e0b;
}

.book-card-body {
    cursor: pointer;
    flex: 1;
    margin-bottom: 1.2rem;
}

.book-card-title {
    font-family: var(--font-serif);
    font-size: 0.8rem; /* Mobile */
    font-weight: 600;
    color: var(--ink, #fff);
    line-height: 1.35;
    margin-bottom: 0.45rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
@media (min-width: 401px) {
    .book-card-title {
        font-size: 0.9rem;
    }
}
@media (min-width: 601px) {
    .book-card-title {
        font-size: 1.18rem;
    }
}

.book-card-author {
    font-size: 0.85rem;
    color: var(--ink);
    font-weight: 600;
    opacity: 0.7;
}

.book-card-actions {
    display: flex;
    flex-direction: column; /* Mobile */
    gap: 0.4rem; /* Mobile */
    margin-top: auto;
}
@media (min-width: 601px) {
    .book-card-actions {
        flex-direction: row;
        gap: 0.6rem;
    }
}

.btn-read-book {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: #000;
    font-weight: 700;
    font-size: 0.7rem; /* Mobile */
    padding: 0.4rem; /* Mobile */
    min-height: 44px; /* Touch target */
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}
@media (min-width: 401px) {
    .btn-read-book {
        font-size: 0.75rem;
        padding: 0.4rem 0.5rem;
    }
}
@media (min-width: 601px) {
    .btn-read-book {
        font-size: 0.82rem;
        padding: 0.55rem 0.8rem;
    }
}

.btn-read-book:hover {
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(184, 151, 90, 0.35);
}

.btn-open-pdf {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    color: var(--ink, #fff);
    font-size: 0.7rem; /* Mobile */
    padding: 0.4rem; /* Mobile */
    min-height: 44px; /* Touch target */
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}
@media (min-width: 401px) {
    .btn-open-pdf {
        font-size: 0.75rem;
        padding: 0.4rem 0.5rem;
    }
}
@media (min-width: 601px) {
    .btn-open-pdf {
        font-size: 0.82rem;
        padding: 0.55rem 0.8rem;
    }
}

.btn-open-pdf:hover {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(184, 151, 90, 0.1);
}

/* Paginación */
.pagination-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.btn-page, .btn-page-num {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    color: var(--ink, #fff);
    font-size: 0.85rem;
    padding: 0.5rem 0.85rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.btn-page:hover:not(:disabled), .btn-page-num:hover {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(184, 151, 90, 0.1);
}

.btn-page-num.active {
    background: var(--gold);
    border-color: var(--gold);
    color: #000;
    font-weight: 700;
}

.btn-page:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-dots {
    color: var(--muted, #666);
    padding: 0 0.4rem;
}

/* Empty State */
.empty-state-catalogo {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 1rem;
    background: var(--card-bg);
    border: 1px dashed var(--card-border);
    border-radius: 16px;
    color: var(--muted, #aaa);
}

.empty-state-catalogo h3 {
    color: #fff;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

/* ========================================================
   VISTA LECTOR INTERACTIVO DE LIBRO
   ======================================================== */
.lector-container {
    display: none;
}

.lector-container.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.lector-top-header {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px; /* Mobile */
    padding: 1rem; /* Mobile */
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column; /* Mobile */
    align-items: flex-start; /* Mobile */
    gap: 1rem;
    backdrop-filter: blur(12px);
}
@media (min-width: 601px) {
    .lector-top-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        padding: 1.5rem 1.8rem;
        border-radius: 16px;
    }
}

.lector-btn-volver {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: 1px solid var(--card-border);
    color: var(--gold);
    padding: 0.4rem 0.8rem; /* Mobile */
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 44px; /* Touch target */
}
@media (min-width: 601px) {
    .lector-btn-volver {
        padding: 0.5rem 1rem;
    }
}
.lector-btn-volver:hover {
    background: var(--gold-bg);
    border-color: var(--gold);
    transform: translateX(-2px);
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: transparent;
    border: 1px solid var(--card-border);
    color: var(--ink, #fff);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.icon-btn:hover {
    background: var(--gold-bg);
    border-color: var(--gold);
    color: var(--gold);
}

.icon-btn.active-fav {
    background: rgba(245, 158, 11, 0.1);
    border-color: #f59e0b;
    color: #f59e0b;
}

.lector-actions-wrapper {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(22, 20, 18, 0.95);
    backdrop-filter: blur(15px);
    border-top: 1px solid var(--card-border);
    display: flex;
    justify-content: space-around;
    padding: 0.8rem 0.5rem;
    z-index: 1000;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.5);
}
@media (min-width: 601px) {
    .lector-actions-wrapper {
        position: static;
        width: auto;
        background: transparent;
        backdrop-filter: none;
        border-top: none;
        display: flex;
        justify-content: flex-start;
        padding: 0;
        box-shadow: none;
        gap: 0.8rem;
    }
}

.lector-book-info {
    flex: 1;
    min-width: 250px;
}

.lector-book-info h1 {
    font-family: var(--font-serif);
    font-size: 1.25rem; /* Mobile */
    font-weight: 700;
    color: var(--ink, #fff);
    margin: 0.2rem 0 0.3rem 0; /* Mobile */
    line-height: 1.25;
}
@media (min-width: 601px) {
    .lector-book-info h1 {
        font-size: 1.8rem;
        margin: 0.3rem 0;
    }
}

.lector-book-info p {
    color: var(--gold);
    font-size: 0.95rem;
    margin: 0;
}

.lector-pdf-frame-wrapper {
    background: #000;
    border: 1px solid var(--card-border);
    border-radius: 8px; /* Mobile */
    overflow: hidden;
    height: 75vh; /* Mobile */
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    margin-bottom: 5rem; /* Space for mobile bottom bar */
}
@media (min-width: 601px) {
    .lector-pdf-frame-wrapper {
        border-radius: 16px;
        height: 520px;
        margin-bottom: 2rem;
    }
}
@media (min-width: 901px) {
    .lector-pdf-frame-wrapper {
        height: 780px;
    }
}

.lector-pdf-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #1e1e1e;
}

/* Panel de Notas / Tu Espejo */
.lector-companion-grid {
    display: grid;
    grid-template-columns: 1fr; /* Mobile */
    gap: 1.5rem;
    margin-bottom: 3rem;
}
@media (min-width: 901px) {
    .lector-companion-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.lector-companion-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1.6rem;
    backdrop-filter: blur(12px);
}

.lector-companion-card h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lector-companion-card p.desc {
    font-size: 0.85rem;
    color: var(--ink);
    opacity: 0.65;
    margin-bottom: 1rem;
}

.lector-textarea-notas {
    width: 100%;
    min-height: 160px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 1rem;
    color: #fff;
    font-family: var(--font-serif);
    font-size: 1rem;
    line-height: 1.6;
    outline: none;
    resize: vertical;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.lector-textarea-notas:focus {
    border-color: var(--gold);
}

.ai-prompt-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(184, 151, 90, 0.12);
    border: 1px solid var(--gold-border);
    color: var(--ink);
    font-weight: 600;
    padding: 0.45rem 0.8rem;
    border-radius: 20px;
    font-size: 0.82rem;
    cursor: pointer;
    margin: 0.3rem 0.3rem 0.3rem 0;
    transition: all 0.2s;
}

.ai-prompt-chip:hover {
    background: var(--gold);
    color: #000;
    font-weight: 600;
}



/* Nuevos Estilos Profesionales para Tarjeta de Libro */
.book-card-year {
    font-size: 0.7rem;
    color: var(--gold);
    margin-bottom: 0.4rem;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    opacity: 0.8;
}

.book-card-author-wrapper {
    margin-top: 0.8rem;
    padding-top: 0.6rem;
    border-top: 1px dashed rgba(255,255,255,0.1);
}

.author-label {
    display: block;
    font-size: 0.65rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.2rem;
}

.book-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.2rem;
}




/* Hero Slider */
.hero-slider {
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    border-radius: 0;
    margin-bottom: 3rem;
    overflow: hidden;
    height: 480px;
    box-shadow: none;
}

.hero-slide {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    padding: 3.5rem 4rem;
    box-sizing: border-box;
    color: white;
    opacity: 0;
    transition: opacity 0.9s ease-in-out, transform 0.9s ease-in-out;
    transform: scale(1.03);
    display: flex;
    align-items: center;
    z-index: 1;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1);
    z-index: 2;
}

/* Themes for slides - vivid images with dark overlay on left for text readability */
.slide-theme-gold {
    background:
        linear-gradient(to right, rgba(10, 5, 40, 0.92) 0%, rgba(10, 5, 40, 0.75) 45%, rgba(10, 5, 40, 0.1) 100%),
        url('../img/slide_crecimiento.webp') center/cover no-repeat;
}
.slide-theme-blue {
    background:
        linear-gradient(to right, rgba(5, 15, 35, 0.92) 0%, rgba(5, 15, 35, 0.75) 45%, rgba(5, 15, 35, 0.1) 100%);
    /* image loaded lazily via JS */
}
.slide-theme-purple {
    background:
        linear-gradient(to right, rgba(5, 25, 12, 0.92) 0%, rgba(5, 25, 12, 0.75) 45%, rgba(5, 25, 12, 0.1) 100%);
    /* image loaded lazily via JS */
}
.slide-theme-green {
    background:
        linear-gradient(to right, rgba(30, 5, 5, 0.92) 0%, rgba(30, 5, 5, 0.75) 45%, rgba(30, 5, 5, 0.1) 100%);
    /* image loaded lazily via JS */
}
/* When lazy image is loaded */
.slide-theme-blue.bg-loaded {
    background:
        linear-gradient(to right, rgba(5, 15, 35, 0.92) 0%, rgba(5, 15, 35, 0.75) 45%, rgba(5, 15, 35, 0.1) 100%),
        url('../img/slide_negocios.jpg') center/cover no-repeat;
}
.slide-theme-purple.bg-loaded {
    background:
        linear-gradient(to right, rgba(5, 25, 12, 0.92) 0%, rgba(5, 25, 12, 0.75) 45%, rgba(5, 25, 12, 0.1) 100%),
        url('../img/slide_ficcion.jpg') center/cover no-repeat;
}
.slide-theme-green.bg-loaded {
    background:
        linear-gradient(to right, rgba(30, 5, 5, 0.92) 0%, rgba(30, 5, 5, 0.75) 45%, rgba(30, 5, 5, 0.1) 100%),
        url('../img/slide_comunidad.jpg') center/cover no-repeat;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 700px;
    width: 100%;
}

.hero-content h2 {
    font-size: 3.8rem;
    font-weight: 800;
    margin-bottom: 1rem;
    font-family: var(--font-serif);
    line-height: 1.05;
    color: #ffffff;
    letter-spacing: -1px;
    text-shadow: 0 3px 20px rgba(0, 0, 0, 0.6);
    word-wrap: break-word;
}

.hero-content p {
    font-size: 1.15rem;
    margin-bottom: 2.2rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
    max-width: 520px;
    font-family: var(--font-heading);
}

.hero-btn {
    background: #ffffff;
    color: #0f0f0f;
    border: 2px solid #ffffff;
    padding: 0.85rem 2.2rem;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 0.85rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.hero-btn:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.35);
}

.hero-slider-dots {
    position: absolute;
    bottom: 1.5rem;
    left: 4rem;
    z-index: 10;
    display: flex;
    gap: 0.6rem;
    align-items: center;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: background 0.3s, transform 0.3s, width 0.3s;
    border: 1px solid rgba(255,255,255,0.5);
}

.hero-dot.active {
    background: #ffffff;
    width: 28px;
    border-radius: 5px;
    transform: none;
}



/* Categories Carousel - Floating Apple Style Pills */
.categories-carousel-wrapper {
    position: sticky;
    top: 62px;
    z-index: 90;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    background: var(--paper, #121212);
    padding: 0.85rem 1rem;
    margin-top: 0;
    border-bottom: 1px solid var(--card-border, rgba(255,255,255,0.05));
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}



.categories-carousel {
    display: flex;
    overflow-x: auto;
    gap: 0.5rem;
    padding: 0 0.75rem;
    scroll-behavior: smooth;
    scrollbar-width: none;
    flex: 1;
    align-items: center;
}

.categories-carousel::-webkit-scrollbar {
    display: none;
}

/* Flechas flotantes de categorías */
.cat-nav-arrow {
    background: transparent;
    border: none;
    color: var(--ink);
    opacity: 0.7;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    transition: all 0.2s;
    z-index: 10;
}

.cat-nav-arrow:hover {
    opacity: 1;
    color: var(--gold);
    transform: scale(1.1);
}

/* Apple-style pill base */
.category-pill {
    background: rgba(255,255,255,0.07);
    color: var(--ink);
    border: 1px solid rgba(255,255,255,0.12);
    padding: 0.45rem 1.1rem;
    border-radius: 999px;
    white-space: nowrap;
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
    flex-shrink: 0;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.category-pill:hover {
    background: rgba(255,255,255,0.14);
    border-color: rgba(255,255,255,0.25);
    transform: translateY(-1px) scale(1.03);
}

/* Colorful active states — cada categoría recibe su propio color */
.category-pill.active {
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    transform: translateY(-1px) scale(1.05);
    font-weight: 700;
}

/* Color palette rotated via nth-child */
.category-pill.active:nth-child(1)  { background: linear-gradient(135deg, #6c5ce7, #a855f7); }
.category-pill.active:nth-child(2)  { background: linear-gradient(135deg, #e74c3c, #fd79a8); }
.category-pill.active:nth-child(3)  { background: linear-gradient(135deg, #0984e3, #00cec9); }
.category-pill.active:nth-child(4)  { background: linear-gradient(135deg, #00b894, #55efc4); }
.category-pill.active:nth-child(5)  { background: linear-gradient(135deg, #e17055, #fdcb6e); }
.category-pill.active:nth-child(6)  { background: linear-gradient(135deg, #6c5ce7, #fd79a8); }
.category-pill.active:nth-child(7)  { background: linear-gradient(135deg, #0984e3, #6c5ce7); }
.category-pill.active:nth-child(8)  { background: linear-gradient(135deg, #00b894, #0984e3); }
.category-pill.active:nth-child(9)  { background: linear-gradient(135deg, #e74c3c, #e17055); }
.category-pill.active:nth-child(10) { background: linear-gradient(135deg, #a855f7, #ec4899); }
.category-pill.active:nth-child(11) { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.category-pill.active:nth-child(12) { background: linear-gradient(135deg, #10b981, #3b82f6); }
.category-pill.active:nth-child(13) { background: linear-gradient(135deg, #8b5cf6, #06b6d4); }
.category-pill.active:nth-child(14) { background: linear-gradient(135deg, #f43f5e, #f97316); }
.category-pill.active:nth-child(15) { background: linear-gradient(135deg, #14b8a6, #8b5cf6); }
.category-pill.active:nth-child(16) { background: linear-gradient(135deg, #6366f1, #a855f7); }
.category-pill.active:nth-child(17) { background: linear-gradient(135deg, #0ea5e9, #22c55e); }
.category-pill.active:nth-child(18) { background: linear-gradient(135deg, #e74c3c, #6c5ce7); }
.category-pill.active:nth-child(19) { background: linear-gradient(135deg, #f59e0b, #10b981); }
.category-pill.active:nth-child(20) { background: linear-gradient(135deg, #ec4899, #8b5cf6); }
.category-pill.active:nth-child(21) { background: linear-gradient(135deg, #3b82f6, #a855f7); }
.category-pill.active:nth-child(22) { background: linear-gradient(135deg, #00b894, #e74c3c); }
.category-pill.active:nth-child(23) { background: linear-gradient(135deg, #6c5ce7, #0984e3); }
.category-pill.active:nth-child(n+24) { background: linear-gradient(135deg, #b8975a, #dfc085); }

.carousel-arrow {
    background: white;
    border: 1px solid var(--card-border);
    color: var(--ink);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: absolute;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.carousel-arrow.left { left: -15px; }
.carousel-arrow.right { right: -15px; }



/* Books Carousel */
.carousel-section {
    margin-bottom: 3rem;
}

/* ========================================================
   Carruseles Estilo Netflix
   ======================================================== */

.carousel-section {
    margin-bottom: 3.5rem;
    position: relative;
}

.carousel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 1rem;
    padding-right: 20px;
}

.carousel-section-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--ink);
    margin: 0;
    display: inline-block;
    position: relative;
}

.carousel-section-title::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--gold);
    border-radius: 2px;
}

.btn-ver-todo {
    background: transparent;
    border: none;
    color: var(--gold);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.2s;
    padding: 5px 10px;
    border-radius: 20px;
}

.btn-ver-todo:hover {
    background: rgba(212, 175, 55, 0.1);
    transform: translateX(3px);
}

.books-carousel-wrapper {
    position: relative;
    width: 100%;
}

.books-carousel {
    display: flex;
    overflow-x: auto;
    gap: 1.5rem;
    padding: 1rem 0 2rem 0;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Hide standard scrollbar Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    scroll-snap-type: x mandatory;
}

.books-carousel::-webkit-scrollbar {
    display: none; /* Hide scrollbar Chrome/Safari */
}

.books-carousel .book-card {
    flex: 0 0 calc(20% - 1.2rem); /* 5 cards per view minus gap */
    min-width: 200px;
    scroll-snap-align: start;
}

/* Flechas de Navegación del Carrusel */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 80px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    transition: all 0.2s;
    opacity: 0; /* Hidden by default until hover */
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.books-carousel-wrapper:hover .carousel-arrow {
    opacity: 1;
}

.carousel-arrow:hover {
    background: rgba(212, 175, 55, 0.8);
    color: #000;
    transform: translateY(-50%) scale(1.05);
}

.carousel-arrow.left-arrow {
    left: -20px;
}

.carousel-arrow.right-arrow {
    right: -20px;
}




/* Expand catalog max-width */
.main-content { max-width: 1440px !important; padding: 2rem 1rem !important; margin: 0 auto !important; width: 100% !important; }
.lector-container { max-width: 900px; margin: 0 auto; }

/* ========================================================
   VISTA SHOWCASE AUTOR (Experiencia Inmersiva)
   ======================================================== */
.author-showcase-container {
    position: relative;
    width: 100%;
    min-height: 80vh;
    border-radius: 24px;
    overflow: hidden;
    background: #000;
    color: #fff;
    padding: 4rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    margin-top: 1rem;
}

.author-showcase-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 0%, rgba(90, 40, 150, 0.3) 0%, transparent 60%),
                radial-gradient(circle at 100% 100%, rgba(200, 150, 50, 0.2) 0%, transparent 50%),
                #050508;
    z-index: 1;
    pointer-events: none;
}

/* Partículas/Glow sutil animado */
.author-showcase-bg::after {
    content: '';
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><filter id="noiseFilter"><feTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23noiseFilter)" opacity="0.03"/></svg>');
    animation: drift 60s linear infinite;
    pointer-events: none;
}
@keyframes drift { 0% { transform: translate(0,0); } 100% { transform: translate(5%, 5%); } }

.author-showcase-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.showcase-header {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 700px;
}

.showcase-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 215, 0, 0.1);
    color: #ffd700;
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 0 20px rgba(255,215,0,0.1);
}

.showcase-title {
    font-family: 'Cinzel', serif;
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(180deg, #fff 0%, #b0b0b0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 30px rgba(0,0,0,0.5);
    line-height: 1.1;
}

.showcase-subtitle {
    font-size: 1.2rem;
    color: #a0a0a0;
    font-weight: 300;
    line-height: 1.6;
    font-style: italic;
}

.showcase-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    justify-content: center;
    perspective: 1000px;
    width: 100%;
}

.showcase-book-card {
    position: relative;
    width: 280px;
    height: 420px;
    transform-style: preserve-3d;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.5s ease;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.05);
}

.showcase-book-card:hover {
    transform: translateY(-15px) rotateY(5deg) rotateX(5deg);
    box-shadow: 0 30px 60px rgba(0,0,0,0.8), 0 0 30px rgba(138, 79, 255, 0.4), 0 0 0 1px rgba(255,255,255,0.2);
}

.showcase-book-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.showcase-book-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.2) 50%, transparent 100%);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.showcase-book-card:hover .showcase-book-overlay {
    opacity: 1;
}

.showcase-book-title {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.showcase-book-card:hover .showcase-book-title {
    transform: translateY(0);
}

.showcase-book-btn {
    align-self: flex-start;
    margin-top: 1rem;
    padding: 0.6rem 1.5rem;
    background: linear-gradient(135deg, #d4af37, #b8860b);
    color: #000;
    border: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transform: translateY(20px);
    transition: transform 0.4s ease, filter 0.2s;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.showcase-book-btn:hover {
    filter: brightness(1.1);
}

.showcase-book-card:hover .showcase-book-btn {
    transform: translateY(0);
}

/* Glowing reflection on hover */
.showcase-book-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.showcase-book-card:hover::after {
    opacity: 1;
}

@media (max-width: 768px) {
    .showcase-title { font-size: 2.5rem; }
    .author-showcase-container { padding: 3rem 1rem; }
    .showcase-book-card { width: 240px; height: 360px; }
}

