/* Root Variables */
:root {
    --accent-color: #00358d;
    --bg-color: #fafbfc;
    --text-primary: #1a1a1a;
    --text-secondary: #666;
    --card-bg: rgba(255, 255, 255, 0.95);
    --shadow-light: rgba(0, 53, 141, 0.08);
    --shadow-medium: rgba(0, 53, 141, 0.15);
    --grid-color: rgba(0, 53, 141, 0.03);
    --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Grid Background */
.background-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -2;
    opacity: 0.4;
    background: 
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: gridShift 20s linear infinite;
}

@keyframes gridShift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(40px, 40px); }
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 40px;
    padding: 40px;
    height: 100%;
}

.grid-dot {
    width: 4px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 50%;
    opacity: 0;
    animation: dotPulse 3s ease-in-out infinite;
    animation-delay: var(--delay);
}

@keyframes dotPulse {
    0%, 100% { opacity: 0; transform: scale(0.5); }
    50% { opacity: 0.6; transform: scale(1.2); }
}

/* Container */
.container-wrapper {
    position: relative;
    z-index: 1;
}

/* Hero Section */
.hero-section {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(0, 53, 141, 0.03) 0%, rgba(255, 255, 255, 0.8) 100%);
}

.hero-content {
    text-align: center;
    max-width: 800px;
    z-index: 2;
    animation: heroFadeIn 1.2s ease-out;
}

@keyframes heroFadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: rgba(0, 53, 141, 0.1);
    color: var(--accent-color);
    border-radius: 50px;
    font-weight: 600;
    margin-bottom: 2rem;
    border: 2px solid rgba(0, 53, 141, 0.2);
    animation: badgeFloat 3s ease-in-out infinite alternate;
}

@keyframes badgeFloat {
    from { transform: translateY(0px); }
    to { transform: translateY(-10px); }
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.title-line-1, .title-line-2 {
    display: block;
    animation: titleSlideIn 1s ease-out;
}

.title-line-2 {
    color: var(--accent-color);
    animation-delay: 0.3s;
}

@keyframes titleSlideIn {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    animation: heroFadeIn 1.2s ease-out 0.6s both;
}

/* Hero Background Elements */
.hero-bg-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.floating-car {
    position: absolute;
    top: 20%;
    right: 10%;
    animation: carFloat 6s ease-in-out infinite;
}

@keyframes carFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(2deg); }
    66% { transform: translateY(10px) rotate(-1deg); }
}

.road-lines {
    position: absolute;
    bottom: 20%;
    left: 0;
    width: 100%;
    height: 4px;
}

.road-line {
    position: absolute;
    width: 60px;
    height: 4px;
    background: var(--accent-color);
    opacity: 0.3;
    animation: roadMove 2s linear infinite;
}

.road-line:nth-child(1) { animation-delay: 0s; }
.road-line:nth-child(2) { animation-delay: 0.5s; }
.road-line:nth-child(3) { animation-delay: 1s; }

@keyframes roadMove {
    from { left: -60px; }
    to { left: 100%; }
}

/* Timeline Navigation */
.timeline-nav {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    z-index: 100;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 53, 141, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.nav-progress {
    position: relative;
    margin-bottom: 1rem;
}

.progress-line {
    height: 4px;
    background: rgba(0, 53, 141, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), #0056b3);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-items {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 1rem;
    background: none;
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    min-width: 80px;
    white-space: nowrap;
}

.nav-item:hover {
    background: rgba(0, 53, 141, 0.05);
    transform: translateY(-2px);
}

.nav-item.active {
    background: rgba(0, 53, 141, 0.1);
    border-color: var(--accent-color);
}

.nav-year {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--accent-color);
}

.nav-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Timeline Container */
.timeline-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
    position: relative;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--accent-color), rgba(0, 53, 141, 0.3));
    transform: translateX(-50%);
    z-index: 1;
}

/* Timeline Milestone */
.timeline-milestone {
    position: relative;
    margin-bottom: 6rem;
    opacity: 0;
    transform: translateY(50px);
    transition: var(--transition);
}

.timeline-milestone.visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-milestone.animate-flip {
    animation: flipIn 0.8s ease-out forwards;
}

.timeline-milestone.animate-scale {
    animation: scaleIn 0.8s ease-out forwards;
}

.timeline-milestone.animate-rotate {
    animation: rotateIn 0.8s ease-out forwards;
}

@keyframes flipIn {
    from { opacity: 0; transform: perspective(400px) rotateY(90deg); }
    to { opacity: 1; transform: perspective(400px) rotateY(0deg); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.3) translateY(50px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes rotateIn {
    from { opacity: 0; transform: rotate(-15deg) translateY(50px); }
    to { opacity: 1; transform: rotate(0deg) translateY(0); }
}

/* Milestone Indicator */
.milestone-indicator {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.indicator-circle {
    width: 24px;
    height: 24px;
    background: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 8px var(--bg-color), 0 0 0 12px rgba(0, 53, 141, 0.2);
    transition: var(--transition);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.indicator-circle.active {
    background: linear-gradient(45deg, var(--accent-color), #0056b3);
    box-shadow: 0 0 0 8px var(--bg-color), 0 0 0 12px var(--accent-color), 0 0 30px rgba(0, 53, 141, 0.3);
}

.circle-inner {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

/* Milestone Content */
.milestone-content {
    display: flex;
    justify-content: flex-start;
    padding-left: 3rem;
}

.milestone-content.reverse {
    justify-content: flex-end;
    padding-left: 0;
    padding-right: 3rem;
}

.content-card {
    max-width: 500px;
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px var(--shadow-light);
    transition: var(--transition);
    position: relative;
}

.content-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(0, 53, 141, 0.05), transparent);
    animation: rotate 10s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.content-card:hover::before {
    opacity: 1;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.content-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 60px var(--shadow-medium);
}

/* Glass effect */
.glass-card {
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Milestone Image */
.milestone-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.milestone-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.content-card:hover .milestone-image img {
    transform: scale(1.1);
    animation: imagePulse 2s ease-in-out infinite;
}

@keyframes imagePulse {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.1); }
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.3));
    opacity: 0;
    transition: var(--transition);
}

.content-card:hover .image-overlay {
    opacity: 1;
}

/* Card Header */
.card-header {
    padding: 2rem 2rem 0;
    position: relative;
}

.year-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--accent-color);
    color: white;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    animation: badgeBounce 2s ease-in-out infinite;
}

@keyframes badgeBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.year-badge.current {
    background: linear-gradient(45deg, var(--accent-color), #ff6b35);
    animation: currentGlow 2s ease-in-out infinite alternate;
}

@keyframes currentGlow {
    from { box-shadow: 0 0 10px rgba(0, 53, 141, 0.5); }
    to { box-shadow: 0 0 20px rgba(255, 107, 53, 0.5); }
}

.year-badge.future {
    background: linear-gradient(45deg, var(--accent-color), #9c27b0);
}

.milestone-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.milestone-category {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

/* Card Body */
.card-body {
    padding: 0 2rem 2rem;
}

.milestone-description {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Milestone Metrics */
.milestone-metrics {
    display: flex;
    gap: 1rem;
}

.metric-item {
    text-align: center;
    flex: 1;
}

.metric-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent-color);
    margin-bottom: 0.25rem;
    animation: numberCount 2s ease-out;
}

@keyframes numberCount {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.metric-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Polygon Overlay for some cards */
.timeline-milestone:nth-child(odd) .content-card::after {
    content: '';
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(0, 53, 141, 0.1);
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    transition: var(--transition);
}

.timeline-milestone:nth-child(even) .content-card::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    background: rgba(0, 53, 141, 0.1);
    border-radius: 50%;
    transition: var(--transition);
}

.content-card:hover::after {
    background: rgba(0, 53, 141, 0.2);
    transform: scale(1.2) rotate(15deg);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .timeline-container::before {
        left: 2rem;
    }
    
    .milestone-indicator {
        left: 2rem;
        transform: translateX(-50%);
    }
    
    .milestone-content,
    .milestone-content.reverse {
        padding-left: 4rem;
        padding-right: 1rem;
        justify-content: flex-start;
    }
    
    .content-card {
        max-width: 100%;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .nav-items {
        justify-content: flex-start;
    }
    
    .nav-item {
        min-width: 70px;
        padding: 0.4rem 0.8rem;
    }
    
    .milestone-image {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .timeline-container {
        padding: 2rem 1rem;
    }
    
    .card-header {
        padding: 1.5rem 1.5rem 0;
    }
    
    .card-body {
        padding: 0 1.5rem 1.5rem;
    }
    
    .milestone-title {
        font-size: 1.5rem;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.timeline-milestone.loaded {
    animation: fadeInUp 0.6s ease-out forwards;
}
