/* 1. RESET & ROOT VARIABLES */
:root {
    --brand-blue: #1d2b3a;    /* Dark Slate Blue */
    --brand-gold: #c38b30;    /* Professional Gold/Tan */
    --light-bg: #f8f9fa;      /* Off-white for sections */
    --white: #ffffff;
    --text-main: #333333;
    --text-muted: #666666;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--white);
}

/* 2. NAVIGATION (White Header) */
.main-nav {
    background: var(--white);
    padding: 15px 0;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 60px; /* Reduced slightly to keep the nav bar slim */
    width: auto;
    display: block;
    object-fit: contain;
    /* This ensures the logo stays sharp and centered in its container */
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
}

.nav-links li {
    margin-left: 25px;
}

.nav-links a {
    text-decoration: none;
    color: var(--brand-blue);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--brand-gold);
}

.cta-btn-nav {
    background: var(--brand-gold);
    color: var(--white) !important;
    padding: 12px 20px;
    border-radius: 4px;
    transition: opacity 0.3s;
}

.cta-btn-nav:hover {
    opacity: 0.9;
}

/* 3. HERO SECTION (Blue Overlay) */
.hero {
    background: url('hero-bg.webp') no-repeat center center/cover;
    height: 80vh;
    min-height: 500px;
    position: relative;
}

.hero-overlay {
    background: rgba(29, 43, 58, 0.75); /* Deep blue tint from mockup */
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
}

.hero-text-box {
    color: var(--white);
    max-width: 700px;
}

.hero-text-box h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.hero-text-box p {
    font-size: 1.4rem;
    margin-bottom: 30px;
    font-weight: 300;
}

/* Improved Button Transition */
.main-btn {
    cursor: pointer;
    border: none;
    background: var(--brand-gold);
    color: var(--white);
    padding: 18px 35px;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 4px;
    display: inline-block;
    font-size: 1rem;
    transition: all 0.3s ease; /* Moved from hover to base class for smooth entry AND exit */
}

.main-btn:hover {
    background: #b07a28; 
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(195, 139, 48, 0.4);
}

/* 4. SERVICES SECTION */
#services {
    padding: 80px 0;
    background: var(--light-bg);
    text-align: center;
}

.section-title {
    font-size: 2.2rem;
    color: var(--brand-blue);
    margin-bottom: 50px;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    width: 60px;
    height: 4px;
    background: var(--brand-gold);
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

/* Utility for dark backgrounds */
.text-white { color: var(--white) !important; }
.text-white::after { background: var(--brand-gold) !important; }

.card {
    background: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px);
}

.card h3 {
    color: var(--brand-blue);
    margin-bottom: 15px;
}

/* 5. FOOTER / CONTACT */
.footer {
    background: var(--brand-blue);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
}

.footer h2 { margin-bottom: 20px; }
.footer p { margin-bottom: 10px; color: #cbd5e0; }

/* 6. MOBILE RESPONSIVENESS */
@media (max-width: 992px) {
    .hero-text-box h1 { font-size: 2.5rem; }
}

@media (max-width: 768px) {
    .nav-links {
        display: flex; /* Ensure it's flex when the media query hits */
        pointer-events: none; /* Prevent clicking links while hidden */
        opacity: 0;
        /* ... existing styles ... */
    }

    .nav-links.nav-active {
        transform: translateY(0%);
        opacity: 1;
        pointer-events: auto; /* Re-enable clicks when visible */
    }
}

@media screen and (max-width: 480px) {
    .modal-content {
        margin: 2% auto;
        padding: 15px;
        width: 95%;
    }
    
    h2 {
        font-size: 1.2rem; /* Shrinks the header slightly */
    }
}

iframe {
    filter: grayscale(0.2) contrast(1.1); /* Makes the map match the site's professional look */
    border-radius: 8px;
}

/* --- Hamburger Menu Styling --- */
.burger {
    display: none;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: var(--brand-blue);
    margin: 5px;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .burger {
        display: block;
    }

    .nav-links {
        position: absolute;
        right: 0px;
        height: 40vh;
        top: 80px; /* Adjust based on your header height */
        background-color: var(--white);
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        transform: translateY(-150%); /* Start hidden above the screen */
        transition: transform 0.4s ease-in-out, opacity 0.3s;
        opacity: 0;
        pointer-events: none;
        box-shadow: 0 10px 10px rgba(0,0,0,0.1);
        z-index: 999;
    }

    .nav-links li {
        margin: 15px 0;
    }

    /* This class is added by JavaScript when the burger is clicked */
    .nav-active {
        transform: translateY(0%);
        opacity: 1;
        pointer-events: auto;
    }
}

.toggle .line1 { transform: rotate(-45deg) translate(-5px, 6px); }
.toggle .line2 { opacity: 0; }
.toggle .line3 { transform: rotate(45deg) translate(-5px, -6px); }

.trust-bar {
    background: var(--brand-blue);
    color: var(--white);
    padding: 20px 0;
}

.trust-flex {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    font-weight: bold;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.trust-item span { color: var(--brand-gold); margin-right: 5px; }

/* The Background Overlay */
.modal {
    display: none; /* Hidden by default */
    position: fixed; 
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%;
    background-color: rgba(0,0,0,0.6); /* Darker backdrop for better focus */
    backdrop-filter: blur(3px); /* Optional: blurs the background site */
    
    /* Centering Magic */
    display: none; /* JS toggles this to 'flex' or 'block' */
    align-items: center; 
    justify-content: center;
    padding: 10px; /* Safety gap so modal doesn't touch screen edges */

    align-items: center; 
    justify-content: center;
    overflow-y: auto;
}

/* The Modal Box itself */
/* Update the main content box */
.modal-content {
    background-color: #fff;
    margin: auto;
    width: 90%;
    max-width: 600px;
    border-radius: 8px;
    position: relative;
    display: flex; /* Use flex to separate header/body/footer */
    flex-direction: column;
    max-height: 90vh; /* Ensure it doesn't taller than the screen */
    padding: 0; /* Remove padding here, we'll add it to internal sections */
}

/* Stationary Header Shadow */
.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    background: #fff;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); /* Subtle shadow */
    z-index: 11; /* Keep above scrolling content */
}

/* Scrollable Body */
.modal-body {
    padding: 20px 25px;
    overflow-y: auto; /* This allows the scrolling */
    flex-grow: 1;
    background-color: #fdfdfd; /* Slightly different shade to show contrast */

        /* --- SCROLLING FIX --- */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling for iPhones */
}

/* Stationary Footer Shadow */
.modal-footer {
    padding: 15px 25px;
    border-top: 1px solid #eee;
    background: #fff;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05); /* Upward shadow */
    z-index: 11;
}

/* Ensure the Close Button stays in the header area */
.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: var(--text-muted);
    cursor: pointer;
    z-index: 10;
}

/* Make the scrollbar look a bit cleaner */
.modal-content::-webkit-scrollbar {
    width: 10px;
}
.modal-content::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

/* Close Button Position */
.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
}

.form-group { margin-bottom: 20px; text-align: left; }
.form-group label { display: block; font-weight: bold; margin-bottom: 5px; font-size: 0.9rem; }
.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.radio-group { display: flex; align-items: center; gap: 10px; }
.radio-group input { width: auto; }

/* Updated modal call button to match header style exactly */
.modal-cta {
    display: block !important; 
    width: 100%;
    text-align: center;
    text-decoration: none; /* This removes the underline */
    background: var(--brand-gold);
    color: var(--white) !important;
    padding: 12px 0;
    border-radius: 4px;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: opacity 0.3s;
    box-sizing: border-box;
}

.modal-cta:hover {
    opacity: 0.9;
    text-decoration: none; /* Ensures no underline appears on hover */
    background: #b07a28; /* A slightly darker gold for interaction */
    transform: translateY(-2px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(195, 139, 48, 0.4);
}

/* Maintain the divider aesthetics */
.modal-divider {
    text-align: center;
    position: relative;
    margin: 30px 30px 10px 30px;
    border-bottom: 1px solid #eee;
}

.modal-footer {
    padding: 15px 25px;
    border-top: 1px solid #eee;
    background: #fff;
    border-radius: 0 0 8px 8px;
}

.modal-divider span {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--white);
    padding: 0 15px;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: bold;
    letter-spacing: 1px;
}

.services-checkbox-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two equal columns */
    gap: 10px;
    margin-top: 10px;
    background: #fdfdfd;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 4px;
}

.services-checkbox-grid label {
    font-weight: normal !important;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.services-checkbox-grid input[type="checkbox"] {
    width: auto; /* Overrides the 100% width from general form-group inputs */
    margin: 0;
}

@media (max-width: 480px) {
    .services-checkbox-grid {
        grid-template-columns: 1fr; /* Stack to one column on small mobile screens */
    }
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.testimonial-card {
    background: var(--light-bg);
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #eee;
    text-align: left;
    display: flex;
    flex-direction: column;
}

.stars {
    color: var(--brand-gold);
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.testimonial-card p {
    font-style: italic;
    color: var(--text-main);
    margin-bottom: 20px;
    line-height: 1.7;
}

.testimonial-card cite {
    font-weight: 800;
    color: var(--brand-blue);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.testimonial-cta {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 50px;
}

.google-review-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #ffffff;
    color: #5f6368; /* Google's standard text gray */
    padding: 12px 25px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: background-color 0.3s, box-shadow 0.3s;
    margin-left: 0 !important; /* Overrides the inline style for better mobile wrapping */
}

.google-review-btn:hover {
    background-color: #f8f9fa;
    box-shadow: 0 1px 3px rgba(60,64,67,0.3);
}

.google-g {
    color: #4285F4; /* Google Blue */
    font-size: 1.2rem;
    font-family: 'Product Sans', Arial, sans-serif;
    font-weight: 900;
}

iframe {
    filter: grayscale(0.2) contrast(1.1);
    border: 2px solid var(--brand-gold); /* Adds a thin gold frame to the map */
    border-radius: 8px;
}

/* Slim Alert Styling */
#successAlert {
    background-color: rgba(29, 43, 58, 0.5); /* Using your brand blue with transparency */
    display: none; 
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

#successAlert .modal-content {
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    border: none;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Target the wrapper you placed the recaptcha in */
.recaptcha-wrapper {
    position: relative;
    bottom: 20px; /* Adjust this value to lift it higher */
    z-index: 9999;
}

/* If you need to force the challenge frame specifically */
iframe[title="recaptcha challenge"] {
    transform: translateY(-50px); /* Moves the popup specifically */
}