/**
 * HENX3 News Timeline Styles
 * Twitter/X-style timeline design
 */

/* Section */
.news-timeline-section {
    padding: 6rem 3rem;
    position: relative;
    overflow: hidden;
}

.news-timeline-container {
    max-width: 800px;
    margin: 0 auto;
}

/* Header */
.news-timeline-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.news-timeline-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.news-timeline-title em {
    font-style: italic;
    color: #3B82F6;
}

.news-timeline-subtitle {
    font-size: 1rem;
    color: var(--text-dim);
}

/* Filter Tabs */
.news-timeline-filters {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.news-filter-tab {
    padding: 0.625rem 1.25rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    color: var(--text-dim);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.news-filter-tab:hover {
    border-color: rgba(59, 130, 246, 0.3);
    color: var(--text);
}

.news-filter-tab.active {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.4);
    color: #3B82F6;
}

/* Timeline Container */
.news-timeline {
    position: relative;
}

/* Timeline Line */
.news-timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(
        180deg,
        rgba(59, 130, 246, 0.4) 0%,
        rgba(59, 130, 246, 0.1) 100%
    );
    border-radius: 1px;
}

/* Timeline Item */
.news-timeline-item {
    position: relative;
    padding-left: 40px;
    padding-bottom: 2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.news-timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.news-timeline-item:last-child {
    padding-bottom: 0;
}

/* Timeline Dot */
.news-timeline-dot {
    position: absolute;
    left: 0;
    top: 4px;
    width: 18px;
    height: 18px;
    background: var(--news-color, #3B82F6);
    border: 3px solid var(--bg, #09090b);
    border-radius: 50%;
    z-index: 1;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-timeline-item:hover .news-timeline-dot {
    transform: scale(1.2);
    box-shadow: 0 0 0 4px rgba(var(--news-color-rgb, 59, 130, 246), 0.2);
}

/* Timeline Card */
.news-timeline-card {
    background: rgba(15, 15, 20, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.news-timeline-card:hover {
    border-color: rgba(var(--news-color-rgb, 59, 130, 246), 0.3);
    transform: translateX(4px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* Card Header */
.news-timeline-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.news-timeline-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    background: var(--news-color, #3B82F6);
    border-radius: 100px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: white;
}

.news-timeline-badge svg {
    width: 12px;
    height: 12px;
}

.news-timeline-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Card Content */
.news-timeline-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
}

.news-timeline-card-text {
    font-size: 0.9375rem;
    color: var(--text-dim);
    line-height: 1.6;
    margin: 0 0 1rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Card Link */
.news-timeline-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--news-color, #3B82F6);
    text-decoration: none;
    transition: gap 0.2s ease;
}

.news-timeline-link:hover {
    gap: 0.75rem;
}

.news-timeline-link svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.news-timeline-link:hover svg {
    transform: translateX(2px);
}

/* Video Preview */
.news-timeline-video {
    margin-bottom: 1rem;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.news-timeline-video img {
    width: 100%;
    height: auto;
    display: block;
}

.news-timeline-video-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.news-timeline-card:hover .news-timeline-video-play {
    opacity: 1;
}

.news-timeline-video-play svg {
    width: 48px;
    height: 48px;
    color: white;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

/* Empty State */
.news-timeline-empty {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
}

.news-timeline-empty svg {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.news-timeline-empty p {
    font-size: 0.9375rem;
}

/* Load More */
.news-timeline-load-more {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.news-load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 100px;
    color: var(--text-dim);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.news-load-more-btn:hover {
    border-color: rgba(59, 130, 246, 0.4);
    color: #3B82F6;
}

.news-load-more-btn svg {
    width: 16px;
    height: 16px;
}

/* Mobile Horizontal Scroll Mode */
@media (max-width: 640px) {
    .news-timeline-section {
        padding: 4rem 0;
    }

    .news-timeline-container {
        max-width: none;
        padding: 0 1.5rem;
    }

    .news-timeline-filters {
        padding: 0 1.5rem;
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        gap: 0.375rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin-bottom: 1.5rem;
    }

    .news-timeline-filters::-webkit-scrollbar {
        display: none;
    }

    .news-filter-tab {
        flex-shrink: 0;
        padding: 0.5rem 1rem;
        font-size: 0.8125rem;
    }

    /* Horizontal Card Scroll */
    .news-timeline {
        display: flex;
        gap: 1rem;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 0 1.5rem 1rem;
        margin: 0 -1.5rem;
    }

    .news-timeline::-webkit-scrollbar {
        display: none;
    }

    .news-timeline::before {
        display: none;
    }

    .news-timeline-item {
        flex: 0 0 85%;
        max-width: 320px;
        padding: 0;
        scroll-snap-align: start;
        opacity: 1;
        transform: none;
    }

    .news-timeline-dot {
        display: none;
    }

    .news-timeline-card {
        height: 100%;
    }

    .news-timeline-card-text {
        -webkit-line-clamp: 2;
    }

    /* Scroll Indicators */
    .news-timeline-scroll-hint {
        display: flex;
        justify-content: center;
        gap: 0.5rem;
        margin-top: 1rem;
        padding: 0 1.5rem;
    }

    .news-scroll-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.2);
        transition: all 0.2s ease;
    }

    .news-scroll-dot.active {
        background: #3B82F6;
        width: 24px;
        border-radius: 4px;
    }
}

/* Tablet */
@media (min-width: 641px) and (max-width: 1024px) {
    .news-timeline-section {
        padding: 5rem 2rem;
    }
}

/* Animation delay for staggered reveal */
.news-timeline-item:nth-child(1) { transition-delay: 0s; }
.news-timeline-item:nth-child(2) { transition-delay: 0.1s; }
.news-timeline-item:nth-child(3) { transition-delay: 0.2s; }
.news-timeline-item:nth-child(4) { transition-delay: 0.3s; }
.news-timeline-item:nth-child(5) { transition-delay: 0.4s; }

/* News Type Colors */
.news-timeline-item[data-type="news"] {
    --news-color: #3B82F6;
    --news-color-rgb: 59, 130, 246;
}

.news-timeline-item[data-type="announcement"] {
    --news-color: #8B5CF6;
    --news-color-rgb: 139, 92, 246;
}

.news-timeline-item[data-type="update"] {
    --news-color: #10B981;
    --news-color-rgb: 16, 185, 129;
}

.news-timeline-item[data-type="offer"] {
    --news-color: #F59E0B;
    --news-color-rgb: 245, 158, 11;
}
