/* ==========================================================================
   GRACE ROOFING GROUP - Sections CSS
   Section-specific layouts and styles
   ========================================================================== */

/* Pinned Section Base */
.section-pinned {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

@media (max-width: 1024px) {
    .section-pinned {
        min-height: 100vh;
        height: auto;
    }
}

@media (max-width: 767px) {
    .section-pinned {
        min-height: auto;
        height: auto;
        overflow: visible;
    }
}

/* Standard Section - Enhanced Spacing for Trust */
.section {
    position: relative;
    padding: 80px 0;
}

@media (min-width: 768px) {
    .section {
        padding: 120px 0;
    }
}

@media (min-width: 1024px) {
    .section {
        padding: 160px 0;
    }
}

/* Container - Improved Horizontal Rhythm */
.container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

@media (min-width: 768px) {
    .container {
        padding-left: 5vw;
        padding-right: 5vw;
    }
}

@media (min-width: 1280px) {
    .container {
        padding-left: 6vw;
        padding-right: 6vw;
    }
}

/* Hero Section */
#hero .hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

#hero .hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, var(--charcoal) 0%, rgba(27, 27, 29, 0.8) 50%, rgba(27, 27, 29, 0.4) 100%);
}

#hero .hero-vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 0%, transparent 40%, rgba(27, 27, 29, 0.6) 100%);
    pointer-events: none;
}

#hero .hero-content {
    position: relative;
    z-index: 10;
    height: 100%;
    display: flex;
    align-items: center;
    padding-top: 60px;
}

@media (min-width: 768px) {
    #hero .hero-content {
        padding-top: 80px;
    }
}

#hero .hero-inner {
    max-width: 768px;
}

#hero .hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}

@media (min-width: 768px) {
    #hero .hero-badges {
        gap: 12px;
    }
}

#hero .hero-headline {
    margin-bottom: 20px;
}

@media (min-width: 768px) {
    #hero .hero-headline {
        margin-bottom: 28px;
    }
}

#hero .hero-headline .word {
    display: inline-block;
    margin-right: 0.25em;
}

#hero .hero-subheadline {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-secondary);
    max-width: 560px;
    margin-bottom: 28px;
}

@media (min-width: 768px) {
    #hero .hero-subheadline {
        font-size: 18px;
        margin-bottom: 36px;
    }
}

@media (min-width: 1024px) {
    #hero .hero-subheadline {
        font-size: 20px;
    }
}

#hero .hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
}

@media (min-width: 768px) {
    #hero .hero-cta {
        gap: 16px;
        margin-bottom: 56px;
    }
}

#hero .hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

@media (min-width: 768px) {
    #hero .hero-stats {
        gap: 48px;
    }
}

#hero .stat-item .stat-value {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 24px;
    color: var(--brass);
    display: block;
}

@media (min-width: 768px) {
    #hero .stat-item .stat-value {
        font-size: 30px;
    }
}

@media (min-width: 1024px) {
    #hero .stat-item .stat-value {
        font-size: 36px;
    }
}

#hero .stat-item .stat-label {
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-secondary);
}

@media (min-width: 768px) {
    #hero .stat-item .stat-label {
        font-size: 12px;
    }
}

#hero .hero-bottom {
    position: absolute;
    bottom: 24px;
    left: 16px;
    right: 16px;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
}

@media (min-width: 768px) {
    #hero .hero-bottom {
        bottom: 32px;
        left: 6vw;
        right: 6vw;
    }
}

@media (min-width: 1024px) {
    #hero .hero-content {
        padding-top: 100px;
    }
}

#hero .hero-license {
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(185, 181, 170, 0.6);
}

@media (min-width: 768px) {
    #hero .hero-license {
        font-size: 12px;
    }
}

#hero .scroll-indicator {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

@media (min-width: 768px) {
    #hero .scroll-indicator {
        display: flex;
    }
}

#hero .scroll-indicator span {
    font-family: var(--font-mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(185, 181, 170, 0.6);
}

#hero .scroll-line {
    width: 1px;
    height: 48px;
    background: linear-gradient(to bottom, rgba(200, 166, 116, 0.5) 0%, transparent 100%);
}

/* About Section - Enhanced Trust Spacing */
#about {
    position: relative;
    z-index: 25;
    background-color: var(--charcoal);
    padding: 100px 0;
}

@media (min-width: 768px) {
    #about {
        padding: 140px 0;
    }
}

@media (min-width: 1024px) {
    #about {
        padding: 180px 0;
    }
}

#about .about-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.02;
    background-image: radial-gradient(circle at 1px 1px, var(--brass) 1px, transparent 0);
    background-size: 40px 40px;
}

#about .about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 56px;
    align-items: start;
    margin-bottom: 80px;
}

@media (min-width: 1024px) {
    #about .about-grid {
        grid-template-columns: 1.15fr 0.85fr;
        gap: 80px;
        margin-bottom: 100px;
        align-items: start;
    }
}

@media (min-width: 1280px) {
    #about .about-grid {
        grid-template-columns: 1.3fr 0.7fr;
        gap: 80px;
    }
}

#about .about-mission {
    margin-top: 32px;
    padding: 24px;
    border-radius: 16px;
    background-color: rgba(200, 166, 116, 0.05);
    border: 1px solid rgba(200, 166, 116, 0.2);
}

#about .about-mission p {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 18px;
    color: var(--text-primary);
    font-style: italic;
}

#about .leader-card {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    max-height: 480px;
}

@media (min-width: 768px) {
    #about .leader-card {
        max-height: 520px;
    }
}

@media (min-width: 1024px) {
    #about .leader-card {
        max-height: 450px;
    }
}

#about .leader-image {
    aspect-ratio: 3/4;
    background-size: cover;
    background-position: center top;
    min-height: 100%;
}

#about .leader-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--charcoal) 0%, rgba(27, 27, 29, 0.4) 50%, transparent 100%);
}

#about .leader-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
}

@media (min-width: 768px) {
    #about .leader-info {
        padding: 32px;
    }
}

#about .leader-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

#about .leader-badge-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--brass);
    display: flex;
    align-items: center;
    justify-content: center;
}

#about .leader-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 24px;
    color: var(--text-primary);
    margin-bottom: 12px;
}

@media (min-width: 768px) {
    #about .leader-name {
        font-size: 30px;
    }
}

#about .leader-bio {
    font-size: 14px;
    line-height: 1.65;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

#about .leader-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

#about .leader-tag {
    padding: 6px 12px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 9999px;
    font-size: 12px;
    color: var(--text-secondary);
}

#about .about-decor-circle {
    position: absolute;
    top: -16px;
    right: -16px;
    width: 96px;
    height: 96px;
    border: 2px solid rgba(200, 166, 116, 0.2);
    border-radius: 50%;
}

#about .about-decor-blur {
    position: absolute;
    bottom: -24px;
    left: -24px;
    width: 128px;
    height: 128px;
    background-color: rgba(200, 166, 116, 0.1);
    border-radius: 50%;
    filter: blur(32px);
}

#about .stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (min-width: 768px) {
    #about .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    #about .stats-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Services Section - Improved Structure for Conversion */
#services {
    position: relative;
    z-index: 30;
    background-color: var(--charcoal);
    padding: 80px 0;
}

@media (min-width: 768px) {
    #services {
        padding: 120px 0;
    }
}

@media (min-width: 1024px) {
    #services {
        padding: 160px 0;
    }
}

#services .services-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.02;
    background-image: repeating-linear-gradient(45deg,
            transparent,
            transparent 20px,
            rgba(200, 166, 116, 0.1) 20px,
            rgba(200, 166, 116, 0.1) 22px);
}

#services .services-header {
    margin-bottom: 48px;
}

@media (min-width: 768px) {
    #services .services-header {
        margin-bottom: 72px;
    }
}

@media (min-width: 1024px) {
    #services .services-header {
        margin-bottom: 80px;
    }
}

#services .services-header-inner {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (min-width: 1024px) {
    #services .services-header-inner {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
        gap: 32px;
    }
}

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

@media (min-width: 640px) {
    #services .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (min-width: 768px) {
    #services .services-grid {
        gap: 28px;
    }
}

@media (min-width: 1024px) {
    #services .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 32px;
    }
}

#services .service-card.featured {
    grid-column: span 1;
}

@media (min-width: 640px) {
    #services .service-card.featured {
        grid-column: span 2;
    }
}

@media (min-width: 1024px) {
    #services .service-card.featured {
        grid-column: span 2;
    }
}

#services .services-cta {
    margin-top: 48px;
    text-align: center;
}

@media (min-width: 768px) {
    #services .services-cta {
        margin-top: 64px;
    }
}

/* Gallery Section */
#gallery {
    position: relative;
    z-index: 50;
    background-color: var(--offwhite);
    padding: 64px 0;
}

@media (min-width: 768px) {
    #gallery {
        padding: 96px 0;
    }
}

@media (min-width: 1024px) {
    #gallery {
        padding: 128px 0;
    }
}

#gallery .gallery-header {
    margin-bottom: 40px;
}

@media (min-width: 768px) {
    #gallery .gallery-header {
        margin-bottom: 64px;
    }
}

#gallery .gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 640px) {
    #gallery .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    #gallery .gallery-grid {
        gap: 24px;
    }
}

@media (min-width: 1024px) {
    #gallery .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

#gallery .gallery-item.featured {
    grid-column: span 2;
    aspect-ratio: 16/9;
}

@media (min-width: 640px) {
    #gallery .gallery-item.featured {
        aspect-ratio: 21/9;
    }
}

@media (min-width: 1024px) {
    #gallery .gallery-item.featured {
        aspect-ratio: 2/1;
    }
}

#gallery .gallery-item:not(.featured) {
    aspect-ratio: 4/3;
}

#gallery .gallery-cta {
    margin-top: 32px;
    text-align: center;
}

@media (min-width: 768px) {
    #gallery .gallery-cta {
        margin-top: 48px;
    }
}

/* Process Section */
#process {
    position: relative;
    z-index: 60;
    background-color: var(--charcoal);
    padding: 96px 0;
}

@media (min-width: 768px) {
    #process {
        padding: 128px 0;
    }
}

#process .process-layout {
    display: flex;
    flex-direction: column;
    gap: 64px;
}

@media (min-width: 1024px) {
    #process .process-layout {
        flex-direction: row;
        gap: 96px;
    }
}

#process .process-header {
    flex-shrink: 0;
}

@media (min-width: 1024px) {
    #process .process-header {
        width: 34vw;
    }
}

#process .process-steps {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* Contact Section */
#contact {
    position: relative;
    z-index: 100;
    min-height: 100vh;
    padding: 96px 0;
}

@media (min-width: 768px) {
    #contact {
        padding: 128px 0;
    }
}

#contact .contact-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

#contact .contact-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(27, 27, 29, 0.8);
}

#contact .contact-content {
    position: relative;
    z-index: 10;
}

#contact .contact-layout {
    display: flex;
    flex-direction: column;
    gap: 48px;
    align-items: flex-start;
}

@media (min-width: 1024px) {
    #contact .contact-layout {
        flex-direction: row;
        gap: 64px;
    }
}

#contact .contact-left {
    flex-shrink: 0;
}

@media (min-width: 1024px) {
    #contact .contact-left {
        width: 40vw;
    }
}

#contact .contact-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 40px;
}

#contact .contact-form-card {
    flex: 1;
    width: 100%;
}

#contact .contact-form-inner {
    border-radius: 24px;
    padding: 32px;
}

@media (min-width: 768px) {
    #contact .contact-form-inner {
        padding: 40px;
    }
}

#contact .form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 768px) {
    #contact .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

#contact .form-full {
    grid-column: 1 / -1;
}

#contact .form-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 0;
    text-align: center;
}

#contact .success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: rgba(200, 166, 116, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

/* Anatomy Section */
#anatomy .anatomy-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

#anatomy .anatomy-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(27, 27, 29, 0.6);
}

#anatomy .anatomy-content {
    position: relative;
    z-index: 10;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 6vw;
}

#anatomy .anatomy-left {
    max-width: 38vw;
}

#anatomy .anatomy-card {
    position: absolute;
    right: 8vw;
    top: 50%;
    transform: translateY(-50%);
    width: 30vw;
    min-width: 320px;
    border-radius: 24px;
    padding: 32px;
}

@media (max-width: 1023px) {
    #anatomy .anatomy-content {
        flex-direction: column;
        justify-content: center;
        gap: 32px;
        padding: 80px 20px;
        height: auto;
        min-height: 100vh;
    }

    #anatomy .anatomy-left {
        max-width: 100%;
    }

    #anatomy .anatomy-card {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 767px) {
    #anatomy .anatomy-content {
        padding: 60px 16px;
        min-height: auto;
        gap: 24px;
    }
}

#anatomy .bullet-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

#anatomy .bullet-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: rgba(200, 166, 116, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#anatomy .bullet-item {
    margin-bottom: 24px;
}

#anatomy .rule-line {
    height: 1px;
    background: linear-gradient(to right, rgba(200, 166, 116, 0.3), transparent);
    margin-top: 24px;
}

/* Before/After Section */
#before-after .comparison-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

@media (min-width: 1024px) {
    #before-after .comparison-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.comparison-container {
    position: relative;
    aspect-ratio: 4/3;
    border-radius: 16px;
    overflow: hidden;
    cursor: ew-resize;
    user-select: none;
}

.comparison-before,
.comparison-after {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

.comparison-before {
    clip-path: inset(0 50% 0 0);
}

.comparison-label {
    position: absolute;
    top: 16px;
    padding: 6px 12px;
    border-radius: 9999px;
    font-family: var(--font-mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    z-index: 10;
}

.comparison-label-before {
    left: 16px;
    background-color: rgba(27, 27, 29, 0.8);
    color: var(--text-secondary);
}

.comparison-label-after {
    right: 16px;
    background-color: rgba(200, 166, 116, 0.9);
    color: var(--charcoal);
    font-weight: 500;
}

.comparison-slider {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background-color: var(--brass);
    transform: translateX(-50%);
    cursor: ew-resize;
}

.comparison-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--brass);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.comparison-hint {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 16px;
    background-color: rgba(27, 27, 29, 0.6);
    border-radius: 9999px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-secondary);
    opacity: 0.7;
}

.comparison-info {
    margin-top: 24px;
}

.comparison-info h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 20px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.comparison-info p {
    font-size: 14px;
    line-height: 1.65;
    color: var(--text-secondary);
}

/* Storm Solution Section */
#storm-solution .storm-panel {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
}

#storm-solution .storm-panel-left {
    left: 0;
}

#storm-solution .storm-panel-right {
    right: 0;
}

#storm-solution .storm-panel-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

#storm-solution .storm-panel-overlay {
    position: absolute;
    inset: 0;
}

#storm-solution .storm-divider {
    position: absolute;
    left: 50%;
    top: 0;
    width: 2px;
    height: 100%;
    background-color: var(--brass);
    transform: translateX(-50%);
    transform-origin: center;
}

#storm-solution .storm-content {
    position: relative;
    z-index: 10;
    height: 100%;
    display: flex;
}

#storm-solution .storm-text-block {
    width: 50%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 0 6vw;
}

#storm-solution .storm-text-left {
    padding-right: 4vw;
}

#storm-solution .storm-text-right {
    padding-left: 4vw;
}

#storm-solution .storm-text-block .label-mono {
    display: block;
    margin-bottom: 16px;
}

#storm-solution .storm-text-block .heading-lg {
    margin-bottom: 32px;
}

@media (max-width: 1023px) {
    #storm-solution .storm-panel {
        width: 100%;
        height: 50%;
    }

    #storm-solution .storm-panel-left {
        top: 0;
    }

    #storm-solution .storm-panel-right {
        top: 50%;
        left: 0;
    }

    #storm-solution .storm-divider {
        left: 0;
        top: 50%;
        width: 100%;
        height: 2px;
        transform: translateY(-50%);
    }

    #storm-solution .storm-content {
        flex-direction: column;
    }

    #storm-solution .storm-text-block {
        width: 100%;
        min-height: 50%;
        height: auto;
        padding: 24px 20px;
    }

    #storm-solution .storm-text-left,
    #storm-solution .storm-text-right {
        padding-left: 20px;
        padding-right: 20px;
    }

    #storm-solution .storm-text-block .heading-lg {
        margin-bottom: 16px;
    }
}

/* Gallery Grid */
#gallery .gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 640px) {
    #gallery .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    #gallery .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

#gallery .gallery-item-wide {
    grid-column: span 2;
    aspect-ratio: 2/1;
}

@media (max-width: 639px) {
    #gallery .gallery-item-wide {
        grid-column: span 1;
        aspect-ratio: 4/3;
    }
}

#gallery .gallery-item:not(.gallery-item-wide) {
    aspect-ratio: 4/3;
}

#gallery .gallery-arrow {
    position: absolute;
    bottom: 24px;
    right: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateX(16px);
    transition: all 0.3s ease;
}

#gallery .gallery-item:hover .gallery-arrow {
    opacity: 1;
    transform: translateX(0);
    background-color: var(--brass);
}

/* Testimonial Section */
#testimonial .testimonial-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

#testimonial .testimonial-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(27, 27, 29, 0.6);
}

#testimonial .testimonial-content {
    position: relative;
    z-index: 10;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
}

#testimonial .testimonial-card {
    width: 100%;
    max-width: 980px;
    border-radius: 24px;
    padding: 28px 20px;
}

@media (min-width: 640px) {
    #testimonial .testimonial-card {
        padding: 48px;
    }
}

@media (min-width: 768px) {
    #testimonial .testimonial-card {
        padding: 64px;
    }
}

#testimonial .testimonial-quote-icon {
    margin-bottom: 32px;
}

#testimonial .testimonial-rule {
    width: 64px;
    height: 1px;
    background-color: var(--brass);
    margin-bottom: 32px;
}

#testimonial .testimonial-text {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: clamp(16px, 1.8vw, 22px);
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 32px;
}

#testimonial .testimonial-author {
    font-family: var(--font-mono);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--brass);
}

/* Testimonial Slider */
#testimonial .testimonial-slider {
    position: relative;
    min-height: 180px;
}

#testimonial .testimonial-slide {
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

#testimonial .testimonial-slide.active {
    opacity: 1;
    position: relative;
    pointer-events: auto;
}

#testimonial .testimonial-dots {
    display: flex;
    gap: 10px;
    margin-top: 24px;
}

#testimonial .testimonial-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1.5px solid var(--brass);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

#testimonial .testimonial-dot.active {
    background: var(--brass);
    transform: scale(1.2);
}

#testimonial .testimonial-dot:hover:not(.active) {
    background: rgba(200, 166, 116, 0.4);
}

/* Coverage Section */
#coverage .coverage-bg {
    position: absolute;
    inset: 0;
    background-color: var(--charcoal);
}

#coverage .coverage-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.05;
    background-image: radial-gradient(circle, #C8A674 1px, transparent 1px);
    background-size: 40px 40px;
}

#coverage .coverage-content {
    position: relative;
    z-index: 10;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 6vw;
}

#coverage .coverage-left {
    max-width: 38vw;
}

#coverage .coverage-map {
    position: absolute;
    right: 8vw;
    top: 50%;
    transform: translateY(-50%);
    width: 38vw;
    min-width: 320px;
    aspect-ratio: 3/4;
    border-radius: 24px;
    padding: 32px;
    display: flex;
    flex-direction: column;
}

@media (max-width: 1023px) {
    #coverage .coverage-content {
        flex-direction: column;
        justify-content: center;
        gap: 32px;
        padding: 80px 20px;
        height: auto;
        min-height: 100vh;
    }

    #coverage .coverage-left {
        max-width: 100%;
    }

    #coverage .coverage-map {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        width: 100%;
        min-width: 0;
        aspect-ratio: auto;
        max-height: 400px;
    }
}

@media (max-width: 767px) {
    #coverage .coverage-content {
        padding: 60px 16px;
        min-height: auto;
        gap: 24px;
    }
}

#coverage .map-svg {
    flex: 1;
    width: 100%;
}

#coverage .map-locations {
    margin-top: auto;
}

#coverage .map-location {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

#coverage .map-location span {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

/* Why Grace Section */
#why-grace .why-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 640px) {
    #why-grace .why-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    #why-grace .why-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Text Center Utility */
.text-center {
    text-align: center;
}

/* ==========================================================================
   Video Modal
   ========================================================================== */
.video-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.video-modal.active {
    opacity: 1;
    visibility: visible;
}

.video-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.video-modal-container {
    position: relative;
    width: 90vw;
    max-width: 1100px;
    z-index: 1;
    transform: scale(0.92) translateY(30px);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.video-modal.active .video-modal-container {
    transform: scale(1) translateY(0);
}

.video-modal-close {
    position: absolute;
    top: -48px;
    right: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
}

.video-modal-close:hover {
    background: rgba(200, 166, 116, 0.2);
    border-color: var(--brass);
    color: var(--brass);
    transform: rotate(90deg);
}

.video-modal-wrapper {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
}

.video-modal-player {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    background: #000;
    cursor: pointer;
}

.video-modal-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.5));
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    transition: opacity 0.3s ease;
}

.video-modal-wrapper:hover .video-modal-controls,
.video-modal-controls.always-show {
    opacity: 1;
}

.video-control-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.video-control-btn:hover {
    background: rgba(200, 166, 116, 0.3);
}

.video-progress {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: height 0.15s ease;
}

.video-progress:hover {
    height: 6px;
}

.video-progress-filled {
    height: 100%;
    background: var(--brass, #C8A674);
    border-radius: 4px;
    width: 0%;
    position: relative;
    transition: width 0.05s linear;
}

.video-progress-filled::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--brass, #C8A674);
    transition: transform 0.15s ease;
}

.video-progress:hover .video-progress-filled::after {
    transform: translateY(-50%) scale(1);
}

.video-time {
    font-family: var(--font-body, sans-serif);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.5px;
    white-space: nowrap;
    min-width: 85px;
    text-align: center;
}

@media (max-width: 767px) {
    .video-modal-container {
        width: 96vw;
    }

    .video-modal-close {
        top: -44px;
        right: 4px;
    }

    .video-modal-wrapper {
        border-radius: 10px;
    }

    .video-modal-controls {
        padding: 8px 10px;
        gap: 8px;
    }

    .video-time {
        display: none;
    }
}

/* ==========================================================================
   MOBILE RESPONSIVENESS FIXES
   Targeted fixes for very small screens (≤375px) and general mobile UX
   ========================================================================== */

/* Prevent horizontal overflow globally */
html,
body {
    max-width: 100vw;
}

/* Hero: reduce padding for very small phones */
@media (max-width: 375px) {
    #hero .hero-content {
        padding-top: 48px;
    }

    #hero .hero-inner {
        max-width: 100%;
    }

    #hero .hero-headline {
        font-size: 28px;
        line-height: 1.15;
    }

    #hero .hero-subheadline {
        font-size: 14px;
        margin-bottom: 20px;
    }

    #hero .hero-cta {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 28px;
    }

    #hero .hero-cta .pill-button {
        width: 100%;
        justify-content: center;
        font-size: 13px;
        padding: 12px 20px;
    }

    #hero .hero-stats {
        gap: 16px;
    }

    #hero .stat-item .stat-value {
        font-size: 20px;
    }

    #hero .hero-badges {
        gap: 6px;
    }

    #hero .hero-badges .badge {
        font-size: 9px;
        padding: 6px 8px;
    }
}

/* Gallery: prevent featured item from spanning 2 cols on single-column layout */
@media (max-width: 639px) {
    #gallery .gallery-item.featured {
        grid-column: span 1;
        aspect-ratio: 16/9;
    }
}

/* Contact form: ensure comfortable padding on small screens */
@media (max-width: 480px) {
    #contact .contact-form-inner {
        padding: 20px 16px;
        border-radius: 16px;
    }

    #contact .contact-layout {
        gap: 32px;
    }

    #contact .form-grid {
        gap: 16px;
    }
}

/* Footer: clean stacking on very small screens */
@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 32px;
    }

    .footer-bottom-inner {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

/* Anatomy section: prevent overflow of fixed-position card on mobile */
@media (max-width: 767px) {
    #anatomy .anatomy-card {
        min-width: auto;
        width: 100%;
    }
}

/* Before/After slider: improve touch targets */
@media (pointer: coarse) {
    .ba-handle {
        width: 48px;
        height: 48px;
    }
}

/* ==========================================================================
   CONTACT PAGE (Standalone)
   ========================================================================== */

/* Hero */
.contact-page-hero {
    position: relative;
    min-height: 45vh;
    display: flex;
    align-items: flex-end;
    padding: 80px 0 60px;
    overflow: hidden;
}

@media (min-width: 768px) {
    .contact-page-hero {
        min-height: 50vh;
        padding: 120px 0 80px;
    }
}

.contact-page-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

.contact-page-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(27, 27, 29, 0.7) 0%, rgba(27, 27, 29, 0.92) 100%);
}

.contact-page-hero-content {
    position: relative;
    z-index: 10;
}

.contact-page-hero-content .heading-xl {
    font-size: clamp(32px, 6vw, 56px);
    line-height: 1.1;
    margin-top: 12px;
}

/* Main Content */
.contact-page-main {
    position: relative;
    z-index: 25;
    background-color: var(--charcoal);
    padding: 60px 0 80px;
}

@media (min-width: 768px) {
    .contact-page-main {
        padding: 80px 0 120px;
    }
}

.contact-page-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

@media (min-width: 1024px) {
    .contact-page-layout {
        grid-template-columns: 380px 1fr;
        gap: 48px;
    }
}

@media (min-width: 1280px) {
    .contact-page-layout {
        grid-template-columns: 420px 1fr;
        gap: 56px;
    }
}

/* Info Sidebar */
.contact-page-info-card {
    padding: 32px 28px;
    border-radius: 20px;
    border: 1px solid rgba(200, 166, 116, 0.12);
    height: fit-content;
    position: sticky;
    top: 100px;
}

@media (max-width: 1023px) {
    .contact-page-info-card {
        position: static;
    }
}

.contact-page-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.contact-page-item-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 10px;
    background: rgba(200, 166, 116, 0.08);
    border: 1px solid rgba(200, 166, 116, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-page-item-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--brass);
    margin-bottom: 4px;
}

.contact-page-item-value {
    display: block;
    font-size: 15px;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a.contact-page-item-value:hover {
    color: var(--brass);
}

/* Service Areas */
.contact-page-areas {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-page-area {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-secondary);
}

.contact-page-area svg {
    flex-shrink: 0;
}

/* Badges */
.contact-page-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 12px;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--brass);
    background: rgba(200, 166, 116, 0.06);
    border: 1px solid rgba(200, 166, 116, 0.15);
}

/* Form Card */
.contact-page-form-card {
    padding: 36px 32px;
    border-radius: 20px;
    border: 1px solid rgba(200, 166, 116, 0.12);
}

@media (max-width: 480px) {
    .contact-page-form-card {
        padding: 24px 18px;
    }
}

/* Select styling to match inputs */
.contact-page-form-card select.form-input {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
}

.contact-page-form-card select.form-input option {
    background-color: var(--charcoal);
    color: var(--text-primary);
}

/* Form success state */
.contact-page-form-card .form-success {
    text-align: center;
    padding: 48px 24px;
}

.contact-page-form-card .success-icon {
    margin-bottom: 20px;
}

/* Mobile: reorder so form comes first */
@media (max-width: 1023px) {
    .contact-page-layout {
        display: flex;
        flex-direction: column-reverse;
    }
}