* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    background: #ffffff;
    min-height: 100vh;
    overflow-x: auto;
    animation: slideIn 0.8s ease-out;
}

.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.98);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border-bottom: 1px solid #e1e8ed;
}

.back-btn {
    text-decoration: none;
    color: #000000;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: rgba(0,0,0,0.1);
    transform: translateX(-3px);
}

.top-nav h1 {
    font-size: 1.5rem;
    color: #000;
    font-weight: 600;
}

.nav-spacer {
    width: 120px;
}

.timeline-container {
    padding-top: 120px;
    padding-bottom: 3rem;
    min-height: 100vh;
}

.timeline-header {
    text-align: center;
    padding: 3rem 2rem;
    margin-bottom: 4rem;
}

.timeline-header h2 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    color: #000;
    font-weight: 700;
    animation: fadeInUp 1s ease-out;
}

.timeline-header p {
    font-size: 1.3rem;
    color: #666;
    font-weight: 400;
    animation: fadeInUp 1s ease-out 0.3s both;
}

.timeline-wrapper {
    position: relative;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Huvudlinjen */
.timeline-line {
    position: relative;
    width: 100%;
    height: 3px;
    background: #000;
    margin: 200px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.timeline-line::after {
    content: '';
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 15px solid #000;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}

/* Årtal på linjen */
.year-marker {
    position: absolute;
    background: #000;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    z-index: 10;
}

.year-marker[data-year="2015"] { left: 5%; }
.year-marker[data-year="2019"] { left: 25%; }
.year-marker[data-year="2021"] { left: 50%; }
.year-marker[data-year="2024"] { left: 75%; }
.year-marker.current { right: 5%; }

.year-marker.current {
    background: #000;
    animation: pulse 2s infinite;
}

.progress-indicator {
    position: absolute;
    right: -120px;
    top: -15px;
    background: #000;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Timeline items */
.timeline-item {
    position: absolute;
    width: 280px;
    z-index: 5;
}

.timeline-item.top {
    bottom: 200px;
}

.timeline-item.bottom {
    top: 200px;
}

/* Positioner för items */
.timeline-item[data-year="2015-2019"] { left: 2%; }
.timeline-item[data-year="2019-2021"].bottom { left: 18%; }
.timeline-item[data-year="2019-2021"].top { left: 22%; }
.timeline-item[data-year="2021-2024"] { left: 42%; }
.timeline-item[data-year="2024"] { left: 65%; }
.timeline-item[data-year="2024-nu"] { right: 8%; }

/* Innehållsboxar */
.timeline-content {
    background: #ffffff;
    border: 1px solid #e1e8ed;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
}

.timeline-content:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border-color: #000;
}

.year-label {
    color: #666;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timeline-content h3 {
    color: #000;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.timeline-content p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Pilar/Connectors */
.connector {
    position: absolute;
    width: 2px;
    height: 40px;
    background: #000;
    left: 50%;
    transform: translateX(-50%);
}

.connector.top {
    bottom: -40px;
}

.connector.bottom {
    top: -40px;
}

.connector::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
}

.connector.top::after {
    bottom: -8px;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid #000;
}

.connector.bottom::after {
    top: -8px;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 8px solid #000;
}

/* Färgkategorier */
.timeline-item.education .timeline-content {
    border-left: 4px solid #17bf63;
}

.timeline-item.economy .timeline-content {
    border-left: 4px solid #000;
}

.timeline-item.business .timeline-content {
    border-left: 4px solid #f45d22;
}

.timeline-item.development .timeline-content {
    border-left: 4px solid #8b5cf6;
}

.timeline-item.current .connector {
    background: #000;
}

.timeline-item.current .connector::after {
    border-bottom-color: #000;
}

.current-badge {
    display: inline-block;
    background: #000;
    color: white;
    padding: 0.2rem 0.8rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-top: 0.5rem;
    animation: pulse 2s infinite;
}

.timeline-legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 4rem;
    padding: 2rem;
    background: #f7f9fa;
    border-radius: 12px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #000;
    font-weight: 500;
    font-size: 0.9rem;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
}

.education-color { background: #17bf63; }
.economy-color { background: #000; }
.business-color { background: #f45d22; }
.development-color { background: #8b5cf6; }

.insight-section {
    max-width: 900px;
    margin: 4rem auto 0;
    padding: 0 2rem;
}

.insight-card {
    background: #ffffff;
    border: 1px solid #e1e8ed;
    border-radius: 16px;
    padding: 3rem;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    animation: fadeInUp 1s ease-out 0.8s both;
}

.insight-card h3 {
    font-size: 1.8rem;
    color: #000;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.insight-card p {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.7;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

@media (max-width: 1200px) {
    .timeline-wrapper {
        padding: 0 1rem;
    }
    
    .timeline-item {
        width: 240px;
    }
    
    .progress-indicator {
        right: -100px;
    }
}

@media (max-width: 768px) {
    .timeline-container {
        overflow-x: auto;
        padding-bottom: 1rem;
    }
    
    .timeline-wrapper {
        min-width: 800px;
        padding: 0 1rem;
    }
    
    .timeline-line {
        margin: 150px 0;
    }
    
    .timeline-item.top {
        bottom: 150px;
    }
    
    .timeline-item.bottom {
        top: 150px;
    }
    
    .timeline-item {
        width: 200px;
    }
    
    .timeline-content {
        padding: 1rem;
        font-size: 0.85rem;
    }
    
    .timeline-header h2 {
        font-size: 2rem;
    }
    
    .timeline-legend {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .insight-card {
        padding: 2rem;
    }
}