/* Basic Styles */
:root {
    --primary-color: #2c3e50; /* Dark Blue */
    --secondary-color: #7f8c8d; /* Slate Gray */
    --accent-color: #FFA726; /* Updated Brand Orange */
    --light-color: #ecf0f1; /* Light Gray */
    --dark-color: #34495e; /* Darker Blue for text */
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    line-height: 1.6;
    background-color: #fff;
    color: var(--dark-color);
}

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

h1, h2, h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

h4 {
    color: var(--primary-color);
}

p {
    margin-bottom: 10px;
}

p.lead {
    font-size: 1.2rem;
    color: var(--secondary-color);
}

a {
    color: var(--accent-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.button {
    display: inline-block;
    color: #fff;
    background: var(--accent-color);
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.button:hover {
    background-color: #d35400; /* Slightly darker orange */
    text-decoration: none;
}

.large-button {
    font-size: 1.2rem;
    padding: 15px 30px;
}

/* Header */
header {
    background: rgba(0, 0, 0, 0.5); /* Semi-transparent dark background for contrast */
    color: var(--dark-color);
    padding: 5px 0;
    height: 190px;
    border-bottom: none;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); /* Re-introducing a subtle shadow for definition */
    backdrop-filter: blur(5px); /* Keep the blur effect */
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    line-height: 1.6;
    background-color: #fff;
    color: var(--dark-color);
    padding-top: 190px; /* Adjusted padding-top to account for new header height */
}
header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    height: 180px;
    overflow: hidden;
    display: flex; /* To vertically center the image if needed */
    align-items: center;
}



header nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 25px; /* Increase gap between nav items */
}

header nav a {
    color: #FFFFFF; /* Pure White */
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s ease;
}

header nav a:hover {
    color: #FFA726; /* Orange hover effect */
    text-decoration: none;
}

.call-now-button {
    background-color: #FF6600; /* Brand Orange */
    color: #fff;
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.3s ease;
    white-space: nowrap; /* Prevent phone number from wrapping */
}

.call-now-button:hover {
    background-color: #d35400; /* Slightly darker orange */
    text-decoration: none;
    color: #fff;
}

/* Remove .header-contact-info, .license-text, .button-siding as they are being replaced */
.header-contact-info,
.license-text,
.button-siding {
    display: none;
}


/* Hero Section */
#hero, #city-hero {
    background: var(--dark-color) url('../assets/hero-bg.jpg') no-repeat center center/cover; /* Example background image */
    color: #fff;
    text-align: center;
    padding: 100px 0;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#hero h1, #city-hero h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    color: #fff;
}

#hero p, #city-hero p {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

/* Trust Banner Section */
#trust-banner {
    padding: 30px 0;
    background-color: #fff;
}

#trust-banner .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    text-align: center;
}

.trust-banner-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.trust-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 10px;
}

.trust-icon svg {
    width: 100%;
    height: 100%;
    fill: var(--primary-color);
}

/* Services Section */
#services {
    padding: 40px 0;
    background-color: var(--light-color);
    text-align: center;
}

#services h2 {
    margin-bottom: 30px;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.service-item {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.service-item:hover {
    transform: translateY(-5px);
}

.service-item h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* Affiliates Section */
#affiliates {
    padding: 40px 0;
    background-color: var(--light-color);
    text-align: center;
}

#affiliates h2 {
    margin-bottom: 30px;
}

.affiliate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    align-items: center;
}

.affiliate-logo img {
    max-width: 100%;
    max-height: 60px; /* Limits the height for normalization */
    width: auto;      /* Keeps proportions */
    filter: brightness(0) invert(1); /* Makes logos pure white */
    transition: filter 0.3s ease;
}

.affiliate-logo img:hover {
    filter: grayscale(0%);
}


/* Trust Bar Section */
#trust-bar {
    background-color: var(--primary-color);
    color: #fff;
    padding: 20px 0;
    text-align: center;
}

#trust-bar .container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.trust-item {
    flex-basis: 22%; /* Approx 4 items per row */
    min-width: 200px;
    padding: 15px;
    border-radius: 8px;
    background-color: var(--dark-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.trust-item i.icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: block;
    width: 50px;
    height: 50px;
    line-height: 50px;
    border-radius: 50%;
    background-color: var(--accent-color); /* Placeholder icon background */
    margin: 0 auto 10px auto;
    color: #fff; /* Placeholder icon color */
}

/* Example unique icon backgrounds - replace with actual icons if using Font Awesome */
.trust-item .icon-local { background-color: #27ae60; } /* Green */
.trust-item .icon-licensed { background-color: #3498db; } /* Blue */
.trust-item .icon-clean { background-color: #f1c40f; } /* Yellow */
.trust-item .icon-warranty { background-color: #9b59b6; } /* Purple */

.trust-item h3 {
    color: #fff;
    font-size: 1.1rem;
    margin: 0;
}

/* AJ Roofing System Section */
#aj-roofing-system {
    padding: 40px 0;
    background-color: var(--light-color);
}

#aj-roofing-system .system-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    border: 1px solid #ddd;
    padding: 30px;
    border-radius: 8px;
    background-color: #fff;
}

#aj-roofing-system .system-diagram img {
    width: 100%;
    height: auto;
    border-radius: 5px;
}

#aj-roofing-system .system-layers ul {
    list-style: none;
    padding-left: 0;
}

#aj-roofing-system .system-layers ul li {
    padding-left: 25px;
    position: relative;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

#aj-roofing-system .system-layers ul li:before {
    content: '✔';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
}


#aj-roofing-system .section-description {
    max-width: 800px;
    margin: 0 auto 40px auto;
    font-size: 1.1rem;
    color: var(--secondary-color);
}

.system-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.feature-item {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.12);
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-color); /* Default icon background */
    margin: 0 auto 20px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 2.2rem;
}

/* Specific icon styles for placeholder if actual icons are not used */
.feature-icon .icon-drip-edge { background-color: #3498db; } /* Blue */
.feature-icon .icon-ice-water { background-color: #2ecc71; } /* Green */
.feature-icon .icon-underlayment { background-color: #e67e22; } /* Orange */
.feature-icon .icon-shingles { background-color: #9b59b6; } /* Purple */
.feature-icon .icon-ridge-vent { background-color: #e74c3c; } /* Red */


.feature-item h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

/* Quote Form Section */
#quote, #gallery-cta, #city-cta {
    padding: 40px 0;
    background: var(--dark-color);
    color: #fff;
    text-align: center;
}

#quote h2, #gallery-cta h2, #city-cta h2 {
    color: #fff;
    margin-bottom: 30px;
}

#quote form {
    background: var(--primary-color);
    padding: 30px;
    border-radius: 8px;
    max-width: 600px;
    margin: 20px auto;
    text-align: left;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--dark-color);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--secondary-color);
    border-radius: 4px;
    box-sizing: border-box; /* Include padding in width */
    background-color: #fff;
    color: var(--dark-color);
}

.form-group textarea {
    resize: vertical;
}

#quote form .button {
    width: 100%;
    padding: 12px;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
}

/* Footer */
footer {
    background: var(--primary-color);
    color: #fff;
    padding: 40px 0 20px 0;
    border-top: 3px solid var(--accent-color);
    text-align: left;
}

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

.footer-section h4 {
    color: var(--accent-color);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 10px;
    color: var(--light-color);
}

.footer-section ul li a {
    color: #fff;
    text-decoration: none;
}

.footer-section ul li a:hover {
    text-decoration: underline;
}

.footer-section p {
    color: var(--light-color);
}

.social-media-icons {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.social-media-icons a {
    display: inline-block;
}

.social-media-icons svg {
    width: 32px;
    height: 32px;
    fill: #fff;
    transition: fill 0.3s ease;
}

.social-media-icons svg:hover {
    fill: var(--accent-color);
}

.instagram-link {
    font-size: 0.9em;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid var(--dark-color);
    padding-top: 20px;
}

.footer-bottom p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.footer-bottom a {
    color: #fff;
}


/* More Than Shingles Section */
#more-than-shingles {
    padding: 40px 0;
    background-color: #fff;
    text-align: center;
}

#more-than-shingles .check-list {
    list-style: none;
    padding: 0;
    text-align: left;
    max-width: 800px;
    margin: 0 auto;
}

#more-than-shingles .check-list li {
    margin-bottom: 20px;
    position: relative;
    padding-left: 30px;
}

#more-than-shingles .check-list li:before {
    content: '✔'; /* Checkmark icon */
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
    font-size: 1.2em;
}

#more-than-shingles .check-list h3 {
    color: var(--primary-color);
    margin-bottom: 5px;
    display: inline; /* Keep h3 and paragraph together */
}

/* Gallery Section */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.gallery-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.03);
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.gallery-item .caption {
    padding: 15px;
    background: var(--primary-color);
    color: #fff;
    text-align: center;
    font-weight: bold;
}

/* Transformations Section */
#transformations {
    padding: 40px 0;
    background-color: var(--light-color);
}

.transformation-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.transformation-item {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.transformation-item h3 {
    text-align: center;
    margin-bottom: 15px;
}

.transformation-item img {
    width: 100%;
    height: auto;
    border-radius: 5px;
}

/* Contact Page */
#map-section-top {
    width: 100%;
    height: 450px;
}

#contact-page-section {
    padding: 40px 0;
}

.contact-page-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 40px;
    align-items: start;
}

.contact-info-box {
    background-color: var(--light-color);
    padding: 30px;
    border-radius: 8px;
}

.contact-info-box h3 {
    margin-top: 0;
}

.contact-info-box p {
    margin-bottom: 15px;
    line-height: 1.7;
}

.contact-link-blue {
    color: var(--primary-color);
    font-weight: bold;
}

.contact-page-form {
    background-color: #fff;
}

.contact-page-form h3 {
    margin-top: 0;
}

/* Updated color for form labels on contact page */
.contact-page-form .form-group label {
    color: var(--dark-color); /* Make labels darker */
}


/* City Landing Page Specifics */
.feature-grid-city {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
    text-align: center;
}

.feature-item-city {
    background: var(--light-color);
    padding: 20px;
    border-radius: 8px;
}

.feature-item-city h3 {
    color: var(--primary-color);
}

/* Cost Guide Table */
#cost-guide {
    padding: 40px 0;
    background-color: var(--light-color);
    text-align: center;
}

.table-container {
    overflow-x: auto;
    margin: 0 auto;
    width: 100%;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    font-size: 0.9em;
    min-width: 600px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
}

table thead tr {
    background-color: var(--primary-color);
    color: #ffffff;
    text-align: left;
}

table th,
table td {
    padding: 12px 15px;
}

table tbody tr {
    border-bottom: 1px solid #dddddd;
}

table tbody tr:nth-of-type(even) {
    background-color: #f3f3f3;
}

table tbody tr:last-of-type {
    border-bottom: 2px solid var(--primary-color);
}

.disclaimer, .disclaimer-text {
    font-size: 0.8rem;
    font-style: italic;
    color: var(--secondary-color);
    margin-top: 15px;
    max-width: 800px;
    margin: 15px auto 25px auto;
}

.quote-factors {
    text-align: left;
    max-width: 800px;
    margin: 30px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.quote-factors ul {
    list-style: none;
    padding-left: 0;
}

.quote-factors ul li {
    padding-left: 20px;
    position: relative;
    margin-bottom: 10px;
}

.quote-factors ul li:before {
    content: '»';
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

/* Sticky Quote Tab */
.sticky-quote-tab {
    position: fixed;
    right: 0; /* Changed from -130px to 0 for initial visibility */
    top: 50%;
    transform: translateY(-50%) rotate(-90deg); /* Rotate -90deg to read from bottom-up */
    transform-origin: 100% 100%; /* Adjust origin to keep it on the right edge */
    background-color: #FF6600; /* Brand Orange */
    color: #fff;
    width: 180px; /* Increased height becomes width after rotation */
    height: 50px; /* Increased width becomes height after rotation */
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 1.1em;
    cursor: pointer;
    z-index: 1000;
    border-bottom-left-radius: 5px; /* Adjust radius for new rotation */
    border-bottom-right-radius: 5px; /* Adjust radius for new rotation */
    transition: right 0.3s ease, transform 0.3s ease;
    box-shadow: -2px 0px 10px rgba(0,0,0,0.2);
    animation: pulse 2s infinite; /* Apply pulse animation */
}

@keyframes pulse {
    0% { transform: translateY(-50%) rotate(-90deg) scale(1); }
    50% { transform: translateY(-50%) rotate(-90deg) scale(1.03); }
    100% { transform: translateY(-50%) rotate(-90deg) scale(1); }
}

.quote-drawer {
    position: fixed;
    top: 0;
    right: -500px; /* Hidden off-screen */
    width: 450px;
    height: 100%;
    background-color: #fff;
    z-index: 1001;
    box-shadow: -5px 0px 15px rgba(0,0,0,0.2);
    transition: right 0.5s ease;
    overflow-y: auto;
}

.quote-drawer.open {
    right: 0;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 36px;
    color: var(--secondary-color);
    text-decoration: none;
}

.close-btn:hover {
    color: var(--dark-color);
}

.drawer-content {
    height: calc(100% - 60px); /* Adjust for drawer footer */
}

.drawer-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    text-align: center;
    background-color: var(--light-color);
}

.drawer-footer .social-media-icons {
    justify-content: center;
}

.drawer-footer svg {
    fill: var(--primary-color);
}


/* Mobile Menu Styles */
#mobile-menu-icon {
    display: none; /* Hidden by default */
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1005;
}

#mobile-menu-icon span {
    display: block;
    width: 30px;
    height: 3px;
    background-color: #fff;
    margin: 6px 0;
    transition: 0.4s;
}

#mobile-nav-panel {
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 1002;
    top: 0;
    left: 0;
    background-color: rgba(44, 62, 80, 0.95);
    overflow-x: hidden;
    transition: 0.5s;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#mobile-nav-panel a {
    padding: 15px;
    text-decoration: none;
    font-size: 24px;
    color: #ecf0f1;
    display: block;
    transition: 0.3s;
}

#mobile-nav-panel a:hover, #mobile-nav-panel a:focus {
    color: #FFA726;
}

#mobile-nav-panel .call-now-button {
    margin-top: 20px;
    font-size: 20px;
}


/* Mobile Responsiveness */
@media (max-width: 768px) {
    #desktop-nav {
        display: none;
    }

    #mobile-menu-icon {
        display: block;
    }

    header .container {
        flex-direction: column;
        text-align: center;
        justify-content: center; /* Ensures logo is centered vertically */
    }
    
    .site-logo {
        /* No longer needs absolute positioning */
    }

    header .logo {
        margin-bottom: 15px;
    }

    header nav {
        justify-content: center;
    }


    #hero h1 {
        font-size: 2.5rem;
    }

    .service-grid {
        grid-template-columns: 1fr;
    }

    #quote form {
        padding: 20px;
    }

    #trust-bar .container {
        flex-direction: column;
    }

    .trust-item {
        flex-basis: 100%;
    }

    .system-features-grid, #aj-roofing-system .system-layout {
        grid-template-columns: 1fr;
    }

    #more-than-shingles .check-list li {
        padding-left: 25px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .transformation-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid, .contact-page-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    #hero {
        padding: 60px 0;
        min-height: 300px;
    }

    #hero h1 {
        font-size: 2rem;
    }

    #hero p {
        font-size: 1rem;
    }

    header nav a[href^="tel:"] {
        display: block;
        margin-top: 10px;
    }
    
    .quote-drawer {
        width: 100%;
        right: -100%;
    }
}