/* /assets/css/article_v2.css */
body {
  background: var(--bg);
}

.article-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 60px;
  background: var(--bg);
}
/* ════════════════════════════════
   ARTICLE PAGE
   ════════════════════════════════ */
.article-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}

.article-header {
  margin-bottom: 24px;
  text-align: center;
}

.article-tag {
  display: inline-block;
  background: var(--orange-light);
  color: var(--orange-dark);
  font-size: 0.72em;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 12px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.article-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.4em, 4vw, 2em);
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 12px;
}

.article-meta {
  font-size: 0.8em;
  color: var(--text-light);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.article-content {
  font-size: 0.95em;
  line-height: 1.8;
  /* removed: color: var(--text-muted) */
}

.article-content p,
.article-content li {
  color: var(--text-muted);
}

.article-content h2 {
  font-size: 1.15em;
  font-weight: 800;
  color: var(--text);
  margin: 28px 0 10px;
}

.article-content h3 {
  font-size: 1em;
  font-weight: 800;
  color: var(--text);
  margin: 20px 0 8px;
}

.article-content p { margin-bottom: 14px; }

.article-content ul,
.article-content ol {
  padding-left: 20px;
  margin-bottom: 14px;
}

.article-content li { margin-bottom: 6px; }

.article-content strong { color: var(--text); font-weight: 800; }

.article-content a { color: var(--orange); text-decoration: none; }
.article-content a:hover { text-decoration: underline; }

/* ── Content images ──────────────────────────────────────── */
.article-content img {
  max-width: 100% !important;
  height: auto !important;
  display: block;
  border-radius: var(--radius-sm);
  margin: 14px auto;
}

.article-content img[style] {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
}

.article-content figure {
  margin: 16px 0;
  max-width: 100%;
}

.article-content figure img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: var(--radius-sm);
}

.article-content figcaption {
  font-size: 0.8em;
  color: var(--text-muted);
  text-align: center;
  margin-top: 6px;
}

/* ── Featured image ──────────────────────────────────────── */
.article-featured-img {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin: 20px 0 28px;
  display: block;
  box-shadow: var(--shadow-md);
}

/* ── Tags ────────────────────────────────────────────────── */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 24px 0;
}

.article-tags-label {
  font-size: 0.82em;
  font-weight: 700;
  color: var(--text-muted);
}

.article-tags a {
  display: inline-block;
  padding: 5px 12px;
  background: var(--surface-warm);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  font-size: 0.8em;
  font-weight: 700;
  color: var(--text-muted);
  text-decoration: none;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}

.article-tags a:hover {
  border-color: var(--orange);
  color: var(--orange-dark);
  background: var(--orange-light);
}

/* ── Back to top ─────────────────────────────────────────── */
#backToTop {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--orange, #f97316);
  color: #fff;
  border: none;
  font-size: 1.2em;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
  z-index: 999;
  transition: opacity 0.2s;
}
#backToTop.visible { display: flex; }

/* ── Share bar ───────────────────────────────────────────── */
.article-share {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
  padding: 20px;
  background: var(--surface, #f9f9f9);
  border-radius: 12px;
  border: 1px solid var(--border, #e5e7eb);
}

.article-share-label {
  width: 100%;
  font-size: 0.85em;
  font-weight: 600;
  color: var(--text-muted, #6b7280);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.article-share a,
.article-share button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.88em;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
}

.article-share a:hover,
.article-share button:hover { opacity: 0.85; }

.art-share-wa   { background: #25d366; color: #fff; }
.art-share-fb   { background: #1877f2; color: #fff; }
.art-share-tw   { background: #000;    color: #fff; }
.art-share-copy { background: var(--border, #e5e7eb); color: var(--text, #111); }

/* ── Prev/Next nav ───────────────────────────────────────── */
.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 32px;
}

.article-nav a {
  display: block;
  padding: 16px;
  background: var(--surface, #f9f9f9);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text, #111);
  transition: border-color 0.15s, background 0.15s;
  min-width: 0;
}

.article-nav a:hover {
  border-color: var(--orange, #f97316);
  background: var(--bg, #fff);
}

.article-nav .nav-dir {
  font-size: 0.75em;
  color: var(--text-muted, #6b7280);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.article-nav .nav-title {
  font-size: 0.9em;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.article-nav .nav-next { text-align: right; }

/* ── Related images ──────────────────────────────────────── */
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.related-grid a {
  display: block;
  aspect-ratio: 1/1;
  overflow: hidden;
  border-radius: 8px;
}

.related-grid a img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s;
}

.related-grid a:hover img { transform: scale(1.04); }

/* ── Responsive ──────────────────────────────────────────── */
@media (min-width: 1024px) {
  .article-wrap { padding: 32px 24px 80px; }
  .article-featured-img { max-height: 520px; border-radius: var(--radius-xl); }
}

@media (max-width: 480px) {
  .article-nav  { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Mobile full width fix ───────────────────────────────── */
@media (max-width: 640px) {
  .article-wrap {
    padding: 16px 14px 40px;
    overflow-x: hidden;
  }

  .article-content img,
  .article-content img[style] {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 10px 0;
  }

  .article-featured-img {
    border-radius: var(--radius-sm);
    margin: 12px 0 20px;
  }
}