.gallery-carousel {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 16 / 9;   /* ✅ keeps images proportional */
    max-height: 620px;      /* ✅ prevents it from being too tall on big screens */
}

.gallery-image {
    width: 100%;
    height: 100%;           /* ✅ force image to fill container height */
    object-fit: cover;      /* ✅ crop properly instead of squishing */
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.4s ease, opacity 0.4s ease;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1; /* images stay behind */
}

.gallery-description {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0,0,0,0.5);
    color: #fff;
    padding: 8px 12px;
    font-size: 16px;
    text-align: center;
    z-index: 3; /* above images */
}

.gallery-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 123, 255, 0.6);
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 14px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
    z-index: 3; /* above images */
}
.gallery-btn:hover {
    background-color: rgba(0, 123, 255, 0.85);
}
.gallery-btn-prev {
    left: 10px;
}
.gallery-btn-next {
    right: 10px;
}

/* animation states */
.slide-out-left {
    transform: translateX(-100%);
    opacity: 0;
}
.slide-out-right {
    transform: translateX(100%);
    opacity: 0;
}
.slide-in-left {
    transform: translateX(-100%);
    opacity: 0;
}
.slide-in-right {
    transform: translateX(100%);
    opacity: 0;
}
.slide-active {
    transform: translateX(0);
    opacity: 1;
}
