/* ==========================================================================
   GeoProspect — Dedicated Articles Portal & Editorial Reader (SEO & PWA)
   ========================================================================== */

/* Filter Navigation */
.articles-filter-wrap { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }
.article-filter-btn {
  background: var(--bg-surface); border: 1px solid var(--border-subtle);
  color: var(--text-secondary); font-family: var(--font-sans); font-size: 13px;
  font-weight: 500; padding: 8px 16px; border-radius: 6px; cursor: pointer;
  transition: all 150ms ease;
}
.article-filter-btn:hover { color: #fff; border-color: var(--border-hover); }
.article-filter-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Articles Grid & Horizontal Slider */
.articles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.articles-slider {
  display: flex; gap: 20px; overflow-x: auto;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  padding: 6px 2px 18px; scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.2) transparent;
}
.articles-slider::-webkit-scrollbar { height: 6px; }
.articles-slider::-webkit-scrollbar-track { background: rgba(255,255,255,0.03); border-radius: 4px; }
.articles-slider::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 4px; }
.articles-slider::-webkit-scrollbar-thumb:hover { background: var(--accent); }
.articles-slider .article-card { flex: 0 0 350px; min-width: 350px; max-width: 350px; scroll-snap-align: start; }
.articles-more-wrap { display: flex; justify-content: center; margin-top: 28px; }

.article-card {
  background: var(--bg-surface); border: 1px solid var(--border-subtle);
  border-radius: 8px; overflow: hidden; display: flex; flex-direction: column;
  text-decoration: none; color: inherit; transition: border-color 150ms ease, transform 150ms ease;
}
.article-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.article-card-thumb { width: 100%; height: 180px; object-fit: cover; background: #06090e; }
.article-card-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.article-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.article-cat { font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--accent); text-transform: uppercase; }
.article-time { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }
.article-title { font-size: 16.5px; font-weight: 700; color: #fff; line-height: 1.4; margin-bottom: 10px; }
.article-excerpt { font-size: 13.5px; color: var(--text-secondary); line-height: 1.6; flex: 1; margin-bottom: 16px; }

/* Article Card Author Footer (Truncation & Non-breaking CTA) */
.article-card-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding-top: 14px; border-top: 1px solid var(--border-subtle); margin-top: auto;
}
.article-author-mini {
  display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; overflow: hidden;
}
.author-mini-img {
  width: 26px; height: 26px; min-width: 26px; border-radius: 50%; object-fit: cover;
  border: 1px solid var(--border-hover); flex-shrink: 0;
}
.author-mini-name {
  font-size: 12px; font-weight: 600; color: #cbd5e1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block;
}
.article-cta {
  display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600;
  color: var(--accent); white-space: nowrap; flex-shrink: 0;
}

/* Breadcrumb Navigation */
.article-breadcrumb {
  display: flex; align-items: center; gap: 8px; font-size: 13px;
  color: var(--text-muted); margin-bottom: 20px; font-family: var(--font-mono);
}
.article-breadcrumb a { color: var(--text-secondary); text-decoration: none; }
.article-breadcrumb a:hover { color: #fff; }

/* Detail Article Header (Strictly Non-Sticky) */
.article-header {
  position: static !important;
  margin-bottom: 24px;
  background: transparent !important;
  border: none !important;
}
.article-main-title { font-size: 32px; font-weight: 700; color: #fff; line-height: 1.25; margin: 12px 0 14px; }
.article-meta-row { display: flex; align-items: center; gap: 12px; font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }

/* Featured Image */
.featured-image-wrap { margin-bottom: 32px; }
.featured-image { width: 100%; max-height: 420px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border-subtle); }
.featured-image-caption { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-muted); margin-top: 8px; text-align: center; }

/* Article Body Content & Markdown Styles */
.article-body-content { font-size: 16px; line-height: 1.8; color: #cbd5e1; margin-bottom: 40px; }
.article-body-content h2 { font-size: 23px; font-weight: 700; color: #fff; margin: 36px 0 16px; }
.article-body-content h3 { font-size: 19px; font-weight: 700; color: #fff; margin: 28px 0 14px; }
.article-body-content p { margin-bottom: 18px; }
.article-body-content ul, .article-body-content ol { margin: 14px 0 22px 24px; }
.article-body-content li { margin-bottom: 8px; }
.article-body-content strong { color: #fff; font-weight: 600; }
.article-body-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.article-body-content a:hover { color: var(--accent-hover); }

/* Mobile-Native Responsive Markdown Table */
.article-table-wrap {
  width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch;
  margin: 28px 0 32px; border: 1px solid var(--border-subtle);
  border-radius: 8px; background: var(--bg-surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.article-table-wrap::-webkit-scrollbar { height: 6px; }
.article-table-wrap::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.02); }
.article-table-wrap::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 3px; }
.article-table {
  width: 100%; min-width: 580px; border-collapse: collapse;
  font-size: 13.5px; line-height: 1.6; text-align: left;
}
.article-table th {
  background: rgba(255, 255, 255, 0.04); color: #fff; font-weight: 600;
  padding: 13px 16px; border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.05em;
  text-transform: uppercase; white-space: nowrap;
}
.article-table td {
  padding: 13px 16px; border-bottom: 1px solid var(--border-subtle);
  color: #cbd5e1; vertical-align: middle;
}
.article-table td strong { color: #fff; font-weight: 600; }
.article-table tr:last-child td { border-bottom: none; }
.article-table tr:hover td { background: rgba(255, 255, 255, 0.025); }

/* Scientific Math & Typography Box */
.math-box {
  background: var(--bg-surface); border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--accent); border-radius: 6px;
  padding: 12px 18px; margin: 18px 0; font-family: var(--font-mono);
  font-size: 13.5px; color: #f8fafc; overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.math-box strong { color: #fff; }
.math-box sub { font-size: 10.5px; vertical-align: sub; }

/* Blockquote & Code */
.article-body-content blockquote {
  margin: 24px 0; padding: 14px 20px; border-left: 3px solid var(--accent);
  background: var(--bg-surface); border-radius: 0 6px 6px 0; color: #e2e8f0; font-style: italic;
}
.article-body-content blockquote p { margin-bottom: 0; }
.article-body-content code {
  font-family: var(--font-mono); font-size: 13px; background: rgba(255,255,255,0.06);
  padding: 2px 6px; border-radius: 4px; color: #f97316;
}

/* In-Article Callout Banner */
.in-article-banner {
  background: var(--bg-surface); border: 1px solid var(--border-hover);
  border-left: 4px solid var(--accent); border-radius: 6px; padding: 22px 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; margin: 36px 0;
}
.banner-title { font-size: 16px; font-weight: 700; color: #fff; margin-bottom: 4px; }
.banner-desc { font-size: 13.5px; color: var(--text-secondary); line-height: 1.5; }
.banner-btn-wrap { display: flex; gap: 10px; flex-wrap: wrap; }

/* Author Box */
.author-box {
  background: var(--bg-surface); border: 1px solid var(--border-subtle);
  border-radius: 8px; padding: 28px; display: flex; gap: 24px; align-items: flex-start;
  margin-top: 40px; border-top: 2px solid var(--accent);
}
.author-photo {
  width: 90px; height: 90px; min-width: 90px; object-fit: cover;
  border-radius: 8px; border: 1px solid var(--border-hover);
}
.author-details { flex: 1; }
.author-label { font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; letter-spacing: 0.12em; color: var(--accent); margin-bottom: 4px; }
.author-name { font-size: 18px; font-weight: 700; color: #fff; margin-bottom: 2px; }
.author-role { font-family: var(--font-mono); font-size: 12px; color: var(--text-secondary); margin-bottom: 10px; }
.author-bio { font-size: 14px; color: #cbd5e1; line-height: 1.6; margin-bottom: 12px; }
.author-links a { font-family: var(--font-mono); font-size: 12px; color: var(--accent); text-decoration: none; }
.author-links a:hover { text-decoration: underline; }

/* Social Share Bar */
.article-share-bar {
  display: flex; align-items: center; gap: 12px; margin-top: 18px;
  flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--border-subtle);
}
.article-share-bar-bottom {
  margin: 32px 0 20px; padding: 14px 16px; background: var(--bg-surface);
  border: 1px solid var(--border-subtle); border-radius: 8px;
}
.share-label {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.1em; color: var(--text-secondary);
}
.share-btn-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.share-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 32px;
  padding: 0 11px; background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle); border-radius: 6px;
  color: #cbd5e1; font-size: 12px; font-weight: 500; cursor: pointer;
  transition: all 0.15s ease; text-decoration: none;
}
.share-btn:hover { background: rgba(255, 255, 255, 0.08); color: #fff; border-color: var(--border-hover); }
.share-btn svg { width: 14px; height: 14px; max-width: 14px; max-height: 14px; flex-shrink: 0; }
.share-fb:hover { border-color: #1877F2; color: #1877F2; } .share-tw:hover { border-color: #ffffff; color: #ffffff; }
.share-li:hover { border-color: #0A66C2; color: #0A66C2; } .share-tg:hover { border-color: #24A1DE; color: #24A1DE; }
.share-wa:hover { border-color: #25D366; color: #25D366; } .share-copy:hover { border-color: var(--accent); color: var(--accent); }

/* Share Toast */
.share-toast {
  position: fixed; bottom: 74px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: #0f172a; color: #fff; border: 1px solid var(--accent);
  padding: 9px 16px; border-radius: 6px; font-size: 13px; font-weight: 500;
  pointer-events: none; opacity: 0; transition: all 0.25s ease; z-index: 1000;
}
.share-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

#reader-modal, .reader-modal { display: none !important; visibility: hidden !important; opacity: 0 !important; pointer-events: none !important; position: absolute !important; left: -9999px !important; top: -9999px !important; width: 0 !important; height: 0 !important; overflow: hidden !important; }

/* Responsive */
@media (max-width: 992px) {
  .articles-grid { grid-template-columns: 1fr; gap: 18px; }
  .author-box { flex-direction: column; padding: 20px; gap: 16px; }
  .author-photo { width: 70px; height: 70px; min-width: 70px; }
  .article-main-title { font-size: 24px; }
  .in-article-banner { flex-direction: column; align-items: stretch; }
  .banner-btn-wrap .btn { width: 100%; }
}
@media (max-width: 768px) {
  .articles-slider { gap: 14px; padding-bottom: 12px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
  .articles-slider .article-card { flex: 0 0 285px; min-width: 285px; max-width: 285px; }
  .article-table { font-size: 12.5px; min-width: 520px; }
  .article-table th, .article-table td { padding: 10px 12px; }
  .math-box { font-size: 12px; padding: 10px 14px; }
  .article-body-content { font-size: 15px; }
}
