/* Styly pro fotogalerii */

/* Základní kontejner pro galerii */
.gallery-container {
    max-width: 1200px;
    margin: 150px auto 50px;
    padding: 1.5rem;
}

/* Nadpis galerie */
.gallery-title {
    color: var(--gold-color, #D4AF37);
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.5rem;
    font-weight: 500;
}

/* Mřížka pro fotografie */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Kontejner pro jednotlivé obrázky */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    aspect-ratio: 4/3;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}

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

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

/* Modální okno pro zvětšené fotografie */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    padding: 0 5%;
}

.modal-content img {
    max-height: 85vh;
    max-width: 90%;
    object-fit: contain;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
}

/* Tlačítko pro zavření modálního okna */
.modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 3rem;
    color: white;
    cursor: pointer;
    z-index: 10000;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

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

/* Navigační tlačítka pro procházení fotografií */
.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 4rem;
    color: white;
    cursor: pointer;
    z-index: 10000;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    padding: 1rem;
}

.modal-nav:hover {
    opacity: 1;
}

.modal-prev {
    left: 20px;
}

.modal-next {
    right: 20px;
}

/* Text s pokyny pro gesta na mobilních zařízeních */
.swipe-instruction {
    display: none;
    position: absolute;
    bottom: 60px;
    left: 0;
    right: 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    animation: fadeOut 3s forwards;
    animation-delay: 2s;
}

@keyframes fadeOut {
    from { opacity: 0.7; }
    to { opacity: 0; }
}

/* Čítač obrázků */
.image-counter {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
    font-size: 1rem;
    opacity: 0.8;
}

/* Přizpůsobení pro různé velikosti obrazovky */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.2rem;
    }
}

@media (max-width: 768px) {
    .gallery-container {
        margin-top: 120px;
        padding: 1rem;
    }
    
    .gallery-title {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 1rem;
    }
    
    .modal-nav {
        font-size: 2.5rem;
        opacity: 0.5;
    }
    
    .swipe-instruction {
        display: block;
    }
    
    .modal-prev {
        left: 10px;
    }
    
    .modal-next {
        right: 10px;
    }
}

/* Na malých zařízeních kompletně skryjeme šipky a spoléháme pouze na gesta */
@media (max-width: 480px) {
    .modal-nav {
        display: none;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 0.8rem;
    }
    
    .gallery-title {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }
    
    .modal-nav {
        font-size: 2.5rem;
    }
}

/* Animace načítání obrázků */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.gallery-item {
    animation: fadeIn 0.5s ease-in-out;
}

/* Prázdná galerie */
.gallery-empty {
    text-align: center;
    padding: 3rem 1rem;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
}
