/* ============================================================
   Article Layout — two-column with sidebar ToC
   ============================================================ */

/* Reading progress bar */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--pink));
  z-index: 9999;
  transition: width 0.1s linear;
}

/* Breadcrumb override for page-hero context */
.page-hero .breadcrumb {
  margin-bottom: 16px;
  padding: 0;
  background: none;
  border: none;
  font-size: 0.8rem;
}

.page-hero .breadcrumb a { color: var(--text-secondary); }
.page-hero .breadcrumb span { color: var(--text-muted); margin: 0 6px; }

/* Article meta */
.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Two-column layout */
.article-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 24px 100px;
  align-items: start;
}

@media (max-width: 900px) {
  .article-layout {
    grid-template-columns: 1fr;
    padding: 40px 20px 80px;
  }
}

/* Sidebar ToC */
.article-toc {
  position: sticky;
  top: calc(var(--nav-height) + 24px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  font-size: 0.82rem;
  max-height: calc(100vh - var(--nav-height) - 60px);
  overflow-y: auto;
}

@media (max-width: 900px) {
  .article-toc {
    position: static;
    max-height: none;
    order: -1;
  }
}

.toc-title {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

#toc-links a {
  display: block;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 5px 0;
  border-left: 2px solid transparent;
  padding-left: 10px;
  transition: var(--transition);
  line-height: 1.4;
}

#toc-links a:hover,
#toc-links a.active {
  color: var(--gold);
  border-left-color: var(--gold);
}

#toc-links a.toc-h3 {
  padding-left: 22px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

#toc-links a.toc-h3:hover,
#toc-links a.toc-h3.active {
  color: var(--gold);
  border-left-color: var(--gold);
}

/* Article body — inherits some styles from style.css but defines new ones */
.article-body h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  color: var(--text-primary);
  margin: 60px 0 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.article-body h2:first-child { margin-top: 0; }

.article-body h3 {
  font-size: 1.1rem;
  color: var(--gold);
  margin: 36px 0 14px;
  font-weight: 600;
}

.article-body p {
  color: var(--text-secondary);
  line-height: 1.85;
  margin-bottom: 18px;
}

.article-body ul,
.article-body ol {
  padding-left: 20px;
  margin-bottom: 18px;
  color: var(--text-secondary);
  line-height: 1.85;
}

.article-body li { margin-bottom: 8px; }

.article-body strong { color: var(--text-primary); }

/* Data tables */
.data-table {
  width: 100%;
  overflow-x: auto;
  margin: 24px 0 32px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.data-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.data-table th {
  background: rgba(200,230,0,0.08);
  color: var(--gold);
  font-weight: 600;
  padding: 12px 16px;
  text-align: left;
  letter-spacing: 0.04em;
  font-size: 0.78rem;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 12px 16px;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(200,230,0,0.05);
  vertical-align: top;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(255,255,255,0.02); }

/* Info cards grid */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 24px 0 32px;
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 20px;
  transition: var(--transition);
}

.info-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.info-card-icon {
  font-size: 1.6rem;
  margin-bottom: 10px;
}

.info-card h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.info-card p {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* Sharapova tip box (redefine for new layout context) */
.article-body .sharapova-tip {
  background: rgba(255, 107, 0, 0.06);
  border: 1px solid rgba(255, 107, 0, 0.25);
  border-left: 4px solid var(--pink);
  border-radius: 0 12px 12px 0;
  padding: 20px 24px;
  margin: 28px 0;
  position: relative;
}

.article-body .sharapova-tip-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

.article-body .sharapova-tip p {
  font-style: italic;
  color: var(--text-secondary);
  margin: 0;
}

/* Article prev/next navigation */
.article-nav-bottom {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-top: 60px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

/* Dark mode toggle button */
#dark-mode-toggle {
  position: fixed;
  bottom: 80px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  z-index: 900;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

#dark-mode-toggle:hover {
  border-color: var(--gold);
  transform: scale(1.1);
}

/* Cookie consent */
#cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 9000;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transform: translateY(0);
  transition: transform 0.3s ease;
}

#cookie-consent.hidden {
  transform: translateY(100%);
  pointer-events: none;
}

#cookie-consent a { color: var(--gold); }

#cookie-accept {
  background: var(--gold);
  color: #000;
  border: none;
  padding: 8px 20px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

#cookie-accept:hover { background: var(--gold-light); }

#cookie-reject {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

#cookie-reject:hover { color: var(--text-secondary); border-color: var(--text-muted); }

/* ── Article Hero Image ── */
.article-hero-img {
  margin-bottom: 40px;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 6;
  background: var(--bg-secondary);
}
.article-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.article-hero-img:hover img { transform: scale(1.02); }
.article-hero-caption {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: right;
  padding: 6px 0 0;
}

/* ── FAQ Section ── */
.faq-section { margin-top: 56px; border-top: 1px solid var(--border); padding-top: 40px; }
.faq-list { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.faq-item[open] { border-color: rgba(200, 230, 0, 0.4); }
.faq-question {
  padding: 18px 24px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-secondary);
  color: var(--text-primary);
  transition: background 0.2s;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question::after { content: '+'; font-size: 1.3rem; color: var(--gold); transition: transform 0.2s; flex-shrink: 0; }
.faq-item[open] .faq-question::after { transform: rotate(45deg); }
.faq-question:hover { background: rgba(200,230,0,0.05); }
.faq-answer { padding: 0 24px 20px; font-size: 0.9rem; line-height: 1.7; color: var(--text-secondary); }
.faq-answer p { margin: 12px 0 0; }

/* ── Social Share Bar ── */
.share-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 40px 0 32px;
}
.share-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 4px;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  text-decoration: none;
  border: none;
}
.share-btn:hover { opacity: 0.85; transform: translateY(-1px); }
.share-twitter  { background: #000; color: #fff; }
.share-facebook { background: #1877f2; color: #fff; }
.share-whatsapp { background: #25d366; color: #fff; }
.share-copy     { background: var(--bg-secondary); color: var(--text-primary); border: 1px solid var(--border); }

/* ── Related Articles ── */
.related-articles { margin-top: 48px; padding-top: 40px; border-top: 1px solid var(--border); }
.related-articles > h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 20px; color: var(--text-primary); }
.related-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.related-card {
  display: block;
  padding: 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-primary);
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
}
.related-card:hover { border-color: rgba(200,230,0,0.5); transform: translateY(-2px); background: rgba(200,230,0,0.04); }
.related-card .badge { font-size: 0.68rem; padding: 3px 10px; margin-bottom: 10px; display: inline-block; }
.related-card h4 { font-size: 0.88rem; font-weight: 600; margin: 0 0 8px; line-height: 1.4; color: var(--text-primary); }
.related-card .related-meta { font-size: 0.75rem; color: var(--gold); font-weight: 500; }
@media (max-width: 640px) { .related-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 420px) { .related-grid { grid-template-columns: 1fr; } }

/* ── Print Styles ── */
@media print {
  .navbar, .mobile-nav, .reading-progress, #dark-mode-toggle,
  #cookie-consent, #back-to-top, .article-toc, .share-bar,
  .related-articles, .article-nav-bottom, .footer { display: none !important; }
  body { background: #fff !important; color: #111 !important; font-size: 11pt; line-height: 1.6; }
  .article-container { max-width: 100%; padding: 0 12pt; }
  .article-layout { display: block !important; }
  .article-header h1 { font-size: 20pt; color: #111 !important; }
  .article-lead { font-size: 11pt; color: #333 !important; }
  .article-body { max-width: 100%; }
  .article-hero-img { aspect-ratio: auto; max-height: 200px; }
  a { color: #111 !important; text-decoration: underline; }
  h2, h3 { page-break-after: avoid; color: #111 !important; }
  p, li { orphans: 3; widows: 3; }
  .data-table { border-collapse: collapse; width: 100%; font-size: 9pt; }
  .data-table th, .data-table td { border: 1px solid #ccc; padding: 5px 8px; }
  .info-grid { display: block; }
  .info-card { border: 1px solid #ccc; padding: 10px; margin-bottom: 8pt; page-break-inside: avoid; }
  .faq-item { border: 1px solid #ccc; margin-bottom: 8pt; page-break-inside: avoid; }
  .faq-question::after { display: none; }
  .faq-answer { display: block !important; padding: 8px 12px; }
  .sharapova-tip { border: 1px solid #ccc; padding: 10px; page-break-inside: avoid; }
}
