/* /app/static/significantstories_com/css/toc-cards.css */
/* Stories page - Visual Cards Layout (Alternative) */

/* --- Layout Toggle Link --- */
.layout-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #5a6a7a;
    text-decoration: none;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #f8f9fa;
    transition: all 0.2s ease;
    margin-top: 1rem;
}

.layout-toggle:hover {
    color: #3498db;
    border-color: #3498db;
    background-color: #f0f7fc;
}

.layout-toggle svg {
    opacity: 0.7;
}

/* --- Cards Content Container --- */
.stories-cards-content {
    max-width: 900px;
    margin: 0 auto;
}

/* --- Series Card (Visual) --- */
.series-card-visual {
    background-color: #ffffff;
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 16px;
    margin-bottom: 2rem;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.series-card-header {
    padding: 2rem 2rem 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 1px solid #ecf0f1;
}

.series-card-header h2 {
    font-family: var(--serif-font);
    font-size: 1.75rem;
    color: #2c3e50;
    margin: 0 0 0.5rem 0;
    font-weight: 600;
}

.series-card-header p {
    font-size: 1rem;
    color: #5a6a7a;
    margin: 0;
    line-height: 1.6;
}

/* --- Topic Tabs --- */
.topics-tabs {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem 1.5rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid #ecf0f1;
}

.topic-tab {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 0.75rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: #5a6a7a;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
}

.topic-tab:hover {
    color: #3498db;
    background-color: rgba(52, 152, 219, 0.08);
}

.topic-tab.active {
    color: #34495e;
    background-color: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* --- Articles List --- */
.articles-grid-container {
    padding: 1rem 1.5rem 1.5rem;
}

.articles-grid {
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    padding-left: 1rem;
    border-left: 2px solid #e8eef3;
}

.articles-grid.active {
    display: flex;
}

/* --- Article Card (List Style like Accordion) --- */
.article-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0.625rem 0.875rem;
    background-color: #f0f4f8;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    gap: 0.75rem;
}

.article-card:hover {
    background-color: #e8f4fc;
}

.article-card-title {
    font-size: 0.95rem;
    font-weight: 500;
    color: #34495e;
    line-height: 1.4;
    flex: 1;
    transition: color 0.2s ease;
}

.article-card:hover .article-card-title {
    color: #3498db;
}

.article-card-arrow {
    display: none;
}

/* --- Article Badges --- */
.article-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.article-badge.start-here {
    background-color: #d4edda;
    color: #155724;
}

.article-badge.or-here {
    background-color: #fff3cd;
    color: #856404;
}

/* --- Topic Tab with Practice Icons --- */
.topic-tab-title {
    /* Default display */
}

.topic-tab-practices {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-left: 0.5rem;
}

.topic-tab-practice-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: #8b7355;
    opacity: 0.7;
}

.topic-tab-practice-icon svg {
    width: 16px;
    height: 16px;
}

.topic-tab.active .topic-tab-practice-icon {
    color: #ffffff;
    opacity: 0.9;
}

/* --- Article Card Practice Icons --- */
.article-card-practices {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-left: auto;
    padding-right: 0.5rem;
    flex-shrink: 0;
}

.article-card-practice-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: #8b7355;
    opacity: 0.6;
}

.article-card-practice-icon svg {
    width: 16px;
    height: 16px;
}

.article-card:hover .article-card-practice-icon {
    opacity: 0.8;
}

/* --- Filtered Out State (Cards) --- */
.topic-tab.filtered-out {
    opacity: 0.35;
}

.article-card.filtered-out {
    opacity: 0.35;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .series-card-header {
        padding: 1.5rem 1.25rem 1.25rem;
    }

    .series-card-header h2 {
        font-size: 1.5rem;
    }

    .topics-tabs {
        padding: 0.75rem 1.25rem;
    }

    .topic-tab {
        padding: 0.4rem 0.75rem;
        font-size: 0.85rem;
        min-width: unset;
    }

    .articles-grid-container {
        padding: 1rem;
    }

    .articles-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .article-card {
        padding: 0.625rem 0.875rem;
    }

    .article-card-title {
        font-size: 0.9rem;
    }

    .layout-toggle {
        font-size: 0.8rem;
        padding: 0.4rem 0.75rem;
    }
}
