* { box-sizing: border-box; margin: 0; padding: 0; }

/* --- Slider Wrapper --- */
.slider {
    width: 100%;
    max-width: 540px;
    aspect-ratio: 3 / 2;
    position: relative;
    overflow: hidden;
    margin: 20px auto;
    border: 2px solid #ccc;
    border-radius: 6px;
}

/* --- Images --- */
.slider img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    opacity: 0;
    transition: all 0.5s ease;
    pointer-events: none;          /* <--- not clickable by default */
}

/* Start positions */
.slider img.start-right { left: 100%; }
.slider img.start-left  { left: -100%; }

/* Active image (center) */
.slider img.active {
    left: 0;
    opacity: 1;
    pointer-events: auto;          /* <--- only active image is clickable */
}

/* Leaving positions */
.slider img.to-left  { left: -100%; opacity: 0; }
.slider img.to-right { left: 100%; opacity: 0; }

/* --- Arrows --- */
.arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 30px;
    color: white;
    background: rgba(0,0,0,0.4);
    padding: 5px 10px;
    cursor: pointer;
    user-select: none;
    border-radius: 4px;
    z-index: 10;
}

.arrow.left { left: 10px; }
.arrow.right { right: 10px; }

/* --- Lightbox --- */
#lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 9999;
    padding: 20px;
}

#lightbox img {
    max-width: 90%;
    max-height: 70%;
    border-radius: 6px;
}

#lightbox .desc {
    color: white;
    font-size: 18px;
    margin-top: 15px;
    text-align: center;
    max-width: 90%;
}

.lb-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 50px;
    color: white;
    cursor: pointer;
    user-select: none;
}

.lb-left { left: 30px; }
.lb-right { right: 30px; }

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

@media (max-width: 480px) {
    .arrow { font-size: 30px; padding: 8px 12px; }
    .lb-arrow { font-size: 40px; }
    .close { font-size: 35px; }
}


