/*
 * Improve Equine Child Theme — carousel.css
 * Source: WPCode snippet 1172
 * Migrated: Phase E (2026-05-31)
 */

/* ============================================================
       HOMEPAGE CAROUSEL — Complete CSS
       Single source of truth for all carousel + thumbnail strip
       styling. Loaded only on Page 6 via the is_page(6) gate.

       Font handling: This snippet intentionally does NOT declare
       font-family. Carousel typography inherits from the global
       cascade. When the global fonts system ships (separate session),
       this remains correct — no edits needed here.
    ============================================================ */

    /* ============================================================
       CTA BUTTON — teal filled default, brighter teal on hover
    ============================================================ */
    .ieC-cta-btn {
        display: inline-block;
        padding: 14px 32px;
        background: #4A8FA0;
        border: 2px solid #4A8FA0;
        color: #fff;
        text-decoration: none;
        font-size: 1rem;
        font-weight: 600;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        border-radius: 3px;
        transition: background 0.2s, border-color 0.2s, color 0.2s;
        cursor: pointer;
    }
    .ieC-cta-btn:hover {
        background: #5AAFC0;
        border-color: #5AAFC0;
        color: #fff;
    }

    /* ============================================================
       CAROUSEL WRAPPER & TRACK
    ============================================================ */
    #ieCarousel {
        position: relative;
        width: 100%;
        overflow: hidden;
        background: #111;
    }

    .ieC-track {
        display: flex;
        transition: transform 0.6s cubic-bezier(0.77, 0, 0.175, 1);
        will-change: transform;
    }

    /* ============================================================
       SLIDES — Base
    ============================================================ */
    .ieC-slide {
        min-width: 100%;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 92vh;
        overflow: hidden;
    }

    /* ============================================================
       SLIDE IMAGES — responsive <picture>/<img> pattern
       Slide 1: fetchpriority="high" (LCP element, preloaded by 1906)
       Slides 3-6: native loading="lazy"
       Slide 2: lazy-injected <video> (see JS below — Approach B)
    ============================================================ */
    .ieC-slide-picture {
        position: absolute;
        inset: 0;
        z-index: 0;
        display: block;
        overflow: hidden;
    }

    .ieC-slide-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center center;
        display: block;
        transform: scale(1.04);
        transition: transform 8s ease;
    }

    .ieC-slide.is-active .ieC-slide-img {
        transform: scale(1);
    }

    /* Video background (injected by JS for slide 2) */
    .ieC-slide-video {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        z-index: 0;
    }

    /* Lazy-video poster placeholder — shown until JS injects the <video> */
    .ieC-slide-lazy-video {
        background-size: cover;
        background-position: center center;
        background-repeat: no-repeat;
    }

    .ieC-slide-overlay {
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0.38);
        z-index: 1;
    }

    /* ============================================================
       SLIDE CONTENT — base
    ============================================================ */
    .ieC-slide-content {
        position: relative;
        z-index: 2;
        color: #fff;
        padding: 2rem 1.5rem;
        max-width: 680px;
        width: 100%;
    }

    .ieC-slide-content .ieC-eyebrow {
        font-size: 0.78rem;
        font-weight: 700;
        letter-spacing: 0.18em;
        text-transform: uppercase;
        color: rgba(255,255,255,0.82);
        margin-bottom: 0.75rem;
        display: block;
    }

    .ieC-slide-content h1.ieC-eyebrow {
        font-size: 0.78rem;
        font-weight: 700;
        margin: 0 0 0.75rem 0;
    }

    .ieC-slide-content h2 {
        font-size: clamp(1.7rem, 3.5vw, 3rem);
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        margin: 0 0 1rem 0;
        text-shadow: 0 2px 14px rgba(0,0,0,0.5);
        line-height: 1.15;
    }

    .ieC-slide-content h2 em {
        font-style: italic;
        font-weight: 400;
    }

    .ieC-slide-content p {
        font-size: clamp(0.9rem, 1.5vw, 1.1rem);
        margin-bottom: 2rem;
        text-shadow: 0 1px 6px rgba(0,0,0,0.4);
        line-height: 1.65;
    }

    /* ============================================================
       CONTENT POSITION VARIANTS
    ============================================================ */

    /* Left-aligned, vertically centered (slides 2, 3, 4) */
    .ieC-slide.pos-left .ieC-slide-content {
        margin-left: 8%;
        margin-right: auto;
        text-align: left;
    }

    /* Right-aligned, vertically centered (slide 5) */
    .ieC-slide.pos-right {
        justify-content: flex-end;
    }
    .ieC-slide.pos-right .ieC-slide-content {
        margin-right: 8%;
        margin-left: auto;
        text-align: left;
    }

    /* Bottom-left (reserved for future use) */
    .ieC-slide.pos-bottom-left {
        align-items: flex-end;
        justify-content: flex-start;
    }
    .ieC-slide.pos-bottom-left .ieC-slide-content {
        margin-left: 8%;
        margin-bottom: 80px;
        text-align: left;
    }

    /* Bottom-right (slides 1 and 6) */
    .ieC-slide.pos-bottom-right {
        align-items: flex-end;
        justify-content: flex-end;
    }
    .ieC-slide.pos-bottom-right .ieC-slide-content {
        margin-right: 8%;
        margin-bottom: 80px;
        text-align: right;
    }

    /* ============================================================
       DOTS
    ============================================================ */
    .ieC-dots {
        position: absolute;
        bottom: 22px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 10;
        display: flex;
        gap: 10px;
    }

    .ieC-dot {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: rgba(255,255,255,0.45);
        border: none;
        cursor: pointer;
        padding: 0;
        transition: background 0.25s, transform 0.25s;
    }

    .ieC-dot.is-active,
    .ieC-dot:hover {
        background: #fff;
        transform: scale(1.3);
    }

    /* ============================================================
       PREV / NEXT ARROWS
    ============================================================ */
    .ieC-arrow {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 10;
        background: rgba(0,0,0,0.32);
        border: 2px solid rgba(255,255,255,0.6);
        color: #fff;
        width: 48px;
        height: 48px;
        border-radius: 50%;
        font-size: 1.4rem;
        line-height: 1;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.2s;
    }

    .ieC-arrow:hover {
        background: rgba(0,0,0,0.65);
    }

    .ieC-arrow-prev { left: 18px; }
    .ieC-arrow-next { right: 18px; }

    /* ============================================================
       THUMBNAIL STRIP NAVIGATION
    ============================================================ */
    .ieC-thumbs {
        background: #0a0a0a;
        padding: 16px 0;
        position: relative;
        overflow: hidden;
    }
    .ieC-thumbs-track {
        display: flex;
        justify-content: center;
        gap: 10px;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 0 16px;
        max-width: 100%;
    }
    .ieC-thumbs-track::-webkit-scrollbar { display: none; }
    .ieC-thumb {
        flex: 0 0 auto;
        width: 110px;
        height: 62px;
        border: 2px solid rgba(255,255,255,0.25);
        border-radius: 4px;
        overflow: hidden;
        cursor: pointer;
        background: #222;
        padding: 0;
        transition: border-color 0.25s, transform 0.25s, opacity 0.25s;
        opacity: 0.55;
        position: relative;
    }
    .ieC-thumb:hover {
        opacity: 0.85;
        border-color: rgba(255,255,255,0.55);
    }
    .ieC-thumb.is-active {
        opacity: 1;
        border-color: #4A8FA0;
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(74, 143, 160, 0.4);
    }
    .ieC-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }
    .ieC-thumb-label {
        position: absolute;
        inset: 0;
        background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 50%);
        color: #fff;
        font-size: 9px;
        font-weight: 700;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        padding: 4px 6px;
        display: flex;
        align-items: flex-end;
        line-height: 1.2;
        text-align: left;
    }

    /* ============================================================
       RESPONSIVE
    ============================================================ */
    @media (max-width: 1024px) {
        /* Theme custom CSS forces img { max-width:100%; height:auto } sitewide.
           Restore container-filling for carousel images only. */
        .ieC-slide-picture,
        .ieC-slide-picture .ieC-slide-img {
            width: 100% !important;
            height: 100% !important;
        }
        .ieC-slide-img {
            object-fit: cover !important;
        }
        .ieC-thumb picture,
        .ieC-thumb picture img {
            width: 100% !important;
            height: 100% !important;
            object-fit: cover !important;
        }
    }

    @media (max-width: 768px) {
        .ieC-slide {
            min-height: 75vh;
        }
        .ieC-slide.pos-left .ieC-slide-content,
        .ieC-slide.pos-right .ieC-slide-content,
        .ieC-slide.pos-bottom-left .ieC-slide-content,
        .ieC-slide.pos-bottom-right .ieC-slide-content {
            margin-left: 5%;
            margin-right: 5%;
            max-width: 90%;
        }
        .ieC-slide.pos-bottom-left .ieC-slide-content,
        .ieC-slide.pos-bottom-right .ieC-slide-content {
            margin-bottom: 60px;
        }
        .ieC-arrow {
            width: 38px;
            height: 38px;
            font-size: 1.1rem;
        }
        .ieC-arrow-prev { left: 8px; }
        .ieC-arrow-next { right: 8px; }
        .ieC-thumbs-track { justify-content: flex-start; }
        .ieC-thumb { width: 90px; height: 51px; }
        .ieC-thumb-label { font-size: 8px; }
    }

    @media (max-width: 480px) {
        .ieC-slide-content h2 {
            font-size: 1.4rem;
        }
        .ieC-slide-content p {
            font-size: 0.88rem;
        }
        .ieC-thumb {
            width: 76px;
            height: 43px;
        }
    }
