/* Realify — Service feature sections (Savings / Income overview) */

.rsvc {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  background: var(--rsvc-bg, #262517);
  color: var(--rsvc-heading, #ffffff);
}
/* faint fabric/noise texture over the base colour */
.rsvc::before {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
  opacity: .09;
  mix-blend-mode: overlay;
  pointer-events: none;
}
.rsvc__inner {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1.12fr;
  gap: 44px;
  align-items: center;
  max-width: 1260px;
  margin: 0 auto;
  padding: 52px 56px;
}
.rsvc__title {
  margin: 0;
  font-family: var(--realify-font-heading, Archivo), sans-serif;
  font-weight: 800; line-height: 1.05;
  font-size: clamp(28px, 3.3vw, 44px);
  letter-spacing: -.01em;
  color: var(--rsvc-heading, #fff);
}
.rsvc__text {
  margin: 18px 0 0; max-width: 42ch;
  font-size: 18px; line-height: 1.55;
  color: var(--rsvc-text, rgba(255,255,255,.86));
}
.rsvc__media { position: relative; min-height: 430px; }
.rsvc__img {
  position: absolute; top: 0; height: 100%;
  object-fit: cover; border-radius: 18px; display: block;
}

/* shared cards */
.rsvc-card {
  position: absolute;
  background: #fff; border-radius: 18px;
  box-shadow: 0 20px 44px -20px rgba(0,0,0,.5);
  padding: 18px 22px; z-index: 3;
}
.rsvc-card__label { margin: 0 0 6px; font-size: 15px; font-weight: 600; color: var(--rsvc-cardlabel, #5b6b52); }
.rsvc-card__value { margin: 0; font-weight: 800; line-height: 1; letter-spacing: -.01em; font-size: clamp(24px, 2.5vw, 36px); color: var(--rsvc-amount, #14532d); }

/* ---------- Savings variant ---------- */
.rsvc--savings .rsvc__img { left: 0; width: 80%; }
.rsvc--savings .rsvc-card--income  { top: 4%;    right: 0; width: 52%; }
.rsvc--savings .rsvc-card--savings { bottom: 4%; right: 0; width: 52%; }
.rsvc-arrow {
  position: absolute; top: 42%; right: 50%;
  width: 62px; height: 62px; border-radius: 50%;
  background: var(--rsvc-badge, #c7e070);
  display: flex; align-items: center; justify-content: center;
  z-index: 4; box-shadow: 0 12px 26px -10px rgba(0,0,0,.45);
}
.rsvc-arrow svg { width: 24px; height: 24px; color: #16341f; }
.rsvc-connector { position: absolute; right: 51.5%; top: 17%; height: 45%; border-left: 2px solid var(--rsvc-badge, #c7e070); z-index: 2; pointer-events: none; }
.rsvc-connector::after { content: ""; position: absolute; left: -1px; bottom: 0; width: 62px; border-top: 2px solid var(--rsvc-badge, #c7e070); }
.rsvc-connector::before { content: ""; position: absolute; left: 58px; bottom: -4px; width: 0; height: 0; border-left: 8px solid var(--rsvc-badge, #c7e070); border-top: 5px solid transparent; border-bottom: 5px solid transparent; }

/* ---------- Income variant ---------- */
.rsvc--income .rsvc__img { right: 0; width: 76%; }
.rsvc--income .rsvc-check { top: 2%; left: 0; width: 60%; }
.rsvc--income .rsvc-check__head { margin: 0; font-size: 14px; font-weight: 600; color: var(--rsvc-cardlabel, #5b6b52); line-height: 1.3; }
.rsvc--income .rsvc-check__head b { display: block; color: #16341f; font-size: 15px; }
.rsvc--income .rsvc-check__row { display: flex; align-items: center; gap: 12px; margin: 8px 0 14px; }
.rsvc--income .rsvc-check__amt { margin: 0; font-weight: 800; font-size: clamp(24px, 2.6vw, 34px); color: var(--rsvc-amount, #14532d); letter-spacing: -.01em; }
.rsvc-pill { display: inline-flex; align-items: center; padding: 5px 12px; border-radius: 999px; font-size: 14px; font-weight: 700; background: var(--rsvc-pill-bg, #d9f2e3); color: var(--rsvc-pill-text, #14532d); white-space: nowrap; }
.rsvc--income .rsvc-check__acct { display: flex; justify-content: space-between; border-top: 1px solid #eceae2; padding-top: 12px; font-size: 14.5px; }
.rsvc--income .rsvc-check__acct span:first-child { color: #16341f; font-weight: 600; }
.rsvc--income .rsvc-check__acct span:last-child { color: #7a8574; letter-spacing: 1px; }
.rsvc--income .rsvc-tx {
  position: absolute; left: 0; width: 54%;
  background: #fff; border-radius: 16px; padding: 12px 16px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: 0 18px 40px -20px rgba(0,0,0,.5); z-index: 3;
}
.rsvc--income .rsvc-tx--1 { top: 58%; }
.rsvc--income .rsvc-tx--2 { top: 82%; }
.rsvc-tx__ic { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%; background: #f1efe6; display: flex; align-items: center; justify-content: center; }
.rsvc-tx__ic svg { width: 16px; height: 16px; color: #16341f; }
.rsvc-tx__name { margin: 0; font-size: 15px; font-weight: 700; color: #16341f; line-height: 1.2; }
.rsvc-tx__type { margin: 0; font-size: 13px; color: #8a927e; }
.rsvc-tx__amt { margin-left: auto; font-weight: 800; font-size: 15px; color: var(--rsvc-amount, #14532d); white-space: nowrap; }

/* ---------- Responsive: stack the visual cleanly on tablet/phone ---------- */
@media (max-width: 900px) {
  .rsvc__inner { grid-template-columns: 1fr; gap: 26px; padding: 34px 22px; }

  /* Turn the overlapping float layout into an evenly-spaced vertical stack.
     !important is required so this wins over the per-element position controls,
     whose generated CSS is more specific. */
  .rsvc__media { min-height: 0 !important; display: flex; flex-direction: column; align-items: center; gap: 16px; }
  .rsvc__img {
    position: static !important; inset: auto !important;
    width: 100% !important; height: 220px !important;
    border-radius: 20px !important;
  }
  .rsvc-card, .rsvc-arrow, .rsvc-tx {
    position: static !important; inset: auto !important;
    top: auto !important; right: auto !important; bottom: auto !important; left: auto !important;
    transform: none !important;
    width: 100% !important; max-width: 440px;
  }
  .rsvc-card { border-radius: 20px; }
  .rsvc-arrow { width: 56px !important; height: 56px !important; margin: -2px auto !important; }
  .rsvc-connector { display: none !important; }

  /* Savings: image → Income → arrow → Savings */
  .rsvc--savings .rsvc__img { order: 0; }
  .rsvc--savings .rsvc-card--income { order: 1; }
  .rsvc--savings .rsvc-arrow { order: 2; }
  .rsvc--savings .rsvc-card--savings { order: 3; }

  /* Income: image → Checking → transactions (full width, nothing clipped) */
  .rsvc--income .rsvc__img { order: 0; }
  .rsvc--income .rsvc-check { order: 1; }
  .rsvc--income .rsvc-tx { order: 2; }
  .rsvc--income .rsvc-tx__name { white-space: normal; }
  .rsvc--income .rsvc-tx__type { white-space: normal; }
}
@media (max-width: 480px) {
  .rsvc__img { height: 190px !important; }
  .rsvc-card__value, .rsvc--income .rsvc-check__amt { font-size: 26px; }
}
