:root {
    /* Branding Colors extracted from logo */
    --brand-blue: #0A1F44;
    --brand-red: #D11218;
    --brand-red-accessible: #FF4D52; /* WCAG AA compliant on black (6.3:1 contrast) */
    --text-black: #000000;
    --text-dark: #1F2937;
    --bg-light-gray: #F3F4F6;
    --border-gray: #D1D5DB;
}

/* Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-black);
    line-height: 1.6;
    background-color: #ffffff;
}

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

a:hover {
    text-decoration: underline;
}

h1,
h2,
h3,
h4 {
    color: var(--brand-blue);
    margin-bottom: 1rem;
}

/* Accessibility */
.skip-link {
    position: absolute;
    top: -50px;
    left: 0;
    background: var(--brand-red);
    color: #ffffff;
    padding: 10px 18px;
    z-index: 10000;
    font-weight: bold;
    text-decoration: none;
    transition: top 0.2s ease;
    border-radius: 0 0 4px 0;
}

.skip-link:focus {
    top: 0;
    color: #ffffff;
    text-decoration: none;
}

*:focus-visible {
    outline: 3px solid var(--brand-blue);
    outline-offset: 2px;
}

/* Layout Utility */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 4rem 0;
}

/* Header & Navigation */
header {
    border-bottom: 3px solid var(--brand-red);
    padding: 0.75rem 0;
    background: #ffffff;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo-container img {
    max-height: 80px;
    width: auto;
    display: block;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.contact-info {
    display: flex;
    align-items: center;
    font-weight: bold;
}

.phone-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--brand-blue);
    font-size: 1.05rem;
    font-weight: bold;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 4px;
    background-color: var(--bg-light-gray);
    border: 1px solid var(--border-gray);
    transition: all 0.2s ease;
}

.phone-link:hover {
    background-color: var(--brand-blue);
    color: #ffffff;
    text-decoration: none;
}

.phone-label {
    color: var(--brand-red);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.phone-link:hover .phone-label {
    color: #ffffff;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    font-weight: bold;
    align-items: center;
}

nav a.active {
    border-bottom: 2px solid var(--brand-red);
}

/* Hero Section (Index & City Landing Pages) */
.hero {
    background-image: linear-gradient(rgba(243, 244, 246, 0.55), rgba(243, 244, 246, 0.8)), url('images/hero-image.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 6.5rem 20px;
    text-align: center;
    border-bottom: 1px solid var(--border-gray);
}

.hero h1 {
    font-size: 2.5rem;
    color: var(--text-black);
}

.hero span.highlight,
.highlight {
    color: var(--brand-blue);
}

.hero p {
    font-size: 1.2rem;
    max-width: 750px;
    margin: 0 auto 2rem auto;
    color: var(--text-black);
    font-weight: 500;
}

/* Service Hero (Service Pages) */
.service-hero {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 6rem 20px;
    text-align: center;
    border-bottom: 1px solid var(--border-gray);
}

.service-hero.roofing-hero {
    background-image: linear-gradient(rgba(243, 244, 246, 0.65), rgba(243, 244, 246, 0.8)), url('images/service-roofing-main.webp');
}

.service-hero.exterior-hero {
    background-image: linear-gradient(rgba(243, 244, 246, 0.65), rgba(243, 244, 246, 0.8)), url('images/service-exterior-main.webp');
}

.service-hero.interior-hero {
    background-image: linear-gradient(rgba(243, 244, 246, 0.65), rgba(243, 244, 246, 0.8)), url('images/service-interior-main.webp');
}

.service-hero h1 {
    font-size: 2.8rem;
}

.service-hero p {
    font-size: 1.25rem;
    max-width: 800px;
    margin: 0 auto;
    color: var(--text-black);
    font-weight: 500;
}

/* General Buttons */
.btn {
    background-color: #ffffff;
    color: var(--brand-blue);
    border: 2px solid var(--brand-blue);
    padding: 12px 24px;
    font-weight: bold;
    border-radius: 4px;
    display: inline-block;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--brand-blue);
    color: #ffffff;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--brand-blue);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #061329;
    color: #ffffff;
}

/* Feature Blocks (Service Pages) */
.feature-block {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    align-items: center;
    margin-bottom: 4rem;
}

.feature-block:last-child {
    margin-bottom: 0;
}

.feature-image {
    flex: 1;
    min-width: 300px;
}

.feature-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: block;
}

.feature-text {
    flex: 1;
    min-width: 300px;
}

/* Services Section (Index) */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.service-card {
    border: 1px solid var(--border-gray);
    padding: 2rem;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    background-color: #ffffff;
}

.service-card h3 {
    border-bottom: 2px solid var(--brand-red);
    display: inline-block;
    padding-bottom: 0.5rem;
}

/* Brand Grid (Service Pages) */
.brand-section {
    background-color: var(--bg-light-gray);
    text-align: center;
}

.brand-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.brand-card {
    border: 1px solid var(--border-gray);
    padding: 2rem;
    border-radius: 4px;
    background-color: #ffffff;
}

.brand-card h3 {
    border-bottom: 2px solid var(--brand-red);
    display: inline-block;
    padding-bottom: 0.5rem;
}

/* Service Cards (Interior Grid) */
.interior-grid {
    background-color: var(--bg-light-gray);
    text-align: center;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.interior-card {
    border: 1px solid var(--border-gray);
    padding: 2rem;
    border-radius: 4px;
    background-color: #ffffff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.interior-card h3 {
    border-bottom: 2px solid var(--brand-red);
    display: inline-block;
    padding-bottom: 0.5rem;
}

/* Gallery Section (Index & City Landing Pages) */
.gallery {
    background-color: var(--bg-light-gray);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-item {
    text-align: center;
}

.gallery-control {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    display: block;
}

.gallery-control:hover,
.gallery-control:focus {
    transform: scale(1.02);
    outline: 3px solid var(--brand-blue);
}

.gallery-img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    border: 1px solid var(--border-gray);
    display: block;
}

.gallery-caption {
    margin-top: 0.75rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-black);
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    backdrop-filter: blur(5px);
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 4px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
    border: 2px solid #ffffff;
}

.lightbox-caption {
    margin-top: 15px;
    color: #ffffff;
    font-size: 1.25rem;
    text-align: center;
    max-width: 80%;
    font-weight: 500;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 44px;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.3s ease;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: var(--brand-red-accessible);
    text-decoration: none;
}

/* Testimonials Section (Index) */
.testimonials {
    background-color: #ffffff;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.testimonial-card {
    border: 1px solid var(--border-gray);
    padding: 2rem;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    background-color: var(--bg-light-gray);
    position: relative;
}

.testimonial-quote {
    font-style: italic;
    margin-bottom: 1rem;
}

.testimonial-author {
    font-weight: bold;
    color: var(--brand-blue);
    text-align: right;
    border-top: 1px solid var(--border-gray);
    padding-top: 0.5rem;
}

/* Meet the Builder Section */
.builder-section {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    align-items: center;
}

.builder-image {
    flex: 0 0 300px;
    max-width: 100%;
}

.builder-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: block;
}

.builder-text {
    flex: 1;
    min-width: 300px;
}

/* LOCAL SEO KEYWORD SATURATION MAP MARKER SIGNATURE SECTION */
.service-area-signature {
    border-top: 1px solid var(--border-gray);
    border-bottom: 1px solid var(--border-gray);
    background-color: var(--bg-light-gray);
}

.area-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    padding: 1.5rem 0;
    justify-content: center;
}

.area-item {
    font-weight: bold;
}

.area-item a,
a.area-item {
    color: var(--brand-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

.area-item a:hover,
a.area-item:hover {
    color: var(--brand-red);
    text-decoration: underline;
}

/* Contact Section (Index & City Landing Pages) */
.contact-container {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
}

.contact-details,
.contact-form-wrapper {
    flex: 1;
    min-width: 300px;
}

.map-embed-wrapper {
    margin-top: 1.5rem;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--border-gray);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.map-embed-wrapper iframe {
    width: 100%;
    height: 220px;
    border: 0;
    display: block;
}


form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

label {
    font-weight: bold;
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.95rem;
}

input,
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-gray);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

input:focus,
textarea:focus {
    outline: 2px solid var(--brand-blue);
    border-color: transparent;
}

.form-group-row {
    display: flex;
    gap: 1rem;
}

.form-group-row > div {
    flex: 1;
}

.submit-btn {
    background-color: #ffffff;
    color: var(--brand-blue);
    border: 2px solid var(--brand-blue);
    padding: 14px;
    font-size: 1.05rem;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.submit-btn:hover:not(:disabled) {
    background-color: var(--brand-blue);
    color: #ffffff;
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: var(--border-gray);
    border-color: var(--border-gray);
    color: #4B5563;
}

/* CTA Section (Service Pages) */
.cta-section {
    background-color: var(--brand-blue);
    color: #ffffff;
    text-align: center;
}

.cta-section h2,
.cta-section p {
    color: #ffffff;
}

.cta-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.cta-phone-link {
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: bold;
    text-decoration: underline;
    transition: opacity 0.2s;
}

.cta-phone-link:hover {
    opacity: 0.85;
}

/* Footer (WCAG AA Compliant) */
footer {
    background-color: var(--text-black);
    color: #ffffff;
    padding: 3rem 0 1rem 0;
    text-align: left;
}

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

footer h3 {
    color: var(--brand-red-accessible); /* 6.3:1 contrast on black */
    font-size: 1.15rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 0.5rem;
}

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

footer ul li {
    margin-bottom: 0.5rem;
}

footer a {
    color: #cccccc;
    text-decoration: none;
    transition: color 0.2s ease;
}

footer a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.25rem;
}

.footer-bottom p {
    color: #888888;
    font-size: 0.85rem;
}

/* Scroll-to-Top Button */
.scroll-top-btn {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99;
    font-size: 24px;
    border: none;
    outline: none;
    background-color: var(--brand-red);
    color: #ffffff;
    cursor: pointer;
    padding: 10px 16px;
    border-radius: 50%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: background-color 0.3s, transform 0.3s;
}

.scroll-top-btn:hover {
    background-color: var(--brand-blue);
    transform: translateY(-3px);
}

/* Mobile Responsiveness & Hamburger Menu */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--brand-blue);
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .header-content {
        position: relative;
    }

    .contact-info {
        order: 2;
    }

    .phone-link {
        font-size: 0.95rem;
        padding: 6px 10px;
    }

    .mobile-menu-toggle {
        order: 3;
    }

    nav {
        display: none;
        width: 100%;
        background: #ffffff;
        position: absolute;
        top: 100%;
        left: 0;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        border-top: 1px solid var(--border-gray);
    }

    nav.active {
        display: block;
    }

    nav ul {
        flex-direction: column;
        align-items: flex-start !important;
        padding: 1.25rem;
        gap: 1rem !important;
    }

    .form-group-row {
        flex-direction: column;
        gap: 1.25rem;
    }

    h1 {
        font-size: 2rem !important;
    }

    .section-padding {
        padding: 2.5rem 0;
    }

    .hero,
    .service-hero {
        padding: 4rem 20px !important;
    }

    .feature-block {
        flex-direction: column;
        gap: 1.5rem;
    }

    .contact-container {
        flex-direction: column;
    }
}
