/* Import Fonts: Inter (UI) and Playfair Display (Headings) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Playfair+Display:wght@600;700;800&display=swap');

:root {
    /* Authoritative Palette */
    --primary-navy: #002147;     /* Oxford Blue - Trust, Stability */
    --secondary-blue: #003366;   /* Deep Blue */
    --accent-gold: #C5A065;      /* Muted Gold - Legal/Premium feel */
    
    /* Neutrals */
    --text-dark: #1a1a1a;
    --text-slate: #4a5568;
    --bg-body: #F4F6F8;          /* Professional Light Grey */
    --bg-white: #ffffff;
    
    /* Borders & Shadows */
    --border-subtle: rgba(0, 33, 71, 0.08);
    --shadow-diffused: 0 20px 40px -10px rgba(0, 33, 71, 0.08), 0 10px 20px -10px rgba(0, 33, 71, 0.04);
    --shadow-hover: 0 25px 50px -12px rgba(0, 33, 71, 0.15);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

/* Typography Authority */
h1, h2, h3, h4, h5, .navbar-brand, .serif-font {
    font-family: 'Playfair Display', serif;
    color: var(--primary-navy);
}

.text-gold { color: var(--accent-gold); }
.text-navy { color: var(--primary-navy); }
.text-slate { color: var(--text-slate); }

/* Navbar */
.navbar {
    background-color: var(--bg-white) !important;
    border-bottom: 1px solid var(--border-subtle);
    padding: 1.25rem 0;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.6rem;
    letter-spacing: -0.02em;
}

/* Professional Cards */
.card {
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    box-shadow: var(--shadow-diffused);
    background: var(--bg-white);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.shadow-diffused {
    box-shadow: var(--shadow-diffused) !important;
}

/* Buttons */
.btn {
    border-radius: 4px;
    padding: 0.6rem 1.25rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--primary-navy);
    border-color: var(--primary-navy);
}

.btn-primary:hover {
    background-color: var(--secondary-blue);
    border-color: var(--secondary-blue);
    transform: translateY(-1px);
}

.btn-outline-secondary {
    border-color: #cbd5e0;
    color: var(--text-slate);
}

.btn-outline-secondary:hover {
    background-color: #f7fafc;
    color: var(--primary-navy);
    border-color: var(--primary-navy);
}

/* Quick-Tap Pills */
.btn-pill-custom {
    background-color: #f1f5f9;
    color: var(--text-slate);
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
}

.btn-pill-custom:hover {
    background-color: var(--primary-navy);
    color: #ffffff;
    border-color: var(--primary-navy);
    transform: translateY(-1px);
}

/* Form Controls */
.form-control, .form-select {
    border-color: #e2e8f0;
    border-radius: 4px;
    padding: 0.75rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-navy);
    box-shadow: 0 0 0 3px rgba(0, 33, 71, 0.1);
}

/* Hero Section */
.hero-section {
    padding: 3rem 0;
}

/* Statute Page Specifics */
.statute-hero {
    background: linear-gradient(135deg, var(--primary-navy) 0%, var(--secondary-blue) 100%);
    color: white;
    border-radius: 8px;
    padding: 3rem;
    margin-bottom: 2.5rem;
    position: relative;
    overflow: hidden;
}

.statute-hero h1, .statute-hero h2, .statute-hero .serif-font {
    color: white;
}

.statute-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: var(--accent-gold);
}

.statute-number {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    font-weight: 700;
    line-height: 1;
    color: var(--accent-gold);
}

/* Footer */
.footer {
    background-color: var(--bg-white);
    border-top: 1px solid var(--border-subtle);
    padding: 2rem 0;
    color: var(--text-slate);
}

/* Animation utility */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-in-up {
    animation: fadeInUp 0.3s ease forwards;
}

/* --- Monetization Styles --- */

/* Native Ads */
.native-ad-wrapper {
    position: relative;
    overflow: hidden;
}

.native-ad-wrapper .ad-content {
    background-color: #fafafa;
    border: 1px dashed #e2e8f0;
    color: #a0aec0;
}

/* Mobile Sticky CTA */
.fixed-bottom {
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
}

.line-height-1 {
    line-height: 1.2;
}

/* Footer overlap prevention */
@media (max-width: 991.98px) {
    .footer {
        padding-bottom: 90px !important;
    }
}

/* --- Semantic UI / Tom Select Overrides (FIXED) --- */

/* 1. The Main Input Container */
.ts-control {
    min-height: 48px !important; /* Match typical button height */
    border: 1px solid rgba(34, 36, 38, 0.15) !important; /* Subtle grey border */
    border-radius: 0.375rem !important; /* Bootstrap-like rounding */
    padding: 0 14px !important; 
    padding-right: 3rem !important; /* CRITICAL: Make room for the arrow */
    box-shadow: none !important;
    background-color: #fff; /* Use background-color to NOT overwrite background-image arrow */
    display: flex;
    align-items: center; /* Vertically center text */
    flex-wrap: nowrap !important; /* CRITICAL: PREVENTS CURSOR DROPPING TO NEXT LINE */
    overflow: hidden;
    transition: border-color 0.1s ease, box-shadow 0.1s ease;
}

/* 2. The Selected Item Text */
.ts-control .item {
    font-weight: 500;
    color: rgba(0,0,0,0.87);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 4px; 
    flex-shrink: 1; /* Allow text to shrink if needed */
    min-width: 0; /* Allow text-overflow: ellipsis to work inside flex */
}

/* 3. The Input Field (Cursor) */
.ts-control > input {
    font-size: 1rem !important;
    color: rgba(0,0,0,0.87) !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    flex: 0 1 auto; /* Be flexible but prefer small width */
    min-width: 4px;
    background: transparent !important;
}

/* 4. Focus State (The Blue Outline) */
.ts-wrapper.focus .ts-control {
    border-color: #85b7d9 !important; /* Semantic UI Light Blue */
    box-shadow: 0 0 0 0.2rem rgba(33, 133, 208, 0.15) !important; /* Soft blue glow */
    z-index: 2;
}

/* 5. The Dropdown Menu Container */
.ts-dropdown {
    border: 1px solid #85b7d9 !important; /* Match focus color */
    border-top-width: 0 !important; /* Connects to input */
    border-radius: 0 0 0.375rem 0.375rem !important;
    margin-top: -1px !important; /* Overlap bottom border of input */
    box-shadow: 0 2px 4px 0 rgba(34, 36, 38, 0.12), 0 2px 10px 0 rgba(34, 36, 38, 0.15) !important;
    z-index: 1000;
    padding: 0;
    overflow: hidden;
}

/* 6. Dropdown Options */
.ts-dropdown .option {
    padding: 14px 16px !important; /* GENEROUS SPACING */
    cursor: pointer;
    border-top: 1px solid #fafafa !important; /* Separator lines */
    font-size: 1rem;
    color: rgba(0,0,0,0.87);
    line-height: 1.3;
    background-color: #fff;
    transition: none; /* Semantic UI is snappy */
}

.ts-dropdown .option:first-child {
    border-top: none !important;
}

/* 7. Hover / Active State */
.ts-dropdown .active {
    background-color: rgba(0,0,0,0.05) !important; /* Light grey hover */
    color: rgba(0,0,0,0.95) !important;
    font-weight: 700 !important; /* Bold text on selection */
}

/* 8. Highlighted Search Text */
.ts-dropdown .highlight {
    background: rgba(255, 237, 40, 0.4);
    border-radius: 1px;
}

/* 9. Disabled State */
.ts-wrapper.disabled .ts-control {
    background-color: #f8f9fa !important;
    opacity: 0.8 !important;
    color: rgba(0,0,0,0.4);
    cursor: not-allowed;
}

.ts-control>input {
	min-width: 1rem !important;
}

.input-hidden .ts-control>input {
    position: relative !important;
}

.fs-6 {
  font-size: 1.05rem !important;
}