/**
 * MyInvest24 SEO Enhancement Styles
 * Styles für fortgeschrittene SEO-Komponenten
 * Version: 1.0.0
 */

/* ==================== TABLE OF CONTENTS ==================== */
#seo-toc {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px;
  margin: 32px 0;
  position: sticky;
  top: 100px;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
}

.toc-title {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #0ea5e9;
}

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

.toc-item {
  margin-bottom: 8px;
}

.toc-item.toc-sub {
  margin-left: 16px;
}

.toc-link {
  display: block;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: all 0.2s ease;
  border-radius: 0 8px 8px 0;
}

.toc-link:hover {
  color: #0ea5e9;
  background: rgba(14, 165, 233, 0.08);
  border-left-color: #0ea5e9;
}

.toc-link.active {
  color: #0ea5e9;
  font-weight: 600;
  background: rgba(14, 165, 233, 0.12);
  border-left-color: #0ea5e9;
}

/* ==================== CONTENT FRESHNESS ==================== */
.freshness-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border: 1px solid #10b981;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 600;
  color: #059669;
}

/* ==================== READING TIME ==================== */
.reading-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #f1f5f9;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
}

/* ==================== TRUST SIGNALS ==================== */
.trust-signals-box {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px;
  margin: 32px 0;
}

.trust-signals-box h4 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 20px;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

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

.trust-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.trust-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.trust-item strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 2px;
}

.trust-item small {
  font-size: 12px;
  color: #64748b;
}

/* ==================== INTERNAL LINKS ==================== */
.seo-internal-link {
  color: #0ea5e9;
  text-decoration: none;
  border-bottom: 1px dashed #0ea5e9;
  transition: all 0.2s ease;
}

.seo-internal-link:hover {
  color: #0284c7;
  border-bottom-style: solid;
}

/* ==================== FAQ ACCORDION ==================== */
.faq-section {
  margin: 40px 0;
}

.faq-section details {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-section details:hover {
  border-color: #0ea5e9;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.1);
}

.faq-section details[open] {
  border-color: #0ea5e9;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.faq-section summary {
  padding: 20px 24px;
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-section summary::-webkit-details-marker {
  display: none;
}

.faq-section summary::after {
  content: '+';
  font-size: 24px;
  font-weight: 300;
  color: #0ea5e9;
  transition: transform 0.3s ease;
}

.faq-section details[open] summary::after {
  content: '−';
}

.faq-section details > div {
  padding: 0 24px 20px;
  color: #475569;
  line-height: 1.7;
}

/* ==================== READING PROGRESS ==================== */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #0ea5e9 0%, #06b6d4 100%);
  width: 0%;
  z-index: 9999;
  transition: width 0.1s linear;
}

/* ==================== SPEAKABLE CONTENT ==================== */
.speakable-content {
  position: relative;
}

.speakable-content::before {
  content: '🎙️';
  position: absolute;
  left: -24px;
  top: 0;
  font-size: 12px;
  opacity: 0.5;
}

/* ==================== FEATURED SNIPPET BLOCKS ==================== */
.snippet-definition {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border-left: 4px solid #3b82f6;
  border-radius: 0 12px 12px 0;
  padding: 24px;
  margin: 24px 0;
}

.snippet-definition h3 {
  font-size: 18px;
  color: #1e40af;
  margin-bottom: 12px;
}

.snippet-definition p {
  color: #1e3a8a;
  line-height: 1.7;
}

.snippet-list {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  margin: 24px 0;
}

.snippet-list h3 {
  font-size: 18px;
  margin-bottom: 16px;
}

.snippet-list ol {
  padding-left: 24px;
  margin: 0;
}

.snippet-list li {
  padding: 8px 0;
  color: #475569;
}

.snippet-table {
  overflow-x: auto;
  margin: 24px 0;
}

.snippet-table table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.snippet-table th {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  padding: 16px;
  text-align: left;
  font-weight: 600;
}

.snippet-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
  color: #475569;
}

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

.snippet-table tr:hover td {
  background: #f8fafc;
}

/* ==================== AUTHOR BOX (E-E-A-T) ==================== */
.author-box {
  display: flex;
  gap: 24px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px;
  margin: 40px 0;
}

@media (max-width: 640px) {
  .author-box {
    flex-direction: column;
    text-align: center;
  }
}

.author-image {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #0ea5e9;
  flex-shrink: 0;
}

.author-info {
  flex: 1;
}

.author-name {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 4px;
}

.author-role {
  font-size: 14px;
  font-weight: 600;
  color: #0ea5e9;
  margin-bottom: 8px;
}

.author-bio {
  font-size: 14px;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 12px;
}

.author-credentials {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.credential-badge {
  display: inline-flex;
  padding: 4px 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: #475569;
}

/* ==================== RELATED ARTICLES ==================== */
.related-articles {
  background: #f8fafc;
  border-radius: 16px;
  padding: 24px;
  margin: 40px 0;
}

.related-articles h3 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 18px;
  margin-bottom: 20px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.related-card {
  display: block;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.related-card:hover {
  border-color: #0ea5e9;
  box-shadow: 0 4px 16px rgba(14, 165, 233, 0.15);
  transform: translateY(-2px);
}

.related-card-title {
  font-size: 15px;
  font-weight: 600;
  color: #0ea5e9;
  margin-bottom: 6px;
}

.related-card-desc {
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
}

/* ==================== CTA SECTION (Glossar/Ratgeber) ==================== */
.article-content .cta-section {
  background: linear-gradient(135deg, #0EA5E9 0%, #0284C7 100%);
  border-radius: 20px;
  padding: 48px 32px;
  margin: 48px 0;
  text-align: center;
}

.article-content .cta-section .cta-content h2 {
  color: #FFFFFF !important;
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 16px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.article-content .cta-section .cta-content p {
  color: rgba(255, 255, 255, 0.9) !important;
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 28px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary-large {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: white;
  color: #0284C7 !important;
  font-size: 16px;
  font-weight: 600;
  padding: 16px 32px;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary-large:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  color: #0284C7 !important;
}

.btn-secondary-large {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.15);
  color: white !important;
  font-size: 16px;
  font-weight: 600;
  padding: 16px 32px;
  border-radius: 12px;
  text-decoration: none;
  border: 2px solid rgba(255, 255, 255, 0.3);
  transition: all 0.2s ease;
}

.btn-secondary-large:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  color: white !important;
}

/* Sidebar Styles */
.sidebar-box {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
}

.sidebar-box h4 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 10px;
}

.sidebar-box p {
  font-size: 14px;
  color: #64748b;
  line-height: 1.5;
  margin-bottom: 12px;
}

.sidebar-box.cta {
  background: linear-gradient(135deg, #0EA5E9 0%, #0284C7 100%);
  border: none;
}

.sidebar-box.cta h4,
.sidebar-box.cta p {
  color: white !important;
}

.btn-small,
.btn-primary-small {
  display: inline-block;
  padding: 10px 20px;
  background: white;
  color: #0284C7 !important;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-small:hover,
.btn-primary-small:hover {
  background: #f1f5f9;
  transform: translateY(-1px);
}

/* Definition & Info Boxes */
.definition-box {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-left: 4px solid #0EA5E9;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 32px;
}

.definition-box h2 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 12px;
}

.definition-text {
  font-size: 1rem;
  line-height: 1.7;
  color: #334155;
}

.info-box {
  background: #fffbeb;
  border: 1px solid #fbbf24;
  border-radius: 12px;
  padding: 20px;
  margin: 24px 0;
}

.info-box h4 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #92400e;
  margin-bottom: 8px;
}

.info-box p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #78350f;
  margin: 0;
}

.example-box {
  background: #f0fdf4;
  border: 1px solid #22c55e;
  border-radius: 12px;
  padding: 20px;
  margin: 24px 0;
}

.example-box h4 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #166534;
  margin-bottom: 8px;
}

.example-box p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #14532d;
  margin: 0;
}

/* Article Hero für Glossar */
.glossary-hero {
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  color: white;
  padding: 60px 24px 48px;
  margin-top: 70px;
}

.glossary-hero .container {
  max-width: 1200px;
  margin: 0 auto;
}

.glossary-hero h1 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: white;
  margin-bottom: 16px;
}

.glossary-hero .lead {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 24px;
}

.glossary-hero .article-meta {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.glossary-hero .article-meta span {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

.category-badge {
  display: inline-block;
  background: #0EA5E9;
  color: white;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

/* Related Terms */
.related-terms {
  background: #f8fafc;
  border-radius: 12px;
  padding: 20px;
  margin-top: 32px;
}

.related-terms .term-link {
  display: inline-block;
  padding: 8px 16px;
  background: #0EA5E9;
  color: white !important;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  margin-bottom: 12px;
}

.related-terms p {
  font-size: 14px;
  color: #64748b;
  margin: 0;
}

/* ==================== BREADCRUMB ==================== */
.breadcrumb {
  background: #f8fafc;
  padding: 12px 0;
  font-size: 14px;
  color: #64748b;
  border-bottom: 1px solid #e2e8f0;
}

.breadcrumb .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.breadcrumb a {
  color: #0ea5e9;
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb a:hover {
  color: #0284c7;
  text-decoration: underline;
}

.breadcrumb span {
  color: #94a3b8;
}

/* ==================== ARTICLE CONTENT LAYOUT ==================== */
.article-content {
  padding: 0;
  max-width: 100%;
}

.article-content .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px;
}

/* Content Grid - Flexibles Layout */
.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

/* 3 Spalten Layout (TOC + Content + Sidebar) */
@media (min-width: 1024px) {
  .content-grid {
    grid-template-columns: 1fr 280px;
    gap: 48px;
  }
  
  /* Wenn TOC-Sidebar vorhanden ist → 3 Spalten
     NOTE: Zusätzlich Klasse als Fallback (z. B. Firefox ohne :has Support) */
  .content-grid--toc,
  .content-grid:has(.toc-sidebar) {
    grid-template-columns: 240px 1fr 240px;
    gap: 40px;
  }
}

/* 2 Spalten Layout (Content + Sidebar) - Glossar etc. */
.content-grid--2col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 1024px) {
  .content-grid--2col {
    grid-template-columns: 1fr 300px;
    gap: 48px;
  }
}

/* ==================== TOC SIDEBAR (Left) ==================== */
.toc-sidebar {
  display: none;
}

@media (min-width: 1024px) {
  .toc-sidebar {
    display: block;
  }
}

.toc-sticky {
  position: sticky;
  top: 100px;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
}

.toc-sidebar h3,
.toc-sticky h3 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.toc ul,
.toc-sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc li,
.toc-sidebar li {
  margin-bottom: 4px;
}

.toc a,
.toc-sidebar a {
  display: block;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
  text-decoration: none;
  border-left: 2px solid transparent;
  border-radius: 0 8px 8px 0;
  transition: all 0.2s ease;
}

.toc a:hover,
.toc-sidebar a:hover {
  color: #0ea5e9;
  background: #f8fafc;
  border-left-color: #e2e8f0;
}

.toc a.active,
.toc-sidebar a.active {
  color: #0ea5e9;
  background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
  border-left-color: #0ea5e9;
  font-weight: 600;
}

/* ==================== MAIN ARTICLE ==================== */
.main-article {
  min-width: 0;
  max-width: 100%;
}

.main-article section {
  scroll-margin-top: 120px;
  margin-bottom: 48px;
}

.main-article h2 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1.75rem;
  color: #0f172a;
  margin-bottom: 20px;
  padding-top: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e2e8f0;
  line-height: 1.3;
}

.main-article h2:first-of-type {
  padding-top: 0;
}

.main-article h3 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1.25rem;
  color: #0f172a;
  margin: 28px 0 14px;
  font-weight: 700;
}

.main-article p {
  color: #475569;
  margin-bottom: 18px;
  line-height: 1.8;
}

/* Rich-Content (Listen/Tabellen/Code/Zitate) ist zentral in css/global.css definiert */

/* ==================== HIGHLIGHT BOX / TAKEAWAYS ==================== */
.highlight-box,
.takeaways {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #60a5fa;
  border-left: 4px solid #0ea5e9;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 32px;
}

.highlight-box h3,
.takeaways h3 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e40af;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.highlight-box h3::before,
.takeaways h3::before {
  content: '💡';
  font-size: 1.2rem;
}

/* ==================== CHECKLIST ==================== */
.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
}

.checklist li {
  position: relative;
  padding-left: 32px;
  margin-bottom: 12px;
  line-height: 1.6;
  color: #1e3a8a;
}

.checklist li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

/* ==================== DETAILED LIST ==================== */
.detailed-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.detailed-list li {
  position: relative;
  padding: 16px 16px 16px 48px;
  margin-bottom: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  line-height: 1.6;
  color: #475569;
  transition: all 0.2s ease;
}

.detailed-list li:hover {
  border-color: #0ea5e9;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.1);
}

.detailed-list li::before {
  content: '→';
  position: absolute;
  left: 16px;
  top: 16px;
  color: #0ea5e9;
  font-weight: 700;
  font-size: 16px;
}

.detailed-list li strong {
  color: #0f172a;
  font-weight: 600;
}

/* ==================== TIPS GRID ==================== */
.tips-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 24px 0;
}

@media (min-width: 640px) {
  .tips-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.tip-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px;
  transition: all 0.2s ease;
}

.tip-card:hover {
  border-color: #10b981;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.15);
  transform: translateY(-2px);
}

.tip-icon {
  font-size: 28px;
  margin-bottom: 12px;
}

.tip-card h4 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}

.tip-card p {
  font-size: 14px;
  color: #64748b;
  line-height: 1.6;
  margin: 0;
}

/* ==================== ERROR LIST ==================== */
.error-list {
  margin: 24px 0;
}

.error-item {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 12px;
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

.error-item:hover {
  border-color: #ef4444;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.1);
}

.error-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.error-content {
  flex: 1;
}

.error-content h4 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #991b1b;
  margin-bottom: 6px;
}

.error-content p {
  font-size: 14px;
  color: #7f1d1d;
  line-height: 1.5;
  margin: 0;
}

/* ==================== ARTICLE GRID (Related) ==================== */
.article-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 24px 0;
}

@media (min-width: 640px) {
  .article-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.article-card {
  display: block;
  padding: 24px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.article-card:hover {
  border-color: #0ea5e9;
  box-shadow: 0 4px 16px rgba(14, 165, 233, 0.15);
  transform: translateY(-2px);
}

.article-card h3 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
  transition: color 0.2s ease;
}

.article-card:hover h3 {
  color: #0ea5e9;
}

.article-card p {
  font-size: 14px;
  color: #64748b;
  line-height: 1.5;
  margin: 0;
}

/* ==================== RIGHT SIDEBAR ==================== */
.right-sidebar {
  display: none;
}

@media (min-width: 1024px) {
  .right-sidebar {
    display: block;
  }
}

.sidebar-sticky {
  position: sticky;
  top: 100px;
}

.quick-links,
.popular-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.quick-links li,
.popular-list li {
  margin-bottom: 8px;
}

.quick-links a,
.popular-list a {
  display: block;
  padding: 8px 12px;
  font-size: 14px;
  color: #64748b;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.quick-links a:hover,
.popular-list a:hover {
  color: #0ea5e9;
  background: #f1f5f9;
}

/* ==================== FAQ CONTAINER ==================== */
.faq-container {
  margin: 24px 0;
}

.faq-container .faq-item,
.faq-container details {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-container .faq-item:hover,
.faq-container details:hover {
  border-color: #0ea5e9;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.1);
}

.faq-container details[open] {
  border-color: #0ea5e9;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.faq-container summary {
  padding: 20px 24px;
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-container summary::-webkit-details-marker {
  display: none;
}

.faq-container summary::after {
  content: '+';
  font-size: 24px;
  font-weight: 300;
  color: #0ea5e9;
  transition: transform 0.3s ease;
}

.faq-container details[open] summary::after {
  content: '−';
}

.faq-container .faq-answer {
  padding: 0 24px 20px;
  color: #475569;
  line-height: 1.7;
}

.faq-container details > div {
  padding: 0 24px 20px;
  color: #475569;
  line-height: 1.7;
}

/* ==================== RELATED ARTICLES SECTION ==================== */
.related-articles {
  background: #f8fafc;
  border-radius: 16px;
  padding: 32px;
  margin: 48px 0;
}

.related-articles h2 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 24px;
  padding: 0;
  border: none;
}

/* ==================== MOBILE RESPONSIVE ==================== */
@media (max-width: 767px) {
  .toc-sidebar,
  .right-sidebar {
    display: none;
  }
  
  .content-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .article-content .container {
    padding: 24px 16px;
  }
  
  .main-article h2 {
    font-size: 1.5rem;
  }
  
  .highlight-box,
  .takeaways {
    padding: 20px;
  }
  
  .tips-grid {
    grid-template-columns: 1fr;
  }
  
  .article-grid {
    grid-template-columns: 1fr;
  }
  
  .related-articles {
    padding: 24px;
    margin: 32px -16px;
    border-radius: 0;
  }
}

/* ==================== PRINT STYLES ==================== */
@media print {
  #seo-toc,
  #reading-progress,
  .trust-signals-box,
  .toc-sidebar,
  .right-sidebar {
    display: none !important;
  }
  
  .content-grid {
    display: block;
  }
}


