/**
 * Horizontal Card Timeline Styles
 * Modern card-based design
 */

.card-timeline {
    position: relative;
    padding: 15px 0;
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
}

.timeline-cards {
    display: flex;
    gap: 12px;
    padding: 0 15px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: rgba(137, 184, 220, 0.5) transparent;
    -webkit-overflow-scrolling: touch;
}

.timeline-cards::-webkit-scrollbar {
    height: 8px;
}

.timeline-cards::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.timeline-cards::-webkit-scrollbar-thumb {
    background: rgba(137, 184, 220, 0.5);
    border-radius: 4px;
}

.timeline-cards::-webkit-scrollbar-thumb:hover {
    background: rgba(137, 184, 220, 0.7);
}

.card-timeline.mobile .timeline-cards {
    gap: 10px;
    padding: 0 12px;
}

/* Timeline Card */
.timeline-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    flex: 0 0 calc(33.333% - 9px);
    min-width: 300px;
    max-width: 400px;
}

.timeline-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(137, 184, 220, 0.5), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.timeline-card:hover {
    transform: translateY(-5px);
    border-color: rgba(137, 184, 220, 0.3);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.timeline-card:hover::before {
    opacity: 1;
}

.timeline-card.active {
    border-color: rgba(137, 184, 220, 0.6);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 30px rgba(137, 184, 220, 0.2);
}

.timeline-card.active::before {
    opacity: 1;
    background: linear-gradient(90deg, transparent, #89b8dc, transparent);
}

.card-timeline.mobile .timeline-card {
    padding: 10px;
    border-radius: 6px;
    flex: 0 0 calc(85% - 7px);
    min-width: 280px;
    max-width: 320px;
}

/* Date Badge */
.card-date {
    color: #89b8dc;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    opacity: 0.9;
}

.card-timeline.mobile .card-date {
    font-size: 0.65rem;
    margin-bottom: 4px;
}

/* Card Title */
.card-title {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
}

.card-timeline.mobile .card-title {
    font-size: 0.95rem;
    margin-bottom: 6px;
}

.timeline-card.active .card-title {
    color: #89b8dc;
}

/* Card Content */
.card-content {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
    font-size: 0.85rem;
}

.card-timeline.mobile .card-content {
    font-size: 0.8rem;
    line-height: 1.4;
}

/* Event Content Styling */
.card-content .event-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-timeline.mobile .card-content .event-content-wrapper {
    gap: 6px;
}

.card-content .event-image {
    width: 100%;
    margin-bottom: 6px;
}

.card-content .event-image img {
    width: 100%;
    height: auto;
    max-height: 140px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.card-timeline.mobile .card-content .event-image img {
    max-height: 120px;
}

.card-content .event-description {
    flex: 1;
}

.card-content .event-description h3 {
    color: #fff;
    font-size: 0.9rem;
    margin-bottom: 6px;
    font-weight: 600;
    display: none; /* Hide duplicate title */
}

.card-content .event-description p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 4px;
    line-height: 1.4;
    font-size: 0.85rem;
}

.card-timeline.mobile .card-content .event-description p {
    font-size: 0.8rem;
    margin-bottom: 3px;
}

.card-content .event-description a {
    color: #89b8dc;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.card-content .event-description a:hover {
    color: #fff;
    text-decoration: underline;
}

.card-content .timeline-tag {
    display: inline-block;
    padding: 2px 6px;
    background: rgba(137, 184, 220, 0.2);
    color: #89b8dc;
    border-radius: 8px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 4px;
}

.card-timeline.mobile .card-content .timeline-tag {
    font-size: 0.6rem;
    padding: 2px 5px;
    margin-top: 3px;
}

/* Ensure cards don't wrap */
.timeline-cards {
    flex-wrap: nowrap;
}

/* Snap scrolling for better UX */
.timeline-cards {
    scroll-snap-type: x mandatory;
}

.timeline-card {
    scroll-snap-align: start;
}

/* Smooth Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.timeline-card {
    animation: fadeIn 0.5s ease forwards;
}

.timeline-card:nth-child(1) { animation-delay: 0.1s; }
.timeline-card:nth-child(2) { animation-delay: 0.2s; }
.timeline-card:nth-child(3) { animation-delay: 0.3s; }
.timeline-card:nth-child(4) { animation-delay: 0.4s; }
.timeline-card:nth-child(5) { animation-delay: 0.5s; }
.timeline-card:nth-child(6) { animation-delay: 0.6s; }
.timeline-card:nth-child(7) { animation-delay: 0.7s; }
.timeline-card:nth-child(8) { animation-delay: 0.8s; }
