:root {
    --primary: rgb(106, 165, 184);
    --accent: rgb(47, 190, 148);
    --text-dark: #eef6f8;
    --text-light: #9aa6b2;
    --background-dark: #1c1c1c;
    --background-panel: rgba(255,255,255,0.03);
    --timeline-line: rgba(255,255,255,0.1);
}

.history-hero {
    background: linear-gradient(135deg, rgba(30, 30, 30, 1) 0%, rgba(40, 40, 40, 1) 100%);
    padding: 80px 20px 60px;
    text-align: center;
    color: var(--text-dark);
}

.history-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: -1px;
}

.history-hero p {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.85;
}

.history-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.history-content {
    padding: 80px 20px;
    background: var(--background-dark);
}

.timeline {
    position: relative;
    padding: 40px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--timeline-line);
    transform: translateX(-50%);
}

.timeline-item {
    display: flex;
    margin-bottom: 60px;
    position: relative;
}

.timeline-item:nth-child(odd) {
    flex-direction: row;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-marker {
    flex: 0 0 50%;
    display: flex;
    justify-content: flex-end;
    padding-right: 30px;
    position: relative;
}

.timeline-item:nth-child(even) .timeline-marker {
    justify-content: flex-start;
    padding-right: 0;
    padding-left: 30px;
}

.timeline-dot {
    display: none;
}

.timeline-content {
    flex: 0 0 50%;
    padding-left: 30px;
}

.timeline-item:nth-child(even) .timeline-content {
    padding-left: 0;
    padding-right: 30px;
    text-align: right;
}

.timeline-year {
    display: inline-block;
    background: linear-gradient(to right, var(--accent), rgb(54, 182, 126));
    color: var(--background-dark);
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.timeline-content h3 {
    font-size: 1.75rem;
    color: var(--text-dark);
    margin-bottom: 12px;
    font-weight: 700;
}

.timeline-content p {
    color: var(--text-light);
    line-height: 1.7;
    font-size: 1.05rem;
}

.history-legacy {
    background: var(--background-panel);
    padding: 80px 20px;
}

.legacy-content {
    text-align: center;
}

.legacy-content h2 {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 24px;
    font-weight: 700;
}

.legacy-content > p {
    font-size: 1.15rem;
    color: var(--text-light);
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto 60px;
}

.legacy-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

.stat {
    background: rgba(255,255,255,0.04);
    padding: 40px 30px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.stat:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(47, 190, 148, 0.2);
    border-color: var(--accent);
}

.stat h3 {
    font-size: 3rem;
    background: linear-gradient(to right, var(--primary), var(--accent));
    -webkit-background-clip: text;
    color: transparent;
    margin-bottom: 10px;
    font-weight: 700;
}

.stat p {
    color: var(--text-light);
    font-size: 1.1rem;
    margin: 0;
}

@media (max-width: 768px) {
    .history-hero h1 {
        font-size: 2.5rem;
    }

    .history-hero p {
        font-size: 1.1rem;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-item,
    .timeline-item:nth-child(even) {
        flex-direction: column;
        padding-left: 50px;
    }

    .timeline-marker,
    .timeline-item:nth-child(even) .timeline-marker {
        position: absolute;
        left: 0;
        padding: 0;
        justify-content: flex-start;
    }

    .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        padding: 0;
        text-align: left;
    }

    .timeline-content h3 {
        font-size: 1.5rem;
    }

    .legacy-content h2 {
        font-size: 2rem;
    }

    .legacy-stats {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* Related Pages Section */
.related-pages-section {
    padding: 80px 20px;
    background: linear-gradient(135deg, rgba(96, 149, 190, 0.08), rgba(46, 195, 150, 0.05));
    position: relative;
}

.related-pages-content {
    max-width: 1400px;
    margin: 0 auto;
}

.related-pages-content h2 {
    font-size: 40px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 60px;
    color: var(--text-dark);
}

.related-pages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
}

.related-page-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s ease;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(10px);
}

.related-page-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(46, 195, 150, 0.2);
    border-color: rgba(46, 195, 150, 0.5);
}

.related-page-image {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, rgba(46, 195, 150, 0.2), rgba(96, 149, 190, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.related-page-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.1), transparent 70%);
}

.related-page-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.related-page-card:hover .related-page-image img {
    transform: scale(1.1);
}

.related-page-info {
    padding: 28px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.related-page-info h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.related-page-info p {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}
