/* News article detail page — shared by dynamic news/article.html and the
   23 static files generated under news/articles/<id>.html. */

/* ── Article eyebrow (category + date) ── */
.article-eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.7rem; letter-spacing: 2px; text-transform: uppercase;
  margin-bottom: 22px;
}
.article-eyebrow .article-cat {
  color: var(--cat-color, var(--accent));
  padding: 5px 13px;
  border: 1px solid color-mix(in srgb, var(--cat-color, var(--accent)) 40%, transparent);
  border-radius: 100px;
  background: color-mix(in srgb, var(--cat-color, var(--accent)) 10%, transparent);
  font-weight: 500;
}
.article-eyebrow .article-date {
  color: var(--text-2);
  display: inline-flex; align-items: center; gap: 6px;
}
.article-eyebrow .article-date::before {
  content: ''; display: inline-block; width: 4px; height: 4px;
  border-radius: 50%; background: var(--text-2); opacity: 0.6;
}

/* Category palette — mirrors news/index.html. */
[data-cat="market"]         { --cat-color: #E01020; }
[data-cat="sustainability"] { --cat-color: #4DBC7A; }
[data-cat="capacity"]       { --cat-color: #4A7BFF; }
[data-cat="event"]          { --cat-color: #B073E8; }
[data-cat="sector"]         { --cat-color: #F0A030; }
[data-cat="jitpol"]         { --cat-color: #E01020; }

.article-h1 {
  font-family: var(--font-head);
  font-size: clamp(1.75rem, 3.4vw, 2.6rem);
  font-weight: 600; line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 24px;
  max-width: 880px;
}

/* ── Split hero: title/meta on left, hero image on right ── */
.article-hero-row {
  display: flex;
  gap: 48px;
  align-items: stretch;
}
.article-hero-text { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.article-hero-media {
  flex: 0 0 40%;
  max-width: 480px;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--cat-color, var(--accent)) 22%, var(--surface)),
    color-mix(in srgb, var(--cat-color, var(--accent)) 6%, var(--surface)) 70%,
    var(--surface));
  border: 1px solid color-mix(in srgb, var(--cat-color, var(--accent)) 25%, var(--border));
}
.article-hero-media img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.article-hero-media .placeholder-icon {
  position: absolute;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 96px; height: 96px;
  color: color-mix(in srgb, var(--cat-color, var(--accent)) 70%, transparent);
  opacity: 0.85;
}
.article-hero-media .placeholder-icon svg { width: 100%; height: 100%; }
.article-hero-media::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--cat-color, var(--accent)) 12%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--cat-color, var(--accent)) 12%, transparent) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.5;
  pointer-events: none;
}

@media (max-width: 900px) {
  .article-hero-row { flex-direction: column; gap: 24px; }
  .article-hero-media { flex: 1 1 100%; max-width: 100%; aspect-ratio: 16 / 9; }
}

/* ── Article body ── */
.article-content {
  max-width: 760px;
  margin-top: 36px;
  font-family: var(--font-body);
  font-size: 1.02rem;
  line-height: 1.85;
  color: var(--text);
}
.article-content p { margin: 0 0 22px; }
.article-content p.article-lede {
  font-size: 1.18rem;
  line-height: 1.7;
  color: var(--text);
  letter-spacing: -0.005em;
  margin: 0 0 30px;
  padding: 0 0 28px;
  border-bottom: 1px solid var(--border);
}
.article-content p:not(.article-lede) { color: var(--text-2); }

/* ── Source citation ── */
.article-source {
  max-width: 760px;
  margin: 36px 0 0;
  padding: 22px 24px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-2);
}
.article-source::before {
  content: '';
  display: inline-block;
  width: 18px; height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71'/><path d='M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71'/></svg>") center / contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71'/><path d='M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71'/></svg>") center / contain no-repeat;
  opacity: 0.55;
}
.article-source a { color: var(--accent); text-decoration: none; font-weight: 500; }
.article-source a:hover { text-decoration: underline; text-underline-offset: 3px; }

.article-disclaimer {
  max-width: 760px;
  margin: 28px 0 0;
  padding: 18px 22px;
  border-left: 3px solid var(--border);
  font-family: var(--font-body);
  font-size: 0.84rem;
  line-height: 1.65;
  color: var(--text-2);
  background: transparent;
  opacity: 0.85;
}

/* ── Article footer actions ── */
.article-actions {
  max-width: 760px;
  margin: 44px 0 0;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.article-actions .btn-outline,
.article-actions .btn-primary {
  font-size: 0.86rem;
  padding: 12px 22px;
}

/* ── Related articles ── */
.article-related {
  margin-top: 80px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
}
.article-related h2 {
  font-family: var(--font-mono);
  font-size: 0.72rem; font-weight: 500;
  letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--text-2);
  margin: 0 0 22px;
  display: inline-flex; align-items: center; gap: 10px;
}
.article-related h2::before {
  content: ''; display: inline-block; width: 6px; height: 6px;
  border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.18);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.related-card {
  position: relative;
  display: flex; flex-direction: column; gap: 12px;
  padding: 20px 22px 18px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
}
.related-card::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 3px;
  background: var(--cat-color, var(--accent));
  opacity: 0.65;
  transition: opacity 0.25s, width 0.25s;
}
.related-card:hover {
  border-color: rgba(var(--accent-rgb), 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.4);
}
[data-theme="light"] .related-card:hover { box-shadow: 0 8px 28px rgba(0,0,0,0.10); }
.related-card:hover::before { opacity: 1; width: 4px; }
.related-card .related-meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.6rem; letter-spacing: 1.5px; text-transform: uppercase;
}
.related-card .related-cat {
  color: var(--cat-color, var(--accent));
  padding: 4px 10px;
  border: 1px solid color-mix(in srgb, var(--cat-color, var(--accent)) 40%, transparent);
  border-radius: 100px;
  background: color-mix(in srgb, var(--cat-color, var(--accent)) 10%, transparent);
  font-weight: 500;
}
.related-card .related-date { color: var(--text-2); }
.related-card .related-title {
  font-family: var(--font-head);
  font-size: 0.96rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  margin: 0;
}

/* ── Optional photo gallery (rendered when image.gallery is set) ── */
.article-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: 36px 0 28px;
}
.article-gallery figure {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
}
.article-gallery img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}
@media (max-width: 640px) {
  .article-gallery { grid-template-columns: 1fr; }
}

/* ── Not-found fallback (only used by the dynamic article.html) ── */
.article-not-found {
  max-width: 600px;
  margin: 60px 0;
  padding: 40px 32px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  text-align: center;
}
.article-not-found h2 { font-family: var(--font-head); margin: 0 0 12px; font-size: 1.4rem; }
.article-not-found p { color: var(--text-2); margin: 0 0 20px; line-height: 1.7; }

@media (max-width: 768px) {
  .article-h1 { font-size: 1.6rem; }
  .article-content { font-size: 0.96rem; }
  .article-content p.article-lede { font-size: 1.05rem; }
}
