/* General Carousel Styling */
.slider-img {
    opacity: 20;
    object-fit: contain;
    width: 100%;
    height: 100vh;
    filter: brightness(70%);
    transition: all 0.5s ease-in-out;
    -webkit-filter: brightness(70%);
}

/* Centering Caption */
.carousel-caption {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 80%; /* Slightly narrow width for better readability */
    padding: 0 1rem;
    box-sizing: border-box;
    opacity: 0;
    animation: fadeIn 1s forwards;
}


/* Fade In Animation for Caption */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}


/* Fully Responsive Title Styling */
.slider-title {
    font-size: clamp(2rem, 3vw, 4rem); /* Increased dynamic scaling for title */
    color: #fff;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
    margin-bottom: 2rem;
    line-height: 1; /* Better readability */
    animation: fadeInText 1.5s ease-in-out; /* Animation for text */
}



@keyframes slideIn {
    from {
        transform: translateY(-50px);
    }
    to {
        transform: translateY(0);
    }
}

/* Fully Responsive Text Styling */
.slider-text {
    font-size: clamp(0.9rem, 1.5vw, 1.5rem); /* Dynamic scaling for all devices */
    color: #fff;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
    margin-bottom: 1.5rem;
    line-height: 1.6; /* Better readability */
    animation: fadeInText 1.5s ease-in-out; /* Animation for text */
}

@keyframes fadeInText {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Button Styling */
.carousel-caption .btn {
    display: inline-block;
    padding: 10px 20px; /* Adjusted padding */
    font-size: clamp(0.8rem, 1.2vw, 1.2rem); /* Scales dynamically */
    color: #ffffffd9;
    background-color: #ffc107d5;
    border: none;
    border-radius: 5px;
    text-transform: uppercase;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.3s ease;
    animation: scaleIn 1s ease-out; /* Animation for button */
}

@keyframes scaleIn {
    from {
        transform: scale(0.5);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.carousel-caption .btn:hover {
    background-color: #FFC107;
    transform: scale(1.05);
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .slider-img {
        height: 80vh; /* Adjusted height for medium devices */
    }
    .carousel-caption {
        width: 80%; /* Adjust caption width */
    }
    .carousel-caption h3 {
        font-size: 3rem;
      }
    .slider-title {
        font-size: 4rem; /* Adjust title size */
    }
    .slider-text {
        font-size: 1rem; /* Adjust text size */
    }
}

@media (max-width: 768px) {
    .slider-img {
        height: 60vh; /* Adjusted height for smaller devices */
    }
    .carousel-caption {
        width: 90%; /* Adjust caption width */
        top: 45%; /* Adjust position */
    }
    .slider-title {
        font-size: 0.7rem; /* Adjust title size */
        text-align: center; /* Center align title */
    }
    .slider-text {
        font-size: 0.4rem; /* Adjust text size */
    }
    .carousel-caption h3 {
        font-size: 1rem;
    }
    .carousel-caption p {
        display: none;
    }
    .carousel-caption .btn {
        font-size: 0.4rem;
        padding: 7px 14px;
    }
}

@media (max-width: 480px) {
    .slider-img {
        height: auto; /* Ensures image is not cropped */
        max-height: 50vh;
    }
    .carousel-caption {
        top: 40%;
    }
    .slider-title {
        font-size: 0.6rem;
        text-align: center; /* Center align title */
    }
    .slider-text {
        font-size: 0.4rem;
    }
    .carousel-caption .btn {
        font-size: 0.4rem;
        padding: 5px 13px;
    }
}


@media (max-width: 360px) {
    .slider-img {
        height: auto; /* Ensures full image is shown */
        max-height: 45vh;
    }
    .carousel-caption {
        top: 35%;
    }
    .slider-title {
        font-size: 0.4rem;
        text-align: center; /* Center align title */
    }
    .slider-text {
        font-size: 0.3rem;
    }
    .carousel-caption .btn {
        font-size: 0.6rem;
        padding: 4px 8px;
    }
}
