/* ── GALLERY HERO (matches testimonials / site pages) ── */
#gallery-hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10rem 4rem 4rem;
    background: var(--teal-dark);
    text-align: center;
    position: relative;
    overflow: hidden
}

#gallery-hero::before {
    content: '✦';
    position: absolute;
    top: 1rem;
    right: 3rem;
    font-family: 'Cormorant Garamond', serif;
    font-size: 12rem;
    color: rgba(255, 255, 255, .04);
    line-height: 1;
    pointer-events: none
}

#gallery-hero h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 300;
    line-height: 1.2;
    color: var(--white);
    margin-bottom: 1rem;
    position: relative;
    z-index: 1
}

#gallery-hero h1 em {
    color: var(--gold);
    font-style: italic
}

#gallery-hero .section-tag {
    color: var(--gold);
    margin-bottom: 1rem;
    position: relative;
    z-index: 1
}

#gallery-hero p {
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    font-weight: 300;
    color: rgba(255, 255, 255, .75);
    line-height: 1.8;
    max-width: 640px;
    margin: 0 auto;
    position: relative;
    z-index: 1
}

/* ── GALLERY CONTENT ── */
#gallery-content {
    background: var(--pearl);
    padding: 6rem 4rem
}

.gallery-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem
}

/* ── CASE CARDS ── */
.gallery-case-card,
.case-card,
.home-case-card {
    background: var(--white);
    border: 1px solid rgba(26, 122, 110, .1);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(26, 122, 110, .08);
    transition: transform .35s ease, box-shadow .35s ease
}

.gallery-case-card:hover,
.case-card:hover,
.home-case-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 48px rgba(26, 122, 110, .15)
}

.gallery-case-info,
.case-info,
.home-case-info {
    padding: 1.75rem 2rem;
    text-align: center
}

.gallery-case-info h3,
.case-info h3,
.home-case-info h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--charcoal);
    margin-bottom: .5rem;
    line-height: 1.3
}

.gallery-case-info p,
.case-info p {
    font-family: 'DM Sans', sans-serif;
    font-size: .95rem;
    font-weight: 300;
    color: var(--soft);
    line-height: 1.8
}

/* ── BEFORE / AFTER SLIDER ── */
.comparison-slider {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    background: var(--ivory)
}

.comparison-slider img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0
}

.comparison-slider .after-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    overflow: hidden;
    border-right: 3px solid var(--gold);
    z-index: 2
}

.comparison-slider .after-wrapper img {
    width: auto;
    max-width: none
}

.slider-label {
    position: absolute;
    bottom: 1rem;
    padding: .35rem .85rem;
    background: rgba(15, 79, 71, .85);
    color: var(--white);
    font-family: 'DM Sans', sans-serif;
    font-size: .72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .12em;
    border-radius: 2px;
    z-index: 3;
    pointer-events: none
}

.label-before {
    right: 1rem
}

.label-after {
    left: 1rem
}

.slider-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: var(--gold);
    border-radius: 50%;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: ew-resize;
    box-shadow: 0 4px 12px rgba(15, 79, 71, .35)
}

.slider-handle::before,
.slider-handle::after {
    content: '';
    border: solid var(--white);
    border-width: 0 3px 3px 0;
    display: inline-block;
    padding: 3px
}

.slider-handle::before {
    transform: rotate(135deg);
    margin-right: 4px
}

.slider-handle::after {
    transform: rotate(-45deg);
    margin-left: 4px
}

/* ── LOADING & EMPTY STATES ── */
.gallery-loading,
.loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    font-weight: 300;
    color: var(--soft);
    font-style: italic
}

.gallery-message,
.gallery-error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    font-weight: 300;
    color: var(--soft);
    line-height: 1.8
}

.gallery-error a {
    color: var(--teal);
    text-decoration: underline;
    font-weight: 500
}

.gallery-error a:hover {
    color: var(--teal-dark)
}

/* ── HOME FEATURED GALLERY ── */
#featured-gallery {
    background: var(--ivory);
    padding: 6rem 4rem
}

#featured-gallery .section-sub {
    margin-left: auto;
    margin-right: auto
}

#home-gallery-container {
    max-width: 1200px;
    margin: 0 auto
}

#featured-gallery .gallery-cta {
    text-align: center;
    margin-top: 3rem
}

#featured-gallery .gallery-cta .btn-secondary {
    justify-content: center;
    margin: 0 auto
}

@media (max-width: 768px) {
    #gallery-hero {
        padding: 8rem 1.5rem 3rem
    }

    #gallery-content,
    #featured-gallery {
        padding: 4rem 1.5rem
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem
    }

    .comparison-slider {
        height: 260px
    }
}
