/* Content Page Styles for ClearMind Academy */

/* ========================================
   Content Page Layout
======================================== */

.content-main {
    margin-top: 70px; /* Match header height exactly */
}

.breadcrumbs {
    background-color: var(--bg-tertiary);
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--border-primary);
}

.breadcrumbs a {
    color: var(--text-tertiary);
    text-decoration: none;
    font-size: 0.875rem;
}

.breadcrumbs a:hover {
    color: var(--brand-primary);
}

.breadcrumb-separator {
    margin: 0 0.5rem;
    color: var(--text-tertiary);
}

.breadcrumb-current {
    color: var(--text-primary);
    font-weight: 500;
}

/* ========================================
   Content Hero Section
======================================== */

.content-hero {
    background: var(--brand-gradient);
    color: white;
    padding: 1.8rem 0 3rem 0;
}

.content-hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.bias-category {
    display: inline-block;
    background-color: rgba(245, 158, 11, 0.2);
    color: var(--brand-secondary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1rem;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.content-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.content-subtitle {
    font-size: 1.125rem;
    line-height: 1.6;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto;
}

/* ========================================
   Article Layout
======================================== */

.content-article {
    padding: 4rem 0;
}

.content-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.content-main-column {
    min-width: 0; /* Prevents overflow issues */
}

.content-section {
    margin-bottom: 3rem;
}

.content-section h2 {
    color: var(--brand-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--brand-secondary);
}

.content-section h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    margin-top: 2rem;
}

.content-list {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.content-list li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* ========================================
   Example Boxes
======================================== */

.example-box {
    background-color: var(--accent-50);
    border: 1px solid var(--accent-300);
    border-left: 4px solid var(--brand-secondary);
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
}

.example-box h3 {
    color: var(--primary-900);
    margin-top: 0;
    margin-bottom: 1rem;
}

.example-box p {
    margin-bottom: 1rem;
}

.example-box p:last-child {
    margin-bottom: 0;
}

/* ========================================
   Technique & Insight Boxes
======================================== */

.technique-box {
    background-color: #1e293b !important; /* fallback for dark mode */
    background-color: var(--bg-secondary) !important;
    border: 1px solid var(--border-primary);
    border-left: 4px solid var(--brand-primary);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.insight-box {
    background-color: #334155 !important; /* fallback for dark mode */
    background-color: var(--accent-50) !important;
    border: 1px solid var(--accent-300);
    border-left: 4px solid var(--brand-secondary);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.warning-box {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 4px solid #ef4444;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    color: #991b1b; /* Ensure text color for light mode */
}

.warning-box h3,
.warning-box h4 {
    color: #dc2626;
    margin-top: 0;
}

/* Dark mode styles for warning box */
[data-theme="dark"] .warning-box {
    background-color: #451a03;
    border: 1px solid #78350f;
    border-left: 4px solid #f97316;
    color: #fed7aa;
}

[data-theme="dark"] .warning-box h3,
[data-theme="dark"] .warning-box h4 {
    color: #fb923c;
}

/* ========================================
   Strategy & Interactive Sections
======================================== */

.strategy-section {
    margin: 2rem 0;
}

.strategy-section h3 {
    color: var(--brand-primary);
    margin-bottom: 1rem;
}

.interactive-section {
    background-color: #1e293b !important; /* fallback for dark mode */
    background-color: var(--bg-secondary) !important;
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    padding: 2rem;
    margin: 2rem 0;
}

.interactive-section h3 {
    color: var(--brand-primary);
    margin-top: 0;
}


.bias-category h4 {
    color: var(--brand-secondary);
    margin-bottom: 0.5rem;
}

.scenario-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.scenario {
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-primary);
}

.scenario h4,
.scenario h5 {
    color: var(--brand-primary);
    margin-top: 0;
    margin-bottom: 1rem;
}

/* ========================================
   Level & Technique Sections
======================================== */

.level-section {
    margin: 2rem 0;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-primary);
}

.level-section:last-child {
    border-bottom: none;
}

.level-section h3 {
    color: var(--brand-primary);
    margin-bottom: 1rem;
}

.technique-section {
    margin: 2rem 0;
}

.technique-section h3 {
    color: var(--brand-primary);
    margin-bottom: 1rem;
}

.indicator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.indicator {
    background-color: var(--bg-secondary);
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid var(--border-primary);
}

.indicator h5 {
    color: var(--brand-secondary);
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.gauge {
    background-color: var(--bg-secondary);
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid var(--border-primary);
    text-align: center;
}

.gauge h5 {
    color: var(--brand-secondary);
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
}

/* ========================================
   Analysis & Impact Grids
======================================== */

.analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.analysis-item {
    background-color: var(--bg-tertiary);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-primary);
}

.analysis-item h4 {
    color: var(--brand-primary);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.analysis-item p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-tertiary);
}

.impact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.impact-item {
    background-color: var(--bg-primary);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-primary);
}

.impact-item h3 {
    color: var(--brand-primary);
    margin-bottom: 1rem;
    margin-top: 0;
}

.impact-item p {
    margin: 0;
    color: var(--text-tertiary);
    line-height: 1.6;
}

/* ========================================
   Strategy List
======================================== */

.strategy-list {
    margin: 2rem 0;
}

.strategy-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    padding: 2rem;
    background-color: var(--bg-tertiary);
    border-radius: 12px;
    border: 1px solid var(--border-primary);
}

.strategy-icon {
    font-size: 2rem;
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--brand-secondary);
    border-radius: 50%;
}

.strategy-content h3 {
    color: var(--brand-primary);
    margin-top: 0;
    margin-bottom: 1rem;
}

.strategy-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.strategy-example {
    background-color: var(--accent-100);
    padding: 1rem;
    border-radius: 6px;
    border-left: 3px solid var(--brand-secondary);
    font-size: 0.9rem;
    margin-top: 1rem;
}

.strategy-example strong {
    color: var(--accent-800);
}

/* ========================================
   Quiz Section
======================================== */

.quiz-container {
    background-color: var(--accent-50);
    border: 1px solid var(--accent-300);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
}

.quiz-question h3 {
    color: var(--primary-900);
    margin-top: 0;
    margin-bottom: 1rem;
}

.scenario-box {
    background-color: var(--bg-primary);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    border: 1px solid var(--primary-200);
}

.scenario-box p {
    margin: 0;
    font-style: italic;
    line-height: 1.6;
}

.quiz-reveal {
    margin-top: 1.5rem;
}

.quiz-answer {
    background-color: var(--bg-primary);
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1rem;
    border: 1px solid #10b981;
}

.quiz-answer h4 {
    color: #065f46;
    margin-bottom: 1rem;
}

.quiz-answer ul {
    margin: 0;
    padding-left: 1.5rem;
}

.quiz-answer li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

/* ========================================
   Related Content
======================================== */

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.related-item {
    background-color: var(--bg-primary);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-primary);
    transition: all 0.2s ease;
}

.related-item:hover {
    border-color: var(--brand-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.related-item h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.related-item h3 a {
    color: var(--brand-primary);
}

.related-item p {
    margin: 0;
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

/* ========================================
   Sidebar
======================================== */

.content-sidebar {
    background-color: var(--bg-tertiary);
    padding: 2rem;
    border-radius: 12px;
    height: fit-content;
    position: sticky;
    top: 90px;
}

.sidebar-section {
    margin-bottom: 2rem;
}

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

.sidebar-section h3 {
    color: var(--brand-primary);
    font-size: 1.125rem;
    margin-bottom: 1rem;
    margin-top: 0;
}

.fact-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.fact-item {
    font-size: 0.9rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-primary);
    color: var(--text-primary);
}

.fact-item:last-child {
    border-bottom: none;
}

.takeaway-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.takeaway-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-primary);
}

.takeaway-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
}

.tool-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tool-link {
    display: block;
    padding: 0.75rem 1rem;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    text-decoration: none;
    color: var(--brand-primary);
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.tool-link:hover {
    border-color: var(--brand-secondary);
    background-color: var(--accent-50);
    color: var(--brand-primary);
}

/* ========================================
   Content Navigation
======================================== */

.content-navigation {
    background-color: var(--bg-tertiary);
    padding: 2rem 0;
    border-top: 1px solid var(--border-primary);
}

.nav-links {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
}

.nav-prev,
.nav-next {
    flex: 1;
}

.nav-next {
    text-align: right;
}

.nav-btn {
    display: inline-block;
    padding: 1rem 1.5rem;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.nav-btn:hover {
    border-color: var(--brand-secondary);
    background-color: var(--accent-50);
    color: var(--text-primary);
}

.nav-direction {
    display: block;
    font-size: 0.875rem;
    color: var(--text-tertiary);
    margin-bottom: 0.25rem;
}

.nav-title {
    display: block;
    font-weight: 500;
    color: var(--brand-primary);
}

/* ========================================
   Dialogue and Fallacy-Specific Styles
======================================== */

.dialogue-container {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
}

.dialogue-box {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.speaker {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.speaker-alex {
    justify-content: flex-start;
}

.speaker-jordan {
    justify-content: flex-end;
    flex-direction: row-reverse;
}

.speaker-name {
    font-weight: 600;
    color: var(--brand-primary);
    font-size: 0.9rem;
    min-width: 60px;
    text-align: center;
}

.speech-bubble {
    background-color: var(--bg-primary);
    padding: 1.5rem;
    border-radius: 18px;
    border: 1px solid var(--border-primary);
    max-width: 70%;
    position: relative;
    line-height: 1.5;
}

.speech-bubble.fallacy-speech {
    background-color: #fef2f2 !important;
    border-color: #fecaca !important;
    color: #1f2937 !important;
}

/* Additional fallacy speech styling for cache busting - v2.1 */
div.speech-bubble.fallacy-speech,
.dialogue-box .speech-bubble.fallacy-speech,
.speaker-jordan .speech-bubble.fallacy-speech {
    background-color: #fef2f2 !important;
    border: 1px solid #fecaca !important;
    color: #1f2937 !important;
}

/* Dark mode override for fallacy speech */
[data-theme="dark"] .speech-bubble.fallacy-speech,
.dark .speech-bubble.fallacy-speech {
    background-color: #fef2f2 !important;
    border-color: #fecaca !important;
    color: #1f2937 !important;
}

.speaker-alex .speech-bubble::before {
    content: '';
    position: absolute;
    top: 20px;
    left: -8px;
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 8px solid var(--bg-primary);
}

.speaker-jordan .speech-bubble::before {
    content: '';
    position: absolute;
    top: 20px;
    right: -8px;
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 8px solid var(--bg-primary);
}

.speaker-jordan .speech-bubble.fallacy-speech::before {
    border-left: 8px solid #fef2f2;
}

.breakdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.breakdown-item {
    display: flex;
    gap: 1rem;
    background-color: var(--bg-primary);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.breakdown-number {
    width: 40px;
    height: 40px;
    background-color: #ef4444;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.breakdown-content h4 {
    color: var(--brand-primary);
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.breakdown-content p {
    margin: 0;
    color: var(--text-tertiary);
    line-height: 1.5;
}

.example-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.example-item {
    background-color: var(--bg-primary);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.example-item h3 {
    color: var(--brand-primary);
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.real-position {
    background-color: var(--accent-50);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 3px solid var(--brand-secondary);
}

.straw-man {
    background-color: var(--bg-secondary);
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid var(--brand-primary);
    color: var(--text-primary);
}

.real-position strong,
.straw-man strong {
    display: block;
    margin-bottom: 0.5rem;
}

.harm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.harm-item {
    background-color: #fef2f2;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #fecaca;
}

.harm-item h3,
.harm-item h5 {
    color: #dc2626;
    margin-top: 0;
    margin-bottom: 1rem;
}

.harm-item p {
    margin: 0;
    color: var(--text-tertiary);
    line-height: 1.6;
}

.counter-strategies {
    margin: 2rem 0;
}

.strategy-section {
    background-color: var(--accent-50);
    border: 1px solid var(--accent-300);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.strategy-section h3 {
    color: var(--primary-900);
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.prevention-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.prevention-item {
    display: flex;
    gap: 1rem;
    background-color: var(--bg-primary);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--primary-200);
}

.prevention-icon {
    width: 40px;
    height: 40px;
    background-color: var(--brand-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.prevention-content h4 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: var(--primary-900);
}

.prevention-content p {
    margin: 0;
    color: var(--text-tertiary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.practice-container {
    background-color: #1e293b; /* Dark mode compatible */
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
}

.practice-scenario h3 {
    color: var(--brand-primary);
    margin-top: 0;
    margin-bottom: 1rem;
}

.practice-dialogue {
    background-color: var(--bg-primary);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    border: 1px solid #bbf7d0;
}

.practice-statement {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.practice-statement:last-child {
    margin-bottom: 0;
}

.practice-reveal {
    margin-top: 1.5rem;
}

.practice-answer {
    background-color: var(--bg-primary);
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1rem;
    border: 1px solid #10b981;
}

.practice-answer h4 {
    color: #065f46;
    margin-bottom: 1rem;
}

.practice-answer p {
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.practice-answer p:last-child {
    margin-bottom: 0;
}

/* ========================================
   Responsive Design
======================================== */

@media (max-width: 1024px) {
    .content-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .content-sidebar {
        position: static;
        order: -1;
        background-color: var(--bg-tertiary);
        border: 1px solid var(--border-primary);
    }
    
    .strategy-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .strategy-icon {
        align-self: center;
    }
}

@media (max-width: 768px) {
    .content-hero {
        padding: 2rem 0;
    }
    
    .content-title {
        font-size: 2rem;
    }
    
    .content-article {
        padding: 2rem 0;
    }
    
    .content-section {
        margin-bottom: 2rem;
    }
    
    .analysis-grid,
    .impact-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .strategy-item {
        padding: 1.5rem;
    }
    
    .example-box,
    .quiz-container {
        padding: 1.5rem;
    }
    
    .nav-links {
        flex-direction: column;
    }
    
    .nav-next {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .content-title {
        font-size: 1.75rem;
    }
    
    .content-subtitle {
        font-size: 1rem;
    }
    
    .content-sidebar {
        padding: 1.5rem;
    }
    
    .strategy-item {
        padding: 1rem;
    }
    
    .example-box,
    .quiz-container {
        padding: 1rem;
    }
}

/* ========================================
   Bias Cards - Improved Spacing
======================================== */

.bias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.bias-card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.2s ease;
}

.bias-card:hover {
    border-color: var(--brand-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.bias-card h4 {
    margin: 0 0 0.75rem 0;
    color: var(--brand-primary);
    font-size: 1.125rem;
    line-height: 1.3;
}

.bias-card h4 a {
    text-decoration: none;
    color: inherit;
}

.bias-card h4 a:hover {
    color: var(--brand-secondary);
}

.bias-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0 0 1rem 0;
}

.bias-meta {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-primary);
}

.bias-meta span {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    font-weight: 500;
}

.difficulty {
    color: var(--brand-secondary);
}

.frequency {
    color: var(--accent-600);
}

@media (max-width: 768px) {
    .bias-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .bias-card {
        padding: 1.25rem;
    }
    
    .bias-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}