@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700;800&family=Poppins:wght@400;500;600;700;800&display=swap');

/* ===== WORDPRESS AUTO-PARAGRAPH FIX ===== */
/* WordPress inserts <p> tags everywhere. Neutralize them inside case study layouts. */
/* Direct child p tags of layout containers: collapse to zero */
.cs-wrap > p,
.cs-hero > p,
.cs-hero-top > p,
.cs-hero-text > p:empty,
.cs-client-snapshot > p,
.cs-metrics-bar > p,
.cs-metrics-inner > p,
.cs-metric-item > p,
.cs-challenge-grid > p,
.cs-strategy-timeline > p,
.cs-results-grid > p,
.cs-result-card > p,
.cs-result-card > div > p,
.cs-more-section > p,
.cs-more-grid > p,
.cs-more-card > p,
.cs-testimonial-section > p,
.cs-testimonial-inner > p,
.cs-cta-section > p:last-child,
.cs-rankings-grid > p,
.cs-ranking-item > p,
.cs-section > div > p:empty,
.cs-section-alt > div > p:empty,
.cs-index-header > p:empty {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 0 !important;
  font-size: 0 !important;
  height: 0 !important;
}

/* Remove theme's 40px padding above content on case study pages */
.single-case-study .row {
  padding-top: 0 !important;
}
/* Remove theme's 150px padding below content */
.single-case-study .motopress-wrapper.content-holder {
  padding-bottom: 0 !important;
}

/* WordPress wraps HTML comments in <p> tags, creating spacing between sections */
/* Force ALL direct-child p tags of cs-wrap to collapse */
.cs-wrap > p {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  line-height: 0 !important;
  font-size: 0 !important;
  border: 0 !important;
}

/* ===== CASE STUDY VARIABLES ===== */
.cs-wrap {
  --teal: #4389A2;
  --teal-dark: #2D6B82;
  --teal-light: #5EADC7;
  --teal-bg: rgba(67,137,162,0.06);
  --purple: #B86A9E;
  --purple-light: #D48DC0;
  --purple-bg: rgba(184,106,158,0.06);
  --navy: #31384D;
  --navy-dark: #1E2336;
  --gray-bg: #F2F5F8;
  --gray-100: #E8ECF1;
  --gray-200: #D1D8E0;
  --gray-400: #9BA5B0;
  --gray-600: #6B7685;
  --white: #FFFFFF;
  --success: #22C55E;
  --success-bg: rgba(34,197,94,0.08);
  font-family: 'Open Sans', sans-serif;
  color: var(--navy);
  -webkit-font-smoothing: antialiased;
}

/* ===== CONTAINERS ===== */
.cs-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}
.cs-container-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== HERO ===== */
.cs-hero {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 40%, var(--teal-dark) 100%);
  padding: 40px 0 48px;
  position: relative;
  overflow: hidden;
}
.cs-hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -15%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(67,137,162,0.12) 0%, transparent 70%);
}

.cs-hero-breadcrumb {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  margin-bottom: 24px;
}
.cs-hero-breadcrumb a {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
}
.cs-hero-breadcrumb a:hover { color: var(--teal-light); }

.cs-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 48px;
  position: relative;
  z-index: 1;
}
.cs-hero-text { flex: 1; }

.cs-hero-industry {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--teal-light);
  background: rgba(67,137,162,0.15);
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 16px;
}
.cs-hero h1 {
  font-family: 'Poppins', sans-serif;
  font-size: 40px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 12px;
}
.cs-hero-subtitle {
  font-size: 17px;
  color: rgba(255,255,255,0.6);
  line-height: 1.7;
  max-width: 520px;
}

/* ===== CLIENT SNAPSHOT CARD ===== */
.cs-client-snapshot {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 28px;
  min-width: 280px;
  backdrop-filter: blur(8px);
}
.cs-snapshot-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 16px;
}
.cs-snapshot-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.cs-snapshot-row:last-child { border-bottom: none; }
.cs-snapshot-key {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.cs-snapshot-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  text-align: right;
}

/* ===== METRICS BAR ===== */
.cs-metrics-bar {
  background: var(--white);
  position: relative;
  z-index: 2;
}
.cs-metrics-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.04);
  overflow: hidden;
}
.cs-metric-item {
  padding: 32px 28px;
  text-align: center;
  border-right: 1px solid var(--gray-100);
}
.cs-metric-item:last-child { border-right: none; }
.cs-metric-value {
  font-family: 'Poppins', sans-serif;
  font-size: 36px;
  font-weight: 800;
  color: var(--teal-dark);
  line-height: 1;
}
.cs-metric-value .cs-up {
  color: var(--success);
  font-size: 20px;
  vertical-align: super;
  margin-left: 2px;
}
.cs-metric-label {
  font-size: 12px;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 6px;
  font-weight: 600;
}

/* ===== CONTENT SECTIONS ===== */
.cs-section {
  padding: 72px 0;
}
.cs-section-alt {
  background: var(--gray-bg);
}

.cs-section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 16px;
}
.cs-section-label .cs-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--purple);
}

.cs-section h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 20px;
  line-height: 1.25;
}
.cs-section p {
  font-size: 16px;
  color: var(--gray-600);
  line-height: 1.8;
  margin-bottom: 16px;
}

/* ===== CHALLENGE CARDS ===== */
.cs-challenge-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 32px;
}
.cs-challenge-card {
  background: var(--white);
  border-radius: 12px;
  padding: 28px;
  border-left: 3px solid var(--purple);
}
.cs-section-alt .cs-challenge-card {
  background: var(--white);
}
.cs-challenge-card h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}
.cs-challenge-card p {
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.6;
  margin-bottom: 0;
}

/* ===== STRATEGY TIMELINE ===== */
.cs-strategy-timeline {
  margin-top: 36px;
  position: relative;
  padding-left: 40px;
}
.cs-strategy-timeline::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--teal), var(--purple));
  border-radius: 2px;
}
.cs-timeline-step {
  position: relative;
  margin-bottom: 36px;
}
.cs-timeline-step:last-child { margin-bottom: 0; }
.cs-timeline-dot {
  position: absolute;
  left: -33px;
  top: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--white);
  border: 3px solid var(--teal);
  z-index: 1;
}
.cs-timeline-step:nth-child(2) .cs-timeline-dot { border-color: #6B94B0; }
.cs-timeline-step:nth-child(3) .cs-timeline-dot { border-color: #9A7FA5; }
.cs-timeline-step:nth-child(4) .cs-timeline-dot { border-color: var(--purple); }
.cs-timeline-phase {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 6px;
}
.cs-timeline-step h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}
.cs-timeline-step p {
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.7;
  margin-bottom: 0;
}

/* ===== RESULTS GRID ===== */
.cs-results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 32px;
}
.cs-result-card {
  background: var(--white);
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.cs-result-card.cs-highlight {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
  color: var(--white);
  grid-column: 1 / -1;
  overflow: hidden;
  position: relative;
}
/* Flex layout inside highlight card - text left, visualization right */
.cs-result-card.cs-highlight > div {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
}
.cs-result-card.cs-highlight .cs-result-value { color: var(--white); }
.cs-result-card.cs-highlight .cs-result-label { color: rgba(255,255,255,0.7); }
.cs-result-card.cs-highlight .cs-result-detail { color: rgba(255,255,255,0.8); max-width: 50%; }
.cs-result-value {
  font-family: 'Poppins', sans-serif;
  font-size: 48px;
  font-weight: 800;
  color: var(--teal-dark);
  line-height: 1;
}
.cs-result-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-600);
  margin-top: 4px;
  margin-bottom: 12px;
}
.cs-result-detail {
  font-size: 14px;
  color: var(--gray-400);
  line-height: 1.6;
}

/* ===== BAR CHART VISUALIZATION ===== */
.cs-bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  height: 160px;
  margin-top: 24px;
  padding: 0 16px;
}
.cs-bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.cs-bar-pair {
  display: flex;
  gap: 4px;
  align-items: flex-end;
  height: 120px;
  width: 100%;
  justify-content: center;
}
.cs-bar {
  width: 28px;
  border-radius: 4px 4px 0 0;
  transition: height 600ms ease;
}
.cs-bar.cs-before {
  background: var(--gray-200);
}
.cs-bar.cs-after {
  background: linear-gradient(to top, var(--teal-dark), var(--teal-light));
}
.cs-bar-label {
  font-size: 11px;
  color: var(--gray-400);
  text-align: center;
  font-weight: 600;
}
.cs-chart-legend {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-top: 16px;
}
.cs-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--gray-600);
}
.cs-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

/* ===== RANKINGS GRID ===== */
.cs-rankings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.cs-ranking-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--gray-bg);
  border-radius: 8px;
}
.cs-ranking-keyword {
  font-size: 14px;
  color: var(--gray-600);
}
.cs-ranking-position {
  font-size: 14px;
  font-weight: 800;
}
.cs-ranking-position.cs-rank-1 {
  color: var(--success);
}
.cs-ranking-position.cs-rank-top3 {
  color: var(--teal-dark);
}
.cs-ranking-position.cs-rank-top10 {
  color: var(--teal);
}

/* ===== TESTIMONIAL ===== */
.cs-testimonial-section {
  background: var(--navy);
  padding: 72px 0;
}
.cs-testimonial-inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  padding: 0 24px;
}
.cs-testimonial-quote {
  font-family: 'Poppins', sans-serif;
  font-size: 24px;
  font-weight: 500;
  color: var(--white);
  line-height: 1.6;
  margin-bottom: 28px;
  position: relative;
}
.cs-testimonial-quote::before {
  content: '\201C';
  font-size: 80px;
  color: var(--teal);
  opacity: 0.3;
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  font-family: Georgia, serif;
}
.cs-testimonial-author {
  font-size: 15px;
  font-weight: 600;
  color: var(--teal-light);
}
.cs-testimonial-role {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  margin-top: 4px;
}

/* ===== CTA SECTION ===== */
.cs-cta-section {
  padding: 80px 0;
  text-align: center;
  background: var(--gray-bg);
}
.cs-cta-section h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 12px;
}
.cs-cta-section p {
  font-size: 16px;
  color: var(--gray-600);
  line-height: 1.7;
  margin-bottom: 28px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}
.cs-cta-btn {
  display: inline-block;
  padding: 16px 40px;
  font-family: 'Open Sans', sans-serif;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--white);
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
  border-radius: 8px;
  text-decoration: none;
  transition: all 200ms ease;
  box-shadow: 0 4px 16px rgba(67,137,162,0.3);
  cursor: pointer;
}
.cs-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(67,137,162,0.4);
}
.cs-cta-sub {
  margin-top: 12px;
  font-size: 13px;
  color: var(--gray-400);
}

/* ===== MORE CASE STUDIES ===== */
.cs-more-section {
  padding: 64px 0;
}
.cs-more-section h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 28px;
}
.cs-more-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.cs-more-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  border: 1px solid var(--gray-100);
  border-radius: 12px;
  cursor: pointer;
  transition: all 200ms ease;
  text-decoration: none;
  color: inherit;
}
.cs-more-card:hover {
  border-color: var(--teal);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.cs-more-card-industry {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--teal);
}
.cs-more-card-name {
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
}

/* ===== INDEX PAGE STYLES ===== */
.cs-index-header {
  text-align: center;
  padding: 80px 24px 48px;
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 40%, var(--teal-dark) 100%);
}
.cs-index-header h1 {
  font-family: 'Poppins', sans-serif;
  font-size: 40px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 12px;
}
.cs-index-stats {
  font-family: 'Poppins', sans-serif;
  font-size: 20px;
  color: var(--teal-light);
  font-weight: 600;
}
.cs-index-subtitle {
  font-size: 16px;
  color: var(--gray-400);
  margin-top: 8px;
}

.cs-index-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 32px 24px;
  border-bottom: 1px solid var(--gray-100);
  text-decoration: none;
  color: inherit;
  transition: background 200ms ease;
}
.cs-index-row:hover {
  background: var(--gray-bg);
}

.cs-index-left {
  flex: 1;
}
.cs-index-right {
  text-align: right;
  min-width: 200px;
}

.cs-index-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--teal-light);
  background: rgba(67,137,162,0.15);
  padding: 5px 14px;
  border-radius: 100px;
}
.cs-index-name {
  font-family: 'Poppins', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--navy);
  margin-top: 8px;
}
.cs-index-location {
  font-size: 14px;
  color: var(--gray-600);
}

.cs-index-metric {
  font-family: 'Poppins', sans-serif;
  font-size: 48px;
  font-weight: 800;
  color: var(--teal-dark);
  display: inline-block;
}
.cs-index-metric-label {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--gray-400);
  letter-spacing: 0.5px;
  font-weight: 600;
}
.cs-index-detail {
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.6;
  margin-top: 8px;
  max-width: 400px;
  margin-left: auto;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .cs-hero-top { flex-direction: column; }
  .cs-client-snapshot { min-width: auto; }
  .cs-metrics-inner { grid-template-columns: repeat(2, 1fr); }
  .cs-metric-item { border-bottom: 1px solid var(--gray-100); }
  .cs-challenge-grid { grid-template-columns: 1fr; }
  .cs-results-grid { grid-template-columns: 1fr; }
  .cs-more-grid { grid-template-columns: 1fr; }
  .cs-hero h1 { font-size: 28px; }
  .cs-result-value { font-size: 36px; }
  .cs-rankings-grid { grid-template-columns: 1fr; }
  .cs-index-row { flex-direction: column; gap: 16px; }
  .cs-index-right { text-align: left; min-width: auto; }
  .cs-index-metric { font-size: 36px; }
  .cs-index-header h1 { font-size: 28px; }
}
