/* ===== FRONTEND STYLES - V3.4 (animation fix) ===== */

.cjts-timeline-wrapper {
    position: relative;
    background: #f6f8fb;
    padding: 60px 40px 80px;
    overflow: hidden;
    border-radius: 32px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

/* Main slider layout */
.cjts-main-slider {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cjts-slides {
    position: relative;
    width: 100%;
    min-height: 360px;
}

/* All slides stay in DOM (no display:none) so transitions fire each time */
.cjts-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transform: translateY(40px) scale(0.94);
    transition: opacity 0.8s cubic-bezier(0.25,1,0.5,1),
                transform 0.8s cubic-bezier(0.25,1,0.5,1);
    pointer-events: none;
}

.cjts-slide-active {
    position: relative;
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.cjts-slide-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(0, 2.2fr);
    gap: 48px;
    align-items: center;
}

/* Image styling - no crop, light tilt, zoom on active */
.cjts-image {
    transform: rotate(-3deg);
    border-radius: 32px;
    background: #fff;
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.25);
    overflow: visible;
    padding: 6px;
}

.cjts-image img {
    display: block;
    max-width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: contain;
    border-radius: 26px;
    margin: 0 auto;
    transform: scale(0.96);
    transition: transform 0.8s cubic-bezier(0.25,1,0.5,1);
}

.cjts-slide-active .cjts-image img {
    transform: scale(1.05);
}

/* Text block smooth from bottom to top */
.cjts-text-block {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.8s cubic-bezier(0.25,1,0.5,1),
                transform 0.8s cubic-bezier(0.25,1,0.5,1);
}

.cjts-slide-active .cjts-text-block {
    opacity: 1;
    transform: translateY(0);
}

.cjts-year-big {
    font-size: 140px;
    font-weight: 700;
    color: #303845;
    line-height: 1;
    margin-bottom: 18px;
}

.cjts-description {
    font-size: 16px;
    line-height: 1.7;
    color: #4b5563;
    max-width: 560px;
}

/* Arrows */
.cjts-arrow {
    border: 2px solid #111827;
    background: #ffffff;
    width: 46px;
    height: 46px;
    border-radius: 999px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 26px;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease,
                background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    color: #111827;
}

.cjts-arrow:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.24);
    background: #9C2B20;
    color: #ffffff;
    border-color: #9C2B20;
}

@media (max-width: 768px) {
    .cjts-arrow-prev { display: none; }
}

/* Bottom timeline with connected line */
.cjts-bottom-timeline {
    margin-top: 64px;
    padding-top: 28px;
    position: relative;
}

.cjts-bottom-timeline::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: #d1d5db;
    z-index: 0;
}

.cjts-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    position: relative;
    z-index: 1;
}

/* Dot + year (year below the circle) */
.cjts-dot {
    width: 64px;
    height: 54px;
    border-radius: 999px;
    background: #fff;
    border: 2px solid #d1d5db;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.3s ease;
    position: relative;
}

.cjts-dot-circle {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    border: 2px solid #d1d5db;
    background: #ffffff;
}

.cjts-dot-year {
    font-size: 13px;
    color: #6b7280;
}

.cjts-dot:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.15);
}

.cjts-dot-active {
    border-color: #9C2B20;
    background: #9C2B20;
    box-shadow: 0 10px 25px rgba(156,43,32,0.4);
    transform: translateY(-2px);
}

.cjts-dot-active .cjts-dot-circle {
    background: #9C2B20;
    border-color: #9C2B20;
}

.cjts-dot-active .cjts-dot-year {
    color: #ffffff;
    font-weight: 600;
}

/* Helper for pagination logic */
.cjts-dot-hidden {
    display: none !important;
}

/* Responsive tweaks */
@media (max-width: 1200px) {
    .cjts-slide-inner {
        grid-template-columns: minmax(0, 1.6fr) minmax(0, 2.4fr);
    }
    .cjts-year-big {
        font-size: 110px;
    }
}

@media (max-width: 1024px) {
    .cjts-timeline-wrapper {
        padding: 40px 24px 56px;
    }
    .cjts-slides {
        min-height: 320px;
    }
    .cjts-slide-inner {
        grid-template-columns: 1fr;
    }
    .cjts-image {
        max-width: 520px;
        margin: 0 auto 24px;
    }
    .cjts-year-big {
        font-size: 96px;
        text-align: center;
    }
    .cjts-text-block {
        text-align: center;
    }
    .cjts-dots {
        gap: 28px;
    }
}

@media (max-width: 768px) {
    .cjts-timeline-wrapper {
        padding: 28px 18px 40px;
    }
    .cjts-year-big {
        font-size: 70px;
    }
    .cjts-dots {
        gap: 18px;
    }
}
