/* 
 * Appliance Error Codes - Professional Technical Documentation Style
 * Design: Clean, minimal, documentation-focused, trustworthy
 */

/* ============================================
   CSS Variables
   ============================================ */
:root {
    /* Primary Colors - Deep Navy Blue */
    --primary-color: #1e3a5f;
    --primary-dark: #152a45;
    --primary-light: #2a4a70;

    /* Accent Colors */
    --accent-color: #f97316;
    /* Orange for errors/warnings */
    --accent-light: #fed7aa;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;

    /* Neutral Colors */
    --background-color: #f8fafc;
    --card-background: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Monaco, 'Lucida Console', monospace;

    /* Spacing */
    --content-max-width: 1200px;
    --reading-max-width: 720px;
}

/* ============================================
   Base Styles
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--background-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ============================================
   Typography
   ============================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.75em;
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
}

h3 {
    font-size: 1.25rem;
}

h4 {
    font-size: 1.125rem;
}

p {
    margin-bottom: 1rem;
}

/* Error code monospace styling */
.error-code,
code,
.code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    font-weight: 600;
    background: var(--accent-light);
    color: var(--accent-color);
    padding: 0.1em 0.4em;
    border-radius: 4px;
}

/* ============================================
   Header & Navigation
   ============================================ */
.header {
    background: var(--card-background);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.logo {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.logo:hover {
    text-decoration: none;
    color: var(--primary-dark);
}

.search-box {
    flex: 1;
    max-width: 400px;
    position: relative;
}

.search-box::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 1;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    font-size: 0.875rem;
    font-family: var(--font-sans);
    background: var(--background-color);
    transition: all 0.2s ease;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-box input:hover {
    border-color: var(--text-muted);
    background: var(--card-background);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--card-background);
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
}

.btn-text:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.btn-primary-sm {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.2s;
}

.btn-primary-sm:hover {
    background: var(--primary-dark);
    color: white;
    text-decoration: none;
}

/* ============================================
   Main Content Area
   ============================================ */
.main {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 2rem 1.5rem;
    min-height: calc(100vh - 200px);
}

/* ============================================
   Breadcrumb Navigation
   ============================================ */
.breadcrumb {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    padding: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.breadcrumb a {
    color: var(--text-secondary);
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    background: var(--border-light);
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
}

.breadcrumb a:hover {
    color: var(--primary-color);
    background: var(--primary-color);
    background: rgba(30, 58, 95, 0.08);
    text-decoration: none;
}

.breadcrumb span {
    color: var(--text-primary);
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    background: var(--primary-color);
    color: white;
    border-radius: 6px;
}

.breadcrumb-separator {
    color: var(--text-muted);
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* ============================================
   Hero Section - Enhanced with Gradient
   ============================================ */
.hero {
    text-align: left;
    padding: 3rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.hero-enhanced {
    background: linear-gradient(135deg, #1e3a5f 0%, #2a4a70 50%, #1e3a5f 100%);
    padding: 4rem 2rem;
    margin: -2rem -1.5rem 2rem -1.5rem;
    border-radius: 0 0 24px 24px;
    border-bottom: none;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='m36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30v4h2v-4h4v-2h-4v-4h-2v4h-4v2h4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.hero-enhanced .hero-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: 0 auto;
}

.hero-enhanced h1 {
    font-size: 2.5rem;
    color: #ffffff;
    margin-bottom: 0.75rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    font-weight: 700;
}

.hero-enhanced p {
    font-size: 1.25rem;
    color: #ffffff;
    margin-bottom: 2rem;
    max-width: none;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.btn-hero {
    display: inline-flex;
    align-items: center;
    background: var(--accent-color);
    color: white;
    padding: 0.875rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4);
}

.btn-hero:hover {
    background: #ea580c;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.5);
    text-decoration: none;
    color: white;
}

/* Statistics Bar */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 3rem;
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Enhanced Brand Cards */
.brand-card-enhanced {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem 1rem;
    transition: all 0.3s ease;
}

.brand-card-enhanced:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.brand-card-enhanced.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: var(--border-light);
}

.brand-card-enhanced.disabled:hover {
    transform: none;
    box-shadow: none;
}

.brand-card-enhanced.disabled .brand-initial {
    background: var(--text-muted);
}

.brand-grid-enhanced {
    grid-template-columns: repeat(6, 1fr);
}

@media (max-width: 900px) {
    .brand-grid-enhanced {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 600px) {
    .brand-grid-enhanced {
        grid-template-columns: repeat(3, 1fr);
    }
}

.brand-initial {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* Simple Brand Cards (text only) */
.brand-card-simple {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.2s ease;
}

.brand-card-simple:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    text-decoration: none;
}

.brand-card-simple .brand-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
}

.brand-card-simple .count {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.brand-card-simple.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: var(--border-light);
}

.brand-card-simple.disabled:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--border-color);
}

/* Enhanced Appliance Cards */
.appliance-grid-enhanced {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

.appliance-card-enhanced {
    padding: 1.5rem 1rem;
    transition: all 0.2s ease;
    will-change: transform, box-shadow;
}

.appliance-card-enhanced:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.appliance-card-enhanced .icon-wrapper {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.appliance-card-enhanced .icon-wrapper svg {
    width: 28px;
    height: 28px;
    color: var(--primary-color);
}

.appliance-card-enhanced:hover .icon-wrapper {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
}

.appliance-card-enhanced:hover .icon-wrapper svg {
    color: #ffffff !important;
    stroke: #ffffff !important;
}

.appliance-card-enhanced.disabled .icon-wrapper {
    background: var(--border-light);
}

.appliance-card-enhanced.disabled .icon-wrapper svg {
    color: var(--text-muted);
}

.appliance-card-enhanced.disabled:hover .icon-wrapper {
    background: var(--border-light);
}

.appliance-card-enhanced.disabled:hover .icon-wrapper svg {
    color: var(--text-muted) !important;
    stroke: var(--text-muted) !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-enhanced {
        padding: 3rem 1.5rem;
        margin: -2rem -1.5rem 1.5rem -1.5rem;
    }

    .hero-enhanced h1 {
        font-size: 1.75rem;
    }

    .stats-bar {
        gap: 1.5rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }
}



/* ============================================
   Cards & Sections
   ============================================ */
section {
    margin-bottom: 2.5rem;
}

section h2 {
    font-size: 1.25rem;
    color: var(--primary-color);
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-color);
    margin-bottom: 1.25rem;
}

.card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}

/* ============================================
   Brand & Appliance Grids
   ============================================ */
.brand-grid,
.appliance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.brand-card,
.appliance-card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    text-align: center;
    transition: border-color 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.brand-card:hover,
.appliance-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    text-decoration: none;
}

.brand-name {
    font-weight: 600;
    color: var(--text-primary);
}

.appliance-card .icon {
    font-size: 2rem;
}

.appliance-card .name {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.appliance-card .count {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.appliance-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--border-light);
}

.appliance-card.disabled:hover {
    border-color: var(--border-color);
    box-shadow: none;
}

.badge-coming {
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--border-color);
    color: var(--text-muted);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.view-all {
    display: inline-block;
    margin-top: 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary-color);
}

/* ============================================
   Error Code Cards
   ============================================ */
.error-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.error-card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-color);
    border-radius: 0 8px 8px 0;
    padding: 1rem 1.25rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.error-card:hover {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-md);
    text-decoration: none;
}

.error-card .code {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-color);
    background: none;
    padding: 0;
    display: block;
    margin-bottom: 0.25rem;
}

.error-card .title {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* ============================================
   Symptom Grid & Cards
   ============================================ */
.symptom-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.symptom-card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--success-color);
    border-radius: 0 8px 8px 0;
    padding: 1rem 1.25rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    display: block;
}

.symptom-card:hover {
    border-color: var(--success-color);
    box-shadow: var(--shadow-md);
    text-decoration: none;
}

.symptom-card .symptom-name {
    font-weight: 600;
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.5rem;
    text-transform: capitalize;
}

.symptom-card .symptom-meta {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.symptom-card .post-count {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ============================================
   Stats Overview
   ============================================ */
.stats-overview,
.stats-grid,
.quick-stats .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.stat-card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    text-align: center;
}

.stat-card .value,
.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
    line-height: 1.2;
}

.stat-card .label,
.stat-card .stat-label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* ============================================
   Symptom & Issue Lists
   ============================================ */
.symptom-list {
    list-style: none;
}

.symptom-item {
    border-bottom: 1px solid var(--border-light);
}

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

.symptom-item a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    color: var(--text-primary);
    gap: 1rem;
}

.symptom-item a:hover {
    text-decoration: none;
    color: var(--primary-color);
}

.symptom-item .symptom-name {
    font-weight: 500;
}

.symptom-item .post-count {
    color: var(--text-muted);
    font-size: 0.8125rem;
    white-space: nowrap;
}

.badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge {
    background: var(--success-color);
    color: white;
}

/* ============================================
   Issues List
   ============================================ */
.issues-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.issue-card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
}

.issue-card h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.issue-card .symptoms,
.issue-card .solution {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.issue-card .link {
    font-size: 0.875rem;
    font-weight: 500;
}

/* ============================================
   Community & Insights Sections
   ============================================ */
.insights-section,
.qa-section,
.tips-section,
.resources-section {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.section-intro {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 1.25rem;
}

/* Insights Grid & Cards */
.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

.insight-card {
    background: var(--border-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.insight-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.insight-card h3 {
    font-size: 1.0625rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.insight-card .posts-analyzed {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.insight-card .causes,
.insight-card .solutions {
    margin-bottom: 0.75rem;
}

.insight-card .causes strong,
.insight-card .solutions strong {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 0.375rem;
}

.insight-card ul,
.insight-card ol {
    padding-left: 1.25rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

.insight-card li {
    padding: 0.25rem 0;
}

.insight-card .mention-count {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.insight-card .success-rate {
    font-size: 0.75rem;
    color: var(--success-color);
    font-weight: 500;
}

.insight-card .diy-rate {
    font-size: 0.8125rem;
    color: var(--success-color);
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.insight-card .read-more {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary-color);
    margin-top: 0.5rem;
}

.insight-card .read-more:hover {
    text-decoration: underline;
}

@media (max-width: 640px) {
    .insights-grid {
        grid-template-columns: 1fr;
    }
}

.insight-block {
    margin-bottom: 1.5rem;
}

.insight-block:last-child {
    margin-bottom: 0;
}

/* ============================================
   Source Verification (Collapsible)
   ============================================ */
.source-verification {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.source-verification details {
    background: var(--border-light);
    border-radius: 6px;
    padding: 0.75rem 1rem;
}

.source-verification summary {
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-secondary);
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.source-verification summary::-webkit-details-marker {
    display: none;
}

.source-verification summary::before {
    content: "▶";
    font-size: 0.625rem;
    transition: transform 0.2s;
}

.source-verification details[open] summary::before {
    transform: rotate(90deg);
}

.source-verification .view-sources {
    color: var(--primary-color);
    font-weight: 500;
    margin-left: auto;
}

.source-list {
    margin-top: 1rem;
    padding: 1rem 1.5rem;
    background: var(--card-background);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.source-intro {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.source-list ol {
    columns: 2;
    column-gap: 2rem;
    font-size: 0.8125rem;
    padding-left: 2rem;
    margin: 0;
    max-height: 400px;
    overflow-y: auto;
}

.source-list li {
    padding: 0.375rem 0;
    break-inside: avoid;
    margin-bottom: 0.25rem;
}

.source-list a {
    color: var(--text-secondary);
}

.source-list a:hover {
    color: var(--primary-color);
}

@media (max-width: 640px) {
    .source-list ol {
        columns: 1;
    }
}

.insight-block h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.solutions-list {
    list-style: none;
    counter-reset: solution;
}

.solution-item {
    counter-increment: solution;
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: var(--border-light);
    border-radius: 6px;
}

.solution-item h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.solution-item h3::before {
    content: counter(solution) ". ";
    color: var(--primary-color);
    font-weight: 700;
}

.solution-meta {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    display: flex;
    gap: 1rem;
}

.causes-list {
    list-style: disc inside;
    color: var(--text-secondary);
}

.causes-list li {
    padding: 0.25rem 0;
}

/* ============================================
   Q&A Cards
   ============================================ */
.qa-card {
    background: var(--border-light);
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.qa-card .question {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.qa-card .answer {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.qa-card .meta {
    margin-top: 0.75rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
    display: flex;
    gap: 1rem;
}

/* ============================================
   DIY Stats
   ============================================ */
.diy-stats {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

.diy-stats .stat .value {
    font-size: 3rem;
    font-weight: 700;
    color: var(--success-color);
}

.diy-stats .stat .label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.diy-stats .recommendation {
    flex: 1;
    min-width: 200px;
    color: var(--text-secondary);
}

/* ============================================
   Discussion Cards
   ============================================ */
.discussion-card {
    background: var(--border-light);
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.discussion-card .symptom {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.discussion-card .solution {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.discussion-card .post-meta {
    margin-top: 0.75rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.source {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 1rem;
}

/* ============================================
   Sidebar
   ============================================ */
.page-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
}

.sidebar {
    margin-top: 2rem;
}

.sidebar .quick-info,
.sidebar .related-box {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.sidebar h3,
.related-box h3 {
    font-size: 0.9375rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.related-box ul {
    list-style: none;
}

.related-box li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-light);
}

.related-box li:last-child {
    border-bottom: none;
}

.related-box a {
    font-size: 0.875rem;
}

/* ============================================
   Comments & Ask Section
   ============================================ */
.comments-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.comments-section h2 {
    border-bottom: none;
    padding-bottom: 0;
}

.placeholder-text {
    color: var(--text-muted);
    font-style: italic;
}

.ask-section {
    margin-top: 1.5rem;
}

.ask-card {
    background: linear-gradient(135deg, var(--border-light) 0%, var(--card-background) 100%);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
}

.ask-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.ask-card p {
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

.btn-primary {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: white;
    text-decoration: none;
}

/* ============================================
   Resource List
   ============================================ */
.resource-list {
    list-style: none;
}

.resource-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-light);
}

.resource-list li:last-child {
    border-bottom: none;
}

/* ============================================
   Brands A-Z Page
   ============================================ */
.brands-az {
    columns: 4;
    column-gap: 2rem;
}

.letter-section {
    break-inside: avoid;
    margin-bottom: 1.5rem;
}

.letter {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.brand-list {
    list-style: none;
}

.brand-list li {
    padding: 0.375rem 0;
}

.upcoming {
    color: var(--text-muted);
}

.upcoming small {
    font-size: 0.75rem;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--primary-color);
    color: rgba(255, 255, 255, 0.8);
    padding: 3rem 1.5rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: var(--content-max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
}

.footer-section h3 {
    color: white;
    font-size: 0.9375rem;
    margin-bottom: 1rem;
}

.footer-section p {
    font-size: 0.875rem;
    line-height: 1.6;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    padding: 0.25rem 0;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
}

.footer-links a:hover {
    color: white;
}

.footer-section.copyright {
    grid-column: 1 / -1;
    text-align: center;
    padding-top: 2rem;
    margin-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 0.8125rem;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 900px) {
    .page-layout {
        grid-template-columns: 1fr;
    }

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

    .brands-az {
        columns: 2;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 640px) {
    html {
        font-size: 15px;
    }

    .nav {
        padding: 0 1rem;
        gap: 1rem;
    }

    .search-box {
        display: none;
    }

    .user-actions {
        gap: 0.5rem;
    }

    .main {
        padding: 1.5rem 1rem;
    }

    .hero {
        padding: 2rem 0;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .brand-grid,
    .appliance-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .error-grid {
        grid-template-columns: 1fr;
    }

    .stats-overview,
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .brands-az {
        columns: 1;
    }

    .diy-stats {
        flex-direction: column;
        text-align: center;
    }

    .symptom-item a {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {

    .header,
    .footer,
    .sidebar,
    .ask-section,
    .comments-section {
        display: none;
    }

    .main {
        max-width: 100%;
        padding: 0;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }
}

/* Comments Section */
.comments-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.comments-section h2 {
    margin-bottom: 1.5rem;
}

.comment {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.comment-author {
    color: var(--primary-color);
    font-weight: 600;
}

.comment-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.comment-content {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

.no-comments {
    color: var(--text-muted);
    font-style: italic;
}


/* Comment Form */
.comment-form {
    margin-bottom: 1.5rem;
}

.comment-form textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9375rem;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 0.75rem;
    transition: border-color 0.2s ease;
}

.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.comment-form .btn-primary {
    display: inline-flex;
    align-items: center;
}