/* ═══════════════════════════════════════════════════════
   Remote Hive — About Us: Timeline Section
   Snake-path desktop + vertical-stack mobile
   ═══════════════════════════════════════════════════════ */

/* ── Layout Constants (mirrored in JS) ── */
:root {
    --rh-timeline-circle:       130px;
    --rh-timeline-year-h:        56px;
    --rh-timeline-desc-h:       110px;
    --rh-timeline-row-h:        296px;   /* year + circle + desc */
    --rh-timeline-gap:           52px;
    --rh-timeline-total-h:      992px;   /* 3 rows + 2 gaps */
    --rh-timeline-curve-r:       44px;
    --rh-timeline-line-w:         6px;

    /* Customizer-overridable colors */
    --rh-timeline-line-color:    #2478c7;
    --rh-timeline-accent:        #2EC4B6;
    --rh-timeline-textbox-bg:    #0c2340;
    --rh-timeline-year-color:    #2478c7;
    --rh-timeline-circle-border: #2478c7;
    --rh-timeline-bg:            #ffffff;
}

/* ── Section ── */
.rh-timeline {
    background: var(--rh-timeline-bg);
    padding: 80px 0;
    font-family: 'DM Sans', sans-serif;
    width: 100%;
    overflow: hidden;
}

.rh-timeline-outer {
    max-width: 1060px;
    margin: 0 auto;
    padding: 0 40px;
}

/* ── Label ── */
.rh-timeline-label {
    font-family: 'Sora', sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 4.5px;
    color: #8b95a5;
    text-align: center;
    margin: 0 0 14px;
}

/* ── Title ── */
.rh-timeline-title {
    font-family: 'Sora', sans-serif;
    font-size: 48px;
    font-weight: 800;
    line-height: 1.2;
    color: #0c2340;
    text-align: center;
    margin: 0 0 56px;
}

.rh-timeline-title em {
    color: var(--rh-timeline-accent);
    font-style: italic;
}


/* ═══════════════════════════════════════
   DESKTOP TRACK
   ═══════════════════════════════════════ */
.rh-timeline-dk-track {
    position: relative;
    height: var(--rh-timeline-total-h);
    overflow: visible;
}

/* ── SVG line ── */
.rh-timeline-dk-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: visible;
}

.rh-timeline-dk-path {
    fill: none;
    stroke: var(--rh-timeline-line-color);
    stroke-width: var(--rh-timeline-line-w);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 5000;
    stroke-dashoffset: 5000;
    transition: stroke-dashoffset 2.8s ease-out;
}

.rh-timeline-dk-track.rh-timeline--visible .rh-timeline-dk-path {
    stroke-dashoffset: 0;
}

/* ── Rows ── */
.rh-timeline-dk-row {
    position: absolute;
    left: 0;
    right: 0;
    height: var(--rh-timeline-row-h);
    display: flex;
    align-items: flex-start;
    z-index: 2;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

.rh-timeline-dk-track.rh-timeline--visible .rh-timeline-dk-r1 {
    opacity: 1;
    transform: none;
    transition-delay: 0.2s;
}
.rh-timeline-dk-track.rh-timeline--visible .rh-timeline-dk-r2 {
    opacity: 1;
    transform: none;
    transition-delay: 0.6s;
}
.rh-timeline-dk-track.rh-timeline--visible .rh-timeline-dk-r3 {
    opacity: 1;
    transform: none;
    transition-delay: 1s;
}

.rh-timeline-dk-r1 {
    top: 0;
    justify-content: space-between;
}
.rh-timeline-dk-r2 {
    top: calc(var(--rh-timeline-row-h) + var(--rh-timeline-gap));
    justify-content: space-between;
    flex-direction: row-reverse;
}
.rh-timeline-dk-r3 {
    top: calc((var(--rh-timeline-row-h) + var(--rh-timeline-gap)) * 2);
    justify-content: flex-start;
}

/* ── Milestone ── */
.rh-timeline-milestone {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 200px;
    z-index: 3;
}

.rh-timeline-year {
    font-family: 'Sora', sans-serif;
    font-size: 30px;
    font-weight: 800;
    color: var(--rh-timeline-year-color);
    line-height: 1;
    height: 40px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 16px;
    margin: 0;
}

.rh-timeline-circle {
    width: var(--rh-timeline-circle);
    height: var(--rh-timeline-circle);
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 5px solid var(--rh-timeline-circle-border);
    box-shadow: 0 6px 22px rgba(36, 120, 199, 0.1);
    overflow: hidden;
    position: relative;
    z-index: 5;
    flex-shrink: 0;
}

.rh-timeline-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rh-timeline-placeholder {
    color: #0c2340;
    opacity: 0.14;
}

.rh-timeline-desc {
    font-size: 13px;
    line-height: 1.55;
    color: #5a6577;
    max-width: 200px;
    font-weight: 500;
    margin: 14px 0 0;
}

/* ── Textbox ── */
.rh-timeline-textbox {
    background: var(--rh-timeline-textbox-bg);
    color: #fff;
    border-radius: 16px;
    padding: 26px 24px;
    z-index: 3;
    box-shadow: 0 8px 30px rgba(12, 35, 64, 0.18);
    max-width: 260px;
    width: 250px;
    align-self: center;
}

.rh-timeline-textbox p {
    font-size: 14px;
    line-height: 1.7;
    font-weight: 500;
    margin: 0;
}

.rh-timeline-textbox b {
    color: var(--rh-timeline-accent);
    font-weight: 600;
}

/* Row 3 alignment */
.rh-timeline-dk-r3 .rh-timeline-milestone {
    margin-right: auto;
}
.rh-timeline-dk-r3 .rh-timeline-textbox {
    margin-left: auto;
}


/* ═══════════════════════════════════════
   MOBILE LAYOUT
   ═══════════════════════════════════════ */
.rh-timeline-mob-wrap {
    display: none;
    position: relative;
    overflow: hidden;
}

/* ── Mobile SVG ── */
.rh-timeline-mob-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: visible;
}

.rh-timeline-mob-path {
    fill: none;
    stroke: var(--rh-timeline-line-color);
    stroke-width: 5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 8000;
    stroke-dashoffset: 8000;
    transition: stroke-dashoffset 3.5s ease-out;
}

.rh-timeline-mob-wrap.rh-timeline--visible .rh-timeline-mob-path {
    stroke-dashoffset: 0;
}

/* ── Mobile items ── */
.rh-timeline-mob-item {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 28px 12px;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.rh-timeline-mob-wrap.rh-timeline--visible .rh-timeline-mob-item {
    opacity: 1;
    transform: none;
}

.rh-timeline-mob-year {
    font-family: 'Sora', sans-serif;
    font-size: 26px;
    font-weight: 800;
    color: var(--rh-timeline-year-color);
    line-height: 1;
    margin: 0 0 12px;
}

.rh-timeline-mob-circle {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 5px solid var(--rh-timeline-circle-border);
    box-shadow: 0 5px 18px rgba(36, 120, 199, 0.1);
    overflow: hidden;
    position: relative;
    z-index: 5;
    flex-shrink: 0;
}

.rh-timeline-mob-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rh-timeline-mob-desc {
    font-size: 13.5px;
    line-height: 1.55;
    color: #5a6577;
    font-weight: 500;
    margin: 12px 0 0;
    max-width: 280px;
}

/* ── Mobile textbox ── */
.rh-timeline-mob-box {
    position: relative;
    z-index: 3;
    background: var(--rh-timeline-textbox-bg);
    color: #fff;
    border-radius: 14px;
    padding: 24px 22px;
    margin: 16px 0;
    box-shadow: 0 8px 28px rgba(12, 35, 64, 0.18);
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.rh-timeline-mob-wrap.rh-timeline--visible .rh-timeline-mob-box {
    opacity: 1;
    transform: none;
}

.rh-timeline-mob-box p {
    font-size: 14px;
    line-height: 1.75;
    font-weight: 500;
    margin: 0;
}

.rh-timeline-mob-box b {
    color: var(--rh-timeline-accent);
    font-weight: 600;
}

/* ── Mobile stagger delays ── */
.rh-timeline-mob-wrap.rh-timeline--visible > :nth-child(2)  { transition-delay: 0.05s; }
.rh-timeline-mob-wrap.rh-timeline--visible > :nth-child(3)  { transition-delay: 0.15s; }
.rh-timeline-mob-wrap.rh-timeline--visible > :nth-child(4)  { transition-delay: 0.25s; }
.rh-timeline-mob-wrap.rh-timeline--visible > :nth-child(5)  { transition-delay: 0.35s; }
.rh-timeline-mob-wrap.rh-timeline--visible > :nth-child(6)  { transition-delay: 0.45s; }
.rh-timeline-mob-wrap.rh-timeline--visible > :nth-child(7)  { transition-delay: 0.55s; }
.rh-timeline-mob-wrap.rh-timeline--visible > :nth-child(8)  { transition-delay: 0.65s; }
.rh-timeline-mob-wrap.rh-timeline--visible > :nth-child(9)  { transition-delay: 0.75s; }


/* ═══════════════════════════════════════
   RESPONSIVE — Desktop (1280px+) is base
   ═══════════════════════════════════════ */

/* Laptop: 1024–1279px */
@media (max-width: 1279px) {
    .rh-timeline-title {
        font-size: 42px;
    }
    .rh-timeline-label {
        font-size: 13px;
    }
    .rh-timeline-outer {
        padding: 0 32px;
    }
    .rh-timeline-milestone {
        width: 180px;
    }
    .rh-timeline-year {
        font-size: 26px;
    }
    .rh-timeline-desc {
        font-size: 12.5px;
        max-width: 175px;
    }
    .rh-timeline-textbox {
        width: 220px;
        max-width: 230px;
        padding: 22px 20px;
    }
    .rh-timeline-textbox p {
        font-size: 13px;
    }
}

/* Tablet: 768–1023px */
@media (max-width: 1023px) {
    .rh-timeline {
        padding: 64px 0;
    }
    .rh-timeline-title {
        font-size: 36px;
        margin-bottom: 48px;
    }
    .rh-timeline-label {
        font-size: 13px;
    }
    .rh-timeline-milestone {
        width: 155px;
    }
    .rh-timeline-year {
        font-size: 23px;
    }
    .rh-timeline-desc {
        font-size: 12px;
        max-width: 150px;
    }
    .rh-timeline-textbox {
        width: 185px;
        max-width: 195px;
        padding: 20px 18px;
    }
    .rh-timeline-textbox p {
        font-size: 12.5px;
    }
}

/* Mobile switch: < 768px */
@media (max-width: 767px) {
    .rh-timeline-dk-track {
        display: none !important;
    }
    .rh-timeline-mob-wrap {
        display: block !important;
    }
    .rh-timeline {
        padding: 48px 0;
    }
    .rh-timeline-outer {
        padding: 0 24px;
    }
    .rh-timeline-title {
        font-size: 30px;
        margin-bottom: 36px;
    }
    .rh-timeline-label {
        font-size: 12px;
        letter-spacing: 3px;
    }
}

/* Mobile small: < 480px */
@media (max-width: 479px) {
    .rh-timeline-title {
        font-size: 26px;
        margin-bottom: 28px;
    }
    .rh-timeline-outer {
        padding: 0 16px;
    }
    .rh-timeline-mob-circle {
        width: 90px;
        height: 90px;
        border-width: 4px;
    }
    .rh-timeline-mob-year {
        font-size: 22px;
    }
    .rh-timeline-mob-desc {
        font-size: 12.5px;
        max-width: 230px;
    }
    .rh-timeline-mob-box {
        padding: 20px 16px;
    }
    .rh-timeline-mob-box p {
        font-size: 13px;
    }
}