/* ==========================================================================
   Animation Package: media-carousel
   Supports both image banners and text/card carousels
   ========================================================================== */

.anim-carousel {
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
}

.anim-carousel--media {
    aspect-ratio: 16 / 10;
    background-color: #e9efe9;
    box-shadow: 0 12px 30px rgba(15, 31, 20, 0.1);
}

.anim-carousel--media .anim-carousel__stage {
    position: relative;
    width: 100%;
    height: 100%;
}

.anim-carousel--media .anim-carousel__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.65s ease;
    pointer-events: none;
}

.anim-carousel--media .anim-carousel__slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.anim-carousel--media .anim-carousel__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Text / Card Carousel Variant */
.anim-carousel--text {
    background: #ffffff;
    border: 1px solid rgba(0, 127, 0, 0.14);
    padding: 2rem 2rem 3.25rem;
    box-shadow: 0 10px 28px rgba(15, 31, 20, 0.06);
}

.anim-carousel--text .anim-carousel__stage {
    display: grid;
}

.anim-carousel--text .anim-carousel__slide {
    grid-area: 1 / 1;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.45s ease, transform 0.45s ease;
    pointer-events: none;
}

.anim-carousel--text .anim-carousel__slide.is-active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Controls */
.anim-carousel__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: rgba(15, 31, 20, 0.52);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.anim-carousel__arrow:hover,
.anim-carousel__arrow:focus-visible {
    background: #007f00;
    transform: translateY(-50%) scale(1.06);
}

.anim-carousel__arrow--prev {
    left: 0.75rem;
}

.anim-carousel__arrow--next {
    right: 0.75rem;
}

.anim-carousel--text .anim-carousel__arrow {
    top: auto;
    bottom: 0.85rem;
    transform: none;
    width: 34px;
    height: 34px;
    background: #eef6ee;
    color: #006b1b;
    border-color: #b7d8b7;
}

.anim-carousel--text .anim-carousel__arrow:hover {
    background: #007f00;
    color: #ffffff;
    transform: none;
}

.anim-carousel--text .anim-carousel__arrow--prev {
    left: auto;
    right: 4rem;
}

.anim-carousel--text .anim-carousel__arrow--next {
    right: 1.25rem;
}

.anim-carousel__dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0.85rem;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
}

.anim-carousel--text .anim-carousel__dots {
    justify-content: flex-start;
    left: 2rem;
    right: auto;
    bottom: 1.25rem;
}

.anim-carousel__dots .mc-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.9);
    background: rgba(15, 31, 20, 0.35);
    padding: 0;
    cursor: pointer;
    transition: width 0.22s ease, background-color 0.22s ease;
}

.anim-carousel__dots .mc-dot.is-active {
    width: 24px;
    background: #ffeb3b;
    border-color: #ffeb3b;
}

.anim-carousel--text .anim-carousel__dots .mc-dot {
    border-color: #007f00;
    background: transparent;
}

.anim-carousel--text .anim-carousel__dots .mc-dot.is-active {
    background: #007f00;
    border-color: #007f00;
}

@media (prefers-reduced-motion: reduce) {
    .anim-carousel__slide {
        transition: opacity 0.15s ease;
        transform: none !important;
    }
}
