/* ==========================================================================
   HOMEPAGE CUSTOM LAYOUTS (BENTO-STYLE REVISION)
   ========================================================================== */

:root {
    --header-height: 80px;
}

main {
    padding-top: var(--header-height);
}
   
/* Section Background Rhythm */
.section-bg-white { background-color: #FFFFFF; }
.section-bg-pale { background-color: var(--clr-bg-alt, #F9FAFB); }
.section-bg-dark { background-color: var(--clr-navy); color: white; }

.section {
    padding: var(--space-xl) 0;
    position: relative;
    scroll-margin-top: calc(var(--header-height) + 20px);
}

/* ==========================================================================
   1. HERO & TRUST STRIP (Restored Original)
   ========================================================================== */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    padding: var(--space-xl) 0 var(--space-lg);
    background-color: var(--clr-bg-alt, #F9FAFB);
    overflow: hidden;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    align-items: stretch;
}

.hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-right: var(--space-md);
}

.hero-title {
    font-size: 4.5rem;
    letter-spacing: -1px;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    color: var(--clr-navy);
}

.hero-desc {
    font-size: 1.25rem;
    max-width: 500px;
    margin-bottom: 2.5rem;
    color: #4B5563;
}

.hero-cta-wrapper {
    display: flex;
    gap: 1rem;
}

.hero-visual {
    position: relative;
    height: 100%;
}

.hero-image-wrapper {
    position: relative;
    height: calc(100% + 4rem); 
    margin-bottom: -4rem;
    border-radius: 200px 0 0 0; 
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Original Trust Proof Rail */
.proof-rail {
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--clr-border);
}

.proof-rail-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.proof-point {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.proof-point-title {
    font-weight: 700;
    color: var(--clr-navy);
}

/* ==========================================================================
   2. SERVICES BENTO GRID
   ========================================================================== */
.bento-services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 300px);
    gap: var(--space-sm);
}

/* Reverting to practical cards for services */
.service-card {
    position: relative;
    background-color: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--clr-border);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--clr-text);
}
.service-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--clr-primary);
}

.service-card-img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.service-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.service-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--clr-navy);
    margin-bottom: 0.5rem;
}

.service-card-desc {
    font-size: 0.95rem;
    margin-bottom: 1rem;
    flex: 1;
}

.service-card-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--clr-primary);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Bento Placements */
.bento-feat-large { /* Residential - Wide */
    grid-column: 1 / 3;
    grid-row: 1 / 2;
    flex-direction: row; /* Image left, text right */
}
.bento-feat-large .service-card-img {
    height: 100%;
    width: 50%;
}
.bento-feat-large .service-card-content {
    width: 50%;
    justify-content: center;
}
.bento-feat-large .service-card-title { font-size: 1.75rem; }

.bento-feat-tall { /* Commercial - Tall */
    grid-column: 3 / 4;
    grid-row: 1 / 3;
}
.bento-feat-tall .service-card-img {
    height: 50%;
}

.bento-feat-medium { /* Deep Clean */
    grid-column: 4 / 5;
    grid-row: 1 / 2;
}

.bento-feat-wide { /* Move-In */
    grid-column: 1 / 3;
    grid-row: 2 / 3;
    flex-direction: row;
}
.bento-feat-wide .service-card-img {
    height: 100%;
    width: 40%;
}
.bento-feat-wide .service-card-content {
    width: 60%;
    justify-content: center;
}

.bento-feat-small { /* Post Construction */
    grid-column: 4 / 5;
    grid-row: 2 / 3;
}

/* ==========================================================================
   3. BEFORE & AFTER BENTO
   ========================================================================== */
.ba-bento-grid {
    display: grid;
    grid-template-columns: 7fr 5fr;
    gap: var(--space-xl);
    align-items: center;
}

.ba-large {
    border-radius: var(--radius-md);
    overflow: hidden;
    height: 500px;
    box-shadow: var(--shadow-lg);
}

.ba-content {
    display: flex;
    flex-direction: column;
}

.ba-small {
    border-radius: var(--radius-md);
    overflow: hidden;
    height: 250px;
    margin: 2rem 0;
    box-shadow: var(--shadow-md);
}

/* ==========================================================================
   4. SPARKLE STANDARD (2x2 Grid)
   ========================================================================== */
.standard-bento-grid {
    display: grid;
    grid-template-columns: 4fr 6fr;
    gap: var(--space-xl);
    align-items: center;
}

.standard-principles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}

.standard-item {
    background: white;
    padding: var(--space-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--clr-border);
}

.standard-num {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--clr-primary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.standard-item h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--clr-navy);
    margin-bottom: 0.5rem;
}

/* ==========================================================================
   5. TESTIMONIALS
   ========================================================================== */
.testi-bento-grid {
    display: grid;
    grid-template-columns: 7fr 5fr;
    gap: var(--space-xl);
}

.testi-large-card {
    background-color: var(--clr-navy);
    color: white;
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.testi-large-card .stars { color: #FBBF24; margin-bottom: 1.5rem; font-size: 1.5rem; }

.testi-large-card blockquote {
    font-size: 2rem;
    line-height: 1.3;
    font-weight: 600;
    margin-bottom: 2rem;
}

.testi-small-stack {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.testi-small-card {
    background-color: white;
    padding: var(--space-md);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-md);
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.testi-small-card .stars { color: #FBBF24; margin-bottom: 0.5rem; }
.testi-small-card blockquote {
    font-size: 1.125rem;
    font-style: italic;
    color: var(--clr-navy);
    margin-bottom: 1rem;
}

/* ==========================================================================
   6. SERVICE AREAS (Split)
   ========================================================================== */
.areas-split {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: var(--space-xl);
    align-items: center;
}

.areas-list-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    background: white;
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--clr-border);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.areas-list-grid::after {
    content: '';
    position: absolute;
    right: -2rem;
    bottom: -2rem;
    width: 150px;
    height: 150px;
    background-image: radial-gradient(circle, var(--clr-primary) 10%, transparent 10%);
    background-size: 20px 20px;
    opacity: 0.1;
}

.area-item-clean {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--clr-navy);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--clr-border);
}
.area-item-clean svg { color: var(--clr-primary); }


/* ==========================================================================
   7. BLOG OFFSET
   ========================================================================== */
.blog-offset-grid {
    display: grid;
    grid-template-columns: 7fr 5fr;
    gap: var(--space-lg);
}

.blog-main-card {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--clr-border);
}
.blog-main-card img {
    width: 100%;
    height: 350px;
    object-fit: cover;
}
.blog-main-card .content { padding: 2rem; }
.blog-main-card h3 { font-size: 2rem; margin-bottom: 1rem; color: var(--clr-navy); }

.blog-small-stack {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}
.blog-small-card {
    display: grid;
    grid-template-columns: 150px 1fr;
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--clr-border);
    height: 100%;
}
.blog-small-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.blog-small-card .content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.blog-small-card h3 {
    font-size: 1.25rem;
    color: var(--clr-navy);
}

/* ==========================================================================
   8. FINAL CTA
   ========================================================================== */
.final-cta-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    padding: 4.5rem 2rem;
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
    color: white;
    box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.25);
}
.final-cta-content,
.final-cta-left,
.final-cta-right {
    position: relative;
    z-index: 2;
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}
.final-cta-title {
    color: #ffffff !important;
    font-size: 2.75rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.25rem;
    text-align: center;
}
.final-cta-desc {
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.25rem;
    line-height: 1.6;
    margin-bottom: 2.25rem;
    max-width: 580px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}
.final-cta-actions {
    display: flex;
    justify-content: center;
    align-items: center;
}
.final-cta-btn {
    background-color: #ffffff;
    color: #0F172A !important;
    font-size: 1.15rem;
    font-weight: 600;
    padding: 1.1rem 2.75rem;
    border-radius: 9999px;
    display: inline-block;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
.final-cta-btn:hover {
    background-color: var(--clr-primary, #0066cc);
    color: #ffffff !important;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 102, 204, 0.4);
}


/* ==========================================================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */
@media (max-width: 1024px) {
    .hero-container,
    .ba-bento-grid,
    .standard-bento-grid,
    .testi-bento-grid,
    .areas-split,
    .blog-offset-grid {
        grid-template-columns: 1fr;
    }
    
    .proof-rail-container { flex-wrap: wrap; gap: 1.5rem; }
    
    .bento-services-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
    }
    
    .bento-feat-large, .bento-feat-tall, .bento-feat-medium, .bento-feat-wide, .bento-feat-small {
        grid-column: span 2;
        grid-row: auto;
        flex-direction: column;
    }
    .bento-feat-large .service-card-img, .bento-feat-wide .service-card-img {
        width: 100%; height: 200px;
    }
    .bento-feat-large .service-card-content, .bento-feat-wide .service-card-content {
        width: 100%;
    }
    
    .hero-image-wrapper { margin-bottom: 0; height: 400px; border-radius: var(--radius-lg); }
    .hero { min-height: auto; }
}

@media (max-width: 768px) {
    :root {
        --header-height: 72px;
    }

    /* MOBILE HEADER FIX */
    .header { padding: 0; }
    .header-container {
        height: var(--header-height);
        padding: 0 20px;
    }

    /* MOBILE CTA BAR PADDING FIX */
    body {
        padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px));
    }

    /* MOBILE HERO FIX */
    .hero {
        padding: 0;
        min-height: auto;
    }
    
    .hero-container {
        display: flex;
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
        padding-left: 24px;
        padding-right: 24px;
        gap: 0;
    }
    
    .hero-content {
        padding-right: 0;
        padding-top: 32px;
    }

    .section-label { margin-bottom: 12px; }
    
    .hero-title {
        font-size: clamp(42px, 11vw, 50px);
        line-height: 0.98;
        letter-spacing: -0.035em;
        margin-bottom: 20px;
    }
    
    .hero-desc {
        font-size: 16px;
        line-height: 1.6;
        margin-bottom: 24px;
        width: 100%;
        max-width: 32ch;
    }
    
    .hero-cta-wrapper {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 16px;
        margin-bottom: 24px;
    }
    
    .hero-btn-primary {
        width: 100%;
        text-align: center;
    }

    .hero-btn-secondary {
        width: auto !important;
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
        color: var(--clr-navy) !important;
        font-weight: 700 !important;
        box-shadow: none !important;
        text-align: left;
    }
    
    .hero-btn-secondary::after {
        content: " \2192"; /* Right arrow */
    }
    
    .hero-visual {
        margin-top: 24px;
        width: 100%;
    }
    
    .hero-image-wrapper {
        width: 100%;
        height: auto;
        aspect-ratio: 4 / 5;
        border-radius: 22px;
        margin-bottom: 0;
        box-shadow: none;
    }
    
    /* MOBILE TRUST STRIP FIX */
    .proof-rail {
        padding: 0;
        background-color: var(--clr-bg-alt, #F9FAFB); 
    }
    
    .proof-rail-container {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        padding: 20px;
    }
    
    .proof-point {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .proof-point-title { font-size: 14px; }
    .proof-point-desc { font-size: 12px; }

    /* SERVICES GRID MOBILE FIX */
    .bento-services-grid { grid-template-columns: 1fr; }
    .bento-feat-large, .bento-feat-tall, .bento-feat-medium, .bento-feat-wide, .bento-feat-small { 
        grid-column: span 1; 
        grid-row: auto;
        height: auto;
        min-height: 0;
        align-self: start;
    }
    .service-card {
        padding: 0; /* Reset */
    }
    .service-card-img {
        aspect-ratio: 16 / 10;
        height: auto !important; /* Override desktop fixed heights */
        width: 100%;
    }
    .service-card-content {
        padding: 16px 18px;
    }
    .service-card-title { margin-bottom: 6px; }
    .service-card-desc { margin-bottom: 18px; }

    /* TESTIMONIALS MOBILE FIX */
    .testi-large-card {
        width: 100%;
        height: auto;
        padding: 24px;
        justify-content: flex-start;
    }
    .testi-large-card blockquote {
        font-size: 24px;
        line-height: 1.35;
        text-align: left;
    }
    
    /* FINAL CTA MOBILE FIX */
    .final-cta-wrapper {
        padding: 3rem 1.5rem;
        text-align: center;
    }
    .final-cta-content,
    .final-cta-left,
    .final-cta-right {
        max-width: 100%;
        width: 100%;
        text-align: center;
        margin: 0 auto;
    }
    .final-cta-title {
        font-size: 2rem;
        margin-bottom: 1rem;
        text-align: center;
    }
    .final-cta-desc {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
        font-size: 1.05rem;
        text-align: center;
        margin-bottom: 1.75rem;
    }
    .final-cta-actions {
        width: 100%;
        display: flex;
        justify-content: center;
    }
    .final-cta-btn {
        width: 100%;
        max-width: 320px;
        text-align: center;
        display: inline-block;
    }

    /* Other Mobile Resets */
    .standard-principles, .areas-list-grid { grid-template-columns: 1fr; }
    .blog-small-card { grid-template-columns: 1fr; }
    .blog-small-card img { height: 200px; }
}
