.case-study-page {
  color: var(--text);
  background:
    radial-gradient(circle at 85% 10%, rgba(250, 186, 61, 0.14), transparent 28rem),
    linear-gradient(180deg, #f9f7f1 0%, #ffffff 48%, #f4f8f6 100%);
}

.case-study-hero {
  min-height: 720px;
  display: grid;
  align-items: center;
  padding: clamp(8rem, 12vw, 10rem) 0 clamp(4.5rem, 8vw, 7rem);
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 18% 20%, rgba(242, 115, 87, 0.34), transparent 24rem),
    radial-gradient(circle at 85% 80%, rgba(250, 186, 61, 0.22), transparent 28rem),
    linear-gradient(135deg, #082f30 0%, #0b5351 58%, #153f3d 100%);
}

.case-study-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: clamp(2.5rem, 7vw, 6rem);
  align-items: center;
}

.case-study-hero-copy { max-width: 760px; }
.case-study-hero-copy h1 {
  margin: 0.7rem 0 1.4rem;
  color: #fff;
  font-size: clamp(3.6rem, 8vw, 7.6rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}
.case-study-hero-copy p {
  margin: 0 0 0.85rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  line-height: 1.95;
}
.case-study-hero-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 1.8rem; }

.case-study-hero-visual {
  min-height: 460px;
  position: relative;
  display: grid;
  align-content: center;
  gap: 1rem;
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 42% 42% 28px 28px;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.035));
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px);
}
.case-study-hero-visual::before {
  content: "";
  position: absolute;
  inset: 1rem;
  border: 1px dashed rgba(250, 186, 61, 0.45);
  border-radius: inherit;
  pointer-events: none;
}
.impact-stat {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border-radius: 18px;
  background: rgba(4, 28, 29, 0.48);
}
.impact-stat strong { color: #faba3d; font-size: clamp(1.8rem, 4vw, 3.1rem); line-height: 1; }
.impact-stat span { color: rgba(255, 255, 255, 0.86); font-weight: 700; }
.impact-stat-main { padding-block: 1.45rem; background: rgba(242, 115, 87, 0.2); }

.case-study-list-section { padding-block: clamp(5rem, 9vw, 8rem); }
.case-study-section-head { max-width: 850px; margin-inline: auto; margin-bottom: clamp(2.8rem, 6vw, 5rem); }
.case-study-section-head p { max-width: 720px; margin-inline: auto; }
.case-study-list { display: grid; gap: clamp(2rem, 5vw, 4rem); }
.case-study-card {
  position: relative;
  overflow: hidden;
  padding: clamp(1.35rem, 3vw, 2.4rem);
  border: 1px solid rgba(8, 73, 74, 0.13);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 24px 60px rgba(8, 48, 48, 0.1);
}
.case-study-card::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  inset: -100px auto auto -80px;
  border-radius: 50%;
  background: rgba(250, 186, 61, 0.13);
  pointer-events: none;
}
.case-study-card-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 3vw, 2rem);
  margin-bottom: clamp(1.25rem, 3vw, 2rem);
  padding: 0.35rem 0 1.25rem;
  border-bottom: 1px solid rgba(8, 73, 74, 0.12);
}
.case-study-number {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: clamp(62px, 8vw, 90px);
  height: clamp(62px, 8vw, 90px);
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #0b5b59, #f27357);
  font-size: clamp(1.3rem, 3vw, 2rem);
  font-weight: 900;
  box-shadow: 0 14px 30px rgba(8, 73, 74, 0.2);
}
.case-study-label { color: #f27357; font-weight: 800; }
.case-study-card-head h2 {
  position: relative;
  z-index: 1;
  max-width: 100%;
  margin: 0;
  color: #07494a;
  font-size: clamp(1.85rem, 3.4vw, 2.75rem);
  line-height: 1.35;
  text-align: center;
  text-wrap: balance;
}
.case-study-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.35rem);
}
.case-detail {
  position: relative;
  min-height: 260px;
  padding: clamp(1.25rem, 2.5vw, 1.8rem);
  border-radius: 22px;
  background: #f4f8f6;
  border: 1px solid rgba(8, 73, 74, 0.1);
}
.case-detail > span { color: rgba(8, 73, 74, 0.28); font-size: 0.86rem; font-weight: 900; letter-spacing: 0.12em; }
.case-detail h3 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin: 0 0 1rem;
  color: #07494a;
  font-size: clamp(1.5rem, 2.35vw, 1.85rem);
  line-height: 1.35;
  text-align: center;
}
.case-detail h3::before {
  content: "";
  display: inline-grid;
  place-items: center;
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background-color: #176b68;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 27px 27px;
  box-shadow: 0 10px 22px rgba(8, 73, 74, 0.16);
}
.case-detail-challenge h3::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 2.8 19h18.4L12 3Z'/%3E%3Cpath d='M12 9v4M12 17h.01'/%3E%3C/svg%3E");
}
.case-detail-solution h3::before {
  background-color: #d89c1d;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6M10 22h4'/%3E%3Cpath d='M8.4 14.5A6 6 0 1 1 15.6 14.5C14.6 15.2 14 16 14 17h-4c0-1-.6-1.8-1.6-2.5Z'/%3E%3C/svg%3E");
}
.case-detail-impact h3::before {
  background-color: #42a6a6;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19V9M10 19V5M16 19v-7M22 19V3'/%3E%3Cpath d='m4 7 6-4 6 7 6-8'/%3E%3C/svg%3E");
}
.case-detail-value h3::before {
  background-color: #f27357;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m8.5 12 2.2 2.2 4.8-5M12 3v2M12 19v2'/%3E%3C/svg%3E");
}
.case-detail p {
  margin: 0;
  color: #294f4e;
  font-size: clamp(1.16rem, 1.55vw, 1.3rem);
  font-weight: 600;
  line-height: 2.05;
  text-align: center;
  text-wrap: pretty;
}
.case-detail-solution { background: #fff7eb; border-color: rgba(250, 186, 61, 0.25); }
.case-detail-impact { background: #eef8f8; border-color: rgba(65, 165, 165, 0.22); }
.case-detail-value { background: #fff1ed; border-color: rgba(242, 115, 87, 0.22); }

.case-study-cta-section { padding: 0 0 clamp(5rem, 9vw, 8rem); }
.case-study-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: clamp(1.6rem, 5vw, 3.5rem);
  border-radius: 30px;
  color: #fff;
  background: linear-gradient(125deg, #073f42, #0b5b59);
  box-shadow: 0 26px 60px rgba(7, 63, 66, 0.2);
}
.case-study-cta h2 { margin: 0.45rem 0 0; color: #fff; font-size: clamp(1.8rem, 4vw, 3.2rem); }

[data-theme="dark"] .case-study-page { background: #071a1a; }
[data-theme="dark"] .case-study-card { background: rgba(13, 42, 42, 0.96); border-color: rgba(255, 255, 255, 0.1); }
[data-theme="dark"] .case-study-card-head h2,
[data-theme="dark"] .case-detail h3 { color: #bdebed; }
[data-theme="dark"] .case-detail { background: rgba(255, 255, 255, 0.045); }
[data-theme="dark"] .case-detail p { color: rgba(255, 255, 255, 0.72); }

@media (max-width: 900px) {
  .case-study-hero-grid { grid-template-columns: 1fr; }
  .case-study-hero-visual { min-height: 360px; }
}

@media (max-width: 680px) {
  .case-study-hero { min-height: 0; }
  .case-study-hero-copy h1 { font-size: clamp(3.2rem, 17vw, 5.2rem); }
  .case-study-hero-visual { min-height: 320px; border-radius: 30% 30% 22px 22px; }
  .case-study-details { grid-template-columns: 1fr; }
  .case-detail { min-height: 0; }
  .case-detail p {
    font-size: 1.08rem;
    line-height: 1.95;
  }
  .case-detail h3::before {
    flex-basis: 46px;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background-size: 24px 24px;
  }
  .case-study-card-head { align-items: center; }
  .case-study-cta { align-items: flex-start; flex-direction: column; }
}
