/* =====================================================
   BERITA STYLE - Detik.com Inspired Design
   MTs Darul Ulum School Management System
   ===================================================== */

/* =====================================================
   1. CSS VARIABLES & ROOT
   ===================================================== */
:root {
    /* Primary Colors */
    --primary-color: #1e3a5f;
    --primary-dark: #0d2137;
    --primary-light: #2c5282;
    
    /* Accent Colors */
    --accent-color: #e53935;
    --accent-hover: #c62828;
    --accent-light: #ff6659;
    
    /* Secondary Colors */
    --secondary-color: #3182ce;
    --secondary-dark: #2c5aa0;
    --secondary-light: #63b3ed;
    
    /* Neutral Colors */
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --text-light: #a0aec0;
    
    /* Background Colors */
    --bg-white: #ffffff;
    --bg-light: #f7fafc;
    --bg-gray: #edf2f7;
    --bg-dark: #1a202c;
    
    /* Border Colors */
    --border-light: #e2e8f0;
    --border-medium: #cbd5e0;
    
    /* Shadow */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.15);
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    /* Font Families */
    --font-primary: 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Roboto', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* =====================================================
   2. BASE STYLES & RESET
   ===================================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a:hover {
    color: var(--accent-color);
}

img {
    max-width: 100%;
    height: auto;
}

/* =====================================================
   3. HEADER STYLES
   ===================================================== */
.detik-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.detik-logo {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--bg-white);
    text-decoration: none;
    display: flex;
    align-items: center;
    letter-spacing: -0.5px;
    transition: transform var(--transition-fast);
}

.detik-logo:hover {
    color: var(--bg-white);
    transform: scale(1.02);
}

.detik-logo i {
    color: var(--accent-color);
}

.detik-logo span {
    color: var(--accent-color);
    margin-left: 2px;
}

/* Navigation */
.detik-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detik-nav-link {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    position: relative;
}

.detik-nav-link:hover {
    color: var(--bg-white);
    background: rgba(255, 255, 255, 0.1);
}

.detik-nav-link.active {
    color: var(--bg-white);
    background: var(--accent-color);
}

.detik-nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid var(--accent-color);
}

/* =====================================================
   4. BREAKING NEWS BAR
   ===================================================== */
.breaking-news {
    background: linear-gradient(90deg, var(--accent-color) 0%, var(--accent-hover) 100%);
    padding: 0.6rem 0;
    overflow: hidden;
}

.breaking-label {
    background: var(--bg-white);
    color: var(--accent-color);
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: pulse 2s infinite;
    white-space: nowrap;
    flex-shrink: 0;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.breaking-marquee {
    overflow: hidden;
    white-space: nowrap;
    margin-left: 1rem;
}

.breaking-content {
    display: inline-block;
    animation: marquee 25s linear infinite;
    padding-left: 100%;
}

.breaking-content a {
    color: var(--bg-white) !important;
    font-size: 0.9rem;
    font-weight: 500;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* =====================================================
   5. SEARCH BOX
   ===================================================== */
.search-box {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 0.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
}

.search-box form {
    display: flex;
    gap: 0.5rem;
}

.search-input {
    flex: 1;
    border: none;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    background: var(--bg-gray);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.search-input:focus {
    outline: none;
    background: var(--bg-white);
    box-shadow: inset 0 0 0 2px var(--secondary-color);
}

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

.search-btn {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
    color: var(--bg-white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(229, 57, 53, 0.4);
}

.search-btn:active {
    transform: translateY(0);
}

/* =====================================================
   6. CATEGORY FILTER
   ===================================================== */
.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.category-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: var(--bg-white);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.category-btn:hover {
    background: var(--primary-color);
    color: var(--bg-white);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.category-btn.active {
    background: var(--accent-color);
    color: var(--bg-white);
    border-color: var(--accent-color);
}

.category-btn .badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
}

/* =====================================================
   7. HERO SECTION
   ===================================================== */
.hero-section {
    margin-bottom: 2rem;
}

.hero-main {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.hero-main a {
    display: block;
}

.hero-image {
    width: 100%;
    height: 450px;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.hero-main:hover .hero-image {
    transform: scale(1.05);
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3rem 2rem 2rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    color: var(--bg-white);
}

.hero-category {
    display: inline-block;
    background: var(--accent-color);
    color: var(--bg-white);
    padding: 0.35rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--bg-white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-meta {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
}

.hero-meta i {
    margin-right: 0.25rem;
}

/* =====================================================
   8. NEWS GRID
   ===================================================== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.news-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: all var(--transition-normal);
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: transparent;
}

.news-card.large {
    grid-column: span 2;
}

.news-card.large .news-image img {
    height: 280px;
}

.news-card.large .news-title {
    font-size: 1.25rem;
}

.news-card a {
    display: block;
    color: inherit;
}

.news-image {
    position: relative;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.news-card:hover .news-image img {
    transform: scale(1.1);
}

.news-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--accent-color);
    color: var(--bg-white);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-content {
    padding: 1.25rem;
}

.news-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color var(--transition-fast);
}

.news-card:hover .news-title {
    color: var(--accent-color);
}

.news-excerpt {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.news-views {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* =====================================================
   9. PAGINATION
   ===================================================== */
.detik-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.detik-pagination .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    background: var(--bg-white);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.detik-pagination .page-link:hover {
    background: var(--primary-color);
    color: var(--bg-white);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.detik-pagination .page-link.active {
    background: var(--accent-color);
    color: var(--bg-white);
    border-color: var(--accent-color);
    box-shadow: 0 4px 12px rgba(229, 57, 53, 0.3);
}

/* =====================================================
   10. SIDEBAR STYLES
   ===================================================== */
.sidebar-section {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.sidebar-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--accent-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-title i {
    color: var(--accent-color);
}

/* Trending List */
.trending-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.trending-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-light);
    transition: all var(--transition-fast);
}

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

.trending-item:first-child {
    padding-top: 0;
}

.trending-item:hover {
    background: var(--bg-light);
    margin: 0 -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
    border-radius: var(--radius-md);
}

.trending-number {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-gray);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
}

.trending-number.top {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
    color: var(--bg-white);
}

.trending-content {
    flex: 1;
    min-width: 0;
}

.trending-content h4 {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 0.35rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.trending-content h4 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.trending-content h4 a:hover {
    color: var(--accent-color);
}

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

.trending-meta i {
    margin-right: 0.2rem;
}

/* Tags Cloud */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-item {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.8rem;
    background: var(--bg-gray);
    color: var(--text-secondary);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.tag-item:hover {
    background: var(--primary-color);
    color: var(--bg-white);
    transform: translateY(-2px);
}

.tag-item .badge {
    font-size: 0.65rem;
    padding: 0.15rem 0.4rem;
}

/* Statistics Card */
.sidebar-section .card {
    border: none;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-gray) 100%);
    border-radius: var(--radius-md);
}

.sidebar-section .card h4 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.sidebar-section .card small {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* =====================================================
   11. FOOTER STYLES
   ===================================================== */
.detik-footer {
    background: linear-gradient(135deg, var(--bg-dark) 0%, #2d3748 100%);
    color: rgba(255, 255, 255, 0.8);
    padding: 3rem 0 0;
    margin-top: 3rem;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--bg-white);
    margin-bottom: 1rem;
}

.detik-footer p {
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.social-icons {
    display: flex;
    gap: 0.75rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    color: var(--bg-white);
    border-radius: 50%;
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.social-icon:hover {
    background: var(--accent-color);
    color: var(--bg-white);
    transform: translateY(-3px);
}

.footer-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--bg-white);
    margin-bottom: 1.25rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--accent-color);
    border-radius: 2px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all var(--transition-fast);
    display: inline-block;
}

.footer-links a:hover {
    color: var(--bg-white);
    transform: translateX(5px);
}

.footer-links i {
    color: var(--accent-color);
    width: 20px;
}

.footer-bottom {
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

/* =====================================================
   12. SCROLL TO TOP BUTTON
   ===================================================== */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
    color: var(--bg-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-normal);
    z-index: 999;
    text-decoration: none;
}

.scroll-top:hover {
    color: var(--bg-white);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(229, 57, 53, 0.4);
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* =====================================================
   DETAIL PAGE STYLES - Additional CSS for detail.php
   Tambahkan ke berita-style.css
   ===================================================== */

/* =====================================================
   1. BREADCRUMB
   ===================================================== */
.breadcrumb {
    background: transparent;
    padding: 1rem 0;
    margin-bottom: 0;
    font-size: 0.85rem;
}

.breadcrumb-item a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.breadcrumb-item a:hover {
    color: var(--accent-color);
}

.breadcrumb-item.active {
    color: var(--text-secondary);
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: var(--text-light);
    font-weight: 600;
}

/* =====================================================
   2. ARTICLE HEADER
   ===================================================== */
.article-header {
    margin-bottom: 1.5rem;
}

.article-category {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
    color: var(--bg-white);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.article-title {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.3;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 1.25rem;
}

.article-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.article-meta-item i {
    color: var(--accent-color);
    font-size: 0.85rem;
}

/* =====================================================
   3. AUTHOR INFO
   ===================================================== */
.author-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--accent-color);
}

.author-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--bg-white);
    box-shadow: var(--shadow-md);
}

.author-details h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
}

.author-details p {
    font-size: 0.85rem;
}

/* =====================================================
   4. ARTICLE HERO IMAGE
   ===================================================== */
.article-hero-image {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
}

/* =====================================================
   5. ARTICLE CONTENT
   ===================================================== */
.article-content {
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--text-primary);
    margin-bottom: 2rem;
    text-align: justify;
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
    hyphens: auto; /* Memotong kata panjang agar spacing lebih rapi */
    word-spacing: -0.5px; /* Mengurangi jarak antar kata yang terlalu lebar */
}

.article-content p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

.article-content h2,
.article-content h3,
.article-content h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-content h2 {
    font-size: 1.5rem;
}

.article-content h3 {
    font-size: 1.25rem;
}

.article-content h4 {
    font-size: 1.1rem;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
}

.article-content blockquote {
    border-left: 4px solid var(--accent-color);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: var(--bg-light);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    color: var(--text-secondary);
}

.article-content ul,
.article-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content a {
    color: var(--secondary-color);
    text-decoration: underline;
    text-decoration-color: rgba(49, 130, 206, 0.3);
    transition: all var(--transition-fast);
}

.article-content a:hover {
    color: var(--accent-color);
    text-decoration-color: var(--accent-color);
}

.article-content code {
    background: var(--bg-gray);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.9em;
    color: var(--accent-hover);
}

.article-content pre {
    background: var(--bg-dark);
    color: var(--bg-light);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: 1.5rem 0;
}

.article-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.article-content th,
.article-content td {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-light);
    text-align: left;
}

.article-content th {
    background: var(--bg-light);
    font-weight: 600;
}

.article-content tr:nth-child(even) {
    background: var(--bg-light);
}

/* =====================================================
   6. TAGS SECTION
   ===================================================== */
.tags-section {
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 1.5rem;
}

.tags-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tags-title i {
    color: var(--accent-color);
}

/* =====================================================
   7. SHARE SECTION
   ===================================================== */
.share-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
}

.share-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.share-buttons {
    display: flex;
    gap: 0.5rem;
}

.share-btn {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--bg-white);
    font-size: 1rem;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.share-btn:hover {
    color: var(--bg-white);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.share-fb {
    background: #1877f2;
}

.share-fb:hover {
    background: #0d65d9;
}

.share-twitter {
    background: #1da1f2;
}

.share-twitter:hover {
    background: #0c8de4;
}

.share-whatsapp {
    background: #25d366;
}

.share-whatsapp:hover {
    background: #1da851;
}

.share-telegram {
    background: #0088cc;
}

.share-telegram:hover {
    background: #006ba1;
}

/* =====================================================
   8. NAVIGATION BUTTONS (Prev/Next)
   ===================================================== */
.navigation-buttons {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 3rem;
}

.nav-btn {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    text-decoration: none;
    transition: all var(--transition-fast);
    max-width: 48%;
}

.nav-btn:hover {
    background: var(--primary-color);
    color: var(--bg-white);
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.nav-btn:hover small {
    color: rgba(255, 255, 255, 0.8);
}

.nav-btn i {
    font-size: 1.25rem;
    color: var(--accent-color);
    transition: color var(--transition-fast);
}

.nav-btn:hover i {
    color: var(--bg-white);
}

.nav-btn small {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    transition: color var(--transition-fast);
}

.nav-btn .fw-bold {
    font-size: 0.9rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nav-btn.nav-next {
    text-align: right;
    justify-content: flex-end;
}

/* =====================================================
   9. RELATED SECTION
   ===================================================== */
.related-section {
    padding-top: 2rem;
    border-top: 3px solid var(--accent-color);
}

.related-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.related-title::before {
    content: '';
    width: 4px;
    height: 24px;
    background: var(--accent-color);
    border-radius: 2px;
}

/* =====================================================
   GALERI STYLE - Gallery Page Specific CSS
   MTs Darul Ulum School Management System
   =====================================================
   Note: This file extends berita-style.css
   Make sure berita-style.css is loaded before this file
   ===================================================== */

/* =====================================================
   1. GALERI HERO SECTION
   ===================================================== */
.galeri-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 50%, #1a1a2e 100%);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.galeri-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.galeri-hero::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: 0;
    right: 0;
    height: 100px;
    background: var(--bg-light);
    transform: skewY(-2deg);
}

.galeri-hero .hero-content {
    position: relative;
    z-index: 1;
}

.galeri-hero .hero-title {
    font-family: var(--font-heading);
    font-size: 2.75rem;
    font-weight: 900;
    color: var(--bg-white);
    margin-bottom: 1rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.galeri-hero .hero-subtitle {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.85);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* =====================================================
   2. FILTER SECTION
   ===================================================== */
.filter-section {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.filter-select {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    color: var(--text-primary);
    background-color: var(--bg-white);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.filter-select:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.15);
    outline: none;
}

.filter-select:hover {
    border-color: var(--secondary-color);
}

/* =====================================================
   3. GALLERY GRID & CARDS
   ===================================================== */
.gallery-grid {
    margin-top: 1rem;
}

.gallery-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: all var(--transition-normal);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.gallery-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: transparent;
}

.gallery-link {
    display: block;
    position: relative;
    overflow: hidden;
}

.gallery-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.gallery-card:hover .gallery-image img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.gallery-card:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay-content {
    width: 60px;
    height: 60px;
    background: var(--bg-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.5);
    transition: transform var(--transition-normal);
}

.gallery-card:hover .gallery-overlay-content {
    transform: scale(1);
}

.gallery-overlay-content i {
    font-size: 1.5rem;
    color: var(--accent-color);
}

.gallery-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 2;
}

.gallery-badge .badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.4rem 0.75rem;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gallery-content {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.gallery-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color var(--transition-fast);
}

.gallery-card:hover .gallery-title {
    color: var(--accent-color);
}

.gallery-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0.75rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gallery-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-light);
}

.gallery-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.gallery-meta .meta-item i {
    color: var(--accent-color);
    font-size: 0.7rem;
}

.gallery-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
}

.gallery-actions .btn {
    flex: 1;
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
}

.gallery-actions .btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.gallery-actions .btn-outline-secondary:hover {
    background: var(--text-secondary);
    border-color: var(--text-secondary);
    color: var(--bg-white);
}

/* =====================================================
   4. GALERI PAGINATION
   ===================================================== */
.galeri-pagination {
    margin-top: 2rem;
}

.galeri-pagination .pagination {
    gap: 0.35rem;
}

.galeri-pagination .page-item .page-link {
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    padding: 0.6rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: all var(--transition-fast);
    min-width: 42px;
    text-align: center;
}

.galeri-pagination .page-item .page-link:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--bg-white);
    transform: translateY(-2px);
}

.galeri-pagination .page-item.active .page-link {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--bg-white);
    box-shadow: 0 4px 12px rgba(229, 57, 53, 0.3);
}

/* =====================================================
   5. SIDEBAR - POPULAR LIST
   ===================================================== */
.popular-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.popular-item {
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition-fast);
}

.popular-item:hover {
    transform: translateX(5px);
}

.popular-item a {
    display: flex;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
}

.popular-image {
    width: 70px;
    height: 55px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}

.popular-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.popular-item:hover .popular-image img {
    transform: scale(1.1);
}

.popular-content {
    flex: 1;
    min-width: 0;
}

.popular-content h6 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color var(--transition-fast);
}

.popular-item:hover .popular-content h6 {
    color: var(--accent-color);
}

.popular-meta {
    display: flex;
    gap: 0.75rem;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.popular-meta i {
    margin-right: 0.2rem;
}

/* =====================================================
   6. SIDEBAR - LATEST LIST
   ===================================================== */
.latest-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.latest-item {
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition-fast);
}

.latest-item:hover {
    transform: translateX(5px);
}

.latest-item a {
    display: flex;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
}

.latest-image {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}

.latest-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.latest-item:hover .latest-image img {
    transform: scale(1.1);
}

.latest-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.latest-content h6 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
    line-height: 1.4;
    transition: color var(--transition-fast);
}

.latest-item:hover .latest-content h6 {
    color: var(--accent-color);
}

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

/* =====================================================
   7. SIDEBAR - STATS CARD
   ===================================================== */
.stats-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stats-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.stats-item:hover {
    background: var(--bg-gray);
    transform: translateX(5px);
}

.stats-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-md);
    color: var(--bg-white);
    font-size: 1.1rem;
}

.stats-content h4 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
    line-height: 1;
}

.stats-content p {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0.25rem 0 0 0;
}

/* =====================================================
   8. SIDEBAR - CATEGORIES LIST
   ===================================================== */
.categories-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 1rem;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}

.category-item:hover {
    background: var(--primary-color);
    color: var(--bg-white);
    transform: translateX(5px);
}

.category-item.active {
    background: var(--accent-color);
    color: var(--bg-white);
    border-color: var(--accent-color);
}

.category-name {
    flex: 1;
}

.category-count {
    background: rgba(0, 0, 0, 0.1);
    padding: 0.15rem 0.5rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
}

.category-item:hover .category-count,
.category-item.active .category-count {
    background: rgba(255, 255, 255, 0.2);
}

/* =====================================================
   9. SIDEBAR - INFO CARD
   ===================================================== */
.info-card {
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-gray) 100%);
    border-radius: var(--radius-lg);
}

.info-card .info-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    color: var(--bg-white);
    font-size: 1.75rem;
}

.info-card h5 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.info-card p {
    margin-bottom: 1rem;
}

/* =====================================================
   10. GALERI FOOTER
   ===================================================== */
.galeri-footer {
    background: linear-gradient(135deg, var(--bg-dark) 0%, #2d3748 100%);
    color: rgba(255, 255, 255, 0.8);
    padding: 3rem 0 0;
    margin-top: 3rem;
}

.galeri-footer .footer-logo {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--bg-white);
    margin-bottom: 1rem;
}

.galeri-footer .footer-logo span {
    color: var(--accent-color);
}

.galeri-footer p {
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.galeri-footer .footer-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--bg-white);
    margin-bottom: 1.25rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.galeri-footer .footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--accent-color);
    border-radius: 2px;
}

.galeri-footer .footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.galeri-footer .footer-links li {
    margin-bottom: 0.65rem;
}

.galeri-footer .footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    display: inline-block;
}

.galeri-footer .footer-links a:hover {
    color: var(--bg-white);
    transform: translateX(5px);
}

.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact li {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.footer-contact li i {
    color: var(--accent-color);
    width: 16px;
    flex-shrink: 0;
    margin-top: 0.2rem;
}

.galeri-footer .footer-bottom {
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.galeri-footer .footer-bottom p {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

/* =====================================================
   11. LIGHTBOX CUSTOMIZATION
   ===================================================== */
.lb-outerContainer {
    border-radius: var(--radius-lg) !important;
    overflow: hidden;
}

.lb-dataContainer {
    padding: 1rem !important;
}

.lb-caption {
    font-family: var(--font-primary) !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
}

.lb-number {
    font-family: var(--font-primary) !important;
    font-size: 0.85rem !important;
    color: var(--text-muted) !important;
}

.lb-nav a.lb-prev,
.lb-nav a.lb-next {
    opacity: 0.8 !important;
}

.lb-nav a.lb-prev:hover,
.lb-nav a.lb-next:hover {
    opacity: 1 !important;
}

/* =====================================================
   12. RESPONSIVE STYLES
   ===================================================== */
@media (max-width: 991.98px) {
    .galeri-hero {
        padding: 3rem 0;
    }
    
    .galeri-hero .hero-title {
        font-size: 2.25rem;
    }
    
    .galeri-hero .hero-subtitle {
        font-size: 1rem;
    }
    
    .filter-section {
        padding: 1.25rem;
    }
}

@media (max-width: 767.98px) {
    .galeri-hero {
        padding: 2.5rem 0;
    }
    
    .galeri-hero .hero-title {
        font-size: 1.75rem;
    }
    
    .galeri-hero .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .galeri-hero::after {
        bottom: -30px;
        height: 60px;
    }
    
    .filter-section {
        padding: 1rem;
    }
    
    .filter-label {
        font-size: 0.8rem;
    }
    
    .filter-select {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .gallery-content {
        padding: 1rem;
    }
    
    .gallery-title {
        font-size: 0.95rem;
    }
    
    .gallery-description {
        font-size: 0.8rem;
    }
    
    .gallery-actions {
        flex-direction: column;
    }
    
    .gallery-actions .btn {
        width: 100%;
    }
    
    .stats-item {
        padding: 0.6rem;
    }
    
    .stats-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .stats-content h4 {
        font-size: 1.1rem;
    }
    
    .galeri-footer {
        padding: 2rem 0 0;
    }
}

@media (max-width: 575.98px) {
    .galeri-hero {
        padding: 2rem 0;
    }
    
    .galeri-hero .hero-title {
        font-size: 1.5rem;
    }
    
    .galeri-hero .hero-subtitle {
        font-size: 0.85rem;
    }
    
    .gallery-image {
        aspect-ratio: 16/10;
    }
    
    .gallery-meta {
        gap: 0.5rem;
    }
    
    .gallery-meta .meta-item {
        font-size: 0.7rem;
    }
    
    .popular-image {
        width: 60px;
        height: 50px;
    }
    
    .popular-content h6 {
        font-size: 0.8rem;
    }
    
    .latest-image {
        width: 50px;
        height: 50px;
    }
    
    .latest-content h6 {
        font-size: 0.8rem;
    }
    
    .category-item {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .info-card {
        padding: 1.25rem;
    }
    
    .info-card .info-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}

/* =====================================================
   13. IMAGE LOADING STATES
   ===================================================== */
.gallery-image img,
.popular-image img,
.latest-image img {
    background: linear-gradient(135deg, var(--bg-gray) 0%, var(--bg-light) 100%);
}

.gallery-image img.loaded,
.popular-image img.loaded,
.latest-image img.loaded {
    animation: fadeInImage 0.5s ease-out;
}

@keyframes fadeInImage {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* =====================================================
   14. NO RESULTS STATE
   ===================================================== */
.gallery-grid .text-center {
    padding: 3rem 1.5rem;
}

.gallery-grid .text-center i {
    color: var(--text-light);
}

.gallery-grid .text-center h4 {
    color: var(--text-primary);
    margin: 1rem 0 0.5rem;
}

.gallery-grid .text-center p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* =====================================================
   15. MASONRY LAYOUT (Optional Enhancement)
   ===================================================== */
.gallery-masonry {
    column-count: 3;
    column-gap: 1.5rem;
}

.gallery-masonry .gallery-card {
    break-inside: avoid;
    margin-bottom: 1.5rem;
}

@media (max-width: 991.98px) {
    .gallery-masonry {
        column-count: 2;
    }
}

@media (max-width: 575.98px) {
    .gallery-masonry {
        column-count: 1;
    }
}

/* =====================================================
   16. PRINT STYLES
   ===================================================== */
@media print {
    .galeri-hero,
    .filter-section,
    .gallery-actions,
    .galeri-pagination,
    .galeri-footer,
    .sidebar-section {
        display: none !important;
    }
    
    .gallery-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .gallery-overlay {
        display: none !important;
    }
}

/* =====================================================
   17. ACCESSIBILITY
   ===================================================== */
.gallery-link:focus {
    outline: 3px solid var(--secondary-color);
    outline-offset: 2px;
}

.filter-select:focus-visible {
    outline: 3px solid var(--secondary-color);
    outline-offset: 2px;
}

.category-item:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .gallery-card:hover {
        transform: none;
    }
    
    .gallery-image img {
        transition: none;
    }
    
    .gallery-overlay {
        transition: none;
    }
    
    .gallery-overlay-content {
        transition: none;
        transform: scale(1);
    }
}

/* =====================================================
   PERPUSTAKAAN STYLE - Digital Library Page CSS
   MTs Darul Ulum School Management System
   =====================================================
   Note: This file extends berita-style.css
   Make sure berita-style.css is loaded before this file
   ===================================================== */

/* =====================================================
   1. PERPUSTAKAAN HEADER
   ===================================================== */
.perpustakaan-header {
    background: linear-gradient(135deg, #1e3a5f 0%, #0d2137 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.perpustakaan-logo {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--bg-white);
    text-decoration: none;
    display: flex;
    align-items: center;
    letter-spacing: -0.5px;
    transition: transform var(--transition-fast);
}

.perpustakaan-logo:hover {
    color: var(--bg-white);
    transform: scale(1.02);
}

.perpustakaan-logo i {
    color: #f59e0b;
}

.perpustakaan-logo span {
    color: #f59e0b;
    margin-left: 2px;
}

.perpustakaan-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.perpustakaan-nav .nav-link {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.perpustakaan-nav .nav-link:hover {
    color: var(--bg-white);
    background: rgba(255, 255, 255, 0.1);
}

.perpustakaan-nav .nav-link.active {
    color: var(--bg-white);
    background: #f59e0b;
}

/* =====================================================
   2. LIBRARY HERO SECTION
   ===================================================== */
.library-hero {
    background: linear-gradient(135deg, #1e3a5f 0%, #0d2137 50%, #1a1a2e 100%);
    padding: 4rem 0 5rem;
    position: relative;
    overflow: hidden;
}

.library-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.03' fill-rule='evenodd'/%3E%3C/svg%3E");
}

.library-hero .hero-content {
    position: relative;
    z-index: 1;
}

.library-hero .hero-title {
    font-family: var(--font-heading);
    font-size: 2.75rem;
    font-weight: 900;
    color: var(--bg-white);
    margin-bottom: 1rem;
    line-height: 1.2;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.library-hero .hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.library-hero .hero-image {
    position: relative;
    z-index: 1;
    text-align: center;
}

.library-hero .hero-image img {
    max-height: 350px;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.3));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* =====================================================
   3. SEARCH CONTAINER (HERO)
   ===================================================== */
.search-container {
    max-width: 500px;
}

.search-container .input-group {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 0.35rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.search-container .search-input {
    border: none;
    padding: 0.85rem 1.25rem;
    font-size: 1rem;
    background: transparent;
    border-radius: var(--radius-md);
}

.search-container .search-input:focus {
    outline: none;
    box-shadow: none;
}

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

.search-container .search-btn {
    padding: 0.85rem 1.5rem;
    border-radius: var(--radius-md) !important;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border: none;
    font-weight: 600;
}

.search-container .search-btn:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    transform: scale(1.02);
}

.search-hint {
    margin-top: 0.75rem;
}

.search-hint small {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
}

/* =====================================================
   4. STATS SECTION
   ===================================================== */
.stats-section {
    margin-top: -3rem;
    position: relative;
    z-index: 10;
    padding-bottom: 2rem;
}

.stat-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-light);
    transition: all var(--transition-normal);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.stat-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-card:nth-child(1) .stat-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: var(--bg-white);
}

.stat-card:nth-child(2) .stat-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: var(--bg-white);
}

.stat-card:nth-child(3) .stat-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: var(--bg-white);
}

.stat-card:nth-child(4) .stat-icon {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: var(--bg-white);
}

/* Alternative: Target by column position */
.col-md-3:nth-child(1) .stat-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: var(--bg-white);
}

.col-md-3:nth-child(2) .stat-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: var(--bg-white);
}

.col-md-3:nth-child(3) .stat-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: var(--bg-white);
}

.col-md-3:nth-child(4) .stat-icon {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: var(--bg-white);
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0.25rem 0 0 0;
}

/* =====================================================
   5. FILTER SECTION
   ===================================================== */
.filter-section {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.filter-group {
    margin-bottom: 1rem;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    display: block;
}

.category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.category-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-light);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.category-btn:hover {
    background: var(--primary-color);
    color: var(--bg-white);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.category-btn.active {
    background: #f59e0b;
    color: var(--bg-white);
    border-color: #f59e0b;
}

.category-btn .badge {
    background: rgba(0, 0, 0, 0.15);
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 50px;
}

.sort-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: flex-end;
}

.sort-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.sort-select {
    max-width: 200px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.sort-select:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
    outline: none;
}

/* =====================================================
   6. BOOKS GRID & CARDS
   ===================================================== */
.books-grid {
    margin-top: 1rem;
}

.book-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: all var(--transition-normal);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.book-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    border-color: transparent;
}

.book-cover {
    position: relative;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.book-cover a {
    display: block;
}

.book-cover img {
    max-height: 180px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transition: transform var(--transition-normal);
}

.book-card:hover .book-cover img {
    transform: scale(1.05) rotate(-2deg);
}

.book-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.book-badge .badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.book-content {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.book-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.book-title a:hover {
    color: #f59e0b;
}

.book-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.book-author i {
    color: #f59e0b;
    font-size: 0.8rem;
}

.book-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-light);
    margin-top: auto;
}

.book-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.book-meta .meta-item i {
    color: var(--text-light);
    font-size: 0.7rem;
}

.book-actions {
    display: flex;
    gap: 0.5rem;
    padding-top: 0.75rem;
}

.book-actions .read-btn {
    flex: 1;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border: none;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    transition: all var(--transition-fast);
}

.book-actions .read-btn:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.book-actions .share-btn {
    padding: 0.5rem 0.75rem;
    transition: all var(--transition-fast);
}

.book-actions .share-btn:hover {
    background: var(--text-secondary);
    border-color: var(--text-secondary);
    color: var(--bg-white);
}

.book-actions .share-btn.shared {
    background: #10b981;
    border-color: #10b981;
    color: var(--bg-white);
}

/* =====================================================
   7. LIBRARY PAGINATION
   ===================================================== */
.library-pagination {
    margin-top: 2rem;
}

.library-pagination .pagination {
    gap: 0.35rem;
}

.library-pagination .page-item .page-link {
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    padding: 0.6rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: all var(--transition-fast);
    min-width: 42px;
    text-align: center;
}

.library-pagination .page-item .page-link:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--bg-white);
    transform: translateY(-2px);
}

.library-pagination .page-item.active .page-link {
    background: #f59e0b;
    border-color: #f59e0b;
    color: var(--bg-white);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* =====================================================
   8. SIDEBAR - POPULAR BOOKS
   ===================================================== */
.popular-books {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.popular-book {
    transition: all var(--transition-fast);
}

.popular-book:hover {
    transform: translateX(5px);
}

.popular-book a {
    display: flex;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
}

.popular-cover {
    width: 50px;
    height: 65px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.popular-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.popular-book:hover .popular-cover img {
    transform: scale(1.1);
}

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

.popular-info h6 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color var(--transition-fast);
}

.popular-book:hover .popular-info h6 {
    color: #f59e0b;
}

.popular-meta {
    display: flex;
    gap: 0.75rem;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.popular-meta i {
    margin-right: 0.2rem;
}

/* =====================================================
   9. SIDEBAR - LATEST BOOKS
   ===================================================== */
.latest-books {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.latest-book {
    transition: all var(--transition-fast);
}

.latest-book:hover {
    transform: translateX(5px);
}

.latest-book a {
    display: flex;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
}

.latest-cover {
    width: 45px;
    height: 60px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.latest-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.latest-book:hover .latest-cover img {
    transform: scale(1.1);
}

.latest-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.latest-info h6 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
    line-height: 1.4;
    transition: color var(--transition-fast);
}

.latest-book:hover .latest-info h6 {
    color: #f59e0b;
}

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

/* =====================================================
   10. SIDEBAR - CATEGORIES LIST
   ===================================================== */
.categories-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 1rem;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}

.category-link:hover {
    background: var(--primary-color);
    color: var(--bg-white);
    transform: translateX(5px);
}

.category-link.active {
    background: #f59e0b;
    color: var(--bg-white);
    border-color: #f59e0b;
}

.category-name {
    flex: 1;
}

.category-count {
    background: rgba(0, 0, 0, 0.1);
    padding: 0.15rem 0.5rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
}

.category-link:hover .category-count,
.category-link.active .category-count {
    background: rgba(255, 255, 255, 0.2);
}

/* =====================================================
   11. SIDEBAR - UPLOAD INFO
   ===================================================== */
.upload-info {
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-gray) 100%);
    border-radius: var(--radius-lg);
}

.upload-info .info-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-radius: 50%;
    color: var(--bg-white);
    font-size: 1.75rem;
}

.upload-info h5 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.upload-info p {
    margin-bottom: 1rem;
}

.upload-info .btn-primary {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border: none;
}

.upload-info .btn-primary:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}

/* =====================================================
   12. LIBRARY FOOTER
   ===================================================== */
.library-footer {
    background: linear-gradient(135deg, var(--bg-dark) 0%, #2d3748 100%);
    color: rgba(255, 255, 255, 0.8);
    padding: 3rem 0 0;
    margin-top: 3rem;
}

.library-footer .footer-logo {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--bg-white);
    margin-bottom: 1rem;
}

.library-footer .footer-logo span {
    color: #f59e0b;
}

.library-footer p {
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.library-footer .social-icons {
    display: flex;
    gap: 0.75rem;
}

.library-footer .social-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    color: var(--bg-white);
    border-radius: 50%;
    font-size: 1rem;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.library-footer .social-icon:hover {
    background: #f59e0b;
    color: var(--bg-white);
    transform: translateY(-3px);
}

.library-footer .footer-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--bg-white);
    margin-bottom: 1.25rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.library-footer .footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: #f59e0b;
    border-radius: 2px;
}

.library-footer .footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.library-footer .footer-links li {
    margin-bottom: 0.65rem;
}

.library-footer .footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    display: inline-block;
}

.library-footer .footer-links a:hover {
    color: var(--bg-white);
    transform: translateX(5px);
}

.library-footer .footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.library-footer .footer-contact li {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.library-footer .footer-contact li i {
    color: #f59e0b;
    width: 16px;
    flex-shrink: 0;
    margin-top: 0.2rem;
}

.library-footer .footer-bottom {
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.library-footer .footer-bottom p {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

/* =====================================================
   13. RESPONSIVE STYLES
   ===================================================== */
@media (max-width: 991.98px) {
    .perpustakaan-nav {
        display: none;
    }
    
    .library-hero {
        padding: 3rem 0 4rem;
    }
    
    .library-hero .hero-title {
        font-size: 2.25rem;
    }
    
    .library-hero .hero-image {
        margin-top: 2rem;
    }
    
    .library-hero .hero-image img {
        max-height: 280px;
    }
    
    .stats-section {
        margin-top: -2rem;
    }
    
    .stat-card {
        padding: 1.25rem;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .sort-group {
        justify-content: flex-start;
        margin-top: 1rem;
    }
    
    .sort-select {
        max-width: 100%;
        flex: 1;
    }
}

@media (max-width: 767.98px) {
    .perpustakaan-logo {
        font-size: 1.4rem;
    }
    
    .library-hero {
        padding: 2.5rem 0 3.5rem;
        text-align: center;
    }
    
    .library-hero .hero-title {
        font-size: 1.75rem;
    }
    
    .library-hero .hero-subtitle {
        font-size: 1rem;
    }
    
    .search-container {
        max-width: 100%;
        margin: 0 auto;
    }
    
    .library-hero .hero-image img {
        max-height: 200px;
    }
    
    .stats-section {
        margin-top: -1.5rem;
    }
    
    .stat-card {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
    }
    
    .stat-icon {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .stat-number {
        font-size: 1.35rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    .filter-section {
        padding: 1rem;
    }
    
    .category-buttons {
        justify-content: center;
    }
    
    .category-btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .book-cover {
        min-height: 180px;
        padding: 1rem;
    }
    
    .book-cover img {
        max-height: 150px;
    }
    
    .book-content {
        padding: 1rem;
    }
    
    .book-title {
        font-size: 0.95rem;
    }
    
    .book-actions {
        flex-direction: column;
    }
    
    .book-actions .share-btn {
        width: 100%;
    }
    
    .library-footer {
        padding: 2rem 0 0;
    }
}

@media (max-width: 575.98px) {
    .perpustakaan-logo {
        font-size: 1.2rem;
    }
    
    .library-hero {
        padding: 2rem 0 3rem;
    }
    
    .library-hero .hero-title {
        font-size: 1.5rem;
    }
    
    .library-hero .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .search-container .input-group {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.5rem;
    }
    
    .search-container .search-input {
        border-radius: var(--radius-md) !important;
        padding: 0.75rem 1rem;
    }
    
    .search-container .search-btn {
        width: 100%;
        border-radius: var(--radius-md) !important;
    }
    
    .library-hero .hero-image {
        display: none;
    }
    
    .popular-cover {
        width: 45px;
        height: 58px;
    }
    
    .popular-info h6 {
        font-size: 0.8rem;
    }
    
    .latest-cover {
        width: 40px;
        height: 52px;
    }
    
    .latest-info h6 {
        font-size: 0.8rem;
    }
    
    .category-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .upload-info {
        padding: 1.25rem;
    }
    
    .upload-info .info-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}

/* =====================================================
   14. PRINT STYLES
   ===================================================== */
@media print {
    .perpustakaan-header,
    .library-hero,
    .stats-section,
    .filter-section,
    .book-actions,
    .library-pagination,
    .library-footer,
    .sidebar-section,
    .scroll-top {
        display: none !important;
    }
    
    .book-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    body {
        background: white;
    }
}

/* =====================================================
   15. ACCESSIBILITY
   ===================================================== */
.book-card:focus-within {
    outline: 3px solid #f59e0b;
    outline-offset: 2px;
}

.category-btn:focus,
.category-link:focus,
.sort-select:focus-visible {
    outline: 3px solid #f59e0b;
    outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .library-hero .hero-image img {
        animation: none;
    }
    
    .book-card:hover {
        transform: none;
    }
    
    .book-cover img {
        transition: none;
    }
    
    .stat-card:hover {
        transform: none;
    }
}

/* =====================================================
   16. DARK MODE COLORS (Library Accent)
   ===================================================== */
:root {
    --library-accent: #f59e0b;
    --library-accent-dark: #d97706;
    --library-accent-light: #fbbf24;
}

/* =====================================================
   PERPUSTAKAAN DETAIL PAGE STYLES
   Additional CSS for detail.php
   =====================================================
   Note: This file extends perpustakaan-style.css
   ===================================================== */

/* =====================================================
   1. BREADCRUMB SECTION
   ===================================================== */
.breadcrumb-section {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
    padding: 0.75rem 0;
}

.breadcrumb-section .breadcrumb {
    margin: 0;
    padding: 0;
    background: transparent;
    font-size: 0.85rem;
}

.breadcrumb-section .breadcrumb-item a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.breadcrumb-section .breadcrumb-item a:hover {
    color: #f59e0b;
}

.breadcrumb-section .breadcrumb-item.active {
    color: var(--text-secondary);
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.breadcrumb-section .breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: var(--text-light);
    font-weight: 600;
}

/* =====================================================
   2. BOOK DETAIL CARD
   ===================================================== */
.book-detail-card {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    margin-bottom: 2rem;
}

.book-cover-wrapper {
    position: relative;
    text-align: center;
}

.book-cover-large {
    max-width: 100%;
    max-height: 350px;
    width: auto;
    border-radius: var(--radius-lg);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    transition: transform var(--transition-normal);
}

.book-cover-wrapper:hover .book-cover-large {
    transform: scale(1.02) rotate(-1deg);
}

.book-cover-shadow {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 20px;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.2) 0%, transparent 70%);
}

/* =====================================================
   3. BOOK INFO
   ===================================================== */
.book-info {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.book-category-badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: var(--bg-white);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
    width: fit-content;
}

.book-title-large {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

.book-author-large {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.book-author-large i {
    color: #f59e0b;
}

.book-author-large strong {
    color: var(--text-primary);
}

/* =====================================================
   4. BOOK META GRID
   ===================================================== */
.book-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
}

.book-meta-grid .meta-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.book-meta-grid .meta-item i {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    color: #f59e0b;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.book-meta-grid .meta-item div {
    display: flex;
    flex-direction: column;
}

.book-meta-grid .meta-item small {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.book-meta-grid .meta-item span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* =====================================================
   5. BOOK STATS
   ===================================================== */
.book-stats {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.book-stats .stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.book-stats .stat-item i {
    font-size: 1.25rem;
    color: #f59e0b;
    margin-bottom: 0.35rem;
}

.book-stats .stat-item span {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.book-stats .stat-item small {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* =====================================================
   6. BOOK ACTIONS LARGE
   ===================================================== */
.book-actions-large {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: auto;
}

.book-actions-large .btn-read {
    flex: 1;
    min-width: 150px;
    padding: 0.85rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border: none;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.book-actions-large .btn-read:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.4);
}

.book-actions-large .btn-download {
    padding: 0.85rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.book-actions-large .btn-download:hover {
    background: var(--primary-color);
    color: var(--bg-white);
}

.book-actions-large .btn-share {
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
}

.book-actions-large .btn-share:hover {
    background: var(--text-secondary);
    border-color: var(--text-secondary);
    color: var(--bg-white);
}

/* =====================================================
   7. SECTION CARDS
   ===================================================== */
.book-description-card,
.uploader-card,
.share-card,
.related-section {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    margin-bottom: 1.5rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f59e0b;
}

.section-title i {
    color: #f59e0b;
}

/* =====================================================
   8. BOOK DESCRIPTION
   ===================================================== */
.book-description {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    text-align: justify;
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
    hyphens: auto;
}

.book-description p {
    margin-bottom: 1rem;
}

.book-description p:last-child {
    margin-bottom: 0;
}

/* =====================================================
   9. UPLOADER INFO
   ===================================================== */
.uploader-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.uploader-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--bg-light);
    box-shadow: var(--shadow-sm);
}

.uploader-avatar-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-gray) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.5rem;
}

.uploader-details h5 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
}

.uploader-details p {
    font-size: 0.85rem;
}

/* =====================================================
   10. SHARE BUTTONS
   ===================================================== */
.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-fast);
    border: none;
    cursor: pointer;
}

.share-btn i {
    font-size: 1rem;
}

.share-btn span {
    display: none;
}

.share-copy {
    background: var(--bg-gray);
    color: var(--text-secondary);
}

.share-copy:hover {
    background: var(--text-secondary);
    color: var(--bg-white);
    transform: translateY(-2px);
}

.share-copy.copied {
    background: #10b981;
    color: var(--bg-white);
}

/* Show text on larger screens */
@media (min-width: 576px) {
    .share-btn span {
        display: inline;
    }
}

/* =====================================================
   11. RELATED BOOKS
   ===================================================== */
.related-book-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-light);
    transition: all var(--transition-fast);
    height: 100%;
}

.related-book-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}

.related-book-card a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.related-cover {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 140px;
}

.related-cover img {
    max-height: 120px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-normal);
}

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

.related-info {
    padding: 1rem;
}

.related-info h6 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.35rem 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color var(--transition-fast);
}

.related-book-card:hover .related-info h6 {
    color: #f59e0b;
}

.related-info small {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* =====================================================
   12. SIDEBAR - QUICK ACTIONS
   ===================================================== */
.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}

.action-btn:hover {
    background: #f59e0b;
    color: var(--bg-white);
    transform: translateX(5px);
}

.action-btn i {
    width: 20px;
    text-align: center;
}

/* =====================================================
   13. SIDEBAR - INFO LIST
   ===================================================== */
.info-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    padding: 0.75rem;
    background: var(--bg-light);
    border-radius: var(--radius-md);
}

.info-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.info-value {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    word-break: break-word;
}

/* =====================================================
   14. MOBILE MENU
   ===================================================== */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--bg-white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

@media (max-width: 991.98px) {
    .mobile-menu-toggle {
        display: block;
    }
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: all var(--transition-fast);
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    background: #f59e0b;
    color: var(--bg-white);
}

.mobile-nav-link i {
    width: 20px;
    text-align: center;
}

/* =====================================================
   15. TOAST NOTIFICATION
   ===================================================== */
.toast-notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text-primary);
    color: var(--bg-white);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: var(--shadow-xl);
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
}

.toast-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-notification i {
    color: #10b981;
}

/* =====================================================
   FORM STYLE - Kontribusi Buku
   ===================================================== */

/* Container & Layout */
.container {
    padding-top: 2rem;
    padding-bottom: 3rem;
}

.row.justify-content-center {
    animation: fadeInUp var(--transition-normal);
}

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

/* Info Card */
.info-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: none;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-normal);
}

.info-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.info-card h4 {
    color: white;
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.info-card .bi-info-circle {
    font-size: 1.5rem;
    vertical-align: middle;
}

.info-card p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Alert Messages */
.alert {
    border: none;
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-sm);
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert i {
    font-size: 1.25rem;
}

.alert .btn-close {
    padding: 0.75rem;
}

/* Form Container */
.form-container {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    transition: box-shadow var(--transition-normal);
}

.form-container:hover {
    box-shadow: var(--shadow-lg);
}

.form-container h5 {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.1rem;
    font-family: var(--font-heading);
}

.form-container .border-bottom {
    border-bottom: 2px solid var(--border-light) !important;
}

/* Form Elements */
.form-label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.form-label.required::after {
    content: " *";
    color: var(--accent-color);
}

.form-control,
.form-select {
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all var(--transition-fast);
    color: var(--text-primary);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
    outline: none;
}

.form-control:disabled,
.form-select:disabled {
    background-color: var(--bg-gray);
    cursor: not-allowed;
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

/* File Input Specific */
.form-control[type="file"] {
    padding: 0.5rem;
    background-color: var(--bg-light);
}

.form-control[type="file"]::file-selector-button {
    background-color: var(--bg-gray);
    border: none;
    padding: 0.5rem 1rem;
    margin-right: 1rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.form-control[type="file"]::file-selector-button:hover {
    background-color: var(--border-medium);
}

/* Preview Image */
.file-preview {
    max-width: 200px;
    max-height: 250px;
    object-fit: cover;
    border: 2px dashed var(--border-medium);
    padding: 0.5rem;
    background-color: var(--bg-light);
    transition: border-color var(--transition-fast);
}

.file-preview:hover {
    border-color: var(--primary-color);
}

/* Guidelines */
.form-container:last-of-type {
    background: linear-gradient(to right, var(--bg-light) 0%, var(--bg-white) 100%);
    border: 1px solid var(--border-light);
}

.form-container h5:last-of-type {
    color: var(--primary-dark);
    font-size: 1.15rem;
}

.form-container h6 {
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.form-container ul {
    padding-left: 1.25rem;
}

.form-container li {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    font-size: 0.95rem;
    border: 2px solid transparent;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border: none;
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: white;
}

.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Form Row Spacing */
.g-4 {
    --bs-gutter-y: 1.5rem;
}

/* Small Text */
.text-muted {
    color: var(--text-muted) !important;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .container {
        padding-top: 1rem;
        padding-bottom: 2rem;
    }
    
    .form-container {
        padding: 1.5rem;
    }
    
    .btn {
        padding: 0.625rem 1.25rem;
    }
    
    .file-preview {
        max-width: 150px;
        max-height: 200px;
    }
}

@media (max-width: 576px) {
    .info-card,
    .alert,
    .form-container {
        border-radius: var(--radius-md);
    }
    
    .d-flex {
        flex-direction: column;
        gap: 1rem;
    }
    
    .d-flex .btn {
        width: 100%;
    }
}

/* Animation for form elements */
.form-control,
.form-select,
.btn {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Custom Scrollbar for Textarea */
.form-textarea::-webkit-scrollbar {
    width: 8px;
}

.form-textarea::-webkit-scrollbar-track {
    background: var(--bg-light);
    border-radius: var(--radius-md);
}

.form-textarea::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: var(--radius-md);
}

.form-textarea::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

/* Placeholder Styling */
::placeholder {
    color: var(--text-light);
    opacity: 0.7;
}

/* Selection Color */
::selection {
    background-color: var(--primary-light);
    color: white;
}

/* =====================================================
   16. RESPONSIVE STYLES
   ===================================================== */
@media (max-width: 991.98px) {
    .book-detail-card {
        padding: 1.5rem;
    }
    
    .book-title-large {
        font-size: 1.5rem;
    }
    
    .book-meta-grid {
        grid-template-columns: 1fr;
    }
    
    .book-stats {
        justify-content: space-around;
    }
}

@media (max-width: 767.98px) {
    .book-detail-card {
        padding: 1.25rem;
    }
    
    .book-cover-wrapper {
        margin-bottom: 1.5rem;
    }
    
    .book-cover-large {
        max-height: 280px;
    }
    
    .book-title-large {
        font-size: 1.35rem;
        text-align: center;
    }
    
    .book-category-badge {
        margin-left: auto;
        margin-right: auto;
    }
    
    .book-author-large {
        justify-content: center;
    }
    
    .book-stats {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .book-stats .stat-item {
        flex: 1;
        min-width: 80px;
    }
    
    .book-actions-large {
        flex-direction: column;
    }
    
    .book-actions-large .btn-read,
    .book-actions-large .btn-download {
        width: 100%;
    }
    
    .book-actions-large .btn-share {
        width: 100%;
    }
    
    .section-title {
        font-size: 1rem;
    }
    
    .uploader-info {
        flex-direction: column;
        text-align: center;
    }
    
    .share-buttons {
        justify-content: center;
    }
    
    .related-cover {
        min-height: 120px;
        padding: 0.75rem;
    }
    
    .related-cover img {
        max-height: 100px;
    }
    
    .related-info {
        padding: 0.75rem;
    }
    
    .related-info h6 {
        font-size: 0.8rem;
    }
}

@media (max-width: 575.98px) {
    .breadcrumb-section .breadcrumb {
        font-size: 0.75rem;
    }
    
    .breadcrumb-section .breadcrumb-item.active {
        max-width: 100px;
    }
    
    .book-detail-card {
        padding: 1rem;
    }
    
    .book-cover-large {
        max-height: 220px;
    }
    
    .book-title-large {
        font-size: 1.2rem;
    }
    
    .book-meta-grid {
        padding: 1rem;
    }
    
    .book-meta-grid .meta-item i {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
    
    .book-meta-grid .meta-item span {
        font-size: 0.85rem;
    }
    
    .book-stats .stat-item i {
        font-size: 1rem;
    }
    
    .book-stats .stat-item span {
        font-size: 0.95rem;
    }
    
    .book-description-card,
    .uploader-card,
    .share-card,
    .related-section {
        padding: 1.25rem;
    }
    
    .book-description {
        font-size: 0.9rem;
    }
    
    .uploader-avatar,
    .uploader-avatar-placeholder {
        width: 50px;
        height: 50px;
    }
    
    .share-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .action-btn {
        padding: 0.75rem;
        font-size: 0.85rem;
    }
    
    .info-item {
        padding: 0.6rem;
    }
    
    .info-label {
        font-size: 0.65rem;
    }
    
    .info-value {
        font-size: 0.85rem;
    }
}

/* =====================================================
   17. PRINT STYLES
   ===================================================== */
@media print {
    .perpustakaan-header,
    .breadcrumb-section,
    .book-actions-large,
    .share-card,
    .sidebar-section,
    .library-footer,
    .scroll-top,
    .mobile-menu-toggle {
        display: none !important;
    }
    
    .book-detail-card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .book-cover-large {
        max-height: 200px;
    }
    
    .col-lg-8 {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    body {
        background: white;
    }
}

/* =====================================================
   18. ACCESSIBILITY
   ===================================================== */
.book-detail-card:focus-within {
    outline: 3px solid #f59e0b;
    outline-offset: 2px;
}

.share-btn:focus,
.action-btn:focus {
    outline: 3px solid #f59e0b;
    outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .book-cover-large {
        transition: none;
    }
    
    .book-cover-wrapper:hover .book-cover-large {
        transform: none;
    }
    
    .related-book-card:hover {
        transform: none;
    }
    
    .toast-notification {
        transition: opacity 0.1s;
    }
}



/* =====================================================
   10. DETAIL PAGE RESPONSIVE
   ===================================================== */
@media (max-width: 991.98px) {
    .article-title {
        font-size: 1.75rem;
    }
    
    .article-content {
        font-size: 1rem;
    }
    
    .author-info {
        padding: 0.75rem;
    }
    
    .author-avatar {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 767.98px) {
    .article-title {
        font-size: 1.5rem;
    }
    
    .article-meta {
        gap: 1rem;
    }
    
    .article-meta-item {
        font-size: 0.8rem;
    }
    
    .article-hero-image {
        border-radius: var(--radius-md);
        margin-bottom: 1.5rem;
    }
    
    .article-content {
        font-size: 0.95rem;
        line-height: 1.8;
    }
    
    .share-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .navigation-buttons {
        flex-direction: column;
    }
    
    .nav-btn {
        max-width: 100%;
    }
    
    .nav-btn.nav-next {
        text-align: left;
        justify-content: flex-start;
        flex-direction: row-reverse;
    }
}

@media (max-width: 575.98px) {
    .breadcrumb {
        font-size: 0.75rem;
        padding: 0.75rem 0;
    }
    
    .breadcrumb-item.active {
        max-width: 120px;
    }
    
    .article-title {
        font-size: 1.35rem;
    }
    
    .article-category {
        font-size: 0.7rem;
        padding: 0.3rem 0.75rem;
    }
    
    .author-info {
        flex-direction: column;
        text-align: center;
        border-left: none;
        border-top: 4px solid var(--accent-color);
    }
    
    .share-btn {
        width: 38px;
        height: 38px;
        font-size: 0.9rem;
    }
    
    .nav-btn {
        padding: 1rem;
    }
    
    .nav-btn .fw-bold {
        font-size: 0.85rem;
    }
}

/* =====================================================
   11. PRINT STYLES FOR DETAIL PAGE
   ===================================================== */
@media print {
    .breadcrumb,
    .share-section,
    .navigation-buttons,
    .related-section,
    .sidebar-section {
        display: none !important;
    }
    
    .article-hero-image {
        max-height: 300px;
        box-shadow: none;
    }
    
    .article-content {
        font-size: 12pt;
        line-height: 1.6;
    }
    
    .article-title {
        font-size: 18pt;
    }
    
    .author-info {
        background: none;
        border: 1px solid #ccc;
    }
}

/* =====================================================
   13. RESPONSIVE STYLES
   ===================================================== */

/* Large Devices (Desktops) */
@media (max-width: 1199.98px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .news-grid {
        gap: 1.25rem;
    }
}

/* Medium Devices (Tablets) */
@media (max-width: 991.98px) {
    .detik-nav {
        display: none;
    }
    
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .news-card.large {
        grid-column: span 2;
    }
    
    .hero-image {
        height: 350px;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-overlay {
        padding: 2rem 1.5rem 1.5rem;
    }
}

/* Small Devices (Landscape Phones) */
@media (max-width: 767.98px) {
    .detik-logo {
        font-size: 1.4rem;
    }
    
    .breaking-news {
        padding: 0.5rem 0;
    }
    
    .breaking-label {
        font-size: 0.6rem;
        padding: 0.25rem 0.5rem;
    }
    
    .breaking-content a {
        font-size: 0.8rem;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .news-card.large {
        grid-column: span 1;
    }
    
    .news-card.large .news-image img {
        height: 200px;
    }
    
    .hero-image {
        height: 280px;
    }
    
    .hero-title {
        font-size: 1.25rem;
    }
    
    .hero-meta {
        font-size: 0.75rem;
    }
    
    .hero-meta span {
        display: block;
        margin: 0.25rem 0 !important;
    }
    
    .search-box {
        padding: 0.35rem;
    }
    
    .search-input {
        padding: 0.6rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .search-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .category-btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .sidebar-section {
        padding: 1.25rem;
    }
    
    .detik-footer {
        padding: 2rem 0 0;
    }
    
    .footer-logo {
        font-size: 1.5rem;
    }
    
    .scroll-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }
}

/* Extra Small Devices (Portrait Phones) */
@media (max-width: 575.98px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .detik-header .d-flex {
        padding: 0.75rem 0 !important;
    }
    
    .detik-logo {
        font-size: 1.2rem;
    }
    
    .hero-image {
        height: 220px;
    }
    
    .hero-title {
        font-size: 1.1rem;
    }
    
    .hero-category {
        font-size: 0.65rem;
        padding: 0.25rem 0.75rem;
    }
    
    .news-image img {
        height: 160px;
    }
    
    .news-content {
        padding: 1rem;
    }
    
    .news-title {
        font-size: 0.95rem;
    }
    
    .news-excerpt {
        font-size: 0.8rem;
    }
    
    .detik-pagination .page-link {
        min-width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }
    
    .trending-item {
        padding: 0.75rem 0;
    }
    
    .trending-number {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
    
    .trending-content h4 {
        font-size: 0.85rem;
    }
    
    .social-icon {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
}

/* =====================================================
   14. UTILITY CLASSES
   ===================================================== */
.text-accent {
    color: var(--accent-color) !important;
}

.bg-accent {
    background-color: var(--accent-color) !important;
}

.border-accent {
    border-color: var(--accent-color) !important;
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(90deg, var(--bg-gray) 25%, var(--bg-light) 50%, var(--bg-gray) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-md);
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Fade In Animation */
.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

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

/* Image Placeholder */
.img-placeholder {
    background: linear-gradient(135deg, var(--bg-gray) 0%, var(--bg-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 2rem;
}

/* No Results State */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
}

.no-results i {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.no-results h4 {
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.no-results p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* =====================================================
   15. PRINT STYLES
   ===================================================== */
@media print {
    .detik-header,
    .breaking-news,
    .search-box,
    .category-list,
    .sidebar-section,
    .detik-footer,
    .scroll-top,
    .detik-pagination {
        display: none !important;
    }
    
    .col-lg-8 {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .news-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* =====================================================
   16. DARK MODE SUPPORT (Optional)
   ===================================================== */
@media (prefers-color-scheme: dark) {
    /* Uncomment to enable automatic dark mode
    :root {
        --bg-white: #1a202c;
        --bg-light: #2d3748;
        --bg-gray: #4a5568;
        --text-primary: #f7fafc;
        --text-secondary: #e2e8f0;
        --text-muted: #a0aec0;
        --border-light: #4a5568;
    }
    */
}

/* =====================================================
   17. MOBILE MENU (Optional Addition)
   ===================================================== */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--bg-white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

@media (max-width: 991.98px) {
    .mobile-menu-toggle {
        display: block;
    }
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100vh;
    background: var(--primary-dark);
    z-index: 1100;
    transition: right var(--transition-normal);
    padding: 1.5rem;
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--bg-white);
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-nav-link {
    display: block;
    color: rgba(255, 255, 255, 0.85);
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--accent-color);
}

/* =====================================================
   18. ACCESSIBILITY IMPROVEMENTS
   ===================================================== */
/* Focus States */
a:focus,
button:focus,
input:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: var(--accent-color);
    color: var(--bg-white);
    padding: 0.5rem 1rem;
    z-index: 9999;
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: 0;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .breaking-content {
        animation: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --border-light: #000;
        --text-muted: #333;
    }
    
    .news-card {
        border-width: 2px;
    }
}