/* ==========================================================================
   AAGENTO — WORLD-CLASS ENTERPRISE DEDICATED CASE STUDY DETAIL SYSTEM
   Inspired by Autodesk Customer Stories, Bentley, Stripe & Palantir Impact
   ========================================================================== */

.csd-page-wrap {
  padding-top: 96px;
  padding-bottom: 90px;
  background: #f8fafc;
  min-height: 100vh;
  color: #0f172a;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── Breadcrumb Wrap ── */
.csd-breadcrumb-wrap {
  padding: 18px 0 24px;
}

.csd-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.86rem;
  color: #64748b;
  flex-wrap: wrap;
}

.csd-breadcrumb a {
  color: #64748b;
  text-decoration: none;
  transition: color 0.2s ease;
}

.csd-breadcrumb a:hover {
  color: #325ff4;
}

.csd-breadcrumb-sep {
  color: #cbd5e1;
}

.csd-breadcrumb-current {
  color: #0f172a;
  font-weight: 600;
}

/* ── Hero Section ── */
.csd-hero {
  margin-bottom: 36px;
}

.csd-hero-badge-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.csd-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(50, 95, 244, 0.08);
  border: 1px solid rgba(50, 95, 244, 0.22);
  color: #325ff4;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.csd-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #325ff4;
}

.csd-impact-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, rgba(96, 197, 120, 0.15) 0%, rgba(50, 95, 244, 0.1) 100%);
  border: 1px solid rgba(96, 197, 120, 0.35);
  color: #15803d;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
}

.csd-title {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(2rem, 3.8vw, 3.1rem);
  font-weight: 850;
  color: #0f172a;
  line-height: 1.18;
  letter-spacing: -0.025em;
  margin: 0 0 16px 0;
  max-width: 1040px;
}

.csd-lead {
  font-size: 1.15rem;
  line-height: 1.68;
  color: #475569;
  max-width: 960px;
  margin: 0 0 32px 0;
}

/* ── KPI Metric Strip ── */
.csd-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}

.csd-kpi-card {
  background: #ffffff;
  border: 1px solid rgba(50, 95, 244, 0.14);
  border-radius: 18px;
  padding: 22px 20px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.03);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.csd-kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(50, 95, 244, 0.08);
}

.csd-kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #325ff4, #4282b0, #60c578);
}

.csd-kpi-val {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.8rem, 2.4vw, 2.3rem);
  font-weight: 850;
  color: #0f172a;
  line-height: 1.1;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.csd-kpi-val.highlight {
  background: linear-gradient(110deg, #2f55d4 0%, #4282b0 50%, #16a34a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.csd-kpi-lbl {
  font-size: 0.84rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.csd-kpi-sub {
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.4;
}

/* ── 2-Column Main Layout ── */
.csd-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 48px;
  align-items: start;
}

/* ── Left Content Column ── */
.csd-main-content {
  background: #ffffff;
  border: 1px solid rgba(50, 95, 244, 0.12);
  border-radius: 24px;
  padding: 44px 48px;
  box-shadow: 0 6px 30px rgba(15, 23, 42, 0.03);
}

/* ── Media / Visual Showcase Stage ── */
.csd-media-stage {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: #020617;
  margin-bottom: 40px;
  box-shadow: 0 12px 36px rgba(2, 6, 23, 0.15);
  border: 1px solid rgba(50, 95, 244, 0.2);
}

.csd-media-stage video {
  width: 100%;
  height: 380px;
  object-fit: cover;
  display: block;
}

.csd-media-stage img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  display: block;
}

.csd-stage-overlay {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 6px 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #38bdf8;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.csd-stage-overlay .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}

.csd-stage-bottom-tag {
  position: absolute;
  bottom: 14px;
  right: 14px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 6px 14px;
  color: #e2e8f0;
  font-size: 0.74rem;
  font-weight: 700;
}

/* ── Content Sections ── */
.csd-section {
  margin-bottom: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.csd-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.csd-sec-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-direction: column;
  justify-content: start;
}

.csd-sec-num {
  font-size: 0.76rem;
  font-weight: 800;
  color: #325ff4;
  background: rgba(50, 95, 244, 0.09);
  padding: 4px 10px;
  border-radius: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.csd-sec-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.015em;
  margin: 0;
}

.csd-prose {
  font-size: 1.02rem;
  line-height: 1.75;
  color: #334155;
  margin: 0 0 18px 0;
}

.csd-prose:last-child {
  margin-bottom: 0;
}

.csd-prose strong {
  color: #0f172a;
  font-weight: 700;
}

/* ── Comparison Callout Box (Traditional vs Aagento) ── */
.csd-comp-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  background: #f8fafc;
  border: 1px solid rgba(50, 95, 244, 0.14);
  border-radius: 16px;
  padding: 20px 24px;
  margin: 24px 0;
}

.csd-comp-col {
  display: flex;
  flex-direction: column;
}

.csd-comp-tag {
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.csd-comp-col.trad .csd-comp-tag {
  color: #ef4444;
}

.csd-comp-col.aag .csd-comp-tag {
  color: #16a34a;
}

.csd-comp-text {
  font-size: 0.94rem;
  line-height: 1.55;
  color: #1e293b;
  margin: 0;
  font-weight: 600;
}

/* ── Interactive 4-Phase Timeline Cards ── */
.csd-phases-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 24px 0;
}

.csd-phase-card {
  background: #f8fafc;
  border: 1px solid rgba(50, 95, 244, 0.12);
  border-radius: 14px;
  padding: 18px 20px;
  transition: all 0.2s ease;
}

.csd-phase-card:hover {
  background: #ffffff;
  border-color: #325ff4;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(50, 95, 244, 0.08);
}

.csd-phase-badge {
  font-size: 0.72rem;
  font-weight: 800;
  color: #325ff4;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.csd-phase-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.98rem;
  font-weight: 750;
  color: #0f172a;
  margin-bottom: 8px;
}

.csd-phase-desc {
  font-size: 0.88rem;
  line-height: 1.58;
  color: #64748b;
  margin: 0;
}

/* ── Deliverables Badge Cloud ── */
.csd-deliverables-box {
  background: rgba(50, 95, 244, 0.04);
  border: 1px solid rgba(50, 95, 244, 0.16);
  border-radius: 16px;
  padding: 22px 24px;
  margin: 24px 0;
}

.csd-deliv-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.86rem;
  font-weight: 800;
  color: #1e3a8a;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.csd-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.csd-pill {
  background: #ffffff;
  border: 1px solid rgba(50, 95, 244, 0.2);
  color: #1e40af;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(50, 95, 244, 0.04);
}

/* ── Pull Quote ── */
.csd-quote {
  background: linear-gradient(135deg, rgba(50, 95, 244, 0.05) 0%, rgba(96, 197, 120, 0.05) 100%);
  border-left: 4px solid #325ff4;
  border-radius: 0 16px 16px 0;
  padding: 24px 28px;
  margin: 32px 0;
}

.csd-quote-text {
  font-size: 1.1rem;
  line-height: 1.65;
  color: #1e293b;
  font-style: italic;
  font-weight: 500;
  margin: 0 0 12px 0;
}

.csd-quote-author {
  font-size: 0.88rem;
  font-weight: 750;
  color: #325ff4;
}

/* ── Sticky Sidebar ── */
.csd-sidebar {
  position: sticky;
  top: 110px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.csd-fact-card {
  background: #ffffff;
  border: 1px solid rgba(50, 95, 244, 0.14);
  border-radius: 20px;
  padding: 26px 24px;
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.03);
}

.csd-card-heading {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.96rem;
  font-weight: 800;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 18px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.csd-facts-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.csd-fact-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.csd-fact-lbl {
  font-size: 0.74rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.csd-fact-val {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
}

/* ── Sidebar Action CTA Card ── */
.csd-cta-card {
  background: linear-gradient(145deg, #090e1a 0%, #172554 100%);
  border: 1px solid rgba(50, 95, 244, 0.3);
  border-radius: 20px;
  padding: 26px 24px;
  color: #ffffff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.16);
}

.csd-cta-card h4 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 8px 0;
  line-height: 1.3;
}

.csd-cta-card p {
  font-size: 0.86rem;
  line-height: 1.55;
  color: #94a3b8;
  margin: 0 0 20px 0;
}

.csd-btn-full {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 12px;
  background: linear-gradient(90deg, #325ff4 0%, #22c55e 100%);
  color: #ffffff;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.88rem;
  font-weight: 750;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(50, 95, 244, 0.3);
}

.csd-btn-full:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(50, 95, 244, 0.45);
}

/* ── Share & Nav Links ── */
.csd-share-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 16px;
}

.csd-share-lbl {
  font-size: 0.78rem;
  font-weight: 700;
  color: #94a3b8;
}

.csd-share-icons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.csd-share-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.csd-share-btn:hover {
  background: #325ff4;
  color: #ffffff;
  border-color: #325ff4;
}

/* ── Bottom Section: Explore Other Case Studies ── */
.csd-related-section {
  margin-top: 60px;
  padding-top: 48px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.csd-related-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
}

.csd-related-head h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.csd-all-link {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: #325ff4;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s ease;
}

.csd-all-link:hover {
  gap: 10px;
}

.csd-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.csd-mini-card {
  background: #ffffff;
  border: 1px solid rgba(50, 95, 244, 0.12);
  border-radius: 18px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.csd-mini-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(50, 95, 244, 0.09);
  border-color: rgba(50, 95, 244, 0.3);
}

.csd-mini-tag {
  font-size: 0.74rem;
  font-weight: 800;
  color: #325ff4;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.csd-mini-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.05rem;
  font-weight: 750;
  color: #0f172a;
  line-height: 1.35;
  margin: 0 0 12px 0;
}

.csd-mini-metric {
  font-size: 0.84rem;
  font-weight: 700;
  color: #16a34a;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.csd-mini-arrow {
  margin-top: 14px;
  font-size: 0.86rem;
  font-weight: 750;
  color: #325ff4;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s ease;
}

.csd-mini-card:hover .csd-mini-arrow {
  gap: 10px;
}

/* ── Responsive Adaptations ── */
@media (max-width: 1024px) {
  .csd-layout {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .csd-sidebar {
    position: static;
  }

  .csd-related-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .csd-page-wrap {
    padding-top: 80px;
    padding-bottom: 60px;
  }

  .csd-main-content {
    padding: 26px 20px;
  }

  .csd-kpi-grid {
    grid-template-columns: 1fr 1fr;
  }

  .csd-comp-box {
    grid-template-columns: 1fr;
  }

  .csd-phases-grid {
    grid-template-columns: 1fr;
  }

  .csd-related-grid {
    grid-template-columns: 1fr;
  }

  .csd-media-stage video,
  .csd-media-stage img {
    height: 240px;
  }
}