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

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    text-align: center;
}

.lightbox-content img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10001;
    opacity: 0.8;
    transition: opacity 0.2s;
    line-height: 1;
}

.lightbox-close:hover {
    opacity: 1;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 36px;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    cursor: pointer;
    z-index: 10001;
    opacity: 0.8;
    transition: all 0.2s;
    padding: 16px 20px;
    border-radius: 4px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-caption {
    color: white;
    margin-top: 16px;
    font-size: 1rem;
    opacity: 0.9;
}

.lightbox-counter {
    color: white;
    margin-top: 8px;
    font-size: 0.875rem;
    opacity: 0.7;
}

/* Gallery image overlay */
.gallery-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
}

.gallery-detail-image:hover .gallery-image-overlay {
    opacity: 1;
}

/* Gallery Info */
.gallery-info {
    background: var(--color-white);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.gallery-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-right: 1.5rem;
    color: var(--color-gray-600);
    font-size: 0.875rem;
}

.gallery-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-detail-image {
    position: relative;
    display: block;
    aspect-ratio: 4/3;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-detail-image:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

.gallery-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-image-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: var(--color-white);
    font-size: 0.875rem;
}

.gallery-card-sm {
    display: block;
    background: var(--color-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.gallery-card-sm:hover {
    transform: translateY(-5px);
}

.gallery-card-sm-image {
    aspect-ratio: 16/10;
}

.gallery-card-sm-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-card-sm-content {
    padding: 1rem;
}

.gallery-card-sm-content h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 600;
}

.gallery-count-sm {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--color-gray-600);
}

@media (max-width: 768px) {
    .gallery-detail-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }

    .gallery-meta {
        margin-bottom: 0.75rem;
    }

    .lightbox-prev,
    .lightbox-next {
        padding: 12px 16px;
        font-size: 24px;
    }

    .lightbox-prev {
        left: 10px;
    }

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