p,
li {
  color: var(--algo-text);
  font-size: 15px;
  margin: 0;
}
.hero-inner>img{
  z-index: 99;
}
.case-study-page .section-head {
  width: 100%;
  max-width: 100%;
}

.case-story section {
  padding: 60px 0;
}

.case-story .section-soft {
  padding: 60px 3%;
}

.hero {
  position: relative;
  overflow: hidden;
  padding-bottom: 50px;
  background: radial-gradient(circle at 82% 28%, rgba(0, 102, 255, .14), transparent 32%), linear-gradient(120deg, #f7faff 0%, #eef5ff 60%, #e7efff 100%);
  color: var(--navy, #0a192f)
}

.hero:before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(44, 60, 185, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(44, 60, 185, .045) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(90deg, transparent, black 35%, black)
}

.hero:after {
  content: "";
  position: absolute;
  width: 440px;
  height: 440px;
  right: -150px;
  top: 120px;
  border: 1px solid rgba(44, 60, 185, .12);
  border-radius: 50%;
  box-shadow: 0 0 0 45px rgba(44, 60, 185, .035), 0 0 0 90px rgba(44, 60, 185, .025)
}


.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 24px 0 28px
}

.pill {
  padding: 7px 12px;
  border: 1px solid #dce6f4;
  border-radius: 6px;
  background: #fff;
  color: #435873;
  font-size: 11px;
  font-weight: 600
}


.hero-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
  color: #64758c;
  font-size: 12px
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #20a46b;
  box-shadow: 0 0 0 5px rgba(32, 164, 107, .12)
}

.snapshot {
  position: relative;
  z-index: 2;
  background: #fff;
  padding: 0 5%;
}

.snapshot-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 26px 0;
  border-bottom: 1px solid var(--line, #dbe5f1)
}

.snapshot-item {
  padding: 3px 24px;
  border-right: 1px solid var(--line, #dbe5f1)
}

.snapshot-item:first-child {
  padding-left: 0
}

.snapshot-item:last-child {
  border: 0
}

.snapshot-item small {
  display: block;
  color: #8290a4;
}

.snapshot-item b {
  color: var(--navy, #0a192f);
  font-size: 14px
}

.case-study-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: clamp(34px, 5vw, 78px);
  align-items: start;
  margin: 0 auto;
  /* padding: 34px 0 28px */
}

.case-sidebar {
  position: relative;
  align-self: stretch;
  min-width: 0
}

.case-sidebar-inner {
  position: sticky;
  top: 112px;
  padding: 22px 0 26px
}

.sidebar-kicker {
  display: block;
  margin: 0 0 17px 14px;
  color: #8290a4;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em
}
.sidebar-kicker-social {
    margin: 20px 0 10px 0 !important; 
}
.case-tabs-social {
    display: flex;
    gap: 8px;
}
.case-tabs-social .case-tab {
    background: #eef2ff;
        width: 40px;
    justify-content: center;
}
.case-tabs {
  position: relative;
  display: grid;
  gap: 5px
}

.case-tabs:before {
  position: absolute;
  top: 13px;
  bottom: 13px;
  left: 14px;
  width: 1px;
  background: #e0e7f0;
  content: ""
}

.case-tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 13px;
  border-radius: 7px;
  color: #738198;
  font-size: 12px;
  font-weight: 500;
  transition: background .2s, color .2s
}

.case-tab:hover {
  background: #f2f6fc;
  color: var(--navy, #0a192f)
}

.case-tab.active,
.case-tab.active p {
  background: #edf2ff;
  color: var(--logo_colour, #2c3cb9);
  font-weight: 700
}

.case-tab.active:before {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 0;
  width: 3px;
  border-radius: 5px;
  background: var(--logo_colour, #2c3cb9);
  content: ""
}

.tab-index {
  min-width: 17px;
  color: #9ba6b7;
  font-size: 10px;
  font-weight: 800
}

.case-tab.active .tab-index, .case-tabs-social .case-tab:hover {
  color: var(--logo_colour, #2c3cb9)
}

.sidebar-contact {
  margin: 32px 0 0;
  padding: 16px 14px;
  border: 1px solid #e3eaf3;
  border-radius: 9px;
  background: #f5f8fc
}

.sidebar-contact span {
  display: block;
  margin-bottom: 10px;
  color: #65758c;
  line-height: 1.55
}

.sidebar-contact a {
  color: var(--logo_colour, #2c3cb9);
  font-weight: 700
}

.sidebar-contact b {
  padding-left: 6px
}

.case-story {
  min-width: 0
}

.case-story .cta-band h3 {
  margin: 10px 0;
}

.challenge-intro,
.architecture .section-head {
  text-align: left;
}

.case-story .eyebrow {
  color: var(--logo_colour, #2c3cb9)
}

.case-story .challenge-grid {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 46px;
  align-items: start
}

.challenge-intro {
  position: sticky;
  top: 112px;
  overflow: hidden;
}
.challenge-intro img{
  width: 100%;
  height: auto;
  border-radius: 18px;
  margin-top: 20px;
}
.challenge-intro h2 {
  margin: 13px 0 17px;
}

.challenge-list {
  display: grid;
  gap: 0
}

.challenge {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 15px;
  padding: 21px 4px;
  border: 0;
  border-bottom: 1px solid #e1e8f1;
  border-radius: 0;
  background: transparent
}

.challenge:first-child {
  border-top: 1px solid #e1e8f1
}

.challenge-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #edf2ff;
  color: var(--logo_colour, #2c3cb9);
  font-size: 17px;
  font-weight: 700
}

.challenge h3,
.result-row h3 {
  margin: 2px 0 7px;
  font-size: 16px;
  font-weight: 600;
}


.section-soft {
  background: #f5f8fc
}

.case-story .section-soft {
  background: #f5f8fc
}

.solution-top .section-head {
  text-align: center;
  margin: 0 Auto 30px;
}

.solution-note {
  max-width: 230px;
  color: #7b899d;
  font-size: 11px
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px
}

.case-feature-card {
  position: relative;
  min-height: 245px;
  overflow: hidden;
  padding: 25px;
  border: 1px solid #e1e8f1;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(10, 25, 47, .035)
}
.case-feature-card img{
    width: 100%;
    margin-top: 20px;
    border-radius: 15px;
}
.sec-lay-img .arch-flow {
    grid-template-columns: 1fr 1fr;
}
.case-feature-card.fill-width-col {
    display: grid;
    grid-column: span 2;
}
.sec-lay-img {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    align-items: center;
    gap: 20px;
}
.sec-lay-img img{
    width: 100%;
    height: -webkit-fill-available;
    object-fit: cover;
    object-position: right;
    border-radius: 15px;
}
.case-feature-card:after {
  position: absolute;
  right: -55px;
  bottom: -85px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 102, 255, .08), transparent 70%);
  content: "";
  pointer-events: none
}

.case-feature-card .num {
  color: var(--logo_colour, #2c3cb9);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em
}

.case-feature-card h3 {
  position: relative;
  z-index: 1;
  margin: 15px 0 9px;
  font-size: 18px;
  font-weight: 600;
}

.case-feature-card ul {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 7px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none
}

.case-feature-card li {
  display: flex;
  gap: 8px;
  color: #53657d;
}

.case-feature-card li:before {
  color: var(--logo_colour, #2c3cb9);
  content: "↗";
  font-weight: 800
}

.case-feature-card.wide {
  display: grid;
  grid-column: span 2;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 25px;
  background: #edf3ff;
  border-color: #dce6f4
}

.case-feature-card.wide p,
.case-feature-card.wide li {
  color: #53657d
}

.admin-preview {
  overflow: hidden;
  border: 1px solid #e0e7f0;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(10, 25, 47, .07)
}

.preview-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 15px;
  border-bottom: 1px solid #e9eef5;
  color: #687991;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .06em
}

.preview-row {
  display: grid;
  grid-template-columns: 1fr auto 18px;
  gap: 10px;
  padding: 13px 15px;
  border-bottom: 1px solid #edf1f6;
}

.preview-row:last-child {
  border: 0
}

.preview-row strong {
  color: var(--navy, #0a192f);
}

.architecture-head {
  position: relative;
  z-index: 1;
}

.arch-flow {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
}
.arch-node {
  min-height:-webkit-fill-available;
  padding: 17px;
  border: 1px solid #dfe7f1;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(10, 25, 47, .04)
}
.arch-node img{
  width: 100%;
  height: auto;
  margin-bottom: 20px;
  border-radius: 10px;
}
.arch-node .node-icon {
  margin-bottom: 15px;
  color: var(--logo_colour, #2c3cb9);
  font-size: 20px
}
/* 
.down {
    rotate: 90deg;
}

.arch-arrow {
  text-align: center;
  color: var(--logo_colour, #2c3cb9);
  font-size: 22px
} */

.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 20px
}

.security-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 20px;
  padding-top: 17px;
  border-top: 1px solid #d8e3f1;
  color: #60718a;
  font-size: 11px;
  line-height: 1.7
}

.security-note strong {
  color: var(--navy, #0a192f)
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 20px;
}

.process-step {
  position: relative;
  grid-column: span 2;
  overflow: hidden;
  padding: 30px 28px 28px;
  background: #fff;
  border: 1px solid #e3eaf5;
  border-top: 4px solid var(--logo_colour, #2c3cb9);
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(20, 40, 90, .06);
  text-align: left;
  transition: transform .25s ease, box-shadow .25s ease;
}

/* second row: two wider boxes */
.process-step:nth-child(4),
.process-step:nth-child(5) { grid-column: span 3; }

.process-step:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 32px rgba(44, 60, 185, .16);
}

.step-number {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin: 0 0 18px;
  border-radius: 12px;
  background: #eef1fc;
  color: var(--logo_colour, #2c3cb9);
  font-size: 15px;
  font-weight: 800;
}

.process-step h3 {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
}

.process-step p {
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
  text-align: left;
}

@media(max-width:900px) {
  .process-grid { grid-template-columns: 1fr 1fr; }
  .process-step,
  .process-step:nth-child(4),
  .process-step:nth-child(5) { grid-column: span 1; }
  .process-step:nth-child(5) { grid-column: span 2; }
}

@media(max-width:600px) {
  .process-grid { grid-template-columns: 1fr; gap: 14px; }
  .process-step:nth-child(n) { grid-column: span 1; padding: 22px; }
}



.results-grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  align-items: center;
  gap: 45px
}

.results-panel {
    position: relative;
    overflow: hidden;
    padding: 30px;
    border-radius: 13px;
    background: #edf3ff;
    height: -webkit-fill-available;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.results-panel:after {
  position: absolute;
  top: -70px;
  right: -70px;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: #dce8ff;
  content: ""
}

.results-panel>* {
  position: relative;
  z-index: 1
}

.results-label {
  color: #65758d;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase
}

.results-panel .big-stat {
  margin: 18px 0;
  color: var(--logo_colour, #2c3cb9);
  font-size: clamp(48px, 6vw, 76px);
  font-weight: 800;
  letter-spacing: -.07em;
  line-height: 1
}

.results-panel h3, .why-card h3{
  font-size: 20px;
  font-weight: 600;
}

.result-list {
  display: grid
}

.result-row {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 12px;
  padding: 15px 0;
  border-bottom: 1px solid #e2e9f1
}

.result-row:last-child {
  border: 0
}

.result-check {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #edf2ff;
  color: var(--logo_colour, #2c3cb9);
  font-size: 12px;
  font-weight: 800
}



.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 45px
}
.why-grid .why-copy{
  margin: 0;
  text-align: left;
}
.why-card {
  padding: 25px;
  border: 1px solid #e1e8f1;
  border-radius: 12px;
  background: #fff
}

.why-card .brand {
  margin-bottom: 17px
}

.why-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 17px
}

.why-tags p {
  padding: 6px 15px;
  border-radius: 5px;
  background: #f0f4fa;
  color: #53657d;
}
.case-cta-band img{
  object-position: right !important;
}
.final-cta {
  position: relative;
  overflow: hidden;
  padding: 72px 0;
  border-top: 1px solid #e1e9f4;
  border-bottom: 1px solid #e1e9f4;
  background: linear-gradient(115deg, #edf3ff, #f7faff)
}

.cta-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px
}

.cta-inner h2 {
  max-width: 650px;
  margin: 12px 0;
}

.cta-inner p {
  max-width: 620px;
  margin: 0;
  font-size: 13px;
  line-height: 1.8
}

.cta-actions {
  flex-shrink: 0
}


.footer {
  padding: 26px 0;
  background: #071321;
  color: #a9b8ca;
  font-size: 11px
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px
}

.footer .brand,
.footer .brand span:last-child {
  color: #fff;
  font-size: 18px
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px
}

.footer a:hover {
  color: #fff
}

.story-section {
  scroll-margin-top: 105px
}
@media(max-width: 1300px) {
  .results-panel .big-stat {
    font-size: clamp(38px, 4vw, 50px);
}
.cta-band .cta-copy {
    max-width: 400px;
}
.cta-band h3 {
    max-width: 400px;
    font-size: clamp(27px, 2vw, 36px);
}
.cta-band {
    padding: 14px 26px;
}
.case-sidebar-inner {
    top: 40px;
}
}
@media(max-width:1000px) {

  .case-study-layout {
    grid-template-columns: 185px minmax(0, 1fr);
    gap: 28px;
    width: 94%
  }


  .case-story .challenge-grid {
    grid-template-columns: 1fr;
    gap: 22px
  }

  .challenge-intro {
    position: static
  }

  .results-grid,
  .why-grid {
    grid-template-columns: 1fr;
    gap: 28px
  }

}

@media(max-width:700px) {
  .snapshot-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px 0;
    padding: 20px 0
  }

  .snapshot-item {
    padding: 0 12px
  }

  .snapshot-item:nth-child(2) {
    border: 0
  }

  .snapshot-item:nth-child(3) {
    padding-left: 0
  }

  .snapshot-item b {
    font-size: 12px
  }

  .case-study-layout {
    display: block;
    width: 100%;
    padding: 8px 16px 20px
  }

  .case-sidebar {
    position: sticky;
    top: 69px;
    z-index: 10;
    margin: 0 -16px;
    padding: 9px 16px;
    border-bottom: 1px solid #e5ebf3;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(12px)
  }

  .case-sidebar-inner {
    position: static;
    padding: 0
  }

  .sidebar-kicker,
  .sidebar-contact {
    display: none
  }

  .case-tabs {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding: 2px 0 4px;
    scrollbar-width: none
  }

  .case-tabs::-webkit-scrollbar {
    display: none
  }

  .case-tabs:before {
    display: none
  }

  .case-tab {
    flex: 0 0 auto;
    gap: 7px;
    padding: 8px 10px;
    border: 1px solid #e3eaf2;
    border-radius: 6px;
    background: #fff;
    font-size: 10px;
    white-space: nowrap
  }

  .case-tab.active {
    border-color: #cbd8ee;
    background: #edf2ff
  }

  .case-tab.active:before {
    display: none
  }

  .tab-index {
    min-width: auto
  }

  .case-story .section {
    padding: 46px 0
  }

  .case-story .section-head {
    margin-bottom: 27px
  }


  .challenge {
    grid-template-columns: 36px 1fr;
    gap: 11px;
    padding: 16px 2px
  }

  .challenge-icon {
    width: 34px;
    height: 34px
  }

  .solution-top {
    display: block
  }

  .solution-note {
    margin-top: 12px
  }

  .feature-grid {
    grid-template-columns: 1fr
  }

  .case-feature-card {
    min-height: 0;
    padding: 21px
  }

  .feature-card.wide {
    grid-column: auto;
    grid-template-columns: 1fr;
    gap: 18px
  }

  /* .architecture {
    padding: 24px 17px
  } */

  .arch-flow {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 22px
  }

  .arch-node {
    min-height: 0;
    padding: 15px
  }

  .arch-node .node-icon {
    margin-bottom: 8px
  }

  .arch-arrow {
    transform: rotate(90deg);
    font-size: 18px
  }


  .results-grid,
  .why-grid {
    gap: 24px
  }

  .results-panel {
    padding: 23px;
    height: fit-content;
  }

  .result-row {
    padding: 13px 0
  }

  .final-cta {
    padding: 54px 0
  }

  .cta-inner {
    align-items: flex-start;
    flex-direction: column
  }

  .cta-actions,
  .cta-actions .btn {
    width: 100%
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column
  }

  .footer-links {
    gap: 13px
  }
  .case-feature-card.wide {
    grid-template-columns: 1fr;
}
    .feature-grid {
        display: flex;
        flex-direction: column;
    }
    .case-tabs-social{
        display: none;
    }
    .sec-lay-img{
      display: flex;
      flex-direction: column;
    }
}
@media(min-width: 1600px) {
    .dental>img {
      padding-top: 30px;
        width: 90%;
        z-index: 99;
        padding-bottom:0;
    }
}
/* ===== Mobile polish ===== */
@media(max-width:700px) {
  .story-section { scroll-margin-top: 132px; }

  .case-story section { padding: 40px 0; }

  /* soft sections run edge to edge instead of sitting in a floating inset box */
  .case-story .section-soft {
    margin-left: -16px;
    margin-right: -16px;
    padding: 40px 16px;
  }

  .case-story h2,
  .case-study-page .section-head h2 {
    font-size: 25px;
    line-height: 1.25;
  }

  .case-story p, .case-story li { font-size: 14.5px; line-height: 1.65; }

  .case-story .section-head { text-align: left; margin-bottom: 22px; }
  .solution-top .section-head { text-align: left; margin-left: 0; }

  /* tab bar: bigger tap targets, fade hint that it scrolls */
  .case-sidebar { padding: 8px 16px; box-shadow: 0 4px 14px rgba(20, 40, 90, .06); }
  .case-tab { font-size: 12px; padding: 9px 12px; border-radius: 8px; }
  .case-tabs {
    -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
    mask-image: linear-gradient(90deg, #000 88%, transparent);
    scroll-snap-type: x proximity;
  }
  .case-tab { scroll-snap-align: start; }

  /* snapshot grid */
  .snapshot-item span { font-size: 12px; }
  .snapshot-item b { font-size: 13px; line-height: 1.4; }

  /* cards and panels */
  .results-panel { padding: 22px 20px; border-radius: 16px; }
  .case-feature-card { border-radius: 14px; }
  .why-grid .stack, .stack { gap: 8px; }

  /* buttons full width and easy to tap */
  .hero-actions .btn, .final-cta .btn { width: 100%; justify-content: center; min-height: 48px; }
}

/* ===== Stop sideways page scroll on mobile ===== */
html, body { max-width: 100%; overflow-x: clip; }   /* clip keeps position:sticky working */
.case-story, .case-study-layout, main { max-width: 100%; overflow-x: clip; }
.case-story img, .case-story video, .case-story iframe { max-width: 100%; height: auto; }
.case-story h1, .case-story h2, .case-story h3, .case-story p, .case-story li { overflow-wrap: anywhere; }
.case-story .container-fluid { padding-left: 0; padding-right: 0; }
@media(max-width:700px) {
  .case-story .section-soft { margin-left: 0; margin-right: 0; padding-left: 16px; padding-right: 16px; border-radius: 14px; }
}

/* ===== Tighter padding in soft sections (mobile) ===== */
@media(max-width:700px) {
  .case-study-layout { padding-left: 10px; padding-right: 10px; }
  .case-sidebar { margin-left: -10px; margin-right: -10px; padding-left: 10px; padding-right: 10px; }
  .case-story .section-soft { padding: 24px 12px; border-radius: 12px; }
  .case-story .section-soft .section-head { margin-bottom: 16px; }
  .case-story .section-soft .case-feature-card,
  .case-story .section-soft .process-step,
  .case-story .section-soft .why-grid > * { padding: 16px; }
  .case-story section { padding: 28px 0; }
  .process-grid { gap: 10px; }
}

/* ===== Mobile: section tabs move to a bottom bar so they never cover headings ===== */
@media(max-width:700px) {
  .case-sidebar {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    z-index: 999;
    border-top: 1px solid #e5ebf3;
    border-bottom: 0;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 -6px 18px rgba(20, 40, 90, .10);
  }
  .story-section { scroll-margin-top: 80px; }
  body.case-study-page { padding-bottom: 68px; }
}

/* ===== Mobile only: CTA band redesign ===== */
@media(max-width:700px) {
  .case-story .cta-band.case-cta-band {
    display: flex;
    flex-direction: column-reverse;   /* image on top, copy below */
    gap: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 18px;
    background: linear-gradient(160deg, #2c3cb9 0%, #1b2780 100%);
    box-shadow: 0 16px 34px rgba(27, 39, 128, .28);
  }
  .case-story .cta-band.case-cta-band .cta-image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 190px;
    margin: 0;
    object-fit: cover;
    object-position: center;
    border-radius: 0;
    opacity: .95;
  }
  .case-story .cta-band.case-cta-band .cta-copy {
    max-width: none;
    padding: 22px 20px 24px;
    text-align: center;
  }
  .case-story .cta-band.case-cta-band .cta-eyebrow {
    display: inline-block;
    margin-bottom: 12px;
    padding: 5px 12px;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 11px;
    letter-spacing: .4px;
  }
  .case-story .cta-band.case-cta-band h3 {
    max-width: none;
    margin: 0 0 18px;
    color: #fff;
    font-size: 22px;
    line-height: 1.3;
  }
  .case-story .cta-band.case-cta-band h3 span { color: #9fd0ff !important; }
  .case-story .cta-band.case-cta-band .btn-primary {
    width: 100%;
    min-height: 48px;
    background: #fff;
    color: #2c3cb9;
    border: 0;
    border-radius: 10px;
    font-weight: 700;
  }
}

/* ===== Desktop/tablet: CTA text never overlaps the image ===== */
@media(min-width:701px) {
  .case-story .cta-band.case-cta-band {
    display: flex;
    align-items: center;
    min-height: 280px;
    padding: 30px 0 30px 44px;
  }
  .case-story .cta-band.case-cta-band .cta-copy {
    position: relative;
    z-index: 2;
    flex: 0 0 48%;
    max-width: 48%;
    padding: 0;
    box-sizing: border-box;
  }
  .case-story .cta-band.case-cta-band h3 {
    max-width: 100%;
    font-size: clamp(24px, 2.6vw, 38px);
    overflow-wrap: normal;
    word-break: normal;
  }
  /* image lives in the right half only, fading softly into the card */
  .case-story .cta-band.case-cta-band .cta-image {
    position: absolute;
    inset: 0 0 0 auto;
    width: 52%;
    height: 100%;
    object-fit: cover;
    object-position: center right !important;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 22%);
    mask-image: linear-gradient(90deg, transparent 0, #000 22%);
  }
}

/* ===== Hover effects ===== */
.pill, .stack span, .stack p, .stack > *,
.snapshot-item, .case-feature-card, .arch-node, .challenge, .result-row,
.results-panel, .case-tab, .cta-band .btn, .btn {
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, background-color .25s ease, color .25s ease;
}

@media (hover: hover) {
  .pill:hover {
    transform: translateY(-3px);
    border-color: var(--logo_colour, #2c3cb9);
    background: var(--logo_colour, #2c3cb9);
    color: #fff;
    box-shadow: 0 10px 22px rgba(44, 60, 185, .22);
  }

  .stack span:hover, .stack p:hover {
    transform: translateY(-2px);
    background: #e3e9fb;
    color: var(--logo_colour, #2c3cb9);
  }

  .snapshot-item:hover { transform: translateY(-3px); }
  .snapshot-item:hover b { color: var(--logo_colour, #2c3cb9); }

  .case-feature-card { cursor: default; }
  .case-feature-card:hover {
    transform: translateY(-6px);
    border-color: #c4d0f5;
    box-shadow: 0 18px 38px rgba(44, 60, 185, .16);
  }
  .case-feature-card img { transition: transform .5s ease; }
  .case-feature-card:hover img { transform: scale(1.04); }
  .case-feature-card h3 { transition: color .25s ease; }
  .case-feature-card:hover h3 { color: var(--logo_colour, #2c3cb9); }

  .arch-node:hover {
    transform: translateY(-5px);
    border-color: var(--logo_colour, #2c3cb9);
    box-shadow: 0 14px 28px rgba(44, 60, 185, .15);
  }

  .challenge:hover { background: #f5f8ff; transform: translateX(4px); }
  .challenge:hover .challenge-icon { background: var(--logo_colour, #2c3cb9); color: #fff; }
  .challenge-icon { transition: background-color .25s ease, color .25s ease; }

  .result-row:hover { transform: translateX(4px); }
  .results-panel:hover { box-shadow: 0 16px 34px rgba(44, 60, 185, .14); }

  .case-tab:hover { border-color: #b9c8ee; background: #f3f6ff; }

  .hero-actions .btn:hover,
  .cta-band .btn:hover { transform: translateY(-2px); }
}
@media (hover: hover) {
  .case-feature-card b { transition: color .25s ease; }
  .case-feature-card:hover b { color: var(--logo_colour, #2c3cb9); }
}

/* Why Algosoft card: ignore the site-wide .why-card dark-gradient hover (it made text unreadable) */
.case-story .why-card,
.case-story .why-card:hover,
.case-story .why-card:active {
  display: block;
  background: #fff;
  border: 1px solid #e1e8f1;
  box-shadow: none;
  transform: none;
  min-height: 0;
}
.case-story .why-card:hover {
  border-color: #c4d0f5;
  box-shadow: 0 16px 34px rgba(44, 60, 185, .14);
  transform: translateY(-5px);
}
.case-story .why-card:hover h3,
.case-story .why-card:hover .brand,
.case-story .why-card:hover .brand span { color: inherit !important; }
.case-story .why-card:hover p { color: var(--algo-text, #53657d) !important; }
.case-story .why-card:hover .why-tags p { color: #53657d !important; }

/* case study hero heading (desktop only) */
@media (min-width: 992px) {
  main .hero h1 {
    font-size: 35px;
    font-weight: 600 !important;
  }
}

/* case study section headings (desktop only) */
@media (min-width: 992px) {
  .case-story .section-head h2,
  .case-story .challenge-intro h2 {
    font-size: 30px !important;
    line-height: 31px;
    font-weight: 600 !important;
    letter-spacing: -0.01em;
  }
}

/* CTA band heading: same size and weight as the hero heading (desktop) */
@media (min-width: 992px) {
  .case-story .cta-band.case-cta-band h3 {
    font-size: 35px !important;
    font-weight: 600 !important;
    line-height: 1.3;
  }
}
/* CTA heading: the coloured span follows the heading's size and weight */
.case-story .cta-band.case-cta-band h3 span {
  font-size: inherit !important;
  font-weight: inherit !important;
  line-height: inherit;
}

/* database case study pages: rounded hero photo */
.hero-inner > img.csd-hero-img {
  border-radius: 24px;
  box-shadow: 0 24px 50px rgba(28, 52, 140, .16);
  object-fit: cover;
}

/* mobile CTA band: keep the same light card and dark text as desktop
   (the base .cta-band background is !important, so the dark phone card never applied and its white text vanished) */
@media (max-width: 700px) {
  .case-story .cta-band.case-cta-band {
    border: 1px solid #d6e5fa;
    box-shadow: 0 16px 34px rgba(39, 92, 160, .12) !important;
  }
  .case-story .cta-band.case-cta-band .cta-eyebrow {
    background: #fff;
    border: 1px solid #cfdcf7;
    color: var(--logo_colour, #2c3cb9);
  }
  .case-story .cta-band.case-cta-band h3 { color: #101828 !important; }
  .case-story .cta-band.case-cta-band h3 span { color: var(--logo_colour, #2c3cb9) !important; }
  .case-story .cta-band.case-cta-band .btn-primary {
    background: #fff;
    color: var(--logo_colour, #2c3cb9);
    border: 1px solid var(--logo_colour, #2c3cb9);
  }
}
@media (max-width: 991px) {
  .hero-inner > img.csd-hero-img { width: auto; max-width: calc(100% - 20px); }
}

/* phones and tablets: heading weight 600 */
@media (max-width: 991px) {
  main .hero h1,
  .case-story .section-head h2,
  .case-story .challenge-intro h2,
  .case-story .cta-band.case-cta-band h3,
  .case-story .cta-band.case-cta-band h3 span {
    font-weight: 600 !important;
  }
}

/* phones: rounded image inside the bottom banner card */
@media (max-width: 700px) {
  .case-story .cta-band.case-cta-band .cta-image {
    border-radius: 16px;
  }
}

/* phones: hero heading size */
@media (max-width: 640px) {
  .hero h1 {
    font-size: 30px;
  }
}

/* phones: keep the section tab bar visible above the site's sticky "Consult Our Experts" bar
   (both were fixed to the bottom, so the tab bar was hidden behind it) */
@media (max-width: 700px) {
  .case-sidebar { bottom: 53px; }
  body.case-study-page { padding-bottom: 125px; }
  body.case-study-page .whatsapp-icon { bottom: 195px !important; }
  body.case-study-page #backToTop { bottom: 135px !important; }
}

/* phones: bottom banner button uses the same weight as desktop (500) */
@media (max-width: 700px) {
  .case-story .cta-band.case-cta-band .btn-primary { font-weight: 500; }
}

/* phones: smaller gap between the snapshot strip and the first section */
@media (max-width: 700px) {
  .snapshot { margin-bottom: 8px; }
  #case-study-content.section { padding-top: 0; }
  .case-study-layout { padding-top: 0; }
  .case-story > section:first-child { margin-top: 0; padding-top: 16px; }
}

/* phones: tighter spacing around the hero and snapshot strip, bottom banner button like the hero button */
@media (max-width: 700px) {
  .hero { padding-bottom: 20px; }
  .snapshot { margin-top: 12px; margin-bottom: 0; }
  .snapshot-grid { padding: 14px 0; }
  .case-story > section:first-child { padding-top: 8px; }
  .case-story .cta-band.case-cta-band .btn-primary {
    background: var(--logo_colour, #2c3cb9);
    color: #fff;
    border: 0;
  }
}
@media (max-width: 700px) {
  .hero { margin-bottom: 0; }
  .hero-inner { gap: 24px; }
}

/* phones: hero pills in two equal columns */
@media (max-width: 700px) {
  .hero .pills { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
  .hero .pills .pill { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 40px; }
}

/* phones: snapshot strip as a neat 2 x 2 grid of cards */
@media (max-width: 700px) {
  .snapshot-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px !important;
    padding: 14px 0 6px !important;
    border-bottom: 0 !important;
  }
  .snapshot-grid .snapshot-item,
  .snapshot-grid .snapshot-item:first-child,
  .snapshot-grid .snapshot-item:nth-child(2),
  .snapshot-grid .snapshot-item:nth-child(3),
  .snapshot-grid .snapshot-item:last-child {
    padding: 12px 14px !important;
    border: 1px solid #e1e8f7 !important;
    border-radius: 14px;
    background: none;
    box-shadow: none;
  }
  .snapshot-grid .snapshot-item small {
    margin-bottom: 4px;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--logo_colour, #2c3cb9);
  }
  .snapshot-grid .snapshot-item b {
    display: block;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.45;
    color: #16205b;
  }
}

/* all case study headings: weight 600 */
main .hero h1,
main .hero h1 span,
.case-story h2,
.case-story h2 span,
.case-story h3,
.case-story h3 span,
.case-story .cta-band.case-cta-band h3,
.case-story .cta-band.case-cta-band h3 span {
  font-weight: 600 !important;
}
