@import url('./author.css');

/* ==========================================================================
   XSEEDINFO — ADAPTIVE ARTICLE & LONG-FORM EDITORIAL CSS
   Flawless High-Contrast Rendering in Both Classic Light & Dark Edition
   ========================================================================== */

.article-layout {
  padding: 2.5rem 0 5rem 0;
  background-color: var(--bg-page);
  color: var(--text-main);
  transition: all 0.2s ease;
}

.article-container {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 260px;
  gap: 2.5rem;
  align-items: start;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (max-width: 1180px) {
  .article-container {
    grid-template-columns: minmax(0, 1fr) 260px;
  }
  .article-sidebar-left {
    display: none;
  }
}

@media (max-width: 880px) {
  .article-container {
    grid-template-columns: 1fr;
  }
  .article-sidebar-right {
    display: none;
  }
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.breadcrumbs a {
  color: var(--text-sub);
  text-decoration: none;
  font-weight: 600;
}

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

/* Article Header */
.article-header {
  margin-bottom: 2.5rem;
}

.article-header h1 {
  font-family: var(--font-serif);
  font-size: 2.85rem;
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin: 0.85rem 0;
  color: var(--text-serif-head);
}

@media (max-width: 768px) {
  .article-header h1 {
    font-size: 2.1rem;
  }
}

.article-subhead {
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--text-sub);
  margin-bottom: 1.5rem;
}

/* Trust / E-E-A-T Author Meta Bar */
.author-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.author-info-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar-lg {
  width: 42px;
  height: 42px;
  border-radius: 9999px;
  background: var(--bg-card-hover);
  border: 2px solid var(--accent-red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--text-serif-head);
  font-size: 1rem;
}

.author-names strong {
  display: block;
  color: var(--text-serif-head);
  font-size: 0.95rem;
}

.eeat-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(5, 150, 105, 0.1);
  border: 1px solid rgba(5, 150, 105, 0.3);
  color: var(--accent-emerald);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 700;
}

/* Featured Hero Image Container */
.article-featured-media {
  width: 100%;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 2.5rem;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  box-shadow: var(--card-shadow);
}

.article-featured-media img,
.article-featured-media svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Article Body Typography (High-Contrast) */
.article-body {
  font-size: 1.12rem;
  line-height: 1.85;
  color: var(--text-main);
}

.article-body p {
  margin-bottom: 1.75rem;
  color: var(--text-main);
}

.article-body h2 {
  font-family: var(--font-serif);
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-serif-head);
  margin: 3.5rem 0 1.25rem 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
}

.article-body h3 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-serif-head);
  margin: 2.25rem 0 0.85rem 0;
}

.article-body ul, .article-body ol {
  margin-bottom: 1.75rem;
  padding-left: 1.5rem;
}

.article-body li {
  margin-bottom: 0.6rem;
  color: var(--text-main);
}

.article-body strong {
  color: var(--text-serif-head);
  font-weight: 700;
}

/* Inverted Pyramid Hook Box (Visible in Light & Dark Mode) */
.hook-box {
  background: var(--bg-card);
  border-left: 4px solid var(--accent-red);
  border-top: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  border-radius: 0 6px 6px 0;
  padding: 1.6rem 1.85rem;
  margin-bottom: 2.25rem;
  font-size: 1.08rem;
  box-shadow: var(--card-shadow);
}

.hook-box h4 {
  color: var(--accent-red);
  font-size: 0.88rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.6rem;
}

.hook-box p {
  color: var(--text-main);
  margin: 0;
  line-height: 1.65;
}

/* Key Takeaways Callout Card */
.takeaway-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 1.75rem;
  margin: 2.5rem 0;
  box-shadow: var(--card-shadow);
}

.takeaway-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-serif);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text-serif-head);
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border-color);
}

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

.takeaway-card li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 0.85rem;
  font-size: 0.98rem;
  color: var(--text-main);
  line-height: 1.6;
}

.takeaway-card li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent-emerald);
  font-weight: 900;
  font-size: 1.1rem;
}

/* In-Article Vector Diagram Frame */
.diagram-frame {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 1.5rem;
  margin: 2.5rem 0;
  overflow-x: auto;
  box-shadow: var(--card-shadow);
}

.diagram-caption {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.75rem;
  font-style: italic;
}

/* Comparison Tables (Light & Dark Compatible) */
.table-responsive {
  overflow-x: auto;
  margin: 2.5rem 0;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  box-shadow: var(--card-shadow);
}

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

.data-table th {
  background: var(--bg-card-hover);
  padding: 1rem 1.25rem;
  color: var(--text-serif-head);
  font-weight: 800;
  border-bottom: 2px solid var(--border-color);
}

.data-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
}

.data-table tr:hover td {
  background: var(--bg-card-hover);
}

/* Pros and Cons Matrix */
.pros-cons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 2.5rem 0;
}

@media (max-width: 650px) {
  .pros-cons-grid {
    grid-template-columns: 1fr;
  }
}

.pros-box, .cons-box {
  background: var(--bg-card);
  border-radius: 6px;
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
}

.pros-box {
  border-top: 4px solid var(--accent-emerald);
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.cons-box {
  border-top: 4px solid var(--accent-red);
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.pros-box h4, .cons-box h4 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.pros-box h4 { color: var(--accent-emerald); }
.cons-box h4 { color: var(--accent-red); }

/* Sticky Table of Contents Sidebar */
.toc-sticky {
  position: sticky;
  top: 80px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 1.25rem;
  box-shadow: var(--card-shadow);
}

.toc-title {
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-red);
  margin-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.4rem;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.toc-list a {
  text-decoration: none;
  font-size: 0.85rem;
  color: var(--text-sub);
  line-height: 1.4;
  transition: color 0.15s;
  display: block;
}

.toc-list a:hover,
.toc-list a.active {
  color: var(--accent-red);
  font-weight: 700;
}

/* Sticky Right Rail — Quick Specs / Metric Scorecard */
.spec-rail-sticky {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.verdict-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 1.4rem;
  box-shadow: var(--card-shadow);
}

.verdict-score {
  font-size: 2.4rem;
  font-weight: 900;
  font-family: var(--font-mono);
  color: var(--accent-emerald);
  line-height: 1;
  margin-bottom: 0.35rem;
}

.verdict-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  margin-bottom: 0.85rem;
}
