/* ═══════════════════════════════════════════════════════
   PSR METALS PVT. LTD. — insights.css
   Insights / Resources Listing + Single Article Pages
   ═══════════════════════════════════════════════════════ */

/* ── 0. REVEAL OVERRIDE ────────────────────────────────── */
.page-insights .reveal,
.single-insight .reveal {
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
}

/* ── 1. BREADCRUMB ─────────────────────────────────────── */
.psr-breadcrumb {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
}
.breadcrumb-list {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.breadcrumb-list li:not(:last-child)::after {
  content: '/';
  margin-left: 0.5rem;
  color: var(--metallic-accent);
}
.breadcrumb-list a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}
.breadcrumb-list a:hover { color: var(--accent-hover); }
.breadcrumb-list [aria-current="page"] {
  color: var(--text-primary);
  font-weight: 600;
}

/* ════════════════════════════════════════════════════════
   INSIGHTS LISTING PAGE
   ════════════════════════════════════════════════════════ */

#insights-header {
  padding: calc(var(--section-v) * 0.8) var(--section-h) calc(var(--section-v) * 0.5);
  background: var(--bg);
}
#insights-header .section-heading { margin-bottom: 0; }
#insights-header h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); }

/* ── INSIGHTS GRID ─────────────────────────────────────── */
#insights-grid {
  padding: calc(var(--section-v) * 0.6) var(--section-h) var(--section-v);
  background: var(--bg);
}

.insights-posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 768px) {
  .insights-posts-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .insights-posts-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Individual article card */
.insight-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.insight-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent-border);
}

.insight-card-thumb {
  height: 200px;
  overflow: hidden;
  background: var(--surface);
  position: relative;
}
.insight-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.5s ease;
}
.insight-card:hover .insight-card-thumb img { transform: scale(1.05); }

/* Category tag on card */
.insight-card-cat {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffffff;
  background: var(--accent);
  padding: 0.3rem 0.75rem;
  border-radius: 4px;
  z-index: 2;
}

.insight-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.insight-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.insight-card-meta time { font-weight: 600; }
.insight-card-meta .read-time {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.insight-card-meta .read-time::before {
  content: '·';
  color: var(--metallic-accent);
}

.insight-card-body h2 {
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 0.65rem;
  color: var(--text-primary);
}
.insight-card-body p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 1.25rem;
}
.insight-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.855rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  transition: gap 0.22s ease;
  align-self: flex-start;
}
.insight-card-link svg { width: 13px; height: 13px; transition: transform 0.22s ease; }
.insight-card:hover .insight-card-link { gap: 0.65rem; }
.insight-card:hover .insight-card-link svg { transform: translateX(3px); }

/* No posts fallback */
.insights-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-secondary);
}
.insights-empty h2 { font-size: 1.5rem; margin-bottom: 0.75rem; }

/* Pagination */
.insights-pagination {
  margin-top: 3rem;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.insights-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
  transition: all 0.2s ease;
}
.insights-pagination .page-numbers:hover,
.insights-pagination .page-numbers.current {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.insights-pagination .page-numbers.dots {
  border: none;
  background: none;
  cursor: default;
}

/* ════════════════════════════════════════════════════════
   SINGLE ARTICLE PAGE
   ════════════════════════════════════════════════════════ */

#article-hero {
  padding: calc(var(--section-v) * 0.7) var(--section-h) calc(var(--section-v) * 0.5);
  background: var(--bg);
  border-bottom: 1px solid var(--border-subtle);
}
.article-hero-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.article-hero-cat {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent);
  padding: 0.3rem 0.75rem;
  border-radius: 4px;
}
.article-hero-meta time { font-weight: 600; }
.article-hero-meta .read-time { display: flex; align-items: center; gap: 0.3rem; }
#article-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.8rem);
  max-width: 800px;
  line-height: 1.18;
  margin-bottom: 1rem;
}
.article-hero-intro {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 700px;
  line-height: 1.7;
}

/* Feature image */
#article-feature-image {
  padding: 0 var(--section-h) calc(var(--section-v) * 0.5);
  background: var(--bg);
}
.article-feature-img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius-card);
  display: block;
  box-shadow: var(--shadow-card);
}

/* Article body content */
#article-body {
  padding: calc(var(--section-v) * 0.6) var(--section-h) var(--section-v);
  background: var(--bg-elevated);
  border-top: 1px solid var(--border-subtle);
}
.article-body-inner {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 4rem;
  align-items: start;
  max-width: var(--container);
  margin: 0 auto;
}
@media (max-width: 1023px) {
  .article-body-inner { grid-template-columns: 1fr; }
}

/* Article prose content */
.article-prose {
  max-width: 720px;
}
.article-prose h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent-subtle);
}
.article-prose h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 1.75rem;
  margin-bottom: 0.65rem;
}
.article-prose p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}
.article-prose p strong { color: var(--text-primary); }
.article-prose ul, .article-prose ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}
.article-prose li {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}
.article-prose li::marker { color: var(--accent); }
.article-prose blockquote {
  border-left: 3px solid var(--accent);
  padding: 1rem 1.25rem;
  margin: 1.75rem 0;
  background: var(--accent-subtle);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.article-prose blockquote p {
  margin: 0;
  font-style: italic;
  color: var(--text-primary);
}

/* Key specs / data callout box */
.article-callout {
  background: var(--bg);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-card);
  padding: 1.5rem;
  margin: 2rem 0;
}
.article-callout-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}
.article-callout table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.article-callout tr { border-bottom: 1px solid var(--border-subtle); }
.article-callout tr:last-child { border-bottom: none; }
.article-callout th {
  text-align: left;
  padding: 0.5rem 0;
  font-weight: 700;
  color: var(--text-secondary);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  width: 40%;
}
.article-callout td {
  padding: 0.5rem 0;
  font-weight: 600;
  color: var(--text-primary);
}

/* Sidebar */
.article-sidebar {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.sidebar-widget {
  background: var(--bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 1.5rem;
}
.sidebar-widget-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border-subtle);
}
.sidebar-cta-widget {
  background: var(--accent);
  border-color: var(--accent);
}
.sidebar-cta-widget .sidebar-widget-title { color: rgba(255,255,255,0.7); border-color: rgba(255,255,255,0.2); }
.sidebar-cta-widget h3 { color: #fff; font-size: 1.1rem; margin-bottom: 0.65rem; }
.sidebar-cta-widget p { color: rgba(255,255,255,0.72); font-size: 0.85rem; line-height: 1.6; margin-bottom: 1.25rem; }
.sidebar-cta-widget .btn {
  width: 100%;
  justify-content: center;
  background: #fff;
  color: var(--accent);
  border-color: #fff;
  font-size: 0.85rem;
  padding: 0.7rem 1rem;
}
.sidebar-cta-widget .btn:hover {
  background: rgba(255,255,255,0.88);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* Related articles in sidebar */
.sidebar-related-list { display: flex; flex-direction: column; gap: 1rem; }
.sidebar-related-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s ease;
}
.sidebar-related-item:hover { opacity: 0.72; }
.sidebar-related-thumb {
  width: 52px;
  height: 52px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface);
}
.sidebar-related-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sidebar-related-info strong {
  display: block;
  font-size: 0.83rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}
.sidebar-related-info span { font-size: 0.72rem; color: var(--text-secondary); }

/* Tags */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}
.article-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-subtle);
  padding: 0.3rem 0.75rem;
  border-radius: 30px;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}
.article-tag:hover { background: var(--accent); color: #fff; }

/* CTA in article footer */
#cta {
  padding: var(--section-v) var(--section-h);
  background: linear-gradient(145deg, #161A26 0%, #0E1118 100%);
  position: relative;
  overflow: hidden;
}
#cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 65% 75% at 55% 50%, rgba(62,64,149,0.12) 0%, transparent 65%);
  pointer-events: none;
}
#cta::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.018) 0, rgba(255,255,255,0.018) 1px, transparent 1px, transparent 90px),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.018) 0, rgba(255,255,255,0.018) 1px, transparent 1px, transparent 90px);
  pointer-events: none;
}
