/* ── MODERN COMPACT GALLERY PAGE STYLES ── */
.gallery-hero {
    padding: 110px 20px 40px;
    background: #fdfcfc;
    text-align: center;
    position: relative;
}

.gallery-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 80vw;
    height: 80vw;
    background: radial-gradient(circle, rgba(109,7,54,0.03) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

.gallery-hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    color: var(--dark, #2d101a);
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.gallery-hero p {
    color: var(--gray, #6b5c61);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* Premium Filter Buttons */
.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 30px auto 40px;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.filter-btn {
    background: #fff;
    border: 1px solid #eaeaea;
    color: var(--gray);
    padding: 8px 22px;
    border-radius: 40px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
    transition: all 0.3s ease;
}

.filter-btn:hover {
    color: var(--teal, #6d0736);
    border-color: var(--teal, #6d0736);
}

.filter-btn.active {
    background: var(--teal, #6d0736);
    color: #fff;
    border-color: var(--teal, #6d0736);
    box-shadow: 0 6px 15px color-mix(in srgb, var(--teal) 30%, transparent);
}

/* Compact Grid */
.gallery-grid {
    column-count: 4;
    column-gap: 16px;
    padding: 0 3% 80px;
    max-width: 1400px;
    margin: 0 auto;
}

@media (max-width: 1100px) {
    .gallery-grid {
        column-count: 3;
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        column-count: 2;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        column-count: 1;
        padding-bottom: 50px;
    }
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 16px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    background: #fff;
    transform: translateZ(0); 
    transition: box-shadow 0.3s ease;
}

.gallery-item img,
.gallery-item video {
    width: 100%;
    display: block;
    transition: transform 0.6s ease;
}

.gallery-item video {
    width: 100%;
    height: 100%;
    aspect-ratio: 9/16;
    object-fit: cover;
    object-position: center;
}

/* Video Grid for 5 items in a row */
.video-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    padding: 0 3% 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.video-grid .gallery-item {
    margin-bottom: 0; /* Override masonry bottom margin */
    border-radius: 16px;
}

@media (max-width: 1100px) {
    .video-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .video-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .video-grid { grid-template-columns: repeat(1, 1fr); }
}

/* Video Badge */
.video-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    padding: 4px 8px;
    border-radius: 6px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 3;
    backdrop-filter: blur(4px);
}

.video-badge svg {
    margin-top: -1px;
}

/* Play Button Overlay for Videos */
.play-btn-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(3px);
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: all 0.3s ease;
    pointer-events: none;
}

.play-btn-overlay svg {
    width: 20px;
    height: 20px;
    fill: #fff;
    margin-left: 3px;
}

.gallery-item:hover .play-btn-overlay {
    background: var(--teal, #6d0736);
    border-color: var(--teal, #6d0736);
    transform: translate(-50%, -50%) scale(1.1);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(20, 5, 10, 0.85) 0%, rgba(109, 7, 54, 0.2) 50%, transparent 100%);
    opacity: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px 16px;
    transition: opacity 0.3s ease;
}

.gallery-item:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

.gallery-item:hover img,
.gallery-item:hover video {
    transform: scale(1.03);
}

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

.gallery-overlay h3 {
    color: #fff;
    font-family: 'DM Sans', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
    transform: translateY(10px);
    transition: transform 0.3s ease;
}

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

.gallery-overlay p {
    color: var(--gold-light, #e3cba8);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transform: translateY(10px);
    transition: transform 0.3s ease 0.05s;
}

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

/* Lightbox Modal */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(10, 5, 8, 0.95);
    backdrop-filter: blur(10px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox img,
.lightbox video {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    object-fit: contain;
    animation: zoomIn 0.3s ease;
    transition: opacity 0.15s ease;
}

.lightbox video {
    background: #000;
    outline: none;
}

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

.lightbox-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(4px);
    z-index: 10;
}

.lightbox-btn:hover {
    background: #fff;
    color: var(--teal, #6d0736);
    transform: translateY(-50%) scale(1.05);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
    opacity: 0.6;
    transition: opacity 0.2s, transform 0.2s;
    z-index: 10;
}

.lightbox-close:hover {
    opacity: 1;
    transform: rotate(90deg);
}

@media (max-width: 768px) {
    .lightbox-btn {
        width: 40px;
        height: 40px;
        font-size: 1.4rem;
    }
    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
    .lightbox-close { top: 15px; right: 15px; }
}
