/* Carousel/Slider Styles */
.hero-section {
    margin: 2rem 0;
    border-radius: var(--border-radius-modern);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.modern-carousel {
    position: relative;
    border-radius: var(--border-radius-modern);
    overflow: hidden;
    z-index: var(--z-carousel);
    max-width: 1320px; /* enforce 1320px width for carousel visuals */
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.carousel-content {
    position: relative;
    width: 100%;
    /* Fallback for browsers that don't support aspect-ratio */
    padding-bottom: 56.25%; /* 16:9 aspect ratio (9/16 = 0.5625) */
    min-height: 250px;
    max-height: 600px;
    overflow: hidden;
}

/* Modern browsers with aspect-ratio support */
@supports (aspect-ratio: 16 / 9) {
    .carousel-content {
        padding-bottom: 0;
        aspect-ratio: 16 / 9; /* Responsive aspect ratio */
    }
}

.carousel-image {
    width: 100%;
    max-width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: var(--transition-smooth);
}

/* Ensure picture tags and images inside carousel scale properly */
.carousel-content picture {
    width: 100%;
    height: 100%;
    display: block;
    position: relative;
}

.carousel-content .carousel-image,
.carousel-content picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.carousel-link {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.7) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-smooth);
}

.carousel-item:hover .carousel-overlay {
    opacity: 1;
}

.carousel-text {
    text-align: center;
    color: white;
    padding: 2rem;
}

.carousel-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.carousel-description {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.carousel-cta {
    display: inline-block;
    background: var(--primary-gradient);
    color: white;
    padding: 12px 24px;
    border-radius: var(--border-radius-modern);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: var(--transition-smooth);
}

.carousel-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

.carousel-indicators {
    bottom: 20px;
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    background: transparent;
    margin: 0 5px;
    transition: var(--transition-smooth);
}

.carousel-indicators button.active {
    background: white;
    transform: scale(1.2);
}

.modern-control {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    backdrop-filter: blur(10px);
    transition: var(--transition-smooth);
}

.modern-control:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.modern-control .carousel-control-prev-icon,
.modern-control .carousel-control-next-icon {
    width: 20px;
    height: 20px;
}

/* Responsive breakpoints for different screen sizes */
@media (max-width: 576px) {
    .carousel-content {
        padding-bottom: 62.5%; /* 16:10 aspect ratio fallback */
        min-height: 200px;
        max-height: 300px;
    }
    
    @supports (aspect-ratio: 16 / 10) {
        .carousel-content {
            padding-bottom: 0;
            aspect-ratio: 16 / 10;
        }
    }
    
    /* On mobile, use contain to show full image without cropping */
    .carousel-content picture,
    .carousel-content .carousel-image,
    .carousel-content picture img,
    .carousel-content .carousel-image img {
        object-fit: contain;
        object-position: center;
    }
    
    .carousel-content {
        background-color: #000; /* Black background for letterboxing if needed */
    }
    
    .carousel-title {
        font-size: 1.5rem;
    }
    
    .carousel-description {
        font-size: 0.9rem;
    }
    
    .carousel-text {
        padding: 0.75rem;
    }
    
    .modern-control {
        width: 40px;
        height: 40px;
    }
    
    .modern-control .carousel-control-prev-icon,
    .modern-control .carousel-control-next-icon {
        width: 16px;
        height: 16px;
    }
}

@media (min-width: 577px) and (max-width: 768px) {
    .carousel-content {
        padding-bottom: 56.25%; /* 16:9 aspect ratio fallback */
        min-height: 250px;
        max-height: 350px;
    }
    
    @supports (aspect-ratio: 16 / 9) {
        .carousel-content {
            padding-bottom: 0;
            aspect-ratio: 16 / 9;
        }
    }
    
    /* On small tablets, still use contain to avoid cropping */
    .carousel-content picture,
    .carousel-content .carousel-image,
    .carousel-content picture img,
    .carousel-content .carousel-image img {
        object-fit: contain;
        object-position: center;
    }
    
    .carousel-title {
        font-size: 1.8rem;
    }
    
    .carousel-description {
        font-size: 1rem;
    }
    
    .carousel-text {
        padding: 1rem;
    }
}

@media (min-width: 769px) and (max-width: 992px) {
    .carousel-content {
        padding-bottom: 56.25%; /* 16:9 aspect ratio fallback */
        min-height: 350px;
        max-height: 450px;
    }
    
    @supports (aspect-ratio: 16 / 9) {
        .carousel-content {
            padding-bottom: 0;
            aspect-ratio: 16 / 9;
        }
    }
    
    .carousel-title {
        font-size: 2.2rem;
    }
}

@media (min-width: 993px) and (max-width: 1200px) {
    .carousel-content {
        padding-bottom: 56.25%; /* 16:9 aspect ratio fallback */
        min-height: 400px;
        max-height: 500px;
    }
    
    @supports (aspect-ratio: 16 / 9) {
        .carousel-content {
            padding-bottom: 0;
            aspect-ratio: 16 / 9;
        }
    }
}

@media (min-width: 1201px) {
    .carousel-content {
        padding-bottom: 56.25%; /* 16:9 aspect ratio fallback */
        min-height: 450px;
        max-height: 600px;
    }
    
    @supports (aspect-ratio: 16 / 9) {
        .carousel-content {
            padding-bottom: 0;
            aspect-ratio: 16 / 9;
        }
    }
}


