/*
 * Bella Interior Design — Homepage services collection stack v11
 * Four complete services per desktop card, full container width, lightweight sticky overlap.
 * Visible content remains database-driven from core_pages.content_json.services_overview.
 */

.bella-services {
  --bella-white: #FFFFFF;
  --bella-mist: #F4F5F5;
  --bella-charcoal: #191919;
  --bella-graphite: #5F6362;
  --bella-sage: #718078;
  --bella-deep-sage: #46534D;
  --bella-silver: #D9DDDB;
  --bella-black: #111312;
  --bella-sticky-top: 92px;
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding: clamp(88px, 9vw, 142px) 0 clamp(110px, 12vw, 180px);
  background: var(--bella-mist);
  color: var(--bella-charcoal);
}

.bella-services::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: var(--bella-silver);
}

.bella-services__intro {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(340px, .72fr);
  gap: clamp(54px, 8vw, 128px);
  align-items: end;
  padding-bottom: clamp(62px, 7vw, 104px);
}

.bella-services__heading,
.bella-services__intro-copy {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .65s cubic-bezier(.2,.72,.2,1), transform .65s cubic-bezier(.2,.72,.2,1);
}

.bella-services__heading.is-visible,
.bella-services__intro-copy.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.bella-services__eyebrow {
  margin: 0 0 18px;
  color: var(--bella-deep-sage);
  font-family: "Parisienne", cursive;
  font-size: 28px;
  font-weight: 400;
  line-height: 1.15;
}

.bella-services .bella-services__heading > h2 {
  max-width: 760px;
  margin: 0;
  color: var(--bella-charcoal);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 40px !important;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.025em;
  text-wrap: balance;
}

.bella-services__intro-copy > p {
  margin: 0;
  color: var(--bella-graphite);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.72;
}

.bella-services__supporting {
  margin-top: 15px !important;
  color: var(--bella-charcoal) !important;
}

.bella-services__intro-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  margin-top: 28px;
  padding-top: 19px;
  border-top: 1px solid var(--bella-silver);
  color: var(--bella-graphite);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
}

.bella-services__intro-meta strong {
  margin-right: 4px;
  color: var(--bella-deep-sage);
  font-size: 20px;
  font-weight: 600;
}

.bella-services__intro-meta a {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin-left: auto;
  color: var(--bella-charcoal);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.bella-services__intro-meta a svg {
  width: 26px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.4;
  transition: transform .25s ease;
}

.bella-services__intro-meta a:hover svg { transform: translateX(4px); }

/* Full width inside the exact same .container-wide wrapper as the section intro. */
.bella-services__deck {
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0;
  padding-top: 2px;
}

.bella-services__progress {
  position: sticky;
  top: 20px;
  z-index: 100;
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  margin: 0 0 14px;
  padding: 8px 11px;
  border: 1px solid var(--bella-silver);
  background: rgba(244,245,245,.96);
  color: var(--bella-graphite);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .02em;
}

.bella-services__progress-label {
  margin-right: 5px;
  text-transform: uppercase;
  letter-spacing: .1em;
}

.bella-services__progress-current {
  min-width: 20px;
  color: var(--bella-deep-sage);
  font-size: 15px;
  font-weight: 600;
}

/*
 * The stack now uses a compact four-across card on desktop. The whole card fits
 * inside a normal desktop viewport, so the next sticky card never covers services 3/4.
 */
.bella-services__card {
  position: sticky;
  top: calc(var(--bella-sticky-top) + var(--stack-offset, 0px));
  z-index: var(--service-z, 20);
  width: 100%;
  margin: 0 0 clamp(64px, 8vh, 96px);
}

.bella-services__card-inner {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--bella-silver);
  border-radius: 14px;
  background: var(--bella-white);
  box-shadow: 0 16px 44px rgba(17,19,18,.05);
  transition: border-color .25s ease, box-shadow .25s ease;
}

.bella-services__card.is-active .bella-services__card-inner {
  border-color: rgba(113,128,120,.62);
  box-shadow: 0 20px 50px rgba(17,19,18,.07);
}

.bella-services__card-head {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 16px clamp(20px, 2vw, 30px);
  border-bottom: 1px solid var(--bella-silver);
  background: var(--bella-white);
}

.bella-services__range {
  display: flex;
  align-items: baseline;
  gap: 11px;
  white-space: nowrap;
  font-family: "Plus Jakarta Sans", sans-serif;
}

.bella-services__range span {
  color: var(--bella-graphite);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.bella-services__range strong {
  color: var(--bella-deep-sage);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -.02em;
}

.bella-services__card-head p {
  max-width: 620px;
  margin: 0;
  color: var(--bella-graphite);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  text-align: right;
}

/* Four services in one row = all four details visible before the next overlap. */
.bella-services__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: 1px;
  background: var(--bella-silver);
}

.bella-services__service {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--bella-white);
}

.bella-services__service-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #e9ebea;
  contain: paint;
}

.bella-services__service-media > a {
  display: block;
  width: 100%;
  height: 100%;
}

.bella-services__service-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(.78) contrast(.98) brightness(.98);
  transition: transform .5s cubic-bezier(.2,.72,.2,1), filter .3s ease;
}

.bella-services__service-media-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #eef0ef, #dde1df);
}

.bella-services__service-number {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: inline-flex;
  min-width: 32px;
  min-height: 29px;
  align-items: center;
  justify-content: center;
  padding: 4px 7px;
  border: 1px solid rgba(255,255,255,.64);
  background: rgba(17,19,18,.64);
  color: #fff;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
}

.bella-services__service-copy {
  flex: 1;
  min-height: 164px;
  padding: clamp(18px, 1.7vw, 25px) clamp(17px, 1.6vw, 24px) clamp(20px, 1.8vw, 27px);
}

.bella-services .bella-services__service-copy h3 {
  margin: 0;
  color: var(--bella-charcoal);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 30px !important;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.02em;
  text-wrap: balance;
}

.bella-services__service-copy h3 a {
  color: inherit;
  text-decoration: none;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.bella-services__service-copy h3 a:hover,
.bella-services__service-copy h3 a:focus-visible {
  color: var(--bella-deep-sage);
  text-decoration: underline;
}

.bella-services__service-copy p {
  margin: 10px 0 0;
  color: var(--bella-graphite);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.58;
}

.bella-services__service-copy h3 a:focus-visible,
.bella-services__intro-meta a:focus-visible {
  outline: 2px solid var(--bella-sage);
  outline-offset: 4px;
}

@media (hover: hover) and (pointer: fine) {
  .bella-services__service:hover .bella-services__service-media img {
    transform: scale(1.022);
    filter: saturate(.86) contrast(1) brightness(1);
  }
}

/* Never let browser content-visibility hide the lower portion of a sticky card. */
.bella-services__service {
  content-visibility: visible;
}

/* Large-but-narrow desktops: use 2x2 and normal flow so every service remains visible. */
@media (max-width: 1180px) {
  .bella-services__intro {
    grid-template-columns: 1fr 1fr;
    gap: 42px;
  }

  .bella-services__eyebrow { font-size: 26px; }
  .bella-services .bella-services__heading > h2 { font-size: 36px !important; }

  .bella-services__card,
  .bella-services__progress {
    position: relative;
    top: auto;
  }

  .bella-services__card { margin-bottom: 30px; }
  .bella-services__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bella-services .bella-services__service-copy h3 { font-size: 28px !important; }
  .bella-services__service-copy { min-height: 170px; }
}

/* Even on wide screens, do not use sticky mode when vertical space is too short. */
@media (min-width: 1181px) and (max-height: 680px) {
  .bella-services__card,
  .bella-services__progress {
    position: relative;
    top: auto;
  }

  .bella-services__card { margin-bottom: 30px; }
}

@media (max-width: 760px) {
  .bella-services {
    padding: 74px 0 94px;
  }

  .bella-services__intro {
    grid-template-columns: 1fr;
    gap: 26px;
    padding-bottom: 48px;
  }

  .bella-services__eyebrow {
    margin-bottom: 14px;
    font-size: 24px;
  }

  .bella-services .bella-services__heading > h2 {
    font-size: 30px !important;
    line-height: 1.18;
  }

  .bella-services__intro-copy > p {
    font-size: 16px;
    line-height: 1.68;
  }

  .bella-services__intro-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .bella-services__intro-meta a {
    margin-left: 0;
    margin-top: 4px;
  }

  .bella-services__progress { margin-bottom: 14px; }
  .bella-services__card { margin-bottom: 22px; }

  .bella-services__card-inner {
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(17,19,18,.045);
  }

  .bella-services__card-head {
    min-height: 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 16px 18px;
  }

  .bella-services__card-head p {
    max-width: none;
    font-size: 13px;
    text-align: left;
  }

  .bella-services__grid { grid-template-columns: 1fr; }
  .bella-services__service-media { aspect-ratio: 16 / 9; }

  .bella-services__service-copy {
    min-height: 0;
    padding: 22px 18px 25px;
  }

  .bella-services .bella-services__service-copy h3 {
    font-size: 24px !important;
    line-height: 1.24;
  }

  .bella-services__service-copy p {
    font-size: 15px;
    line-height: 1.62;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bella-services__heading,
  .bella-services__intro-copy,
  .bella-services__service-media img,
  .bella-services__intro-meta a svg {
    transition: none !important;
    transform: none !important;
  }

  .bella-services__heading,
  .bella-services__intro-copy {
    opacity: 1 !important;
  }
}
