/* ==========================================================================
   autobravar.rs - Design System Stylesheet
   Theme: Light, Premium Reading-Focused Magazine
   Color Palette: White base, Red and Orange gradients, Slate Grays
   Typography: Monolithic Sans-Serif (Inter)
   ========================================================================== */

:root {
    /* Color Tokens */
    --primary-red: #ef4444;
    --primary-orange: #f97316;
    --primary-gradient: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
    --primary-gradient-hover: linear-gradient(135deg, #dc2626 0%, #ea580c 100%);
    --bg-white: #ffffff;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
    --text-main: #111827;
    --text-muted: #4b5563;
    --text-light: #6b7280;
    
    /* Category Colors */
    --color-mehanika: #ef4444;
    --color-estetika: #f97316;
    --color-delovi: #ea580c;
    --color-moto-i-teretni: #dc2626;
    --color-usluge: #b91c1c;
    
    /* Layout Tokens */
    --container-width: 1200px;
    --font-stack: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.05), 0 4px 6px -2px rgba(0,0,0,0.02);
}

/* ==========================================================================
   Base Styles & Reset
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-stack);
    background-color: var(--bg-white);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-smooth);
}

/* ==========================================================================
   Header Component
   ========================================================================== */
.site-header {
    background-color: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 15px 0;
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 15px;
}

.site-logo {
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    line-height: 1;
}

.footer-logo {
    margin-bottom: 20px;
    display: inline-flex;
}

.logo-auto {
    color: #ef4444;
}

.logo-bravar {
    color: #f97316;
}

.logo-rs {
    color: #4b5563;
}

.logo-icon {
    font-size: 1.6rem;
    color: #ef4444;
    margin-right: 2px;
}

.site-slogan {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
}

/* Search Toggle Button */
.search-toggle-btn {
    background: none;
    border: 1px solid var(--border-color);
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    margin-right: 10px;
}

.search-toggle-btn:hover {
    background-color: var(--bg-light);
    color: var(--primary-red);
    border-color: var(--primary-red);
}

/* Fullscreen Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.98);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: scale(1.05);
}

.search-overlay.active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.search-close-btn {
    position: absolute;
    top: 30px;
    right: 30px;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-main);
    cursor: pointer;
    transition: var(--transition-smooth);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.search-close-btn:hover {
    background-color: var(--bg-light);
    color: var(--primary-red);
    transform: rotate(90deg);
}

.search-overlay-content {
    width: 90%;
    max-width: 700px;
    text-align: center;
    position: relative;
}

.search-overlay-icon {
    font-size: 2.5rem;
    color: var(--primary-red);
    margin-bottom: 20px;
}

.search-overlay-content input {
    width: 100%;
    background: none;
    border: none;
    border-bottom: 3px solid var(--border-color);
    font-size: 2rem;
    font-weight: 700;
    padding: 15px 0;
    color: var(--text-main);
    text-align: center;
    transition: var(--transition-smooth);
}

.search-overlay-content input:focus {
    outline: none;
    border-bottom-color: var(--primary-red);
}

.search-overlay-hint {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 15px;
    font-weight: 500;
}

/* Header Actions & Theme Toggle */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-toggle-btn {
    background: none;
    border: 1px solid var(--border-color);
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    background-color: var(--bg-white);
}

.theme-toggle-btn:hover {
    background-color: var(--bg-light);
    color: var(--primary-orange);
    border-color: var(--primary-orange);
}

.header-socials {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-socials a {
    color: var(--text-light);
    font-size: 0.8125rem;
    transition: var(--transition-smooth);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background-color: var(--bg-white);
}

.header-socials a:hover {
    color: var(--primary-orange);
    border-color: var(--primary-orange);
    background-color: var(--bg-light);
}

/* Navigation */
.site-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-link {
    font-size: 0.875rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 6px;
    color: var(--text-muted);
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nav-link i {
    font-size: 0.95rem;
    color: var(--text-light);
    transition: var(--transition-smooth);
}

.nav-link:hover {
    color: var(--primary-red);
    background-color: var(--bg-light);
}

.nav-link:hover i {
    color: var(--primary-red);
}

.nav-link.active {
    color: var(--primary-red);
    background-color: var(--bg-light);
    border-color: var(--border-color);
}

.nav-link.active i {
    color: var(--primary-red);
}

/* Nav Toggle (Mobile) */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 110;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-main);
    border-radius: 2px;
    transition: var(--transition-smooth);
}

/* ==========================================================================
   Hero Section & Search
   ========================================================================== */
.hero-section {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 80px 0;
    text-align: center;
    position: relative;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 10px;
    line-height: 1.2;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.7);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 30px;
    font-weight: 500;
    text-shadow: 0 1px 4px rgba(0,0,0,0.7);
}

.search-box {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 16px 20px 16px 50px;
    font-size: 1rem;
    font-family: inherit;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    outline: none;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
}

.search-box input:focus {
    border-color: var(--primary-red);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 1.1rem;
}

/* ==========================================================================
   Category Filters Page Bar
   ========================================================================== */
.filter-section {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-white);
    position: sticky;
    top: 75px;
    z-index: 90;
}

.category-filters {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 8px 18px;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    background-color: var(--bg-white);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.filter-btn i {
    font-size: 0.95rem;
    color: var(--text-light);
    transition: var(--transition-smooth);
}

.filter-btn:hover {
    border-color: var(--primary-red);
    color: var(--primary-red);
    background-color: var(--bg-light);
}

.filter-btn:hover i {
    color: var(--primary-red);
}

.filter-btn.active {
    background: var(--primary-gradient);
    color: var(--bg-white);
    border-color: transparent;
    box-shadow: var(--shadow-sm);
}

.filter-btn.active i {
    color: var(--bg-white);
}

/* ==========================================================================
   Grid & Card Layouts
   ========================================================================== */
.articles-grid-section {
    padding: 50px 0;
    background-color: var(--bg-white);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
}

.article-card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
    position: relative;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-orange);
}

.card-img-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background-color: var(--bg-light);
    overflow: hidden;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.article-card:hover .card-img-wrapper img {
    transform: scale(1.05);
}

.card-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--bg-white);
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 10;
}

.badge-mehanika { background-color: var(--color-mehanika); }
.badge-estetika { background-color: var(--color-estetika); }
.badge-delovi { background-color: var(--color-delovi); }
.badge-moto-i-teretni { background-color: var(--color-moto-i-teretni); }
.badge-usluge { background-color: var(--color-usluge); }

.card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 10px;
    font-weight: 500;
}

.card-meta i {
    color: var(--primary-red);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 10px;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
    margin-top: auto;
}

.read-more-btn {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--primary-red);
    display: flex;
    align-items: center;
    gap: 6px;
}

.read-more-btn i {
    transition: var(--transition-smooth);
}

.article-card:hover .read-more-btn i {
    transform: translateX(4px);
}

.no-results {
    text-align: center;
    padding: 60px 20px;
}

.no-results-icon {
    font-size: 3rem;
    color: var(--text-light);
    margin-bottom: 15px;
}

/* ==========================================================================
   Article Page Layout
   ========================================================================== */
.article-page {
    padding: 40px 0 60px;
    background-color: var(--bg-white);
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 30px;
    flex-wrap: wrap;
}

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

.breadcrumbs .separator {
    font-size: 0.75rem;
    opacity: 0.6;
}

.breadcrumbs span {
    color: var(--text-main);
    font-weight: 500;
}

.article-header {
    margin-bottom: 30px;
}

.article-header .category-badge {
    display: inline-block;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--bg-white);
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 15px;
}

.article-title {
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
    color: var(--text-main);
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 0.875rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.meta-item i {
    color: var(--primary-red);
}

.article-cover-wrapper {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: 40px;
    background-color: var(--bg-light);
}

.article-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Sidebar and Main Layout */
.article-body-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 40px;
}

.article-sidebar {
    position: relative;
}

.sticky-sidebar {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.sidebar-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

/* TOC (Table of Contents) */
.toc {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
}

.toc-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toc-link {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
    display: block;
    line-height: 1.4;
}

.toc-link:hover {
    color: var(--primary-red);
}

.toc-link.active {
    color: var(--primary-red);
    font-weight: 700;
}

/* Article Content Body */
.article-content {
    font-size: 1.05rem;
    color: var(--text-main);
    line-height: 1.7;
}

.article-content p {
    margin-bottom: 20px;
}

.article-content h2 {
    font-size: 1.75rem;
    font-weight: 800;
    margin: 40px 0 20px;
    color: var(--text-main);
    line-height: 1.3;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 8px;
}

.article-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 30px 0 15px;
    color: var(--text-main);
}

.article-content ul, .article-content ol {
    margin-bottom: 20px;
    padding-left: 20px;
}

.article-content li {
    margin-bottom: 8px;
}

/* Alert blocks in Markdown */
.alert-block {
    display: flex;
    gap: 15px;
    padding: 20px;
    border-radius: 8px;
    margin: 30px 0;
    border-left: 4px solid;
}

.alert-block-note {
    border-left-color: #3b82f6;
    background-color: #f0f7ff;
}

.alert-block-tip {
    border-left-color: #10b981;
    background-color: #f0fdf4;
}

.alert-block-warning {
    border-left-color: #f97316;
    background-color: #fff7ed;
}

.alert-icon {
    font-size: 1.25rem;
    margin-top: 3px;
}

.alert-block-note .alert-icon { color: #3b82f6; }
.alert-block-tip .alert-icon { color: #10b981; }
.alert-block-warning .alert-icon { color: #f97316; }

.alert-content {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* Responsive Table */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    margin: 30px 0;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.95rem;
}

th, td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: var(--bg-light);
    font-weight: 700;
    color: var(--text-main);
}

tr:last-child td {
    border-bottom: none;
}

/* Custom quote block / box */
.quote-block {
    position: relative;
    padding: 25px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin: 30px 0;
}

.quote-icon {
    font-size: 1.5rem;
    color: var(--primary-orange);
    opacity: 0.3;
    margin-bottom: 10px;
}

.quote-text {
    font-size: 1.1rem;
    font-style: italic;
    font-weight: 500;
    color: var(--text-muted);
}

.diagram-block pre {
    background: #1f2937;
    color: #f9fafb;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.875rem;
    line-height: 1.4;
    margin: 30px 0;
}

/* ==========================================================================
   CTA (Call to Action) Box
   ========================================================================== */
.cta-box {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05) 0%, rgba(249, 115, 22, 0.05) 100%);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 12px;
    padding: 30px;
    margin-top: 50px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.cta-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--text-main);
}

.cta-text {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.6;
}

.cta-button {
    display: inline-block;
    background: var(--primary-gradient);
    color: var(--bg-white);
    padding: 12px 30px;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: 30px;
    box-shadow: var(--shadow-md);
    white-space: normal;
    max-width: 100%;
    box-sizing: border-box;
}

.cta-button:hover {
    background: var(--primary-gradient-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

/* ==========================================================================
   FAQs Component
   ========================================================================== */
.faq-section {
    margin-top: 60px;
    border-top: 1px solid var(--border-color);
    padding-top: 40px;
}

.faq-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 30px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.faq-title i {
    color: var(--primary-red);
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--bg-white);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 18px 20px;
    text-align: left;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition-smooth);
}

.faq-question:hover {
    background-color: var(--bg-light);
    color: var(--primary-red);
}

.faq-question i {
    font-size: 0.875rem;
    transition: var(--transition-smooth);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background-color: var(--bg-white);
}

.faq-answer-inner {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ==========================================================================
   Footer Component
   ========================================================================== */
.site-footer {
    background-color: #111827;
    color: #f3f4f6;
    padding: 60px 0 30px;
    margin-top: 80px;
    border-top: 1px solid #1f2937;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 40px;
}

.footer-brand h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 15px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-brand h2 span {
    font-weight: 300;
}

.footer-about {
    font-size: 0.875rem;
    color: #9ca3af;
    line-height: 1.6;
}

.footer-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-links-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links-list a {
    font-size: 0.875rem;
    color: #9ca3af;
}

.footer-links-list a:hover {
    color: var(--primary-red);
    padding-left: 4px;
}

.footer-bottom {
    border-top: 1px solid #1f2937;
    padding-top: 30px;
    text-align: center;
}

.footer-partners-heading {
    font-size: 0.875rem;
    font-weight: 700;
    color: #f3f4f6;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-partner-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.footer-partner-links a {
    font-size: 0.8125rem;
    color: #9ca3af;
    padding: 6px 12px;
    border: 1px solid #374151;
    border-radius: 20px;
    background-color: #1f2937;
}

.footer-partner-links a:hover {
    color: var(--primary-red);
    border-color: var(--primary-red);
    background-color: #111827;
}

.footer-copy {
    font-size: 0.75rem;
    color: #6b7280;
}

/* ==========================================================================
   Responsive Media Queries
   ========================================================================== */
@media (max-width: 992px) {
    .article-body-layout {
        grid-template-columns: minmax(0, 1fr);
    }
    
    .article-sidebar {
        display: none; /* Hide sidebar table of contents on smaller screens */
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .site-nav {
        display: none; /* Collapsible mobile menu */
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background-color: var(--bg-white);
        border-bottom: 1px solid var(--border-color);
        padding: 20px;
        gap: 10px;
        box-shadow: var(--shadow-md);
    }
    
    .site-nav.active {
        display: flex;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-section {
        padding: 45px 0;
    }
    
    .search-box {
        display: none !important;
    }
    
    .filter-section {
        display: none !important;
    }
    
    .article-title {
        font-size: 2rem;
    }
    
    .site-slogan {
        display: none;
    }
    
    .cta-box {
        padding: 20px 15px;
        margin-top: 30px;
    }
    
    .cta-title {
        font-size: 1.25rem;
    }
    
    .cta-text {
        font-size: 0.875rem;
    }
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* ==========================================================================
   Dark Theme Implementation
   ========================================================================== */
body.dark-theme {
    --bg-white: #111827;
    --bg-light: #1f2937;
    --border-color: #374151;
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-light: #6b7280;
    
    background-color: #111827;
    color: #f3f4f6;
}

body.dark-theme .site-header {
    background-color: #111827;
    border-bottom: 1px solid #374151;
}

body.dark-theme .nav-link {
    color: #9ca3af;
}

body.dark-theme .nav-link:hover,
body.dark-theme .nav-link.active {
    background-color: #1f2937;
    color: #ef4444;
}

body.dark-theme .nav-link i {
    color: #6b7280;
}

body.dark-theme .nav-link:hover i,
body.dark-theme .nav-link.active i {
    color: #ef4444;
}

body.dark-theme .logo-rs {
    color: #9ca3af;
}

body.dark-theme .article-card {
    background-color: #1f2937;
    border-color: #374151;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.3);
}

body.dark-theme .card-content {
    background-color: #1f2937;
}

body.dark-theme .card-title {
    color: #f3f4f6;
}

body.dark-theme .card-desc {
    color: #9ca3af;
}

body.dark-theme .filter-btn {
    background-color: #1f2937;
    border-color: #374151;
    color: #9ca3af;
}

body.dark-theme .filter-btn i {
    color: #6b7280;
}

body.dark-theme .filter-btn:hover {
    background-color: #111827;
    color: #ef4444;
    border-color: #ef4444;
}

body.dark-theme .filter-btn:hover i {
    color: #ef4444;
}

body.dark-theme .filter-btn.active {
    background: var(--primary-gradient);
    color: #ffffff;
    border-color: transparent;
}

body.dark-theme .filter-btn.active i {
    color: #ffffff;
}

body.dark-theme .theme-toggle-btn {
    background-color: #1f2937;
    border-color: #374151;
    color: #f3f4f6;
}

body.dark-theme .theme-toggle-btn:hover {
    background-color: #111827;
    color: #f97316;
    border-color: #f97316;
}

body.dark-theme .header-socials a {
    background-color: #1f2937;
    border-color: #374151;
    color: #9ca3af;
}

body.dark-theme .header-socials a:hover {
    background-color: #111827;
    color: #f97316;
    border-color: #f97316;
}

body.dark-theme .site-nav {
    background-color: #111827;
    border-bottom-color: #374151;
}

body.dark-theme .breadcrumbs span {
    color: #f3f4f6;
}

body.dark-theme .article-meta {
    border-bottom-color: #374151;
    color: #9ca3af;
}

body.dark-theme .article-meta-item i {
    color: #ef4444;
}

body.dark-theme .article-content h2 {
    color: #f3f4f6;
    border-bottom-color: #374151;
}

body.dark-theme .article-content h3 {
    color: #f3f4f6;
}

body.dark-theme .alert-block-note {
    background-color: rgba(59, 130, 246, 0.15);
    border-color: #3b82f6;
    color: #eff6ff;
}

body.dark-theme .alert-block-tip {
    background-color: rgba(16, 185, 129, 0.15);
    border-color: #10b981;
    color: #ecfdf5;
}

body.dark-theme .alert-block-warning {
    background-color: rgba(249, 115, 22, 0.15);
    border-color: #f97316;
    color: #fff7ed;
}

body.dark-theme .quote-block {
    background-color: #1f2937;
    border-left-color: #f97316;
}

body.dark-theme .table-responsive {
    border-color: #374151;
}

body.dark-theme .table-responsive table th {
    background-color: #1f2937;
    color: #f3f4f6;
    border-bottom-color: #374151;
}

body.dark-theme .table-responsive table td {
    border-bottom-color: #374151;
    color: #d1d5db;
}

body.dark-theme .toc {
    background-color: #1f2937;
    border-color: #374151;
}

body.dark-theme .toc-title {
    color: #f3f4f6;
}

body.dark-theme .toc-link {
    color: #9ca3af;
}

body.dark-theme .toc-link:hover,
body.dark-theme .toc-link.active {
    color: #ef4444;
}

body.dark-theme .faq-item {
    border-color: #374151;
}

body.dark-theme .faq-question {
    color: #f3f4f6;
}

body.dark-theme .faq-question:hover {
    background-color: #1f2937;
    color: #ef4444;
}

body.dark-theme .faq-answer {
    color: #9ca3af;
    background-color: #111827;
}

body.dark-theme .footer-bottom {
    border-top-color: #374151;
}

body.dark-theme .footer-partner-links a {
    background-color: #111827;
    border-color: #374151;
}

body.dark-theme .footer-partner-links a:hover {
    background-color: #1f2937;
}
