/* ============================================================
   GALLERY SECTION - PREMIUM STYLING
============================================================ */

.gallery-section {
    padding: 60px 20px;
    background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%);
    margin: 60px 0;
}

.gallery-container {
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-header {
    text-align: center;
    margin-bottom: 50px;
}

.gallery-header h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #f5f5f5;
    margin: 0 0 12px 0;
}

/* ========================= */
/* GALLERY FILTERS         */
/* ========================= */
.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 18px;
    border: 1px solid rgba(200, 161, 79, 0.3);
    background: rgba(255, 255, 255, 0.02);
    color: #cfcfcf;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: #c8a14f;
    color: #0f0f0f;
    border-color: #c8a14f;
}

/* ========================= */
/* GALLERY CAROUSEL         */
/* ========================= */
.gallery-carousel {
    position: relative;
    padding: 10px 4px 20px;
}

.gallery-carousel::before,
.gallery-carousel::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 70px;
    pointer-events: none;
    z-index: 2;
}

.gallery-carousel::before {
    left: 0;
    background: linear-gradient(90deg, rgba(15,15,15,0.95) 0%, rgba(15,15,15,0) 100%);
}

.gallery-carousel::after {
    right: 0;
    background: linear-gradient(270deg, rgba(15,15,15,0.95) 0%, rgba(15,15,15,0) 100%);
}

.gallery-carousel .gallery-grid {
    --gallery-gap: 26px;
    display: flex;
    gap: var(--gallery-gap);
    padding: 18px 24px 28px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 50%;
    align-items: center;
    scrollbar-width: thin;
    scrollbar-color: rgba(200,161,79,0.6) transparent;
}

.gallery-carousel .gallery-grid::-webkit-scrollbar {
    height: 8px;
}

.gallery-carousel .gallery-grid::-webkit-scrollbar-track {
    background: transparent;
}

.gallery-carousel .gallery-grid::-webkit-scrollbar-thumb {
    background: rgba(200,161,79,0.6);
    border-radius: 999px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    aspect-ratio: 1;
    background: rgba(200, 161, 79, 0.1);
    border: 2px solid rgba(200, 161, 79, 0.2);
    cursor: pointer;
    transition: all 0.4s ease;
    animation: fadeInUp 0.6s ease-out forwards;
    scroll-snap-align: center;
}

.gallery-carousel .gallery-item {
    flex: 0 0 26%;
    min-width: 240px;
    transform-origin: center center;
}

.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.15s; }
.gallery-item:nth-child(3) { animation-delay: 0.2s; }
.gallery-item:nth-child(n+4) { animation-delay: 0.25s; }

.gallery-item:hover {
    transform: translateY(-6px) scale(1.03);
    border-color: rgba(200, 161, 79, 0.6);
    box-shadow: 0 15px 40px rgba(200, 161, 79, 0.3);
    z-index: 10;
}

.gallery-item.is-center {
    transform: translateY(-10px) scale(1.28);
    border-color: rgba(200, 161, 79, 0.85);
    box-shadow: 0 26px 70px rgba(200, 161, 79, 0.4);
    z-index: 12;
}

.gallery-item.is-side {
    transform: translateY(4px) scale(0.84);
    opacity: 0.7;
    filter: grayscale(10%);
}

/* Gallery Image Wrapper for new structure */
.gallery-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    filter: brightness(0.9);
}

.gallery-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    color: rgba(200, 161, 79, 0.3);
}

.gallery-item:hover .gallery-image {
    transform: scale(1.08);
    filter: brightness(1);
}

/* Enhanced Hover Overlay - Hidden for simple scale effect */
.gallery-hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(200, 161, 79, 0.95) 0%,
        rgba(179, 137, 62, 0.92) 100%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

/* Remove overlay on hover - just scale effect */
.gallery-item:hover .gallery-hover-overlay {
    opacity: 0;
}

.gallery-hover-content {
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.4s ease 0.1s;
}

.gallery-item:hover .gallery-hover-content {
    transform: translateY(0);
}

.hover-icon {
    font-size: 3.5rem;
    margin-bottom: 15px;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
}

.hover-title {
    font-family: 'Playfair Display', serif;
    color: #000;
    font-size: 1.4rem;
    margin-bottom: 8px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hover-category {
    color: rgba(0, 0, 0, 0.8);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    font-weight: 600;
}

.gallery-view-btn {
    display: inline-block;
    padding: 10px 25px;
    background: #000;
    color: #c8a14f;
    border: 2px solid #000;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 0;
}

.gallery-view-btn:hover {
    background: transparent;
    color: #000;
    border-color: #000;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* Legacy overlay for backwards compatibility */
.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(200, 161, 79, 0.2);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
}

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

.gallery-item:hover .gallery-image {
    transform: scale(1.1);
}

.gallery-title {
    color: #f5f5f5;
    font-weight: 700;
    font-size: 1rem;
    text-align: center;
}

.gallery-category {
    color: #c8a14f;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ========================= */
/* LIGHTBOX MODAL          */
/* ========================= */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 2vh 2vw;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 96vw;
    max-height: 92vh;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    animation: zoomIn 0.3s ease-out;
}

.lightbox-image {
    width: auto;
    height: auto;
    max-width: 96vw;
    max-height: 92vh;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #f5f5f5;
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.lightbox-close:hover {
    color: #c8a14f;
}

/* ========================= */
/* ANIMATIONS              */
/* ========================= */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ========================= */
/* RESPONSIVE              */
/* ========================= */
@media (max-width: 768px) {
    .gallery-section {
        padding: 40px 15px;
        margin: 40px 0;
    }

    .gallery-header h2 {
        font-size: 1.8rem;
    }

    .gallery-carousel .gallery-grid {
        --gallery-gap: 18px;
        padding: 14px 16px 22px;
    }

    .gallery-carousel .gallery-item {
        flex-basis: 70%;
        min-width: 210px;
    }

    .gallery-item.is-center {
        transform: translateY(-8px) scale(1.12);
    }

    .gallery-item.is-side {
        transform: translateY(2px) scale(0.9);
        opacity: 0.8;
    }

    .gallery-filters {
        gap: 8px;
    }

    .filter-btn {
        padding: 6px 14px;
        font-size: 0.8rem;
    }

    .lightbox-close {
        top: -35px;
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .gallery-carousel .gallery-item {
        flex-basis: 85%;
    }
}
