/* =========================================================
   XT Process Steps – Spatial/Glass 2026 UX/UI
   ========================================================= */

:root {
    --xt-step-accent: #2B9BFF;
    --xt-glass-bg: rgba(255, 255, 255, 0.03);
    --xt-glass-border: rgba(255, 255, 255, 0.08);
}

.xt-process-steps {
    position: relative;
    padding: 80px 0;
    max-width: 1100px;
    margin: 0 auto;
}

/* --- The Connected Rail (Centered for Alternating) --- */
.xt-process-steps__rail {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, 
        rgba(43, 155, 255, 0) 0%, 
        var(--xt-step-accent) 15%, 
        var(--xt-step-accent) 85%, 
        rgba(43, 155, 255, 0) 100%
    );
    opacity: 0.15;
    z-index: 1;
}

.xt-process-steps__container {
    display: flex;
    flex-direction: column;
    gap: 120px;
    position: relative;
    z-index: 2;
}

/* --- Step Wrapper (Alternating) --- */
.xt-step-card-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    position: relative;
    opacity: 0;
    transform: translateY(40px);
    transition: all 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.xt-step-card-wrapper.xt-step--even {
    flex-direction: row-reverse;
}

.xt-step-card-wrapper.xt-is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Visual Side (Number + Image) --- */
.xt-step-visual {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.xt-step-image-container {
    width: 100%;
    max-width: 420px;
    aspect-ratio: 16 / 10;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 12px;
    backdrop-filter: blur(10px);
    overflow: hidden;
    position: relative;
    z-index: 2;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.xt-step-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
    opacity: 0.85;
    transition: transform 0.8s ease, opacity 0.4s ease;
}

.xt-step-card-wrapper:hover .xt-step-image-container {
    transform: scale(1.03) rotate(1deg);
    border-color: var(--xt-step-accent);
}

.xt-step-card-wrapper:hover .xt-step-image-container img {
    transform: scale(1.05);
    opacity: 1;
}

/* --- Architectural Background Number --- */
.xt-step-number-bg {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 180px;
    font-weight: 950;
    line-height: 1;
    font-family: inherit;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.04);
    text-stroke: 1px rgba(255, 255, 255, 0.04);
    color: transparent;
    pointer-events: none;
    z-index: 1;
    font-variant-numeric: tabular-nums;
    transition: transform 0.6s ease;
}

.xt-step--even .xt-step-number-bg {
    transform: translate(-50%, -50%) rotate(2deg);
}
.xt-step--odd .xt-step-number-bg {
    transform: translate(-50%, -50%) rotate(-2deg);
}

/* --- The Glass Card --- */
.xt-step-card {
    flex: 1;
    background: var(--xt-glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--xt-glass-border);
    border-radius: 32px;
    padding: 50px;
    position: relative;
    overflow: hidden;
    z-index: 3;
    transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.xt-step-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 50% 50%, 
                rgba(43, 155, 255, 0.05) 0%, 
                transparent 70%);
    opacity: 0;
    transition: opacity 0.4s;
}

.xt-step-card:hover {
    transform: translateY(-8px);
    border-color: rgba(43, 155, 255, 0.3);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.2);
}

.xt-step-card:hover::before {
    opacity: 1;
}

/* --- Lightbox / Clickable State --- */
.xt-lightbox-trigger {
    cursor: zoom-in;
}

.xt-step-image-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 60px;
    height: 60px;
    background: rgba(43, 155, 255, 0.2);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 3;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.xt-step-image-overlay svg {
    width: 24px;
    height: 24px;
}

.xt-lightbox-trigger:hover .xt-step-image-overlay {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.xt-lightbox-trigger:hover img {
    filter: brightness(0.7) blur(2px);
}

/* --- Card Content --- */
.xt-step-card__content {
    position: relative;
    z-index: 1;
}

.xt-step-card__title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 12px;
    color: #FFFFFF;
    letter-spacing: -0.02em;
}

.xt-step-card__desc {
    font-size: 16px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 24px;
    font-weight: 500;
    max-width: 500px;
}

/* --- Technical Pill (The Spec) --- */
.xt-step-card__spec {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 6px 14px;
    border-radius: 100px;
}

.xt-step-card__spec span {
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--xt-step-accent);
    text-transform: uppercase;
}

@media (max-width: 767px) {
    .xt-process-steps {
        padding: 3rem 0;
    }

    /* Unify Rail Centering */
    .xt-process-steps__rail,
    .xt-process-steps::before {
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 1px !important;
        opacity: 0.1;
    }

    .xt-process-steps__container {
        gap: 3.5rem; /* Reduced gap between steps */
    }

    .xt-step-card-wrapper {
        flex-direction: column !important;
        align-items: center !important;
        padding: 0 1.5rem !important;
        margin-bottom: 0 !important;
        gap: 1.5rem;
        text-align: center;
    }

    /* Reset alternate styles for mobile */
    .xt-step--even, .xt-step--odd {
        flex-direction: column !important;
    }

    .xt-step-visual, .xt-step-card {
        width: 100% !important;
        max-width: 400px !important;
        margin: 0 auto !important;
        flex: none !important;
    }

    .xt-step-card {
        order: 1;
        padding: 2.5rem 1.5rem !important;
        background: rgba(255, 255, 255, 0.04);
        border-radius: 20px;
    }

    .xt-step-visual {
        order: 2;
    }

    .xt-step-image-container {
        max-width: 100%;
        border-radius: 16px;
    }

    .xt-step-card__title {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .xt-step-card__desc {
        font-size: 0.95rem;
        margin-bottom: 0;
        margin-left: auto;
        margin-right: auto;
    }

    .xt-step-number-bg {
        display: none; /* Hide huge numbers on mobile to reduce clutter and spacing */
    }

    /* Point on the centered rail */
    .xt-step-card-wrapper::after {
        left: 50% !important;
        top: -1.75rem !important;
        transform: translateX(-50%) !important;
        width: 8px;
        height: 8px;
        background: var(--xt-step-accent);
        box-shadow: 0 0 10px var(--xt-step-accent);
    }
}
