:root {
    --primary: #151548;
    --primary-dark: #0d0d30;
    --primary-light: #1f1f6a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #f8f9fa;
    color: #1a1a2e;
    line-height: 1.6;
}

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

/* Navbar */
.navbar {
    background: var(--primary) !important;
    padding: 12px 0;
    box-shadow: 0 2px 15px rgba(21,21,72,0.3);
}
.navbar-brand {
    font-weight: 800;
    font-size: 1.2rem;
}
.navbar-brand .brand-text {
    background: linear-gradient(135deg, #fff 60%, #c9a84c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.navbar .nav-link {
    color: rgba(255,255,255,0.85) !important;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 8px 16px;
    border-radius: 8px;
}
.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: #fff !important;
    background: rgba(255,255,255,0.12);
}
.navbar .form-control {
    border-radius: 20px;
    border: none;
}
.navbar .form-control:focus {
    box-shadow: 0 0 0 2px rgba(255,255,255,0.3);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 80px 0 60px;
    position: relative;
}
.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.02em;
}
.hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.8);
    max-width: 600px;
    margin: 0 auto;
}
.search-wrapper {
    background: #fff;
    border-radius: 50px;
    padding: 4px 4px 4px 20px;
    display: flex;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 8px 40px rgba(0,0,0,0.25);
}
.search-input {
    border: none;
    padding: 12px 16px;
    flex: 1;
    outline: none;
    font-size: 1rem;
}
.search-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}
.search-btn:hover {
    background: var(--primary-light);
}
.search-examples {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}
.search-example {
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
    padding: 2px 12px;
    background: rgba(255,255,255,0.08);
    border-radius: 20px;
    transition: all 0.3s ease;
}
.search-example:hover {
    color: #fff;
    background: rgba(255,255,255,0.18);
}

/* Section Title */
.section-title {
    font-weight: 800;
    color: var(--primary);
    font-size: 2rem;
}
.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 4px;
    background: var(--primary);
    margin: 10px auto 0;
    border-radius: 2px;
}

/* Chapter Card */
.chapter-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid rgba(0,0,0,0.04);
}
.chapter-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}
.chapter-number {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.chapter-title {
    font-weight: 600;
    margin: 4px 0 8px;
}

/* Section Card */
.section-card {
    background: #fff;
    border-radius: 10px;
    padding: 16px 20px;
    border-left: 4px solid var(--primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    position: relative;
    height: 100%;
}
.section-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}
.section-card .section-number {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--primary);
}
.section-card .section-title-text {
    margin: 2px 0 0;
    font-size: 0.85rem;
}
.section-card .stretched-link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

/* Section List Item */
.section-list-item {
    background: #fff;
    border-radius: 8px;
    padding: 12px 16px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    height: 100%;
}
.section-list-item:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.section-list-item .section-number {
    font-weight: 700;
    color: var(--primary);
    font-size: 0.85rem;
    display: block;
}
.section-list-item .section-title-text {
    margin: 2px 0 0;
    font-size: 0.85rem;
    color: #1a1a2e;
}

/* Stat Box */
.stat-box {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.stat-box h3 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin: 0;
}
.stat-box p {
    color: #6c757d;
    margin: 0;
    font-size: 0.85rem;
}

/* Chapter View */
.chapter-header {
    background: #fff;
    padding: 24px 32px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.chapter-header .badge {
    font-size: 0.8rem;
    padding: 4px 12px;
}

/* Section View */
.section-header {
    background: #fff;
    padding: 24px 32px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.section-header .badge {
    font-size: 0.8rem;
    padding: 4px 12px;
}

.legal-text-container {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.legal-text-header {
    background: var(--primary);
    color: #fff;
    padding: 12px 24px;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}
.legal-text-body {
    padding: 24px;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 1.05rem;
    line-height: 1.8;
}

.explanation-container {
    background: #f0f7ff;
    border-radius: 12px;
    border-left: 4px solid #4a9eff;
    overflow: hidden;
}
.explanation-header {
    background: #4a9eff;
    color: #fff;
    padding: 12px 24px;
    font-weight: 600;
    font-size: 0.9rem;
}
.explanation-body {
    padding: 20px 24px;
    font-size: 1rem;
    line-height: 1.7;
}
.explanation-footer {
    padding: 12px 24px;
    background: rgba(74,158,255,0.08);
    border-top: 1px solid rgba(74,158,255,0.15);
}

.info-panel {
    background: #fff;
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.info-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
    display: block;
}
.info-value {
    font-weight: 500;
    color: #1a1a2e;
}

.section-navigation {
    background: #fff;
    border-radius: 12px;
    padding: 16px 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.nav-link-prev,
.nav-link-next {
    display: flex;
    flex-direction: column;
    padding: 4px 8px;
}
.nav-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
}
.nav-section {
    font-weight: 600;
    color: #1a1a2e;
}

.jump-section form {
    max-width: 300px;
}

/* Search Results */
.search-result-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border-left: 4px solid var(--primary);
    transition: all 0.3s ease;
}
.search-result-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

/* Footer */
.footer {
    background: var(--primary-dark);
    color: #fff;
    padding: 30px 0;
    margin-top: 40px;
}

/* Breadcrumb */
.breadcrumb {
    background: transparent;
    padding: 0;
}
.breadcrumb-item a {
    color: var(--primary);
}
.breadcrumb-item.active {
    color: #6c757d;
}

/* Responsive */
@media (max-width: 992px) {
    .hero-title {
        font-size: 2.5rem;
    }
    .search-wrapper {
        flex-direction: column;
        border-radius: 12px;
        padding: 8px;
    }
    .search-input {
        width: 100%;
        padding: 12px;
        border-radius: 8px;
        background: #f8f9fa;
    }
    .search-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    .hero-subtitle {
        font-size: 1rem;
    }
    .section-title {
        font-size: 1.5rem;
    }
    .section-header {
        padding: 16px 20px;
    }
    .legal-text-body {
        padding: 16px;
        font-size: 0.95rem;
    }
    .chapter-header {
        padding: 16px 20px;
    }
    .info-panel {
        padding: 16px;
    }
    .stat-box h3 {
        font-size: 1.5rem;
    }
    .chapter-card {
        padding: 16px 20px;
    }
    .section-list-item {
        padding: 10px 14px;
    }
    .section-card {
        padding: 12px 16px;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 1.6rem;
    }
    .search-example {
        font-size: 0.75rem;
        padding: 2px 8px;
    }
    .search-result-card {
        padding: 16px;
    }
    .section-navigation .row {
        flex-direction: column;
        gap: 8px;
    }
    .section-navigation .col-6 {
        width: 100%;
        text-align: center !important;
    }
}