/* ==================== GALLERY PAGE STYLES ==================== */
/* Tento soubor se používá pro všechny stránky galerií */

body {
    background: #ffffff;
}

/* Navbar override pro gallery stránky - světlý navbar */
.navbar {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.navbar .logo {
    color: var(--primary-color) !important;
}

.navbar .nav-link {
    color: var(--text-dark) !important;
}

.navbar .lang-switch {
    background: var(--gray-100);
}

.navbar .lang-btn {
    color: var(--text-dark);
}

.navbar .lang-btn.active {
    background: var(--primary-color);
    color: var(--white);
}

/* Mobile toggle - tmavé čárky na světlém pozadí */
.mobile-toggle span,
.navbar .mobile-toggle span,
nav .mobile-toggle span,
#navbar .mobile-toggle span,
button.mobile-toggle span {
    background: #1a3a5c !important;
    background-color: #1a3a5c !important;
}

/* Zajistit viditelnost hamburger ikony na mobilech */
.mobile-toggle {
    z-index: 1001;
}

.hero-overlay {
    background: #ffffff !important;
}

/* Gallery Header */
.gallery-header {
    padding: 120px 20px 40px;
    text-align: center;
    background: var(--gray-50);
}

.gallery-header h1 {
    font-family: var(--heading-font);
    font-size: 3rem;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.gallery-header p {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto 20px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-weight: 600;
    margin-top: 20px;
    transition: var(--transition);
}

.back-link:hover {
    gap: 12px;
}

/* Masonry Gallery Layout */
.gallery-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px 80px;
}

.gallery-masonry {
    column-count: 3;
    column-gap: 15px;
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 15px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    background: #f0f0f0;
}

.gallery-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.4s ease, 
                filter 0.4s ease;
    opacity: 0;
    filter: brightness(1);
}

.gallery-item img.loaded {
    opacity: 1;
}

.gallery-item:hover img {
    transform: scale(1.03);
    filter: brightness(0.95);
}

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

.lightbox.active {
    display: flex;
    opacity: 1;
    touch-action: none;
    -webkit-overflow-scrolling: auto;
}

.lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox img {
    max-width: 100vw;
    max-height: 100vh;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

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

.lightbox-close:hover {
    opacity: 1;
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 50px;
    line-height: 60px;
    color: white;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.6;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    padding: 0;
}

.lightbox-nav:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.7);
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

.lightbox-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 14px;
    opacity: 0.8;
    z-index: 10001;
}

/* Mobile lightbox — swipe-friendly */
@media (max-width: 768px) {
    /* Hide arrow buttons on mobile — swipe instead */
    .lightbox-nav {
        display: none;
    }

    .lightbox-close {
        top: 12px;
        right: 16px;
        font-size: 32px;
        background: rgba(0, 0, 0, 0.4);
        width: 44px;
        height: 44px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        line-height: 1;
    }

    .lightbox-counter {
        bottom: 16px;
        font-size: 13px;
        background: rgba(0, 0, 0, 0.4);
        padding: 4px 12px;
        border-radius: 12px;
    }
}

/* Responsive */
@media (max-width: 1200px) {
    .gallery-masonry {
        column-count: 2;
    }
}

/* Mobilní navigace pro galerie */
@media (max-width: 992px) {
    .mobile-toggle {
        display: flex !important;
    }
    
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--white);
        flex-direction: column;
        padding: 40px;
        gap: 20px;
        transition: 0.3s ease;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu .nav-link {
        color: #333;
        font-size: 1.2rem;
    }
}

@media (max-width: 900px) {
    .gallery-masonry {
        column-count: 2;
        column-gap: 12px;
    }
    
    .gallery-item {
        margin-bottom: 12px;
    }
    
    .gallery-header h1 {
        font-size: 2.2rem;
    }
}

@media (max-width: 600px) {
    .gallery-masonry {
        column-count: 1;
    }
    
    .gallery-header h1 {
        font-size: 1.8rem;
    }
}
