/* ==========================================================
   Hi-Life Story — Horizontal Wave Timeline (infinite carousel)
   ========================================================== */

.hilife-timeline {
    width: 100% !important;
}

.hilife-timeline-scroller {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 80px 20px !important;
    box-sizing: border-box !important;
    background:
        radial-gradient(ellipse 60% 70% at 50% 45%, rgba(0, 174, 255, 0.12), transparent 65%),
        transparent !important;
}

.hilife-timeline-header {
    text-align: center !important;
    margin-bottom: 60px !important;
}

.hilife-timeline-heading {
    font-family: inherit !important;
    font-size: 36px !important;
    font-weight: 700 !important;
    color: #000000 !important;
    margin: 0 !important;
}

/* ---------- Viewport ---------- */
.hilife-timeline-viewport {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    overscroll-behavior-x: contain !important;
    scroll-behavior: smooth !important;
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
    display: flex !important;
    align-items: center !important;
    -webkit-mask-image: linear-gradient(
        to right,
        transparent 0,
        #000 60px,
        #000 calc(100% - 60px),
        transparent 100%
    ) !important;
    mask-image: linear-gradient(
        to right,
        transparent 0,
        #000 60px,
        #000 calc(100% - 60px),
        transparent 100%
    ) !important;
}

.hilife-timeline-viewport::-webkit-scrollbar {
    display: none !important;
}

/* ---------- Track ---------- */
.hilife-timeline-track {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    gap: 100px !important;
    width: max-content !important;
    padding: 60px 120px !important;
}

.hilife-timeline-svg {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    pointer-events: none !important;
    z-index: 0 !important;
}

/* ---------- Wave path (static — no glow) ---------- */
.hilife-timeline-path {
    stroke: #00AEFF !important;
    stroke-width: 2 !important;
    stroke-linecap: round !important;
    opacity: 0.45 !important;
}

/* ---------- Item ---------- */
.timeline-item {
    position: relative !important;
    z-index: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    flex: none !important;
    width: 220px !important;
}

.timeline-item.is-up { transform: translateY(-50px) !important; }
.timeline-item.is-down { transform: translateY(50px) !important; }

/* ---------- Node: number badge on the wave line ---------- */
.timeline-node {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 48px !important;
    height: 48px !important;
    order: 2 !important;
}

.timeline-item.is-down .timeline-node { order: 0 !important; }

.timeline-node-dot {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 46px !important;
    height: 46px !important;
    box-sizing: border-box !important;
    border-radius: 50% !important;
    background: #00AEFF !important;
    border: 3px solid #ffffff !important;
    box-shadow: 0 0 0 1px #00AEFF, 0 4px 12px rgba(0, 174, 255, 0.35) !important;
    color: #ffffff !important;
    font-family: inherit !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
}

.timeline-content {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    order: 0 !important;
    margin-bottom: 16px !important;
}

.timeline-item.is-down .timeline-content {
    order: 2 !important;
    margin-bottom: 0 !important;
    margin-top: 16px !important;
}

/* Fixed-size image block — locked dimensions so varying source
   resolutions (logo vs. apartment photo) never affect card layout */
.timeline-image {
    width: 88px !important;
    height: 88px !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    background: #F2F2F2 !important;
    margin-bottom: 14px !important;
    flex: none !important;
}

.timeline-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

.timeline-name {
    font-family: inherit !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #000000 !important;
    margin: 0 0 6px 0 !important;
}

.timeline-location {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    font-family: inherit !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    color: #888888 !important;
    margin: 0 !important;
}

/* ---------- Prev/Next text nav — visible on every breakpoint ---------- */
.hilife-nav-row {
    display: flex !important;
    justify-content: center !important;
    gap: 16px !important;
    margin-top: 32px !important;
}

.hilife-nav {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 10px 24px !important;
    border-radius: 999px !important;
    border: 1px solid #F2F2F2 !important;
    background: #ffffff !important;
    color: #000000 !important;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease !important;
}

.hilife-nav:hover {
    background: #00AEFF !important;
    border-color: #00AEFF !important;
    color: #ffffff !important;
}

/* ---------- Tablet/mobile sizing ---------- */
@media (max-width: 1024px) {
    .hilife-timeline-track {
        gap: 60px !important;
        padding: 60px 40px !important;
    }

    .timeline-item.is-up { transform: translateY(-30px) !important; }
    .timeline-item.is-down { transform: translateY(30px) !important; }

    .hilife-timeline-viewport {
        -webkit-mask-image: linear-gradient(
            to right,
            transparent 0,
            #000 30px,
            #000 calc(100% - 30px),
            transparent 100%
        ) !important;
        mask-image: linear-gradient(
            to right,
            transparent 0,
            #000 30px,
            #000 calc(100% - 30px),
            transparent 100%
        ) !important;
    }
}

@media (max-width: 767px) {
    .hilife-timeline-scroller {
        padding: 60px 12px !important;
    }

    .hilife-timeline-heading {
        font-size: 26px !important;
    }

    .hilife-timeline-header {
        margin-bottom: 40px !important;
    }

    .hilife-timeline-track {
        gap: 40px !important;
        padding: 40px 24px !important;
    }

    .timeline-item {
        width: 160px !important;
    }

    .timeline-item.is-up { transform: translateY(-20px) !important; }
    .timeline-item.is-down { transform: translateY(20px) !important; }

    .timeline-node {
        width: 40px !important;
        height: 40px !important;
    }

    .timeline-node-dot {
        width: 38px !important;
        height: 38px !important;
        font-size: 13px !important;
    }

    .timeline-image {
        width: 64px !important;
        height: 64px !important;
        border-radius: 12px !important;
    }

    .timeline-name { font-size: 14px !important; }

    .hilife-timeline-viewport {
        -webkit-mask-image: linear-gradient(
            to right,
            transparent 0,
            #000 20px,
            #000 calc(100% - 20px),
            transparent 100%
        ) !important;
        mask-image: linear-gradient(
            to right,
            transparent 0,
            #000 20px,
            #000 calc(100% - 20px),
            transparent 100%
        ) !important;
    }
}