/* ============================================================
   TCM Full Slider — Front-end Styles  v3.2
   ============================================================ */

.tcm-fs *,
.tcm-fs *::before,
.tcm-fs *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.tcm-fs {
    background-color: #1a1aff;
    color: #fff;
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    position: relative;
    width: 100%;
}

/* ============================================================
   HERO — 50/50 grid
   ============================================================ */
.tcm-fs__hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 520px;
}

.tcm-fs__hero-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 56px 56px 56px 48px;
}

.tcm-fs__eyebrow {
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.02em;
    margin-bottom: 28px;
    opacity: 0.9;
}

.tcm-fs__heading {
    font-size: clamp(22px, 2.6vw, 34px);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

/* ============================================================
   IMAGE STACK
   The container stretches to fill the right grid column.
   Each .tcm-fs__img-layer is absolute, full size.
   JS sets `left` on each layer to position them:
     active  → left: 0            (full width visible)
     peek-1  → left: W - 60px     (60px strip visible on right)
     peek-2  → left: W - 90px     (30px strip visible, behind peek-1)
     hidden  → left: W            (fully off right)
     exiting → left: -W           (flies off left)
   overflow:hidden clips everything outside the container.
   ============================================================ */
.tcm-fs__image-stack {
    position: relative;
    overflow: hidden;
    /* Must have a height — inherits from grid row (min-height:520px) */
    min-height: 520px;
}

.tcm-fs__img-layer {
    position: absolute;
    top: 0;
    left: 100%;          /* start off-screen right before JS runs */
    width: 100%;
    height: 100%;
    overflow: hidden;
    transition:
        left    0.65s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.5s  cubic-bezier(0.4, 0, 0.2, 1);
    will-change: left, opacity;
    opacity: 0;          /* hidden until JS sets positions */
}

/* Dim overlay — solid colour, opacity driven by JS */
.tcm-fs__img-dim {
    position: absolute;
    inset: 0;
    background-color: rgba(8, 8, 160, 0.82);
    opacity: 0;
    transition: opacity 0.65s ease;
    pointer-events: none;
    z-index: 2;
}

.tcm-fs__img-layer img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.tcm-fs__progress-track {
    width: 100%;
    height: 3px;
    background-color: rgba(255, 255, 255, 0.2);
}

.tcm-fs__progress-fill {
    height: 100%;
    background-color: #00cfff;
    width: 0%;
    transition: width 0.45s ease;
}

/* ============================================================
   BOTTOM PANEL — counter · carousel · nav
   ============================================================ */
.tcm-fs__bottom {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    align-items: center;
    padding: 36px 48px 40px;
    gap: 32px;
    position: relative;
    z-index: 2;
}

.tcm-fs__counter {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0.9;
}

/* Carousel text */
.tcm-fs__carousel {
    overflow: hidden;
    position: relative;
}

.tcm-fs__track {
    position: relative;
}

.tcm-fs__slide {
    opacity: 0;
    transform: translateX(18px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    pointer-events: none;
}

.tcm-fs__slide.is-active {
    opacity: 1;
    transform: translateX(0);
    position: relative;
    pointer-events: auto;
}

.tcm-fs__slide.is-leaving {
    opacity: 0;
    transform: translateX(-18px);
    position: absolute;
}

.tcm-fs__slide-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.tcm-fs__slide-text {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.82);
    max-width: 560px;
}

/* Nav buttons — square with rounded corners */
.tcm-fs__nav {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.tcm-fs__btn {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: transparent;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
    flex-shrink: 0;
    line-height: 1;
}

.tcm-fs__btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.65);
    transform: scale(1.06);
}

.tcm-fs__btn:active {
    transform: scale(0.97);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .tcm-fs__hero {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .tcm-fs__image-stack {
        min-height: 320px;
    }

    .tcm-fs__bottom {
        grid-template-columns: 60px 1fr auto;
        padding: 28px 32px 32px;
        gap: 20px;
    }
}

@media (max-width: 600px) {
    .tcm-fs__hero-text {
        padding: 40px 24px;
    }

    .tcm-fs__image-stack {
        min-height: 260px;
    }

    .tcm-fs__bottom {
        grid-template-columns: 1fr;
        padding: 28px 24px 32px;
        gap: 16px;
    }

    .tcm-fs__counter { order: -1; }
    .tcm-fs__nav { justify-content: flex-end; }
}
