/* =========================================================
   IR Core Timeline Widget
   ========================================================= */

/* =========================================================
   WRAPPER & SWIPER
   ========================================================= */
.ir-timeline-wrapper {
    position: relative;
    width: 100%;
    padding: 30px 0 20px;
    direction: rtl;
    overflow: visible;
}

.ir-timeline-carousel {
    width: 100% !important;
    padding: 10px 0 30px;
    overflow: hidden;
}

.ir-timeline-carousel .swiper-wrapper {
    align-items: stretch;
}

.ir-timeline-carousel .swiper-slide {
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 10px;
}
/* =========================================================
   NODE (نقطه و سال)
   ========================================================= */
.ir-timeline-node {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: -20px;
    margin-top: 20px;
    cursor: pointer;
}

.ir-timeline-dot {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #d7dbe0;
    transition: all 0.3s ease;
    position: relative;
    flex-shrink: 0;
}

.ir-timeline-dot .ir-timeline-year {
    font-size: 13px;
    font-weight: 700;
    color: #8a94a6;
    transition: all 0.3s ease;
    line-height: 1;
}

.ir-timeline-carousel .swiper-slide-active .ir-timeline-dot {
    border-color: var(--ir-color-primary);
    background-color: var(--ir-color-primary);
    box-shadow: 0 0 0 6px rgba(13, 110, 253, 0.15);
    transform: scale(1.05);
}

.ir-timeline-carousel .swiper-slide-active .ir-timeline-dot .ir-timeline-year {
    color: #fff;
}

.ir-timeline-dot:hover {
    border-color: var(--ir-color-primary);
    transform: scale(1.08);
}

.ir-timeline-dot:hover .ir-timeline-year {
    color: var(--ir-color-primary);
}

/* =========================================================
   CARD (کارت رویداد)
   ========================================================= */
.ir-timeline-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px 18px 18px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.04);
    text-align: center;
    width: 100%;
    transition: all 0.3s ease;
    position: relative;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    border: 1px solid #f0f2f5;
    margin: 0 0px 20px 0;
}

.ir-timeline-card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.07);
}

.ir-timeline-carousel .swiper-slide-active .ir-timeline-card {
    background: #f8faff;
    border-color: var(--ir-color-primary);
}

/* =========================================================
   TYPOGRAPHY
   ========================================================= */
.ir-timeline-title {
    font-size: 17px;
    font-weight: 700;
    color: #1a2332;
    margin: 30px 0 6px;
    line-height: 1.3;
}

.ir-timeline-description {
    font-size: 13px;
    color: #6b7a8f;
    line-height: 1.6;
    flex: 1;
}

/* =========================================================
   BUTTON (دکمه جزئیات)
   ========================================================= */
.ir-timeline-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 18px;
    background: transparent;
    color: var(--ir-color-primary);
    border: 1.5px solid var(--ir-color-primary);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-top: auto;
    white-space: nowrap;
}

.ir-timeline-btn:hover {
    background: var(--ir-color-primary);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.25);
}

.ir-timeline-btn::after {
    content: '←';
    display: inline-block;
    transition: transform 0.3s ease;
}

.ir-timeline-btn:hover::after {
    transform: translateX(-4px);
}

/* =========================================================
   SWIPER NAVIGATION
   ========================================================= */
.ir-timeline-wrapper .swiper-button-prev,
.ir-timeline-wrapper .swiper-button-next {
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(4px);
    color: var(--ir-color-primary);
    transition: all 0.2s ease;
    top: 53%;
}

.ir-timeline-wrapper .swiper-button-prev:hover,
.ir-timeline-wrapper .swiper-button-next:hover {
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    transform: scale(1.05);
}

.ir-timeline-wrapper .swiper-button-prev:after,
.ir-timeline-wrapper .swiper-button-next:after {
    display: none;
}

.ir-timeline-wrapper .swiper-button-prev svg,
.ir-timeline-wrapper .swiper-button-next svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    transform: scaleX(-1);
}

.ir-timeline-wrapper .swiper-button-disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* =========================================================
   RTL NAVIGATION
   ========================================================= */
.ir-timeline-wrapper[dir="rtl"] .swiper-button-prev {
    left: auto;
    right: -50px;
}

.ir-timeline-wrapper[dir="rtl"] .swiper-button-next {
    right: auto;
    left: -50px;
}

/* =========================================================
   SWIPER PAGINATION
   ========================================================= */
.ir-timeline-wrapper .swiper-pagination {
    position: relative;
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 6px;
}

.ir-timeline-wrapper .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #94a3b8;
    opacity: 0.5;
    transition: all 0.2s ease;
    margin: 0;
}

.ir-timeline-wrapper .swiper-pagination-bullet-active {
    background: var(--ir-color-primary);
    opacity: 1;
    width: 24px;
    border-radius: 6px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 992px) {
    .ir-timeline-wrapper .swiper-button-prev,
    .ir-timeline-wrapper .swiper-button-next {
        width: 36px;
        height: 36px;
    }
    
    .ir-timeline-wrapper .swiper-button-prev svg,
    .ir-timeline-wrapper .swiper-button-next svg {
        width: 18px;
        height: 18px;
    }
    
    .ir-timeline-wrapper[dir="rtl"] .swiper-button-prev {
        right: -30px;
    }
    .ir-timeline-wrapper[dir="rtl"] .swiper-button-next {
        left: -30px;
    }
    
    .ir-timeline-line {
        right: 30px;
        left: 30px;
    }
}

@media (max-width: 768px) {
    .ir-timeline-wrapper {
        padding: 20px 0 15px;
    }
    
    .ir-timeline-wrapper .swiper-button-prev,
    .ir-timeline-wrapper .swiper-button-next {
        width: 32px;
        height: 32px;
        top: 30%;
    }
    
    .ir-timeline-wrapper .swiper-button-prev svg,
    .ir-timeline-wrapper .swiper-button-next svg {
        width: 16px;
        height: 16px;
    }
    
    .ir-timeline-wrapper .swiper-pagination-bullet {
        width: 8px;
        height: 8px;
    }
    
    .ir-timeline-wrapper .swiper-pagination-bullet-active {
        width: 18px;
    }
    
    .ir-timeline-line {
        top: 40px;
        right: 20px;
        left: 20px;
    }
    
    .ir-timeline-dot {
        width: 38px;
        height: 38px;
    }
    
    .ir-timeline-dot .ir-timeline-year {
        font-size: 11px;
    }
    
    .ir-timeline-card {
        padding: 16px 14px;
        min-height: 170px;
    }
    
    .ir-timeline-title {
        font-size: 15px;
    }
    
    .ir-timeline-description {
        font-size: 12px;
    }
    
    .ir-timeline-btn {
        font-size: 12px;
        padding: 5px 14px;
    }
}

@media (max-width: 767px) {
    .ir-timeline-wrapper {
        padding-inline: 0;
    }
    
    .ir-timeline-wrapper .swiper-button-prev,
    .ir-timeline-wrapper .swiper-button-next {
        display: none;
    }
}

@media (max-width: 480px) {
    .ir-timeline-wrapper .swiper-pagination {
        margin-top: 12px;
        gap: 4px;
    }
    
    .ir-timeline-wrapper .swiper-pagination-bullet {
        width: 7px;
        height: 7px;
    }
    
    .ir-timeline-wrapper .swiper-pagination-bullet-active {
        width: 16px;
    }
    
    .ir-timeline-line {
        top: 35px;
        right: 15px;
        left: 15px;
    }
    
    .ir-timeline-dot {
        width: 32px;
        height: 32px;
    }
    
    .ir-timeline-dot .ir-timeline-year {
        font-size: 10px;
    }
    
    .ir-timeline-card {
        padding: 12px;
        min-height: 150px;
        border-radius: 12px;
    }
    
    .ir-timeline-title {
        font-size: 14px;
    }
    
    .ir-timeline-description {
        font-size: 11px;
    }
    
    .ir-timeline-btn {
        font-size: 11px;
        padding: 4px 12px;
    }

}