/* ============================================================
   Divano - Service pages (2026 redesign)
   Editorial layout: intro split · numbered value points ·
   reversed band · other-services cards · shared by 4 pages
   ============================================================ */

.sv { color: #d6e0dc; }
.sv-wrap { max-width: 1200px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 48px); }

.sv-ey {
  display: inline-block;
  font-family: 'Dosis', sans-serif;
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.32em; text-transform: uppercase;
  color: #E4D3C0;
  margin-bottom: 14px;
}
.sv h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  font-size: clamp(1.9rem, 1.4rem + 2vw, 2.8rem);
  line-height: 1.15; letter-spacing: 0.02em;
  color: #f2ede4;
  margin: 0 0 22px;
}

/* ---------- 1 · INTRO SPLIT ---------- */
.sv-intro { padding: clamp(70px, 9vw, 120px) 0 clamp(50px, 6vw, 80px); }
.sv-intro__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(32px, 6vw, 90px);
  align-items: center;
}
.sv-lead { font-size: 18px; line-height: 1.9; color: #e8e2d5; }
.sv-intro__txt p { color: #b9c6c2; }
.sv-intro__img { position: relative; aspect-ratio: 4 / 3; }
/* deliberately NO overflow:hidden here - the ::after offset frame below is
   drawn OUTSIDE this box (negative right/bottom inset) and would be clipped.
   The photo still crops: object-fit:cover never spills past the <img> box. */
.sv-intro__img img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.sv-intro__img::after {
  content: "";
  position: absolute; inset: 18px -18px -18px 18px;
  border: 1px solid rgba(228, 211, 192, 0.22);
  z-index: -1;
}

/* ---------- 2 · VALUE POINTS ---------- */
.sv-points { padding: clamp(30px, 4vw, 50px) 0; }
.sv-points__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 36px);
  border-top: 1px solid rgba(228, 211, 192, 0.12);
  padding-top: clamp(34px, 4vw, 54px);
}
/* Smart Solutions lists six areas - two clean rows of three, not 4 + 2
   (phones keep the shared two-column override below) */
.sv-points__grid--six {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.sv-point .n {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 15px; letter-spacing: 0.2em;
  color: rgba(228, 211, 192, 0.55);
  display: block; margin-bottom: 12px;
}
.sv-point h3 {
  font-family: 'Dosis', sans-serif;
  font-size: 15px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: #f2ede4; margin: 0 0 10px;
}
.sv-point p { font-size: 14.5px; line-height: 1.8; color: #9fb0ac; margin: 0; }

/* ---------- 3 · REVERSED BAND ---------- */
.sv-band { padding: clamp(50px, 7vw, 100px) 0; }
.sv-band__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(32px, 6vw, 90px);
  align-items: center;
}
.sv-band__img { aspect-ratio: 4 / 3; overflow: hidden; }
.sv-band__img img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.sv-band__txt p { color: #b9c6c2; }
.sv-btn {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 26px; padding: 15px 32px;
  border: 1px solid #E4D3C0; color: #E4D3C0 !important;
  font-family: 'Dosis', sans-serif; font-weight: 600;
  font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase;
  text-decoration: none !important;
  position: relative; overflow: hidden; isolation: isolate;
  transition: color 0.4s, transform 0.4s;
}
.sv-btn::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: #E4D3C0;
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.45s cubic-bezier(.22, 1, .36, 1);
}
.sv-btn:hover { color: #001416 !important; transform: translateY(-2px); }
.sv-btn:hover::before { transform: scaleX(1); transform-origin: left; }

/* ---------- 4 · OTHER SERVICES ---------- */
.sv-others { padding: 0 0 clamp(80px, 10vw, 130px); }
.sv-others .sv-sh { text-align: center; margin-bottom: clamp(30px, 4vw, 48px); }
.sv-others__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.5vw, 28px);
}
.sv-card {
  position: relative; display: block; overflow: hidden;
  aspect-ratio: 4 / 3;
  text-decoration: none !important;
}
.sv-card img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.9s cubic-bezier(.22, 1, .36, 1);
}
.sv-card::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0, 20, 22, 0.92) 0%, rgba(0, 20, 22, 0.35) 55%, rgba(0, 20, 22, 0.15) 100%);
  transition: background 0.4s;
}
.sv-card:hover img { transform: scale(1.06); }
.sv-card .t {
  position: absolute; left: 22px; right: 22px; bottom: 46px; z-index: 2;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.6rem);
  font-weight: 500; line-height: 1.2; color: #f2ede4;
}
.sv-card .v {
  position: absolute; left: 22px; bottom: 20px; z-index: 2;
  font-family: 'Dosis', sans-serif; font-size: 12px; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: #E4D3C0;
  opacity: 0.75; transition: opacity 0.3s, transform 0.3s;
}
.sv-card:hover .v { opacity: 1; transform: translateX(4px); }

/* ---------- OVERVIEW GRID (services.html) ----------
   The theme lays these out as floated masonry columns with free
   heights - force one aligned grid: equal image ratio, buttons
   pinned to the same baseline. */
.services-masonry.service-grid {
  display: grid !important;
  /* six services: three across fills two rows, four left a ragged row of two */
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 34px);
  height: auto !important;
}
.services-masonry .item-service-grid-sizer { display: none; }
/* bootstrap's .row::before/::after clearfix becomes a phantom grid item
   occupying the first cell - remove it */
.services-masonry.service-grid::before,
.services-masonry.service-grid::after { display: none !important; content: none !important; }
.services-masonry .item {
  position: static !important;
  transform: none !important;
  float: none !important;
  width: auto !important;
  display: flex;
  flex-direction: column;
  margin: 0 !important;
  padding: 0 !important;
}
.services-masonry .item h3 {
  font-size: 17px;
  line-height: 1.35;
  min-height: 2.7em; /* room for two-line titles so images align */
  margin: 0 0 10px;
}
/* reserve a fixed block for the blurb (≈3 lines) so a shorter one doesn't
   open a ragged gap before the image - keeps titles, text, images and buttons
   aligned across all four cards regardless of column width */
.services-masonry .item .service-excerpt { flex: 0 0 auto; min-height: 84px; }
.services-masonry .item .service-excerpt p { font-size: 14.5px; line-height: 1.8; }
.services-masonry .item .spacer-single,
.services-masonry .item .spacer-single-10 { display: none; }
.services-masonry .item > a img,
.services-masonry .item a img.wp-post-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  margin: 14px 0 18px;
}
.services-masonry .item .btn-line.btn-fullwidth { margin-top: auto; }

@media (max-width: 991px) {
  .services-masonry.service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .services-masonry .item h3 { min-height: 0; }
}
@media (max-width: 600px) {
  /* phone: horizontal swipe rail (like the Projects page), not a tall stack */
  .services-masonry.service-grid {
    display: flex !important;
    grid-template-columns: none;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 14px;
    padding-bottom: 12px;
  }
  .services-masonry.service-grid::-webkit-scrollbar { display: none; }
  .services-masonry .item {
    flex: 0 0 80% !important;
    width: 80% !important;
    max-width: 80%;
    scroll-snap-align: center;
  }
}

/* ---------- responsive ---------- */
@media (max-width: 991px) {
  .sv-intro__grid, .sv-band__grid { grid-template-columns: 1fr; }
  .sv-band__grid .sv-band__img { order: -1; }
  .sv-points__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sv-intro__img::after { display: none; }
  /* was `height:auto; max-height:480px` - that re-imposed the source photo's
     own ratio on tablets/phones. Keep the 4/3 frame at every width. */
  .sv-intro__img img, .sv-band__img img { height: 100%; max-height: none; }
}
@media (max-width: 600px) {
  /* Other Services: swipe rail instead of a tall full-width stack */
  .sv-others__grid {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: min(80%, 300px);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 10px;
  }
  .sv-others__grid::-webkit-scrollbar { display: none; }
  .sv-card { scroll-snap-align: center; }
  /* narrow phones: the feature points go ONE up. Two columns on a 375px
     screen leave each cell ~150px, which breaks headings mid-phrase and
     shatters a one-line sentence into three ragged lines - noticeable in
     English, unreadable in Arabic. The 601-991px range stays two-up. */
  .sv-points__grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }
}

/* ---- Before / After pair (static, used in the fit-out band) ----
   Reuses the .sv-band__img frame (4/3, overflow hidden). Two portrait
   photos sit side by side, each with a corner label chip. */
.sv-ba2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.sv-ba2 .sv-ba2__cell {
  position: relative;
  margin: 0;
  height: 100%;
  overflow: hidden;
}
.sv-ba2 .sv-ba2__cell figcaption {
  position: absolute;
  left: 10px; bottom: 10px;
  padding: 5px 13px;
  font-family: 'Dosis', 'Segoe UI', Tahoma, Arial, sans-serif;
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  background: #E4D3C0; color: #0f1c1a;
}
.sv-ba2 .sv-ba2__cell--before figcaption {
  background: rgba(15, 28, 26, 0.82);
  color: #E4D3C0;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
[dir="rtl"] .sv-ba2 .sv-ba2__cell figcaption { left: auto; right: 10px; }

/* the merged Flooring & Smart Solutions page carries its two photographs in
   the two bands, so its intro runs as a single full-width column */
.sv-intro--wide .sv-intro__grid { grid-template-columns: 1fr; }
.sv-intro--wide .sv-intro__txt { max-width: 900px; }
