/* Define the color scheme based on your logo and the image */
:root {
    --nav-bg-color: #1a337c; /* The blue navigation bar color */
    --nav-tagline-color: #fdd835; /* The yellow tagline color */
    --green-cta: #28a745; /* The green button color */
    --text-dark: #333333;
    --text-light: #ffffff;
    --font-main: 'Open Sans', sans-serif;
    --font-heading: 'Montserrat', sans-serif;
}

/* Smooth anchor scrolling and improved font rendering across all browsers */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Basic Page Resets */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: #f4f7f6;
    color: var(--text-dark);
    line-height: 1.6;
}

/* --- Header / Navigation Bar --- */
header {
    background-color: var(--nav-bg-color);
    color: var(--text-light);
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed; /* Keep it at the top */
    width: 100%;
    top: 0;
    z-index: 1000;
    /* Shadow separates the fixed nav from the page content beneath */
    box-shadow: 0 2px 20px rgba(0,0,0,0.22);
}

.logo-group {
    display: flex;
    flex-direction: column;
}

.company-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.9rem;
    letter-spacing: 1px;
}

.company-tagline {
    color: var(--nav-tagline-color);
    font-size: 1.3rem;
    font-weight: 600;
}

.nav-right-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.phone-number {
    font-weight: 600;
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.2s;
}

.phone-number:hover {
    color: var(--nav-tagline-color);
}

.phone-icon {
    display: inline-block;
    filter: brightness(0) invert(1);
    transition: filter 0.2s;
}

.phone-number:hover .phone-icon {
    filter: brightness(0) saturate(100%) invert(93%) sepia(60%) saturate(700%) hue-rotate(334deg) brightness(105%);
}

.footer-email {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-email:hover {
    color: var(--green-cta);
}

.footer-email-icon {
    display: inline-block;
    transition: filter 0.2s;
}

.footer-email:hover .footer-email-icon {
    filter: brightness(0) saturate(100%) invert(48%) sepia(79%) saturate(476%) hue-rotate(93deg) brightness(95%) contrast(90%);
}

.footer-phone {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-phone:hover {
    color: var(--green-cta);
}

.footer-phone-icon {
    display: inline-block;
    filter: brightness(0) invert(0.6);
    transition: filter 0.2s;
}

.footer-phone:hover .footer-phone-icon {
    filter: brightness(0) saturate(100%) invert(48%) sepia(79%) saturate(476%) hue-rotate(93deg) brightness(95%) contrast(90%);
}

.cta-button-nav {
    background-color: var(--green-cta);
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 700;
    transition: background-color 0.3s, transform 0.2s;
    display: inline-block;
}

.cta-button-nav:hover {
    background-color: #34ce57;
    transform: scale(1.06);
}

/* --- Main Hero Section --- */
.hero {
    /* Full viewport height, minus the navbar */
    min-height: 100vh;
    padding-top: 100px; /* Space for fixed navbar */
    padding-left: 5%;
    padding-right: 5%;
    padding-bottom: 50px;
    
    /* Background House Image with a Dark Overlay */
    background-image: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('https://images.unsplash.com/photo-1572120360610-d971b9d7767c?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Parallax effect */
    
    /* CSS Grid to create the two-column layout */
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 50px;
}

/* --- Left Side: Selling Message --- */
.selling-message {
    color: var(--text-light);
    max-width: 600px;
}

.selling-message h1 {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 30px;
}

.selling-message h1 span.yellow {
    color: var(--nav-tagline-color);
}

.main-points, .sub-points {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 25px;
}

.sub-points {
    font-size: 1.25rem;
    font-weight: 400;
    opacity: 0.9;
}

/* --- Right Side: White Form --- */
.form-container {
    background-color: var(--text-light);
    padding: 50px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2); /* Soft shadow for depth */
    max-width: 600px;
    
    /* Center within the grid cell */
    margin: 0 auto;
}

.form-header {
    text-align: center;
    margin-bottom: 30px;
}

.form-header h2 {
    font-family: var(--font-heading);
    color: var(--nav-bg-color);
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.form-header p {
    color: #666;
    font-size: 0.95rem;
}

/* Form Layout */
.lead-form {
    display: grid;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.form-group-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

label {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 5px;
    color: #444;
}

label span.required {
    color: #d9534f; /* Standard red for * */
}

input {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px; /* Slightly rounder for a modern look */
    font-family: var(--font-main);
    font-size: 1rem;
    /* Smooth transition for the focus state below */
    transition: border-color 0.2s, box-shadow 0.2s;
}

input::placeholder {
    color: #aaa;
}

/* Visible focus ring — critical for keyboard navigation and accessibility */
input:focus {
    outline: none;
    border-color: var(--nav-bg-color);
    box-shadow: 0 0 0 3px rgba(26, 51, 124, 0.12);
}

/* The Main Green Submit Button */
.submit-button {
    background-color: var(--green-cta);
    color: white;
    border: none;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: var(--font-heading);
    letter-spacing: 0.3px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    /* Green glow lifts the CTA visually */
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.submit-button:hover {
    background-color: #34ce57;
    transform: scale(1.03);
    box-shadow: 0 6px 22px rgba(40, 167, 69, 0.42);
}

/* --- Consent Checkbox --- */

/* Tighten the gap slightly so it sits naturally below the email field */
.consent-group {
    margin-top: -4px;
}

/* Flex row: custom checkbox on the left, text on the right */
.consent-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    /* Override the bold weight applied to all <label> elements above */
    font-weight: 400;
    font-size: 0.82rem;
    color: #555;
    line-height: 1.5;
    margin-bottom: 0;
}

/* Custom checkbox — hides the native control while keeping it keyboard/screen-reader accessible */
.consent-checkbox {
    /* Remove default browser styling */
    appearance: none;
    -webkit-appearance: none;

    /* Fixed square dimensions; min-width prevents flex from shrinking it */
    width: 18px;
    height: 18px;
    min-width: 18px;

    border: 2px solid #ccc;
    border-radius: 4px; /* rounded corners */
    background-color: #fff;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;

    /* Align the box with the first line of consent text */
    margin-top: 1px;

    /* Override the global input padding/font rules */
    padding: 0;
    font-size: inherit;
}

/* Checked state: brand green with an SVG checkmark */
.consent-checkbox:checked {
    background-color: var(--green-cta);
    border-color: var(--green-cta);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6l3 3 5-5' stroke='white' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-size: 10px;
    background-repeat: no-repeat;
    background-position: center;
}

/* Keyboard-focus ring for accessibility */
.consent-checkbox:focus-visible {
    outline: 2px solid var(--nav-bg-color);
    outline-offset: 2px;
}

/* Inline links inside the consent text */
.consent-link {
    color: var(--nav-bg-color);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s;
}

.consent-link:hover {
    color: var(--green-cta);
}

/* Error message — hidden by default, shown via JS by adding .visible */
.consent-error {
    display: none;
    color: #d9534f;
    font-size: 0.78rem;
    margin-top: 6px;
    /* Indent to align with the consent text, past the checkbox width + gap */
    padding-left: 28px;
}

.consent-error.visible {
    display: block;
}

.confidential-text {
    text-align: center;
    font-size: 0.8rem;
    color: #888;
    margin-top: 15px;
}

/* General Structure Classes */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.text-center { text-align: center; }
.bg-light { background-color: #f8fafc; }
.green { color: #28a745; font-weight: bold; }
.blue { color: #1a337c; }
.eyebrow { display: block; letter-spacing: 2px; font-size: 0.8rem; margin-bottom: 10px; }
.section-title { font-size: 2.5rem; margin-bottom: 20px; color: #1a337c; }
.white { color: white !important; }
.white-p { color: rgba(255,255,255,0.8); max-width: 800px; margin: 0 auto 40px; }
.max-600 { max-width: 700px; margin: 0 auto 40px; color: #555; }

section { padding: 80px 0; }
.split-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.rounded-img { width: 100%; border-radius: 20px; }
.shadow { box-shadow: 0 20px 40px rgba(0,0,0,0.1); }

/* List & Process */
.check-list { list-style: none; margin: 25px 0; }
.check-list li::before { content: '✔️'; margin-right: 10px; color: #28a745; }
.check-list li { margin-bottom: 12px; font-weight: 500; }
.italic-note { font-style: italic; font-size: 0.9rem; margin-top: 30px; color: #777; }

.process-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 50px; }
.process-card { background: white; padding: 40px; border-radius: 15px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.process-card:hover { transform: translateY(-6px); box-shadow: 0 16px 40px rgba(0,0,0,0.1); }
.icon-circle { width: 60px; height: 60px; background: #f0f4ff; color: #1a337c; border-radius: 12px; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; font-size: 1.5rem; }

/* Situations */
.situations-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 40px; }
.sit-card { display: flex; gap: 20px; background: white; padding: 25px; border-radius: 12px; text-align: left; border: 1px solid #eee; transition: transform 0.2s ease, border-color 0.2s, box-shadow 0.2s; }
.sit-card:hover { transform: translateY(-3px); border-color: var(--green-cta); box-shadow: 0 8px 25px rgba(0,0,0,0.08); }
.sit-card .icon { font-size: 2rem; background: #f1fcf4; padding: 15px; border-radius: 10px; height: fit-content; }

/* Mission Dark */
.mission-dark { background-color: #0b162c; color: white; }
.mission-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; }
.mission-card { background: rgba(255,255,255,0.05); padding: 40px; border-radius: 15px; border: 1px solid rgba(255,255,255,0.1); transition: transform 0.3s ease, background 0.3s; }
.mission-card:hover { transform: translateY(-4px); background: rgba(255,255,255,0.09); }
.m-icon { font-size: 2.5rem; display: block; margin-bottom: 20px; opacity: 0.8; }

/* --- Section heading helpers (referenced in HTML) --- */
.mid-heading {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--nav-bg-color);
    margin-bottom: 10px;
}

.mini-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    color: var(--text-dark);
    margin-bottom: 8px;
}

/* --- Final CTA Section --- */
/* Replaces the inline styles previously on the <section> element */
.final-cta-section {
    background: linear-gradient(135deg, #1a337c 0%, #2a52be 100%);
    padding: 100px 0;
    color: white;
    text-align: center;
}

/* Larger heading size for the CTA section */
.final-cta-title {
    font-size: 3rem;
    margin-bottom: 25px;
}

/* Slightly larger body copy for CTA section */
.final-cta-body {
    max-width: 800px;
    margin: 0 auto 40px;
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Oversized CTA button modifier */
.cta-button-lg {
    padding: 18px 40px !important;
    font-size: 1.2rem !important;
    border-radius: 50px !important;
}

/* Pulsing glow animation on key CTA buttons */
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.45); }
    50%       { box-shadow: 0 0 0 12px rgba(40, 167, 69, 0); }
}

.pulse { animation: pulse-glow 2.6s ease-in-out infinite; }

/* --- Footer --- */
/* Replaces the inline styles previously on <footer> and its children */
footer {
    background: #050a14;
    color: #ffffff;
    padding: 80px 0 20px;
}

/* Three-column top grid */
.footer-top-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 60px;
}

/* Column headings */
.footer-heading {
    letter-spacing: 1px;
    margin-bottom: 25px;
    font-family: var(--font-heading);
    color: white;
    font-size: 0.85rem;
    text-transform: uppercase;
}

/* Logo sizing */
.footer-logo-img {
    height: 220px;
    margin-bottom: 12px;
    display: block;
}

/* Muted body text used across footer columns */
.footer-muted-text {
    color: #94a3b8;
    line-height: 1.6;
    font-size: 0.95rem;
    margin: 0;
}

/* Privacy column flex row */
.footer-privacy-row {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.footer-shield {
    font-size: 1.5rem;
    color: var(--green-cta);
    flex-shrink: 0;
}

/* Thin rule between grid and legal row */
.footer-divider {
    border: 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 30px;
}

/* Bottom legal/disclaimer row */
.footer-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.85rem;
    color: #64748b;
}

.footer-copyright { flex: 1; min-width: 250px; }
.footer-disclaimer { flex: 1; min-width: 250px; text-align: right; }

/* FAQ Styles */
.faq-section { padding: 80px 0; }
.faq-container { max-width: 800px; margin: 50px auto 0; }

.faq-item { background: white; border-radius: 12px; margin-bottom: 15px; border: 1px solid #e2e8f0; overflow: hidden; }
.faq-toggle { width: 100%; padding: 20px 30px; text-align: left; background: none; border: none; display: flex; justify-content: space-between; align-items: center; cursor: pointer; color: #1a337c; font-weight: 600; font-family: 'Open Sans', sans-serif; font-size: 1.1rem; }
.faq-toggle:hover { background-color: #f7fafc; }

.faq-icon { font-size: 1.5rem; color: #a0aec0; transition: transform 0.3s; }

.faq-content { max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out; background-color: white; }
.faq-content p { padding: 0 30px 25px 30px; color: #555; }

/* State when active (clicked) */
.faq-item.active .faq-content { max-height: 500px; /* Large enough to allow text */ }
.faq-item.active .faq-toggle { border-bottom: 1px solid #e2e8f0; }
.faq-item.active .faq-icon { transform: rotate(45deg); color: #1a337c; }

/* --- Confirmation Page --- */
.confirmation-page {
    min-height: calc(100vh - 140px);
    padding-top: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f4f7f6;
    padding-left: 20px;
    padding-right: 20px;
    animation: fadeInUp 0.7s ease both;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

.confirmation-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    padding: 60px 50px;
    max-width: 600px;
    width: 100%;
    text-align: center;
}

.confirmation-checkmark {
    width: 90px;
    height: 90px;
    margin: 0 auto 30px;
}

.confirmation-checkmark svg {
    width: 100%;
    height: 100%;
}

.confirmation-heading {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--nav-bg-color);
    margin-bottom: 20px;
}

.confirmation-message {
    font-size: 1.05rem;
    color: #555;
    line-height: 1.8;
    margin-bottom: 15px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.confirmation-btn {
    margin-top: 30px;
    padding: 14px 36px;
    font-size: 1rem;
    border-radius: 50px;
}

@media (max-width: 600px) {
    .confirmation-card {
        padding: 40px 25px;
    }

    .confirmation-heading {
        font-size: 2rem;
    }
}

/* --- Scroll Reveal Animations --- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Staggered delay for grid children */
.reveal-stagger > * {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-stagger.visible > *:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 0s; }
.reveal-stagger.visible > *:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 0.15s; }
.reveal-stagger.visible > *:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 0.3s; }
.reveal-stagger.visible > *:nth-child(4) { opacity: 1; transform: translateY(0); transition-delay: 0.45s; }

/* --- Mobile Navigation Toggle --- */

/* Hidden on desktop — shown via media query below */
.nav-toggle {
    display: none;
    background: none;
    border: 2px solid rgba(255,255,255,0.35);
    color: white;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 3px 10px;
    border-radius: 6px;
    transition: background-color 0.2s, border-color 0.2s;
    line-height: 1;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
    background-color: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.6);
    outline: none;
}

/* --- Responsive Design --- */

/* Tablet landscape and smaller */
@media (max-width: 992px) {
    .hero {
        grid-template-columns: 1fr; /* Stack hero columns vertically */
        text-align: center;
        padding-top: 120px;
    }

    .selling-message h1 {
        font-size: 3rem;
    }

    .selling-message {
        margin: 0 auto;
        margin-bottom: 50px;
    }

    .form-container {
        margin: 0 auto;
        padding: 35px 30px; /* Reduce from 50px — still comfortable on tablet */
    }

    section { padding: 60px 0; }
}

/* Tablet portrait and smaller */
@media (max-width: 768px) {
    /* Collapse all multi-column grids to single column */
    .split-grid, .process-grid, .situations-grid, .mission-grid, .footer-top-grid { grid-template-columns: 1fr; }

    .section-title { font-size: 2rem; }
    .faq-toggle { padding: 15px 20px; font-size: 1rem; }
    .faq-content p { padding: 0 20px 15px 20px; }

    /* Scale down the final CTA heading */
    .final-cta-title { font-size: 2.2rem; }

    /* Footer legal row: stack and left-align on narrow screens */
    .footer-disclaimer { text-align: left; }

    /* --- Hamburger nav --- */

    /* Show the toggle button */
    .nav-toggle { display: block; }

    /* Keep header as a single compact row — no more stacking */
    header {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        padding: 12px 5%;
        /* Relative so the absolute dropdown is positioned from the header bottom */
        position: fixed;
    }

    /* Shrink the logo text so it fits on one line with the toggle */
    .company-name { font-size: 1.3rem; }
    .company-tagline { font-size: 0.95rem; }

    /* Hide nav items by default — becomes an absolute dropdown */
    .nav-right-group {
        display: none;
        position: absolute;
        top: 100%;       /* Sits flush below the header */
        left: 0;
        right: 0;
        background-color: var(--nav-bg-color);
        flex-direction: column;
        align-items: center;
        gap: 16px;
        padding: 22px 20px;
        box-shadow: 0 8px 24px rgba(0,0,0,0.28);
        border-top: 1px solid rgba(255,255,255,0.12);
        z-index: 999;
    }

    /* Revealed when JS adds .open */
    .nav-right-group.open { display: flex; }

    /* Give the hero enough top padding for the compact single-row header */
    .hero { padding-top: 90px; }
}

/* Mobile */
@media (max-width: 600px) {
    /* Header stacking removed — handled by hamburger menu above */

    .selling-message h1 {
        font-size: 2.2rem;
    }

    .form-container {
        padding: 28px 20px; /* Tight but comfortable on small screens */
    }

    .form-group-row {
        grid-template-columns: 1fr; /* Stack first/last name on mobile */
    }

    section { padding: 45px 0; }

    .final-cta-section { padding: 60px 0; }
    .final-cta-title { font-size: 1.8rem; }

    .section-title { font-size: 1.75rem; }

    /* background-attachment: fixed causes rendering glitches on iOS Safari */
    .hero {
        background-attachment: scroll;
    }
}