/* =============================================================================
   ArchiTimes — Article Reader Page Styles
   ============================================================================= */

/* Override body padding for article page */
body.article-page {
  padding-top: var(--header-height);
  background: #FFFFFF;
}

/* Simpler header for article page — just logo + back */
body.article-page #site-header .header-inner {
  grid-template-columns: auto 1fr auto;
}

/* Removed to allow category nav menus on the article page */

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 100px;
  color: rgba(255,255,255,0.75);
  font-size: 13px;
  font-weight: 500;
  transition: color 0.2s, border-color 0.2s;
  text-decoration: none;
}

.back-btn:hover {
  color: #FFFFFF;
  border-color: rgba(255,255,255,0.35);
}


/* ============================================================================
   ARTICLE SKELETON
   ============================================================================ */
.article-skeleton {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 28px 80px;
}

.art-skel-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  background: linear-gradient(90deg, #EBEBEB 0%, #F5F5F5 50%, #EBEBEB 100%);
  background-size: 400% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
  margin-bottom: 36px;
}

.art-skel-body { display: flex; flex-direction: column; gap: 0; }

.art-skel-line {
  display: block;
  border-radius: 4px;
  background: linear-gradient(90deg, #EBEBEB 0%, #F5F5F5 50%, #EBEBEB 100%);
  background-size: 400% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
  height: 16px;
}


/* ============================================================================
   ARTICLE CONTENT LAYOUT
   ============================================================================ */
#article-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 28px 100px;
  animation: fadeIn 0.45s ease-out both;
}

/* Hero Image */
.art-hero-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #EBEBEB;
  margin-bottom: 40px;
}

.art-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Meta row */
.art-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.art-source {
  font-size: 16px;
  font-weight: 500;
  color: #909090;
}

.art-source::after { content: '·'; margin-left: 14px; opacity: 0.5; }

.art-date {
  font-size: 16px;
  color: #909090;
}

/* Title */
.art-title {
  font-family: 'AmpSans', 'Playfair Display', Georgia, serif;
  font-size: clamp(34px, 5.5vw, 62px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.8px;
  color: #111111;
  margin-bottom: 22px;
  text-wrap: balance;
}

/* Deck / standfirst */
.art-deck {
  font-family: 'AmpSans', 'Playfair Display', Georgia, serif;
  font-size: 26px;
  font-style: italic;
  line-height: 1.65;
  color: #4A4A4A;
  border-bottom: 1px solid #E8E8E8;
  padding-bottom: 30px;
  margin-bottom: 34px;
}

/* Why It Matters */
.art-why {
  background: rgba(184, 144, 42, 0.06);
  border: 1px solid rgba(184, 144, 42, 0.18);
  border-left: 3px solid #B8902A;
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  margin-bottom: 24px;
}

.art-why-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #B8902A;
  margin-bottom: 12px;
}

.art-why p {
  font-size: 20px;
  line-height: 1.7;
  color: #2A2A2A;
}

/* Tags */
.art-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 28px;
}

.art-tag {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  background: #F5F5F5;
  color: #888;
  border: 1px solid #E2E2E2;
}

/* Article body text */
.art-body {
  font-size: 22px;
  line-height: 1.85;
  color: #333333;
  border-top: 1px solid #E8E8E8;
  padding-top: 40px;
  margin-top: 12px;
}

.art-body > * + * { margin-top: 1.1em; }

.art-body img {
  width: 100%;
  max-width: 760px;
  height: auto;
  border-radius: 8px;
  margin: 1.8em auto 0.5em auto;
  display: block;
}

.art-caption {
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  font-style: italic;
  color: #888888;
  text-align: center;
  margin-bottom: 2.5em;
  padding: 0 10%;
  line-height: 1.5;
}

.art-body h2 {
  font-family: 'AmpSans', 'Playfair Display', Georgia, serif;
  font-size: 34px;
  font-weight: 700;
  color: #111111;
  margin-top: 2.2em;
  margin-bottom: 0.5em;
}

.art-body h3 {
  font-family: 'AmpSans', 'Playfair Display', Georgia, serif;
  font-size: 26px;
  font-weight: 600;
  color: #111111;
  margin-top: 2em;
}

.art-body a {
  color: #B8902A;
  text-decoration: underline;
  text-decoration-color: rgba(184,144,42,0.3);
}

.art-body ul, .art-body ol { padding-left: 24px; }
.art-body li + li { margin-top: 6px; }
.art-body strong { color: #111111; font-weight: 600; }

.art-body blockquote {
  border-left: 3px solid #B8902A;
  padding: 4px 0 4px 18px;
  color: #666;
  font-style: italic;
  margin: 1.5em 0;
}

/* Video & Iframe Support */
.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  border-radius: 8px;
  margin: 2em 0;
  background: #000;
}

.video-container iframe,
.video-container object,
.video-container embed {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Source link */
.art-source-link-wrap {
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid #E8E8E8;
}

.art-source-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  border: 1.5px solid rgba(184,144,42,0.4);
  border-radius: 100px;
  color: #B8902A;
  font-size: 13.5px;
  font-weight: 500;
  background: #FFFFFF;
  text-decoration: none;
  transition: background-color 0.22s, box-shadow 0.22s, transform 0.22s;
}

.art-source-link:hover {
  background: rgba(184,144,42,0.08);
  box-shadow: 0 0 24px rgba(184,144,42,0.18);
  transform: translateY(-2px);
}

/* Error state */
.art-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 100px 24px;
  text-align: center;
}

.art-error h2 {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  color: #111111;
}

.art-error p { font-size: 14px; color: #909090; }

.art-back-link {
  margin-top: 8px;
  font-size: 14px;
  color: #B8902A;
  text-decoration: underline;
}


/* ============================================================================
   RESPONSIVE
   ============================================================================ */
@media (max-width: 768px) {
  body.article-page {
    padding-top: calc(var(--header-height-mob) + 44px);
  }

  #article-content,
  .article-skeleton {
    padding: 24px 16px 60px;
  }

  .art-title { letter-spacing: -0.4px; }
  .art-deck  { font-size: 16px; }
  .art-body  { font-size: 15px; }
}


/* ============================================================================
   SHARE BAR
   ============================================================================ */
.art-share-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid #E8E8E8;
}

.art-share-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  color: #AAAAAA;
  text-transform: uppercase;
  white-space: nowrap;
}

.art-share-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

.share-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid #E2E2E2;
  background: #FFFFFF;
  color: #666666;
  cursor: pointer;
  text-decoration: none;
  flex-shrink: 0;
  overflow: hidden;
  transition: opacity 0.2s, transform 0.18s;
}

.share-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Brand colors */
.share-btn--x  { background: #000; border-color: #000; color: #fff; }
.share-btn--fb { background: #1877F2; border-color: #1877F2; color: #fff; }
.share-btn--ig {
  background: linear-gradient(45deg, #FCAF45 0%, #FD1D1D 50%, #833AB4 100%);
  border-color: transparent;
  color: #fff;
}

.share-btn--x:hover,
.share-btn--fb:hover,
.share-btn--ig:hover  { opacity: 0.82; transform: translateY(-2px); }
.share-btn--copy:hover { border-color: #B8902A; color: #B8902A; transform: translateY(-2px); }

.share-btn.copied {
  border-color: #4CAF50;
  color: #4CAF50;
}

/* Instagram desktop tooltip */
.ig-share-tip {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #1a1a1a;
  color: #fff;
  font-size: 12px;
  line-height: 1.5;
  padding: 10px 16px;
  border-radius: 8px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: ig-tip-in 0.18s ease-out both;
}

.ig-share-tip::after { display: none; }

.ig-share-tip strong { color: #fff; font-weight: 600; }
.ig-share-tip span   { color: rgba(255,255,255,0.75); }

@keyframes ig-tip-in {
  from { opacity: 0; transform: translateX(-50%) translateY(4px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@media (max-width: 768px) {
  .art-share-wrap { flex-wrap: wrap; gap: 10px; }
  .share-btn { width: 36px; height: 36px; }
  .share-btn svg { width: 14px; height: 14px; }
  .ig-share-tip { white-space: normal; max-width: calc(100vw - 48px); text-align: center; }
}
