/* Sekcja Historia - nowe style */
.history-section {
    background-color: var(--background-alt);
    padding: var(--spacing-xxl) 0;
    position: relative;
    overflow: hidden;
}

/* Statystyki historyczne */
.history-stats {
    display: flex;
    justify-content: space-between;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    flex-wrap: wrap;
}

.history-stat-item {
    background: var(--primary-color);
    color: white;
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    text-align: center;
    flex: 1;
    min-width: 200px;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.history-stat-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.history-stat-item::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, rgba(255,255,255,0.2), rgba(255,255,255,0.8), rgba(255,255,255,0.2));
    animation: shimmer 2s infinite;
    opacity: 0.7;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.history-stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    background: linear-gradient(to right, #ffffff, #e6e6ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.history-stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* Timeline nowoczesny */
.timeline-wrapper {
    position: relative;
    padding: var(--spacing-xl) 0;
    margin: var(--spacing-xl) 0;
}

.timeline-progress {
    position: absolute;
    top: 0;
    left: 24px;
    width: 4px;
    background-color: var(--primary-color);
    height: 0;
    z-index: 1;
    transition: height 0.3s ease-out;
}

.timeline-modern {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.timeline-modern::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 24px;
    width: 4px;
    background-color: rgba(0, 86, 179, 0.2);
    z-index: 0;
}

.timeline-event {
    position: relative;
    margin-bottom: var(--spacing-xl);
    padding-left: 70px;
}

.timeline-date {
    position: absolute;
    left: 0;
    width: 50px;
    height: 50px;
    border-radius: var(--border-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    text-align: center;
    z-index: 2;
    box-shadow: var(--shadow-md);
}

.timeline-content {
    background-color: var(--background-color);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    display: flex;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.timeline-event:hover .timeline-content {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.timeline-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-right: var(--spacing-md);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.timeline-text {
    flex: 1;
}

.timeline-text h3 {
    margin-top: 0;
    font-size: 1.2rem;
    margin-bottom: var(--spacing-sm);
    color: var(--text-color);
}

.timeline-text p {
    color: var(--text-light);
    margin-bottom: var(--spacing-sm);
    line-height: 1.5;
}

.timeline-badge {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: var(--border-radius-full);
    font-weight: 500;
}

.timeline-event.milestone .timeline-content {
    border-left: 4px solid var(--primary-color);
}

/* Historia w skrócie */
.history-summary {
    background-color: var(--background-color);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-xl);
    margin-top: var(--spacing-xxl);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
}

.history-summary-content {
    max-width: 800px;
}

.history-summary-content h3 {
    font-size: 1.8rem;
    margin-bottom: var(--spacing-md);
    color: var(--primary-color);
}

.history-summary-content p {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: var(--spacing-lg);
}

.history-cta {
    margin-top: var(--spacing-lg);
}

.history-cta .button {
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--border-radius-md);
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.history-cta .button.primary {
    background-color: var(--primary-color);
    color: white;
    border: 2px solid var(--primary-color);
}

.history-cta .button.primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Timeline lat */
.history-timeline-years {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: var(--spacing-lg);
}

.timeline-year {
    background-color: var(--background-alt);
    color: var(--text-color);
    border-radius: var(--border-radius-full);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    position: relative;
    z-index: 1;
    transition: all var(--transition-normal);
}

.timeline-year:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
    background-color: var(--primary-color);
    color: white;
}

.timeline-year.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-md);
}

.timeline-connector {
    flex-grow: 1;
    height: 4px;
    background-color: var(--border-color);
    position: relative;
}

.timeline-connector::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, var(--primary-color), var(--primary-light));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.history-summary:hover .timeline-connector::after {
    transform: scaleX(1);
}

/* Tryb ciemny dla historii */
body.dark-mode .history-section {
    background-color: var(--dark-background);
}

body.dark-mode .history-stat-item {
    background: var(--primary-dark);
}

body.dark-mode .history-stat-number {
    background: linear-gradient(to right, #ffffff, #77b5ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.dark-mode .timeline-content {
    background-color: var(--dark-card);
}

body.dark-mode .timeline-modern::before {
    background-color: rgba(0, 119, 230, 0.2);
}

body.dark-mode .timeline-text h3 {
    color: var(--dark-text);
}

body.dark-mode .timeline-text p {
    color: var(--dark-text);
    opacity: 0.8;
}

body.dark-mode .timeline-badge {
    background-color: var(--primary-light);
}

body.dark-mode .timeline-event.milestone .timeline-content {
    border-left-color: var(--primary-light);
}

body.dark-mode .history-summary {
    background-color: var(--dark-card);
}

body.dark-mode .history-summary-content h3 {
    color: var(--primary-light);
}

body.dark-mode .history-summary-content p {
    color: var(--dark-text);
    opacity: 0.9;
}

body.dark-mode .timeline-year {
    background-color: var(--dark-card);
    color: var(--dark-text);
}

body.dark-mode .timeline-year.active {
    background-color: var(--primary-light);
    color: var(--dark-background);
}

body.dark-mode .timeline-connector {
    background-color: var(--dark-border);
}

body.dark-mode .timeline-connector::after {
    background: linear-gradient(to right, var(--primary-light), var(--primary-color));
}

body.dark-mode .history-cta .button.primary {
    background-color: var(--primary-light);
    border-color: var(--primary-light);
    color: var(--dark-background);
}

body.dark-mode .history-cta .button.primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Responsywność dla historii */
@media (max-width: 768px) {
    .history-stats {
        flex-direction: column;
        align-items: center;
    }
    
    .history-stat-item {
        width: 100%;
        max-width: 300px;
    }
    
    .timeline-content {
        flex-direction: column;
    }
    
    .timeline-icon {
        margin-right: 0;
        margin-bottom: var(--spacing-sm);
    }
    
    .history-timeline-years {
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--spacing-md);
    }
    
    .timeline-year {
        width: 50px;
        height: 50px;
        font-size: 0.9rem;
    }
    
    .timeline-connector {
        width: 50px;
        flex-grow: 0;
    }
}

@media (max-width: 480px) {
    .timeline-event {
        padding-left: 40px;
    }
    
    .timeline-date {
        width: 30px;
        height: 30px;
        font-size: 0.7rem;
    }
    
    .timeline-modern::before,
    .timeline-progress {
        left: 14px;
    }
}