﻿/* ==========================================================
   HMH LUXURY PHOTO GALLERY - ULTRA PREMIUM STYLING
   ========================================================== */

.gallery-page-container {
    background-color: #ffffff;
    min-height: 100vh;
    padding-top: 0;
}

/* ================= FILTER TABS BAR ================= */
.gallery-filters-wrapper {
    background: #ffffff;
    padding: 24px 15px 18px;
    border-top: 1px solid #f2f2f2;
    border-bottom: 1px solid #eeeeee;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
}

.gallery-tabs-scroll {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2px 0;
}

.gallery-tab-btn {
    background-color: #f7f7f7;
    color: #444444;
    border: 1px solid #e8e8e8;
    padding: 10px 22px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.9px;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.28s cubic-bezier(0.25, 1, 0.5, 1);
    white-space: nowrap;
    outline: none;
    position: relative;
    overflow: hidden;
}

.gallery-tab-btn:hover {
    background-color: #e88d24;
    color: #ffffff;
    border-color: #e88d24;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(232, 141, 36, 0.28);
}

.gallery-tab-btn.active {
    background-color: #e88d24;
    color: #ffffff;
    border-color: #e88d24;
    font-weight: 700;
    box-shadow: 0 6px 16px rgba(232, 141, 36, 0.35);
    transform: translateY(-1px);
}

/* ================= GALLERY META & PROGRESS BAR ================= */
.gallery-info-bar {
    max-width: 1400px;
    margin: 28px auto 8px;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #888888;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.gallery-info-count {
    font-weight: 700;
    color: #222222;
}

.gallery-progress-track {
    max-width: 1400px;
    margin: 10px auto 25px;
    padding: 0 20px;
}

.gallery-progress-bar-bg {
    width: 100%;
    height: 3px;
    background-color: #f0f0f0;
    border-radius: 2px;
    overflow: hidden;
}

.gallery-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #e88d24, #f5af47);
    border-radius: 2px;
    transition: width 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

/* ================= GRID SECTION ================= */
.gallery-grid-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px 20px 70px;
}

.gallery-grid-layout {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
    transition: opacity 0.3s ease;
}

.gallery-grid-layout.is-tab-switching {
    opacity: 0.3;
    pointer-events: none;
}

/* ================= LUXURY ENTRANCE ANIMATION ================= */
@keyframes luxuryCardEntrance {
    0% {
        opacity: 0;
        transform: translateY(28px) scale(0.96);
        filter: blur(4px);
    }
    60% {
        filter: blur(0);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

.gallery-card-item {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    background-color: #f7f7f7;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
    will-change: transform, opacity;
}

.gallery-card-item.animate-entrance {
    animation: luxuryCardEntrance 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.gallery-card-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.16);
}

/* Aspect Ratio Image Container with Luxury Shimmer */
.gallery-card-img-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #ebebeb;
    overflow: hidden;
}

.gallery-card-img-wrapper.loading-skeleton::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(235, 235, 235, 1) 0%,
        rgba(247, 247, 247, 1) 40%,
        rgba(235, 235, 235, 1) 80%
    );
    background-size: 250% 100%;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
    z-index: 1;
}

@keyframes skeletonShimmer {
    0% { background-position: -250% 0; }
    100% { background-position: 250% 0; }
}

.gallery-card-img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.5s ease-out, transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    z-index: 2;
}

.gallery-card-img.loaded {
    opacity: 1;
    transform: scale(1);
}

.gallery-card-item:hover .gallery-card-img.loaded {
    transform: scale(1.07);
}

/* Card Overlay with Glassmorphism */
.gallery-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.88) 0%,
        rgba(0, 0, 0, 0.4) 45%,
        rgba(0, 0, 0, 0) 75%
    );
    opacity: 0;
    transition: opacity 0.35s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 22px;
    box-sizing: border-box;
    z-index: 3;
}

.gallery-card-item:hover .gallery-card-overlay {
    opacity: 1;
}

.gallery-card-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.6);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: rgba(232, 141, 36, 0.95);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.gallery-card-item:hover .gallery-card-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.gallery-card-hotel-badge {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #e88d24;
    margin-bottom: 4px;
    transform: translateY(6px);
    transition: transform 0.35s ease;
}

.gallery-card-title {
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    margin: 0;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
    transform: translateY(6px);
    transition: transform 0.35s ease;
}

.gallery-card-item:hover .gallery-card-hotel-badge,
.gallery-card-item:hover .gallery-card-title {
    transform: translateY(0);
}

/* ================= LUXURY LOAD MORE BUTTON ================= */
.gallery-load-more-container {
    text-align: center;
    margin-top: 55px;
    margin-bottom: 30px;
}

.gallery-load-more-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-width: 320px;
    background-color: #ffffff;
    color: #1a1a1a;
    border: 2px solid #1a1a1a;
    padding: 16px 42px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.gallery-load-more-btn:hover:not(:disabled) {
    background-color: #e88d24;
    border-color: #e88d24;
    color: #ffffff;
    box-shadow: 0 10px 28px rgba(232, 141, 36, 0.38);
    transform: translateY(-3px);
}

.gallery-load-more-btn:active:not(:disabled) {
    transform: translateY(-1px);
}

.gallery-load-more-btn:disabled,
.gallery-load-more-btn.loading {
    background-color: #f7f7f7;
    border-color: #d6d6d6;
    color: #888888;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.gallery-load-more-btn .fa-spinner,
.gallery-load-more-btn .fa-circle-notch {
    font-size: 16px;
    color: #e88d24;
}

.gallery-remaining-badge {
    font-size: 12px;
    font-weight: 600;
    opacity: 0.85;
    letter-spacing: 0.5px;
}

/* ================= LIGHTBOX MODAL ================= */
.gallery-lightbox-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(10, 10, 10, 0.94);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: fadeInLightbox 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInLightbox {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

.gallery-lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.gallery-lightbox-img {
    max-width: 85vw;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.8);
    user-select: none;
}

.gallery-lightbox-caption {
    margin-top: 16px;
    text-align: center;
    color: #ffffff;
}

.gallery-lightbox-hotel {
    font-size: 13px;
    font-weight: 700;
    color: #e88d24;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.gallery-lightbox-title {
    font-size: 17px;
    font-weight: 500;
    color: #f0f0f0;
    margin: 0;
}

.gallery-lightbox-counter {
    font-size: 12px;
    color: #888888;
    margin-top: 6px;
}

.gallery-lightbox-close {
    position: fixed;
    top: 24px;
    right: 28px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #ffffff;
    font-size: 26px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    z-index: 100000;
}

.gallery-lightbox-close:hover {
    background-color: #e88d24;
    transform: rotate(90deg);
}

.gallery-lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #ffffff;
    font-size: 22px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    z-index: 100000;
}

.gallery-lightbox-nav:hover {
    background-color: #e88d24;
    transform: translateY(-50%) scale(1.1);
}

.gallery-lightbox-prev {
    left: 24px;
}

.gallery-lightbox-next {
    right: 24px;
}

/* Hero Banner Navigation Arrows */
.about-hero-arrow.about-hero-prev,
.about-hero-arrow.prev {
    left: 24px !important;
    right: auto !important;
}

.about-hero-arrow.about-hero-next,
.about-hero-arrow.next {
    right: 24px !important;
    left: auto !important;
}

/* ================= RESPONSIVE MEDIA QUERIES ================= */
@media (max-width: 1024px) {
    .gallery-grid-layout {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .gallery-filters-wrapper {
        padding: 15px 10px 12px;
    }

    .gallery-tabs-scroll {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 8px;
        scrollbar-width: none;
    }

    .gallery-tabs-scroll::-webkit-scrollbar {
        display: none;
    }

    .gallery-tab-btn {
        padding: 8px 16px;
        font-size: 11px;
        flex-shrink: 0;
    }

    .gallery-grid-layout {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .gallery-card-overlay {
        padding: 12px;
    }

    .gallery-card-title {
        font-size: 13px;
    }

    .gallery-load-more-btn {
        min-width: 260px;
        padding: 14px 28px;
        font-size: 12px;
    }

    .gallery-lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .gallery-lightbox-prev {
        left: 10px;
    }

    .gallery-lightbox-next {
        right: 10px;
    }
}

@media (max-width: 540px) {
    .gallery-grid-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}
