/**
 * File: gallery.css
 *
 * GALLERY PAGE - SLIDER & LIGHTBOX STYLES.
 * Styles for photo galleries and the lightbox feature.
 *
 * @package     KuK Bendorf Theme
 * @author      Oliver Ferber <admin@kuk-bendorf.de>
 * @copyright   2024-2026 KuK Bendorf e.V.
 * @license     Proprietary
 * @version     1.0.0
 */

.gallery-section {
    background: transparent;
}

/* Page Header – inherits global .page-header from main.css */

/* ==========================================
   GALLERY CATEGORY SECTIONS
   ========================================== */

.gallery-category-section {
    margin-bottom: 60px;
}

.category-title {
    color: var(--primary);
    font-size: 1.8rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--primary);
}

.category-title i {
    color: #FFD700;
}

.category-description {
    color: #666;
    font-size: 1.05rem;
    margin-bottom: 20px;
    font-style: italic;
}

/* ==========================================
   SWIPER SLIDER - SINGLE ROW
   ========================================== */

.gallery-slider-wrapper {
    position: relative;
    padding: 10px 50px;
}

.gallery-swiper {
    overflow: hidden;
}

.gallery-slide-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    background: white;
    height: 280px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    border: 1px solid #eee;
}

.gallery-slide-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(242, 15, 15, 0.12);
    border-color: var(--kuk-red);
}

.gallery-slide-item img {
    width: 100%;
    height: 230px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-slide-item:hover img {
    transform: scale(1.05);
}

/* Placeholder when no image is available */
.gallery-slide-placeholder {
    width: 100%;
    height: 230px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    color: #aaa;
    font-size: 3rem;
    transition: transform 0.4s ease;
}
.gallery-slide-item:hover .gallery-slide-placeholder {
    transform: scale(1.05);
}

.gallery-slide-title {
    padding: 12px 15px;
    font-weight: 600;
    color: #333;
    text-align: center;
    font-size: 0.9rem;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Swiper Navigation */
.swiper-button-prev,
.swiper-button-next {
    width: 44px;
    height: 44px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    transition: all 0.3s ease;
}

.swiper-button-prev:after,
.swiper-button-next:after {
    font-size: 1.2rem;
    color: var(--primary);
    font-weight: 900;
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
    background: var(--primary);
    transform: scale(1.1);
}

.swiper-button-prev:hover:after,
.swiper-button-next:hover:after {
    color: white;
}

/* ==========================================
   LIGHTBOX MODAL
   ========================================== */

.gallery-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.94);
    cursor: pointer;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: galleryZoomIn 0.3s ease;
}

@keyframes galleryZoomIn {
    from {
        transform: scale(0.85);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

#lightboxImage {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    cursor: default;
}

/* Bottom bar under image */
.lightbox-bottom-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 800px;
    margin-top: 18px;
    padding: 0 10px;
    gap: 20px;
}

.lightbox-title {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    flex: 1;
    text-align: left;
}

.lightbox-counter {
    color: #888;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* Download Button in Lightbox */
.lightbox-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
    white-space: nowrap;
}

.lightbox-download-btn:hover {
    background: var(--kuk-red);
    border-color: var(--kuk-red);
    color: #fff;
}

.lightbox-download-btn i {
    font-size: 1rem;
}

/* Lightbox navigation buttons */
.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: fixed;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: none;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.3rem;
    z-index: 99999;
}

.lightbox-close {
    top: 24px;
    right: 24px;
}

.lightbox-prev {
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-prev:hover {
    transform: translateY(-50%) scale(1.1);
}

.lightbox-next:hover {
    transform: translateY(-50%) scale(1.1);
}

/* ==========================================
   NO GALLERY MESSAGE
   ========================================== */

.no-gallery {
    text-align: center;
    padding: 80px 40px;
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.no-gallery p {
    color: #666;
    font-size: 1.2rem;
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 768px) {
    .gallery-category-section {
        margin-left: 15px;
        margin-right: 15px;
    }

    .gallery-slider-wrapper {
        padding: 10px 30px;
    }

    .category-title {
        font-size: 1.4rem;
    }

    .gallery-slide-item {
        height: 240px;
    }

    .gallery-slide-item img {
        height: 195px;
    }

    .swiper-button-prev,
    .swiper-button-next {
        width: 36px;
        height: 36px;
    }

    .swiper-button-prev:after,
    .swiper-button-next:after {
        font-size: 1rem;
    }

    .lightbox-close,
    .lightbox-prev,
    .lightbox-next {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }

    .lightbox-close {
        top: 14px;
        right: 14px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-bottom-bar {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .lightbox-title {
        text-align: center;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .gallery-slider-wrapper {
        padding: 10px 10px;
    }
}