/* ============================================
   DELTA PUMP - Gallery Page Stylesheet
   ============================================ */

/* ============ HERO ============ */
.gallery-hero {
    position: relative;
    overflow: hidden;
    padding: calc(var(--header-height) + 70px) 0 90px;
    background-image: url("../assets/images/hero-background-1.webp");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    text-align: center;
}

/* light wash over the water photo so the navy text stays readable */
.gallery-hero-bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(160deg, rgba(234, 244, 253, 0.82) 0%, rgba(215, 236, 251, 0.86) 55%, rgba(199, 227, 248, 0.9) 100%),
        radial-gradient(circle at 12% 25%, rgba(255, 255, 255, 0.7), transparent 45%);
    pointer-events: none;
}

.gallery-hero .container {
    position: relative;
    z-index: 2;
}

.gallery-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: var(--spacing-lg);
}

.gallery-breadcrumb a {
    color: var(--color-primary);
    transition: color var(--transition-fast);
}

.gallery-breadcrumb a:hover {
    color: var(--color-accent);
}

.gallery-breadcrumb .sep {
    color: var(--text-secondary);
}

.gallery-breadcrumb .current {
    color: var(--text-secondary);
}

.gallery-hero-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 900;
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
}

.gallery-hero-subtitle {
    max-width: 640px;
    margin: 0 auto;
    font-size: 0.95rem;
    line-height: 2;
    color: var(--text-secondary);
    font-weight: 500;
}

.gallery-hero-underline {
    width: 70px;
    height: 3px;
    margin: var(--spacing-lg) auto 0;
    border-radius: var(--radius-full);
    background: var(--color-accent);
}

/* ============ FILTERS ============ */
.gallery-section {
    padding: calc(var(--spacing-3xl) * 1.1) 0 var(--spacing-3xl);
    background: var(--color-white);
}

.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-md);
    margin-bottom: calc(var(--spacing-2xl) * 1.1);
}

.gallery-filter {
    padding: 0.7rem 1.6rem;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--color-gray-200);
    background: var(--color-white);
    color: var(--color-primary);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.gallery-filter:hover {
    border-color: var(--color-primary-light);
    transform: translateY(-2px);
}

.gallery-filter.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-white);
    box-shadow: 0 8px 18px rgba(11, 58, 130, 0.28);
}

/* ============ GRID ============ */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-xl);
}

.gallery-item {
    position: relative;
    display: block;
    padding: 0;
    border: none;
    border-radius: var(--radius-xl);
    overflow: hidden;
    cursor: pointer;
    background: var(--color-gray-100);
    aspect-ratio: 4 / 3;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.gallery-item.is-hidden {
    display: none;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--transition-slow);
}

.gallery-item:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

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

.gallery-item-zoom {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    font-size: 1.4rem;
    background: linear-gradient(to top, rgba(6, 28, 69, 0.55), rgba(6, 28, 69, 0.12));
    opacity: 0;
    transition: opacity var(--transition-base);
}

.gallery-item:hover .gallery-item-zoom {
    opacity: 1;
}

.gallery-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: calc(var(--spacing-2xl) * 1.1);
}

.btn-gallery-more {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: 0.85rem 2.2rem;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--color-gray-200);
    background: var(--color-white);
    color: var(--color-primary);
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.btn-gallery-more:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    transform: translateY(-3px);
}

.btn-gallery-more.is-hidden {
    display: none;
}

/* ============ SECTION HEADERS ============ */
.gallery-section-header {
    text-align: center;
    margin-bottom: calc(var(--spacing-2xl) * 1.1);
}

.gallery-section-title {
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 900;
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
}

.gallery-title-underline {
    width: 60px;
    height: 3px;
    margin: 0 auto;
    border-radius: var(--radius-full);
    background: var(--color-accent);
}

/* ============ VIDEOS ============ */
.gallery-videos-section {
    padding: calc(var(--spacing-3xl) * 1.1) 0;
    background: var(--color-off-white);
}

.gallery-videos-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-xl);
}

.video-card {
    display: flex;
    flex-direction: column;
    background: var(--color-white);
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.video-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

.video-thumb {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    aspect-ratio: 16 / 10;
    cursor: pointer;
    background: var(--color-gray-100);
    overflow: hidden;
}

.video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--transition-slow);
}

.video-card:hover .video-thumb img {
    transform: scale(1.06);
}

.video-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(6, 28, 69, 0.32);
    transition: background var(--transition-base);
}

.video-play i {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    background: var(--color-accent);
    color: var(--color-white);
    font-size: 1rem;
    padding-inline-start: 4px;
    box-shadow: 0 10px 22px rgba(227, 30, 36, 0.4);
    transition: transform var(--transition-base);
}

.video-thumb:hover .video-play i {
    transform: scale(1.12);
}

.video-body {
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    flex-grow: 1;
}

.video-title {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1.7;
}

.video-link {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--color-accent);
    transition: gap var(--transition-base);
}

.video-link:hover {
    gap: var(--spacing-md);
}

/* ============ BEFORE / AFTER ============ */
.gallery-ba-section {
    padding: calc(var(--spacing-3xl) * 1.1) 0;
    background: var(--color-white);
}

.gallery-ba-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-xl);
}

.ba-card {
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-gray-200);
    background: var(--color-white);
}

.ba-compare {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    user-select: none;
}

.ba-compare img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* the "before" half is clipped by the slider position */
.ba-before-wrap {
    position: absolute;
    inset: 0;
    width: 50%;
    overflow: hidden;
    border-inline-end: 3px solid var(--color-white);
}

.ba-before-wrap img {
    /* keep the underlying photo aligned with the full-size "after" image */
    width: auto;
    height: 100%;
    min-width: 100%;
    inset-inline-start: 0;
}

.ba-tag {
    position: absolute;
    top: 12px;
    z-index: 3;
    padding: 0.3rem 0.9rem;
    border-radius: var(--radius-sm);
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--color-white);
    pointer-events: none;
}

.ba-tag-before {
    inset-inline-start: 12px;
    background: var(--color-accent);
}

.ba-tag-after {
    inset-inline-end: 12px;
    background: var(--color-primary);
}

.ba-range {
    position: absolute;
    inset: 0;
    z-index: 4;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: ew-resize;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    direction: ltr;
}

.ba-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 44px;
    height: 100%;
    cursor: ew-resize;
}

.ba-range::-moz-range-thumb {
    width: 44px;
    height: 100%;
    border: none;
    background: transparent;
    cursor: ew-resize;
}

.ba-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 3;
    transform: translate(-50%, -50%);
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    background: var(--color-white);
    color: var(--color-primary);
    font-size: 0.85rem;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    pointer-events: none;
}

/* ============ CTA ============ */
.gallery-cta-section {
    padding: 0 0 calc(var(--spacing-3xl) * 1.2);
    background: var(--color-white);
}

.gallery-cta {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--spacing-xl);
    padding: calc(var(--spacing-2xl) * 1.1) var(--spacing-2xl);
    border-radius: var(--radius-xl);
    background: linear-gradient(160deg, #eaf4fd 0%, #d7ecfb 100%);
    border: 1px solid var(--color-gray-200);
}

.gallery-cta-text h2 {
    font-size: clamp(1.2rem, 2.6vw, 1.6rem);
    font-weight: 900;
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
}

.gallery-cta-text p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.9;
}

.btn-gallery-cta {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: 0.9rem 2.2rem;
    border-radius: var(--radius-md);
    background: var(--color-accent);
    color: var(--color-white);
    font-size: 0.95rem;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(227, 30, 36, 0.32);
    transition: all var(--transition-base);
}

.btn-gallery-cta:hover {
    background: var(--color-accent-dark);
    transform: translateY(-3px);
}

/* ============ LIGHTBOX ============ */
.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl);
    background: rgba(3, 14, 35, 0.92);
}

.gallery-lightbox[hidden] {
    display: none;
}

.lightbox-stage {
    max-width: min(1000px, 92vw);
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-stage img {
    max-width: min(1000px, 92vw);
    max-height: 80vh;
    width: auto;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
}

.lightbox-stage iframe {
    width: min(500px, 92vw);
    height: min(80vh, 780px);
    border: 0;
    border-radius: var(--radius-lg);
    background: #000;
}

.lightbox-caption {
    position: absolute;
    bottom: 26px;
    left: 0;
    right: 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0 var(--spacing-2xl);
}

.lightbox-close,
.lightbox-nav {
    position: absolute;
    z-index: 2;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.12);
    color: var(--color-white);
    font-size: 1.1rem;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.lightbox-close:hover,
.lightbox-nav:hover {
    background: var(--color-accent);
}

.lightbox-close {
    top: 22px;
    inset-inline-end: 22px;
}

.lightbox-prev {
    inset-inline-start: 22px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    inset-inline-end: 22px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-nav.is-hidden {
    display: none;
}

body.lightbox-open {
    overflow: hidden;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
    .gallery-grid,
    .gallery-ba-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-videos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .gallery-hero {
        padding: calc(var(--header-height) + 40px) 0 60px;
    }

    .gallery-grid,
    .gallery-ba-grid,
    .gallery-videos-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .gallery-filters {
        gap: var(--spacing-sm);
    }

    .gallery-filter {
        padding: 0.55rem 1.1rem;
        font-size: 0.82rem;
    }

    .gallery-cta {
        flex-direction: column;
        text-align: center;
        padding: var(--spacing-2xl) var(--spacing-lg);
    }

    .lightbox-prev {
        inset-inline-start: 8px;
    }

    .lightbox-next {
        inset-inline-end: 8px;
    }
}
