/* Hero Carousel Styles */
.hero-carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
}

/* Ensure consistent height for carousel */
.hero-sect-carousel {
    position: relative;
    width: 100%;
    margin: 0 auto;
}

.hero-carousel .slick-dots {
    bottom: 20px;
    z-index: 1;
}

.hero-carousel .slick-dots li button:before {
    color: #fff;
    opacity: 0.7;
    font-size: 12px;
}

.hero-carousel .slick-dots li.slick-active button:before {
    color: #fff;
    opacity: 1;
}

.hero-carousel .slick-prev,
.hero-carousel .slick-next {
    z-index: 10;
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.hero-carousel .slick-prev:hover,
.hero-carousel .slick-next:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

.hero-carousel .slick-prev {
    left: 30px;
}

.hero-carousel .slick-next {
    right: 30px;
}

/* Hide default slick arrow icon */
.hero-carousel .slick-prev:before,
.hero-carousel .slick-next:before {
    display: none;
}

.hero-carousel .hero-sect-cover-img {
    position: relative;
    overflow: hidden;
}

/* Add a subtle dark overlay to make text more readable */
.hero-carousel .hero-sect-cover-img:after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2); /* Subtle dark overlay */
    z-index: 1;
}

/* Style for hero content */
.hero-sect-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 80%;
    max-width: 800px;
    z-index: 5;
    padding: 20px;
    background-color: rgba(
        0,
        0,
        0,
        0.2
    ); /* Subtle background for better text visibility */
    border-radius: 10px;
    backdrop-filter: blur(2px); /* Slight blur effect for modern browsers */
}

.hero-sect-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-sect-content .hero-sect-desc {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

@media (max-width: 992px) {
    .hero-sect-content h1 {
        font-size: 2.5rem;
    }

    .hero-sect-content .hero-sect-desc {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .hero-sect-content h1 {
        font-size: 2rem;
    }

    .hero-sect-content .hero-sect-desc {
        font-size: 0.9rem;
    }
}

/* Fix for Slick initialization */
.hero-sect-carousel {
    position: relative;
}

.hero-carousel.slick-initialized .slick-slide {
    visibility: hidden;
}

.hero-carousel.slick-initialized .slick-slide.slick-active {
    visibility: visible;
}

/* Default visibility for first slide when JS fails */
.hero-carousel:not(.slick-initialized) .hero-sect-cover-img:not(:first-child) {
    display: none;
}

/* Ensure images are displayed properly with consistent height */
.hero-sect-cover-img {
    width: 100%;
    height: auto;
    position: relative;
    overflow: hidden;
    max-height: 798px;
}

.hero-sect-cover-img img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 798px;
    object-fit: contain; /* Changed to contain to prevent cropping */
}

/* Container-based approach for consistent slide heights */
.hero-carousel .slick-list,
.hero-carousel .slick-track,
.hero-carousel .slick-slide,
.hero-carousel .slick-slide > div {
    height: 100%;
}

.hero-carousel .slick-slide {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .hero-sect-cover-img,
    .hero-sect-cover-img img {
        max-height: 600px;
    }
}

@media (max-width: 768px) {
    .hero-sect-cover-img,
    .hero-sect-cover-img img {
        max-height: 500px;
    }
}

@media (max-width: 576px) {
    .hero-sect-cover-img,
    .hero-sect-cover-img img {
        max-height: 400px;
    }
}
