/* assets/css/opac_style.css */
/* ─── Unified Kemenkes Teal Design System ─── */

/* Style dasar pagination */
.pagination li a,
.pagination li span {
    color: #007d69;
    border: 1px solid #007d69;
    padding: 5px 10px;
    margin: 2px;
    text-decoration: none;
    border-radius: 4px;
    display: inline-block;
}

/* Hover effect */
.pagination li a:hover {
    background-color: #007d69;
    color: white;
}

/* Aktif / current page */
.pagination li.active span,
.pagination li.active a {
    background-color: #007d69;
    color: white;
    border-color: #007d69;
}

/* Improved Layout Styling */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
}

.catalog-section {
    padding-left: 0;
    padding-right: 15px;
}

.sidebar-section {
    padding-left: 15px;
    padding-right: 25px;
}

/* Sidebar Styling */
.sidebar-container {
    position: sticky;
    top: 20px;
    width: 100%;
}

.sidebar-card {
    border: none;
    transition: transform 0.2s ease;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border-radius: 16px;
    animation: fadeInUp 0.6s ease forwards;
}

.sidebar-card:hover {
    transform: translateY(-2px);
}

.sidebar-card .card-header {
    background: linear-gradient(135deg, #005e4f, #007d69);
    color: white;
    padding: 15px 20px;
    border-radius: 16px 16px 0 0;
}

.sidebar-card .card-header h5 {
    margin: 0;
    font-weight: 600;
}

.sidebar-card .card-body {
    padding: 20px;
}

.sidebar-card:nth-child(1) { animation-delay: 0.1s; }
.sidebar-card:nth-child(2) { animation-delay: 0.2s; }
.sidebar-card:nth-child(3) { animation-delay: 0.3s; }
.sidebar-card:nth-child(4) { animation-delay: 0.4s; }

/* Statistics Items */
.stat-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.stat-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border-radius: 50%;
    margin-right: 15px;
}

.stat-icon i {
    font-size: 20px;
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    margin: 0;
    color: #333;
}

.stat-section {
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.stat-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.stat-section h6 {
    margin-bottom: 12px;
    font-weight: 600;
}

.stat-list {
    max-height: 220px;
    overflow-y: auto;
}

.stat-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f8f9fa;
}

.stat-list-item:last-child {
    border-bottom: none;
}

.stat-name {
    flex: 1;
    font-size: 0.9rem;
    color: #555;
    text-decoration: none;
    margin-right: 10px;
}

.stat-name:hover {
    color: #007d69;
    text-decoration: underline;
}

.stat-list-item .badge {
    font-size: 0.75rem;
    min-width: 30px;
    text-align: center;
}

/* Catalog Card Styling */
.catalog-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    height: 100%;
}

.catalog-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.catalog-card .card-header {
    background-color: #007d69;
    color: white;
    padding: 12px 15px;
    border-radius: 16px 16px 0 0;
}

.catalog-card .card-body {
    padding: 15px;
}

.book-cover-container {
    position: relative;
    margin-bottom: 10px;
}

.book-cover {
    max-width: 100px;
    max-height: 150px;
    width: 100%;
    object-fit: cover;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.book-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 125, 105, 0.7);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 8px;
}

.book-cover-container:hover .book-overlay {
    opacity: 1;
    cursor: pointer;
}

/* Color variations — unified teal gradients */
.bg-gradient-primary {
    background: linear-gradient(135deg, #005e4f 0%, #007d69 100%);
}

.bg-gradient-success {
    background: linear-gradient(135deg, #005e4f 0%, #007d69 100%) !important;
}

.bg-gradient-info {
    background: linear-gradient(135deg, #007d69 0%, #00a896 100%) !important;
}

.bg-gradient-warning {
    background: linear-gradient(135deg, #007d69 0%, #00a896 100%) !important;
    color: #fff !important;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #005e4f 0%, #007d69 100%);
    color: white;
    padding: 60px 0;
}

.hero-section h1 {
    color: white !important;
}

.hero-section .lead {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Search Box Styling */
.search-box .form-control,
.search-box .form-select {
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    padding: 12px 15px;
}

.search-box .form-control:focus,
.search-box .form-select:focus {
    border-color: #007d69;
    box-shadow: 0 0 0 0.25rem rgba(0, 125, 105, 0.15);
}

.search-box .btn {
    border-radius: 10px;
    padding: 12px 20px;
    font-weight: 600;
}

.recommendation-search .card {
    border-radius: 16px;
    overflow: hidden;
}

/* Content Section */
.content-section {
    padding: 40px 0;
    background-color: #f8f9fa;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .main-container {
        max-width: 100%;
        padding: 0 15px;
    }
}

@media (max-width: 991px) {
    .sidebar-container {
        position: static;
        margin-top: 30px;
    }

    .catalog-section,
    .sidebar-section {
        padding-left: 15px;
        padding-right: 15px;
    }
}

@media (max-width: 768px) {
    .book-cover-container {
        text-align: center;
        margin-bottom: 15px;
    }

    .catalog-card .row {
        flex-direction: column;
    }

    .catalog-card .col-4,
    .catalog-card .col-8 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .book-cover {
        max-width: 120px !important;
        max-height: 180px !important;
    }

    .stat-list {
        max-height: 150px;
    }
}

/* Scrollbar styling */
.stat-list::-webkit-scrollbar { width: 6px; }
.stat-list::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 3px; }
.stat-list::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 3px; }
.stat-list::-webkit-scrollbar-thumb:hover { background: #a8a8a8; }

/* Animation for loading state */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}