/* ═══════════════════════════════════════════════════════════════════════
   ARTICLE PREMIUM — CD RESTOP v2.0 (April 2026)
   Glass-morphism luxury upgrade for blog articles
   Loaded AFTER content-fixes.css
═══════════════════════════════════════════════════════════════════════ */

/* ── 1. Typography Upgrade ──────────────────────────────────────────── */

.article-content {
  font-feature-settings: 'kern' 1, 'liga' 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Drop cap — first paragraph */
.article-content > p:first-of-type::first-letter {
  float: left;
  font-family: var(--font-serif, 'DM Serif Display', serif);
  font-size: 4em;
  line-height: 0.8;
  padding-right: 12px;
  padding-top: 8px;
  color: var(--gold, #C8973E);
  font-weight: 400;
}

/* Lead-in paragraph */
.article-content > p:first-of-type {
  font-size: 1.08rem;
  line-height: 1.85;
  color: rgba(255,255,255,0.88);
}

/* ── 2. Heading Upgrade ─────────────────────────────────────────────── */

.article-content h2 {
  font-size: 1.6rem;
  margin: 48px 0 20px;
  position: relative;
}
.article-content h2::before {
  height: calc(100% - 4px);
  background: linear-gradient(180deg, var(--gold), var(--gold-dark, #A67C2E), transparent);
}
.article-content h2::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 16px;
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
  border-radius: 1px;
  transition: width 0.4s ease;
}
.article-content h2:hover::after {
  width: 70px;
}

.article-content h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--gold-light, #D4A94E);
  margin: 36px 0 14px;
  letter-spacing: 0.01em;
}

/* ── 3. Blockquote — Premium pull quote ─────────────────────────────── */

.article-content blockquote {
  border-left: 4px solid var(--gold);
  background: linear-gradient(135deg, rgba(200,151,62,0.08), rgba(15,40,71,0.4));
  padding: 26px 30px 26px 32px;
  margin: 36px 0;
  border-radius: 0 var(--r-lg, 12px) var(--r-lg, 12px) 0;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: relative;
}
.article-content blockquote::before {
  content: '\201C';
  position: absolute;
  top: -10px;
  left: 18px;
  font-size: 4rem;
  line-height: 1;
  color: rgba(200,151,62,0.15);
  font-family: var(--font-serif);
}
.article-content blockquote p {
  font-size: 1.05rem;
  line-height: 1.75;
  color: rgba(255,255,255,0.8);
}

/* ── 4. Images — Gallery-grade ──────────────────────────────────────── */

.article-content img {
  border-radius: 14px;
  margin: 36px 0;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3), 0 0 0 1px rgba(200,151,62,0.08);
  transition: transform 0.5s cubic-bezier(.23,1,.32,1), box-shadow 0.5s;
  cursor: zoom-in;
}
.article-content img:hover {
  transform: scale(1.015);
  box-shadow: 0 16px 56px rgba(0,0,0,0.4), 0 0 0 1px rgba(200,151,62,0.15);
}

/* Figure captions */
.article-content figure {
  margin: 36px 0;
}
.article-content figcaption {
  text-align: center;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
  margin-top: 10px;
  font-style: italic;
}

/* ── 5. Lists — Gold accents ────────────────────────────────────────── */

.article-content ul {
  list-style: none;
  padding-left: 0;
}
.article-content ul li {
  position: relative;
  padding-left: 22px;
}
.article-content ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark, #A67C2E));
  box-shadow: 0 0 6px rgba(200,151,62,0.3);
}

.article-content ol {
  list-style: none;
  padding-left: 0;
  counter-reset: ol-premium;
}
.article-content ol li {
  position: relative;
  padding-left: 34px;
  counter-increment: ol-premium;
}
.article-content ol li::before {
  content: counter(ol-premium);
  position: absolute;
  left: 0;
  top: 1px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(200,151,62,0.1);
  border: 1px solid rgba(200,151,62,0.2);
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── 6. Tables — Glass executive ────────────────────────────────────── */

.data-table, .article-content table {
  border-radius: var(--r-lg, 12px);
  overflow: hidden;
  border: 1px solid rgba(200,151,62,0.1);
  border-collapse: separate;
  border-spacing: 0;
}
.data-table thead, .article-content thead {
  background: linear-gradient(135deg, rgba(200,151,62,0.12), rgba(200,151,62,0.04));
}
.data-table th, .article-content th {
  font-size: 0.78rem;
  letter-spacing: 0.6px;
}
.data-table tbody tr:hover, .article-content tbody tr:hover {
  background: rgba(200,151,62,0.06);
}

/* ── 7. Code Blocks ─────────────────────────────────────────────────── */

.article-content pre {
  background: rgba(10,10,20,0.8);
  border: 1px solid rgba(200,151,62,0.08);
  border-radius: var(--r-lg, 12px);
  padding: 20px 24px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 13px;
  line-height: 1.7;
  backdrop-filter: blur(12px);
}
.article-content code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.85em;
  background: rgba(200,151,62,0.1);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--gold-light, #D4A94E);
}
.article-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}

/* ── 8. Links — Animated underline ──────────────────────────────────── */

.article-content a:not(.share-btn):not(.related-card):not(.toc-item a) {
  color: var(--gold-light, #D4A94E);
  text-decoration: none;
  background-image: linear-gradient(var(--gold-dark, #A67C2E), var(--gold-dark, #A67C2E));
  background-size: 0% 1.5px;
  background-position: left bottom;
  background-repeat: no-repeat;
  transition: background-size 0.3s ease;
  padding-bottom: 1px;
}
.article-content a:not(.share-btn):hover {
  background-size: 100% 1.5px;
}

/* ── 9. Horizontal Rule ─────────────────────────────────────────────── */

.article-content hr {
  border: none;
  height: 1px;
  margin: 48px auto;
  max-width: 100px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* ── 10. Related Cards — Premium glass ──────────────────────────────── */

.related-card {
  border-radius: var(--r-lg, 12px);
  transition: all 0.45s cubic-bezier(.23,1,.32,1);
}
.related-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 56px rgba(0,0,0,0.35), 0 0 24px rgba(200,151,62,0.06);
}
.related-img {
  height: 150px;
  position: relative;
  overflow: hidden;
}
.related-title {
  font-size: 1.05rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

/* ── 11. Share Buttons — Glass upgrade ──────────────────────────────── */

.share-btn {
  border-radius: var(--r, 8px);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: all 0.3s cubic-bezier(.23,1,.32,1);
}
.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

/* ── 12. Reading Progress ───────────────────────────────────────────── */

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-dark, #A67C2E), var(--gold, #C8973E), var(--gold-light, #D4A94E));
  z-index: 9999;
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 8px rgba(200,151,62,0.3);
}

/* ── 13. Selection ──────────────────────────────────────────────────── */

.article-content ::selection {
  background: rgba(200,151,62,0.25);
  color: inherit;
}

/* ── 14. TOC Active — Enhanced ──────────────────────────────────────── */

.toc-active {
  background: rgba(200,151,62,0.08);
  border-radius: 8px;
}
.toc-active::before {
  width: 3px;
  background: linear-gradient(180deg, var(--gold), var(--gold-dark, #A67C2E));
  border-radius: 2px;
}

/* ── 15. Accessibility ──────────────────────────────────────────────── */

.article-content a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ── 16. Reduced Motion ─────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .article-content img,
  .related-card,
  .share-btn,
  .article-content h2::after {
    transition: none !important;
    transform: none !important;
  }
}

/* ── 17. Mobile ─────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .article-content > p:first-of-type::first-letter {
    font-size: 3em;
    padding-right: 8px;
  }
  .article-content h2 { font-size: 1.35rem; margin-top: 36px; }
  .article-content h3 { font-size: 1.1rem; }
  .article-content blockquote::before { font-size: 2.5rem; }
  .related-img { height: 130px; }
}
