/* Reset základních stylů */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #111;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Hlavní mřížka galerie */
.gallery-container {
    display: grid;
    /* Automaticky vytvoří sloupce s minimální šířkou 250px */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    /* Bez mezer pro plnohodnotný full-screen efekt */
    grid-gap: 0; 
    width: 100vw;
    min-height: 100vh;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1; /* Čtvercový formát jako na Instagramu */
    cursor: pointer;
}

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

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

/* Lightbox (Slideshow po kliknutí) */
.lightbox {
    display: none; /* Skryté ve výchozím stavu */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 85vh;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    border-radius: 4px;
}

.lightbox-caption {
    color: #fff;
    margin-top: 15px;
    max-width: 80%;
    text-align: center;
    font-size: 1rem;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}