/**
 * Card Carousel Widget Styles
 */

/* Wrapper */
.card-carousel-wrapper {
    position: relative;
    width: 100%;
}

.card-carousel-swiper {
    width: 100%;
    padding-bottom: 50px;
}

/* Card Item */
.card-carousel-item {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card-carousel-item::before {
   content: '';
   position: absolute;
   inset: 0;
   background-image: url("data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='30' ry='30' stroke='%23264A4C' stroke-width='5' stroke-dasharray='6%2c 14' stroke-dashoffset='38' stroke-linecap='round'/%3e%3c/svg%3e");
    border-radius: 30px;
   z-index: 1;
}

.card-carousel-item:hover {
    transform: translateY(-5px);
}

/* Image */
.card-carousel-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    z-index: 0;
}

.card-carousel-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card-carousel-item:hover .card-carousel-image img {
    transform: scale(1.05);
}

/* Content */
.card-carousel-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Category */
.card-carousel-category {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #ffffff;
    background: #6366f1;
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 10px;
    width: fit-content;
}

/* Date */
.card-carousel-date {
    display: block;
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 8px;
}

/* Title */
.card-carousel-title {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

/* Description */
.card-carousel-description {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
    margin: 0 0 16px 0;
    flex: 1;
}

/* Button */
.card-carousel-button {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    background: #6366f1;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    width: fit-content;
}

.card-carousel-button:hover {
    background: #4f46e5;
    color: #ffffff;
    text-decoration: none;
}

/* Navigation Arrows */
.card-carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: none;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.card-carousel-arrow:hover {
    background: #6366f1;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.card-carousel-arrow svg {
    width: 20px;
    height: 20px;
    fill: #1e293b;
    transition: fill 0.3s ease;
}

.card-carousel-arrow:hover svg {
    fill: #ffffff;
}

.card-carousel-arrow-prev {
    left: -20px;
}

.card-carousel-arrow-next {
    right: -20px;
}

.card-carousel-arrow.swiper-button-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.card-carousel-arrow.swiper-button-disabled:hover {
    background: #ffffff;
}

.card-carousel-arrow.swiper-button-disabled:hover svg {
    fill: #1e293b;
}

/* Pagination */
.card-carousel-pagination {
    margin-top: 20px;
    text-align: center;
}

.card-carousel-pagination .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: #cbd5e1;
    opacity: 1;
    margin: 0 5px;
    transition: all 0.3s ease;
}

.card-carousel-pagination .swiper-pagination-bullet-active {
    background: #6366f1;
    width: 24px;
    border-radius: 4px;
}

/* Progress Bar Pagination */
.card-carousel-pagination.swiper-pagination-progressbar {
    position: relative;
    background: #e2e8f0;
    height: 4px;
    border-radius: 2px;
}

.card-carousel-pagination .swiper-pagination-progressbar-fill {
    background: #6366f1;
    border-radius: 2px;
}

/* Fraction Pagination */
.card-carousel-pagination.swiper-pagination-fraction {
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
}

/* Responsive */
@media (max-width: 1024px) {
    .card-carousel-arrow-prev {
        left: 10px;
    }
    
    .card-carousel-arrow-next {
        right: 10px;
    }
}

@media (max-width: 768px) {
    .card-carousel-title {
        font-size: 16px;
    }
    
    .card-carousel-description {
        font-size: 13px;
    }
    
    .card-carousel-content {
        padding: 15px;
    }
    
    .card-carousel-image {
        height: 180px;
    }
}

/* Swiper slide height fix */
.card-carousel-swiper .swiper-wrapper {
    align-items: stretch;
}

.card-carousel-swiper .swiper-slide {
    height: auto;
}

/* Overflow Visible Mode */
.card-carousel-overflow-visible {
    overflow: visible;
}

.card-carousel-overflow-visible .card-carousel-swiper {
    overflow: visible;
}

.card-carousel-overflow-visible .swiper-wrapper {
    overflow: visible;
}

/* ============================================
   TIMELINE MODE
   ============================================ */

/* Slide inner wrapper for timeline mode */
.card-carousel-slide-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-carousel-timeline-mode .card-carousel-slide-inner {
    position: relative;
    overflow: visible;
}

.card-carousel-timeline-mode .card-carousel-item {
    flex: 1;
}

/* Timeline container */
.card-carousel-timeline {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 30px;
}

/* Hide the old connector div - we don't need it anymore */
.card-carousel-timeline-connector {
    display: none;
}

/* Hide the old line element - lines are now on the badge */
.card-carousel-timeline-line {
    display: none;
}

/* Timeline badge (year/date circle) */
.card-carousel-timeline-badge {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px!important;
    height: 50px!important;
    background-color: #2d5a4a;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    border-radius: 37px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-carousel-timeline-badge::before {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 37px;
    border: 2px dashed white;
}

.card-carousel-timeline-badge:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Timeline line - only using ::after to avoid overlap */
/* Each badge (except the last) has a line going to the RIGHT toward the next badge */
/* .card-carousel-timeline-mode .card-carousel-timeline-badge::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 100%; 
    width: 420px; 
    height: 0;
    border-top: 2px dashed #cbd5e1;
    transform: translateY(-50%);
    z-index: -1;
} */

.card-carousel-timeline::after {
    content:"";
    position:absolute;
    width:100%;
    left:calc(50% + 15px);
    top:50%;
    transform:translateY(-50%);
    /* border: dashed #5E989C 1px; */

    border: 1px solid transparent;
    border-image: repeating-linear-gradient(
    to right,
    #5E989C 0,
    #5E989C 5px,
    transparent 5px,
    transparent 10px
  ) 1;
}

.swiper-slide:last-child .card-carousel-timeline::after{
    display:none;
}

/* Last slide: NO line to the right */
.card-carousel-timeline-mode .swiper-slide:last-child .card-carousel-timeline-badge::after {
    display: none;
}

/* Timeline mode - disable card hover effect that moves cards */
.card-carousel-timeline-mode .card-carousel-item:hover {
    transform: none;
}

/* Timeline mode - adjust swiper padding for timeline */
.card-carousel-timeline-mode .card-carousel-swiper {
    padding-bottom: 80px;
}

/* Ensure swiper slides don't clip the timeline line */
.card-carousel-timeline-mode .swiper-slide {
    overflow: visible;
}

.card-carousel-timeline-mode .card-carousel-timeline {
    overflow: visible;
}

/* Responsive timeline */
@media (max-width: 768px) {
    .card-carousel-timeline-badge {
        width: 50px;
        height: 50px;
        font-size: 12px;
    }
    
    .card-carousel-timeline {
        margin-top: 20px;
    }
}
