﻿/* ============================================================
   BANGLADESH DOCUMENT REPOSITORY - UNIFIED DESIGN SYSTEM
   Production-Ready Professional Styling
   ============================================================ */

:root {
    /* Brand Colors - Bangladesh */
    --bd-green: #006A4E;
    --bd-green-light: #00966E;
    --bd-green-lighter: #4CAF88;
    --bd-green-dark: #004D38;
    /* Replaced flag red/yellow with muted library accents */
    --bd-red: #1B4332;
    --bd-accent: #C9A84C;

    /* Academic / Library Palette */
    --bg-cream: #FAF8F4;
    --text-primary: #1C2B3A;
    --text-muted: #5A6572;
    --border-subtle: #DDD9D0;

    /* Neutral Palette - Professional Grays */
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    
    /* Semantic Colors */
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
    --info: #3B82F6;
    
    /* Typography */
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-bangla: 'Hind Siliguri', sans-serif;
    
    /* Spacing Scale */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-12: 3rem;
    --space-16: 4rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    
    /* Professional Light Gradients */
    --gradient-blue-light: linear-gradient(135deg, #E8F5EE 0%, #B3D9CA 100%);
    --gradient-blue-soft: linear-gradient(135deg, #F0FAF5 0%, #D6EFE5 100%);
    --gradient-gray-light: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
}

/* Academic / library base typography and background */
html {
    font-size: 16px;
}

body {
    background-color: var(--bg-cream, #FAF8F4);
    color: var(--text-primary, #1C2B3A);
    font-family: var(--font-body);
    line-height: 1.7;
}

body.page-maps {
    line-height: 1.1;
}

/* Bangla font for Bangla language mode */
[lang="bn"] body,
[lang="bn"] .hero-subtitle,
[lang="bn"] .nav-link,
[lang="bn"] .card-text,
[lang="bn"] p,
[lang="bn"] li {
    font-family: var(--font-bangla);
}

/* ========== ACCESSIBILITY ========== */

/* Skip to main content link - hidden by default, visible on focus */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--bd-green, #006A4E);
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    z-index: 10000;
    font-weight: 600;
    border-radius: 0 0 0.5rem 0;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.skip-link:focus {
    top: 0;
    transform: translateY(0);
    outline: 3px solid var(--bd-red, #F42A41);
    outline-offset: 2px;
}

/* Flush main content area against navbar — prevents any browser-default margin on <main> */
#main-content {
    margin-top: 0;
    padding-top: 0;
}

/* Home page: small breathing room between hero and first content section */
body.page-home .page-hero + .container {
    margin-top: 1rem !important;
}

/* ========== NAVBAR & NAV-LINKS (from original Django base.html) ========== */

.navbar {
    background-color: white;
    box-shadow: var(--shadow-sm, 0 1px 2px rgba(0, 0, 0, 0.05));
    padding: 1rem 0;
}

.navbar-brand {
    font-family: var(--font-heading, 'Playfair Display', serif);
    font-weight: 900;
    font-size: 1.5rem;
    color: var(--bd-green) !important;
}

.nav-link {
    color: var(--gray-700, #374151) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    position: relative;
    transition: color 0.2s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--bd-green, #006A4E);
    transition: width 0.2s ease;
    border-radius: 2px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--bd-green, #006A4E) !important;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

/* Mobile menu button styling */
.navbar-toggler {
    border: 2px solid var(--bd-green, #006A4E);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    background-color: var(--bd-green, #006A4E);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(0, 61, 165, 0.25);
    outline: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    width: 1.5rem;
    height: 1.5rem;
}

/* Mobile menu improvements */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: white;
        padding: 1rem;
        margin-top: 0.5rem;
        border-radius: 8px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    .navbar-collapse .navbar-nav {
        align-items: flex-end;
    }
    
    .nav-link {
        padding: 0.75rem 1rem !important;
    }
    
    .nav-link::after {
        display: none;
    }
}

/* ========== POST/DOCUMENT CARDS ========== */

.post-card,
.doc-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: cardFadeIn 0.5s ease-out backwards;
}

.post-card:nth-child(1) { animation-delay: 0.1s; }
.post-card:nth-child(2) { animation-delay: 0.15s; }
.post-card:nth-child(3) { animation-delay: 0.2s; }
.post-card:nth-child(4) { animation-delay: 0.25s; }
.post-card:nth-child(5) { animation-delay: 0.3s; }
.post-card:nth-child(6) { animation-delay: 0.35s; }

.doc-card:nth-child(1) { animation-delay: 0.1s; }
.doc-card:nth-child(2) { animation-delay: 0.15s; }
.doc-card:nth-child(3) { animation-delay: 0.2s; }
.doc-card:nth-child(4) { animation-delay: 0.25s; }
.doc-card:nth-child(5) { animation-delay: 0.3s; }
.doc-card:nth-child(6) { animation-delay: 0.35s; }
.doc-card:nth-child(7) { animation-delay: 0.4s; }
.doc-card:nth-child(8) { animation-delay: 0.45s; }
.doc-card:nth-child(9) { animation-delay: 0.5s; }
.doc-card:nth-child(10) { animation-delay: 0.55s; }
.doc-card:nth-child(11) { animation-delay: 0.6s; }
.doc-card:nth-child(12) { animation-delay: 0.65s; }

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-card:hover,
.doc-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.post-card .card-img-top,
.doc-card .card-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .card-img-top,
.doc-card:hover .card-img-top {
    transform: scale(1.05);
}

.card-category-badge {
    display: inline-block;
    background-color: var(--bd-green);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    transition: all 0.2s ease;
}

.card-category-badge:hover {
    background-color: var(--bd-red);
    transform: scale(1.05);
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 13px;
    color: #666;
}

.card-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.card-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.3;
}

.card-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.card-title a:hover {
    color: var(--bd-green);
}

.card-text {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 12px;
    flex-grow: 1;
}

.card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.badge-tag {
    display: inline-block;
    background-color: #f0f4ff;
    color: var(--bd-green);
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.badge-tag:hover {
    background-color: var(--bd-green);
    color: white;
}

.file-size-badge,
.reading-time-badge {
    display: inline-block;
    background-color: #fff3cd;
    color: #856404;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.file-size-badge {
    background-color: #d1ecf1;
    color: #0c5460;
}

.reading-time-badge {
    background-color: #e2e3e5;
    color: #383d41;
}

.card-footer {
    background: white;
    border-top: 1px solid #e9ecef;
    padding: 15px;
}

.card-footer .btn {
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.card-footer .btn-primary {
    background-color: var(--bd-green, #006A4E);
    border: none;
    color: #ffffff;
}

.card-footer .btn-primary:hover {
    background-color: var(--bd-red);
    transform: translateX(4px);
}

/* ========== PAGINATION ========== */

.pagination {
    margin-top: 40px;
    gap: 8px;
}

.pagination .page-link {
    border: 2px solid #dee2e6;
    border-radius: 8px;
    color: var(--bd-green);
    padding: 8px 12px;
    font-weight: 600;
    transition: all 0.2s ease;
    text-decoration: none;
}

.pagination .page-link:hover {
    background-color: var(--bd-green);
    color: white;
    border-color: var(--bd-green);
    transform: translateY(-2px);
}

.pagination .page-item.active .page-link {
    background-color: var(--bd-green);
    border-color: var(--bd-green);
    color: white;
}

/* ========== EMPTY STATE ========== */

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    margin: 20px 0;
}

.empty-state i {
    font-size: 48px;
    color: var(--bd-green);
    opacity: 0.3;
    margin-bottom: 20px;
}

.empty-state h3 {
    color: #333;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.empty-state p {
    color: #666;
    font-size: 16px;
    margin-bottom: 20px;
}

.empty-state .btn {
    background-color: var(--bd-green);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
}

.empty-state .btn:hover {
    background-color: var(--bd-red);
    transform: translateY(-2px);
}

/* ========== RESPONSIVE ========== */



/* Mobile devices */
@media (max-width: 768px) {
    /* Reduce card title size */
    .card-title {
        font-size: 1rem;
    }
    
    /* Optimize card layouts */
    .post-card,
    .doc-card {
        margin-bottom: 20px;
    }
    
    /* Make pagination mobile-friendly */
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }
    
    .pagination .page-item {
        margin: 2px;
    }
    
    .pagination .page-link {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    /* Simplify filter cards */
    .filter-card h5 {
        font-size: 14px;
    }
    
    /* Disable animations on mobile for better performance */
    .card,
    .post-card,
    .doc-card,
    .btn {
        transition: none !important;
        animation: none !important;
    }
    
    /* Reduce shadow complexity */
    .post-card:hover,
    .doc-card:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        transform: none;
    }
}

/* Small phones */
@media (max-width: 480px) {
    .card-title {
        font-size: 0.95rem;
    }
    
    .form-check {
        font-size: 14px;
    }
    
    .btn {
        font-size: 14px;
        padding: 10px 16px;
    }
    
    /* Simplify empty state */
    .empty-state i {
        font-size: 3rem;
    }
    
    .empty-state h3 {
        font-size: 1.3rem;
    }
    
    /* Stack pagination vertically on very small screens */
    .pagination {
        flex-direction: column;
        align-items: stretch;
    }
    
    .pagination .page-item {
        width: 100%;
        margin: 3px 0;
    }
    
    .pagination .page-link {
        width: 100%;
        text-align: center;
    }
}

/* Accessibility improvements - High contrast mode */
@media (prefers-contrast: more) {
    .post-card,
    .doc-card {
        border: 2px solid #000;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================================
   HOME PAGE SPECIFIC STYLES
   Professional, production-ready components
   ============================================================ */

/* About Card */
.about-card {
    background: var(--gradient-blue-soft);
    padding: var(--space-12);
    border-radius: var(--radius-lg);
    color: var(--gray-800);
}

/* Document Card */
.document-card {
    cursor: pointer;
    transition: all 0.3s ease;
}

.document-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

/* Category Card */
.category-card {
    background: var(--gradient-blue-light);
    transition: all 0.3s ease;
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12) !important;
}

.category-icon {
    font-size: 3rem;
}

/* CTA Card */
.cta-card {
    background: linear-gradient(135deg, var(--bd-green) 0%, var(--bd-green-light) 100%);
    color: white;
}

/* ============================================================
   PAGE HERO COMPONENT
   Enhanced hero with carousel support and modern animations
   ============================================================ */

.page-hero {
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    color: white;
    min-height: 27vh;
    display: flex;
    align-items: center;
    text-align: center;
    overflow: hidden;
}

.page-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    background: linear-gradient(135deg, rgba(0, 106, 78, 0.75) 0%, rgba(244, 42, 65, 0.55) 100%);
}

.page-hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero-content {
    position: relative;
    z-index: 2;
    animation: heroFadeIn 1.2s ease-out;
}

body:not(.page-home) .hero-content {
    animation: none;
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 900;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.5);
    letter-spacing: -0.5px;
    line-height: 1.15;
}

.hero-subtitle {
    font-size: clamp(0.9rem, 1.8vw, 1.1rem);
    line-height: 1.6;
    margin: 0 auto 0.75rem;
    max-width: 800px;
    opacity: 0.95;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
    font-weight: 400;
}

.hero-cta-buttons {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-cta-buttons .btn {
    padding: 0.35rem 1rem;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.hero-cta-buttons .btn-light {
    background: white;
    color: var(--bd-green, #006A4E);
    border: none;
}

.hero-cta-buttons .btn-light:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background: var(--gray-100);
}

.hero-cta-buttons .btn-outline-light {
    border: 2px solid white;
    color: white;
    background: transparent;
}

.hero-cta-buttons .btn-outline-light:hover {
    background: white;
    color: var(--bd-green);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Hero Carousel Specific Styles */
.hero-carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Inner-page hero — compact 12vh strip */
body:not(.page-home) .page-hero {
    min-height: 12vh;
    background-image: none !important;
    background-attachment: scroll;
}

body:not(.page-home) .hero-title {
    font-size: clamp(1.1rem, 1.8vw, 1.4rem);
    margin-bottom: 0.15rem;
}

body:not(.page-home) .hero-subtitle {
    display: none;
}

.hero-carousel .swiper-slide {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-carousel .swiper-pagination-bullet {
    background: white;
    opacity: 0.7;
    width: 12px;
    height: 12px;
}

.hero-carousel .swiper-pagination-bullet-active {
    opacity: 1;
    background: var(--bd-accent);
}

@media (max-width: 768px) {
    .page-hero {
        min-height: 12vh;
    }
    
    .hero-title {
        font-size: 1.2rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .hero-cta-buttons .btn {
        padding: 0.7rem 1.8rem;
        font-size: 1rem;
    }
}

/* ============================================================
   BLOG & DOCUMENT LIST COMPONENTS
   ============================================================ */

/* Blog post placeholder image */
.blog-placeholder {
    height: 200px;
    background: var(--gradient-blue-soft);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Blog detail featured image */
.blog-featured-image {
    max-height: 500px;
    width: 100%;
    object-fit: cover;
}

/* Blog detail placeholder */
.blog-detail-placeholder {
    height: 400px;
    background: var(--gradient-blue-soft);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Blog content prose styling */
.blog-prose {
    line-height: 1.8;
    font-size: 1.1rem;
    color: var(--gray-800);
}

.blog-prose h1, .blog-prose h2, .blog-prose h3, 
.blog-prose h4, .blog-prose h5, .blog-prose h6 {
    margin-top: 1.5em;
    margin-bottom: 0.75em;
    font-weight: 600;
    color: var(--gray-900);
}

.blog-prose h1 { font-size: 2rem; }
.blog-prose h2 { font-size: 1.75rem; }
.blog-prose h3 { font-size: 1.5rem; }
.blog-prose h4 { font-size: 1.25rem; }

.blog-prose p {
    margin-bottom: 1.25em;
}

.blog-prose ul, .blog-prose ol {
    margin-bottom: 1.25em;
    padding-left: 2em;
}

.blog-prose li {
    margin-bottom: 0.5em;
}

.blog-prose strong, .blog-prose b {
    font-weight: 600;
    color: var(--gray-900);
}

.blog-prose em, .blog-prose i {
    font-style: italic;
}

.blog-prose mark {
    background-color: #fff3cd;
    padding: 0.1em 0.3em;
    border-radius: 3px;
}

.blog-prose a {
    color: var(--bd-green);
    text-decoration: underline;
}

.blog-prose a:hover {
    color: var(--bd-red);
}

.blog-prose img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5em 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.blog-prose blockquote {
    border-left: 4px solid var(--bd-green);
    padding-left: 1.5em;
    margin: 1.5em 0;
    font-style: italic;
    color: var(--gray-700);
}

.blog-prose code {
    background-color: var(--gray-100);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.blog-prose pre {
    background-color: var(--gray-100);
    padding: 1em;
    border-radius: 6px;
    overflow-x: auto;
    margin: 1.5em 0;
}

.blog-prose pre code {
    background: none;
    padding: 0;
}

.blog-prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
}

.blog-prose table th,
.blog-prose table td {
    padding: 0.75em;
    border: 1px solid var(--gray-300);
}

.blog-prose table th {
    background-color: var(--gray-100);
    font-weight: 600;
    text-align: left;
}

.blog-prose table tr:hover {
    background-color: var(--gray-50);
}


/* ========== FOOTER ========== */
.footer {
    background-color: var(--gray-100);
    padding: 2.5rem 0;
    color: var(--gray-700);
}
.footer h5 {
    color: var(--gray-800);
    font-weight: 700;
}
.footer a {
    color: var(--gray-700);
    text-decoration: none;
}
.footer a:hover {
    color: var(--bd-green);
    text-decoration: underline;
}
.footer hr {
    border-color: rgba(0,0,0,0.06);
}
.footer .text-center p {
    margin-bottom: 0;
    color: var(--gray-600);
}

/* ============================================================
   ENHANCED STATISTICS SECTION
   ============================================================ */

.statistics-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 2.7rem 0;
    position: relative;
    overflow: hidden;
}

.statistics-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.stat-card {
    text-align: center;
    padding: 1.8rem 1rem;
    transition: all 0.3s ease;
    position: relative;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-value {
    font-size: 2.7rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--bd-green) 0%, var(--bd-green-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.4rem;
    font-family: var(--font-heading);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray-600);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============================================================
   HORIZONTAL FILTER BAR
   ============================================================ */

.filter-bar-section {
    background: #fff;
    border-bottom: 1px solid #dee2e6;
    padding: 0.6rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}

/* Inside a container (Data Analytics tabs) — not full-bleed */
.filter-bar-section--inner {
    position: static;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 0.6rem 0.75rem;
    margin-bottom: 1.25rem;
    box-shadow: none;
}

.filter-bar-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.filter-bar-search {
    flex: 1 1 180px;
    min-width: 120px;
    height: 2.1rem;
    font-size: 0.85rem;
    padding: 0.25rem 0.6rem;
}

.filter-bar-form .form-select {
    height: 2.1rem;
    font-size: 0.82rem;
    padding: 0.2rem 1.8rem 0.2rem 0.5rem;
    min-width: 90px;
    max-width: 160px;
    flex: 0 1 auto;
}

.filter-bar-form .btn-sm {
    height: 2.1rem;
    font-size: 0.82rem;
    line-height: 1;
    padding-top: 0;
    padding-bottom: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.view-toggle {
    display: flex;
    gap: 0.2rem;
    margin-left: auto;
}

/* Responsive: on mobile the bar is static and wraps */
@media (max-width: 767px) {
    .filter-bar-section {
        position: static;
    }
    .filter-bar-form .form-select {
        max-width: 100%;
        flex: 1 1 45%;
    }
    .filter-bar-search {
        flex: 1 1 100%;
    }
}

/* ============================================================
   LIST VIEW STRIP CARDS
   ============================================================ */

/* Documents grid in list view */
.docs-grid-wrapper.view-list .col-sm-6,
.datasets-grid-wrapper.view-list .col-sm-6 {
    flex: 0 0 100%;
    max-width: 100%;
}

.docs-grid-wrapper.view-list .doc-card,
.datasets-grid-wrapper.view-list .doc-card {
    flex-direction: row;
    height: auto !important;
}

.docs-grid-wrapper.view-list .card-body,
.datasets-grid-wrapper.view-list .card-body {
    flex: 1;
    padding: 0.75rem 1rem;
}

.docs-grid-wrapper.view-list .card-footer,
.datasets-grid-wrapper.view-list .card-footer {
    width: 180px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-top: 0 !important;
    border-left: 1px solid rgba(0,0,0,0.08);
    padding: 0.75rem;
}

.docs-grid-wrapper.view-list .card-title,
.datasets-grid-wrapper.view-list .card-title {
    font-size: 0.95rem;
    margin-bottom: 0.35rem !important;
}

.docs-grid-wrapper.view-list .card-text,
.datasets-grid-wrapper.view-list .card-text {
    -webkit-line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0 !important;
}

/* Dashboard chart list view: 1 chart per row */
#charts-grid.view-list .chart-card-col {
    flex: 0 0 100%;
    max-width: 100%;
}
#charts-grid.view-list canvas {
    max-height: 400px !important;
}

/* ============================================================
   ENHANCED DOCUMENT CARDS
   ============================================================ */

.document-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    position: relative;
    overflow: hidden;
}

.document-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 3px;
    background: var(--bd-green);
    transition: left 0.4s ease;
}

.document-card:hover::before {
    left: 0;
}

.document-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--bd-green) !important;
}

.badge {
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
}



/* ============================================================
   WEB MAPS PAGE
   ============================================================ */

#map-wrapper { display:flex; gap:0; height:calc(100vh - 90px); min-height:500px; }
#map-sidebar {
    width:240px; flex-shrink:0; overflow-y:auto;
    background:#fff; border-right:1px solid #dee2e6; padding:1rem;
}
#map-container { flex:1; min-width:0; }
#map-info-panel {
    width:30%; min-width:240px; flex-shrink:0; overflow-y:auto;
    background:#f8f9fa; border-left:1px solid #dee2e6; padding:1rem;
    display:flex; flex-direction:column;
}
#map-info-panel .info-panel-heading {
    font-size:.75rem; text-transform:uppercase; letter-spacing:.06em;
    color:#6c757d; font-weight:600; margin-bottom:.75rem;
}
#map-info-cards { display:flex; flex-direction:column; gap:.6rem; flex:1; }
.info-placeholder {
    color:#adb5bd; font-size:.85rem; text-align:center;
    margin:auto; display:flex; flex-direction:column; align-items:center; gap:.5rem;
}
.info-placeholder i { font-size:2rem; }
.info-card {
    background:#fff; border:1px solid #dee2e6; border-radius:.5rem;
    padding:.75rem 1rem .75rem 1rem; position:relative;
}
.info-card-close {
    position:absolute; top:.45rem; right:.6rem;
    background:none; border:none; color:#adb5bd;
    cursor:pointer; font-size:.8rem; line-height:1; padding:2px 4px;
}
.info-card-close:hover { color:#dc3545; }
.info-card-swatch {
    display:inline-block; width:11px; height:11px; border-radius:2px;
    border:1px solid rgba(0,0,0,.2); margin-right:5px; vertical-align:middle; flex-shrink:0;
}
.info-card-title { font-weight:700; font-size:.92rem; margin-bottom:.15rem; padding-right:1.4rem; }
.info-card-title-bn { font-size:.83rem; color:#6c757d; margin-bottom:.35rem; }
.info-card-type {
    display:inline-block; font-size:.68rem; padding:1px 7px; border-radius:3px;
    background:#e9ecef; color:#495057; margin-bottom:.5rem;
}
.info-card-desc    { font-size:.84rem; color:#212529; line-height:1.55; margin-bottom:.25rem; }
.info-card-desc-bn { font-size:.82rem; color:#495057; line-height:1.65; }
.info-card-nodesc  { font-size:.82rem; color:#adb5bd; font-style:italic; }
.layer-toggle { display:flex; align-items:center; gap:.5rem; margin-bottom:.65rem; font-size:.9rem; cursor:pointer; }
.layer-toggle input[type=checkbox] { cursor:pointer; }
.layer-swatch { display:inline-block; width:14px; height:14px; border-radius:2px; border:1px solid rgba(0,0,0,.3); flex-shrink:0; }
.layer-badge { font-size:.7rem; padding:1px 5px; border-radius:3px; margin-left:auto; }
.badge-processing { background:#fff3cd; color:#856404; border:1px solid #ffc107; }
.badge-error      { background:#f8d7da; color:#842029; border:1px solid #dc3545; }
.badge-pending    { background:#cfe2ff; color:#084298; border:1px solid #0d6efd; }
.maplibregl-popup-content h6 { margin:.25rem 0 .4rem; font-weight:600; }
.maplibregl-popup-content p  { margin:.2rem 0; font-size:.85rem; color:#555; }
#basemap-select { font-size:.82rem; }

@media (max-width: 992px) {
    #map-wrapper { flex-direction:column; height:auto; }
    #map-sidebar { width:100%; border-right:none; border-bottom:1px solid #dee2e6; }
    #map-container { height:55vw; min-height:300px; }
    #map-info-panel { width:100%; min-width:0; border-left:none; border-top:1px solid #dee2e6; max-height:280px; }
}

/* ============================================================
   ABOUT SECTION CARD
   ============================================================ */

.about-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 61, 165, 0.1);
    transition: all 0.3s ease;
}

.about-card:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

.about-card h2 {
    color: var(--bd-green);
    position: relative;
    padding-bottom: 1rem;
}

.about-card h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--bd-green);
    border-radius: 2px;
}

/* ============================================================
   ENHANCED BUTTONS
   ============================================================ */

.btn {
    transition: all 0.3s ease;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--bd-green) 0%, var(--bd-green-light) 100%);
    border: none;
    box-shadow: 0 4px 12px rgba(0, 106, 78, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--bd-green-dark) 0%, var(--bd-green) 100%);
    box-shadow: 0 6px 20px rgba(0, 106, 78, 0.4);
    transform: translateY(-2px);
}

.btn-outline-primary {
    border: 2px solid var(--bd-green);
    color: var(--bd-green);
    font-weight: 600;
}

.btn-outline-primary:hover {
    background: var(--bd-green);
    border-color: var(--bd-green);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 106, 78, 0.3);
}

/* ============================================================
   LOADING ANIMATIONS
   ============================================================ */

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
    border-radius: 8px;
}

/* ============================================================
   SCROLL ANIMATIONS (AOS Support)
   ============================================================ */

[data-aos] {
    pointer-events: auto;
}

.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   GLASSMORPHISM EFFECTS
   ============================================================ */

.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* ============================================================
   IMPROVED PAGINATION
   ============================================================ */

.pagination {
    gap: 0.5rem;
}

.pagination .page-link {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    color: var(--bd-green);
    font-weight: 600;
    padding: 0.6rem 1rem;
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    background: var(--bd-green);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 106, 78, 0.3);
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--bd-green), var(--bd-green-light));
    border-color: var(--bd-green);
    box-shadow: 0 4px 12px rgba(0, 106, 78, 0.3);
}

/* ============================================================
   COUNTER ANIMATION
   ============================================================ */

.counter {
    font-size: 3rem;
    font-weight: 900;
    color: var(--bd-green);
}

/* ============================================================
   RESPONSIVE UTILITIES
   ============================================================ */

@media (max-width: 992px) {
    .stat-value {
        font-size: 2.5rem;
    }
}

@media (max-width: 576px) {
    .stat-value {
        font-size: 2rem;
    }
    
    .hero-cta-buttons {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .hero-cta-buttons .btn {
        width: 100%;
    }
}


