:root {
    --primary: #1E3A5F;
    --primary-light: #2a4e7a;
    --secondary: #F5EFE6;
    --accent: #2D7A3E;
    --accent-hover: #235d30;
    --text: #333333;
    --text-light: #666666;
    --white: #FFFFFF;
    --gray: #F0F0F0;
    --gray-dark: #dddddd;
    --shadow: 0 4px 15px rgba(0,0,0,0.1);
    --shadow-large: 0 10px 30px rgba(0,0,0,0.15);
}

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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--white);
    font-size: 18px; /* Senior friendly */
}

ul, li {
    list-style: none !important;
}

h1, h2, h3, h4 {
    font-family: 'Merriweather', serif;
    color: var(--primary);
    margin-bottom: 1rem;
    line-height: 1.3;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--accent);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- HEADER & NAVIGATION (ROBUST FIX) --- */
#main-header {
    background: var(--white);
    border-bottom: 1px solid var(--gray);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    height: 90px;
    display: flex;
    align-items: center;
}

#main-header.scrolled {
    height: 70px;
    box-shadow: var(--shadow);
}

#main-header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Merriweather', serif;
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--primary);
    flex-shrink: 0;
    z-index: 1002;
    white-space: nowrap;
}

.nav-container {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 5px;
    list-style: none !important;
    margin: 0;
    padding: 0;
}

.nav-links li {
    list-style: none !important;
    position: relative;
    padding: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    font-weight: 600;
    font-size: 1rem;
    color: var(--primary);
    border-radius: 6px;
    white-space: nowrap;
}

.nav-link:hover {
    background-color: var(--gray);
    color: var(--accent);
}

/* Dropdown Menu */
.has-dropdown .dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    min-width: 250px;
    box-shadow: var(--shadow-large);
    border-radius: 8px;
    padding: 10px 0;
    display: none; /* Forced hide */
    list-style: none !important;
    border-top: 3px solid var(--accent);
    margin: 0;
    z-index: 1005;
}

.has-dropdown:hover .dropdown {
    display: block; /* Show on hover */
}

.dropdown li {
    list-style: none !important;
    margin: 0;
}

.dropdown li a {
    display: block;
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text);
    border-bottom: 1px solid #f5f5f5;
}

.dropdown li:last-child a {
    border-bottom: none;
}

.dropdown li a:hover {
    background-color: var(--secondary);
    color: var(--accent);
    padding-left: 25px;
}

.btn-header {
    background: var(--accent);
    color: var(--white) !important;
    padding: 10px 20px !important;
    font-size: 0.95rem !important;
    margin-left: 10px;
    border-radius: 6px;
    font-weight: 700;
}

.btn-header:hover {
    background: var(--accent-hover);
    transform: none;
    box-shadow: none;
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.mobile-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--primary);
    border-radius: 3px;
}

/* --- HERO SECTION --- */
.hero {
    padding: 80px 0;
    background: var(--primary);
    color: var(--white);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content h1 {
    color: var(--white);
    font-size: 3rem;
    margin: 0 0 20px;
}

.hero-content .subtitle {
    font-size: 1.3rem;
    margin-bottom: 30px;
    color: #cbd5e0;
}

.hero-img {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.hero-rassurance {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    color: var(--white);
    font-size: 0.95rem;
}

/* --- FORMS --- */
.hero-form {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    max-width: 600px;
    margin: 40px auto 0;
    color: var(--text);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border-top: 5px solid var(--accent);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

input, select, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
}

.btn {
    display: inline-block;
    background: var(--accent);
    color: var(--white);
    padding: 15px 30px;
    border-radius: 6px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s;
    text-align: center;
}

.btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

/* Sticky Fix */
aside {
    align-self: flex-start;
}

aside .hero-form {
    position: sticky;
    top: 100px;
    margin-top: 0;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

/* --- SECTIONS --- */
section {
    padding: 80px 0;
}

.bg-beige {
    background-color: var(--secondary);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.city-pill {
    background: white; 
    border: 1px solid var(--accent); 
    color: var(--primary); 
    padding: 10px 20px; 
    border-radius: 20px; 
    font-size: 0.9rem; 
    font-weight: 600;
    display: inline-block;
}

/* --- FOOTER --- */
footer {
    background: var(--primary);
    color: var(--white);
    padding: 80px 0 30px;
    position: relative;
    z-index: 10;
}

footer a {
    color: #cbd5e0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 50px;
    margin-bottom: 50px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 30px;
    text-align: center;
    font-size: 0.9rem;
}

/* Reassurance Bar */
.reassurance-bar {
    background-color: var(--secondary);
    padding: 40px 0;
    text-align: center;
}

.reassurance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

/* Reveal on scroll */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* --- RESPONSIVE --- */
@media (max-width: 1100px) {
    .nav-link {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
}

@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: flex;
    }

    .nav-container {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: var(--white);
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
        padding: 80px 30px;
        transition: 0.4s;
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-container.active {
        right: 0;
    }

    .nav-links {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-link {
        width: 100%;
        padding: 15px 0;
        border-bottom: 1px solid var(--gray);
    }

    .has-dropdown .dropdown {
        position: static;
        box-shadow: none;
        padding: 0 0 0 20px;
        border-top: none;
        display: none;
    }
    
    .has-dropdown.active .dropdown {
        display: block;
    }

    .btn-header {
        margin: 20px 0 0;
        width: 100%;
    }
}