/* RUPAYNA Gallery Page Styles - Refined & Balanced */

:root {
    --gallery-bg: #fdfbf7;
    --gallery-text: #1a1a1a;
    --gallery-gold: #c5a059;
    --gallery-gold-light: #e6d5b8;
    --gallery-grey: #757575;
    --gallery-off-white: #ffffff;
    --gallery-border: rgba(0, 0, 0, 0.05);
    --gallery-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

/* 1. Gallery Hero Section */
.gallery-hero {
    position: relative;
    height: 35vh;
    min-height: 280px;
    padding-top: 70px;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.gallery-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.gallery-hero-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
    padding: 0 1.5rem;
}

.gallery-hero .brand-label {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gallery-gold);
    margin-bottom: 0.5rem;
}

.gallery-hero h1 {
    font-size: 2.8rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
    font-family: 'Playfair Display', serif;
}

/* 2. Sticky Filter Bar */
.filter-bar {
    position: sticky;
    top: 70px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 100;
    padding: 1.2rem 0;
    border-bottom: 1px solid var(--gallery-border);
    transition: all 0.3s ease;
}

.filter-list {
    display: flex;
    justify-content: center;
    gap: 1rem;
    list-style: none;
    flex-wrap: wrap;
    padding: 0;
}

.filter-btn {
    background: transparent;
    border: 1px solid transparent;
    font-family: 'Outfit', sans-serif;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--gallery-grey);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    padding: 0.6rem 1.4rem;
    border-radius: 50px;
}

.filter-btn:hover {
    color: var(--gallery-gold);
    background: rgba(197, 160, 89, 0.05);
}

.filter-btn.active {
    color: white;
    background: var(--gallery-gold);
    box-shadow: 0 4px 15px rgba(197, 160, 89, 0.3);
    font-weight: 500;
}

/* 3. Normal Grid Section */
.gallery-section {
    padding: 5rem 0;
    background: var(--gallery-bg);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1/1;
    overflow: hidden;
    background: white;
    border-radius: 12px;
    box-shadow: var(--gallery-shadow);
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.2) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    text-align: center;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
    visibility: visible;
}

.gallery-overlay i {
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) 0.1s;
}

.gallery-item:hover .gallery-overlay i {
    transform: translateY(0);
}

.gallery-overlay span {
    color: white;
    font-size: 1rem;
    font-family: 'Playfair Display', serif;
    margin-top: 0.5rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) 0.2s;
}

.gallery-item:hover .gallery-overlay span {
    transform: translateY(0);
}

/* 4. Before & After Slider */
.ba-section {
    padding: 4rem 0;
    background: var(--gallery-off-white);
}

.ba-section .section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 400;
    margin-bottom: 4rem;
    text-align: center;
    color: var(--gallery-text);
}

.ba-section .section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: var(--gallery-gold);
    margin: 1.5rem auto 0;
}

.ba-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

.ba-container {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.ba-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ba-img-after {
    width: 50%;
    z-index: 2;
    border-right: 2px solid white;
}

.ba-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    cursor: ew-resize;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.ba-label {
    position: absolute;
    bottom: 1rem;
    padding: 0.3rem 0.8rem;
    background: rgba(255, 255, 255, 0.85);
    color: var(--gallery-text);
    font-size: 0.65rem;
    text-transform: uppercase;
    z-index: 5;
}

/* 5. Video Gallery (Black Background) */
.video-gallery {
    padding: 5rem 0;
    background: var(--color-black);
    color: white;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.video-item {
    position: relative;
    aspect-ratio: 16/9;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}

.video-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.1);
}

.play-overlay i {
    font-size: 2.5rem;
    color: white;
    opacity: 0.9;
}

/* 6. Experts At Work (Horizontal Scroll) */
.experts-scroll-section {
    padding: 4rem 0;
    background: white;
    overflow: hidden;
}

.expert-section-header {
    margin-bottom: 2rem;
}

.experts-track {
    display: flex;
    gap: 1.5rem;
    padding: 1rem 0;
    animation: scroll 40s linear infinite;
    width: max-content;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.experts-track:hover {
    animation-play-state: paused;
}

.experts-track::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar Chrome/Safari */
}

.expert-card-gallery {
    min-width: 280px;
    height: 350px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.expert-card-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 7. Final CTA (Black Background Style) */
.final-cta {
    background: var(--color-black);
    padding: 8rem 0;
    text-align: center;
    color: white;
}

.cta-title {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    color: var(--color-gold);
    margin-bottom: 3rem;
}

.cta-actions {
    display: flex;
    justify-content: center;
    gap: 2rem;
    align-items: center;
}

.cta-btn-link {
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    color: white;
    text-decoration: none;
}

.cta-btn-outline {
    border: 1px solid white;
    padding: 1.2rem 2.5rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.cta-btn-outline:hover {
    background: white;
    color: black;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-img {
    max-width: 90%;
    max-height: 80%;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .video-grid {
        grid-template-columns: 1fr;
    }

    .cta-actions {
        flex-direction: column;
        gap: 1.5rem;
    }

    .cta-title {
        font-size: 2.2rem;
    }

    .gallery-hero h1 {
        font-size: 2rem;
    }

    .gallery-hero {
        height: 30vh;
        min-height: 220px;
        background-attachment: scroll;
    }

    .ba-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .ba-section .section-title {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }

    .filter-bar {
        top: 60px;
    }

    .gallery-hero {
        padding-top: 60px;
    }

    .filter-list {
        justify-content: flex-start;
        gap: 1rem;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding: 0 0.5rem;
        -webkit-overflow-scrolling: touch;
    }

    .filter-btn {
        white-space: nowrap;
        font-size: 0.75rem;
    }

    .experts-scroll-section {
        padding: 3rem 0;
    }

    .expert-card-gallery {
        min-width: 220px;
        height: 280px;
    }

    .final-cta {
        padding: 5rem 0;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .gallery-hero {
        padding-top: 54px;
    }

    .filter-bar {
        top: 54px;
    }

    .gallery-hero h1 {
        font-size: 1.75rem;
    }

    .gallery-hero .brand-label {
        font-size: 0.65rem;
        letter-spacing: 2px;
    }

    .cta-title {
        font-size: 1.8rem;
    }

    .cta-btn-outline {
        padding: 1rem 2rem;
        font-size: 0.75rem;
    }

    .ba-section {
        padding: 3rem 0;
    }

    .ba-section .section-title {
        font-size: 1.5rem;
    }

    .video-gallery {
        padding: 3rem 0;
    }

    .play-overlay i {
        font-size: 2rem;
    }

    .expert-card-gallery {
        min-width: 180px;
        height: 240px;
    }

    .final-cta {
        padding: 4rem 0;
    }

    .lightbox-close {
        top: 15px;
        right: 20px;
        font-size: 2rem;
    }
}