/**
 * Estilos específicos para el archivo de libros
 * Buddhoom Theme - Books Archive
 */

/* ========================================
   GENERAL STYLES - LIBROS
======================================== */

.books-archive {
    min-height: 100vh;
}

.archive-hero {
    position: relative;
    overflow: hidden;
}

.archive-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../img/book-pattern.png') repeat;
    opacity: 0.1;
    z-index: 0;
}

.archive-hero .container {
    position: relative;
    z-index: 1;
}

/* ========================================
   SIDEBAR STYLES
======================================== */

.books-sidebar .card {
    border: none;
    box-shadow: 0 4px 12px rgba(156, 135, 148, 0.1);
    border-radius: 12px;
    overflow: hidden;
}

.books-sidebar .card-header {
    background: linear-gradient(135deg, var(--bg-btn-pri) 0%, var(--bg-btn-ter) 100%);
    color: white;
    border-bottom: none;
    padding: 1rem 1.25rem;
}

.books-sidebar .card-header h5,
.books-sidebar .card-header h6 {
    color: white;
    margin: 0;
    font-weight: 600;
}

.books-sidebar .form-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.books-sidebar .form-control,
.books-sidebar .form-select {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.books-sidebar .form-control:focus,
.books-sidebar .form-select:focus {
    border-color: var(--bg-btn-pri);
    box-shadow: 0 0 0 0.2rem rgba(156, 135, 148, 0.25);
}

.books-sidebar .btn-primary {
    background: linear-gradient(135deg, var(--bg-btn-pri) 0%, var(--bg-btn-ter) 100%);
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.books-sidebar .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(156, 135, 148, 0.3);
}

.books-sidebar .btn-outline-secondary {
    border: 2px solid #6c757d;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.books-sidebar .btn-outline-secondary:hover {
    background-color: #6c757d;
    border-color: #6c757d;
    transform: translateY(-2px);
}

/* Widget de disciplinas populares */
.books-sidebar .card:last-child .card-body a {
    transition: all 0.3s ease;
    border-radius: 6px;
    padding: 0.5rem;
    margin: -0.5rem;
}

.books-sidebar .card:last-child .card-body a:hover {
    background-color: rgba(156, 135, 148, 0.1);
    color: var(--bg-btn-pri) !important;
}

/* ========================================
   BOOK CARDS STYLES
======================================== */

.book-card {
    transition: all 0.3s ease;
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.book-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.book-cover-container {
    background: #e9dad6 !important;
    padding: 1.5rem !important;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.book-cover {
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    max-width: 100%;
    height: auto;
}

.book-card:hover .book-cover {
    transform: scale(1.15);
}

.placeholder-cover {
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* ========================================
   BOOK CONTENT STYLES
======================================== */

/* Badges */
.book-badges .badge {
    font-size: 0.7rem;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.book-badges .badge.bg-success {
    background-color: #28a745 !important;
}

.book-badges .badge.bg-warning {
    background-color: #ffc107 !important;
    color: #212529 !important;
}

.book-badges .badge.bg-danger {
    background-color: #dc3545 !important;
}

.book-badges .badge.bg-dark {
    background-color: #343a40 !important;
}

.book-badges .badge.bg-light {
    background-color: #f8f9fa !important;
    color: #495057 !important;
    border: 1px solid #dee2e6;
}

.book-badges .badge.bg-info {
    background-color: #17a2b8 !important;
}

/* Descripción */
.book-description {
    font-size: 0.85rem;
    line-height: 1.5;
    color: #6c757d;
}

/* Precio */
.book-price .h6 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #584A63;
}

/* ========================================
   FEATURED BADGE
======================================== */

.featured-badge {
    z-index: 10;
}

.featured-badge .badge {
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

/* ========================================
   BUTTONS STYLES
======================================== */

.book-card .card-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    background: transparent;
    padding: 1rem 1.25rem;
}

/* ========================================
   RESULTS INFO
======================================== */

.results-info {
    padding: 12px 0;
    border-bottom: 1px solid #dddddd;
    font-size: 0.9rem;
    color: #6c757d;
}

.results-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.results-count {
    font-weight: 500;
    color: #495057;
}

.results-count strong {
    color: var(--bg-btn-pri);
    font-weight: 600;
}

.results-filtered {
    font-size: 0.85rem;
    color: #6c757d;
}

.results-filtered em {
    font-style: italic;
    color: #495057;
}

.results-pagination-info {
    font-size: 0.8rem;
    color: #868e96;
}

/* ========================================
   NO RESULTS
======================================== */

.no-results {
    color: #6c757d;
}

.no-results h3 {
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 1rem;
}

.no-results i {
    margin-bottom: 2rem;
}

/* ========================================
   PAGINATION
======================================== */

.pagination {
    justify-content: center;
    margin-top: 3rem;
}

.pagination .page-link {
    color: var(--bg-btn-pri);
    border-color: #dee2e6;
    border-radius: 8px;
    margin: 0 0.2rem;
    padding: 0.75rem 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--bg-btn-pri) 0%, var(--bg-btn-ter) 100%);
    border-color: var(--bg-btn-pri);
    color: white;
    box-shadow: 0 2px 8px rgba(156, 135, 148, 0.3);
}

.pagination .page-link:hover {
    color: white;
    background: linear-gradient(135deg, var(--bg-btn-ter) 0%, var(--bg-btn-pri) 100%);
    border-color: var(--bg-btn-ter);
    transform: translateY(-2px);
}

.pagination .page-item.disabled .page-link {
    color: #6c757d;
    background-color: #f8f9fa;
    border-color: #dee2e6;
}

/* ========================================
   RESPONSIVE DESIGN
======================================== */

@media (max-width: 991.98px) {
    .books-sidebar {
        margin-bottom: 2rem;
    }
    
    .archive-hero h1 {
        font-size: 2.5rem;
    }
    
    .archive-hero .lead {
        font-size: 1.1rem;
    }
}

@media (max-width: 767.98px) {
    .archive-hero {
        padding: 3rem 0 !important;
    }
    
    .archive-hero h1 {
        font-size: 2rem;
    }
    
    .book-cover-container {
        min-height: 250px;
        padding: 1rem !important;
    }
    
    .book-card .card-title {
        font-size: 1rem;
    }
    
    .results-info {
        text-align: center;
    }
    
    .pagination .page-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 575.98px) {
    .books-sidebar .d-grid.gap-2 {
        gap: 0.5rem !important;
    }
    
    .book-badges .badge {
        font-size: 0.65rem;
        margin-bottom: 0.25rem;
    }
    
    .archive-hero .col-lg-4 {
        display: none;
    }
}

/* ========================================
   ANIMATIONS
======================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.book-card {
    animation: fadeInUp 0.6s ease forwards;
}

.book-card:nth-child(1) { animation-delay: 0.1s; }
.book-card:nth-child(2) { animation-delay: 0.2s; }
.book-card:nth-child(3) { animation-delay: 0.3s; }
.book-card:nth-child(4) { animation-delay: 0.4s; }
.book-card:nth-child(5) { animation-delay: 0.5s; }
.book-card:nth-child(6) { animation-delay: 0.6s; }

/* ========================================
   ACCESSIBILITY IMPROVEMENTS
======================================== */

.book-card:focus-within {
    outline: 2px solid var(--bg-btn-pri);
    outline-offset: 2px;
}

.books-sidebar .form-control:focus,
.books-sidebar .form-select:focus {
    outline: none;
}

.btn:focus {
    outline: 2px solid var(--bg-btn-pri);
    outline-offset: 2px;
}

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
} 