/* ═══════════════════════════════════════════════
   InfinityRec — blog.css
   Styles for auto-generated blog articles
   ═══════════════════════════════════════════════ */

/* ─── ARTICLE LAYOUT ─────────────────────────── */
.blog-article {
  max-width: 860px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* ─── BREADCRUMB ─────────────────────────────── */
.breadcrumb ol {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.breadcrumb li:not(:last-child)::after {
  content: '/';
  margin-left: 0.5rem;
  opacity: 0.5;
}
.breadcrumb a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: opacity 0.2s;
}
.breadcrumb a:hover { opacity: 0.75; text-decoration: underline; }

/* ─── ARTICLE HEADER ─────────────────────────── */
.article-meta-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}
.article-category {
  background: var(--accent-cyan);
  color: #0a0a12;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.article-date,
.article-read-time { color: var(--text-muted); font-size: 0.85rem; }

.article-header h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  line-height: 1.25;
  margin-bottom: 1rem;
  color: var(--text-heading);
}
.article-intro {
  font-size: 1.05rem;
  color: var(--text-body);
  line-height: 1.75;
  margin-bottom: 2rem;
}
.article-hero {
  margin: 0 0 2rem;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--glow-cyan-box);
}
.article-hero img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16/9;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.article-hero:hover img { transform: scale(1.02); }
.article-hero figcaption {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  padding: 0.5rem;
  font-style: italic;
}

/* ─── TABLE OF CONTENTS ──────────────────────── */
.toc {
  background: var(--bg-surface, #1c1c2a);
  border: 1px solid var(--border-color, #2a2a3a);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2.5rem;
  position: relative;
}
.toc::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent-cyan), var(--accent-pink));
  border-radius: 3px 0 0 3px;
}
.toc h2 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--text-heading);
  font-family: var(--font-heading, 'Orbitron', sans-serif);
  border: none;
  padding: 0;
}
.toc ol {
  padding-left: 1.5rem;
  margin: 0;
  counter-reset: toc;
}
.toc li { margin-bottom: 0.45rem; }
.toc a {
  color: var(--accent-cyan);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s, padding-left 0.2s;
  display: inline-block;
}
.toc a:hover {
  padding-left: 4px;
  text-decoration: underline;
}
.toc a.active {
  color: var(--accent-pink);
  font-weight: 600;
}

/* ─── ARTICLE CONTENT ────────────────────────── */
.article-content h2 {
  font-size: 1.45rem;
  margin: 2.5rem 0 1rem;
  color: var(--text-heading);
  border-left: 4px solid var(--accent-cyan);
  padding-left: 0.75rem;
  scroll-margin-top: 5rem;
}
.article-content h3 {
  font-size: 1.15rem;
  margin: 1.75rem 0 0.75rem;
  color: var(--text-heading);
}
.article-content p {
  line-height: 1.85;
  color: var(--text-body);
  margin-bottom: 1.25rem;
  font-size: 1rem;
}
.article-content ul,
.article-content ol {
  padding-left: 1.75rem;
  margin-bottom: 1.25rem;
}
.article-content li {
  line-height: 1.75;
  color: var(--text-body);
  margin-bottom: 0.4rem;
}
.article-content blockquote {
  border-left: 4px solid var(--accent-pink);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  background: rgba(255, 45, 149, 0.05);
  border-radius: 0 8px 8px 0;
  color: var(--text-body);
  font-style: italic;
}
.article-content strong { color: var(--text-heading); }
.article-content a { color: var(--accent-cyan); }
.article-content a:hover { text-decoration: underline; }

/* ─── PRO TIP BOX ────────────────────────────── */
.pro-tip {
  background: rgba(0, 240, 255, 0.05);
  border: 1px solid rgba(0, 240, 255, 0.25);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}
.pro-tip strong { color: var(--accent-cyan); display: block; margin-bottom: 0.4rem; }

/* ─── COMPARISON TABLE ───────────────────────── */
.comparison-table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  box-shadow: var(--glow-cyan-box);
}
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 400px;
}
.comparison-table th {
  background: var(--accent-cyan);
  color: #0a0a12;
  padding: 0.75rem 1rem;
  text-align: left;
  font-family: var(--font-heading, 'Orbitron', sans-serif);
  font-size: 0.82rem;
}
.comparison-table td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-body);
}
.comparison-table tr:nth-child(even) { background: rgba(0,240,255,0.02); }
.comparison-table tr:hover { background: rgba(0,240,255,0.04); }
.comparison-table tr:last-child td { border-bottom: none; }

/* ─── CTA BOX ────────────────────────────────── */
.article-cta-box {
  background: linear-gradient(135deg, rgba(0,240,255,0.07), rgba(255,45,149,0.05));
  border: 2px solid var(--accent-cyan);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  margin: 2rem 0;
  position: relative;
  overflow: hidden;
}
.article-cta-box::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(0,240,255,0.08), transparent 70%);
  pointer-events: none;
}
.article-cta-box h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--accent-cyan);
  text-shadow: var(--glow-cyan-text);
}
.article-cta-box p {
  color: var(--text-body);
  margin-bottom: 1.25rem;
}
.article-cta-box .btn-primary {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-pink));
  color: #ffffff !important;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-weight: 700;
  font-family: var(--font-heading, 'Orbitron', sans-serif);
  text-decoration: none;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: var(--glow-cyan-box);
}
.article-cta-box .btn-primary:hover {
  transform: scale(1.05);
  box-shadow: var(--glow-cyan-box-hover);
}

/* ─── FAQ ────────────────────────────────────── */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}
.faq-item {
  background: var(--bg-card, #14141e);
  border: 1px solid var(--border-color, #2a2a3a);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.faq-item:hover { border-color: rgba(0,240,255,0.3); }
.faq-item summary {
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-heading);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 1.4rem;
  color: var(--accent-cyan);
  flex-shrink: 0;
  transition: transform 0.2s;
}
.faq-item[open] summary::after {
  content: '−';
}
.faq-item p {
  padding: 0 1.25rem 1rem;
  color: var(--text-body);
  margin: 0;
  line-height: 1.75;
  border-top: 1px solid var(--border-color);
  padding-top: 0.75rem;
}

/* ─── SOCIAL SHARE ───────────────────────────── */
.social-share {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  margin: 2.5rem 0;
  padding: 1.25rem 1.5rem;
  background: var(--bg-surface, #1c1c2a);
  border: 1px solid var(--border-color);
  border-radius: 12px;
}
.social-share span,
.social-share p { font-weight: 600; font-size: 0.9rem; color: var(--text-heading); }
.social-share a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.85rem;
  text-decoration: none;
  color: var(--text-heading);
  transition: border-color 0.2s, background 0.2s;
}
.social-share a:hover {
  border-color: var(--accent-cyan);
  background: rgba(0,240,255,0.05);
}

/* ─── BACK TO BLOG ───────────────────────────── */
.back-to-blog {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
  color: var(--text-muted) !important;
  text-decoration: none;
  transition: color 0.2s;
}
.back-to-blog:hover { color: var(--accent-cyan) !important; }

/* ─── AUTHOR META ────────────────────────────── */
.article-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0.5rem 0 1.5rem;
  flex-wrap: wrap;
}
.article-meta img { border-radius: 50%; flex-shrink: 0; }
.article-meta strong { color: var(--text-heading); }

/* ─── RELATED ARTICLES ───────────────────────── */
.related-articles { margin-top: 3rem; }
.related-articles h2 {
  font-size: 1.2rem;
  margin-bottom: 1.25rem;
  color: var(--text-heading);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.25rem;
}

/* ─── READ PROGRESS BAR ──────────────────────── */
#readProgress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-pink));
  width: 0%;
  z-index: 9999;
  transition: width 0.1s linear;
  box-shadow: 0 0 6px rgba(0,240,255,0.6);
}

/* ─── LIGHT MODE OVERRIDES ───────────────────── */
body.light-mode .article-content h2 { border-color: var(--accent-cyan); }
body.light-mode .toc { background: #eff6ff; border-color: #bfdbfe; }
body.light-mode .toc::before { background: linear-gradient(180deg, #0284c7, #be185d); }
body.light-mode .toc a { color: #0284c7; }
body.light-mode .comparison-table th { background: #0284c7; color: #fff; }
body.light-mode .comparison-table tr:nth-child(even) { background: #f0f9ff; }
body.light-mode .comparison-table tr:hover { background: #e0f2fe; }
body.light-mode .article-cta-box { background: #eff6ff; border-color: #0284c7; }
body.light-mode .article-cta-box h3 { color: #0284c7; text-shadow: none; }
body.light-mode .social-share { background: #f8fafc; border-color: #cbd5e1; }
body.light-mode .social-share a { background: #fff; border-color: #cbd5e1; color: #1e293b; }
body.light-mode .social-share a:hover { border-color: #0284c7; background: #eff6ff; }
body.light-mode .faq-item { background: #fff; border-color: #e2e8f0; }
body.light-mode .faq-item:hover { border-color: #93c5fd; }
body.light-mode .faq-item summary { color: #0f172a; }
body.light-mode .faq-item summary::after { color: #0284c7; }
body.light-mode .faq-item p { color: #475569; border-color: #e2e8f0; }
body.light-mode .pro-tip { background: #eff6ff; border-color: #bfdbfe; }
body.light-mode .pro-tip strong { color: #0284c7; }
body.light-mode .article-content blockquote { background: #fdf2f8; border-color: #be185d; }
body.light-mode #readProgress { box-shadow: 0 0 6px rgba(2,132,199,0.5); }
body.light-mode .back-to-blog { color: #475569 !important; }
body.light-mode .back-to-blog:hover { color: #0284c7 !important; }

/* ─── RESPONSIVE ─────────────────────────────── */
@media (max-width: 900px) {
  .grid[style*="300px"] {
    grid-template-columns: 1fr !important;
  }
  aside { display: none !important; }
}

@media (max-width: 768px) {
  .blog-article { padding: 1.25rem 1rem 3rem; }
  .article-header h1 { font-size: 1.5rem; }
  .article-content h2 { font-size: 1.2rem; margin-top: 2rem; }
  .comparison-table { font-size: 0.82rem; }
  .article-cta-box { padding: 1.25rem 1rem; }
  .article-cta-box h3 { font-size: 1.1rem; }
  .toc { padding: 1.1rem 1.25rem; }
  .social-share { gap: 0.5rem; }
  .social-share a { padding: 0.4rem 0.75rem; font-size: 0.8rem; }
}

@media (max-width: 480px) {
  .article-meta-row { gap: 0.5rem; }
  .article-category { font-size: 0.7rem; }
  .comparison-table th,
  .comparison-table td { padding: 0.5rem 0.6rem; font-size: 0.78rem; }
}
