.gallery-hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 8rem 0 6rem; /* Zvětšený padding */
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Dekorativní prvky pro hero */
.gallery-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    z-index: 1;
}

.gallery-hero::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 60px;
    background: var(--background-color);
    clip-path: polygon(0 100%, 100% 100%, 100% 0);
}
.gallery-hero .container {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.gallery-hero h1 {
    font-size: clamp(2.8rem, 6vw, 4rem);
    margin-bottom: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    padding-bottom: 1.5rem;
}

.gallery-hero h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, var(--accent-color), transparent);
    border-radius: 2px;
}

.gallery-hero p {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}


.gallery-section {
    padding: 4rem 0;
    background: var(--background-color);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
    transform: scale(1);
    transition: transform var(--transition-speed);
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    position: relative;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    position: absolute;
    padding: 1rem;
    transition: all 0.3s ease;
}

.lightbox-close {
    top: 20px;
    right: 20px;
    font-size: 2rem;
}

.lightbox-prev,
.lightbox-next {
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    padding: 2rem;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    color: var(--accent-color);
    transform: scale(1.1);
}

.lightbox-prev:hover {
    transform: translate(-5px, -50%);
}

.lightbox-next:hover {
    transform: translate(5px, -50%);
}

.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 1rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

/* Loading Animation */
.gallery-item.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Media Queries */
@media (max-width: 768px) {
    .gallery-hero {
        padding: 6rem 0 4rem;
    }

    .gallery-hero h1 {
        font-size: 2.5rem;
    }

    .gallery-hero p {
        font-size: 1rem;
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .gallery-hero {
        padding: 5rem 0 3rem;
    }

    .gallery-hero h1 {
        font-size: 2rem;
    }
}

/* Aktualizované styly pro lightbox a obrázky */

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

/* Upravený kontejner pro obrázek */
.lightbox-content {
    position: relative;
    width: 90%;  /* Fixní šířka kontejneru */
    height: 85vh; /* Fixní výška kontejneru */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Upravené stylování obrázku v lightboxu */
.lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain; /* Zachová poměr stran */
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
}

/* Upravená pozice navigačních tlačítek */
.lightbox-close,
.lightbox-prev,
.lightbox-next {
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    cursor: pointer;
    position: absolute;
    padding: 1rem;
    transition: all 0.3s ease;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}

.lightbox-close {
    top: 20px;
    right: 20px;
    font-size: 1.5rem;
    width: 50px;
    height: 50px;
}

.lightbox-prev,
.lightbox-next {
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    width: 60px;
    height: 60px;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.lightbox-prev:hover {
    transform: translate(-5px, -50%) scale(1.1);
}

.lightbox-next:hover {
    transform: translate(5px, -50%) scale(1.1);
}

/* Upravené počítadlo */
.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 1rem;
    background: rgba(0, 0, 0, 0.7);
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    z-index: 1001;
    font-weight: 500;
}

/* Media Queries pro lepší responzivitu */
@media (max-width: 1200px) {
    .lightbox-content {
        width: 95%;
        height: 80vh;
    }
}

@media (max-width: 768px) {
    .lightbox-content {
        width: 100%;
        height: 75vh;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .lightbox-close {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .lightbox-counter {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .lightbox-content {
        height: 70vh;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .lightbox-counter {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}