/* Top Header & Filter Pills */
.filter-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin: 40px 0 35px 0;
}

.btn-filter {
    background-color: transparent;
    color: var(--text-dark);
    border: 1.5px solid rgba(74, 21, 27, 0.15);
    border-radius: var(--pill-radius);
    padding: 10px 24px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition-smooth);
    cursor: pointer;
    outline: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.btn-filter:hover {
    border-color: var(--primary-accent);
    color: var(--primary-accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 21, 27, 0.08);
}

.btn-filter.active {
    background-color: var(--primary-accent);
    color: #ffffff;
    border-color: var(--primary-accent);
    box-shadow: 0 6px 16px rgba(74, 21, 27, 0.25);
}

/* Gallery Grid & Cards */
.gallery-item {
    transition: var(--transition-smooth);
}

.gallery-card {
    position: relative;
    border-radius: var(--card-radius);
    overflow: hidden;
    background-color: #e2dedb;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
    transition: var(--transition-smooth);
    aspect-ratio: 4 / 3;
    border-radius: 10px;
}

.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    display: block;
}

.gallery-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 60%);
    opacity: 0;
    transition: var(--transition-smooth);
    display: flex;
    align-items: flex-end;
    padding: 24px;
}

.overlay-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.6);
    width: 54px;
    height: 54px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.gallery-card-title {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    transform: translateY(15px);
    transition: var(--transition-smooth);
}

/* Micro-animations on Hover */
.gallery-card:hover {
    /* transform: translateY(-8px); */
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12);
}

.gallery-card:hover img {
    transform: scale(1.08);
}

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

.gallery-card:hover .overlay-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.gallery-card:hover .gallery-card-title {
    transform: translateY(0);
}

/* Filter Hide/Show Animation */
.gallery-item.hide {
    display: none;
    opacity: 0;
    transform: scale(0.9);
}

.gallery-item.show {
    display: block;
    animation: fadeIn 0.4s forwards ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.92);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Lightbox Custom Modal Overlay */
.lightbox-modal {
    position: fixed;
    inset: 0;
    z-index: 1080;
    background-color: rgba(15, 12, 12, 0.92);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-modal.active {
    display: flex;
    opacity: 1;
}

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

.lightbox-img-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-img {
    max-width: 90vw;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 12px;
    transition: transform 0.2s ease-out;
}

.lightbox-caption {
    color: rgba(255, 255, 255, 0.85);
    margin-top: 16px;
    font-size: 1.05rem;
    font-weight: 500;
    text-align: center;
}

/* Modal Navigation Buttons */
.lightbox-btn {
    position: absolute;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    user-select: none;
}

.lightbox-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    transform: scale(1.1);
}

.lightbox-close {
    top: 24px;
    right: 24px;
}

.lightbox-prev {
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-counter {
    position: absolute;
    top: 28px;
    left: 28px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .lightbox-prev {
        left: 12px;
    }

    .lightbox-next {
        right: 12px;
    }

    .lightbox-close {
        top: 16px;
        right: 16px;
    }

    .lightbox-counter {
        top: 20px;
        left: 20px;
    }

    .lightbox-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}