/* ==========================================================================
   MT Sliding Presentation Widget
   Scroll-driven sticky parallax slides
   ========================================================================== */

.mtfe-sliding-presentation {
    position: relative;
    background: #000;
}
.mtfe-sp-section {
    height: 100vh;
    position: sticky;
    top: 0;
    overflow: hidden;
    will-change: opacity;
}

.mtfe-sp-section:not(:first-child) {
    opacity: 0; /* JS will animate this to 1 as you scroll in */
}

.mtfe-sp-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    will-change: transform;
    opacity: 1;
    transform: scale(1.08);
    transform-origin: center center;
}

/* Image */
.mtfe-sp-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Self-hosted video */
.mtfe-sp-bg video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* YouTube wrapper — covers the slide like object-fit:cover for a 16:9 iframe */
.mtfe-sp-yt-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.mtfe-sp-yt-wrap iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    /* 16:9 cover technique */
    width: max(100%, calc(100vh * 16 / 9));
    height: max(100%, calc(100vw * 9 / 16));
    transform: translate(-50%, -50%);
    border: 0;
}

/* --------------------------------------------------------------------------
   Dark overlay
   -------------------------------------------------------------------------- */
.mtfe-sp-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background-color: rgba(0, 0, 0, 0.4);
}

/* --------------------------------------------------------------------------
   Content wrapper — JS drives translateY + opacity
   -------------------------------------------------------------------------- */
.mtfe-sp-content {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: 96px;
    padding-right: 96px;
    will-change: transform;
    transform: translateY(0);
}

.mtfe-sp-content-inner {
    max-width: 1400px;
    width: 100%;
}

/* Alignment variants — applied per slide */
.mtfe-sp-content.mtfe-sp-align-left .mtfe-sp-content-inner {
    margin-right: auto;
}

.mtfe-sp-content.mtfe-sp-align-center .mtfe-sp-content-inner {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.mtfe-sp-content.mtfe-sp-align-center .mtfe-sp-tags {
    justify-content: center;
}

.mtfe-sp-content.mtfe-sp-align-center .mtfe-sp-label {
    justify-content: center;
}

.mtfe-sp-content.mtfe-sp-align-right .mtfe-sp-content-inner {
    margin-left: auto;
    text-align: right;
}

.mtfe-sp-content.mtfe-sp-align-right .mtfe-sp-tags {
    justify-content: flex-end;
}

.mtfe-sp-content.mtfe-sp-align-right .mtfe-sp-label {
    justify-content: flex-end;
}

/* --------------------------------------------------------------------------
   Eyebrow label
   -------------------------------------------------------------------------- */
.mtfe-sp-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 24px;
    font-size: 0.6875rem;        /* 11px */
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 500;
    line-height: 1;
}

.mtfe-sp-label svg {
    flex-shrink: 0;
    opacity: 0.8;
}

/* --------------------------------------------------------------------------
   Title
   -------------------------------------------------------------------------- */
.mtfe-sp-title {
    margin: 0 0 32px 0;
    font-size: clamp(3rem, 9vw, 9rem);
    font-style: italic;
    line-height: 0.88;
    letter-spacing: -0.02em;
    color: #ffffff;
    font-weight: 400;
}

/* --------------------------------------------------------------------------
   Tags row
   -------------------------------------------------------------------------- */
.mtfe-sp-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
}

.mtfe-sp-tag {
    display: inline-block;
    padding: 6px 16px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    font-size: 0.625rem;         /* 10px */
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 600;
    color: #ffffff;
    line-height: 1;
    /* Glass blur — graceful degradation if unsupported */
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

/* --------------------------------------------------------------------------
   Description
   -------------------------------------------------------------------------- */
.mtfe-sp-description {
    margin: 0;
    font-size: 1.0625rem;        /* 17px */
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 300;
    max-width: 580px;
}

/* --------------------------------------------------------------------------
   Button
   -------------------------------------------------------------------------- */
.mtfe-sp-btn {
    display: inline-block;
    margin-top: 24px;
    padding: 12px 28px;
    background-color: rgba(255, 255, 255, 0.15);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.mtfe-sp-btn:hover {
    background-color: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-2px);
}

.mtfe-sp-btn:active {
    transform: translateY(0);
}

/* --------------------------------------------------------------------------
   Progress indicator (bottom-right corner)
   -------------------------------------------------------------------------- */
.mtfe-sp-progress {
    position: absolute;
    bottom: 48px;
    right: 48px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.mtfe-sp-progress-counter {
    font-size: 0.5625rem;        /* 9px */
    font-family: 'Courier New', Courier, monospace;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1;
}

.mtfe-sp-progress-bar {
    width: 128px;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.12);
    position: relative;
    overflow: hidden;
}

.mtfe-sp-progress-fill {
    position: absolute;
    inset: 0;
    background-color: #ffffff;
    transform: scaleX(0);
    transform-origin: left center;
    /* JS will update this inline; CSS transition smooths it */
    transition: transform 0.08s linear;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
    .mtfe-sp-content {
        padding-left: 48px;
        padding-right: 48px;
    }
}

@media (max-width: 767px) {
    .mtfe-sp-content {
        padding-left: 24px;
        padding-right: 24px;
        justify-content: flex-end;
        padding-bottom: 80px;
    }

    .mtfe-sp-title {
        font-size: clamp(2.5rem, 12vw, 5rem);
        line-height: 0.9;
    }

    .mtfe-sp-progress {
        bottom: 24px;
        right: 24px;
    }

    .mtfe-sp-progress-bar {
        width: 80px;
    }

    .mtfe-sp-label {
        margin-bottom: 14px;
    }

    .mtfe-sp-tags {
        gap: 8px;
        margin-bottom: 20px;
    }

    .mtfe-sp-description {
        font-size: 0.9375rem;
    }

    /* Center alignment override on mobile */
    .mtfe-sp-content.mtfe-sp-align-center .mtfe-sp-content-inner,
    .mtfe-sp-content.mtfe-sp-align-right .mtfe-sp-content-inner {
        margin-left: 0;
        text-align: left;
    }

    .mtfe-sp-content.mtfe-sp-align-center .mtfe-sp-tags,
    .mtfe-sp-content.mtfe-sp-align-right .mtfe-sp-tags {
        justify-content: flex-start;
    }

    .mtfe-sp-content.mtfe-sp-align-center .mtfe-sp-label,
    .mtfe-sp-content.mtfe-sp-align-right .mtfe-sp-label {
        justify-content: flex-start;
    }
}
