/* ==========================================================================
   1. VARIABLES & THEME SETUP
   ========================================================================== */
:root {
    /* Color Palette */
    --primary-color: #1a365d;       /* Deep Academic Navy */
    --primary-light: #2b6cb0;       /* Vibrant Blue for links/actions */
    --secondary-color: #d69e2e;     /* Warm Gold for accents/stars/badges */
    --background-bg: #f7fafc;       /* Soft Light Gray background */
    --surface-bg: #ffffff;          /* Pure White for cards/containers */
    
    /* Text Colors */
    --text-main: #2d3748;           /* Dark Charcoal for high readability */
    --text-muted: #718096;          /* Slate Gray for secondary text */
    --text-light: #ffffff;          /* White text */

    /* Typography */
    --font-sans: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    
    /* Layout Elements */
    --border-radius: 8px;
    --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition-speed: 0.3s;
    --max-width: 1200px;
}

/* ==========================================================================
   2. RESET & BASE STYLES
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--background-bg);
    color: var(--text-main);
    line-height: 1.6;
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color var(--transition-speed);
}

a:hover {
    color: var(--primary-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   3. NAVIGATION / HEADER
   ========================================================================== */
.dl-header {
    background-color: var(--surface-bg);
    border-bottom: 2px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.dl-navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1rem 2rem;
}

.dl-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.dl-logo span {
    color: var(--secondary-color);
}

.dl-nav-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

.dl-nav-links a {
    font-weight: 500;
    color: var(--text-main);
}

.dl-nav-links a:hover,
.dl-nav-links a.active {
    color: var(--primary-light);
}

/* ==========================================================================
   4. SEARCH & FILTER BAR
   ========================================================================== */
.dl-hero-search {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--text-light);
    padding: 4rem 2rem;
    text-align: center;
}

.dl-hero-search h1 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.dl-search-container {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 0.5rem;
    background: var(--surface-bg);
    padding: 0.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.dl-search-input {
    flex: 1;
    border: none;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    outline: none;
}

.dl-search-btn {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    border: none;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: calc(var(--border-radius) - 4px);
    cursor: pointer;
    transition: opacity var(--transition-speed);
}

.dl-search-btn:hover {
    opacity: 0.9;
}

/* ==========================================================================
   5. CONTAINER & GRID LAYOUT (Main Content)
   ========================================================================== */
.dl-container {
    max-width: var(--max-width);
    margin: 2.5rem auto;
    padding: 0 2rem;
}

/* Split layout: Sidebar and Catalog grid */
.dl-layout-wrapper {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
}

/* Sidebar Filters */
.dl-sidebar {
    background: var(--surface-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    height: fit-content;
}

.dl-filter-group {
    margin-bottom: 1.5rem;
}

.dl-filter-group h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.25rem;
}

.dl-filter-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
}

/* Catalog Grid */
.dl-catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 2rem;
}

/* ==========================================================================
   6. BOOK / DOCUMENT CARDS
   ========================================================================== */
.dl-book-card {
    background: var(--surface-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.dl-book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.dl-book-cover-wrap {
    background-color: #edf2f7;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.dl-book-cover {
    height: 85%;
    object-fit: cover;
    box-shadow: 2px 4px 8px rgba(0,0,0,0.15);
}

.dl-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--primary-color);
    color: var(--text-light);
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
}

.dl-book-info {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.dl-book-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dl-book-author {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.dl-card-actions {
    margin-top: auto;
    display: flex;
    gap: 0.5rem;
}

.dl-btn {
    display: inline-block;
    text-align: center;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    flex: 1;
}

.dl-btn-primary {
    background-color: var(--primary-light);
    color: var(--text-light);
}

.dl-btn-primary:hover {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.dl-btn-secondary {
    background-color: #edf2f7;
    color: var(--text-main);
}

.dl-btn-secondary:hover {
    background-color: #e2e8f0;
}

/* ==========================================================================
   7. FOOTER
   ========================================================================== */
.dl-footer {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 3rem 2rem 1.5rem;
    margin-top: 5rem;
}

.dl-footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 2rem;
}

.dl-footer-section h4 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.dl-footer-section ul {
    list-style: none;
}

.dl-footer-section ul li {
    margin-bottom: 0.5rem;
}

.dl-footer-section a {
    color: #cbd5e0;
}

.dl-footer-section a:hover {
    color: var(--text-light);
}

.dl-footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    font-size: 0.85rem;
    color: #a0aec0;
}

/* ==========================================================================
   8. RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 992px) {
    .dl-layout-wrapper {
        grid-template-columns: 1fr; /* Stack sidebar on top of books on tablets */
    }
}

@media (max-width: 600px) {
    .dl-navbar {
        flex-direction: column;
        gap: 1rem;
    }
    
    .dl-hero-search h1 {
        font-size: 1.6rem;
    }
    
    .dl-search-container {
        flex-direction: column;
        background: transparent;
        box-shadow: none;
    }
    
    .dl-search-input {
        border-radius: var(--border-radius);
        margin-bottom: 0.5rem;
    }
    
    .dl-search-btn {
        border-radius: var(--border-radius);
    }
}


 table {
            border-collapse: collapse;
            width: 100%;
        }

        th, td {
            border: 1px solid #ddd;
            padding: 8px;
            text-align: left;
        }

        th {
            background-color: #f2f2f2;
        }

        tr:nth-child(even) {
            background-color: #f2f2f2;
        }