/**
 * Timeline Block Styles
 *
 * @package Hedredesign
 */

.timeline-block {
    position: relative;
}

.timeline-block-title {
    font-size: 32px;
    font-weight: 700;
    color: #00414d;
    margin-bottom: 40px;
    text-align: center;
}

.timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Timeline vertical line */
.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: #ccc;
    transform: translateX(-50%);
    z-index: 1;
}

/* Wrapper for both columns */
.timeline-wrapper {
    position: relative;
    display: flex;
    min-height: 400px;
}

/* Left Column */
.timeline-left-column {
    flex: 0 0 50%;
    padding-right: 20px;

}

/* Right Column */
.timeline-right-column {
    flex: 0 0 50%;
    padding-left: 20px;
}

/* Container around content */
.timeline-container {
    padding: 10px 0;
    position: relative;
    margin-bottom: 40px;
}

.timeline-container:last-child {
    margin-bottom: 0;
}

/* The circles on the timeline */
.timeline-container::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: #7bc792;
    border: 3px solid #ffffff;
    border-radius: 50%;
    z-index: 2;
    top: 22px;
}

/* Left container marker */
.left.timeline-container::before {
    right: -20px;
    transform: translateX(50%);
}

/* Right container marker */
.right.timeline-container::before {
    left: -20px;
    transform: translateX(-50%);
}

/* Add arrows to the left container (pointing right) */
.caret::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 22px;
    width: 0;
    z-index: 1;
    right: -10px;
    border: medium solid #f8f8f8;
    border-width: 10px 0 10px 10px;
    border-color: transparent transparent transparent #f8f8f8;
}

.left:not(:first-child) .caret::before {
    right: -10px;
    border-width: 10px 0 10px 10px;
    border-color: transparent transparent transparent #f8f8f8;
}

/* Add arrows to the right container (pointing left) */
.right:not(:first-child) .caret::before {
    left: -10px;
    border-width: 10px 10px 10px 0;
    border-color: transparent #f8f8f8 transparent transparent;
}

/* The actual content */
.timeline-container .content {
    padding: 20px 30px;
    background-color: #f8f8f8;
    position: relative;
    border-radius: 6px;
}

.timeline-container .content img {
    margin: auto;
}


.left:first-child .content {
    background-color: transparent;
    padding-right: 0;
}

.timeline-container .year {
    font-size: 30px;
    font-weight: 700;
    color: #00414d;
    text-align: center;
    margin-bottom: 10px;
    display: inline-block;
    border-radius: 0;
    width: 100%;
    box-sizing: border-box;
}

.timeline-container.left:first-child .year {
    text-align: right;
    margin-bottom: 23px;
}

.timeline-container.left:first-child .year span {

    background-color: #00414d;
    color: #ffffff;
    padding: 5px 30px;
    border-radius: 5px;
}

.timeline-container .content h4 {
    font-size: 18px;
    font-weight: 600;
    color: #00414d;
    margin-bottom: 10px;
}

.timeline-container.left:first-child .content h4 {
    text-align: right;
    font-size: 24px;
    font-weight: 700;
}

.timeline-container .content p {
    font-size: 16px;
    color: #00414d;
    line-height: 1.6;
    margin-bottom: 0;
}

.timeline-container .content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin-bottom: 15px;
}

/* Empty State */
.timeline-empty {
    text-align: center;
    padding: 40px 20px;
    color: #777;
}

/* ===================================
   Responsive Styles
   =================================== */

/* Mobile view (max-width: 767px) */
@media screen and (max-width: 767px) {
    .timeline {
        padding: 0 15px;
        max-width: 100%;
    }

    .timeline-line {
        left: 30px;
    }

    .timeline-block-title {
        font-size: 28px;
    }

    .timeline-wrapper {
        flex-direction: column;
        min-height: auto;
        margin-left: 10px;
    }

    .timeline-left-column,
    .timeline-right-column {
        flex: 1 1 100%;
        width: 100%;
        padding: 0;
    }

    .timeline-left-column {
        padding-left: 60px;
        padding-right: 15px;
    }

    .timeline-right-column {
        padding-left: 60px;
        padding-right: 15px;
    }

    .timeline-container {
        margin-bottom: 30px;
    }

    .timeline-container::before {
        left: 30px;
        right: auto;
        transform: translateX(-50%);
    }

    .left.timeline-container::before,
    .right.timeline-container::before {
        left: 30px;
        right: auto;
        transform: translateX(-50%);
    }

    .left:not(:first-child) .caret::before,
    .right:not(:first-child) .caret::before {
        left: 20px;
        right: auto;
        border-width: 10px 10px 10px 0;
        border-color: transparent #f8f8f8 transparent transparent;
    }

    /* First child special styling on mobile */
    .timeline-container.left:first-child .year {
        text-align: left;
        margin-bottom: 15px;
    }

    .timeline-container.left:first-child .content {
        padding-right: 20px;
    }

    .timeline-container.left:first-child .content h4 {
        text-align: left;
        font-size: 20px;
    }

    .timeline-container .content {
        padding: 18px 20px;
    }
}

/* Enhanced mobile styles (max-width: 768px) */
@media screen and (max-width: 768px) {}

/* Small Mobile (max-width: 480px) */
@media screen and (max-width: 480px) {
    .timeline-block-title {
        font-size: 22px;
        margin-bottom: 25px;
    }

    h1.brief {
        font-size: 30px !important;
    }

    .timeline {
        padding: 0 8px;
    }

    .timeline-line {
        left: 20px;
    }

    .timeline-left-column,
    .timeline-right-column {
        padding-left: 20px;
        padding-right: 15px;
    }

    .timeline-container::before {
        left: 20px;
        width: 12px;
        height: 12px;
        top: 20px;
    }

    .left.timeline-container::before,
    .right.timeline-container::before {
        left: -17px;
    }

    .timeline-container {
        margin-bottom: 20px;
        padding: 8px 0;
    }

    .timeline-container .content {
        padding: 12px 15px;
        border-radius: 4px;
    }

    .timeline-container .year {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .timeline-container.left:first-child .year {
        font-size: 20px;
        margin-bottom: 12px;
    }

    .timeline-container.left:first-child .year span {
        padding: 3px 15px;
        font-size: 18px;
    }

    .timeline-container .content h4 {
        font-size: 16px;
        margin-bottom: 6px;
    }

    .timeline-container.left:first-child .content h4 {
        font-size: 17px;
    }

    .timeline-container .content p {
        font-size: 14px;
        line-height: 1.4;
    }

    .timeline-container .content img {
        margin-bottom: 12px;
    }

    .left:not(:first-child) .caret::before,
    .right .caret::before {
        left: -9px;
        top: 15px;
    }
}