/* Lightbox Global Overlay */
.swiper-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 15, 30, 0.95);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.swiper-lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Close Button */
.swiper-lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: none;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.swiper-lightbox-close:hover {
    background: var(--color-primary);
    transform: scale(1.1);
}

/* Swiper Container */
.swiper-lightbox-container {
    width: 100%;
    height: 90vh; /* Leave some breathing room */
    display: flex;
    align-items: center;
}

/* Slide Content */
.swiper-lightbox-container .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.swiper-lightbox-container .swiper-slide img {
    max-width: 90%;
    max-height: 85vh;
    border-radius: var(--radius-xl);
    object-fit: contain;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

/* Navigation & Pagination */
.swiper-button-next,
.swiper-button-prev {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.1);
    width: 50px !important;
    height: 50px !important;
    border-radius: 50%;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 1.5rem !important;
    font-weight: 800;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: var(--color-primary);
    transform: scale(1.1);
}

.swiper-pagination-bullet {
    background: #fff !important;
    opacity: 0.5;
    width: 10px !important;
    height: 10px !important;
}

.swiper-pagination-bullet-active {
    background: var(--color-primary) !important;
    opacity: 1;
    transform: scale(1.3);
}

/* Image trigger hover effect (General Wrapper) */
.swiper-lightbox-trigger {
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: block;
}

.poster-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: inherit;
}

.poster-hover i {
    color: #fff;
    font-size: 3rem;
    transform: scale(0.5);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.swiper-lightbox-trigger:hover .poster-hover {
    opacity: 1;
}

.swiper-lightbox-trigger:hover .poster-hover i {
    transform: scale(1);
}

/* Prevent body scrolling when open */
body.lightbox-open {
    overflow: hidden;
}

/* Grid Layout specific to the Carteleras section to nicely stack posters */
.posters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem;
    align-items: start;
    margin-top: 2rem;
}
.posters-grid .poster-wrapper {
    margin: 0;
}
