/* app.css - Perfected */

:root {
    /* Primary Brand Colors */
    --primary: #1A3A6F; /* Deep navy blue - conveys trust and authority */
    --primary-dark: #12284D;
    --primary-light: #2A4F8A;
    --accent: #D4A017; /* Warm gold accent */
    --accent-light: #E8C874;

    /* Text & Background Colors */
    --text: #2D3748; /* Dark charcoal for main text */
    --text-light: #4A5568; /* Slightly lighter text for secondary info */
    --bg: #F8FAFC; /* Light neutral background - almost white */
    --bg-light: #FFFFFF; /* Pure white for cards and sections */
    --border-color: #E2E8F0; /* Light gray border */
    --highlight-bg: #E3F2FD; /* Light blue for subtle highlights/hover */

    /* Shadows & Transitions */
    --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* ===== Square Law Cards ===== */
.laws-scroll-section {
    position: relative;
    z-index: 2;
    background-color: var(--bg-light);
}

.laws-scroll-wrapper {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding: 1rem 0 2rem;
    scroll-behavior: smooth;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.laws-scroll-wrapper::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome, Safari and Opera */
}

.law-card {
    width: 280px;
    height: 280px;
    border-radius: 16px;
    padding: 2rem;
    background: var(--bg-light);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.law-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--accent), var(--primary));
    transition: var(--transition);
}

.law-card::after {
    content: '';
    position: absolute;
    bottom: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(212, 160, 23, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.law-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.law-card:hover::before {
    height: 8px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.law-card-content {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.law-card-icon {
    font-size: 2.2rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.law-card:hover .law-card-icon {
    transform: rotate(10deg) scale(1.1);
    color: var(--primary);
}

.law-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: var(--primary-dark);
    line-height: 1.4;
    transition: color 0.3s ease;
}

.law-card:hover .law-card-title {
    color: var(--primary);
}

.law-card-category {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    background-color: var(--primary-light);
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    margin-bottom: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.law-card-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.law-card-article {
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
}

.law-card-article::before {
    content: '\f02d';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--accent);
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 991.98px) {
    .law-card {
        width: 260px;
        height: 260px;
        padding: 1.8rem;
    }
}

@media (max-width: 767.98px) {
    .law-card {
        width: 240px;
        height: 240px;
        padding: 1.5rem;
    }
    
    .law-card-title {
        font-size: 1.15rem;
    }
    
    .law-card-description {
        font-size: 0.85rem;
    }
    
    .law-card-icon {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }
}
body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text);
    background-color: var(--bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    padding-top: 90px;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'EB Garamond', serif;
    font-weight: 700;
    color: var(--primary-dark);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}
a:hover {
    color: var(--primary-dark);
}

/* --- Utility Classes --- */
.text-primary-color { color: var(--primary) !important; }
.text-primary-dark { color: var(--primary-dark) !important; }
.text-accent-color { color: var(--accent) !important; }
.bg-primary-color { background-color: var(--primary) !important; }
.bg-accent-color { background-color: var(--accent) !important; }

/* --- Navbar Styles --- */
.navbar {
    background-color: var(--bg-light);
    box-shadow: var(--shadow-sm);
    padding: 0.8rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1030;
    transition: var(--transition); /* Add transition for scroll effect */
}

.navbar.scrolled {
    padding: 0.6rem 0; /* Slightly reduce padding on scroll */
    box-shadow: var(--shadow-md); /* Enhance shadow on scroll */
}

.navbar-brand .logo-img {
    height:105px; /* Set a default height */
    width: auto;
    transition: var(--transition);
}

.navbar.scrolled .navbar-brand .logo-img {
    height: 55px; /* Slightly smaller logo when scrolled */
}

.navbar-brand .logo-img:hover {
    transform: scale(1.03);
}

.nav-link {
    color: var(--primary);
    font-weight: 600;
    margin: 0 0.8rem;
    padding: 0.6rem 1.2rem;
    position: relative;
    transition: var(--transition);
    font-size: 1.05rem; /* Slightly larger font size for clarity */
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background-color: var(--accent);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-dark);
}
.nav-link:hover::after,
.nav-link.active { /* Apply active styles directly */
    color: var(--primary-dark) !important; /* Ensure active link color is strong */
    font-weight: 700;
}
.nav-link.active::after { /* Active underline */
    width: 100%;
}


/* Call-to-Action (AI Assistant) Button in Navbar */
.nav-cta {
    background-color: var(--accent); /* Gold color for distinct CTA */
    color: white !important; /* Ensure text is white */
    padding: 0.75rem 1.75rem; /* Generous padding */
    border-radius: 50px; /* Pill shape */
    margin-left: 1.5rem; /* Space from other nav links */
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(212, 160, 23, 0.4); /* Gold glow shadow */
    transition: var(--transition);
    text-decoration: none !important; /* Remove default underline */
    display: inline-flex; /* Align icon and text */
    align-items: center;
    gap: 0.5rem; /* Space between icon and text */
    border: 1px solid transparent; /* subtle border to prevent shift on hover */
}

.nav-cta:hover {
    background-color: var(--accent-light); /* Lighter gold on hover */
    color: var(--primary-dark) !important; /* Darker text for contrast */
    transform: translateY(-3px) scale(1.02); /* More pronounced lift */
    box-shadow: 0 8px 20px rgba(212, 160, 23, 0.6); /* Stronger glow */
    border-color: var(--accent);
}

.nav-cta .fas {
    font-size: 1.1rem; /* Adjust icon size */
}

.navbar-toggler {
    border: none;
    padding: 0.5rem; /* Add padding for click area */
    transition: var(--transition);
}
.navbar-toggler:focus {
    box-shadow: 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='%231A3A6F' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
    /* Custom toggler icon color (Primary Blue) */
}


/* --- Hero Section (for Homepage) --- */
.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('/images/hero-bg.jpg') no-repeat center center;
    background-size: cover;
    color: white;
    padding: 8rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(212, 160, 23, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.hero-section h1 {
    font-size: 3.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: white; /* Override for hero */
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.hero-section p.lead {
    font-size: 1.3rem;
    max-width: 700px;
    margin: 0 auto 2.5rem auto;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
}

.hero-search-container {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 1.8rem 2.5rem;
    box-shadow: var(--shadow-lg);
    max-width: 800px;
    margin: 0 auto;
}

.hero-search-container .form-control {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.9rem 1.2rem;
    font-size: 1.1rem;
    box-shadow: none !important;
}

.hero-search-container .input-group-text {
    background-color: transparent;
    border: 1px solid var(--border-color);
    border-right: none;
    border-radius: 8px 0 0 8px;
    color: var(--text-light);
    padding: 0.9rem 1rem;
}

.hero-search-container .btn-primary {
    padding: 0.9rem 2rem;
    font-size: 1.1rem;
    border-radius: 8px;
}

/* --- Features Section (for Homepage) --- */
.features-section {
    padding: 6rem 0;
    background-color: var(--bg);
}

.feature-icon {
    font-size: 3.5rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.feature-card {
    background-color: var(--bg-light);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    height: 100%; /* Ensure cards are same height */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.feature-card:hover .feature-icon {
    color: var(--primary-dark);
    transform: scale(1.1);
}

.feature-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

.feature-card p {
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.7;
}

/* --- Call to Action (for Homepage) --- */
.cta-section {
    background: linear-gradient(rgba(26, 58, 111, 0.9), rgba(26, 58, 111, 0.9)), url('/images/cta-bg.jpg') no-repeat center center;
    background-size: cover;
    padding: 5rem 0;
    color: white;
    text-align: center;
    border-top: 5px solid var(--accent);
    border-bottom: 5px solid var(--accent);
}

.cta-section h2 {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
    color: white;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

.cta-section p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 2.5rem auto;
    color: rgba(255, 255, 255, 0.9);
}

.cta-section .btn-light {
    background-color: var(--accent-light);
    color: var(--primary-dark);
    font-weight: 700;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-size: 1.15rem;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    border: none;
}

.cta-section .btn-light:hover {
    background-color: white;
    color: var(--primary-dark);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* --- Page Header (for Law Listing) --- */
.page-header {
    background-color: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 2.5rem;
    margin-bottom: 3.5rem;
    position: relative;
    z-index: 1;
}
.page-header h2 {
    font-size: 2.8rem;
    margin-bottom: 0.5rem !important;
    color: var(--primary-dark);
    position: relative;
    padding-bottom: 0.5rem;
    display: inline-block;
}
.page-header h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 80px;
    height: 4px;
    background-color: var(--accent);
    border-radius: 2px;
}
.page-header p {
    font-size: 1.1rem;
    color: var(--text-light);
}

/* --- Search and Filter Section (for Law Listing) --- */
.search-filter-card {
    background-color: var(--bg-light);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    padding: 2rem;
    margin-bottom: 4rem;
}

.input-group .form-control {
    border-color: var(--border-color);
    border-radius: 8px;
    padding: 0.8rem 1.2rem;
    font-size: 1rem;
    color: var(--text);
    box-shadow: none !important;
    transition: border-color 0.3s ease;
}
.input-group .form-control:focus {
    border-color: var(--primary);
}

.input-group-text {
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-right: none;
    border-radius: 8px 0 0 8px;
    color: var(--text-light);
    padding: 0.8rem 1rem;
}

.search-input {
    border-left: none;
    border-radius: 0 8px 8px 0;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    font-weight: 600;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    color: white; /* Ensure text is white for primary buttons */
}
.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.btn-outline-secondary {
    border-color: var(--text-light);
    color: var(--text-light);
    font-weight: 500;
    padding: 0.8rem 1.8rem;
    border-radius: 0.6rem;
    transition: var(--transition);
}
.btn-outline-secondary:hover {
    background-color: var(--text-light);
    color: white;
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

/* --- Law Cards (for Law Listing) --- */
.law-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    margin-bottom: 1.8rem;
    background-color: var(--bg-light);
    border-left: 6px solid var(--accent);
}

.law-card:hover {
    transform: translateY(-7px);
    box-shadow: var(--shadow-lg);
    border-left-color: var(--primary);
}

.law-card .card-body {
    padding: 2rem;
}

.law-card h5 {
    font-size: 1.6rem;
    margin-bottom: 0.75rem;
}

.law-link {
    color: var(--primary-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}
.law-link:hover {
    color: var(--primary);
    text-decoration: underline;
}

.law-card .text-muted {
    color: var(--text-light) !important;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem !important;
}

.info-badge {
    background-color: var(--primary-light);
    color: white;
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.date-badge {
    background-color: rgba(26, 58, 111, 0.08); /* Using primary color with opacity */
    color: var(--primary-dark);
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 500;
}
.date-badge i {
    color: var(--primary-light);
}

.view-details-btn {
    background-color: var(--accent);
    border-color: var(--accent);
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    white-space: nowrap;
}
.view-details-btn:hover {
    background-color: var(--accent-light);
    border-color: var(--accent-light);
    color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* --- Pagination --- */
.pagination {
    justify-content: center;
    margin-top: 4rem;
}

.page-item .page-link {
    color: var(--primary);
    border-color: var(--border-color);
    margin: 0 0.25rem;
    border-radius: 8px !important;
    transition: var(--transition);
    padding: 0.75rem 1rem;
    min-width: 45px;
    text-align: center;
}
.page-item .page-link:hover {
    background-color: var(--highlight-bg);
    color: var(--primary-dark);
    border-color: var(--primary-light);
}

.page-item.active .page-link {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}
.page-item.active .page-link:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: white;
}

/* --- No Results (for Law Listing) --- */
.no-results-container {
    background-color: var(--bg-light);
    border-radius: 12px;
    padding: 4rem 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px dashed var(--border-color);
}
.no-results-icon {
    font-size: 6rem;
    color: var(--accent-light);
    opacity: 0.6;
    margin-bottom: 2rem;
}
.no-results-container h4 {
    font-size: 2rem;
    color: var(--primary-dark);
}
.no-results-container p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2.5rem;
}
.btn-reset-search {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
    font-weight: 600;
    padding: 0.9rem 2.2rem;
    border-radius: 50px;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}
.btn-reset-search:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* --- Law Detail Page Specific Styles --- */
.law-detail-hero {
    background-color: var(--primary-dark);
    color: white;
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.law-detail-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(212, 160, 23, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.law-detail-hero h1 {
    font-size: 3.5rem;
    color: white;
    margin-bottom: 1rem;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.law-detail-meta {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.law-detail-meta span {
    display: flex;
    align-items: center;
}

.law-detail-meta i {
    margin-right: 0.75rem;
    color: var(--accent-light);
    font-size: 1.3rem;
}

.law-content-section {
    background-color: var(--bg-light);
    padding: 4rem 0;
    border-top: 1px solid var(--border-color);
}

.law-card-detailed {
    background-color: white;
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    padding: 3.5rem;
}

.law-card-detailed h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-dark);
    position: relative;
    padding-bottom: 1rem;
    display: inline-block;
}

.law-card-detailed h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 4px;
    background-color: var(--accent);
    border-radius: 2px;
}

.law-card-detailed p {
    font-size: 1.15rem;
    color: var(--text);
    line-height: 1.9;
    margin-bottom: 1.8rem;
    text-align: justify;
}

.law-card-detailed strong {
    color: var(--primary-dark);
    font-weight: 700;
}

.law-sections h3 {
    font-size: 2rem;
    color: var(--primary);
    margin-top: 2.5rem;
    margin-bottom: 1.2rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.75rem;
    position: relative;
}

.law-sections h3::before {
    content: "\f02d"; /* Book icon */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: var(--accent);
    margin-right: 0.75rem;
    font-size: 1.5rem;
    position: absolute;
    left: -2.2rem; /* Adjusted for alignment */
    top: 50%;
    transform: translateY(-50%);
}

.law-sections ul {
    list-style: none;
    padding-left: 0;
}

.law-sections ul li {
    background-color: var(--bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 0.8rem;
    padding: 1.2rem 1.5rem;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: flex-start;
}

.law-sections ul li:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.law-sections ul li i {
    color: var(--primary-light);
    margin-right: 1rem;
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 0.2rem;
}

.law-sections ul li a {
    font-size: 1.05rem;
    color: var(--primary-dark);
    font-weight: 600;
    line-height: 1.5;
    flex-grow: 1;
}

.law-sections ul li a:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* Sidebar styles */
.sidebar {
    position: sticky;
    top: 110px; /* Adjust based on navbar height */
    padding: 1.5rem;
    background-color: var(--bg-light);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.sidebar h4 {
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    color: var(--primary-dark);
    position: relative;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 40px;
    height: 3px;
    background-color: var(--accent);
    border-radius: 2px;
}

.sidebar-list {
    list-style: none;
    padding-left: 0;
}

.sidebar-list li {
    margin-bottom: 0.7rem;
}

.sidebar-list a {
    display: block;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    color: var(--text-light);
    transition: var(--transition);
    font-weight: 500;
    font-size: 0.95rem;
}

.sidebar-list a:hover {
    background-color: var(--highlight-bg);
    color: var(--primary-dark);
    transform: translateX(5px);
}

.sidebar-list a.active {
    background-color: var(--primary);
    color: white;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

.sidebar-list a.active:hover {
    background-color: var(--primary-dark);
    color: white;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--primary);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
}

.back-to-top:hover {
    background-color: var(--primary-dark);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

/* --- Modal Styles --- */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: var(--shadow-lg);
}
.modal-header {
    background-color: var(--primary-light);
    color: white;
    border-bottom: none;
    padding: 1.5rem;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}
.modal-header .modal-title {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
}
.modal-header .btn-close {
    filter: invert(1) brightness(2);
}
.modal-body {
    padding: 2rem 1.5rem;
}
.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
}
.form-label {
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 0.75rem;
}
.modal .form-control, .modal .form-select {
    border-color: var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    color: var(--text);
    box-shadow: none !important;
    transition: border-color 0.3s ease;
}
.modal .form-control:focus, .modal .form-select:focus {
    border-color: var(--primary);
}

/* --- Footer Styles --- */
.footer {
    background-color: var(--primary-dark);
    color: #E0E7FF;
    padding: 5rem 0 3rem;
    font-size: 0.925rem;
    line-height: 1.75;
    border-top: 6px solid var(--accent);
    margin-top: 6rem;
}

.footer h5 {
    font-family: 'EB Garamond', serif;
    color: #FFFFFF;
    font-weight: 700;
    margin-bottom: 1.75rem;
    position: relative;
    padding-bottom: 0.6rem;
    font-size: 1.45rem;
}

.footer h5::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 3px;
    background-color: var(--accent);
    border-radius: 2px;
}

.footer p {
    color: #E0E7FF;
    margin-bottom: 0.75rem;
}

.footer p i {
    color: var(--accent-light);
    margin-right: 0.8rem;
    font-size: 1.15rem;
    width: 25px;
    text-align: center;
}

.footer-logo {
    max-width: 180px;
    height: auto;
    display: block;
    margin-bottom: 1.5rem;
}

.social-icons {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-start;
}
.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #E0E7FF;
    border-radius: 50%;
    font-size: 1.2rem;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.social-icons a:hover {
    background-color: var(--accent);
    color: var(--primary-dark);
    transform: translateY(-4px) scale(1.08);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.footer-links a {
    color: #E0E7FF;
    text-decoration: none;
    padding: 0.2rem 0;
    transition: var(--transition);
    position: relative;
    padding-left: 1.5rem;
}
.footer-links a::before {
    content: "\f105";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    color: var(--accent-light);
    font-size: 0.85rem;
    top: 50%;
    transform: translateY(-50%) scale(0.8);
    opacity: 0;
    transition: var(--transition);
}
.footer-links a:hover {
    color: var(--accent);
    transform: translateX(8px);
}
.footer-links a:hover::before {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

.footer h6 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    margin-top: 2.5rem;
    margin-bottom: 1.2rem;
    font-size: 1rem;
}

.newsletter-group .form-control {
    background-color: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #E0E7FF;
    padding: 0.85rem 1.1rem;
    border-radius: 0.6rem 0 0 0.6rem;
    font-size: 0.95rem;
}
.newsletter-group .form-control::placeholder {
    color: rgba(255, 255, 255, 0.65);
}
.newsletter-group .form-control:focus {
    background-color: rgba(255, 255, 255, 0.18);
    border-color: var(--accent);
    box-shadow: 0 0 0 0.3rem rgba(212, 160, 23, 0.35);
}
.newsletter-group .btn {
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    border: none;
    color: var(--primary-dark);
    font-weight: 700;
    padding: 0.85rem 1.75rem;
    border-radius: 0 0.6rem 0.6rem 0;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.02em;
}
.newsletter-group .btn:hover {
    opacity: 0.95;
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

.copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    margin-top: 4rem;
    padding-top: 2rem;
    font-size: 0.825rem;
    color: rgba(255, 255, 255, 0.6);
}
.copyright a {
    color: var(--accent-light);
    text-decoration: none;
    transition: var(--transition);
}
.copyright a:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* --- About Us Page Specific Styles --- */
.about-hero-section {
    background: linear-gradient(rgba(26, 58, 111, 0.9), rgba(18, 40, 77, 0.9)), url('/images/about-hero-bg.jpg') no-repeat center center;
    background-size: cover;
    background-position: center;
    color: white;
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
    padding-top: calc(6rem + 90px); /* Adjust for fixed navbar */
}

.about-hero-section h1 {
    font-size: 3.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: white;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}
.about-hero-section p.lead {
    font-size: 1.3rem;
    max-width: 700px;
    margin: 0 auto 2.5rem auto;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
}


.mission-section-card { /* Renamed for clarity to avoid conflict with section container */
    background-color: var(--highlight-bg);
    border-radius: 12px;
    padding: 4rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.mission-section-card h2 {
    font-size: 2.5rem;
    color: var(--primary-dark);
}

.mission-section-card .fa-check-circle {
    color: var(--primary) !important;
    font-size: 1.2rem;
}

/* Feature cards specific to About Us page */
.about-feature-card { /* New class for specific About page feature cards */
    background-color: var(--bg-light);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.about-feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.about-feature-card .icon-wrapper {
    width: 65px;
    height: 65px;
    background-color: var(--highlight-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.about-feature-card:hover .icon-wrapper {
    background-color: var(--accent);
    color: white;
    transform: scale(1.05);
}

.about-feature-card h4 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

.about-feature-card p {
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.7;
}

/* Responsive Adjustments */
@media (max-width: 991.98px) {
    body {
        padding-top: 75px;
    }
    .hero-section {
        padding: 6rem 0;
    }
    .about-hero-section {
        padding: calc(6rem + 75px) 0 6rem 0; /* Adjust for fixed navbar on smaller screens */
    }
    .hero-section h1, .about-hero-section h1 {
        font-size: 3rem;
    }
    .hero-section p.lead, .about-hero-section p.lead {
        font-size: 1.1rem;
    }
    .hero-search-container {
        padding: 1.5rem;
    }
    .hero-search-container .form-control, .hero-search-container .btn-primary {
        font-size: 1rem;
        padding: 0.8rem 1.5rem;
    }
    .features-section {
        padding: 4rem 0;
    }
    .feature-card {
        padding: 2rem;
    }
    .feature-card h3 {
        font-size: 1.6rem;
    }
    .cta-section {
        padding: 4rem 0;
    }
    .cta-section h2 {
        font-size: 2.2rem;
    }
    .cta-section p {
        font-size: 1.1rem;
    }
    .page-header h2 {
        font-size: 2.2rem;
    }
    .page-header p {
        font-size: 1rem;
    }
    .search-filter-card {
        padding: 1.5rem;
    }
    .search-filter-card .row > div:first-child {
        margin-bottom: 1rem;
    }
    .law-card .card-body {
        padding: 1.5rem;
    }
    .law-card h5 {
        font-size: 1.4rem;
    }
    .law-card .text-muted {
        font-size: 0.9rem;
    }
    .law-card .d-flex.justify-content-between {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 1rem;
    }
    .law-card .w-75 {
        width: 100% !important;
    }
    .view-details-btn {
        align-self: flex-start !important;
        width: auto;
    }
    .pagination {
        margin-top: 3rem;
    }
    .law-detail-hero h1 {
        font-size: 2.5rem;
    }
    .law-detail-meta {
        font-size: 1rem;
        gap: 1rem;
    }
    .law-card-detailed {
        padding: 2.5rem;
    }
    .law-card-detailed h2 {
        font-size: 2rem;
    }
    .law-card-detailed p {
        font-size: 1rem;
    }
    .law-sections h3 {
        font-size: 1.6rem;
    }
    .law-sections ul li {
        padding: 1rem 1.2rem;
    }
    .sidebar {
        margin-top: 2rem;
    }

    .mission-section-card {
        padding: 2.5rem;
    }
    .mission-section-card h2 {
        font-size: 2rem;
    }
    .about-feature-card {
        padding: 2rem;
    }
    .about-feature-card h4 {
        font-size: 1.4rem;
    }

    /* Navbar collapsed menu */
    .navbar-collapse {
        background-color: var(--bg-light); /* Background for collapsed menu */
        border-top: 1px solid var(--border-color);
        padding: 1rem;
        margin-top: 0.5rem; /* Space from brand/toggler */
        border-radius: 8px; /* Slightly rounded for the dropdown */
        box-shadow: var(--shadow-sm);
    }
    .nav-item {
        margin: 0.5rem 0; /* Vertical spacing for nav items */
        text-align: center;
    }
    .nav-link {
        padding: 0.8rem 1rem;
        font-size: 1rem;
    }
    .nav-link::after {
        bottom: 0; /* Adjust underline position for mobile */
        height: 2px; /* Thinner underline for mobile */
    }
    .nav-cta {
        width: fit-content; /* Adjust width for mobile */
        margin: 1rem auto; /* Center button on mobile */
        display: flex;
        justify-content: center;
    }
}

@media (max-width: 767.98px) {
    .navbar-brand .logo-img {
        height: 50px;
    }
    .hero-section {
        padding: 5rem 0;
    }
    .about-hero-section {
        padding: calc(5rem + 75px) 0 5rem 0; /* Further adjust for mobile navbar */
    }
    .hero-section h1, .about-hero-section h1 {
        font-size: 2.5rem;
    }
    .hero-section p.lead, .about-hero-section p.lead {
        font-size: 1rem;
    }
    .hero-search-container {
        padding: 1rem;
    }
    .hero-search-container .form-control, .hero-search-container .btn-primary {
        font-size: 0.9rem;
        padding: 0.7rem 1rem;
    }
    .features-section {
        padding: 3rem 0;
    }
    .feature-card {
        padding: 1.5rem;
    }
    .feature-card h3 {
        font-size: 1.4rem;
    }
    .cta-section {
        padding: 3rem 0;
    }
    .cta-section h2 {
        font-size: 1.8rem;
    }
    .cta-section p {
        font-size: 1rem;
    }
    .page-header {
        padding-bottom: 2rem;
        margin-bottom: 2.5rem;
    }
    .page-header h2 {
        font-size: 1.8rem;
    }
    .page-header p {
        font-size: 0.95rem;
    }
    .search-filter-card {
        padding: 1rem;
        margin-bottom: 3rem;
    }
    .input-group .form-control, .input-group-text, .btn-primary {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    .btn-outline-secondary {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    .law-card .card-body {
        padding: 1rem;
    }
    .law-card h5 {
        font-size: 1.2rem;
    }
    .law-card .text-muted {
        font-size: 0.85rem;
    }
    .info-badge, .date-badge {
        font-size: 0.7rem;
        padding: 0.4rem 0.8rem;
    }
    .view-details-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }
    .modal-body {
        padding: 1.5rem 1rem;
    }
    .modal-footer {
        flex-direction: column;
        gap: 0.75rem;
    }
    .modal-footer .btn {
        width: 100%;
    }
    .law-detail-hero h1 {
        font-size: 2rem;
    }
    .law-detail-meta {
        flex-direction: column;
        align-items: center;
        gap: 0.8rem;
    }
    .law-card-detailed {
        padding: 1.5rem;
    }
    .law-card-detailed h2 {
        font-size: 1.8rem;
    }
    .law-card-detailed p {
        font-size: 0.95rem;
    }
    .law-sections h3 {
        font-size: 1.4rem;
        padding-left: 2rem;
    }
    .law-sections h3::before {
        left: 0;
        font-size: 1.2rem;
    }
    .law-sections ul li {
        padding: 0.8rem 1rem;
    }
    .law-sections ul li a {
        font-size: 0.9rem;
    }
    .back-to-top {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
        bottom: 1.5rem;
        right: 1.5rem;
    }

    .mission-section-card {
        padding: 1.5rem;
    }
    .mission-section-card h2 {
        font-size: 1.8rem;
    }
    .about-feature-card {
        padding: 1.5rem;
    }
    .about-feature-card h4 {
        font-size: 1.2rem;
    }
    .hero-illustration {
        display: none; /* Hide illustration on very small screens if it causes layout issues */
    }
    
}