/* ==========================================================================
   Detail Page Design System — Blogs, Case Studies & Articles
   Inspired by axisxd reference design
   ========================================================================== */

/* ── Hero Section ── */
.detail-hero {
  position: relative;
  padding-top: 2rem;
  padding-bottom: 4rem;
  overflow: hidden;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.detail-hero .hero-bg-dots {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  pointer-events: none;
  background-image: radial-gradient(currentColor 1px, transparent 1px);
  background-size: 20px 20px;
}

.detail-hero .hero-glow {
  position: absolute;
  top: 0;
  left: 25%;
  width: 500px;
  height: 400px;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(120px);
}

.detail-hero .hero-glow.orange-glow {
  background: rgba(244,129,32,0.08);
}

.detail-hero .hero-top-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(244,129,32,0.3), transparent);
}

.hero-container-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 768px) {
  .hero-container-inner {
    padding: 0 2rem;
  }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(520px, 560px);
    gap: 3rem;
  }
}

@media (min-width: 1280px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(560px, 600px);
  }
}

.hero-text-col {
  margin-top: 4rem;
}

.hero-image-col {
  margin-top: 4rem;
}

.hero-meta-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.hero-badge {
  display: inline-flex;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-family: 'Courier New', monospace;
}

.hero-badge.orange {
  background: #f48120;
  color: #fff;
  border: 1px solid #f48120;
}

.hero-badge.rose {
  background: #e11d48;
  color: #fff;
  border: 1px solid #e11d48;
}

.hero-badge.blue {
  background: #2563eb;
  color: #fff;
  border: 1px solid #2563eb;
}

.hero-badge.purple {
  background: #7c3aed;
  color: #fff;
  border: 1px solid #7c3aed;
}

.hero-badge.teal {
  background: #0d9488;
  color: #fff;
  border: 1px solid #0d9488;
}

.hero-meta-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 10px;
  color: rgba(255,255,255,0.3);
}

body.lightmode .hero-meta-icon {
  color: rgba(0,0,0,0.3);
}

.hero-meta-icon i {
  font-size: 10px;
}

.hero-title {
  font-size: 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }
}

.hero-intro {
  max-width: 600px;
}

.hero-intro p {
  font-size: 0.8125rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .hero-intro p {
    font-size: 0.875rem;
  }
}

.hero-image-wrap {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  border: 1px solid rgba(255,255,255,0.05);
}

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

@media (min-width: 768px) {
  .hero-image-wrap img {
    height: 360px;
  }
}

.hero-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.3) 100%);
  pointer-events: none;
}

.back-btn {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 10px;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(17,17,20,0.8);
  backdrop-filter: blur(12px);
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  cursor: pointer;
}

.back-btn:hover {
  color: #f48120;
  border-color: rgba(244,129,32,0.3);
}

body.lightmode .back-btn {
  background: rgba(255,255,255,0.9);
  border-color: rgba(0,0,0,0.12);
  color: rgba(0,0,0,0.85);
}

body.lightmode .back-btn:hover {
  color: #f48120;
  border-color: rgba(244,129,32,0.3);
}

body.dark-mode .back-btn {
  color: rgba(255,255,255,0.92);
  border-color: rgba(255,255,255,0.18);
}

@media (min-width: 768px) {
  .back-btn {
    top: 1rem;
    left: 2rem;
  }
}

/* ── Content Column Layout ── */
.detail-content-wrapper {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
  padding-top: 3rem;
  padding-bottom: 3rem;
}

@media (min-width: 768px) {
  .detail-content-wrapper {
    padding: 0 2rem;
    padding-top: 4rem;
    padding-bottom: 3rem;
  }
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 1024px) {
  .detail-grid {
    grid-template-columns: 1fr 340px;
    gap: 3.5rem;
  }
}

.detail-article {
  min-width: 0;
}

.detail-article h2,
.detail-article h3 {
  scroll-margin-top: 6rem;
}

.detail-sidebar {
  display: none;
}

@media (min-width: 1024px) {
  .detail-sidebar {
    display: block;
  }
}

.sidebar-sticky {
  position: sticky;
  top: 6rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 1.5rem;
  padding: 1.5rem;
}

body.lightmode .sidebar-sticky {
  background: rgba(0,0,0,0.02);
  border-color: rgba(0,0,0,0.06);
}

/* ── Snapshot wrapper (scrolls naturally, not sticky) ── */
.snapshot-wrapper {
  margin-bottom: 1.5rem;
}

.snapshot-card {
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 1.5rem;
  padding: 1.5rem;
  background: rgba(255,255,255,0.02);
}

body.lightmode .snapshot-card {
  border-color: rgba(0,0,0,0.06);
  background: rgba(0,0,0,0.02);
}

/* ── Article Content Styling ── */
.detail-article {
  font-size: 0.875rem;
  line-height: 1.75;
}

.detail-article > * + * {
  margin-top: 1.5rem;
}

.detail-article h2 {
  font-size: 1.25rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .detail-article h2 {
    font-size: 1.5rem;
  }
}

.detail-article h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.detail-article p {
  margin-bottom: 1rem;
}

.detail-article ul,
.detail-article ol {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}

.detail-article li {
  margin-bottom: 0.5rem;
}

.detail-article li::marker {
  color: #f48120;
}

.detail-article a {
  color: #f48120;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.detail-article a:hover {
  color: #d96a0e;
}

.detail-article strong {
  font-weight: 700;
}

.detail-article img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin: 1.5rem 0;
}

/* ── TTS Controls ── */
.tts-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
  margin-bottom: 1.5rem;
}

body.lightmode .tts-bar {
  border-color: rgba(0,0,0,0.06);
  background: rgba(0,0,0,0.02);
}

.tts-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: #f48120;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.15s;
}

.tts-btn:hover {
  background: #d96a0e;
  transform: scale(1.05);
}

body.lightmode .tts-btn {
  background: #111;
  color: #fff;
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

body.lightmode .tts-btn:hover {
  background: #f48120;
}

.tts-progress {
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  overflow: hidden;
  cursor: pointer;
}

body.lightmode .tts-progress {
  background: rgba(0,0,0,0.08);
}

.tts-fill {
  height: 100%;
  background: #f48120;
  width: 0%;
  transition: width 0.3s ease;
  border-radius: 3px;
}

.tts-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.3);
  font-weight: 600;
  white-space: nowrap;
}

body.lightmode .tts-label {
  color: rgba(0,0,0,0.3);
}

/* ── Sidebar Widgets (inside the unified sidebar card) ── */
.sidebar-card h3 {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0.75rem;
}

.sidebar-card + .sidebar-card {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}

body.lightmode .sidebar-card + .sidebar-card {
  border-top-color: rgba(0,0,0,0.06);
}

.sidebar-card h3 {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0.75rem;
  color: rgba(255,255,255,0.75);
}

.sidebar-card.toc h3 {
  color: rgba(255,255,255,0.75);
}

body.lightmode .sidebar-card.toc h3 {
  color: rgba(0,0,0,0.78);
}

.toc-item {
  display: block;
  width: 100%;
  text-align: left;
  font-size: 11px;
  font-weight: 300;
  line-height: 1.3;
  padding: 0.5rem 0.75rem;
  border-radius: 0.75rem;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 2px;
  color: rgba(255,255,255,0.78);
}

.toc-item:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
}

body.lightmode .toc-item {
  color: rgba(0,0,0,0.78);
}

body.lightmode .toc-item:hover {
  background: rgba(0,0,0,0.06);
  color: #111;
}

.toc-item.active {
  background: #f48120;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(244,129,32,0.25);
}

body.lightmode .toc-item.active,
body.lightmode .toc-item.active:hover {
  background: #111;
  color: #fff !important;
  box-shadow: 0 8px 20px rgba(0,0,0,0.16);
}

.sidebar-share-icons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.share-icon-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.86);
  font-size: 14px;
  text-decoration: none;
  transition: all 0.2s;
}

.share-icon-link:hover {
  color: #f48120;
  border-color: rgba(244,129,32,0.3);
  background: rgba(244,129,32,0.05);
}

body.lightmode .share-icon-link {
  border-color: rgba(0,0,0,0.14);
  background: rgba(0,0,0,0.04);
  color: rgba(0,0,0,0.82);
}

body.lightmode .share-icon-link:hover {
  color: #f48120;
  border-color: rgba(244,129,32,0.3);
  background: rgba(244,129,32,0.05);
}

/* ── Project Snapshot (Case Studies) ── */
.snapshot-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .snapshot-grid {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

.snapshot-icon-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.snapshot-icon-row i {
  color: #f48120;
  font-size: 14px;
}

.snapshot-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.snapshot-value {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.snapshot-tech-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.snapshot-tech-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 1rem;
  padding: 0.4rem 0.65rem;
  font-size: 11px;
  background: rgba(255,255,255,0.03);
}

body.lightmode .snapshot-tech-item {
  background: rgba(0,0,0,0.03);
}

.snapshot-tech-item i {
  color: #f48120;
  font-size: 12px;
}

.snapshot-service-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 1rem;
  padding: 0.4rem 0.65rem;
  font-size: 0.875rem;
  background: rgba(255,255,255,0.03);
  margin-bottom: 0.35rem;
}

body.lightmode .snapshot-service-item {
  background: rgba(0,0,0,0.03);
}

.snapshot-service-item i {
  color: #f48120;
  font-size: 12px;
}

/* ── Testimonial sidebar ── */
.testimonial-blockquote {
  font-size: 0.875rem;
  line-height: 1.6;
  font-weight: 300;
  font-style: italic;
}

.testimonial-author {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.05);
  font-size: 0.875rem;
}

body.lightmode .testimonial-author {
  border-top-color: rgba(0,0,0,0.05);
}

.testimonial-author strong {
  font-weight: 600;
  display: block;
}

.testimonial-author span {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
}

body.lightmode .testimonial-author span {
  color: rgba(0,0,0,0.4);
}

/* ── Prev / Next Navigation ── */
.prev-next-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.5rem;
  margin-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.05);
}

body.lightmode .prev-next-nav {
  border-top-color: rgba(0,0,0,0.05);
}

.prev-next-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  background: none;
  border: none;
  text-align: left;
  padding: 0;
}

.prev-next-btn:hover {
  color: #f48120;
}

.prev-next-btn .nav-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 0.75rem;
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}

body.lightmode .prev-next-btn .nav-icon-box {
  border-color: rgba(0,0,0,0.08);
}

.prev-next-btn:hover .nav-icon-box {
  border-color: rgba(244,129,32,0.3);
  color: #f48120;
}

.prev-next-btn .nav-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 600;
}

.prev-next-btn .nav-title {
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prev-next-btn:only-child {
  margin-left: auto;
}

/* ── Conclusion / CTA Block ── */
.detail-cta {
  margin-top: 2.5rem;
  padding: 2rem;
  border-radius: 1.5rem;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
  text-align: center;
}

body.lightmode .detail-cta {
  border-color: rgba(0,0,0,0.12);
  background: #fff;
  box-shadow: 0 16px 40px rgba(0,0,0,0.08);
}

.detail-cta h4 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.detail-cta p {
  font-size: 0.8125rem;
  margin-bottom: 1.25rem;
}

.detail-cta .cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  border-radius: 999px;
  border: none;
  background: #f48120;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  transition: background 0.2s;
  cursor: pointer;
}

.detail-cta .cta-btn:hover {
  background: #d96a0e;
  color: #fff;
}

body.dark-mode .detail-cta .cta-btn:hover {
  color: #fff;
}

/* ── Detail Meta Bar ── */
.detail-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

body.lightmode .detail-meta-bar {
  border-bottom-color: rgba(0,0,0,0.05);
}

.detail-meta-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.detail-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
}

/* ── Word highlight (TTS) ── */
.word {
  transition: background-color 0.12s ease;
  padding: 0 1px;
  border-radius: 2px;
}

.word.highlight {
  background-color: #f48120;
  transition: background-color 0.15s ease;
}

body.lightmode .word.highlight {
  background-color: #ffe082;
}

/* ── Trending Section (bottom) ── */
.trending-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
}

/* Collapse gap between back-to-back trending sections */
.hero-container + .hero-container .trending-section {
    margin-top: 0;
    padding-top: 2rem;
}

.cs-related-section {
    margin-top: 3rem !important;
    padding-top: 2rem !important;
    border-top: 1px solid rgba(255,255,255,0.06);
}

body.lightmode .cs-related-section {
    border-top-color: rgba(0,0,0,0.06);
}

.trending-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

body.lightmode .trending-header {
  border-bottom-color: rgba(0,0,0,0.05);
}

.trending-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f48120;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.trending-header h2 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 600;
  margin: 0;
}

.trending-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .trending-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.trending-card {
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.2s;
  cursor: pointer;
  display: block;
}

.trending-card:hover {
  border-color: rgba(244,129,32,0.2);
  transform: translateY(-2px);
}

body.lightmode .trending-card {
  border-color: rgba(0,0,0,0.05);
}

.trending-card-thumb {
  aspect-ratio: 836 / 442;
  overflow: hidden;
  background: rgba(255,255,255,0.03);
}

.trending-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.trending-card:hover .trending-card-thumb img {
  transform: scale(1.05);
}

.trending-card-body {
  padding: 1rem;
}

.trending-card-body h4 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  line-height: 1.3;
  margin-bottom: 0.5rem;
  transition: color 0.2s;
}

.trending-card:hover .trending-card-body h4 {
  color: #f48120;
}

.trending-card-meta {
  display: flex;
  gap: 0.5rem;
  font-size: 9px;
  color: rgba(255,255,255,0.3);
}

body.lightmode .trending-card-meta {
  color: rgba(0,0,0,0.3);
}

/* ── Case Studies Section (part of combined Blogs + Case Studies grid) ── */
.cs-related-label {
    grid-column: 1 / -1;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

body.lightmode .cs-related-label {
    border-top-color: rgba(0,0,0,0.1);
}

.cs-related-label .trending-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #f48120;
    flex-shrink: 0;
}

.cs-section-label {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.cs-section-label .trending-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #f48120;
    flex-shrink: 0;
}

.cs-section-label h2 {
    font-size: 0.85rem;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 700;
    color: #f48120;
    margin: 0;
}

.cs-related-label h2 {
    font-size: 0.85rem;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 700;
    color: #f48120;
    margin: 0;
}

.cs-divider {
    grid-column: 1 / -1;
    height: 1px;
    background: rgba(255,255,255,0.06);
    margin: 0.5rem 0;
}

body.lightmode .cs-divider {
    background: rgba(0,0,0,0.08);
}

/* ── Swiper Navigation Arrows ── */
.swiper-nav-row {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}

.swiper-btn-prev,
.swiper-btn-next {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 16px;
  user-select: none;
}

.swiper-btn-prev:hover,
.swiper-btn-next:hover {
  border-color: rgba(244,129,32,0.3);
  color: #f48120;
  background: rgba(244,129,32,0.08);
}

body.lightmode .swiper-btn-prev,
body.lightmode .swiper-btn-next {
  border-color: rgba(0,0,0,0.12);
  background: rgba(0,0,0,0.03);
  color: rgba(0,0,0,0.6);
}

body.lightmode .swiper-btn-prev:hover,
body.lightmode .swiper-btn-next:hover {
  border-color: rgba(244,129,32,0.3);
  color: #f48120;
  background: rgba(244,129,32,0.05);
}

.swiper-btn-prev.swiper-button-disabled,
.swiper-btn-next.swiper-button-disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Cross-Reference Section ── */
.cross-section {
  margin-top: 1rem;
}

.cross-section + .cross-section {
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(255,255,255,0.04);
}

body.lightmode .cross-section + .cross-section {
  border-top-color: rgba(0,0,0,0.04);
}

/* ── Responsive Tweaks ──
@media (max-width: 767px) {
  .hero-title {
    font-size: 1.5rem;
  }
  .hero-text-col {
    margin-top: 1rem;
  }
  .hero-image-col {
    margin-top: 1rem;
  }
  .hero-grid {
    gap: 1.5rem;
  }
}

/* ── Light mode overrides ── */
body.lightmode .detail-hero {
  border-bottom-color: rgba(0,0,0,0.06);
}

body.lightmode .detail-hero .hero-glow.orange-glow {
  background: rgba(244,129,32,0.06);
}

body.lightmode .hero-image-wrap {
  border-color: rgba(0,0,0,0.06);
}

body.lightmode .snapshot-card {
  border-color: rgba(0,0,0,0.06);
}

body.lightmode .detail-cta {
  border-color: rgba(0,0,0,0.06);
}

/* ── Dark mode defaults ── */
body.dark-mode .detail-hero .hero-text-col,
body.dark-mode .detail-article,
body.dark-mode .hero-title,
body.dark-mode .detail-cta h4 {
  color: #fff;
}

body.dark-mode .hero-intro p,
body.dark-mode .detail-article p,
body.dark-mode .detail-article li {
  color: rgba(255,255,255,0.6);
}

body.dark-mode .sidebar-card h3 {
  color: rgba(255,255,255,0.85);
}

body.lightmode .sidebar-card h3 {
  color: rgba(0,0,0,0.78);
}

body.dark-mode .toc-item {
  color: rgba(255,255,255,0.86);
}

body.dark-mode .toc-item:hover {
  color: #fff;
}

body.dark-mode .toc-item.active {
  color: #fff !important;
}

body.dark-mode .snapshot-label {
  color: rgba(255,255,255,0.2);
}

body.dark-mode .snapshot-value {
  color: #fff;
}

body.dark-mode .detail-cta p {
  color: rgba(255,255,255,0.5);
}

body.dark-mode .prev-next-btn .nav-label {
  color: rgba(255,255,255,0.2);
}

body.dark-mode .prev-next-btn .nav-title {
  color: rgba(255,255,255,0.6);
}

/* ── Light mode text colors ── */
body.lightmode .hero-title {
  color: #111;
}

body.lightmode .hero-intro p {
  color: rgba(0,0,0,0.5);
}

body.lightmode .detail-article p,
body.lightmode .detail-article li {
  color: rgba(0,0,0,0.6);
}

body.lightmode .detail-article h2,
body.lightmode .detail-article h4 {
  color: #111;
}

body.lightmode .toc-item {
  color: rgba(0,0,0,0.82);
}

body.lightmode .toc-item:hover {
  color: #111;
}

body.lightmode .snapshot-label {
  color: rgba(0,0,0,0.3);
}

body.lightmode .snapshot-value {
  color: #111;
}

body.lightmode .detail-cta h4 {
  color: #111;
}

body.lightmode .detail-cta p {
  color: rgba(0,0,0,0.72);
}

body.lightmode .detail-cta .cta-btn {
  background: #111;
  color: #fff;
  box-shadow: 0 10px 24px rgba(0,0,0,0.16);
}

body.lightmode .detail-cta .cta-btn:hover {
  background: #f48120;
}

body.lightmode .detail-meta-item {
  color: rgba(0,0,0,0.4);
}

body.lightmode .detail-meta-item i {
  color: #f48120;
}

body.lightmode .prev-next-btn .nav-label {
  color: rgba(0,0,0,0.3);
}

body.lightmode .prev-next-btn .nav-title {
  color: rgba(0,0,0,0.6);
}

body.lightmode .detail-meta-bar {
  color: rgba(0,0,0,0.4);
}
