/* CSS Khusus untuk Perpustakaan DPRD */

/* Header Perpustakaan */
.perpus-header {
    background-color: #003d79;
    padding: 20px 0;
}

.perpus-header .logo-text {
    font-size: 24px;
    font-weight: bold;
    vertical-align: middle;
    margin-left: 15px;
    color: #ffffff;
}

/* Navbar Perpustakaan */
.perpus-navbar {
    background-color: #00509e;
    padding: 10px 0;
}

.perpus-navbar .navbar {
    padding: 0;
}

.perpus-navbar .nav-link {
    color: #ffffff;
    padding: 8px 15px;
    transition: background-color 0.3s;
}

.perpus-navbar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.perpus-navbar .nav-item.active .nav-link {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

/* Buku Terbaru Section */
.section-title {
    color: #003d79;
    font-weight: bold;
    margin-bottom: 30px;
    text-align: center;
}

.book-card {
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
    border: none;
    border-radius: 8px;
    overflow: hidden;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.book-card .card-img-top {
    height: 300px;
    object-fit: cover;
}

.book-card .card-body {
    padding: 15px;
    text-align: center;
}

.book-card .card-title {
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

/* Tombol Lihat Semua */
.btn-view-all {
    background-color: #28a745;
    border: none;
    padding: 8px 16px;
    font-weight: 500;
    border-radius: 4px;
    transition: background-color 0.3s;
    font-size: 14px;
}

.btn-view-all:hover {
    background-color: #218838;
}

/* Responsive button improvements */
@media (max-width: 768px) {
    .btn-view-all {
        padding: 6px 12px;
        font-size: 12px;
    }
}

@media (max-width: 576px) {
    .btn-view-all {
        padding: 5px 10px;
        font-size: 11px;
    }
}

/* Informasi Tambahan */
.info-card {
    border: none;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.info-card .card-header {
    background-color: #0275d8;
    color: white;
    font-weight: 600;
    padding: 15px;
}

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

.hours-list .list-group-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-left: none;
    border-right: none;
}

.hours-list .list-group-item:first-child {
    border-top: none;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .perpus-header .logo-text {
        font-size: 20px;
    }
    
    .book-card .card-img-top {
        height: 250px;
    }
    
    /* Touch-friendly buttons */
    .btn-3d, button, a {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Better spacing for mobile */
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    /* Improved card layout for mobile */
    .card-inner {
        margin: 0 auto;
        max-width: 100%;
    }
    
    /* Better text readability */
    h1, h2, h3, h4, h5, h6 {
        line-height: 1.2;
        margin-bottom: 0.5rem;
    }
    
    /* Improved grid spacing */
    .grid {
        gap: 1rem;
    }
    
    /* Better button spacing */
    .flex.space-x-2 > * + * {
        margin-left: 0.5rem;
    }
    
    .flex.space-x-3 > * + * {
        margin-left: 0.75rem;
    }
}

@media (max-width: 576px) {
    .perpus-header .search-box {
        margin-top: 15px;
    }
    
    .book-card .card-img-top {
        height: 200px;
    }
    
    /* Even more touch-friendly for small screens */
    .btn-3d, button, a {
        min-height: 48px;
        min-width: 48px;
        font-size: 16px;
        padding: 12px 16px;
    }
    
    /* Compact layout for very small screens */
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }
    
    /* Smaller text for better fit */
    .text-lg {
        font-size: 1rem;
    }
    
    .text-xl {
        font-size: 1.125rem;
    }
    
    /* Better image sizing */
    .product-image {
        max-width: 100%;
        height: auto;
    }
    
    /* Improved card padding */
    .card-inner {
        padding: 1rem;
    }
    
    /* Better button layout */
    .flex.space-x-2 > * + * {
        margin-left: 0.25rem;
    }
    
    /* Compact stats cards */
    .p-4 {
        padding: 0.75rem;
    }
    
    /* Better hero section */
    .hero-section {
        padding: 1rem 0;
    }
    
    .hero-section h1 {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    .hero-section p {
        font-size: 0.875rem;
        line-height: 1.4;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .book-card:hover {
        transform: none;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }
    
    /* Add active states for touch */
    .btn-3d:active, button:active, a:active {
        transform: scale(0.95);
        transition: transform 0.1s;
    }
    
    /* Better focus states for accessibility */
    .btn-3d:focus, button:focus, a:focus {
        outline: 2px solid #800020;
        outline-offset: 2px;
    }
}

/* Landscape mobile optimizations */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        padding: 0.5rem 0;
    }
    
    .hero-section h1 {
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
    }
    
    .hero-section p {
        font-size: 0.75rem;
        margin-bottom: 0.5rem;
    }
    
    /* Compact grid for landscape */
    .grid {
        gap: 0.5rem;
    }
    
    /* Smaller cards for landscape */
    .card-inner {
        padding: 0.75rem;
    }
}

/* High DPI display optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .product-image {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .bg-white {
        background-color: #1a1a1a;
        color: #ffffff;
    }
    
    .text-gray-600 {
        color: #a0a0a0;
    }
    
    .text-gray-500 {
        color: #888888;
    }
    
    .border-gray-200 {
        border-color: #333333;
    }
    
    .bg-gray-50 {
        background-color: #2a2a2a;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .card-3d {
        transform: none !important;
    }
}

/* Print styles */
@media print {
    .btn-3d, button, a {
        display: none;
    }
    
    .book-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}