/* --- Modern SoCal Palette --- */
:root {
    --primary: #0056b3;
    /* Deep Ocean Blue */
    --primary-bright: #007bff;
    /* Bright Tech Blue */
    --accent: #0ea5e9;
    /* Sky Blue */
    --dark: #0b1120;
    /* Almost Black/Navy */
    --text-main: #334155;
    /* Slate Grey */
    --bg-body: #f8fafc;
    /* Very crisp light blue-white */

    --card-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.08);
    --card-shadow-hover: 0 20px 60px -10px rgba(0, 86, 179, 0.15);
    --radius-lg: 24px;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.7;
}

h1,
h2,
h3,
h4,
h5 {
    color: var(--dark);
    font-weight: 800;
    letter-spacing: -0.03em;
}

/* --- Navbar --- */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    padding: 1.25rem 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--dark) !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand span {
    color: var(--primary-bright);
}

.nav-link {
    color: #64748b !important;
    font-weight: 600;
    margin: 0 0.8rem;
    transition: color 0.3s;
    font-size: 0.95rem;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-bright) !important;
}

.btn-cta-nav {
    background: var(--primary-bright);
    color: white;
    padding: 0.7rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.25);
}

.btn-cta-nav:hover {
    transform: translateY(-2px);
    background: var(--primary);
    color: white;
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.4);
}

/* --- Hero Section --- */
#hero {
    position: relative;
    padding: 180px 0 140px;
    overflow: hidden;
    background: radial-gradient(circle at top right, #eff6ff 0%, transparent 40%),
        radial-gradient(circle at center left, #f8fafc 0%, transparent 40%);
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.85;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 850px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.6rem 1.4rem;
    background: white;
    color: var(--primary);
    border-radius: 100px;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
    margin-bottom: 2.5rem;
    border: 1px solid #eff6ff;
}

.hero-title {
    font-size: 4.5rem;
    line-height: 1.05;
    margin-bottom: 2rem;
    color: var(--dark);
}

.hero-title span {
    background: linear-gradient(135deg, var(--primary) 0%, #0ea5e9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.35rem;
    color: #64748b;
    margin-bottom: 3.5rem;
    font-weight: 400;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.btn-hero-primary {
    background: var(--primary-bright);
    color: white;
    padding: 1.1rem 3rem;
    border-radius: 16px;
    font-weight: 700;
    border: none;
    font-size: 1.1rem;
    transition: all 0.3s;
    box-shadow: 0 15px 35px -10px rgba(0, 123, 255, 0.5);
}

.btn-hero-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -10px rgba(0, 123, 255, 0.6);
    color: white;
}

.btn-hero-outline {
    background: white;
    color: var(--dark);
    padding: 1.1rem 3rem;
    border-radius: 16px;
    font-weight: 700;
    border: 2px solid #f1f5f9;
    font-size: 1.1rem;
    transition: all 0.3s;
}

.btn-hero-outline:hover {
    transform: translateY(-4px);
    border-color: var(--primary-bright);
    color: var(--primary-bright);
    box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.05);
}

/* --- Feature Cards (Clean, No Borders) --- */
.feature-card {
    background: white;
    padding: 3.5rem 2.5rem;
    border-radius: var(--radius-lg);
    height: 100%;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: var(--card-shadow);
    position: relative;
    z-index: 1;
    border: none;
}

.feature-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--card-shadow-hover);
}

.icon-box {
    width: 72px;
    height: 72px;
    background: transparent;
    border: none;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: var(--primary-bright);
    margin-bottom: 2rem;
    transition: all 0.4s ease;
}

.feature-card:hover .icon-box {
    color: var(--primary);
    transform: scale(1.15);
}

.feature-card h4 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.feature-card p {
    font-size: 1rem;
    color: #64748b;
    margin-bottom: 0;
    line-height: 1.6;
}

/* --- Article Cards --- */
.article-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all 0.4s ease;
    height: 100%;
    border: none;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--card-shadow-hover);
}

.article-header-bg {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.bg-pattern-1 {
    background: linear-gradient(135deg, #f0f9ff 0%, #bae6fd 100%);
    color: rgba(14, 165, 233, 0.7);
}

.bg-pattern-2 {
    background: linear-gradient(135deg, #fefce8 0%, #fde68a 100%);
    color: rgba(245, 158, 11, 0.7);
}

.bg-pattern-3 {
    background: linear-gradient(135deg, #f0fdf4 0%, #bbf7d0 100%);
    color: rgba(16, 185, 129, 0.7);
}

.article-card i {
    font-size: 5rem;
    opacity: 0.8;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.article-card:hover i {
    transform: scale(1.2);
}

.card-body {
    padding: 2.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.badge-theme {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1.5rem;
}

.badge-housing {
    background: #e0f2fe;
    color: #0284c7;
}

.badge-budget {
    background: #fef9c3;
    color: #b45309;
}

.badge-assist {
    background: #dcfce7;
    color: #15803d;
}

/* --- Newsletter Section (White with Blue Accents) --- */
.newsletter-wrapper {
    background: #ffffff;
    border-radius: 40px;
    padding: 6rem 3rem;
    position: relative;
    overflow: hidden;
    color: var(--primary);
    box-shadow: 0 10px 40px -10px rgba(0, 86, 179, 0.1);
    border: 1px solid var(--primary-bright);
}

.newsletter-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(0, 123, 255, 0.08) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.5;
}

.newsletter-wrapper h2 {
    color: var(--primary) !important;
}

.newsletter-wrapper .lead {
    color: #64748b !important;
}

.form-control-modern {
    padding: 1.25rem 2.5rem;
    border-radius: 50px;
    border: 2px solid #e2e8f0;
    font-size: 1.1rem;
    background: #f8fafc;
    color: var(--dark);
    transition: all 0.3s;
}

.form-control-modern:focus {
    background: #ffffff;
    border-color: var(--primary-bright);
    color: var(--dark);
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.15);
}

.form-control-modern::placeholder {
    color: #94a3b8;
}

.btn-subscribe {
    padding: 1.25rem 3.5rem;
    border-radius: 50px;
    font-weight: 700;
    background: var(--primary-bright);
    color: white;
    border: none;
    transition: all 0.3s;
    font-size: 1.1rem;
}

.btn-subscribe:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 86, 179, 0.3);
}

/* --- Footer (White & Clean) --- */
footer {
    background: #ffffff;
    color: var(--text-main);
    padding: 6rem 0 3rem;
    border-top: 1px solid #f1f5f9;
}

footer h5 {
    color: var(--primary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    font-weight: 800;
}

footer ul li {
    margin-bottom: 1rem;
}

footer a {
    color: #64748b;
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 500;
}

footer a:hover {
    color: var(--primary-bright);
    padding-left: 5px;
    /* Subtle nudge effect */
}

/* Disclaimer Box Design */
.disclaimer-container {
    background: #f8fafc;
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid #e2e8f0;
}

.footer-bottom {
    margin-top: 5rem;
    padding-top: 2rem;
    border-top: 1px solid #f1f5f9;
    color: #94a3b8;
    font-weight: 500;
}

/* --- Contact Page --- */
.contact-hero {
    padding: 180px 0 80px;
    background: radial-gradient(circle at top right, #eff6ff 0%, transparent 40%),
        radial-gradient(circle at bottom left, #f0f9ff 0%, transparent 50%),
        #f8fafc;
}

.contact-info-card {
    background: white;
    padding: 3rem 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    height: 100%;
}

.contact-info-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-shadow-hover);
}

.contact-icon-circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--primary-bright);
    margin: 0 auto 1.5rem;
    transition: all 0.3s ease;
}

.contact-info-card:hover .contact-icon-circle {
    background: linear-gradient(135deg, var(--primary-bright) 0%, var(--accent) 100%);
    color: white;
    transform: scale(1.1);
}

.contact-link {
    color: var(--primary-bright);
    transition: color 0.2s;
}

.contact-link:hover {
    color: var(--primary);
}

.contact-input {
    padding: 0.9rem 1.4rem;
    border-radius: 14px;
    border: 2px solid #e2e8f0;
    font-size: 0.95rem;
    transition: all 0.3s;
    background: #f8fafc;
}

.contact-input:focus {
    border-color: var(--primary-bright);
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.1);
    background: white;
}

.contact-sidebar-item {
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.contact-sidebar-item:hover {
    box-shadow: 0 8px 25px rgba(0, 86, 179, 0.08);
    transform: translateX(4px);
}

.contact-sidebar-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--primary-bright);
    margin-right: 1rem;
}

/* FAQ Accordion */
.contact-accordion-item {
    border: none !important;
    border-radius: 16px !important;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.contact-accordion-btn {
    font-weight: 700;
    font-size: 1rem;
    color: var(--dark);
    padding: 1.25rem 1.5rem;
    background: white;
    border: none;
}

.contact-accordion-btn:not(.collapsed) {
    background: white;
    color: var(--primary);
    box-shadow: none;
}

.contact-accordion-btn:focus {
    box-shadow: none;
    border-color: transparent;
}

.contact-accordion-btn::after {
    background-size: 1rem;
}

/* --- Animations --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 991px) {
    .hero-title {
        font-size: 3rem;
    }

    #hero {
        padding: 140px 0 80px;
    }

    .feature-card {
        padding: 2.5rem 2rem;
    }

    .newsletter-wrapper {
        padding: 4rem 1.5rem;
        border-radius: 24px;
    }

    footer {
        padding-top: 4rem;
    }

    /* Center Essential Topics section on mobile */
    #categories .row {
        justify-content: center;
    }

    #categories .feature-card {
        text-align: center;
    }

    #categories .icon-box {
        margin-left: auto;
        margin-right: auto;
    }

    /* Center footer content on mobile */
    footer .row>div {
        text-align: center;
    }

    footer .d-flex.gap-3 {
        justify-content: center;
    }

    footer h5 {
        justify-content: center;
    }

    /* Contact page responsive */
    .contact-hero {
        padding: 140px 0 60px;
    }

    .contact-hero h1 {
        font-size: 2.5rem;
    }

    .contact-info-card {
        padding: 2rem 1.5rem;
    }

    .contact-sidebar-item {
        padding: 1.2rem;
    }
}