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

.uffizio-timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e0e0e0;
    transform: translateX(-50%);
}

.uffizio-timeline-item {
    position: relative;
    width: 100%;
    /* margin-bottom: 80px; */
    display: flex;
    align-items: center;
}

.uffizio-timeline-content-wrapper,
.uffizio-timeline-image-wrapper {
    flex: 0 0 50%;
    padding: 0 80px;
    box-sizing: border-box;
}

/* Right side content (index 0, 2, 4...) - Content on Right, Image on Left */
.uffizio-timeline-item.right {
    flex-direction: row;
}

.uffizio-timeline-item.right .uffizio-timeline-content-wrapper {
    text-align: left;
}

.uffizio-timeline-item.right .uffizio-timeline-image-wrapper {
    text-align: right;
}

/* Left side content (index 1, 3, 5...) - Content on Left, Image on Right */
.uffizio-timeline-item.left {
    flex-direction: row-reverse;
}

.uffizio-timeline-item.left .uffizio-timeline-content-wrapper {
    text-align: right;
}

.uffizio-timeline-item.left .uffizio-timeline-image-wrapper {
    text-align: left;
}




/* Static dots styling (User's manual design) */
.uffizio-timeline-dot {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 30px;
    height: 30px;
    background: transparent;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    transition: all 0.35s ease;
}

.uffizio-timeline-item.active .uffizio-timeline-dot {
    background: linear-gradient(70deg, #3abeff 0%, #007bff 100%);
    box-shadow: 0 0 15px rgba(0, 123, 255, 0.4);
    animation: dotPulse 2s infinite;
}

.uffizio-timeline-dot::before {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    background: #ffffff;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.uffizio-timeline-dot::after {
    content: "";
    position: absolute;
    width: 10px;
    height: 10px;
    background: #c6c6c6;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    transition: all 0.35s ease;
}

.uffizio-timeline-item.active .uffizio-timeline-dot::after {
    background: #007bff;
}

@keyframes dotPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(0, 123, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
    }
}

.uffizio-timeline-item.active .uffizio-timeline-content-wrapper {
    opacity: 1;
}

.uffizio-timeline-year-box {
    margin-bottom: 15px;
}

.uffizio-timeline-year {
    display: inline-block;
    font-family: var(--uffizio-font-heading);
    padding: 10px 30px;
    border-radius: 10px;
    font-weight: 400;
    font-size: 20px;
    color: #333;
    background: transparent;
    border: solid 1px #000000;
}

.uffizio-timeline-item.active .uffizio-timeline-year {
    background: linear-gradient(to right, #004b94 0%, #2f99ff 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.3);
    border: none;
}

.uffizio-timeline-image {
    margin-bottom: 25px;
    position: relative;
    display: inline-block;
}

.uffizio-timeline-image img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

.uffizio-timeline-image:hover img {
    transform: scale(1.03);
}

.uffizio-timeline-title {
    font-size: 30px;
    font-weight: 400;
    margin: 0 0 12px;
    color: var(--uffizio-text-secondary);
    letter-spacing: 0.5px;
    line-height: 39px;
}
.uffizio-timeline-item.active .uffizio-timeline-title{
    color: var(--uffizio-text-primary);
}

.uffizio-timeline-desc {
    font-size: 16px;
    color: #555;
    line-height: 26px;
    margin: 0;
    max-width: 450px;
    display: inline-block;
}

.uffizio-timeline-item.right .uffizio-timeline-desc {
    display: block;
}

/* Responsive */
@media (max-width: 1366px) {
    .uffizio-timeline-wrapper {
        max-width: 1100px;
    }
}

@media (max-width: 1200px) {
    .uffizio-timeline-wrapper {
        max-width: 960px;
    }

    .uffizio-timeline-title {
        font-size: 24px;
    }
}

@media (max-width: 1024px) {
    .uffizio-timeline-wrapper {
        max-width: 95%;
    }

    .uffizio-timeline-content-wrapper,
    .uffizio-timeline-image-wrapper {
        padding: 0 40px;
    }
}

@media (max-width: 767px) {
    .uffizio-timeline-line {
        left: 20px;
    }

    .uffizio-timeline-item,
    .uffizio-timeline-item.right,
    .uffizio-timeline-item.left {
        flex-direction: column;
        padding-left: 50px;
        padding-right: 0;
        align-items: flex-start;
        /* margin-bottom: 60px; */
    }

    .uffizio-timeline-content-wrapper,
    .uffizio-timeline-image-wrapper {
        flex: 0 0 100%;
        width: 100%;
        padding: 0;
        text-align: left !important;
    }

    .uffizio-timeline-image-wrapper {
        /* margin-bottom: 30px; */
        order: 2;
    }

    .uffizio-timeline-content-wrapper {
        order: 1;
    }

    .uffizio-timeline-dot {
        left: 20px;
        top: 28px !important;
        /* Align with the center of the year box */
        transform: translate(-50%, -50%) !important;
    }

    .uffizio-timeline-title {
        font-size: 22px;
    }
}

@media (max-width: 480px) {

    .uffizio-timeline-item,
    .uffizio-timeline-item.right {
        padding-left: 40px;
    }

    .uffizio-timeline-line {
        left: 15px;
    }

    .uffizio-timeline-dot {
        left: 15px;
        top: 24px !important;
        /* Slightly higher for smaller mobile year boxes */
    }

    .uffizio-timeline-year {
        padding: 4px 16px;
        font-size: 13px;
    }

    .uffizio-timeline-title {
        font-size: 18px;
    }

    .uffizio-timeline-desc {
        font-size: 14px;
    }
}