/* Gallery Styles */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
}

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

@media (min-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background-color: var(--color-surface-container);
    border-radius: var(--border-radius, 0);
    aspect-ratio: 1 / 1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

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

.gallery-item__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.gallery-item__content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.gallery-item:hover .gallery-item__content {
    transform: translateY(0);
    opacity: 1;
}

.gallery-item__content h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1.25rem;
}

.gallery-item__content p {
    margin: 0;
    color: #83f4cf;
    font-size: 0.875rem;
}

/* Lightbox Modal */
.gallery-lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    overflow: hidden;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.gallery-lightbox__close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    transition: 0.3s;
}

.gallery-lightbox__close:hover,
.gallery-lightbox__close:focus {
    color: #83f4cf;
    text-decoration: none;
    cursor: pointer;
}

.gallery-lightbox__content-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 90vw;
    max-height: 90vh;
}

.gallery-lightbox__img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    animation: zoomIn 0.3s ease;
}

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

.gallery-lightbox__caption {
    margin-top: 1rem;
    text-align: center;
    color: #fff;
    width: 100%;
}

.gallery-lightbox__caption h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.gallery-lightbox__caption p {
    margin: 0.25rem 0 0 0;
    color: #83f4cf;
    font-size: 1rem;
}

.gallery-lightbox__nav {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 40px;
    transition: 0.3s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    -webkit-user-select: none;
    background: transparent;
    border: none;
    outline: none;
    z-index: 10;
}

.gallery-lightbox__nav:hover {
    background-color: rgba(0, 0, 0, 0.8);
    color: #83f4cf;
}

.gallery-lightbox__nav--prev {
    left: 0;
}

.gallery-lightbox__nav--next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

/* Loading animation for new items */
.gallery-item--fade-in {
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.btn--loading {
    opacity: 0.7;
    cursor: wait !important;
}
