#gallery .section-padding {
    padding-bottom: 0;
}

#gallery .section-title {
    margin-bottom: 1.5rem;
}

.slider-container {
    position: relative;
    max-width: 1000px;
    margin: auto;
    margin-bottom: 5rem;
    /* Restore spacing after moving out of section-padding */
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    height: 450px;
}

.slide {
    display: none;
    height: 100%;
}

.slide.active {
    display: block;
    animation: fade 0.8s;
}

@keyframes fade {
    from {
        opacity: .4
    }

    to {
        opacity: 1
    }
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-caption {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: rgba(44, 95, 45, 0.8);
    color: white;
    padding: 0.8rem 1rem;
    border-radius: 4px;
    max-width: 90%;
}

.slide-caption h3 {
    margin-bottom: 0.3rem;
    font-size: 1.1rem;
    font-family: var(--font-serif);
}

.slide-caption p {
    font-size: 0.85rem;
}

.prev,
.next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 12px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    transition: 0.3s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background-color: rgba(0, 0, 0, 0.3);
}

.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.prev:hover,
.next:hover {
    background-color: var(--primary-color);
}

@media (max-width: 768px) {
    .slider-container {
        width: 100%;
        max-width: 100%;
        border-radius: 0;
        margin: 0;
    }
}


@media (min-width: 768px) {
    .slider-container {
        height: 650px;
    }

    .slide-caption {
        bottom: 20px;
        left: 20px;
        padding: 1rem 1.5rem;
        max-width: 80%;
    }

    .slide-caption h3 {
        font-size: 1.5rem;
    }

    .slide-caption p {
        font-size: 1rem;
    }

    .prev,
    .next {
        padding: 16px;
        font-size: 24px;
    }
}