/* gallery.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

.gallery-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
    font-weight: 300;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
    color: white;
    padding: 24px;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.gallery-overlay h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.gallery-overlay p {
    font-size: 0.9rem;
    opacity: 0.9;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    color: var(--clr-neutral-100);
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.lightbox.active {
    display: flex;
    animation: lightboxFadeIn 0.3s ease;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 85%;
    animation: lightboxZoom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.lightbox-content img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-info {
    position: absolute;
    bottom: -80px;
    left: 0;
    right: 0;
    color: white;
    text-align: center;
    padding: 20px;
}

.lightbox-info h3 {
    font-size: 1.4rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.lightbox-info p {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 10px;
    line-height: 1.5;
    background: rgba(255, 255, 255, 0.95);
}

.lightbox-counter {
    font-size: 0.9rem;
    opacity: 0.7;
    font-weight: 500;
}

.lightbox-close {
    position: absolute;
    top: -20px;
    right: -20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    /* padding: 12px 16px; */
    border-radius: 50%;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    width: 4rem;
    height: 4rem;
}
.lightbox-close:hover, .lightbox-close:active, .lightbox-close:focus{ border:none;}
.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 2.5rem;
    padding: 0;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    width: 4rem;
    height: 4rem;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.05);
}

.lightbox-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: translateY(-50%) scale(0.9);
}

.lightbox-prev {
    left: -90px;
}

.lightbox-next {
    right: -90px;
}

/* Animations */
@keyframes lightboxFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes lightboxZoom {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 992px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 16px;
    }
    
    .lightbox-prev {
        left: -70px;
    }
    
    .lightbox-next {
        right: -70px;
    }
}

@media (max-width: 768px) {
    .gallery-container {
        padding: 16px;
    }
    
    .gallery-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 12px;
    }

    .gallery-overlay {
        padding: 16px;
    }

    .gallery-overlay h3 {
        font-size: 1rem;
    }

    .gallery-overlay p {
        font-size: 0.85rem;
    }

    .lightbox-content {
        max-width: 95%;
        max-height: 80%;
    }

    .lightbox-nav {
        font-size: 2rem;
        padding: 12px 16px;
    }

    .lightbox-prev {
        left: -60px;
    }

    .lightbox-next {
        right: -60px;
    }

    .lightbox-info {
        bottom: -100px;
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 8px;
    }

    .gallery-overlay {
        padding: 12px;
    }

    .lightbox-nav {
        position: fixed;
        top: auto;
        bottom: 80px;
        font-size: 1.8rem;
        padding: 10px 14px;
    }

    .lightbox-prev {
        left: 20px;
    }

    .lightbox-next {
        right: 20px;
    }

    .lightbox-close {
        top: 20px;
        right: 20px;
        position: fixed;
        font-size: 1.8rem;
        padding: 10px 14px;
    }

    .lightbox-info {
        bottom: 20px;
        position: fixed;
        left: 20px;
        right: 20px;
        background: rgba(0, 0, 0, 0.8);
        border-radius: 12px;
        backdrop-filter: blur(10px);
    }
}

/* Loading placeholder */
.gallery-item img[src=""], 
.gallery-item img:not([src]) {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}