/**
 * Photo Carousel Block Styles
 */

.photo-carousel-block {
    position: relative;
    margin: 40px auto;
    width: 95%;
}

.photo-carousel-block .carousel-container {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.photo-carousel-block .carousel-track-wrapper {
    flex-grow: 1;
    overflow: hidden;
    margin: 0 20px;
}

.photo-carousel-block .carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
}

.photo-carousel-block .carousel-item {
    min-width: 33.333%;
    padding: 0 6px;
    box-sizing: border-box;
    cursor: pointer;
}

.photo-image-wrapper {
    position: relative;
    aspect-ratio: 5 / 4;
    overflow: hidden;
}

.photo-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 0.3s ease;
}

.photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    pointer-events: none;
}

.photo-carousel-block .carousel-item:hover .photo-image-wrapper img {
    filter: brightness(0.7);
}

.photo-carousel-block .carousel-item:hover .photo-overlay {
    background: rgba(0, 0, 0, 0.4);
}

.photo-info-hover {
    opacity: 0;
    transition: opacity 0.3s ease;
    text-align: left;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}

.photo-description {
    width: fit-content;
    font-family: var(--font-serif), serif;
    font-size: clamp(1.3rem, 3vw, 2.4rem);
    line-height: 1.4;
    padding: 0 5px;
    color: var(--color-dark-grey-klu);
    background-color: var(--color-light-yellow-klu);
}

.photo-carousel-block .carousel-item:hover .photo-info-hover {
    opacity: 1;
}

.photo-carousel-block .carousel-arrow {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    transition: transform 0.2s ease;
    z-index: 10;
}

.photo-carousel-block .arrow-right {
    position: absolute;
    right: -45px;
}

.photo-carousel-block .arrow-left {
    position: absolute;
    left: -45px;
}

.photo-carousel-block .carousel-arrow img {
    width: 60px;
    height: auto;
}

/* Lightbox styles */
.photo-lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
}

.lightbox-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 1000px;
    max-height: 80vh;
    object-fit: contain;
}

#lightbox-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
    font-family: var(--font-serif, serif);
    font-size: 1.2rem;
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

@media (max-width: 768px) {
    .photo-carousel-block .carousel-item {
        min-width: 50%;
    }
    .photo-carousel-block .arrow-right {
        right: -15px;
    }
    .photo-carousel-block .arrow-left {
        left: -15px;
    }
    .lightbox-content {
        width: 100%;
    }
}
