/* ==========================================================================
   ABLYWORKS MODERN CASE STUDIES SECTION & DETAIL STYLES - 2026 SAAS AESTHETICS
   Matching Home Page Dark Emerald Colors, Fonts & Interactive Flow
   ========================================================================== */

:root {
  --cs-primary: #008740;
  --cs-primary-hover: #006b30;
  --cs-primary-light: #eaf8ef;
  --cs-primary-glow: rgba(0, 135, 64, 0.25);
  --cs-mint: #4ade80;
  --cs-mint-light: #a7f3d0;
  --cs-dark: #0d1a12;
  --cs-dark-elevated: #132118;
  --cs-dark-card: #17281c;
  --cs-ink: #0f172a;
  --cs-slate: #334155;
  --cs-muted: #64748b;
  --cs-light-bg: #f8fafc;
  --cs-soft-bg: #f4fbf6;
  --cs-border: #e2e8f0;
  --cs-radius-sm: 10px;
  --cs-radius-md: 16px;
  --cs-radius-lg: 24px;
  --cs-shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.04);
  --cs-shadow-md: 0 12px 36px rgba(0, 135, 64, 0.08);
  --cs-shadow-lg: 0 20px 50px rgba(0, 135, 64, 0.12);
}

.case-studies-page {
  color: var(--cs-ink);
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow-x: clip;
}

.case-studies-page h1,
.case-studies-page h2,
.case-studies-page h3,
.case-studies-page h4,
.case-studies-page h5,
.case-studies-page h6 {
  font-family: 'Poppins', sans-serif;
  letter-spacing: -0.02em;
  font-weight: 700;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.cs-hero {
  position: relative;
  background: var(--cs-dark);
  padding: 95px 0 100px;
  overflow: hidden;
  color: #ffffff;
}

/* Ambient glow orbs */
.cs-hero .ambient-glow-1 {
  position: absolute;
  top: -120px;
  left: 15%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(74, 222, 128, 0.3) 0%, rgba(74, 222, 128, 0) 70%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 1;
}

.cs-hero .ambient-glow-2 {
  position: absolute;
  bottom: -100px;
  right: 12%;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(0, 135, 64, 0.35) 0%, rgba(0, 135, 64, 0) 70%);
  filter: blur(70px);
  pointer-events: none;
  z-index: 1;
}

/* Subtle grid backdrop pattern */
.cs-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(ellipse at 50% 50%, black 40%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, black 40%, transparent 80%);
  pointer-events: none;
  z-index: 1;
}

.cs-hero .container {
  position: relative;
  z-index: 2;
}

/* Hero Badge */
.cs-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.35);
  backdrop-filter: blur(12px);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--cs-mint-light);
  margin-bottom: 22px;
  box-shadow: 0 0 20px rgba(74, 222, 128, 0.15);
  transition: all 0.3s ease;
}

.cs-hero-badge:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--cs-mint);
  transform: translateY(-2px);
}

.cs-hero-badge .pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--cs-mint);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7);
  animation: cs-pulse 2s infinite;
}

@keyframes cs-pulse {
  0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(74, 222, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

.cs-hero-title {
  font-size: clamp(2.4rem, 4.5vw, 3.8rem);
  line-height: 1.15;
  font-weight: 800;
  margin-bottom: 20px;
}

.cs-hero-title .gradient-text {
  background: linear-gradient(135deg, #ffffff 30%, #4ade80 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.cs-hero-subtitle {
  font-size: 1.15rem;
  line-height: 1.65;
  color: #94a3b8;
  max-width: 680px;
  margin: 0 auto;
}

/* ==========================================================================
   AGGREGATE STATS METRICS BAR
   ========================================================================== */
.cs-stats-bar-wrapper {
  margin-top: -45px;
  position: relative;
  z-index: 10;
}

.cs-stats-bar {
  background: #ffffff;
  border-radius: var(--cs-radius-md);
  box-shadow: 0 18px 45px rgba(6, 20, 47, 0.09);
  border: 1px solid #e2e8f0;
  padding: 24px 30px;
}

.cs-stat-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 12px;
}

.cs-stat-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--cs-primary-light);
  color: var(--cs-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.cs-stat-item:hover .cs-stat-icon-box {
  transform: scale(1.08) rotate(3deg);
  background: var(--cs-primary);
  color: #ffffff;
}

.cs-stat-number {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--cs-ink);
  line-height: 1.1;
  font-family: 'Space Grotesk', sans-serif;
}

.cs-stat-label {
  font-size: 0.8rem;
  color: var(--cs-muted);
  font-weight: 500;
  margin: 0;
  line-height: 1.3;
}

/* ==========================================================================
   CATEGORY & PRODUCT FILTER PILLS
   ========================================================================== */
.cs-filters-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 40px 0 35px;
}

.cs-filter-btn {
  padding: 9px 20px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--cs-slate);
  background: #ffffff;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cs-filter-btn:hover {
  border-color: var(--cs-primary);
  color: var(--cs-primary);
  background: #f8fafc;
  transform: translateY(-2px);
}

.cs-filter-btn.active {
  background: var(--cs-primary);
  border-color: var(--cs-primary);
  color: #ffffff !important;
  box-shadow: 0 4px 16px rgba(0, 135, 64, 0.3);
}

.cs-filter-count {
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  color: inherit;
}

.cs-filter-btn.active .cs-filter-count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* ==========================================================================
   FEATURED CASE STUDY SPOTLIGHT CARD
   ========================================================================== */
.cs-featured-card {
  background: linear-gradient(145deg, #0d1a12 0%, #17281c 100%);
  border-radius: var(--cs-radius-lg);
  border: 1px solid rgba(74, 222, 128, 0.2);
  color: #ffffff;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  margin-bottom: 50px;
  position: relative;
}

.cs-featured-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(74, 222, 128, 0.18) 0%, transparent 70%);
  filter: blur(50px);
  pointer-events: none;
}

.cs-featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(74, 222, 128, 0.15);
  border: 1px solid rgba(74, 222, 128, 0.35);
  color: var(--cs-mint-light);
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
}

.cs-featured-title {
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
  margin-bottom: 14px;
}

.cs-featured-summary {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #cbd5e1;
  margin-bottom: 22px;
}

.cs-featured-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.cs-featured-metric-item {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px 14px;
  backdrop-filter: blur(8px);
}

.cs-featured-metric-val {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--cs-mint);
  font-family: 'Space Grotesk', sans-serif;
  line-height: 1.1;
}

.cs-featured-metric-lbl {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 4px;
  font-weight: 500;
}

.cs-featured-img-wrap {
  position: relative;
  height: 100%;
  min-height: 340px;
  overflow: hidden;
}

.cs-featured-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.cs-featured-card:hover .cs-featured-img-wrap img {
  transform: scale(1.04);
}

/* ==========================================================================
   CASE STUDIES GRID & CARDS
   ========================================================================== */
.cs-card {
  background: #ffffff;
  border-radius: var(--cs-radius-md);
  border: 1px solid #e2e8f0;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

.cs-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 20px 40px rgba(0, 135, 64, 0.12);
  border-color: rgba(0, 135, 64, 0.3);
}

.cs-card-img-wrap {
  position: relative;
  height: 210px;
  overflow: hidden;
  background: #0f172a;
}

.cs-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.cs-card:hover .cs-card-img-wrap img {
  transform: scale(1.06);
}

.cs-card-pill-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--cs-mint-light);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  z-index: 2;
}

.cs-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.cs-client-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--cs-muted);
  font-weight: 600;
  margin-bottom: 10px;
}

.cs-client-meta .client-name {
  color: var(--cs-primary);
}

.cs-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--cs-ink);
  line-height: 1.35;
  margin-bottom: 12px;
  transition: color 0.2s;
}

.cs-card:hover .cs-card-title {
  color: var(--cs-primary);
}

.cs-card-summary {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--cs-slate);
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 2-Stat Mini Grid inside Card */
.cs-card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: auto;
  margin-bottom: 18px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
}

.cs-card-stat-pill {
  background: var(--cs-soft-bg);
  border: 1px solid rgba(0, 135, 64, 0.12);
  border-radius: 8px;
  padding: 8px 10px;
  text-align: center;
}

.cs-card-stat-pill .stat-val {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--cs-primary);
  font-family: 'Space Grotesk', sans-serif;
  line-height: 1.1;
}

.cs-card-stat-pill .stat-lbl {
  font-size: 0.7rem;
  color: var(--cs-muted);
  font-weight: 500;
  margin-top: 2px;
}

.cs-read-btn {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--cs-primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s ease;
}

.cs-card:hover .cs-read-btn {
  gap: 10px;
  color: var(--cs-primary-hover);
}

/* ==========================================================================
   DETAIL PAGE SPECIFIC STYLES
   ========================================================================== */
.cs-detail-hero {
  position: relative;
  background: var(--cs-dark);
  padding: 80px 0 90px;
  color: #ffffff;
  overflow: hidden;
}

.cs-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: #94a3b8;
  margin-bottom: 20px;
}

.cs-breadcrumb a {
  color: #cbd5e1;
  text-decoration: none;
  transition: color 0.2s;
}

.cs-breadcrumb a:hover {
  color: var(--cs-mint);
}

.cs-detail-title {
  font-size: clamp(2rem, 3.8vw, 3.2rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
}

.cs-client-badge-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  font-size: 0.875rem;
  color: #cbd5e1;
}

.cs-badge-pill {
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--cs-mint-light);
}

/* 4-Stat Metric Cards Banner */
.cs-detail-metrics-banner {
  margin-top: -45px;
  position: relative;
  z-index: 10;
  margin-bottom: 50px;
}

.cs-detail-metric-card {
  background: #ffffff;
  border-radius: var(--cs-radius-md);
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  padding: 24px 20px;
  text-align: center;
  transition: transform 0.3s ease, border-color 0.3s ease;
  height: 100%;
}

.cs-detail-metric-card:hover {
  transform: translateY(-4px);
  border-color: var(--cs-primary);
  box-shadow: 0 16px 36px rgba(0, 135, 64, 0.12);
}

.cs-detail-metric-card .val {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--cs-primary);
  font-family: 'Space Grotesk', sans-serif;
  line-height: 1.1;
  margin-bottom: 6px;
}

.cs-detail-metric-card .lbl {
  font-size: 0.85rem;
  color: var(--cs-slate);
  font-weight: 600;
  margin: 0;
}

/* Detail Story Content Blocks */
.cs-story-block {
  background: #ffffff;
  border-radius: var(--cs-radius-md);
  border: 1px solid #e2e8f0;
  padding: 32px;
  margin-bottom: 30px;
}

.cs-story-heading {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--cs-ink);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cs-story-heading i {
  font-size: 1.5rem;
  color: var(--cs-primary);
}

.cs-story-text {
  font-size: 1rem;
  line-height: 1.75;
  color: #334155;
  white-space: pre-line;
}

/* Executive Summary Highlight Box */
.cs-exec-summary-box {
  background: var(--cs-soft-bg);
  border-left: 4px solid var(--cs-primary);
  border-radius: 0 12px 12px 0;
  padding: 22px 26px;
  font-size: 1.05rem;
  line-height: 1.7;
  color: #1e293b;
  font-weight: 500;
  margin-bottom: 30px;
}

/* Client Testimonial Box */
.cs-testimonial-box {
  background: linear-gradient(135deg, #0d1a12 0%, #1a3022 100%);
  border-radius: var(--cs-radius-md);
  border: 1px solid rgba(74, 222, 128, 0.25);
  color: #ffffff;
  padding: 36px 40px;
  margin: 35px 0;
  position: relative;
  overflow: hidden;
}

.cs-testimonial-box::before {
  content: "\201C";
  font-size: 120px;
  color: rgba(74, 222, 128, 0.1);
  position: absolute;
  top: -20px;
  left: 20px;
  font-family: Georgia, serif;
  line-height: 1;
}

.cs-testimonial-quote {
  font-size: 1.15rem;
  line-height: 1.7;
  color: #f1f5f9;
  font-weight: 500;
  margin-bottom: 20px;
  position: relative;
  z-index: 2;
}

.cs-testimonial-author-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 2;
}

.cs-testimonial-avatar-initials {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #008740, #4ade80);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.cs-testimonial-author-name {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.cs-testimonial-author-role {
  font-size: 0.8rem;
  color: var(--cs-mint-light);
  margin: 0;
}

/* Sidebar Snapshot Widget */
.cs-sidebar-widget {
  background: #ffffff;
  border-radius: var(--cs-radius-md);
  border: 1px solid #e2e8f0;
  padding: 26px;
  margin-bottom: 25px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.cs-sidebar-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--cs-ink);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.cs-snapshot-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cs-snapshot-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid #f8fafc;
  font-size: 0.875rem;
}

.cs-snapshot-item:last-child {
  border-bottom: none;
}

.cs-snapshot-label {
  color: var(--cs-muted);
  font-weight: 500;
}

.cs-snapshot-val {
  font-weight: 600;
  color: var(--cs-ink);
  text-align: right;
}

/* Sidebar Demo CTA Widget */
.cs-sidebar-cta {
  background: linear-gradient(135deg, #008740 0%, #006b30 100%);
  color: #ffffff;
  border-radius: var(--cs-radius-md);
  padding: 28px;
  text-align: center;
}

.cs-sidebar-cta h5 {
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 10px;
}

.cs-sidebar-cta p {
  font-size: 0.875rem;
  color: #eaf8ef;
  line-height: 1.5;
  margin-bottom: 20px;
}

/* ==========================================================================
   BOTTOM GLOBAL CTA SECTION
   ========================================================================== */
.cs-cta-section {
  background: var(--cs-dark);
  color: #ffffff;
  padding: 80px 0;
  position: relative;
  overflow: hidden;
  margin-top: 60px;
}

.cs-cta-section::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(0, 135, 64, 0.3) 0%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
}

.cs-cta-title {
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
}

.cs-cta-desc {
  font-size: 1.1rem;
  color: #94a3b8;
  max-width: 600px;
  margin: 0 auto 30px;
  line-height: 1.6;
}

/* ==========================================================================
   SHARE WIDGET STYLES
   ========================================================================== */
.cs-share-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.cs-share-icon-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 4px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #334155 !important;
  text-decoration: none !important;
  font-size: 0.72rem;
  font-weight: 600;
  transition: all 0.22s ease;
  cursor: pointer;
  outline: none;
}

.cs-share-icon-btn i {
  font-size: 1.15rem;
  transition: transform 0.2s ease;
}

.cs-share-icon-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.cs-share-icon-btn.share-linkedin:hover {
  background: #0a66c2;
  border-color: #0a66c2;
  color: #ffffff !important;
}

.cs-share-icon-btn.share-linkedin i {
  color: #0a66c2;
}
.cs-share-icon-btn.share-linkedin:hover i {
  color: #ffffff;
}

.cs-share-icon-btn.share-x:hover {
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff !important;
}

.cs-share-icon-btn.share-x i {
  color: #0f172a;
}
.cs-share-icon-btn.share-x:hover i {
  color: #ffffff;
}

.cs-share-icon-btn.share-email:hover {
  background: #008740;
  border-color: #008740;
  color: #ffffff !important;
}

.cs-share-icon-btn.share-email i {
  color: #008740;
}
.cs-share-icon-btn.share-email:hover i {
  color: #ffffff;
}

.cs-share-icon-btn.share-copy:hover {
  background: #008740;
  border-color: #008740;
  color: #ffffff !important;
}

.cs-share-icon-btn.share-copy i {
  color: #008740;
}
.cs-share-icon-btn.share-copy:hover i {
  color: #ffffff;
}

/* ==========================================================================
   RESPONSIVE ADJUSTMENTS
   ========================================================================== */
@media (max-width: 991px) {
  .cs-hero { padding: 60px 0 70px; }
  .cs-stats-bar-wrapper { margin-top: -20px; }
  .cs-stats-bar { padding: 16px; }
  .cs-stat-item { padding: 8px 0; }
  .cs-detail-metrics-banner { margin-top: -20px; }
}

