/* ================================================
   Gallery Page V2 — Figma-Exact Refinement
   ================================================ */

:root {
    --gal-gold: #E8BA00;
    --gal-border: rgba(107, 114, 128, 0.12);
    --gal-text: #111827;
    --gal-muted: #6B7280;
    --gal-bg: #FFFFFF;
    --gal-bg-soft: #F8F8F8;
    --gal-slider-bg: rgba(248, 248, 248, 0.12);
}

body,
.gallery-wrapper,
.gallery-wrapper * {
    font-family: 'Rubik', sans-serif;
}

.gallery-wrapper {
    background: var(--gal-bg);
    overflow: hidden;
    position: relative;
    width: 100%;
    min-height: 100vh;
}

/* ══════════════════════════════════════════════════
   LARGE BACKGROUND LOGO (Logo 1)
   Figma: 1144px × 1144px, left: -231px, top: 651px, rotate -12.45deg
   ══════════════════════════════════════════════════ */
.gallery-signature-logo {
    position: absolute;
    width: 1144.06px;
    height: 1144.06px;
    left: -231px;
    top: 651px;
    background: url('/new_design/images/Logo.png') no-repeat center center;
    background-size: contain;
    transform: rotate(-12.45deg);
    pointer-events: none;
    z-index: 0;
    opacity: 0.15;
    /* Adjusted for subtle feel */
}

/* ══════════════════════════════════════════════════
   HEADER SECTION
   ══════════════════════════════════════════════════ */
.gallery-header {
    text-align: center;
    padding-top: 100px;
    /* Spacer for nav */
    padding-bottom: 239px;
    /* Top of Frame 8723 */
    position: relative;
    z-index: 10;
}

.gallery-title {
    font-size: 48px;
    font-weight: 400;
    line-height: 57px;
    color: var(--gal-text);
    margin: 0;
}

/* ══════════════════════════════════════════════════
   HORIZONTAL SLIDER (Frame 8723 + 8722)
   Figma: height 417px, top 239px
   ══════════════════════════════════════════════════ */
.gallery-slider-frame {
    position: absolute;
    width: 100%;
    height: 417px;
    left: 0;
    top: 239px;
    background: var(--gal-slider-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 5;
}

/* Framing Ellipses (Ellipse 43671 / 43672) 
   Figma: #F8F8F8, height 156px, covering edges
*/
.slider-ellipse {
    position: absolute;
    width: 250%;
    /* Large width to mimic the curve */
    height: 156px;
    left: -75%;
    background: var(--gal-bg-soft);
    z-index: 7;
}

.slider-ellipse.top {
    top: -68px;
    border-bottom: 1px solid var(--gal-border);
}

.slider-ellipse.bottom {
    bottom: -68px;
    border-top: 1px solid var(--gal-border);
}

.gallery-marquee-track {
    display: flex;
    gap: 17px;
    align-items: center;
    height: 280px;
    width: fit-content;
    padding: 0 10px;
    z-index: 6;
}

.marquee-img {
    width: 280px;
    height: 280px;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
    border-radius: 10px;
}

/* ══════════════════════════════════════════════════
   BODY SECTION — under the slider
   ══════════════════════════════════════════════════ */
.gallery-body {
    position: relative;
    z-index: 10;
    padding-top: 350px;
    /* Space for slider (417px frame) + breathing room */
}

.gallery-subtitle-container {
    text-align: center;
    margin-bottom: 60px;
}

.gallery-subtitle {
    font-size: 32px;
    font-weight: 300;
    line-height: 38px;
    color: var(--gal-muted);
    margin-bottom: 20px;
}

.scroll-arrow {
    width: 55px;
    height: 55px;
    background: #FFFFFF;
    border: 1px solid var(--gal-border);
    box-shadow: 1px 4px 10px rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    cursor: pointer;
    transform: rotate(0deg);
    /* Counter matrix(1, 0, 0, -1) from Figma arrows */
}

/* ══════════════════════════════════════════════════
   GRID — Cards stay interactive
   ══════════════════════════════════════════════════ */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1240px;
    margin: 0 auto;
    padding-bottom: 100px;
}

.card-container {
    perspective: 1000px;
    height: 400px;
}

.gal-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    cursor: pointer;
}

.card-container:hover .gal-card-inner {
    transform: rotateY(180deg);
}

.gal-card-front,
.gal-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 1px 4px 10px rgba(0, 0, 0, 0.1);
}

.gal-card-front {
    background-size: cover;
    background-position: center;
}

.gal-card-back {
    transform: rotateY(180deg);
    background-size: cover;
    background-position: center;
}

.gal-card-back-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #FFFFFF 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
    box-sizing: border-box;
}

.gal-card-description {
    font-size: 24px;
    font-weight: 300;
    line-height: 28px;
    color: var(--gal-text);
    text-align: center;
    margin: 0;
}

/* Flip camera icons from Figma */
.flip-icon-btn {
    position: absolute;
    width: 50px;
    height: 50px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(5px);
    border: 1px solid var(--gal-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    z-index: 5;
}

.flip-icon-btn.top-left {
    top: 20px;
    left: 20px;
}

.flip-icon-btn.top-right {
    top: 20px;
    right: 20px;
}

/* ══════════════════════════════════════════════════
   REFINED MODAL CLOSE BUTTON
   Figma: white bg, border, shadow, 55x55
   ══════════════════════════════════════════════════ */
.btn-gallery-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 55px;
    height: 55px;
    background: #FFFFFF;
    border: 1px solid var(--gal-border);
    box-shadow: 1px 4px 10px rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    color: var(--gal-text);
    font-size: 20px;
    transition: all 0.3s ease;
}

.btn-gallery-close:hover {
    transform: scale(1.1);
    box-shadow: 1px 6px 15px rgba(0, 0, 0, 0.15);
}

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

    .gallery-signature-logo {
        width: 800px;
        height: 800px;
        left: -100px;
    }
}

@media (max-width: 767px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }

    .gallery-header {
        padding-bottom: 200px;
    }

    .gallery-slider-frame {
        top: 200px;
        height: 300px;
    }

    .marquee-img {
        width: 200px;
        height: 200px;
    }

    .gallery-body {
        padding-top: 300px;
    }

    .gallery-title {
        font-size: 36px;
    }

    .gallery-subtitle {
        font-size: 24px;
    }
}