/* ==========================================================================
   HỒ GƯƠM 88 – GALLERY SECTION
   Premium cinematic carousel with layered motion, luxe glow, and immersive depth
   ========================================================================== */

.gallery-section {
    position: relative;
    width: 100%;
    padding: 88px 0 80px;
    background:
        radial-gradient(circle at top, rgba(212, 175, 55, 0.16), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0%, rgba(243, 247, 251, 0.96) 30%, rgba(245, 245, 244, 1) 100%);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.gallery-section::before,
.gallery-section::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.75;
    pointer-events: none;
}

.gallery-section::before {
    width: 500px;
    height: 500px;
    left: 6%;
    top: 8%;
    background: rgba(34, 197, 94, 0.08);
}

.gallery-section::after {
    width: 420px;
    height: 420px;
    right: 5%;
    bottom: 6%;
    background: rgba(14, 116, 144, 0.09);
}

.gallery-shell {
    position: relative;
    z-index: 2;
    width: min(1440px, 100%);
    padding: 0 16px;
}

.gallery-section .section-header {
    position: relative;
    z-index: 2;
    margin-bottom: 10px;
    transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery-section .section-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(17, 24, 39, 0.06);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
    letter-spacing: 0.08em;
    font-size: 0.74rem;
}

.gallery-section .section-title {
    margin-top: 18px;
    margin-bottom: 12px;
    font-size: clamp(2.1rem, 4vw, 4rem);
    line-height: 1.06;
    letter-spacing: -0.04em;
    transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.5s ease, filter 0.5s ease;
    transform-origin: center bottom;
    will-change: transform, opacity;
}

.gallery-section .section-tag,
.gallery-section .section-title {
    transform: translateZ(0);
}

.gallery-hero-badges {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
}

.gallery-hero-badges span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(10, 57, 119, 0.05);
    border: 1px solid rgba(10, 57, 119, 0.08);
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.72rem;
    letter-spacing: 0.02em;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

.gallery-hero-badges span i {
    color: #d4af37;
}

.gallery-carousel-wrapper {
    position: relative;
    width: 100%;
    height: 560px;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1600px;
    margin-top: 10px;
    animation: stageFloat 11s ease-in-out infinite alternate;
}

@keyframes stageFloat {
    0% { transform: translateY(0); }
    100% { transform: translateY(-12px); }
}

.gallery-carousel-wrapper::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(72vw, 820px);
    height: 440px;
    background: radial-gradient(circle, rgba(15, 118, 110, 0.18) 0%, rgba(10, 57, 119, 0.22) 28%, rgba(212, 175, 55, 0.12) 52%, transparent 75%);
    filter: blur(52px);
    pointer-events: none;
    z-index: 0;
    animation: pulseGlow 6s ease-in-out infinite alternate;
}

@keyframes pulseGlow {
    0% { transform: translate(-50%, -50%) scale(0.96); opacity: 0.7; }
    100% { transform: translate(-50%, -50%) scale(1.08); opacity: 1; }
}

.gallery-carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5;
}

.g-card {
    position: absolute;
    width: 320px;
    height: 440px;
    border-radius: 30px;
    overflow: hidden;
    background: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.78);
    outline: 1px solid rgba(10, 57, 119, 0.08);
    box-shadow: 0 26px 52px -22px rgba(15, 23, 42, 0.2), 0 12px 24px -12px rgba(0, 0, 0, 0.08);
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.6s ease, filter 0.6s ease, box-shadow 0.45s ease, border-color 0.45s ease;
    will-change: transform, opacity, box-shadow;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    touch-action: pan-y;
    isolation: isolate;
}

.g-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.06) 0%, rgba(8, 15, 30, 0.18) 100%);
    z-index: 1;
}

.g-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    display: block;
    transform: scale(1.02);
    transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1), filter 0.5s ease;
}

.g-card-caption {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    max-width: 86%;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    font-family: 'Plus Jakarta Sans', 'Be Vietnam Pro', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    color: #ffffff;
    background: rgba(10, 57, 119, 0.78);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 999px;
    padding: 8px 16px;
    box-shadow: 0 12px 30px rgba(10, 57, 119, 0.24);
    z-index: 10;
    pointer-events: none;
    transition: all 0.4s ease;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.g-card.g-center {
    transform: translateX(0) translateY(0) scale(1.04) rotate(0deg);
    z-index: 12;
    opacity: 1;
    filter: brightness(1.06) saturate(1.08);
    border: 2px solid rgba(255,255,255,0.92);
    outline: 1.5px solid rgba(212, 175, 55, 0.55);
    box-shadow: 0 36px 80px -18px rgba(9, 42, 85, 0.3), 0 18px 32px -16px rgba(7, 18, 30, 0.18), 0 0 30px rgba(212, 175, 55, 0.2);
    cursor: zoom-in;
}

.g-card.g-center::before {
    background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, rgba(9, 12, 15, 0.22) 100%);
}

.g-card.g-left-1 {
    transform: translateX(-63%) scale(0.9) rotate(-6deg);
    z-index: 9;
    opacity: 0.9;
    filter: brightness(0.94) saturate(0.92);
    box-shadow: 0 24px 48px -18px rgba(15, 23, 42, 0.18);
}

.g-card.g-left-2 {
    transform: translateX(-118%) scale(0.8) rotate(-9deg);
    z-index: 7;
    opacity: 0.72;
    filter: brightness(0.86) blur(0.2px);
    box-shadow: 0 18px 36px -18px rgba(15, 23, 42, 0.14);
}

.g-card.g-left-3 {
    transform: translateX(-170%) scale(0.68) rotate(-12deg);
    z-index: 4;
    opacity: 0.38;
    filter: brightness(0.76) blur(1px);
}

.g-card.g-right-1 {
    transform: translateX(63%) scale(0.9) rotate(6deg);
    z-index: 9;
    opacity: 0.9;
    filter: brightness(0.94) saturate(0.92);
    box-shadow: 0 24px 48px -18px rgba(15, 23, 42, 0.18);
}

.g-card.g-right-2 {
    transform: translateX(118%) scale(0.8) rotate(9deg);
    z-index: 7;
    opacity: 0.72;
    filter: brightness(0.86) blur(0.2px);
    box-shadow: 0 18px 36px -18px rgba(15, 23, 42, 0.14);
}

.g-card.g-right-3 {
    transform: translateX(170%) scale(0.68) rotate(12deg);
    z-index: 4;
    opacity: 0.38;
    filter: brightness(0.76) blur(1px);
}

.g-card.g-hidden {
    opacity: 0;
    pointer-events: none;
    z-index: 0;
    transform: translateX(0) scale(0.52);
}

@media (min-width: 1025px) and (hover: hover) {
    .gallery-section:has(.g-center:hover) .section-title,
    .gallery-section.center-hovered .section-title {
        transform: perspective(800px) rotateX(9deg) scale(0.96) translateY(6px);
        opacity: 0.8;
        filter: blur(0.35px);
        letter-spacing: 0.02em;
    }

    .gallery-section:has(.g-center:hover) .section-tag,
    .gallery-section.center-hovered .section-tag {
        transform: scale(0.96) translateY(3px);
        opacity: 0.8;
    }

    .g-card.g-center:hover {
        transform: translateX(0) translateY(-62px) scale(1.34) rotate(0deg);
        z-index: 100;
        border: 2px solid rgba(255,255,255,0.96);
        outline: 2.4px solid rgba(212, 175, 55, 0.9);
        box-shadow: 0 52px 120px -18px rgba(10, 57, 119, 0.42), 0 24px 48px -12px rgba(15, 23, 42, 0.2), 0 0 0 3px rgba(212, 175, 55, 0.28);
    }

    .g-card.g-center:hover img {
        transform: scale(1.06);
        filter: saturate(1.08) contrast(1.04);
    }

    .g-card.g-center:hover::before {
        background: linear-gradient(180deg, rgba(255,255,255,0.06) 0%, rgba(9,12,15,0.08) 100%);
    }

    .g-card.g-center:hover .g-card-caption {
        background: rgba(212, 175, 55, 0.96);
        color: #132238;
        box-shadow: 0 8px 22px rgba(212, 175, 55, 0.35);
        transform: translateX(-50%) scale(0.96);
    }
}

.g-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(8, 15, 30, 0.9);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    z-index: 9999;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.g-lightbox.open {
    display: flex;
    opacity: 1;
    animation: glbFadeIn 0.25s ease forwards;
}

@keyframes glbFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.g-lightbox-dialog {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 820px;
    width: 100%;
    max-height: 92vh;
    animation: glbSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes glbSlideUp {
    from { transform: translateY(24px) scale(0.95); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.g-lightbox-img-wrap {
    max-width: 100%;
    max-height: 58vh;
    border-radius: 22px;
    overflow: hidden;
    background: #000;
    border: 1.5px solid rgba(255,255,255,0.18);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.62), 0 0 35px rgba(10, 57, 119, 0.18);
    display: flex;
    justify-content: center;
    align-items: center;
}

.g-lightbox-img-wrap img {
    display: block;
    max-width: 100%;
    max-height: 58vh;
    object-fit: contain;
    border-radius: 18px;
}

.g-lightbox-info-card {
    width: 100%;
    max-width: 700px;
    margin-top: 18px;
    background: rgba(15, 23, 42, 0.84);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 18px;
    padding: 18px 26px;
    box-shadow: 0 20px 42px rgba(0, 0, 0, 0.38);
    color: #fff;
    text-align: center;
}

.g-lightbox-caption {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #f4d672;
    margin: 0 0 8px 0;
    line-height: 1.3;
    text-align: center;
}

.g-lightbox-body { text-align: center; width: 100%; }

.g-lightbox-content {
    font-size: 0.96rem;
    line-height: 1.6;
    color: #f1f5f9;
    font-style: italic;
    text-align: center;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 1px;
    text-decoration-color: rgba(244, 214, 114, 0.5);
    margin: 0;
}

.g-lightbox-close {
    position: fixed;
    top: 24px;
    right: 28px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10000;
}

.g-lightbox-close:hover {
    background: rgba(220, 38, 38, 0.9);
    border-color: rgba(255,255,255,0.5);
    transform: scale(1.08);
}

.g-lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.24);
    color: #fff;
    font-size: 1.15rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.g-lightbox-nav:hover {
    background: rgba(10, 57, 119, 0.9);
    border-color: rgba(255,255,255,0.48);
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 10px 28px rgba(10, 57, 119, 0.32);
}

.g-lightbox-nav.g-lb-prev { left: 24px; }
.g-lightbox-nav.g-lb-next { right: 24px; }

@media (max-width: 1200px) {
    .gallery-carousel-wrapper { height: 520px; }
    .g-card { width: 276px; height: 400px; }
}

@media (max-width: 1024px) {
    .gallery-carousel-wrapper { height: 500px; }
    .g-card { width: 250px; height: 365px; }
    .g-card.g-left-3, .g-card.g-right-3 { opacity: 0; pointer-events: none; }
}

@media (max-width: 768px) {
    .gallery-section {
        padding: 48px 0 40px;
        overflow: hidden !important;
    }

    .gallery-shell { padding: 0 10px; }

    .gallery-hero-badges {
        gap: 8px;
        margin-top: 8px;
    }

    .gallery-hero-badges span {
        font-size: 0.66rem;
        padding: 7px 10px;
    }

    .gallery-carousel-wrapper {
        height: 350px;
        margin-top: 8px;
        perspective: 1000px;
    }

    .gallery-carousel-wrapper::before {
        width: 280px;
        height: 250px;
        filter: blur(35px);
    }

    .g-card {
        width: 220px;
        height: 320px;
        border-radius: 18px;
    }

    .g-card.g-left-1 { transform: translateX(-48%) scale(0.82) rotate(-2deg); }
    .g-card.g-right-1 { transform: translateX(48%) scale(0.82) rotate(2deg); }
    .g-card.g-left-2, .g-card.g-right-2, .g-card.g-left-3, .g-card.g-right-3 { display: none !important; }

    .g-card.g-center:hover {
        transform: translateX(0) scale(1.12) rotate(0deg);
    }

    .g-card-caption {
        font-size: 0.7rem;
        padding: 6px 12px;
        bottom: 10px;
        max-width: 92%;
    }

    .g-lightbox-nav { display: none; }
    .g-lightbox-dialog { max-height: 95vh; }
    .g-lightbox-img-wrap { max-height: 48vh; }
    .g-lightbox-img-wrap img { max-height: 48vh; }
    .g-lightbox-info-card { padding: 14px 18px; margin-top: 12px; }
    .g-lightbox-caption { font-size: 1.05rem; }
    .g-lightbox-content { font-size: 0.9rem; }
}

@media (max-width: 480px) {
    .gallery-carousel-wrapper { height: 300px; }
    .g-card {
        width: 176px;
        height: 255px;
        border-radius: 14px;
    }
    .g-card.g-left-1 { transform: translateX(-44%) scale(0.8) rotate(-2deg); }
    .g-card.g-right-1 { transform: translateX(44%) scale(0.8) rotate(2deg); }
}