/* ============================================================
   Industrial AI Group — News Detail Page
   ============================================================ */

.detail-main {
  padding-top: var(--nav-h);
  min-height: 100vh;
}

/* ── Breadcrumb ──────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .8rem;
  color: var(--text-dim);
  margin-bottom: 40px;
  padding-top: 48px;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); opacity: 1; }
.breadcrumb span { color: var(--text-dim); }
.breadcrumb span:last-child {
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}

/* ── Article layout ──────────────────────────────────────── */
.detail-container {
  max-width: 760px;
}

/* ── Hero image ──────────────────────────────────────────── */
#detailHeroWrap {
  margin-bottom: 0;
  padding-top: 40px;
}

.detail-hero-img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  display: block;
  margin-bottom: 36px;
}

/* ── Body images ─────────────────────────────────────────── */
.detail-body-img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: block;
  margin: 24px 0;
  object-fit: cover;
}

/* ── Header ──────────────────────────────────────────────── */
.detail-header {
  margin-bottom: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}

.detail-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.detail-date {
  font-size: .8rem;
  color: var(--text-dim);
  font-weight: 500;
}

.detail-header h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

/* ── Resource links (PDF, GitHub, etc.) ─────────────────── */
.detail-resource-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.resource-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity .15s, background .15s, border-color .15s, transform .15s;
  white-space: nowrap;
}
.resource-link:hover { opacity: 1; transform: translateY(-1px); }

.resource-link--pdf {
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
}
.resource-link--pdf:hover { opacity: .88; }

.resource-link--github {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.resource-link--github:hover {
  border-color: var(--border-hover);
  background: var(--bg2);
}

/* ── Body prose ──────────────────────────────────────────── */
.detail-body {
  color: var(--text-muted);
  font-size: 1.025rem;
  line-height: 1.85;
  margin-bottom: 56px;
}

.detail-body p {
  margin-bottom: 0;
  min-height: 1.85em;
}

.detail-body br {
  display: block;
  content: '';
  margin-top: 0.6em;
}

.detail-body h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin: 40px 0 16px;
}

.detail-body h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin: 32px 0 12px;
}

.detail-body strong {
  color: var(--text);
  font-weight: 600;
}

.detail-body ul {
  list-style: none;
  margin: 16px 0 24px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.detail-body ul li {
  padding-left: 20px;
  position: relative;
  color: var(--text-muted);
}

.detail-body ul li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ── Footer actions ──────────────────────────────────────── */
.detail-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 32px 0 80px;
  border-top: 1px solid var(--border);
}

.linkedin-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
  background: #0A66C2;
  color: #fff;
  border: 1px solid #0A66C2;
  transition: opacity .15s, transform .15s;
  white-space: nowrap;
}
.linkedin-share-btn:hover { opacity: .88; transform: translateY(-1px); }

/* ── Not found ───────────────────────────────────────────── */
.not-found {
  padding: 120px 24px;
  text-align: center;
}
.not-found h2 {
  font-size: 1.4rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* ── Related news ────────────────────────────────────────── */
.related-section {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 64px 0;
}

.related-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: .8rem;
  margin-bottom: 24px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 800px) { .related-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .related-grid { grid-template-columns: 1fr; } }

.related-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color .2s, transform .2s;
  color: var(--text);
}
.related-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  opacity: 1;
}
.related-date {
  font-size: .75rem;
  color: var(--text-dim);
}
.related-card h4 {
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
}
.related-card p {
  font-size: .8rem;
  color: var(--text-muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
