/* ================================================================
   WhiteCoder World News — article.css
   Single Article Page Styles
   ================================================================ */

/* ── Breadcrumb ─────────────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  padding: 24px 0 20px;
  flex-wrap: wrap;
}
.breadcrumb a {
  color: var(--text-secondary);
  transition: color var(--transition);
}
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb-current {
  color: var(--text-primary);
  font-weight: 500;
}

/* ── Article Hero ────────────────────────────────────────────────── */
.article-hero { max-width: 900px; margin: 0 auto; }

.article-meta-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.article-cat-badge {
  display: inline-block;
  padding: 4px 12px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 3px;
  transition: opacity var(--transition);
}
.article-cat-badge:hover { opacity: 0.85; }

.premium-label {
  display: inline-block;
  padding: 4px 10px;
  background: linear-gradient(135deg, #B8860B, #DAA520);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  border-radius: 3px;
}

/* ── Headline ───────────────────────────────────────────────────── */
.article-headline {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin-bottom: 24px;
}

/* ── Article Meta Row ───────────────────────────────────────────── */
.article-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}

.article-meta-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.article-author-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}
.article-author-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.article-meta-detail {
  font-size: 12.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.article-meta-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ── Language Switcher ──────────────────────────────────────────── */
.lang-switcher {
  display: flex;
  gap: 4px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  padding: 3px;
  border: 1px solid var(--border);
}
.lang-btn {
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 4px;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.lang-btn:hover { color: var(--text-primary); background: var(--bg-card); }
.lang-btn.active {
  background: var(--accent);
  color: #fff;
}

/* ── TTS Button ─────────────────────────────────────────────────── */
.tts-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  transition: all var(--transition);
  cursor: pointer;
  font-family: var(--font-body);
}
.tts-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ── TTS Player ─────────────────────────────────────────────────── */
.tts-player {
  margin-bottom: 28px;
}
.tts-player-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
}
.tts-play-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: transform var(--transition), box-shadow var(--transition);
}
.tts-play-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 16px var(--accent-glow);
}
.tts-stop-btn {
  width: 30px; height: 30px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
}
.tts-stop-btn:hover { background: var(--bg-elevated); color: var(--text-primary); }
.tts-info { flex: 1; }
.tts-title {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.tts-progress-wrap {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.tts-progress-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  width: 0%;
  transition: width 0.3s linear;
}

/* ── Hero Image ─────────────────────────────────────────────────── */
.article-hero-img-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 40px;
  aspect-ratio: 16/9;
  background: var(--bg-elevated);
}
.article-hero-img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.article-hero-img-wrap:hover .article-hero-img { transform: scale(1.02); }

/* ── Article Layout ─────────────────────────────────────────────── */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  max-width: 1100px;
  margin: 0 auto 64px;
}

/* ── Article Body ───────────────────────────────────────────────── */
.article-body {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.78;
  color: var(--text-primary);
}
.article-body p {
  margin-bottom: 24px;
}
.article-body p:first-child::first-letter {
  font-family: var(--font-display);
  font-size: 64px;
  font-weight: 900;
  line-height: 0.85;
  float: left;
  margin-right: 8px;
  margin-top: 6px;
  color: var(--accent);
}

/* ── Source Row ─────────────────────────────────────────────────── */
.article-source-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 32px 0;
  gap: 12px;
  flex-wrap: wrap;
}
.article-source-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  transition: opacity var(--transition);
}
.article-source-link:hover { opacity: 0.75; }
.article-source-label {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
}

/* ── Article Actions (Reactions + Share) ────────────────────────── */
.article-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}

.reactions-row, .share-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.reactions-label, .share-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-right: 4px;
}

.reaction-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  transition: all var(--transition);
  cursor: pointer;
  font-family: var(--font-body);
}
.reaction-btn:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
  transform: scale(1.05);
}
.reaction-btn.active {
  border-color: var(--accent);
  background: var(--accent-glow);
  color: var(--accent);
  font-weight: 600;
}
.reaction-icon { display:flex; align-items:center; justify-content:center; }
.reaction-icon svg { width:16px; height:16px; flex-shrink:0; transition:stroke var(--transition); }
.reaction-btn.active .reaction-icon svg { fill:var(--accent); stroke:var(--accent); }
.reaction-btn:hover  .reaction-icon svg { stroke:var(--accent); }
.reaction-count { font-size: 12px; font-weight: 500; }

.share-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
  cursor: pointer;
  text-decoration: none;
}
.share-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.12); }
.share-fb:hover { background: #1877f2; border-color: #1877f2; color: #fff; }
.share-tw:hover { background: #000;    border-color: #000;    color: #fff; }
.share-wa:hover { background: #25d366; border-color: #25d366; color: #fff; }
.share-copy:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ── Paywall ────────────────────────────────────────────────────── */
.paywall-gate {
  position: relative;
  margin-bottom: 40px;
}
.paywall-blur-content {
  font-size: 17px;
  line-height: 1.75;
  color: var(--text-secondary);
  filter: blur(6px);
  user-select: none;
  pointer-events: none;
  max-height: 200px;
  overflow: hidden;
}
.paywall-inner {
  position: relative;
  z-index: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  text-align: center;
  margin-bottom: -80px;
  box-shadow: var(--shadow-hover);
}
.paywall-icon {
  font-size: 36px;
  color: #DAA520;
  margin-bottom: 12px;
}
.paywall-inner h3 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 10px;
}
.paywall-inner p {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 400px;
  margin: 0 auto 24px;
  line-height: 1.6;
}
.paywall-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.paywall-btn-primary {
  padding: 12px 28px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  transition: all var(--transition);
}
.paywall-btn-primary:hover { background: var(--accent-dim); transform: translateY(-1px); }
.paywall-btn-secondary {
  padding: 12px 28px;
  border: 1.5px solid var(--border-strong);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 15px;
  transition: all var(--transition);
}
.paywall-btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.paywall-features {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Trust Widget ───────────────────────────────────────────────── */
.trust-widget-body { padding: 20px 18px; text-align: center; }
.trust-ring-wrap {
  position: relative;
  width: 100px;
  margin: 0 auto 16px;
}
.trust-ring { width: 100%; transform: rotate(-90deg); }
.trust-ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.trust-ring-pct {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1;
}
.trust-ring-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.trust-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.55;
  text-align: center;
}

/* ── Article Sidebar ────────────────────────────────────────────── */
.article-sidebar { display: flex; flex-direction: column; gap: 28px; }

/* ── Comments ───────────────────────────────────────────────────── */
.comments-section { margin-top: 8px; }

.comment-login-prompt {
  padding: 16px 20px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  text-align: center;
}
.comment-login-prompt a { color: var(--accent); font-weight: 600; }

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}
.comment-form textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-primary);
  resize: vertical;
  outline: none;
  transition: border-color var(--transition);
  line-height: 1.55;
}
.comment-form textarea:focus { border-color: var(--accent); }
.btn-comment-submit {
  align-self: flex-end;
  padding: 9px 22px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  font-family: var(--font-body);
  transition: all var(--transition);
}
.btn-comment-submit:hover { background: var(--accent-dim); transform: translateY(-1px); }

.comments-empty {
  padding: 32px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

.comment-card {
  display: flex;
  gap: 12px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.comment-card:last-child { border-bottom: none; }
.comment-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--bg-elevated);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 15px;
  color: var(--text-secondary);
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid var(--border);
}
.comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
.comment-body { flex: 1; }
.comment-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.comment-author {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
}
.comment-time {
  font-size: 12px;
  color: var(--text-muted);
}
.comment-text {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* ── More Stories ───────────────────────────────────────────────── */
.more-stories-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 0;
  border-top: 1px solid var(--border);
}

/* ── Reading Progress ───────────────────────────────────────────── */
#reading-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: var(--accent);
  z-index: 9998;
  width: 0%;
  border-radius: 0 2px 2px 0;
  transition: width 0.1s linear;
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .article-layout { grid-template-columns: 1fr; gap: 32px; }
  .article-sidebar { order: -1; }
  .trust-widget-body { display: flex; align-items: center; gap: 20px; text-align: left; }
  .trust-ring-wrap { margin: 0; flex-shrink: 0; }
  .article-body { font-size: 16px; }
  .article-headline { font-size: clamp(24px, 5vw, 36px); }
}
@media (max-width: 600px) {
  .article-meta-row { flex-direction: column; align-items: flex-start; }
  .article-actions { flex-direction: column; align-items: flex-start; }
  .article-body p:first-child::first-letter { font-size: 48px; }
  .paywall-inner { padding: 28px 20px; }
}
