/* ----------------------------------------------------------------------
   MAIN CONTAINER
   ---------------------------------------------------------------------- */
#efepr-timeline {
    width: 100%;
    padding: 0 50px;
    margin: 0 auto;
    box-sizing: border-box;
}

#efepr-timeline>h3 {
    color: var(--color-primary);
    margin-bottom: 0px;
    font-size: 2rem;
    text-transform: uppercase;
    font-weight: 700;
}

.timeline-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    position: relative;
}

.timeline-item {
    position: relative;
    flex: 1;
}

/* Connecting line */
.timeline-item:not(:last-child)::after {
    content: '';
    position: absolute;
    background-color: var(--color-timeline-line);
    z-index: 1;
}

/* ----------------------------------------------------------------------
   DOT BUTTON & ANIMATION
   ---------------------------------------------------------------------- */
.dot-btn {
    position: absolute;
    background-color: var(--color-primary);
    border-radius: 50%;
    z-index: 10;
    box-shadow: 0 0 0 4px #fff;

    width: var(--dot-size);
    height: var(--dot-size);

    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Hidden text inside dot */
.dot-btn span {
    display: block;
    opacity: 0;
    width: 0;
    overflow: hidden;
    white-space: nowrap;
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

@keyframes pulse-btn {
    0% {
        box-shadow: 0 0 0 0 var(--color-primary);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(93, 188, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(93, 188, 0, 0);
    }
}

.timeline-item.active-phase .dot-btn {
    animation: pulse-btn 2s infinite;
}

/* ----------------------------------------------------------------------
   CONTENT (Labels)
   ---------------------------------------------------------------------- */
.content-wrap {
    transition: margin 0.3s ease;
}

.timeline-item h2 {
    color: var(--color-primary);
    font-size: 1.2rem;
    margin: 0 0 5px 0;
    font-weight: 700;
    line-height: 1.2;
}

.timeline-info {
    color: var(--color-text-dark);
    font-weight: 400;
    line-height: 1.4;
}

.timeline-info .timeline-date {
    display: block;
    font-size: 0.95rem;
}

.timeline-info .timeline-price {
    display: block;
    font-weight: 700;
    margin-top: 0.15rem;
    color: #111;
    font-size: 0.95rem;
}

/* ----------------------------------------------------------------------
   ACTIVE PHASE STATE
   ---------------------------------------------------------------------- */
.timeline-item.active-phase .dot-btn {
    width: auto;
    min-width: 130px;
    height: auto;
    padding: 8px 20px;
    border-radius: 50px;
}

.timeline-item.active-phase .dot-btn span {
    opacity: 1;
    width: auto;
}

.timeline-item.active-phase .dot-btn:hover {
    background-color: var(--color-primary-dark);
    transform: translate(-50%, -50%) scale(1.05) !important;
}

/* ----------------------------------------------------------------------
   DESKTOP LAYOUT (Horizontal)
   ---------------------------------------------------------------------- */
@media (min-width: 901px) {
    .timeline-list {
        flex-direction: row;
        text-align: center;
        padding-top: 40px;
    }

    .timeline-item {
        padding: 0 10px;
    }

    /* Center dot on line */
    .dot-btn {
        left: 50%;
        top: var(--line-offset);
        transform: translate(-50%, -50%);
    }

    .timeline-item.active-phase .dot-btn {
        transform: translate(-50%, -50%);
    }

    .content-wrap {
        margin-top: 40px;
    }

    /* Horizontal line */
    .timeline-item:not(:last-child)::after {
        height: var(--line-thickness);
        width: 100%;
        top: calc(var(--line-offset) - (var(--line-thickness) / 2));
        left: 50%;
    }
}

/* ----------------------------------------------------------------------
   MOBILE LAYOUT (Vertical)
   ---------------------------------------------------------------------- */
@media (max-width: 992px) {
    .timeline-list {
        flex-direction: column;
        padding-left: 0;
    }

    .timeline-item {
        padding-left: 50px;
        padding-bottom: 40px;
        text-align: left;
    }

    .timeline-item:last-child {
        padding-bottom: 0;
    }

    /* Align dot to vertical line */
    .dot-btn {
        left: var(--line-offset);
        top: 0;
        transform: translate(-50%, 0);
    }

    /* Mobile active button behavior */
    .timeline-item.active-phase .dot-btn {
        left: 0;
        transform: none;
        border-radius: 30px;
    }

    .timeline-item.active-phase .dot-btn:hover {
        transform: scale(1.02) !important;
    }

    /* Push content down on mobile when active */
    .timeline-item.active-phase .content-wrap {
        padding-top: 45px;
        margin-top: 0;
    }

    /* Vertical line */
    .timeline-item:not(:last-child)::after {
        width: var(--line-thickness);
        height: 100%;
        left: calc(var(--line-offset) - (var(--line-thickness) / 2));
        top: var(--line-offset);
    }

    .timeline-item h2 {
        margin-top: 5px;
    }
}

/* ----------------------------------------------------------------------
   RESPONSIVE CONTAINERS
   ---------------------------------------------------------------------- */
@media (min-width: 768px) {
    #efepr-timeline {
        width: 750px;
    }
}

@media (min-width: 992px) {
    #efepr-timeline {
        width: 970px;
    }

    .timeline-price {
        font-size: 0.8rem !important;
    }
}

@media (min-width: 1200px) {
    #efepr-timeline {
        width: 1100px;
    }
}