/* Coastals v16 interface carousel clone for the seven case studies. */
body.v16-case-study #caseStudy .portfolio-proof .showcase-carousel,
body.v16-case-study #caseStudy .showcase-carousel{
  position:relative;
  width:100%;
  margin-top:46px;
}

body.v16-case-study #caseStudy .showcase-carousel__viewport{
  width:100%;
  overflow-x:auto;
  overflow-y:hidden;
  padding:10px 0 30px;
  scroll-behavior:smooth;
  scroll-snap-type:x mandatory;
  scrollbar-width:none;
  -ms-overflow-style:none;
  cursor:grab;
  touch-action:pan-x;
  overscroll-behavior-x:contain;
}
body.v16-case-study #caseStudy .showcase-carousel__viewport::-webkit-scrollbar{display:none}
body.v16-case-study #caseStudy .showcase-carousel__viewport.is-dragging{cursor:grabbing;scroll-behavior:auto}

body.v16-case-study #caseStudy .showcase-carousel__track{
  display:flex !important;
  align-items:stretch;
  gap:24px !important;
  width:max-content !important;
  min-height:0 !important;
  height:auto !important;
  position:relative !important;
  transform:none !important;
  transition:none !important;
}

body.v16-case-study #caseStudy .showcase-carousel__slide,
body.v16-case-study #caseStudy .showcase-carousel__slide.is-active,
body.v16-case-study #caseStudy .showcase-carousel__slide.is-next,
body.v16-case-study #caseStudy .showcase-carousel__slide.is-prev{
  position:relative !important;
  inset:auto !important;
  flex:0 0 calc((100% - 48px) / 3) !important;
  width:calc((100% - 48px) / 3) !important;
  min-width:calc((100% - 48px) / 3) !important;
  min-height:720px !important;
  height:auto !important;
  margin:0 !important;
  padding:30px 20px 28px !important;
  display:flex !important;
  flex-direction:column !important;
  align-items:stretch !important;
  justify-content:flex-start !important;
  gap:20px !important;
  background:#fff !important;
  border:1px solid rgba(17,20,28,.08) !important;
  border-radius:24px !important;
  box-shadow:0 12px 34px rgba(11,13,20,.045), inset 0 1px 0 rgba(255,255,255,.92) !important;
  opacity:1 !important;
  visibility:visible !important;
  pointer-events:auto !important;
  transform:none !important;
  filter:none !important;
  transition:box-shadow .25s ease !important;
  scroll-snap-align:start;
}
body.v16-case-study #caseStudy .showcase-carousel__slide:hover{
  box-shadow:0 18px 42px rgba(11,13,20,.075), inset 0 1px 0 rgba(255,255,255,.96) !important;
}

body.v16-case-study #caseStudy .showcase-carousel__media{
  width:100%;
  height:470px;
  min-height:470px;
  display:flex;
  align-items:flex-start;
  justify-content:center;
  position:relative;
  padding:0 !important;
  overflow:visible;
}

/* Phone mockup */
body.v16-case-study #caseStudy .v16-screen-frame.v16-phone{
  width:min(250px,82%);
  max-width:250px;
  margin:0 auto;
  padding:7px;
  border-radius:34px;
  background:#171a21;
  border:1px solid rgba(17,20,28,.12);
  box-shadow:0 20px 42px rgba(11,13,20,.15);
  box-sizing:border-box;
}
body.v16-case-study #caseStudy .v16-screen-frame.v16-phone::before{
  content:"";
  position:absolute;
  z-index:4;
  top:12px;
  left:50%;
  width:58px;
  height:6px;
  transform:translateX(-50%);
  border-radius:10px;
  background:#0d0f13;
}
body.v16-case-study #caseStudy .v16-screen-frame.v16-phone img{
  display:block;
  width:100%;
  height:auto;
  max-height:455px;
  object-fit:contain;
  border-radius:27px;
  background:#fff;
}

/* MacBook / desktop mockup */
body.v16-case-study #caseStudy .v16-screen-frame.v16-laptop{
  position:relative;
  width:100%;
  max-width:355px;
  margin:18px auto 0;
  padding:12px 12px 20px;
  border:8px solid #171a21;
  border-bottom-width:18px;
  border-radius:13px;
  background:#171a21;
  box-shadow:0 20px 42px rgba(11,13,20,.15);
  box-sizing:border-box;
}
body.v16-case-study #caseStudy .v16-screen-frame.v16-laptop::before{
  content:"";
  position:absolute;
  z-index:4;
  top:-5px;
  left:50%;
  width:5px;
  height:5px;
  transform:translateX(-50%);
  border-radius:50%;
  background:#4d5158;
}
body.v16-case-study #caseStudy .v16-screen-frame.v16-laptop::after{
  content:"";
  position:absolute;
  z-index:1;
  left:-9%;
  right:-9%;
  bottom:-31px;
  height:15px;
  border-radius:0 0 12px 12px;
  background:#252832;
  box-shadow:0 10px 20px rgba(11,13,20,.12);
}
body.v16-case-study #caseStudy .v16-screen-frame.v16-laptop img{
  display:block;
  position:relative;
  z-index:2;
  width:100%;
  max-width:none;
  max-height:430px;
  object-fit:contain;
  background:#fff;
}

body.v16-case-study #caseStudy .v16-screen-frame.v16-raw{
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
}
body.v16-case-study #caseStudy .v16-screen-frame.v16-raw img{
  max-width:100%;
  max-height:430px;
  object-fit:contain;
}

/* Replace missing screens with a clean editable mockup card. */
body.v16-case-study #caseStudy .showcase-carousel__placeholder{
  width:min(355px,100%);
  height:430px;
  min-height:430px;
  margin:18px auto 0;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:34px;
  border:8px solid #171a21;
  border-radius:14px;
  background:linear-gradient(145deg,#f4f3ef,#e7e6e1);
  color:#737986;
  box-shadow:0 20px 42px rgba(11,13,20,.12);
  box-sizing:border-box;
}
body.v16-case-study #caseStudy .showcase-carousel__slide[data-screen-type="phone"] .showcase-carousel__placeholder{
  width:min(250px,82%);
  height:455px;
  min-height:455px;
  margin:0 auto;
  border-width:8px;
  border-radius:34px;
  background:#f4f4f1;
}
body.v16-case-study #caseStudy .showcase-carousel__placeholder::before{
  content:"";
  width:64px;
  height:6px;
  margin-bottom:28px;
  border-radius:8px;
  background:#171a21;
}
body.v16-case-study #caseStudy .showcase-carousel__placeholder span:last-child{
  font:600 13px/1.4 "Instrument Sans",sans-serif;
  letter-spacing:0;
  text-transform:none;
  color:#171a21;
}
body.v16-case-study #caseStudy .showcase-carousel__placeholder span:first-child{display:none}

/* Caption: name + short description, aligned exactly like Coastals. */
body.v16-case-study #caseStudy .showcase-carousel__caption{
  width:100%;
  margin-top:auto;
  padding:0 4px !important;
  color:#687080;
  font:400 13px/1.6 "Manrope",sans-serif;
  text-align:left;
}
body.v16-case-study #caseStudy .showcase-carousel__caption strong{
  display:block;
  margin:0 0 8px;
  color:#171a21;
  font:600 21px/1.16 "Instrument Sans",sans-serif;
  letter-spacing:-.25px;
}
body.v16-case-study #caseStudy .showcase-carousel__caption span{
  display:block;
  color:#687080;
  font:400 13px/1.6 "Manrope",sans-serif;
}

/* Coastals controls sit beside the heading, not over the screenshots. */
body.v16-case-study #caseStudy .showcase-carousel__controls{
  position:absolute;
  z-index:30;
  top:-98px;
  right:0;
  left:auto;
  width:auto;
  height:auto;
  display:flex;
  align-items:center;
  gap:10px;
  pointer-events:auto;
  margin:0;
}
body.v16-case-study #caseStudy .showcase-carousel__buttons{
  position:static;
  inset:auto;
  display:flex;
  gap:8px;
  align-items:center;
  pointer-events:auto;
}
body.v16-case-study #caseStudy .showcase-carousel__button{
  width:50px;
  height:50px;
  padding:0;
  border-radius:50%;
  border:1px solid rgba(17,20,28,.10);
  background:rgba(255,255,255,.88);
  color:#171a21;
  box-shadow:0 8px 22px rgba(11,13,20,.06);
  display:grid;
  place-items:center;
  font-size:20px;
  line-height:1;
  cursor:pointer;
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
}
body.v16-case-study #caseStudy .showcase-carousel__button:hover{background:#fff;transform:translateY(-1px)}
body.v16-case-study #caseStudy .showcase-carousel__button:disabled{opacity:.34;cursor:not-allowed;transform:none}
body.v16-case-study #caseStudy .showcase-carousel__counter{
  display:none;
}
body.v16-case-study #caseStudy .showcase-carousel__dots{display:none}

/* Keep section titles at the left edge of the content grid. */
body.v16-case-study #caseStudy .portfolio-proof .shellContainer{
  width:min(100%,var(--v16-max));
  margin:0 auto;
}
body.v16-case-study #caseStudy .portfolio-proof .sectionNumber{
  text-align:left;
}
body.v16-case-study #caseStudy .portfolio-proof .sectionTitle,
body.v16-case-study #caseStudy .portfolio-proof .sectionLead{
  margin-left:0;
  text-align:left;
}

@media(max-width:900px){
  body.v16-case-study #caseStudy .showcase-carousel__slide,
  body.v16-case-study #caseStudy .showcase-carousel__slide.is-active,
  body.v16-case-study #caseStudy .showcase-carousel__slide.is-next,
  body.v16-case-study #caseStudy .showcase-carousel__slide.is-prev{
    flex-basis:calc((100% - 24px) / 2) !important;
    width:calc((100% - 24px) / 2) !important;
    min-width:calc((100% - 24px) / 2) !important;
  }
  body.v16-case-study #caseStudy .showcase-carousel__controls{top:-90px}
  body.v16-case-study #caseStudy .showcase-carousel__media{height:440px;min-height:440px}
}

@media(max-width:760px){
  body.v16-case-study #caseStudy .showcase-carousel{margin-top:36px}
  body.v16-case-study #caseStudy .showcase-carousel__viewport{padding-bottom:22px}
  body.v16-case-study #caseStudy .showcase-carousel__track{gap:14px !important}
  body.v16-case-study #caseStudy .showcase-carousel__slide,
  body.v16-case-study #caseStudy .showcase-carousel__slide.is-active,
  body.v16-case-study #caseStudy .showcase-carousel__slide.is-next,
  body.v16-case-study #caseStudy .showcase-carousel__slide.is-prev{
    flex-basis:100% !important;
    width:100% !important;
    min-width:100% !important;
    min-height:0 !important;
    padding:28px 18px 26px !important;
  }
  body.v16-case-study #caseStudy .showcase-carousel__media{height:480px;min-height:480px}
  body.v16-case-study #caseStudy .showcase-carousel__caption strong{font-size:22px}
  body.v16-case-study #caseStudy .showcase-carousel__controls{top:-78px}
  body.v16-case-study #caseStudy .showcase-carousel__button{width:44px;height:44px}
  body.v16-case-study #caseStudy .v16-screen-frame.v16-laptop{max-width:100%;margin-top:10px}
}
