/* --- Hero Carousel Layout --- */

.hero-visual {
    position: relative;
    width: 100%;
    min-height: 300px;
    display: flex;
    justify-content: center;
    /* Center it by default */
    align-items: center;
    z-index: 10;
    margin-top: 2rem;
}

/* Desktop Grid Alignment */
@media (min-width: 900px) {
    .hero-container {
        display: grid;
        /* Give text slightly less space, bring visual closer */
        grid-template-columns: 1fr 1.1fr;
        align-items: center;
        gap: 3rem;
        /* Reduced gap from 4rem */
    }

    .hero-text {
        max-width: 100%;
        text-align: left;
    }

    .hero-visual {
        margin-top: 0;
        height: 500px;
        /* Align to center of its column, or slightly left to be closer to text */
        justify-content: flex-end;
        padding-left: 2rem;
    }
}

/* Container for the Stack/Slider */
.carousel-container {
    width: 100%;
    max-width: 550px;
    /* Slightly larger max width */
    aspect-ratio: 4 / 3;
    height: auto;
    position: relative;
    /* Clean shadow for the container itself optionally */
}

.carousel-track {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    /* Hide overflowing slides for cleaner enter/exit */
    border-radius: 20px;
    /* Match card radius */
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    /* Container shadow */
}

/* Card Styles - Simplification to absolute stack */
.carousel-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    /* Removed individual card shadow/border to prevent stacking artifacts */

    /* Transition Logic for smooth Cross-Fade */
    opacity: 0;
    transform: scale(1.05);
    /* Slight zoom out effect */
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s ease;
    z-index: 1;
    pointer-events: none;
}

.carousel-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Active State */
.carousel-card.active {
    opacity: 1;
    transform: scale(1);
    z-index: 10;
    pointer-events: auto;
}

/* Remove prev/next peek styling - just strict fade */
.carousel-card.prev,
.carousel-card.next {
    opacity: 0;
}

/* Dot Navigation */
.carousel-dots {
    position: absolute;
    bottom: 20px;
    /* Move inside the image area or just below */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 20;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    padding: 8px 12px;
    border-radius: 20px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.dot.active {
    background: white;
    transform: scale(1.2);
}

.dot:hover {
    background: rgba(255, 255, 255, 0.8);
}