/* ========================================
   Case Study Detail Page
   All classes prefixed cs- to avoid collisions
   ======================================== */

/* Hero */
.cs-hero {
  background: linear-gradient(180deg, #f8f1ff 0%, #FFFBF8 77.6%, rgba(255,255,255,0) 100%);
  padding: 7rem 0 2rem;
}
@media (min-width: 768px) {
  .cs-hero { padding: 9rem 0 3rem; }
}

.cs-hero__inner {
  display: flex;
  flex-direction: column-reverse;
  gap: 1.5rem;
  align-items: center;
}
@media (min-width: 768px) {
  .cs-hero__inner {
    flex-direction: row;
    justify-content: space-between;
    gap: 3rem;
  }
}

.cs-hero__content { flex: 1; }

.cs-hero__logo {
  max-height: 48px;
  width: auto;
  margin-bottom: 1rem;
}

.cs-hero__title {
  font-size: 1.5rem;
  line-height: 1.3;
  font-weight: var(--fnt-bold, 700);
  color: var(--neutral-900, #111928);
  margin: 0 !important;
}
@media (min-width: 768px) {
  .cs-hero__title { font-size: 2.25rem; line-height: 1.25; }
}

.cs-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.cs-hero__illustration {
  flex: 0 0 auto;
  text-align: center;
}
.cs-hero__illustration img {
  max-width: 100%;
  height: 160px;
}
@media (min-width: 768px) {
  .cs-hero__illustration img { height: auto; max-height: 300px; }
}

/* Breadcrumb */
.cs-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
}
.cs-breadcrumb a {
  color: var(--neutral-500, #6B7280);
  text-decoration: none;
  transition: color 0.2s;
}
.cs-breadcrumb a:hover {
  color: #673695;
  text-decoration: none;
}
.cs-breadcrumb__sep {
  color: var(--neutral-400, #9CA3AF);
  font-size: 0.75rem;
}
.cs-breadcrumb__current {
  color: var(--neutral-700, #374151);
  font-weight: var(--fnt-medium, 500);
}

/* Sidebar */
.cs-sidebar { position: relative; }
@media (min-width: 768px) {
  .cs-sidebar { position: sticky; top: 100px; }
}

.cs-back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9375rem;
  font-weight: var(--fnt-semi, 600);
  color: #673695;
  text-decoration: none;
  margin-bottom: 1.25rem;
  transition: color 0.2s, gap 0.2s;
}
.cs-back-link:hover {
  color: #54256c;
  gap: 14px;
  text-decoration: none;
}

.cs-info-card {
  background: #fff;
  border: 1px solid var(--neutral-100, #F3F4F6);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  padding: 1.25rem;
  border-radius: 16px;
}
@media (min-width: 768px) {
  .cs-info-card { padding: 1.5rem; }
}

.cs-info-card__section {
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--neutral-100, #F3F4F6);
}
.cs-info-card__section:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.cs-info-card__label {
  font-size: 0.75rem;
  font-weight: var(--fnt-semi, 600);
  color: var(--neutral-500, #6B7280);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 0.5rem !important;
}

/* Badges */
.cs-badge {
  display: inline-block;
  border-radius: 16px;
  padding: 0.2rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: var(--fnt-medium, 500);
  line-height: 1.5;
}
.cs-badge--purple {
  border: 1px solid var(--purple-200, #DCD7FE);
  background: var(--purple-050, #F6F5FF);
  color: var(--purple-900, #4A1D96);
}
.cs-badge--orange {
  border: 1px solid var(--secondary-200, #FCD9BD);
  background: var(--secondary-100, #FEECDC);
  color: var(--secondary-700, #B43403);
}

.cs-location { display: flex; align-items: center; gap: 10px; }
.cs-location__flag { width: 24px; height: auto; }
.cs-location__name { font-size: 1rem; color: var(--neutral-700, #374151); }

.cs-topics { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* Quick Facts */
.cs-quick-facts {
  background: var(--purple-050, #F6F5FF);
  padding: 1.5rem;
  border-radius: 16px;
  margin-bottom: 2.5rem;
  color: var(--neutral-600, #4B5563);
}
@media (min-width: 768px) {
  .cs-quick-facts { padding: 2rem; border-radius: 20px; }
}

.cs-quick-facts__heading {
  font-size: 0.8125rem;
  font-weight: var(--fnt-bold, 700);
  color: var(--neutral-900, #111928);
  text-transform: uppercase;
  margin: 0 0 0.75rem !important;
  letter-spacing: 0.05em;
}
.cs-quick-facts__heading:not(:first-child) { margin-top: 1.5rem !important; }

.cs-quick-facts p {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1rem !important;
}
@media (min-width: 768px) {
  .cs-quick-facts p { font-size: 1.0625rem; }
}

.cs-quick-facts ul {
  display: grid;
  gap: 12px;
  margin: 0.5rem 0 1rem !important;
  padding-left: 0;
  list-style: none;
}
.cs-quick-facts ul li {
  font-size: 0.9375rem;
  line-height: 1.5;
  position: relative;
  padding-left: 30px;
}
@media (min-width: 768px) {
  .cs-quick-facts ul li { font-size: 1.0625rem; }
}
.cs-quick-facts ul li::before {
  content: "\ea41";
  font-family: 'boxicons';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--purple-600, #7E3AF2);
  font-size: 1.25rem;
}

/* Stats */
.cs-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}
@media (min-width: 768px) {
  .cs-stats { grid-template-columns: repeat(4, 1fr); }
}

.cs-stat-card {
  background: #fff;
  border: 1px solid var(--neutral-100, #F3F4F6);
  border-radius: 12px;
  padding: 1.25rem 1rem;
  text-align: center;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.cs-stat-card:hover {
  border-color: var(--purple-200, #DCD7FE);
  box-shadow: 0 4px 16px rgba(103,54,149,0.1);
}

.cs-stat-card__value {
  font-size: 1.75rem;
  font-weight: var(--fnt-bold, 700);
  color: var(--purple-900, #4A1D96);
  line-height: 1.2;
  margin: 0 0 0.25rem !important;
}
@media (min-width: 768px) {
  .cs-stat-card__value { font-size: 2.25rem; }
}

.cs-stat-card__label {
  font-size: 0.8125rem;
  color: var(--neutral-600, #4B5563);
  margin: 0 !important;
}

/* Article body (from markdown) */
.cs-article {
  color: var(--neutral-600, #4B5563);
}

.cs-article h2 {
  font-size: 1.25rem;
  line-height: 1.35;
  color: var(--neutral-900, #111928);
  margin: 2.5rem 0 0.75rem !important;
  font-weight: var(--fnt-bold, 700);
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--purple-050, #F6F5FF);
}
@media (min-width: 768px) {
  .cs-article h2 { font-size: 1.75rem; }
}
.cs-article h2:first-child { margin-top: 0 !important; }

.cs-article h3 {
  font-size: 1.0625rem;
  line-height: 1.4;
  color: var(--neutral-900, #111928);
  margin: 2rem 0 0.75rem !important;
  font-weight: var(--fnt-semi, 600);
}
@media (min-width: 768px) {
  .cs-article h3 { font-size: 1.375rem; }
}

.cs-article h4,
.cs-article h5 {
  font-size: 1rem;
  line-height: 1.4;
  color: var(--neutral-900, #111928);
  margin: 1.5rem 0 0.5rem !important;
  font-weight: var(--fnt-semi, 600);
}
@media (min-width: 768px) {
  .cs-article h4,
  .cs-article h5 { font-size: 1.125rem; }
}

.cs-article p {
  font-size: 0.9375rem;
  line-height: 1.7;
  margin-bottom: 1.25rem !important;
}
@media (min-width: 768px) {
  .cs-article p { font-size: 1.0625rem; line-height: 1.65; }
}

.cs-article ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 25px;
  margin-bottom: 1.25rem !important;
}
.cs-article ul li {
  list-style-type: disc;
  font-size: 0.9375rem;
  line-height: 1.6;
}
@media (min-width: 768px) {
  .cs-article ul li { font-size: 1.0625rem; }
}

.cs-article ol {
  padding-left: 25px;
  margin-bottom: 1.25rem !important;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cs-article ol li {
  list-style-type: decimal;
  font-size: 0.9375rem;
  line-height: 1.6;
}
@media (min-width: 768px) {
  .cs-article ol li { font-size: 1.0625rem; }
}

.cs-article strong {
  color: var(--neutral-800, #1F2A37);
}

.cs-article img {
  max-width: 100%;
  height: auto;
  margin-block: 1.5rem;
  border-radius: 12px;
}

.cs-article blockquote {
  border-left: 4px solid var(--purple-200, #DCD7FE);
  background: var(--purple-050, #F6F5FF);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0 !important;
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: var(--neutral-700, #374151);
}
.cs-article blockquote p { margin-bottom: 0 !important; }

/* ============================================================
   CTA card — sits at the bottom of every case study detail page.
   Design language: light gradient surface with soft blobs (matches
   FAQ / datasheets pages), orange + purple accents.
   ============================================================ */
.cs-cta {
  position: relative;
  margin-top: 4rem;
  padding: 2.5rem 1.75rem;
  background: linear-gradient(135deg, #FFF8F1 0%, #FFFBF8 50%, #F6F5FF 100%);
  border: 1px solid #f3eaff;
  border-radius: 24px;
  overflow: hidden;
  isolation: isolate;
}
@media (min-width: 992px) {
  .cs-cta {
    margin-top: 5rem;
    padding: 3.5rem 3.5rem;
  }
}

/* Decorative gradient blobs */
.cs-cta__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.cs-cta__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
}
.cs-cta__blob--orange {
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(242, 103, 57, 0.28) 0%, transparent 70%);
  top: -100px;
  right: -80px;
}
.cs-cta__blob--purple {
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(103, 54, 149, 0.22) 0%, transparent 70%);
  bottom: -100px;
  left: -60px;
}

.cs-cta__inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 992px) {
  .cs-cta__inner {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 3rem;
  }
}

.cs-cta__eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #f26739;
  background: rgba(242, 103, 57, 0.08);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}

.cs-cta__heading {
  font-family: var(--DMSans), 'DM Sans', sans-serif;
  font-size: 1.625rem;
  font-weight: 700;
  line-height: 1.2;
  color: #111928;
  margin: 0 0 1rem !important;
  letter-spacing: -0.015em;
}
@media (min-width: 768px) { .cs-cta__heading { font-size: 2rem; } }
@media (min-width: 1280px) { .cs-cta__heading { font-size: 2.25rem; } }

.cs-cta__text {
  font-size: 1.0625rem;
  color: #4b5563;
  margin: 0 !important;
  line-height: 1.6;
  max-width: 560px;
}

/* Trust bar — under the copy, on the left side */
.cs-cta__trust {
  margin-top: 2rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem 1.75rem;
}
.cs-cta__trust-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cs-cta__trust-num {
  font-family: var(--DMSans), 'DM Sans', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #111928;
  line-height: 1;
  letter-spacing: -0.01em;
}
@media (min-width: 768px) {
  .cs-cta__trust-num { font-size: 1.75rem; }
}
.cs-cta__trust-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #6b7280;
  letter-spacing: 0.01em;
}
.cs-cta__trust-divider {
  width: 1px;
  height: 32px;
  background: #e5e7eb;
}
@media (max-width: 480px) {
  .cs-cta__trust-divider { display: none; }
}

/* Right column — buttons */
.cs-cta__actions {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.cs-cta__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1.75rem;
  font-family: var(--DMSans), 'DM Sans', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.18s, background 0.18s, box-shadow 0.18s, border-color 0.18s, color 0.18s;
  border: 1px solid transparent;
  white-space: nowrap;
}
.cs-cta__btn i { font-size: 1.125rem; }

.cs-cta__btn--primary {
  background: #f26739;
  color: #fff;
  box-shadow: 0 8px 20px rgba(242, 103, 57, 0.28);
}
.cs-cta__btn--primary:hover {
  background: #d9572d;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(242, 103, 57, 0.4);
  text-decoration: none;
}

.cs-cta__btn--ghost {
  background: #fff;
  border-color: #e5e7eb;
  color: #374151;
}
.cs-cta__btn--ghost:hover {
  background: #fff;
  border-color: #f26739;
  color: #f26739;
  transform: translateY(-2px);
  text-decoration: none;
}

@media (max-width: 991px) {
  .cs-cta__actions { align-items: stretch; }
}

/* Download */
.cs-download {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: var(--fnt-semi, 600);
  color: #673695;
  border: 1.5px solid #673695;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s;
}
.cs-download:hover {
  background: #673695;
  color: #fff;
  text-decoration: none;
}
.cs-download i { font-size: 1.125rem; }

/* Body section spacing */
.cs-body { padding-block: 2.5rem; }
@media (min-width: 768px) {
  .cs-body { padding-block: 4rem; }
}

/* Print */
@media print {
  .cs-hero { padding: 1rem 0; }
  .cs-sidebar, .cs-cta, .cs-download { display: none; }
  .cs-article img { max-height: 300px; }
}

/* Detail page additions for new JSON-based shape */
.cs-hero__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 14px;
  margin-bottom: 1rem;
}
.cs-hero__icon i { font-size: 2rem; }

.cs-pull-quote {
  margin: 2rem 0;
  padding: 1.5rem 2rem;
  background: #FFF8F1;
  border-left: 4px solid #f26739;
  border-radius: 8px;
  font-style: italic;
  color: #374151;
}
.cs-pull-quote p { margin: 0; line-height: 1.6; }

.cs-results-table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}
.cs-results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
.cs-results-table th,
.cs-results-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: top;
}
.cs-results-table thead th {
  background: #f9fafb;
  font-weight: 600;
  color: #111928;
  border-bottom: 2px solid #e5e7eb;
}
.cs-results-table tbody tr:last-child td { border-bottom: 0; }
.cs-results-table tbody tr:hover { background: #FFFBF8; }

.cs-about-emudhra {
  margin-top: 3rem;
  padding: 1.5rem;
  background: #f9fafb;
  border-radius: 12px;
}
.cs-about-emudhra h3 {
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
  color: #111928;
}
.cs-about-emudhra p {
  margin: 0;
  font-size: 0.9375rem;
  color: #4b5563;
}

.cs-article h2 {
  font-family: var(--DMSans), 'DM Sans', sans-serif;
  font-size: 1.625rem;
  font-weight: 600;
  color: #111928;
  margin-top: 2rem;
  margin-bottom: 1rem;
}
.cs-article h2:first-of-type { margin-top: 0; }
