/* ============================================================
   HISTORY PAGE — Premium Timeline Styling v2.0
   Builds on top of LAClab Design System (tokens.css)
   ============================================================ */

/* ===== HERO SECTION ===== */
.history-hero {
    position: relative;
    padding: 14rem 2rem 8rem;
    text-align: center;
    overflow: hidden;
}

/* Hero cinematic background image */
.history-hero-bg {
    position: absolute;
    inset: 0;
    background: url('../../assets/images/history-hero-banner.png') center / cover no-repeat;
    opacity: 0.18;
    z-index: 0;
    mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
}

/* Animated gradient overlay on hero */
.history-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(139, 92, 255, 0.18) 0%, transparent 65%),
                radial-gradient(ellipse at 80% 60%, rgba(0, 224, 255, 0.08) 0%, transparent 50%);
    z-index: 0;
    pointer-events: none;
}

.history-hero > * {
    position: relative;
    z-index: 1;
}

/* Floating badge above title */
.history-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 1.4rem;
    background: rgba(139, 92, 255, 0.12);
    border: 1px solid rgba(139, 92, 255, 0.35);
    border-radius: 100px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--brand-purple);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 2rem;
    animation: badgePulse 3s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(139, 92, 255, 0); }
    50% { box-shadow: 0 0 20px 4px rgba(139, 92, 255, 0.2); }
}

.history-hero h1 {
    font-size: clamp(3rem, 10vw, 6.5rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.75) 50%, var(--brand-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -3px;
    line-height: 1;
    animation: titleReveal 1s ease-out both;
}

@keyframes titleReveal {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.history-hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto 3.5rem;
    line-height: 1.7;
    animation: titleReveal 1s ease-out 0.2s both;
}

/* Hero Stats Row */
.history-hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    animation: titleReveal 1s ease-out 0.4s both;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.hero-stat-value {
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--brand-cyan), var(--brand-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.hero-stat-label {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.5;
    cursor: pointer;
    transition: opacity 0.2s;
    z-index: 5;
}

.scroll-indicator:hover { opacity: 1; }

.scroll-icon {
    font-size: 1.5rem;
    color: var(--brand-cyan);
    animation: scrollBounce 1.5s ease-in-out infinite;
}

.scroll-indicator-mouse {
    width: 24px;
    height: 38px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    position: relative;
    display: flex;
    justify-content: center;
    transition: border-color 0.2s;
}

.scroll-indicator:hover .scroll-indicator-mouse {
    border-color: var(--brand-cyan);
}

.scroll-indicator-mouse::after {
    content: '';
    width: 4px;
    height: 8px;
    background: var(--brand-cyan);
    border-radius: 2px;
    margin-top: 6px;
    animation: scrollBounce 1.5s ease-in-out infinite;
}



.scroll-indicator span {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(6px); opacity: 0.3; }
}

/* ===== FLOATING CHAPTER NAVIGATOR ===== */
.floating-chapter-nav {
    position: fixed;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    opacity: 0;
    transition: opacity 0.5s;
}

.floating-chapter-nav.visible {
    opacity: 1;
}

.chapter-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.chapter-dot::before {
    content: attr(data-label);
    position: absolute;
    right: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    font-size: 0.72rem;
    color: rgba(255,255,255,0.6);
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    background: rgba(10, 10, 31, 0.85);
    backdrop-filter: blur(10px);
    padding: 0.3rem 0.7rem;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
}

.chapter-dot:hover::before,
.chapter-dot.active::before {
    opacity: 1;
}

.chapter-dot.active {
    background: var(--brand-cyan);
    border-color: var(--brand-cyan);
    box-shadow: 0 0 10px rgba(0, 224, 255, 0.6);
    transform: scale(1.4);
}

.chapter-dot:hover:not(.active) {
    background: rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.4);
}

/* ===== INTRODUCTION STRIP ===== */
.history-intro-strip {
    max-width: 800px;
    margin: 0 auto 6rem;
    padding: 2.5rem 3rem;
    background: rgba(139, 92, 255, 0.05);
    border: 1px solid rgba(139, 92, 255, 0.15);
    border-radius: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.history-intro-strip::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--brand-purple), transparent);
}

.history-intro-strip p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin: 0;
}

.history-intro-strip-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--brand-purple), var(--brand-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== TIMELINE ===== */
.timeline-container {
    position: relative;
    max-width: 1100px;
    margin: 0 auto 4rem;
    padding: 0 2rem;
}

/* The Central Vertical Path */
.timeline-path {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom,
        transparent,
        rgba(139, 92, 255, 0.5) 8%,
        rgba(139, 92, 255, 0.5) 92%,
        transparent);
    transform: translateX(-50%);
}

/* Animated progress line */
.timeline-progress-line {
    position: absolute;
    left: 50%;
    top: 0;
    width: 2px;
    height: 0%;
    background: linear-gradient(to bottom, var(--brand-purple), var(--brand-cyan));
    box-shadow: 0 0 12px rgba(0, 224, 255, 0.5);
    transform: translateX(-50%);
    transition: height 0.1s linear;
    z-index: 2;
}

/* Milestone Items */
.timeline-item {
    position: relative;
    margin-bottom: 7rem;
    width: 100%;
    display: flex;
    justify-content: flex-end;
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.timeline-item:nth-child(even) {
    justify-content: flex-start;
    transform: translateX(-40px);
}

.timeline-item.active {
    opacity: 1;
    transform: translateX(0);
}

/* Milestone Dot */
.timeline-dot {
    position: absolute;
    left: 50%;
    top: 2rem;
    width: 22px;
    height: 22px;
    background: var(--bg-dark);
    border: 3px solid rgba(139, 92, 255, 0.5);
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 10;
    transition: all 0.4s ease;
}

.timeline-dot::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: transparent;
    transition: background 0.4s ease;
}

.timeline-item.active .timeline-dot {
    border-color: var(--brand-cyan);
    box-shadow: 0 0 0 4px rgba(0, 224, 255, 0.12), 0 0 20px rgba(0, 224, 255, 0.5);
}

.timeline-item.active .timeline-dot::after {
    background: var(--brand-cyan);
}

/* Year connector lines */
.timeline-item::before {
    content: '';
    position: absolute;
    left: 50%;
    top: calc(2rem + 11px);
    width: 50px;
    height: 1px;
    background: rgba(255,255,255,0.1);
}

.timeline-item:nth-child(even)::before {
    left: auto;
    right: 50%;
}

/* ===== TIMELINE CARD ===== */
.timeline-card {
    width: 44%;
    background: rgba(10, 10, 31, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(24px);
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.timeline-card:hover {
    border-color: rgba(0, 224, 255, 0.25);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), 0 0 40px rgba(0, 224, 255, 0.06);
    transform: translateY(-6px);
}

/* Top shimmer line */
.timeline-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--card-accent, var(--brand-purple)), transparent);
    opacity: 0.8;
}

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

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    filter: saturate(0.8) brightness(0.85);
}

.timeline-card:hover .card-image img {
    transform: scale(1.05);
    filter: saturate(1) brightness(0.95);
}

.card-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 10, 31, 0.85) 0%, transparent 50%);
}

/* Card Image Placeholder (icon-based) */
.card-image-placeholder {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(139, 92, 255, 0.08) 0%, rgba(0, 224, 255, 0.04) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 4rem;
    color: var(--card-accent, var(--brand-purple));
    opacity: 0.3;
}

/* Video Embed */
.card-video {
    width: 100%;
    position: relative;
    overflow: hidden;
}

.card-video-thumb {
    width: 100%;
    height: 180px;
    background: #000;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.card-video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
    transition: opacity 0.3s, transform 0.5s;
}

.card-video-thumb:hover img {
    opacity: 0.9;
    transform: scale(1.05);
}

.card-video-play {
    position: absolute;
    width: 56px;
    height: 56px;
    background: rgba(255, 0, 0, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: white;
    z-index: 2;
    transition: transform 0.3s, background 0.3s;
    box-shadow: 0 8px 24px rgba(255, 0, 0, 0.5);
}

.card-video-play i {
    margin-left: 4px;
}

.card-video-thumb:hover .card-video-play {
    transform: scale(1.1);
    background: red;
}

.card-video-label {
    position: absolute;
    bottom: 0.75rem;
    left: 1rem;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.7);
    font-weight: 600;
    z-index: 2;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
    background: rgba(0,0,0,0.5);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.card-video-expanded {
    display: none;
    position: relative;
    padding-top: 56.25%; /* 16:9 */
}

.card-video-expanded iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.card-video-thumb.hidden {
    display: none;
}

.card-video-expanded.visible {
    display: block;
}

/* Card Body */
.card-body {
    padding: 1.75rem 2rem 2rem;
}

/* Top tag row */
.card-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.card-year {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.9rem;
    background: rgba(139, 92, 255, 0.1);
    border: 1px solid rgba(139, 92, 255, 0.25);
    color: var(--brand-purple);
    border-radius: 100px;
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.05em;
}

.card-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.75rem;
    background: rgba(0, 224, 255, 0.08);
    border: 1px solid rgba(0, 224, 255, 0.2);
    color: var(--brand-cyan);
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Category badge */
.card-category {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
    opacity: 0.9;
}

.timeline-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.9rem;
    line-height: 1.25;
    letter-spacing: -0.5px;
}

.timeline-card .card-description {
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.75;
    font-size: 0.93rem;
    margin: 0 0 1.25rem;
}

/* Stat Pills */
.card-stats {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.card-stat-pill {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.stat-pill-label {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.stat-pill-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Card Icon (decorative background) */
.card-bg-icon {
    position: absolute;
    bottom: 1rem;
    right: 1.5rem;
    font-size: 5rem;
    opacity: 0.04;
    color: var(--brand-cyan);
    pointer-events: none;
}

/* ===== CLOSING SECTION ===== */
.history-closing {
    position: relative;
    padding: 8rem 2rem 10rem;
    text-align: center;
    overflow: hidden;
}

.history-closing::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 50%, rgba(0, 224, 255, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.history-closing h2 {
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -1.5px;
    background: linear-gradient(135deg, #fff, rgba(255,255,255,0.7));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.history-closing p {
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto 3rem;
    line-height: 1.7;
}

.history-cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-history-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 2.2rem;
    background: linear-gradient(135deg, var(--brand-purple), var(--brand-indigo));
    color: white;
    font-weight: 700;
    border-radius: 14px;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s;
    box-shadow: 0 8px 24px rgba(139, 92, 255, 0.35);
}

.btn-history-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(139, 92, 255, 0.5);
}

.btn-history-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 2.2rem;
    background: rgba(255, 255, 255, 0.06);
    color: white;
    font-weight: 700;
    border-radius: 14px;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-history-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

/* ===== AMBIENT GLOW ORBS ===== */
.history-bg-glow {
    position: fixed;
    width: 70vw;
    height: 70vw;
    background: radial-gradient(circle, rgba(139, 92, 255, 0.04) 0%, transparent 70%);
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: -1;
}

.glow-orb {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
    filter: blur(80px);
    animation: orbFloat 8s ease-in-out infinite;
}

.glow-orb-1 {
    width: 400px;
    height: 400px;
    background: rgba(139, 92, 255, 0.06);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.glow-orb-2 {
    width: 300px;
    height: 300px;
    background: rgba(0, 224, 255, 0.04);
    bottom: 20%;
    left: -80px;
    animation-delay: -4s;
}

@keyframes orbFloat {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-30px) scale(1.05); }
}

/* ===== MOBILE RESPONSIVENESS ===== */
@media (max-width: 768px) {
    .timeline-path, .timeline-progress-line {
        left: 28px;
    }

    .timeline-dot {
        left: 28px;
    }

    .timeline-item, .timeline-item:nth-child(even) {
        justify-content: flex-start;
        padding-left: 56px;
        margin-bottom: 4rem;
        transform: translateY(30px);
    }

    .timeline-item::before, .timeline-item:nth-child(even)::before {
        display: none;
    }

    .timeline-card {
        width: 100%;
    }

    .history-hero {
        padding-top: 9rem;
        padding-bottom: 7rem;
    }

    .history-hero-stats {
        gap: 2rem;
    }

    .floating-chapter-nav {
        display: none;
    }

    .card-body {
        padding: 1.25rem 1.5rem 1.5rem;
    }

    .card-image, .card-image-placeholder, .card-video-thumb {
        height: 150px;
    }
}
