@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;700;900&family=Open+Sans:wght@300;400;500;700&display=swap');

/* Base & Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Open Sans', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1rem;
    background-color: #211D1E; /* Midnight */
    color: #E7E8E9; /* Silver */
    line-height: 1.6;
}
a { text-decoration: none; color: inherit; }

/* Global Typography Consistency */
p {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

/* Headings & Montserrat Integration */
h1, h2, h3, .nav-links a, .cta-button {
    font-family: 'Montserrat', sans-serif;
}
h1, h2, h3 {
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Header & Nav */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background-color: #211D1E;
    border-bottom: 2px solid #BCAF8A; /* Light Gold */
    position: sticky;
    top: 0;
    z-index: 1000;
}
.logo { 
    height: 65px; 
    width: auto; 
    max-width: 100%;
}
nav { display: flex; align-items: center; gap: 2rem; }
.nav-links { list-style: none; display: flex; gap: 1.5rem; }
.nav-links a { 
    font-weight: 500; 
    font-size: 1.35rem;
}
.nav-links a:hover, .nav-links a.active { color: #BCAF8A; border-bottom: 1px solid #BCAF8A; padding-bottom: 4px; }

/* Hamburger Button Styles (Hidden on Desktop) */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 22px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}
.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #E7E8E9;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Hamburger "X" Animation when Active */
.menu-toggle.active span:nth-child(1) {
    transform: translateY(9.5px) rotate(45deg);
}
.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
    transform: translateY(-9.5px) rotate(-45deg);
}

/* Buttons */
.cta-button {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #F7B24D; /* Orange */
    color: #211D1E; /* Midnight */
    padding: 0.75rem 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    text-align: center;
    white-space: normal;
}
.cta-button:hover { background-color: #C2E8EF; /* Robin's Egg */ color: #211D1E; }
.nav-cta { padding: 0.5rem 1rem; }

/* Hero Section */
.hero {
    padding: 6rem 5%;
    text-align: center;
    background-color: #211D1E;
    background-image: linear-gradient(180deg, #211D1E 0%, #414042 100%);
}
.hero-content { max-width: 800px; margin: 0 auto; }
.hero h1 { 
    font-size: 3.2rem;
    margin-bottom: 1.5rem; 
    color: #E7E8E9; 
    font-weight: 900; 
}
.hero p { font-size: 1.25rem; color: #BCAF8A; margin-bottom: 2rem; font-weight: 300; }

/* Unique Hero Card Styling & Button Margin */
.card.hero-card {
    background-color: #211D1E;
}
.hero-content .cta-button {
    margin-top: 2rem;
}

/* Services Section */
.services { padding: 5rem 5%; background-color: #211D1E; }

/* Ensure jump-to anchors never get hidden behind the sticky header */
section {
    scroll-margin-top: 100px;
}

/* Shared Section Heading Style */
.section-heading {
    scroll-margin-top: 180px; 
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: #E7E8E9;
    border-bottom: 3px solid #AC9B7C;
    display: block;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    padding-bottom: 0.75rem;
    font-weight: 700;
}

/* Mobile Break Control for Headings */
.mobile-break {
    display: none;
}

.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.card {
    background-color: #414042; /* Slate */
    padding: 2rem;
    border-radius: 8px;
    border-top: 4px solid #AC9B7C; /* Dark Gold */
    transition: transform 0.3s ease;
}
.card:hover { transform: translateY(-5px); border-top-color: #F7B24D; }
.card h3 { font-size: 1.25rem; margin-bottom: 1rem; color: #BCAF8A; font-weight: 700; }
.card p { font-weight: 400; }

/* About Section - Slimmer background padding & Button spacing */
.about { 
    padding: 5rem 5%; 
    background-color: #414042; 
    text-align: center; 
}
.about-content { max-width: 800px; margin: 0 auto; }
.about p { font-weight: 400; }
.about .cta-button {
    margin-top: 2.5rem;
}

/* Contact Section & Footer */
.contact-section {
    background-color: #211D1E;
    padding: 6rem 5% 300px; 
    border-top: 1px solid #AC9B7C;
}
footer { 
    background-color: #211D1E; 
    padding: 2rem 5%; 
    text-align: center; 
}
.footer-content { margin-bottom: 2rem; }
.footer-links { margin-top: 2.5rem; text-align: center; color: #BCAF8A; font-family: 'Montserrat', sans-serif; font-weight: 500; text-transform: uppercase; letter-spacing: 1px;}
.footer-links a { margin: 0 0.5rem; }
.footer-links a:hover { color: #E7E8E9; }
.copyright { font-size: 0.875rem; color: #AC9B7C; border-top: 1px solid #414042; padding-top: 1rem; font-weight: 300; }

/* Success message alert style */
.success-alert {
    display: none;
    background-color: #414042;
    border-left: 4px solid #BCAF8A;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 4px;
}
.success-alert h3 {
    color: #BCAF8A;
    margin-bottom: 0.5rem;
    font-family: 'Montserrat', sans-serif;
}
.success-alert p {
    text-align: left;
    margin-bottom: 0;
}

/* Enhanced Form Styles */
.contact-form-container {
    max-width: 700px; 
    margin: 0 auto;
    text-align: left;
}
.contact-form-container p {
    text-align: center;
    margin-bottom: 2rem;
}
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.hp-field {
    display: none !important;
}

/* Fixed form row layout wrapping */
.form-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    width: 100%;
}
.form-field-group {
    flex: 1 1 280px;
    min-width: 0;
}
.form-field-group.full-width {
    flex: 1 1 100%;
    width: 100%;
}
.form-field-group.city-group {
    flex: 2 1 200px;
}
.form-field-group.state-group {
    flex: 1 1 110px;
}
.form-field-group label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 1.1rem;
    color: #BCAF8A;
}

.conditional-field {
    display: none;
}
.conditional-field label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.95rem;
    color: #BCAF8A;
}

.form-section {
    background-color: #414042; /* Slate */
    padding: 1.5rem;
    border-radius: 8px;
    border-top: 2px solid #AC9B7C; /* Dark Gold */
}
.form-section label.section-title {
    display: block;
    color: #BCAF8A; /* Light Gold */
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    margin-bottom: 1.0rem;
    text-transform: uppercase;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}
.checkbox-group, .radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}
.checkbox-group label, .radio-group label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    font-size: 1.25rem;
}

input[type="checkbox"], input[type="radio"] {
    accent-color: #C2E8EF;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
    width: 100%;
    padding: 0.85rem;
    background-color: #414042;
    border: 1px solid #AC9B7C;
    border-radius: 4px;
    color: #E7E8E9;
    font-family: 'Open Sans', sans-serif;
    font-size: 1.25rem;
}

/* Color change when fields contain user data/selection */
.contact-form input.has-content,
.contact-form textarea.has-content,
.contact-form input.form-select.has-content {
    color: #BCAF8A !important;
}

/* Explicitly set placeholder color to solid silver (#E7E8E9) and remove browser transparency */
.contact-form input[type="text"]::placeholder,
.contact-form input[type="email"]::placeholder,
.contact-form input[type="tel"]::placeholder,
.contact-form textarea::placeholder {
    color: #E7E8E9;
    opacity: 1;
}

/* Force consistent dark theme background on browser autofilled inputs */
.contact-form input:-webkit-autofill,
.contact-form input:-webkit-autofill:hover, 
.contact-form input:-webkit-autofill:focus,
.contact-form textarea:-webkit-autofill,
.contact-form textarea:-webkit-autofill:hover,
.contact-form textarea:-webkit-autofill:focus {
    -webkit-text-fill-color: #E7E8E9 !important;
    -webkit-box-shadow: 0 0 0px 1000px #414042 inset !important;
    transition: background-color 5000s ease-in-out 0s;
}

.contact-form input.form-select {
    color: #E7E8E9;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #C2E8EF;
}
.contact-form button {
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

/* Form Validation Error States */
.error-field {
    border: 2px solid #F7B24D !important;
    color: #F7B24D !important;
    outline: none !important;
}
.checkbox-group.error-field {
    padding: 10px;
    border-radius: 4px;
    background-color: #38332A;
}
input.error-field::placeholder, 
textarea.error-field::placeholder {
    color: #B5843A;
    opacity: 1;
}

.error-message {
    color: #F7B24D; 
    font-size: 1rem;
    font-weight: bold;
    min-height: 1.2rem;
    text-align: center;
}

/* Tablet / Intermediate Scaling (Below 1024px down to 769px) */
@media (max-width: 1024px) and (min-width: 769px) {
    nav {
        gap: 1rem;
    }
    .nav-links a {
        font-size: 0.92rem;
    }
    .cta-button {
        font-size: 0.88rem;
        padding: 0.6rem 1.2rem;
    }
    .hero h1 {
        font-size: clamp(2.25rem, 4vw, 3.2rem);
    }
}

/* Mobile Responsiveness & Hamburger Drawer */
@media (max-width: 768px) {
    header { 
        position: sticky; 
        top: 0; 
    }
    .menu-toggle { 
        display: flex; 
    }
    
    nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #211D1E;
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        padding: 0 5%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out, padding 0.3s ease-out;
        border-bottom: 2px solid #BCAF8A;
        box-shadow: 0 10px 15px #151213;
    }
    
    nav.open {
        max-height: 400px; 
        padding: 2rem 5%;
    }
    
    .nav-links { 
        flex-direction: column; 
        width: 100%; 
        text-align: center; 
        gap: 1.2rem; 
    }
    .hero h1 { font-size: 2.25rem; }
    .section-heading { font-size: 1.75rem; }
    .form-row { flex-direction: column; }
    .form-field-group, .form-field-group.city-group, .form-field-group.state-group {
        flex: 1 1 100%;
        min-width: 100%;
    }

    .mobile-break {
        display: block;
    }
}