﻿.slider {
    position: relative;
    width: 100%;
    height: 350px; /* Fixed banner height */
    overflow: hidden;
    display: flex;
    align-items: center;  /* ✅ Vertically center image */
    justify-content: center; /* ✅ Horizontally center image */
    background: #ef3325; /* Optional background behind image */
}

.item2 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
    display: flex;
    align-items: center;   /* ✅ Keep image centered */
    justify-content: center;
}

.item2.current {
    opacity: 1;
}

.item2 img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* ✅ Show full image with top/bottom space if needed */
}


.caption {
    position: absolute;
    bottom: 30%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: #fff;
    animation: fadeInUp 1s ease-in-out;
    font-family: 'Poiret One', cursive;
}

.caption h1 {
    font-family: 'Poiret One', cursive;
    font-size: 3rem; /* Adjust as needed */
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    background-color: rgb(65 72 66 / 68%);
    padding: 20px;
    border-radius: 10px;
    display: inline-block;
}

.caption h4 {
    font-family: 'Poiret One', cursive;
    font-size: 1rem; /* Adjust as needed */
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    background-color: rgb(65 72 66 / 68%);
    padding: 20px;
    border-radius: 10px;
    display: inline-block;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate(-50%, 30%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.buttons {
    position: absolute;
    z-index: 1;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.button {
    width: 40px;
    height: 40px;
    border: none;
    outline: none;
    padding: 0;
    background: transparent center no-repeat;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.4s ease-in-out;
}

.button.prev {
    background-image: url(https://codeisle.info/blog/wp-content/uploads/2018/12/ico_next_b32.png);
    transform: rotate(180deg);
}

.button.next {
    background-image: url(https://codeisle.info/blog/wp-content/uploads/2018/12/ico_next_b32-1.png);
}

.button:hover {
    opacity: 0.8;
}

.dots {
    position: absolute;
    bottom: 5%;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #777;
    margin: 0 5px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.4s ease-in-out;
}

.dot.current {
    opacity: 1;
    background: #fff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .slider {
        height: 250px; /* Smaller height on tablets */
    }

    .caption h1 {
        font-size: 2rem;
    }

    .caption h4 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .slider {
        height: 200px; /* Smaller height on mobiles */
    }

    .caption h1 {
        font-size: 1.5rem;
    }

    .caption h4 {
        font-size: 1rem;
    }
}
