/* Homepage services grid — standalone (no Bootstrap) */

.rx-home-services {
  --rx-svc-orange: #f16b27;
  --rx-svc-black: #0d0d0d;
  --rx-svc-gray: #f5f5f5;
  position: relative;
  width: 100%;
  padding: 88px 0 100px;
  background: var(--rx-svc-gray);
  overflow: hidden;
  box-sizing: border-box;
}

.rx-home-services *,
.rx-home-services *::before,
.rx-home-services *::after {
  box-sizing: border-box;
}

/* Diagonal abstract shapes */
.rx-home-services__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.rx-home-services__shape {
  position: absolute;
  display: block;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.04) 0%, rgba(0, 0, 0, 0.01) 100%);
  transform: skewY(-6deg);
}

.rx-home-services__shape--1 {
  top: -40px;
  left: -8%;
  width: 55%;
  height: 220px;
}

.rx-home-services__shape--2 {
  top: 38%;
  right: -12%;
  width: 48%;
  height: 180px;
  background: linear-gradient(135deg, rgba(241, 107, 39, 0.06) 0%, rgba(0, 0, 0, 0.02) 100%);
}

.rx-home-services__shape--3 {
  bottom: -30px;
  left: 10%;
  width: 70%;
  height: 160px;
}

.rx-home-services__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.rx-home-services__header {
  text-align: center;
  max-width: 1100px;
  margin: 0 auto 64px;
}

.rx-home-services__title {
  margin: 0 0 28px;
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(26px, 4.2vw, 52px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #111;
  text-shadow:
    1px 1px 0 #d4d4d4,
    2px 2px 0 #c8c8c8,
    3px 3px 0 #bcbcbc,
    4px 4px 0 #b0b0b0,
    5px 5px 0 #a4a4a4,
    6px 6px 0 #989898,
    7px 7px 0 #8c8c8c,
    8px 8px 0 rgba(0, 0, 0, 0.35);
}

.rx-home-services__lead {
  display: inline-block;
  margin: 0;
  padding: 14px 32px;
  font-family: inherit;
  font-size: clamp(14px, 1.6vw, 18px);
  font-weight: 600;
  line-height: 1.45;
  color: #fff;
  background: var(--rx-svc-orange);
  border-radius: 999px;
  max-width: 920px;
}

/* Grid */
.rx-home-services__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 72px 24px;
  align-items: start;
}

/* Card */
.rx-svc-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100%;
}

.rx-svc-card__top {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: -28px;
  z-index: 2;
}

/* Thin line connectors */
.rx-svc-card__line {
  position: absolute;
  bottom: 0;
  width: 2px;
  height: 32px;
  background: #111;
  z-index: 0;
}

.rx-svc-card__line--left {
  left: calc(50% - 52px);
}

.rx-svc-card__line--right {
  right: calc(50% - 52px);
}

.rx-svc-card__media {
  position: relative;
  z-index: 1;
  width: 78%;
  max-width: 200px;
  aspect-ratio: 10 / 7;
  background: #fff;
  border: 4px solid #111;
  border-radius: 14px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.rx-svc-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rx-svc-card__body {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 320px;
  padding: 48px 22px 28px;
  border-radius: 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.rx-svc-card--orange .rx-svc-card__body {
  background: var(--rx-svc-orange);
}

.rx-svc-card--black .rx-svc-card__body {
  background: var(--rx-svc-black);
}

.rx-svc-card__title {
  margin: 0 0 16px;
  font-family: inherit;
  font-size: clamp(17px, 1.5vw, 22px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  text-shadow:
    1px 1px 0 rgba(0, 0, 0, 0.25),
    2px 2px 0 rgba(0, 0, 0, 0.15);
}

.rx-svc-card__desc {
  margin: 0 0 24px;
  flex: 1;
  font-size: clamp(13px, 1.1vw, 15px);
  font-weight: 400;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.92);
}

/* Learn more button */
.rx-svc-card__btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding: 10px 22px 10px 10px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  background: transparent;
  border: 2px solid #fff;
  border-radius: 999px;
  transition: background 0.25s ease, color 0.25s ease;
}

.rx-svc-card__btn:hover {
  background: #fff;
  color: var(--rx-svc-black);
}

.rx-svc-card--orange .rx-svc-card__btn:hover {
  color: var(--rx-svc-orange);
}

.rx-svc-card__btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #fff;
  color: #111;
}

.rx-svc-card__btn:hover .rx-svc-card__btn-icon {
  background: var(--rx-svc-orange);
  color: #fff;
}

.rx-svc-card--orange .rx-svc-card__btn:hover .rx-svc-card__btn-icon {
  background: var(--rx-svc-black);
}

.rx-svc-card__btn-text {
  padding-right: 4px;
}

/* Tablet */
@media (max-width: 1199px) {
  .rx-home-services__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 64px 20px;
  }

  .rx-home-services {
    padding: 72px 0 80px;
  }

  .rx-home-services__header {
    margin-bottom: 48px;
  }
}

/* Mobile */
@media (max-width: 575px) {
  .rx-home-services__grid {
    grid-template-columns: 1fr;
    gap: 56px;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
  }

  .rx-home-services {
    padding: 56px 0 64px;
  }

  .rx-home-services__lead {
    padding: 12px 20px;
    border-radius: 20px;
  }

  .rx-svc-card__body {
    min-height: 300px;
    padding: 44px 20px 24px;
  }

  .rx-home-services__title {
    text-shadow:
      1px 1px 0 #d4d4d4,
      2px 2px 0 #c0c0c0,
      3px 3px 0 #acacac,
      4px 4px 0 rgba(0, 0, 0, 0.25);
  }
}
