/* Timeline & Main Content Layout */
.main-content-section {
    background-color: #fff;
    padding: 60px 0;
}

.container-fluid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.content-wrapper {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

/* Timeline Sidebar */
.timeline-sidebar {
    flex-shrink: 0;
    width: 280px;
}

.timeline-sticky {
    position: sticky;
    top: 120px;
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.timeline-title {
    font-family: 'Patriot', 'Playfair Display', serif;
    font-size: 24px;
    font-weight: 700;
    color: #990000;
    margin-bottom: 24px;
    text-align: center;
}

.timeline {
    position: relative;
    padding-left: 30px;
}

/* Timeline Vertical Line */
.timeline::before {
    content: '';
    position: absolute;
    left: 9px;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background: linear-gradient(180deg, #990000 0%, #F4E9D7 100%);
}

.timeline-item {
    position: relative;
    margin-bottom: 28px;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.timeline-item:hover {
    transform: translateX(5px);
}

.timeline-item:hover .timeline-dot {
    transform: scale(1.4);
    background: #cc0000;
    box-shadow: 0 0 0 6px rgba(153, 0, 0, 0.2);
}

.timeline-item:hover .timeline-label {
    color: #990000;
    font-weight: 600;
}

.timeline-dot {
    position: absolute;
    left: -10px;
    top: 5px;
    width: 20px;
    height: 20px;
    background: #990000;
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(153, 0, 0, 0.3);
    transition: all 0.3s ease;
    z-index: 2;
}

.timeline-item.active .timeline-dot {
    background: #cc0000;
    transform: scale(1.5);
    box-shadow: 0 0 0 8px rgba(153, 0, 0, 0.15);
}

.timeline-label {
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: #333;
    line-height: 1.4;
    transition: all 0.3s ease;
}

.timeline-item.active .timeline-label {
    color: #990000;
    font-weight: 700;
}

/* Heroes Content */
.heroes-content {
    flex: 1;
    min-width: 0;
}

.category-section {
    margin-bottom: 80px;
    scroll-margin-top: 100px;
}

.category-section:last-child {
    margin-bottom: 0;
}

/* Hide categories with no posts */
.category-section[data-post-count="0"] {
    display: none;
}

/* Also hide corresponding timeline items */
.timeline-item[data-has-posts="false"] {
    display: none;
}

.category-header {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 3px solid #990000;
}

.category-name {
    font-family: 'Patriot', 'Playfair Display', serif;
    font-size: 36px;
    font-weight: 800;
    color: #990000;
    margin-bottom: 12px;
}

.category-description {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* Heroes Grid inside category */
.category-section .heroes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

/* Card Footer & Stats */
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e0e0e0;
}

.card-stats {
    display: flex;
    gap: 16px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: #666;
}

.card-stats span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-stats i {
    color: #990000;
    font-size: 13px;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 80px 20px;
}

.no-results i {
    font-size: 64px;
    color: #ccc;
    margin-bottom: 20px;
}

.no-results h3 {
    font-family: 'Patriot', 'Playfair Display', serif;
    font-size: 28px;
    color: #333;
    margin-bottom: 12px;
}

.no-results p {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    color: #666;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .content-wrapper {
        gap: 30px;
    }

    .timeline-sidebar {
        width: 220px;
    }

    .category-section .heroes-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .content-wrapper {
        flex-direction: column;
    }

    .timeline-sidebar {
        width: 100%;
    }

    .timeline-sticky {
        position: relative;
        top: 0;
    }

    .timeline {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        padding-left: 0;
    }

    .timeline::before {
        display: none;
    }

    .timeline-item {
        margin: 0;
        padding: 10px 16px;
        background: #f8f8f8;
        border-radius: 20px;
        border: 2px solid transparent;
        transition: all 0.3s ease;
    }

    .timeline-item:hover,
    .timeline-item.active {
        background: #990000;
        border-color: #990000;
    }

    .timeline-item:hover .timeline-label,
    .timeline-item.active .timeline-label {
        color: #990000;
    }

    .timeline-dot {
        display: none;
    }

    .timeline-label {
        font-size: 14px;
    }

    .category-section {
        margin-bottom: 60px;
    }

    .category-name {
        font-size: 28px;
    }

    .category-section .heroes-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}