/* ===== Case Studies — matches site theme (style.css) ===== */
:root {
  --cs-primary: #3b6bff;
  --cs-primary-2: #22d3ee;
  --cs-dark: #060a14;
  --cs-surface: #f4f6fb;
  --cs-border: #e4e7f0;
}

/* ---- Listing hero ---- */
.cs-hero {
  background: linear-gradient(135deg, #060a14 0%, #0b1b3a 55%, #123a7a 100%);
  padding: 170px 0 72px;
  text-align: center;
}
.cs-hero .tag {
  display: inline-block;
  border: 1px solid rgba(255,255,255,.4);
  color: #fff;
  padding: 6px 16px;
  border-radius: 30px;
  font-size: .72rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.cs-hero h1 {
  color: #fff;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  margin: 0 0 14px;
  line-height: 1.15;
}
.cs-hero .grad {
  background: linear-gradient(90deg, var(--cs-primary), var(--cs-primary-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.cs-hero p {
  color: rgba(255,255,255,.82);
  max-width: 700px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.7;
}
.cs-wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---- Filter pills ---- */
.cs-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin: 44px 0 40px;
}
.cs-filter a {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--cs-border);
  font-size: .85rem;
  font-weight: 600;
  color: #0c1220;
  transition: .2s;
  background: #fff;
}
.cs-filter a:hover,
.cs-filter a.active {
  background: var(--cs-primary);
  border-color: var(--cs-primary);
  color: #fff;
}

/* ---- Cards grid ---- */
.cs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.cs-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--cs-border);
  border-radius: 18px;
  overflow: hidden;
  transition: .3s;
  color: inherit;
}
.cs-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 34px -18px rgba(59,107,255,.35);
  border-color: rgba(59,107,255,.35);
}
.cs-card-img {
  height: 210px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, #eef3ff, #e6f9ff);
}
.cs-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: .5s; }
.cs-card:hover .cs-card-img img { transform: scale(1.05); }
.cs-card-cat {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--cs-primary);
  color: #fff;
  padding: 4px 12px;
  border-radius: 30px;
  font-size: .68rem;
  font-weight: 700;
}
.cs-card-flag {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(6,10,20,.75);
  color: #fff;
  padding: 4px 12px;
  border-radius: 30px;
  font-size: .72rem;
  font-weight: 700;
  backdrop-filter: blur(4px);
}
.cs-card-body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.cs-card-body h3 { font-size: 1.08rem; font-weight: 700; line-height: 1.4; margin: 0 0 10px; }
.cs-card-body > p { font-size: .9rem; color: #5b6478; line-height: 1.7; margin: 0 0 14px; flex: 1; }
.cs-meta { display: flex; flex-wrap: wrap; gap: 10px 14px; font-size: .78rem; color: #8a93a6; margin-bottom: 10px; }
.cs-meta strong { color: #0c1220; }
.cs-results-mini {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 4px 0 14px;
}
.cs-results-mini span {
  background: rgba(59,107,255,.08);
  border: 1px solid rgba(59,107,255,.22);
  color: #1b3fb0;
  font-weight: 800;
  font-size: .8rem;
  padding: 5px 12px;
  border-radius: 999px;
}
.cs-readmore { color: var(--cs-primary); font-weight: 600; font-size: .88rem; }

/* ---- Homepage section ---- */
.cs-home-section .cs-grid { margin-top: 8px; }
.cs-home-cta { text-align: center; margin-top: 36px; }
.cs-trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  justify-content: center;
  margin-top: 26px;
  color: #5b6478;
  font-size: .88rem;
  font-weight: 600;
}
.cs-trust-strip span { display: inline-flex; align-items: center; gap: 8px; }

/* ---- Detail page ---- */
.cs-detail-hero {
  background: linear-gradient(135deg, #060a14 0%, #0b1b3a 55%, #123a7a 100%);
  padding: 165px 0 60px;
  color: #fff;
}
.cs-detail-hero .inner { max-width: 900px; margin: 0 auto; padding: 0 24px; }
.cs-detail-hero h1 {
  font-size: clamp(1.9rem, 4.4vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  margin: 16px 0 18px;
  color: #fff;
}
.cs-detail-hero .cat {
  display: inline-block;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.3);
  color: #fff;
  padding: 5px 14px;
  border-radius: 30px;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-right: 8px;
}
.cs-detail-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; color: rgba(255,255,255,.82); font-size: .88rem; margin-top: 6px; }
.cs-detail-thumb { max-width: 900px; margin: 0 auto; padding: 0 24px; }
.cs-detail-thumb img {
  display: block;
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  border-radius: 20px;
  margin: 34px 0 8px;
  background: #f4f6fb;
}
.cs-detail-body { max-width: 860px; margin: 0 auto; padding: 36px 24px 10px; }
.cs-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 26px 0 30px;
}
.cs-fact {
  background: var(--cs-surface);
  border: 1px solid var(--cs-border);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
}
.cs-fact small { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: 1px; color: #8a93a6; font-weight: 700; margin-bottom: 6px; }
.cs-fact strong { font-size: .98rem; color: #0c1220; }
.cs-detail-body h2 { font-size: 1.6rem; font-weight: 800; margin: 34px 0 12px; }
.cs-detail-body p { font-size: 1.03rem; line-height: 1.9; color: #1e293b; margin-bottom: 16px; }
.cs-metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 20px 0 30px;
}
.cs-metric {
  background: linear-gradient(135deg, var(--cs-primary), #6a5cff);
  border-radius: 16px;
  padding: 26px 18px;
  text-align: center;
  color: #fff;
}
.cs-metric strong { display: block; font-size: 2rem; font-weight: 800; }
.cs-metric span { font-size: .85rem; opacity: .92; }
.cs-quote {
  border-left: 4px solid var(--cs-primary);
  background: var(--cs-surface);
  padding: 20px 26px;
  border-radius: 0 12px 12px 0;
  margin: 28px 0;
  font-style: italic;
  color: #334155;
  font-size: 1.02rem;
  line-height: 1.8;
}
.cs-quote cite { display: block; margin-top: 10px; font-style: normal; font-weight: 700; color: #0c1220; font-size: .88rem; }
.cs-tech { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 10px; }
.cs-tech span {
  background: #eef3ff;
  border: 1px solid rgba(59,107,255,.25);
  color: #1b3fb0;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
}
.cs-back { margin: 26px 0 60px; text-align: center; }
.cs-empty { text-align: center; padding: 70px 20px; color: #8a93a6; }
.cs-related { background: var(--cs-surface); padding: 56px 0; }
.cs-related .wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.cs-related h2 { font-size: 1.6rem; font-weight: 800; margin: 0 0 28px; }
.cs-related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.cs-related-card {
  background: #fff;
  border: 1px solid var(--cs-border);
  border-radius: 16px;
  overflow: hidden;
  display: block;
  color: inherit;
  transition: .3s;
}
.cs-related-card:hover { transform: translateY(-4px); box-shadow: 0 16px 30px -18px rgba(59,107,255,.35); }
.cs-related-card img { width: 100%; height: 160px; object-fit: cover; display: block; }
.cs-related-card .rc-body { padding: 18px; }
.cs-related-card h4 { font-size: 1rem; font-weight: 700; line-height: 1.4; margin: 0 0 8px; }
.cs-related-card span { font-size: .78rem; color: #8a93a6; }

@media (max-width: 992px) {
  .cs-grid, .cs-related-grid { grid-template-columns: repeat(2, 1fr); }
  .cs-facts { grid-template-columns: repeat(2, 1fr); }
  .cs-metric-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .cs-grid, .cs-related-grid { grid-template-columns: 1fr; }
  .cs-hero { padding-top: 130px; }
  .cs-detail-hero { padding-top: 130px; }
  .cs-facts { grid-template-columns: 1fr 1fr; }
  .cs-metric-row { grid-template-columns: 1fr; }
}

/* ---- Rich story body (blog-style: headings, lists, quotes, photos, tables) ---- */
.cs-story { margin: 10px 0 8px; }
.cs-story h2 { font-size: 1.6rem; font-weight: 800; margin: 34px 0 12px; color: #0c1220; }
.cs-story h3 { font-size: 1.3rem; font-weight: 700; margin: 28px 0 10px; color: #0c1220; }
.cs-story h4 { font-size: 1.1rem; font-weight: 700; margin: 22px 0 8px; color: #0c1220; }
.cs-story p { font-size: 1.03rem; line-height: 1.9; color: #1e293b; margin-bottom: 16px; }
.cs-story ul, .cs-story ol { padding-left: 26px; margin-bottom: 18px; }
.cs-story li { font-size: 1.02rem; line-height: 1.8; color: #1e293b; margin-bottom: 8px; list-style: disc; }
.cs-story ol li { list-style: decimal; }
.cs-story a { color: var(--cs-primary); text-decoration: underline; }
.cs-story strong { color: #0c1220; }
.cs-story img {
  max-width: 100% !important;
  height: auto !important;
  display: block;
  margin: 26px auto;
  border-radius: 12px;
}
.cs-story blockquote {
  border-left: 4px solid var(--cs-primary);
  background: var(--cs-surface);
  padding: 16px 24px;
  border-radius: 0 12px 12px 0;
  margin: 26px 0;
  font-style: italic;
  color: #334155;
}
.cs-story .post-table-wrap { overflow-x: auto; margin: 0 0 22px; }
.cs-story table { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
.cs-story th, .cs-story td { border: 1px solid #e2e8f0; padding: 10px 14px; text-align: left; vertical-align: top; line-height: 1.6; color: #1e293b; }
.cs-story th { background: #f8fafc; font-weight: 700; }
