/* Gallery Page Styles */
.gallery-section {
    padding: 10px 0 20px;
}

.gallery-section h1 {
    margin-bottom: 0;
}

.gallery-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 15px;
}

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

.gallery-card {
    display: flex;
    flex-direction: column;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    aspect-ratio: 4/3;
    background: #f0f0f0;
}

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

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

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

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

.view-icon {
    font-size: 3rem;
    color: white;
}

/* Gallery Captions - Below image */
.gallery-caption {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-color);
    padding: 6px 0;
    margin: 0;
}

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

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.lightbox-content {
    max-width: 90%;
    max-height: 80%;
    object-fit: contain;
}

/* Lightbox Caption - Bottom */
.lightbox-caption {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    text-align: center;
    padding: 10px 30px;
    font-size: 1.2rem;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 5px;
    max-width: 80%;
    z-index: 10000;
}

.lightbox-caption:empty {
    display: none;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 10001;
}

.lightbox-close:hover {
    color: var(--primary-color);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    padding: 20px;
    user-select: none;
    transition: color 0.3s;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    color: var(--primary-color);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* Responsive - Tablet */
@media (max-width: 968px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

/* Responsive - Mobile */
@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 30px;
        padding: 10px;
    }

    .lightbox-close {
        right: 20px;
        font-size: 30px;
    }

    .lightbox-caption {
        font-size: 1rem;
        padding: 8px 20px;
        bottom: 15px;
    }
}
