/* ==================================================
   HISTORIE – Skip-link
================================================== */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: #fff;
    padding: 8px 14px;
    border-radius: 0 0 8px 0;
    text-decoration: none;
    font-weight: 700;
    z-index: 9999;
    transition: top 0.2s ease;
}
.skip-link:focus {
    top: 0;
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* ==================================================
   HISTORIE – Reveal animace
================================================== */
.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    transition-delay: var(--reveal-delay, 0ms);
}
.reveal.is-visible {
    opacity: 1;
    transform: none; /* b.259: ne translateY(0) — zachová subpixel AA */
}
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* HERO – sjednoceno do .page-hero v css/style.css */

/* ==================================================
   HISTORIE – Sekce
================================================== */
.history-section {
    padding-top: 8px;
    padding-bottom: 56px;
}

/* ==================================================
   HISTORIE – Stat čísla (karty)
================================================== */
.history-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 44px;
}

.history-stat {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 26px 18px 22px;
    background: #fff;
    border: 1px solid #e1ecf9;
    border-radius: var(--radius-lg);
    text-align: center;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.history-stat::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), #1565d8);
    transform: scaleX(0.4);
    transform-origin: left center;
    transition: transform 0.35s ease;
}

.history-stat:hover {
    transform: translateY(-4px);
    border-color: #c8ddf5;
    box-shadow: 0 14px 32px rgba(0, 82, 194, 0.14);
}

.history-stat:hover::before {
    transform: scaleX(1);
}

.history-stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ebf2fa 0%, #d8e6f8 100%);
    color: var(--primary-color);
    margin-bottom: 4px;
}

.history-stat-number {
    font-size: 2.6rem;
    font-weight: 900;
    color: var(--primary-color);
    line-height: 1;
    letter-spacing: -0.04em;
}

.history-stat-label {
    font-size: 0.74rem;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ==================================================
   HISTORIE – Úvodní text
================================================== */
.history-lead {
    font-size: 1.04rem;
    line-height: 1.78;
    color: #3d4a5c;
    margin-bottom: 36px;
}

.history-lead strong {
    color: var(--primary-color);
    font-weight: 800;
}

/* ==================================================
   HISTORIE – Section header (separator)
================================================== */
.history-section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0 0 32px;
}

.history-section-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, #d8e2ee, transparent);
}

.history-section-text {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--primary-color);
    white-space: nowrap;
}

/* ==================================================
   HISTORIE – Timeline
================================================== */
.history-timeline {
    position: relative;
    padding-left: 44px;
    margin-bottom: 48px;
}

/* Svislá osa s gradientem */
.history-timeline::before {
    content: "";
    position: absolute;
    top: 8px;
    bottom: 8px;
    left: 13px;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary-color) 0%, #6ba1de 60%, #c8ddf5 100%);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    padding-bottom: 36px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

/* Tečka / ikona na ose */
.timeline-dot {
    position: absolute;
    left: -38px;
    top: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px var(--primary-color), 0 4px 10px rgba(0, 82, 194, 0.20);
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.timeline-item:hover .timeline-dot {
    transform: scale(1.15);
}

/* Highlight tečka – větší a s ikonou */
.timeline-item--highlight .timeline-dot {
    width: 32px;
    height: 32px;
    left: -47px;
    top: -2px;
    background: linear-gradient(135deg, var(--primary-color), #1565d8);
    color: #fff;
    box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgba(0, 82, 194, 0.18), 0 6px 18px rgba(0, 82, 194, 0.35);
}

.timeline-item--highlight:hover .timeline-dot {
    transform: scale(1.08);
    box-shadow: 0 0 0 3px #fff, 0 0 0 6px rgba(0, 82, 194, 0.28), 0 8px 22px rgba(0, 82, 194, 0.45);
}

/* Karta s obsahem */
.timeline-content {
    position: relative;
    padding: 18px 22px;
    background: #fff;
    border: 1px solid #e8eef7;
    border-radius: var(--radius-lg);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.timeline-content::before {
    content: "";
    position: absolute;
    left: -8px;
    top: 14px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 8px 8px 8px 0;
    border-color: transparent #e8eef7 transparent transparent;
}

.timeline-content::after {
    content: "";
    position: absolute;
    left: -7px;
    top: 14px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 8px 8px 8px 0;
    border-color: transparent #fff transparent transparent;
}

.timeline-item:hover .timeline-content {
    transform: translateX(4px);
    border-color: #c8ddf5;
    box-shadow: 0 12px 28px rgba(0, 82, 194, 0.10);
}

.timeline-item--highlight .timeline-content {
    background: linear-gradient(135deg, #fff 0%, #fafcff 100%);
    border-color: #d8e6f8;
    box-shadow: 0 6px 18px rgba(0, 82, 194, 0.06);
}

/* Hlavička karty */
.timeline-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.timeline-year-label {
    font-size: 0.98rem;
    font-weight: 900;
    color: var(--primary-color);
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.timeline-item--highlight .timeline-year-label {
    font-size: 1.1rem;
}

.timeline-tag {
    display: inline-block;
    padding: 3px 11px;
    background: #ebf2fa;
    color: var(--primary-color);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-radius: 999px;
}

.timeline-item--highlight .timeline-tag {
    background: linear-gradient(135deg, var(--primary-color), #1565d8);
    color: #fff;
    box-shadow: 0 2px 6px rgba(0, 82, 194, 0.25);
}

/* Obsah karty */
.timeline-content h3 {
    margin: 0 0 8px;
    font-size: 1.08rem;
    font-weight: 800;
    color: var(--text-color);
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.timeline-item--highlight .timeline-content h3 {
    font-size: 1.14rem;
    color: var(--primary-color);
}

.timeline-content p {
    margin: 0;
    font-size: 0.94rem;
    line-height: 1.7;
    color: #4b5a6e;
}

.timeline-content p strong {
    color: var(--primary-color);
    font-weight: 800;
}

/* ==================================================
   HISTORIE – Zdroj / poznámka
================================================== */
.history-source {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 22px;
    background: linear-gradient(135deg, #f8fafc 0%, #f0f5fb 100%);
    border: 1px solid #e2ecf8;
    border-radius: var(--radius-lg);
    font-size: 0.86rem;
    color: #6b7280;
    line-height: 1.65;
}

.history-source-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #d8e2ee;
    color: var(--primary-color);
}

.history-source p {
    margin: 0;
}

.history-source a {
    color: var(--primary-color);
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.history-source a:hover {
    border-bottom-color: var(--primary-color);
}

/* ==================================================
   Responsive – tablet
================================================== */
@media (max-width: 750px) {
    .history-stats {
        gap: 10px;
    }

    .history-stat {
        padding: 22px 14px 18px;
    }

    .history-stat-number {
        font-size: 2.2rem;
    }
}

/* ==================================================
   Responsive – mobil
================================================== */
@media (max-width: 540px) {
    .history-stats {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .history-stat {
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        gap: 14px;
        padding: 16px 18px;
        text-align: left;
    }

    .history-stat-icon {
        margin-bottom: 0;
    }

    .history-stat-number {
        font-size: 1.85rem;
        min-width: 70px;
    }

    .history-stat-label {
        text-align: left;
        line-height: 1.3;
    }

    .history-section-header {
        margin-bottom: 24px;
    }

    .history-section-text {
        font-size: 0.72rem;
        letter-spacing: 0.12em;
    }

    .history-timeline {
        padding-left: 32px;
        margin-bottom: 36px;
    }

    .history-timeline::before {
        left: 9px;
    }

    .timeline-dot {
        left: -30px;
        top: 6px;
        width: 12px;
        height: 12px;
    }

    .timeline-item--highlight .timeline-dot {
        width: 26px;
        height: 26px;
        left: -37px;
        top: 0;
    }

    .timeline-item--highlight .timeline-dot svg {
        width: 12px;
        height: 12px;
    }

    .timeline-content {
        padding: 14px 16px;
    }

    .timeline-content::before,
    .timeline-content::after {
        display: none;
    }

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

    .timeline-item--highlight .timeline-content h3 {
        font-size: 1.05rem;
    }

    .history-source {
        padding: 14px 16px;
        gap: 12px;
        font-size: 0.82rem;
    }

    .history-source-icon {
        width: 32px;
        height: 32px;
    }
}
