.gallery {
    padding-block: 4rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.gallery-item {
    background: var(--color-background);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.image-container {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover .image-container img {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .image-overlay {
    opacity: 1;
}

.view-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-sm);
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.view-btn:hover {
    background: var(--color-primary-dark);
}

.view-btn i {
    width: 16px;
    height: 16px;
}

.image-info {
    padding: 1.5rem;
}

.image-info h4 {
    font-size: var(--font-size-lg);
    color: var(--color-text);
    margin-bottom: 0;
}

/* Lightbox Styles */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.lightbox-overlay.active {
    display: flex;
}

.lightbox-container {
    position: relative;
    width: 90%;
    height: 90%;
    max-width: 1200px;
    max-height: 800px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
    height: 100%;
}

.lightbox-content img {
    max-width: 100%;
    max-height: calc(100% - 80px);
    object-fit: contain;
    border-radius: var(--border-radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.lightbox-info {
    text-align: center;
    color: white;
}

.lightbox-info h3 {
    font-size: var(--font-size-xl);
    margin-bottom: 0.5rem;
}

.lightbox-info p {
    font-size: var(--font-size-md);
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10000;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.lightbox-close i {
    width: 24px;
    height: 24px;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10000;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.lightbox-nav i {
    width: 24px;
    height: 24px;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }

    .lightbox-container {
        width: 95%;
        height: 95%;
    }

    .lightbox-nav {
        width: 50px;
        height: 50px;
    }

    .lightbox-close {
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 768px) {
    .gallery {
        padding-block: 2rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }

    .image-container {
        height: 200px;
    }

    .image-info {
        padding: 1rem;
    }

    .lightbox-nav {
        width: 45px;
        height: 45px;
    }

    .lightbox-close {
        width: 40px;
        height: 40px;
        top: 15px;
        right: 15px;
    }

    .lightbox-nav i,
    .lightbox-close i {
        width: 20px;
        height: 20px;
    }

    .lightbox-prev {
        left: 15px;
    }

    .lightbox-next {
        right: 15px;
    }
}

@media (max-width: 576px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .image-container {
        height: 180px;
    }

    .view-btn {
        padding: 0.5rem 1rem;
        font-size: var(--font-size-xs);
    }

    .lightbox-info h3 {
        font-size: var(--font-size-lg);
    }

    .lightbox-info p {
        font-size: var(--font-size-sm);
    }
}