/*
 * TÜRKONFED History Page
 * Timeline. Sharp. Brutal.
 */

/* ============================================
   PAGE HERO COMPACT VARIANT
   ============================================ */

.page-hero-compact {
    min-height: 50vh;
    padding: 7rem 0 4.0rem;
}

/* ============================================
   HISTORY STATS BAR
   ============================================ */

.history-stats {
    background: var(--color-bg-light);
    padding: 0;
    border-bottom: 1px solid var(--color-border);
}

.history-stats-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.history-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 4rem;
    position: relative;
}

.history-stat-value {
    font-family: var(--font-family-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    color: var(--color-text-primary);
    line-height: 1;
}

.history-stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-top: 0.5rem;
}

.history-stat-divider {
    width: 1px;
    height: 60px;
    background: linear-gradient(180deg, transparent, rgba(237, 27, 47, 0.5), transparent);
}

/* ============================================
   TIMELINE SECTION - HORIZONTAL SCROLL
   ============================================ */

.history-timeline {
    padding: 4rem 0 6rem;
    background: var(--color-bg-light);
    position: relative;
    overflow: hidden;
}

.history-timeline::before {
    display: none;
}

.timeline {
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 2rem 3rem 3rem;
    cursor: grab;
}

.timeline:active {
    cursor: grabbing;
}

/* Horizontal track line */
.timeline-track {
    position: absolute;
    top: 5.5rem;
    left: 0;
    right: 0;
    height: 3px;
    width: 100%;
    background: var(--color-border);
}

.timeline-track-fill {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 0%;
    background: var(--color-accent);
    transition: width 0.5s ease;
}

/* ============================================
   TIMELINE ITEMS - HORIZONTAL
   ============================================ */

.timeline-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 320px;
    max-width: 360px;
    flex-shrink: 0;
    padding: 0 1rem;
    position: relative;
}

.timeline-item .timeline-content {
    text-align: center;
    padding: 0;
    width: 100%;
}

.timeline-item .timeline-marker {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    z-index: 2;
    margin-bottom: 1.5rem;
}

/* Remove right-aligned overrides - all items same in horizontal */
.timeline-item-right .timeline-content {
    text-align: center;
    padding: 0;
}

/* Timeline year badge */
.timeline-year {
    font-family: var(--font-family-heading);
    font-size: 0.875rem;
    font-weight: 800;
    color: var(--color-accent);
    background: var(--color-bg-light);
    padding: 0.5rem 1rem;
    border: 2px solid var(--color-accent);
    letter-spacing: 0.05em;
}

/* Timeline dot */
.timeline-dot {
    width: 16px;
    height: 16px;
    background: var(--color-bg-light);
    border: 3px solid var(--color-accent);
    position: relative;
}

.timeline-dot::before {
    content: '';
    position: absolute;
    inset: 3px;
    background: var(--color-accent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.timeline-item:hover .timeline-dot::before {
    opacity: 1;
}

/* Highlight dots */
.timeline-dot-highlight {
    width: 20px;
    height: 20px;
    background: var(--color-accent);
    border: none;
    box-shadow: 0 0 0 4px rgba(237, 27, 47, 0.2);
}

.timeline-dot-highlight::before {
    display: none;
}

/* Future dot */
.timeline-dot-future {
    background: transparent;
    border: 3px dashed var(--color-text-muted);
    animation: pulseFuture 2s ease-in-out infinite;
}

@keyframes pulseFuture {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 1; }
}

/* ============================================
   TIMELINE CARDS
   ============================================ */

.timeline-card {
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    padding: 2rem;
    position: relative;
    transition: all 0.3s ease;
}

/* Accent line */
.timeline-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--color-accent);
    transition: width 0.3s ease;
}

.timeline-item .timeline-card::before,
.timeline-item-right .timeline-card::before {
    left: 0;
}

.timeline-item:hover .timeline-card::before {
    width: 100%;
}

.timeline-item:hover .timeline-card {
    border-color: var(--color-accent);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

/* Highlight cards */
.timeline-card-highlight {
    background: var(--color-bg-white);
    border-color: var(--color-accent);
}

.timeline-card-highlight .timeline-card-title,
.timeline-card-highlight .timeline-card-text {
    color: var(--color-text-primary);
}

.timeline-card-highlight .timeline-card-text {
    color: var(--color-text-secondary);
}

.timeline-card-highlight .timeline-card-stat-label {
    color: var(--color-text-muted);
}

/* Future card */
.timeline-card-future {
    background: var(--color-bg-white);
    border: none;
    text-align: center;
    box-shadow: none;
}

/* Remove the arrow for future card */
.timeline-card-future::before {
    display: none;
}

.timeline-item-future {
    min-width: 280px;
}

.timeline-item-future .timeline-content {
    text-align: center;
    padding: 0;
}

.timeline-item-future .timeline-marker {
    margin-bottom: 1.5rem;
}

.timeline-item-future .timeline-year {
    border-style: dashed;
    color: var(--color-text-muted);
    border-color: var(--color-text-muted);
}

.timeline-item-future .timeline-dot {
    display: none;
}

/* Card header */
.timeline-card-header {
    margin-bottom: 1rem;
}

.timeline-card-tag {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-accent);
    padding: 0.35rem 0.75rem;
    background: rgba(237, 27, 47, 0.08);
}

.timeline-card-highlight .timeline-card-tag {
    background: rgba(237, 27, 47, 0.2);
}

/* Card title */
.timeline-card-title {
    font-family: var(--font-family-heading);
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

/* Card text */
.timeline-card-text {
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
}

/* Card stats */
.timeline-card-stats {
    display: flex;
    gap: 2rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

.timeline-card-highlight .timeline-card-stats {
    border-color: var(--color-border);
}

.timeline-item .timeline-card-stats,
.timeline-item-right .timeline-card-stats {
    justify-content: center;
}

.timeline-card-stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.timeline-card-stat-value {
    font-family: var(--font-family-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-accent);
    line-height: 1;
}

.timeline-card-stat-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

/* ============================================
   CALL TO ACTION
   ============================================ */

.history-cta {
    padding: 6rem 0;
    background: var(--color-bg-light);
    position: relative;
    overflow: hidden;
}

.history-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--color-accent);
}

.history-cta-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.history-cta-title {
    font-family: var(--font-family-heading);
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 800;
    color: var(--color-text-primary);
    margin-bottom: 1rem;
}

.history-cta-text {
    font-size: 1rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.history-cta-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.history-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.history-cta-btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.history-cta-btn-primary {
    background: var(--color-accent);
    color: #fff;
}

.history-cta-btn-primary:hover {
    background: var(--color-accent-dark);
}

.history-cta-btn-primary:hover svg {
    transform: translateX(4px);
}

.history-cta-btn-secondary {
    background: transparent;
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
}

.history-cta-btn-secondary:hover {
    background: var(--color-bg-white);
    border-color: var(--color-text-secondary);
    color: var(--color-text-primary);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 900px) {
    .timeline-item {
        min-width: 280px;
        max-width: 300px;
    }

    .history-stats-grid {
        flex-wrap: wrap;
    }

    .history-stat {
        padding: 1.5rem 2rem;
    }

    .history-stat-divider {
        display: none;
    }
}

@media (max-width: 600px) {
    .page-hero-compact {
        min-height: 40vh;
        padding: var(--header-height) 0 3.0rem;
    }

    .history-stats-grid {
        justify-content: space-around;
    }

    .history-stat {
        flex: 1;
        min-width: 100px;
        padding: 1rem;
    }

    .history-stat-value {
        font-size: 1.75rem;
    }

    .history-timeline {
        padding: 3rem 0 4rem;
    }

    .timeline {
        padding: 2rem 1.5rem 2rem;
    }

    .timeline-item {
        min-width: 250px;
        max-width: 270px;
    }

    .timeline-year {
        font-size: 0.75rem;
        padding: 0.35rem 0.75rem;
    }

    .timeline-dot {
        width: 12px;
        height: 12px;
    }

    .timeline-dot-highlight {
        width: 16px;
        height: 16px;
    }

    .timeline-card {
        padding: 1.5rem;
    }

    .timeline-card-title {
        font-size: 1.125rem;
    }

    .timeline-card-stats {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .history-cta {
        padding: 4rem 0;
    }

    .history-cta-actions {
        flex-direction: column;
    }

    .history-cta-btn {
        justify-content: center;
    }
}

/* ============================================
   REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    .timeline-dot-future {
        animation: none;
    }

    .timeline-card,
    .timeline-dot::before {
        transition: none;
    }

    .timeline-item:hover .timeline-card {
        transform: none;
    }
}

/* ============================================
   SCROLL ANIMATIONS (Optional Enhancement)
   ============================================ */

.timeline-item {
    opacity: 0;
    transform: translateX(30px);
    animation: timelineReveal 0.6s ease forwards;
}

.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.2s; }
.timeline-item:nth-child(3) { animation-delay: 0.3s; }
.timeline-item:nth-child(4) { animation-delay: 0.4s; }
.timeline-item:nth-child(5) { animation-delay: 0.5s; }
.timeline-item:nth-child(6) { animation-delay: 0.6s; }
.timeline-item:nth-child(7) { animation-delay: 0.7s; }
.timeline-item:nth-child(8) { animation-delay: 0.8s; }
.timeline-item:nth-child(9) { animation-delay: 0.9s; }

@keyframes timelineReveal {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .timeline-item {
        opacity: 1;
        transform: none;
        animation: none;
    }
}

/* ============================================
   STORY SECTION
   ============================================ */

.history-story {
    padding: 6rem 0;
    background: var(--color-bg-white);
    border-top: 1px solid var(--color-border);
}

.history-story-header {
    text-align: center;
    margin-bottom: 4rem;
}

.history-story-label {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 0.75rem;
}

.history-story-title {
    font-family: var(--font-family-heading);
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 800;
    color: var(--color-text-primary);
}

.history-story-content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.history-story-block {
    position: relative;
    padding-left: 2rem;
    border-left: 3px solid var(--color-accent);
}

.history-story-block p {
    font-size: 1.0625rem;
    color: var(--color-text-secondary);
    line-height: 1.8;
}

.history-story-block:first-child p::first-letter {
    font-family: var(--font-family-heading);
    font-size: 3rem;
    font-weight: 800;
    color: var(--color-accent);
    float: left;
    line-height: 1;
    margin-right: 0.5rem;
    margin-top: 0.1rem;
}

@media (max-width: 768px) {
    .history-story {
        padding: 4rem 0;
    }

    .history-story-content {
        gap: 1.5rem;
    }

    .history-story-block {
        padding-left: 1.5rem;
    }

    .history-story-block p {
        font-size: 1rem;
    }

    .history-story-block:first-child p::first-letter {
        font-size: 2.5rem;
    }
}

/* Add more timeline items animation delays */
.timeline-item:nth-child(10) { animation-delay: 1s; }
.timeline-item:nth-child(11) { animation-delay: 1.1s; }
.timeline-item:nth-child(12) { animation-delay: 1.2s; }
.timeline-item:nth-child(13) { animation-delay: 1.3s; }
.timeline-item:nth-child(14) { animation-delay: 1.4s; }
.timeline-item:nth-child(15) { animation-delay: 1.5s; }
.timeline-item:nth-child(16) { animation-delay: 1.6s; }
.timeline-item:nth-child(17) { animation-delay: 1.7s; }
.timeline-item:nth-child(18) { animation-delay: 1.8s; }
