/* style.css */
:root {
    --brand-blue: #1b4b96; /* Sampled from logo */
    --brand-black: #000000;
    --text-dark: #333333;
    --text-light: #666666;
    --bg-light: #f8f9fa;
    --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Roboto, Helvetica, sans-serif; }

body { color: var(--text-dark); background-color: #ffffff; line-height: 1.6; }

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-up { animation: fadeInUp 0.8s ease forwards; }

/* Navigation */
header {
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky; top: 0; z-index: 100;
}
.nav-container {
    max-width: 1200px; margin: 0 auto; padding: 15px 20px;
    display: flex; justify-content: space-between; align-items: center;
}
.logo img { max-height: 60px; }
.nav-links a {
    text-decoration: none; color: var(--brand-black); font-weight: 600;
    margin-left: 20px; transition: var(--transition);
}
.nav-links a:hover { color: var(--brand-blue); }
.btn-primary {
    background: var(--brand-blue); color: #fff; padding: 10px 20px; border: none;
    border-radius: 4px; text-decoration: none; font-weight: bold; cursor: pointer;
    transition: var(--transition);
}
.btn-primary:hover { background: var(--brand-black); color: #fff; }

/* Hero Section */
.hero {
    /* The linear-gradient adds a subtle dark overlay so white text is easy to read */
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6)), url('https://www.louisvilleroofingandsiding.com/hero.jpeg') center/cover no-repeat;
    color: white; 
    padding: 120px 20px; 
    text-align: center;
    /* This ensures the image looks good on all screen sizes */
    background-position: center;
    background-size: cover;
}
.hero h1 { font-size: 3rem; margin-bottom: 15px; }
.hero p { font-size: 1.2rem; margin-bottom: 30px; }

/* Split Section (Content + Form) */
.main-content {
    max-width: 1200px; margin: 60px auto; padding: 0 20px;
    display: grid; grid-template-columns: 2fr 1fr; gap: 40px;
}
.form-card {
    background: var(--bg-light); padding: 30px; border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.form-card input, .form-card textarea {
    width: 100%; padding: 12px; margin-bottom: 15px; border: 1px solid #ccc;
    border-radius: 4px;
}

/* Footer */
footer { background: var(--brand-black); color: white; text-align: center; padding: 30px 20px; margin-top: 40px; }

/* Mobile Responsive */
@media (max-width: 768px) {
    .main-content { grid-template-columns: 1fr; }
    .nav-links { display: none; } /* We will add a hamburger menu later */
    .hero h1 { font-size: 2rem; }
}

/* Accordion Styles */
.accordion-item { 
    border-bottom: 1px solid #ddd; 
    margin-bottom: 10px; 
    border-radius: 4px;
    overflow: hidden;
}
.accordion-header {
    width: 100%; 
    text-align: left; 
    padding: 18px 20px;
    background: var(--bg-light); 
    border: none; 
    outline: none;
    font-size: 1.1rem; 
    font-weight: 600; 
    color: var(--text-dark);
    cursor: pointer;
    transition: var(--transition); 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
}
.accordion-header:hover { 
    background: #e2e6ea; 
    color: var(--brand-blue); 
}
.accordion-header::after { 
    content: '+'; 
    font-size: 1.5rem; 
    font-weight: bold;
    color: var(--brand-blue);
}
.accordion-header.active {
    background: var(--brand-blue);
    color: #fff;
}
.accordion-header.active::after { 
    content: '-'; 
    color: #fff;
}
.accordion-content {
    padding: 0 20px; 
    max-height: 0; 
    overflow: hidden;
    transition: max-height 0.3s ease-out; 
    background: #fff;
}
.accordion-content p { 
    padding: 20px 0; 
    margin: 0;
}

/* Dropdown Menu Styles */
.dropdown {
    display: inline-block;
    position: relative;
}

.dropdown .dropbtn {
    text-decoration: none; 
    color: var(--brand-black); 
    font-weight: 600;
    margin-left: 20px; 
    transition: var(--transition);
    padding-bottom: 10px; /* Gives a little hover buffer */
}

.dropdown:hover .dropbtn {
    color: var(--brand-blue);
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #ffffff;
    min-width: 220px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.1);
    z-index: 200;
    border-radius: 4px;
    top: 100%; /* Positions it right below the parent link */
    left: 20px;
    overflow: hidden;
}

.dropdown-content a {
    color: var(--text-dark);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    margin-left: 0;
    border-bottom: 1px solid #f1f1f1;
    font-weight: normal;
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    background-color: var(--bg-light);
    color: var(--brand-blue);
}

/* Show the dropdown menu on hover */
.dropdown:hover .dropdown-content {
    display: block;
}


/* Mobile Hamburger Icon Base (Hidden on Desktop) */
.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    z-index: 101; /* Keep it above the sliding menu */
}

.hamburger span {
    width: 30px;
    height: 3px;
    background-color: var(--brand-black);
    transition: var(--transition);
    border-radius: 2px;
}

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 1024px) {
    .hamburger {
        display: flex;
    }
    
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #ffffff;
        flex-direction: column;
        align-items: flex-start;
        padding: 0 20px 20px 20px;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        
        /* Hidden by default, slides down via JS */
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-in-out, padding 0.4s ease-in-out;
    }
    
    .nav-links.active {
        max-height: 800px; /* Big enough to fit all links */
        padding: 20px;
    }

    .nav-links a {
        margin: 12px 0;
        margin-left: 0 !important;
        font-size: 1.1rem;
        display: block;
        width: 100%;
    }

    /* Mobile Dropdown Fix */
    .dropdown {
        width: 100%;
    }
    
    .dropdown .dropbtn {
        margin: 12px 0;
        padding-bottom: 0;
    }

    .dropdown-content {
        position: static; /* Removes the absolute positioning on mobile */
        box-shadow: none;
        min-width: 100%;
        padding-left: 15px;
        border-left: 2px solid var(--brand-blue);
        margin-top: 5px;
        /* Hidden by default, shows when parent is hovered/clicked */
    }

    .dropdown-content a {
        padding: 8px 16px;
        margin: 5px 0;
    }

    .mobile-btn {
        text-align: center;
        margin-top: 20px !important;
    }

    /* Hamburger Animation to 'X' */
    .hamburger.toggle span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    .hamburger.toggle span:nth-child(2) {
        opacity: 0;
    }
    .hamburger.toggle span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
    
    /* Layout adjustments for main content on mobile */
    .main-content { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2.2rem; }
}

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 1024px) {
    .hamburger {
        display: flex;
    }
    
    .nav-links {
        /* This !important overrides the old display: none rule that was breaking it */
        display: flex !important; 
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #ffffff;
        flex-direction: column;
        align-items: flex-start;
        padding: 0 20px;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        
        /* The slide down animation */
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-in-out, padding 0.4s ease-in-out;
    }
    
    .nav-links.active {
        max-height: 800px; 
        padding: 20px;
    }

    .nav-links > a, .dropdown {
        margin: 12px 0;
        margin-left: 0 !important;
        font-size: 1.1rem;
        display: block;
        width: 100%;
    }

    /* Mobile Dropdown Fixes */
    .dropdown .dropbtn {
        padding-bottom: 0;
        display: block;
    }

    .dropdown-content {
        position: static; 
        box-shadow: none;
        min-width: 100%;
        padding-left: 15px;
        border-left: 2px solid var(--brand-blue);
        margin-top: 10px;
    }

    .dropdown-content a {
        padding: 8px 16px;
        margin: 5px 0;
        font-size: 1rem;
    }

    .mobile-btn {
        text-align: center;
        margin-top: 20px !important;
        width: 100%;
        display: block;
    }

    /* Hamburger Animation to 'X' */
    .hamburger.toggle span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    .hamburger.toggle span:nth-child(2) { opacity: 0; }
    .hamburger.toggle span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
    
    .main-content { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2.2rem; }
}

.text-white { color:#FFFFFF!important; }