/* =============================================
   AH Hero Carousel
   ============================================= */

.ahc-carousel {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    background: #f5f5f5;
}

/* Track holds all slides side by side */
.ahc-track {
    display: flex;
    will-change: transform;
    transition-property: transform;
    transition-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Fade mode: stack slides */
.ahc-carousel[data-effect="fade"] .ahc-track {
    display: grid;
    transition: none;
}

.ahc-carousel[data-effect="fade"] .ahc-slide {
    grid-area: 1 / 1;
    opacity: 0;
    transition: opacity var(--ahc-speed, 700ms) ease;
}

.ahc-carousel[data-effect="fade"] .ahc-slide.is-active {
    opacity: 1;
}

/* =============================================
   Slide Layout - Desktop 30/70
   ============================================= */

.ahc-slide {
    flex: 0 0 100%;
    width: 100%;
    display: grid;
    grid-template-columns: 30% 70%;
    height: 500px;
    overflow: hidden;
}

.ahc-slide--image-left {
    grid-template-columns: 70% 30%;
}

.ahc-slide--image-left .ahc-slide__image {
    order: -1;
}

/* =============================================
   Text Area
   ============================================= */

.ahc-slide__text {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2.5rem;
    background-color: #fff;
    overflow: hidden;
}

.ahc-slide__text-inner {
    max-width: 100%;
    width: 100%;
}

.ahc-slide__text-inner {
    font-family: 'League Spartan', sans-serif;
}

.ahc-subtitle {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0.02em;
    color: #888;
    font-style: italic;
}

.ahc-title {
    margin: 0 0 0.75rem 0;
    font-size: clamp(1.75rem, 3vw, 2.8rem);
    font-weight: 800;
    line-height: 1.1;
    color: #212121;
}

.ahc-desc {
    margin: 0 0 1.5rem 0;
    font-size: 0.8125rem;
    line-height: 1.6;
    color: #555;
    opacity: 0.75;
    font-style: italic;
}

.ahc-btn {
    display: inline-block;
    padding: 11px 24px;
    background: #202328;
    color: #fff;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: 0.03em;
    transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
    border: none;
    cursor: pointer;
}

.ahc-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    color: #fff;
}

.ahc-btn:active {
    transform: translateY(0);
}

/* =============================================
   Image Area
   ============================================= */

.ahc-slide__image {
    position: relative;
    overflow: hidden;
    background: #eee;
    height: 100%;
    min-height: 0;
}

.ahc-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100% !important;
    object-fit: cover;
}

/* Ken Burns */
.ahc-carousel[data-ken-burns="true"] .ahc-img {
    transform: scale(1.15);
    transition: transform 6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.ahc-carousel[data-ken-burns="true"] .ahc-slide.is-active .ahc-img {
    transform: scale(1);
}

/* =============================================
   Text Animations (staggered entrance)
   ============================================= */

.ahc-anim {
    opacity: 0;
    transform: translateY(1.5rem);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.ahc-slide.is-active .ahc-anim {
    opacity: 1;
    transform: translateY(0);
}

.ahc-slide.is-active .ahc-anim[data-delay="0"] { transition-delay: 0.15s; }
.ahc-slide.is-active .ahc-anim[data-delay="1"] { transition-delay: 0.25s; }
.ahc-slide.is-active .ahc-anim[data-delay="2"] { transition-delay: 0.35s; }
.ahc-slide.is-active .ahc-anim[data-delay="3"] { transition-delay: 0.45s; }

/* =============================================
   Arrows
   ============================================= */

.ahc-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
    padding: 0;
    opacity: 0.4;
}

.ahc-arrow:hover {
    opacity: 0.8;
}

.ahc-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

.ahc-arrow svg {
    width: 24px;
    height: 24px;
    color: #333;
}

.ahc-arrow--prev {
    left: 0.25rem;
}

.ahc-arrow--next {
    right: 0.25rem;
}

/* =============================================
   Mobile Layout
   ============================================= */

@media (max-width: 767px) {
    .ahc-carousel {
        border-radius: 0;
    }

    .ahc-slide {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        height: auto !important;
        min-height: 0;
    }

    /* Mobile: always image top, text bottom */
    .ahc-slide__image {
        order: -1;
        position: relative;
        width: 100%;
        padding-bottom: 60%;
    }

    .ahc-slide--image-left .ahc-slide__image {
        order: -1;
    }

    .ahc-slide__text {
        padding: 1.25rem 1rem 1.5rem;
        align-items: flex-start;
    }

    .ahc-slide__text-inner {
        text-align: center;
        max-width: 100%;
    }

    .ahc-title {
        font-size: clamp(1.25rem, 5vw, 1.6rem);
    }

    .ahc-desc {
        font-size: 0.875rem;
        margin-bottom: 1rem;
    }

    .ahc-arrow {
        width: 34px;
        height: 34px;
    }

    .ahc-arrow svg {
        width: 16px;
        height: 16px;
    }

    .ahc-arrow--prev {
        left: 0.5rem;
    }

    .ahc-arrow--next {
        right: 0.5rem;
    }

    /* No text animations on mobile */
    .ahc-anim {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* =============================================
   Small screens
   ============================================= */

@media (max-width: 380px) {
    .ahc-slide__text {
        padding: 1rem 0.75rem 1.25rem;
    }

    .ahc-title {
        font-size: 1.2rem;
    }

    .ahc-desc {
        font-size: 0.8125rem;
    }

    .ahc-btn {
        padding: 9px 18px;
        font-size: 0.8125rem;
    }
}

/* =============================================
   Reduced Motion
   ============================================= */

@media (prefers-reduced-motion: reduce) {
    .ahc-track {
        transition-duration: 0ms !important;
    }

    .ahc-anim {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .ahc-img {
        transform: none !important;
        transition: none !important;
    }
}
