/* ============================================
   CSF Timeline — Frontend Styles
   ============================================ */

::-moz-selection { color: #092539; background: #dfa903; }
::selection      { color: #092539; background: #dfa903; }

/* ── Section wrapper ── */
.timeline {
    position: relative;
    padding: 100px 0;
    text-align: center;
}

/* ── Vertical centre line ── */
.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    margin-left: 0px;
    height: 100%;
    width: 1px;
    background: #dddddd;
    z-index: -2;
}

/* ── Rows ── */
.timeline .row {
    margin-bottom: 50px;
}
@media only screen and (min-width: 768px) {
    .timeline .row {
        margin-bottom: 150px;
    }
}

/* ── Image block ── */
.timeline .country-block {
    padding: 50px 0;
    font-size: 3rem;
    text-transform: uppercase;
    color: #fff;
    transition: all 0.5s;
    position: relative;
    height: 350px;
}

/* Background image <i> element */
.timeline .country-block i {
    content: '';
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    transition: background-size 0.3s;
    font-style: normal;
    display: block;
}

/* ── Desktop layout ── */
@media only screen and (min-width: 768px) {
    .timeline .country-block {
        width: 48%;
        margin-right: 2%;
    }
    .timeline .country-block.reverse {
        margin-left: 2%;
        margin-right: 0;
    }
    .timeline .country-block.reverse::before,
    .timeline .country-block.reverse::after {
        left: -1px;
        right: auto;
        transform-origin: 0 100%;
    }
}

/* ── Links ── */
.timeline a:hover,
.timeline a:focus {
    text-decoration: none;
}

/* ── Date block ── */
.timeline .date-block > div {
    position: relative;
    background-color: #fff;
    padding: 0;
    display: inline-block;
    margin-top: 15px;
    font-size: 50px;
    line-height: 45px;
    margin-bottom: 20px;
    font-weight: bold;
}
@media only screen and (min-width: 768px) {
    .timeline .date-block > div {
        margin-top: 50px;
    }
}

/* ── Horizontal connector line ── */
.timeline .date-block::after {
    content: '';
    position: absolute;
    top: 70px;
    left: 0;
    width: 90px;
    height: 1px;
    background: #dddddd;
    z-index: -1;
}

/* ── Reverse alignment ── */
.date-block.reverse {
    text-align: right;
    padding-right: 25px;
}
.timeline .date-block.reverse::before {
    right: -10px;
    left: auto;
}
.timeline .date-block.reverse::after {
    right: 0;
    left: auto;
}

/* ── Normal alignment ── */
.date-block.normal-b {
    text-align: left;
    padding-left: 25px;
}

/* ============================================
   Container widths
   ============================================ */
@media (min-width: 1200px) {
    .csf-bs-grid .container {
        width: 1170px;
    }
}
@media (min-width: 1280px) and (max-width: 1500px) {
    .timeline .container {
        width: 1050px;
    }
}
@media (min-width: 1024px) and (max-width: 1250px) {
    .timeline .container {
        width: 900px;
    }
}

/* ============================================
   Responsive — Tablet (768px – 1024px)
   ============================================ */
@media (max-width: 1024px) and (min-width: 769px) {
    .csf-bs-grid .container {
        width: 720px;
    }
    .timeline .date-block > div {
        font-size: 40px !important;
        line-height: 45px;
    }
    .timeline .row {
        margin-bottom: 50px !important;
    }
    .timeline .country-block {
        height: 230px !important;
    }
}

/* ============================================
   Responsive — Mobile (max 580px)
   ============================================ */
@media only screen and (max-width: 580px) {

    .timeline {
        position: relative;
        padding: 50px 0;
        text-align: center;
    }

    /* Shift vertical line to far left */
    .timeline::before {
        left: 0;
        margin-left: 0px;
    }

    .timeline .country-block {
        height: 205px;
        margin-left: 50px;
    }

    .timeline .row {
        margin-bottom: 40px;
    }

    .timeline .date-block > div {
        font-size: 35px;
        line-height: 35px;
    }

    .timeline .date-block::after {
        top: 30px;
        left: 0;
        width: 30px;
    }

    .timeline .date-block.reverse::after {
        right: auto;
        left: 0;
    }

    .date-block.normal-b {
        text-align: left;
        padding-left: 50px;
    }

    .date-block.reverse {
        text-align: left;
        padding-right: 0px;
        padding-left: 50px;
    }
}