/**
 * HireHop Timeline frontend.
 *
 * Desktop:
 * alternating left / right cards.
 *
 * Mobile:
 * one-sided vertical Timeline.
 */


/* ==========================================================
   Timeline wrapper
   ========================================================== */

.hh-timeline {
    position: relative;

    width: 100%;
    max-width: 1280px;

    margin: 0 auto;

    padding: 30px 0 50px;

    box-sizing: border-box;
}

.hh-timeline *,
.hh-timeline *::before,
.hh-timeline *::after {
    box-sizing: border-box;
}


/* ==========================================================
   Central track
   ========================================================== */

.hh-timeline-track {
    position: absolute;

    top: 30px;
    bottom: 50px;

    left: 50%;

    width: var(--hh-timeline-line-width, 3px);

    background: var(
        --hh-timeline-line-color,
        #d7e7f2
    );

    border-radius: 999px;

    transform: translateX(-50%);
}

.hh-timeline-items {
    position: relative;
}


/* ==========================================================
   Timeline item
   ========================================================== */

.hh-timeline-item {
    position: relative;

    width: 100%;

    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        var(--hh-timeline-marker-size, 44px)
        minmax(0, 1fr);

    gap: 36px;

    align-items: start;

    margin: 0 0 54px;
}

.hh-timeline-item:last-child {
    margin-bottom: 0;
}


/* ==========================================================
   Marker
   ========================================================== */

.hh-timeline-marker-wrap {
    grid-column: 2;

    position: relative;

    z-index: 3;

    display: flex;

    justify-content: center;
}

.hh-timeline-marker {
    width: var(--hh-timeline-marker-size, 44px);
    height: var(--hh-timeline-marker-size, 44px);

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(
        --hh-timeline-item-color,
        #1e73be
    );

    border:
        var(--hh-timeline-marker-border, 4px)
        solid
        #ffffff;

    border-radius: 50%;

    color: #ffffff;

    box-shadow:
        0 0 0 1px rgba(14, 55, 107, 0.12),
        0 6px 18px rgba(10, 45, 82, 0.13);
}

.hh-timeline-marker svg {
    width: 48%;
    height: 48%;

    display: block;

    fill: currentColor;
}


/* ==========================================================
   Content position
   ========================================================== */

.hh-timeline-content-wrap {
    position: relative;

    min-width: 0;
}

.hh-timeline-item-left .hh-timeline-content-wrap {
    grid-column: 1;
    grid-row: 1;

    text-align: left;
}

.hh-timeline-item-right .hh-timeline-content-wrap {
    grid-column: 3;
    grid-row: 1;

    text-align: left;
}


/* ==========================================================
   Date
   ========================================================== */

.hh-timeline-date {
    margin: 0 0 10px;

    color: var(
        --hh-timeline-date-color,
        #1e4d92
    );

    font-size: 13px;
    line-height: 1.3;

    font-weight: 800;

    letter-spacing: 0.055em;

    text-transform: uppercase;
}


/* ==========================================================
   Card
   ========================================================== */

.hh-timeline-card {
    position: relative;

    overflow: visible;

    background: var(
        --hh-timeline-card-background,
        #ffffff
    );

    border:
        1px
        solid
        var(
            --hh-timeline-card-border,
            #dceaf4
        );

    border-radius:
        var(
            --hh-timeline-card-radius,
            20px
        );
}

.hh-timeline-has-shadow .hh-timeline-card {
    box-shadow:
        0 15px 42px
        rgba(10, 45, 82, 0.08);
}


/* ==========================================================
   Connector arrow
   ========================================================== */

.hh-timeline-card::before {
    content: "";

    position: absolute;

    top: 18px;

    width: 14px;
    height: 14px;

    background: var(
        --hh-timeline-card-background,
        #ffffff
    );

    border-top:
        1px
        solid
        var(
            --hh-timeline-card-border,
            #dceaf4
        );

    border-right:
        1px
        solid
        var(
            --hh-timeline-card-border,
            #dceaf4
        );

    z-index: 2;
}

.hh-timeline-item-left .hh-timeline-card::before {
    right: -8px;

    transform: rotate(45deg);
}

.hh-timeline-item-right .hh-timeline-card::before {
    left: -8px;

    transform: rotate(-135deg);
}


/* ==========================================================
   Image
   ========================================================== */

.hh-timeline-image {
    position: relative;

    width: 100%;

    overflow: hidden;

    background: #f2f7fa;

    border-radius:
        var(--hh-timeline-card-radius, 20px)
        var(--hh-timeline-card-radius, 20px)
        0
        0;
}

.hh-timeline-card-image {
    display: block;

    width: 100%;
    height: auto;

    max-height: 420px;

    object-fit: cover;
}


/* ==========================================================
   Card body
   ========================================================== */

.hh-timeline-card-body {
    padding: 26px 28px 28px;
}


/* ==========================================================
   Title
   ========================================================== */

.hh-timeline-title {
    margin: 0 0 14px;

    color: var(
        --hh-timeline-title-color,
        #0e376b
    );

    font-size: clamp(
        20px,
        2vw,
        27px
    );

    line-height: 1.18;

    font-weight: 800;
}


/* ==========================================================
   Content
   ========================================================== */

.hh-timeline-content {
    color: var(
        --hh-timeline-text-color,
        #5f6f82
    );

    font-size: 15px;
    line-height: 1.75;
}

.hh-timeline-content > :first-child {
    margin-top: 0;
}

.hh-timeline-content > :last-child {
    margin-bottom: 0;
}

.hh-timeline-content p {
    margin-top: 0;
    margin-bottom: 15px;
}

.hh-timeline-content ul,
.hh-timeline-content ol {
    margin-top: 14px;
    margin-bottom: 14px;
    padding-left: 22px;
}

.hh-timeline-content img {
    max-width: 100%;
    height: auto;
}

.hh-timeline-content iframe,
.hh-timeline-content video {
    max-width: 100%;
}

.hh-timeline-content a {
    color:
        var(
            --hh-timeline-item-color,
            #1e73be
        );

    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}


/* ==========================================================
   Read More
   ========================================================== */

.hh-timeline-action {
    margin-top: 22px;
}

.hh-timeline-button {
    min-height: 43px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 10px 19px;

    background:
        var(
            --hh-timeline-item-color,
            #1e73be
        );

    border:
        1px
        solid
        var(
            --hh-timeline-item-color,
            #1e73be
        );

    border-radius: 10px;

    color: #ffffff !important;

    font-size: 14px;
    line-height: 1.2;

    font-weight: 750;

    text-decoration: none !important;

    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

.hh-timeline-button:hover {
    color: #ffffff !important;

    opacity: 0.9;

    transform: translateY(-1px);
}


/* ==========================================================
   Modern style
   ========================================================== */

.hh-timeline-style-modern .hh-timeline-card {
    border-top:
        4px
        solid
        var(
            --hh-timeline-item-color,
            #1e73be
        );
}


/* ==========================================================
   Minimal style
   ========================================================== */

.hh-timeline-style-minimal .hh-timeline-card {
    border-color: transparent;

    background: transparent;

    border-radius: 0;

    box-shadow: none !important;
}

.hh-timeline-style-minimal .hh-timeline-card-body {
    padding-left: 0;
    padding-right: 0;
}

.hh-timeline-style-minimal .hh-timeline-card::before {
    display: none;
}

.hh-timeline-style-minimal .hh-timeline-image {
    border-radius:
        var(
            --hh-timeline-card-radius,
            20px
        );
}


/* ==========================================================
   Bordered style
   ========================================================== */

.hh-timeline-style-bordered .hh-timeline-card {
    border-width: 2px;

    border-color:
        var(
            --hh-timeline-item-color,
            #1e73be
        );

    box-shadow: none;
}


/* ==========================================================
   Tablet
   ========================================================== */

@media (max-width: 1024px) {

    .hh-timeline {
        padding-left: 20px;
        padding-right: 20px;
    }

    .hh-timeline-item {
        gap: 26px;
    }

    .hh-timeline-card-body {
        padding: 22px 22px 24px;
    }

}


/* ==========================================================
   Mobile
   ========================================================== */

@media (max-width: 767px) {

    .hh-timeline {
        padding:
            20px
            16px
            35px;
    }

    /**
     * Vertical line moves to left.
     */
    .hh-timeline-track {
        left:
            calc(
                16px +
                (
                    var(
                        --hh-timeline-marker-size,
                        44px
                    ) / 2
                )
            );

        top: 20px;
        bottom: 35px;
    }

    /**
     * All cards go to right.
     */
    .hh-timeline-item {
        grid-template-columns:
            var(
                --hh-timeline-marker-size,
                44px
            )
            minmax(0, 1fr);

        column-gap: 18px;

        margin-bottom: 38px;
    }

    .hh-timeline-marker-wrap {
        grid-column: 1;
        grid-row: 1;

        justify-content: center;
    }

    .hh-timeline-item-left .hh-timeline-content-wrap,
    .hh-timeline-item-right .hh-timeline-content-wrap {
        grid-column: 2;
        grid-row: 1;

        text-align: left;
    }

    /**
     * Arrow always points left.
     */
    .hh-timeline-item-left .hh-timeline-card::before,
    .hh-timeline-item-right .hh-timeline-card::before {
        left: -8px;
        right: auto;

        transform: rotate(-135deg);
    }

    .hh-timeline-date {
        margin-bottom: 8px;

        font-size: 11px;
    }

    .hh-timeline-card-body {
        padding: 19px 18px 21px;
    }

    .hh-timeline-title {
        margin-bottom: 10px;

        font-size: 19px;
    }

    .hh-timeline-content {
        font-size: 14px;
        line-height: 1.65;
    }

    .hh-timeline-card-image {
        max-height: 320px;
    }

}


/* ==========================================================
   Small mobile
   ========================================================== */

@media (max-width: 480px) {

    .hh-timeline {
        padding-left: 10px;
        padding-right: 10px;
    }

    .hh-timeline-track {
        left:
            calc(
                10px +
                (
                    var(
                        --hh-timeline-marker-size,
                        44px
                    ) / 2
                )
            );
    }

    .hh-timeline-item {
        column-gap: 13px;
    }

    .hh-timeline-card-body {
        padding: 17px 15px 19px;
    }

    .hh-timeline-button {
        width: 100%;
    }

}

/**
 * ==========================================================
 * Timeline entrance animations
 * ==========================================================
 *
 * Progressive enhancement:
 *
 * Timeline items remain visible by default.
 *
 * They are only placed into their hidden animation state
 * after timeline.js adds:
 *
 * .hh-timeline-animations-ready
 *
 * Therefore if JavaScript fails, content never disappears.
 */


/* ----------------------------------------------------------
   Desktop entrance states
   ---------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {

    .hh-timeline-animations-enabled
    .hh-timeline-item {
        will-change:
            opacity,
            transform;
    }


    /**
     * Hidden state is activated only after JS is ready.
     */
    .hh-timeline-animations-enabled.hh-timeline-animations-ready
    .hh-timeline-item {
        opacity: 0;

        transition:
            opacity 0.62s ease,
            transform 0.62s
                cubic-bezier(
                    0.22,
                    1,
                    0.36,
                    1
                );

        transition-delay:
            var(
                --hh-timeline-animation-delay,
                0ms
            );
    }


    /**
     * Left side enters from left.
     */
    .hh-timeline-animations-enabled.hh-timeline-animations-ready
    .hh-timeline-item-left {
        transform:
            translate3d(
                -46px,
                0,
                0
            );
    }


    /**
     * Right side enters from right.
     */
    .hh-timeline-animations-enabled.hh-timeline-animations-ready
    .hh-timeline-item-right {
        transform:
            translate3d(
                46px,
                0,
                0
            );
    }


    /**
     * Visible state.
     */
    .hh-timeline-animations-enabled.hh-timeline-animations-ready
    .hh-timeline-item.is-hh-timeline-visible {
        opacity: 1;

        transform:
            translate3d(
                0,
                0,
                0
            );
    }

}


/* ----------------------------------------------------------
   Mobile animation
   ---------------------------------------------------------- */

@media
    (max-width: 767px)
    and
    (prefers-reduced-motion: no-preference) {

    /**
     * Mobile should not slide horizontally because everything
     * appears on one side of the Timeline.
     */
    .hh-timeline-animations-enabled.hh-timeline-animations-ready
    .hh-timeline-item-left,
    .hh-timeline-animations-enabled.hh-timeline-animations-ready
    .hh-timeline-item-right {
        transform:
            translate3d(
                0,
                26px,
                0
            );
    }

    .hh-timeline-animations-enabled.hh-timeline-animations-ready
    .hh-timeline-item.is-hh-timeline-visible {
        transform:
            translate3d(
                0,
                0,
                0
            );
    }

}


/* ----------------------------------------------------------
   Reduced motion
   ---------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {

    .hh-timeline-item {
        opacity: 1 !important;

        transform: none !important;

        transition: none !important;

        animation: none !important;
    }

}

/**
 * ==========================================================
 * Legacy / long-content protection
 * ==========================================================
 */

.hh-timeline-content {
    min-width: 0;

    overflow-wrap: anywhere;
    word-break: normal;
}

.hh-timeline-content img {
    max-width: 100%;
    height: auto;
}

.hh-timeline-content figure {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.hh-timeline-content table {
    width: 100%;
    max-width: 100%;

    border-collapse: collapse;
}

.hh-timeline-content pre {
    max-width: 100%;

    overflow-x: auto;

    white-space: pre;
}

.hh-timeline-content code {
    overflow-wrap: anywhere;
}

.hh-timeline-content iframe,
.hh-timeline-content video,
.hh-timeline-content embed,
.hh-timeline-content object {
    max-width: 100%;
}

@media (max-width: 767px) {

    .hh-timeline-content table {
        display: block;

        overflow-x: auto;

        -webkit-overflow-scrolling: touch;
    }

}