/**
 * Interactive Timeline Styles
 * Vertical timeline with alternating left/right events
 */

.timeline-section {
    background: linear-gradient(180deg, #0a1f2e 0%, #0f3854 50%, #1a5f7a 100%);
    padding: var(--spacing-xl) 0 calc(var(--spacing-xl) * 2);
    position: relative;
    overflow: hidden;
}

/* Constellation-style background pattern */
.timeline-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
                      radial-gradient(circle at 80% 60%, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
                      radial-gradient(circle at 40% 80%, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 100px 100px, 150px 150px, 120px 120px;
    opacity: 0.5;
    pointer-events: none;
}

.timeline-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    position: relative;
    z-index: 1;
}

.timeline-header h2 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: var(--white);
    margin-bottom: var(--spacing-sm);
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.timeline-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
}

.timeline-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-lg) var(--page-padding);
}

/* Center vertical line */
.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom,
        rgba(21, 152, 149, 0.3),
        rgba(21, 152, 149, 0.8),
        rgba(21, 152, 149, 0.3)
    );
    transform: translateX(-50%);
    z-index: 1;
}

.timeline-events {
    position: relative;
    z-index: 2;
}

/* Individual timeline event */
.timeline-event {
    position: relative;
    margin-bottom: var(--spacing-xl);
    display: flex;
    align-items: flex-start;
}

.timeline-event.left {
    justify-content: flex-end;
    padding-right: calc(50% + 40px);
}

.timeline-event.right {
    justify-content: flex-start;
    padding-left: calc(50% + 40px);
}

/* Timeline dot (color-coded by category) */
.timeline-dot {
    position: absolute;
    left: 50%;
    top: 20px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 3;
    box-shadow: 0 0 0 6px rgba(10, 31, 46, 0.8), 0 0 20px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.timeline-dot.production {
    background: linear-gradient(135deg, #2d8bab, #159895);
}

.timeline-dot.conservation {
    background: linear-gradient(135deg, #159895, #57a99a);
}

.timeline-dot.historical {
    background: linear-gradient(135deg, #d4af37, #f4d03f);
}

.timeline-dot::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid currentColor;
    opacity: 0;
    animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
    75%, 100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Timeline content card */
.timeline-content {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: var(--spacing-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    transition: all 0.3s ease;
}

.timeline-content:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

/* Connector line from dot to card */
.timeline-event.left .timeline-content::after {
    content: '';
    position: absolute;
    right: -40px;
    top: 28px;
    width: 40px;
    height: 2px;
    background: linear-gradient(to right, rgba(21, 152, 149, 0.5), transparent);
}

.timeline-event.right .timeline-content::after {
    content: '';
    position: absolute;
    left: -40px;
    top: 28px;
    width: 40px;
    height: 2px;
    background: linear-gradient(to left, rgba(21, 152, 149, 0.5), transparent);
}

.timeline-date {
    font-size: 0.9rem;
    color: var(--cinematic-gold);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--spacing-xs);
}

.timeline-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--white);
    margin-bottom: var(--spacing-sm);
}

.timeline-description {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
    margin-bottom: var(--spacing-sm);
}

.timeline-image {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: var(--spacing-sm);
}

.timeline-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.timeline-content:hover .timeline-image img {
    transform: scale(1.05);
}

.timeline-category-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timeline-production .timeline-category-badge {
    background: rgba(45, 139, 171, 0.2);
    color: #7dd3db;
    border: 1px solid rgba(45, 139, 171, 0.4);
}

.timeline-conservation .timeline-category-badge {
    background: rgba(21, 152, 149, 0.2);
    color: #5fcbc7;
    border: 1px solid rgba(21, 152, 149, 0.4);
}

.timeline-historical .timeline-category-badge {
    background: rgba(212, 175, 55, 0.2);
    color: #f4d03f;
    border: 1px solid rgba(212, 175, 55, 0.4);
}

/* Mobile responsive layout */
@media (max-width: 768px) {
    .timeline-line {
        left: 30px;
    }

    .timeline-event.left,
    .timeline-event.right {
        padding-left: 70px;
        padding-right: 0;
        justify-content: flex-start;
    }

    .timeline-dot {
        left: 30px;
    }

    .timeline-event.left .timeline-content::after,
    .timeline-event.right .timeline-content::after {
        left: -40px;
        right: auto;
        background: linear-gradient(to left, rgba(21, 152, 149, 0.5), transparent);
    }

    .timeline-header h2 {
        font-size: 2rem;
    }

    .timeline-image img {
        height: 150px;
    }
}

/* No animations fallback */
.timeline-container.no-animations .timeline-event {
    opacity: 1;
    transform: none;
}
