/* ============================
   History Page - Hero
   ============================ */
.history-hero {
    position: relative;
    min-height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: #0a0a0a;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.history-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.7) 0%,
        rgba(0, 0, 0, 0.85) 60%,
        #0d0d0d 100%
    );
    z-index: 1;
}

.history-hero .container {
    position: relative;
    z-index: 2;
}

.history-hero-content {
    max-width: 700px;
    margin: 0 auto;
}

.history-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #c41e3a;
    margin-bottom: 20px;
}

.history-title {
    font-size: 56px;
    font-weight: 900;
    color: #fff;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.history-intro {
    font-size: 18px;
    line-height: 1.7;
    color: #999;
    max-width: 560px;
    margin: 0 auto;
}

/* Scroll cue */
.history-scroll-cue {
    margin-top: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.history-scroll-cue span {
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #555;
}

.scroll-line {
    width: 2px;
    height: 40px;
    background: linear-gradient(to bottom, #c41e3a, transparent);
    animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
    50% { opacity: 1; transform: scaleY(1); }
}

/* ============================
   Timeline Section
   ============================ */
.history-timeline-section {
    position: relative;
    padding: 0px 0 120px;
    background: #0d0d0d;
    overflow: hidden;
}

/* Subtle background glow */
.timeline-bg-glow {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 800px;
    background: radial-gradient(ellipse, rgba(196, 30, 58, 0.04) 0%, transparent 70%);
    pointer-events: none;
}

.timeline-wrapper {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
}

/* ============================
   Center Line
   ============================ */
.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    transform: translateX(-50%);
    background: #1a1a1a;
}

.timeline-line-fill {
    width: 100%;
    height: 0%;
    background: linear-gradient(to bottom, #c41e3a, #8b1125);
    transition: height 0.1s linear;
}

/* ============================
   Timeline Item
   ============================ */
.timeline-item {
    position: relative;
    width: 50%;
    padding: 0 0 80px;
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Left items */
.timeline-left {
    left: 0;
    padding-right: 60px;
    transform: translateX(-40px);
}

/* Right items */
.timeline-right {
    left: 50%;
    padding-left: 60px;
    transform: translateX(40px);
}

.timeline-right .timeline-card-body {
    text-align: right;
}

.timeline-right .timeline-card-header {
    justify-content: flex-end;
}

/* Revealed state */
.timeline-item.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* ============================
   Timeline Dot
   ============================ */
.timeline-dot {
    position: absolute;
    top: 30px;
    width: 18px;
    height: 18px;
    z-index: 5;
}

.timeline-left .timeline-dot {
    right: -9px;
}

.timeline-right .timeline-dot {
    left: -9px;
}

.timeline-dot-inner {
    display: block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #c41e3a;
    border: 3px solid #0d0d0d;
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
}

.timeline-item.revealed .timeline-dot-inner {
    animation: dot-pop 0.4s ease 0.3s both;
}

@keyframes dot-pop {
    0% { transform: scale(0); }
    60% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Ping animation on dot */
.timeline-dot-ping {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid #c41e3a;
    opacity: 0;
    z-index: 1;
}

.timeline-item.revealed .timeline-dot-ping {
    animation: dot-ping 1.5s ease 0.6s both;
}

@keyframes dot-ping {
    0% { transform: scale(0.5); opacity: 0.8; }
    100% { transform: scale(2.5); opacity: 0; }
}

/* ============================
   Connector Arm (card to dot)
   ============================ */
.timeline-connector {
    position: absolute;
    top: 38px;
    height: 2px;
    background: #c41e3a;
    width: 0;
    transition: width 0.4s ease 0.2s;
}

.timeline-left .timeline-connector {
    right: 0;
}

.timeline-right .timeline-connector {
    left: 0;
}

.timeline-item.revealed .timeline-connector {
    width: 40px;
}

/* ============================
   Timeline Card
   ============================ */
.timeline-card {
    position: relative;
    background: #151515;
    border: 1px solid #222;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.timeline-card:hover {
    border-color: #333;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    transform: translateY(-4px);
}

/* Card image */
.timeline-card-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

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

.timeline-card:hover .timeline-card-image img {
    transform: scale(1.05);
}

.timeline-card-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #151515 0%, transparent 60%);
}

/* Card body */
.timeline-card-body {
    padding: 28px 28px 32px;
}

.timeline-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.timeline-era-number {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #c41e3a;
    background: rgba(196, 30, 58, 0.1);
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid rgba(196, 30, 58, 0.2);
}

.timeline-year {
    font-size: 13px;
    font-weight: 700;
    color: #666;
    font-variant-numeric: tabular-nums;
}

.timeline-card-title {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 6px;
}

.timeline-card-subtitle {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #c41e3a;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.timeline-card-text {
    font-size: 15px;
    line-height: 1.8;
    color: #999;
    font-style: italic;
}

.timeline-card-text p:last-child {
    margin-bottom: 0;
}

/* ============================
   Timeline End
   ============================ */
.timeline-end {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 20px;
}

.timeline-end .timeline-dot {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
}

.timeline-end-label {
    margin-top: 16px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #555;
}

/* ============================
   History CTA
   ============================ */
.history-cta {
    background: #111;
    padding: 80px 0;
    text-align: center;
    border-top: 1px solid #1a1a1a;
}

.history-cta-inner {
    max-width: 500px;
    margin: 0 auto;
}

.history-cta h2 {
    font-size: 32px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 12px;
}

.history-cta p {
    font-size: 16px;
    color: #777;
    margin-bottom: 32px;
    line-height: 1.6;
}

.btn-history-cta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 40px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-decoration: none;
    color: #fff;
    background: #c41e3a;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-history-cta:hover {
    background: #e0223f;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(196, 30, 58, 0.3);
}

.btn-history-cta svg {
    transition: transform 0.3s ease;
}

.btn-history-cta:hover svg {
    transform: translateX(4px);
}

/* ============================
   Responsive - Tablet
   ============================ */
@media (max-width: 900px) {
    .history-title {
        font-size: 40px;
    }
    
    .history-hero {
        min-height: 50vh;
    }
    
    /* Single column timeline */
    .timeline-line {
        left: 24px;
    }
    
    .timeline-item {
        width: 100%;
        left: 0 !important;
        padding-left: 60px !important;
        padding-right: 0 !important;
        transform: translateY(30px);
    }
    
    .timeline-item.revealed {
        transform: translateY(0);
    }
    
    .timeline-dot {
        left: 15px !important;
        right: auto !important;
    }
    
    .timeline-connector {
        left: 0 !important;
        right: auto !important;
    }
    
    .timeline-end {
        padding-left: 60px;
    }
    
    .timeline-end .timeline-dot {
        position: absolute;
        left: 15px;
    }
    
    .timeline-card-body {
        padding: 22px;
    }
    
    .timeline-card-title {
        font-size: 20px;
    }
    
    .timeline-card-image {
        height: 160px;
    }
}

/* ============================
   Responsive - Mobile
   ============================ */
@media (max-width: 480px) {
    .history-hero {
        min-height: 45vh;
    }
    
    .history-title {
        font-size: 32px;
    }
    
    .history-intro {
        font-size: 15px;
    }
    
    .history-timeline-section {
        padding: 50px 0 80px;
    }
    
    .timeline-line {
        left: 16px;
    }
    
    .timeline-item {
        padding-left: 44px !important;
        padding-bottom: 50px;
    }
    
    .timeline-dot {
        left: 7px !important;
    }
    
    .timeline-card-body {
        padding: 18px;
    }
    
    .timeline-card-title {
        font-size: 18px;
    }
    
    .timeline-card-text {
        font-size: 14px;
    }
    
    .timeline-card-image {
        height: 140px;
    }
    
    .timeline-end {
        padding-left: 44px;
    }
    
    .timeline-end .timeline-dot {
        left: 7px;
    }
    
    .history-cta {
        padding: 60px 0;
    }
    
    .history-cta h2 {
        font-size: 24px;
    }
}

@media (max-width: 900px) {
    .timeline-connector {
        display: none;
    }
    
    .timeline-item.timeline-right .timeline-card-body {
        text-align: left;
    }
    
    .timeline-item.timeline-right .timeline-card-header {
        justify-content: flex-start;
    }
}