/* ============================================================
   service-categories.css
   Desktop 1440px: 3-column grid, 11 service cards (393×200)
   Mobile  370px:  single column, first 5 visible + "load more"
   ============================================================ */

/* ── Section ────────────────────────────────────────────────── */
.services {
  padding-top:    calc(40 / var(--vw-base) * 100vw);
  padding-bottom: calc(40 / var(--vw-base) * 100vw);
  background-color: var(--color-bg);
}

/* ── Container ───────────────────────────────────────────────── */
.services .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(30 / var(--vw-base) * 100vw);
}

/* ── Title ────────────────────────────────────────────────────── */
.services__title {
  width: 100%;
  font-size:   calc(35 / var(--vw-base) * 100vw);
  font-weight: 600;
  line-height: 1.14;
  color: var(--color-text);
}

/* ── Grid (3 columns desktop) ─────────────────────────────────── */
.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: calc(30 / var(--vw-base) * 100vw);
  width: 100%;
}

/* ── Card ──────────────────────────────────────────────────────── */
.services__card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: calc(200 / var(--vw-base) * 100vw);
  padding: calc(20 / var(--vw-base) * 100vw) calc(30 / var(--vw-base) * 100vw);
  border-radius: calc(20 / var(--vw-base) * 100vw);
  background-color: var(--color-white);
  overflow: hidden;
  transition: background-color 0.3s, box-shadow 0.3s;
}
.services__card:hover {
  background-color: var(--color-red);
  box-shadow: 0 4px 20px rgba(14, 13, 13, 0.08);
}

/* Accent card (first card, red background) */
.services__card.-accent {
  background-color: var(--color-red);
}

/* ── Card title ──────────────────────────────────────────────── */
.services__card-title {
  position: relative;
  z-index: 2;
  font-size:   calc(26 / var(--vw-base) * 100vw);
  font-weight: 600;
  line-height: 1.08;
  color: var(--color-text);
  transition: color 0.3s;
}
.services__card:hover .services__card-title,
.services__card.-accent .services__card-title {
  color: var(--color-white);
}

/* ── Card footer (price + button) ────────────────────────────── */
.services__card-footer {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: calc(15 / var(--vw-base) * 100vw);
}

.services__card-price {
  font-size:   calc(16 / var(--vw-base) * 100vw);
  font-weight: 500;
  line-height: 1.25;
  color: var(--color-text);
  transition: color 0.3s;
}
.services__card:hover .services__card-price,
.services__card.-accent .services__card-price {
  color: var(--color-white);
}

/* ── Card button ─────────────────────────────────────────────── */
.services__card-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  width:  calc(155 / var(--vw-base) * 100vw);
  height: calc(40  / var(--vw-base) * 100vw);
  border: 1px solid var(--color-red);
  border-radius: calc(10 / var(--vw-base) * 100vw);
  font-size:   calc(14 / var(--vw-base) * 100vw);
  font-weight: 500;
  line-height: 1.14;
  color: var(--color-red);
  background-color: transparent;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

/* Accent card + any card on hover: solid white button */
.services__card:hover .services__card-btn,
.services__card.-accent .services__card-btn {
  border-color: var(--color-white);
  color: var(--color-red);
  background-color: var(--color-white);
}
.services__card:hover .services__card-btn:hover,
.services__card.-accent .services__card-btn:hover {
  background-color: rgba(255, 255, 255, 0.85);
}

/* ── Card image ──────────────────────────────────────────────── */
.services__card-img {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 1;
  max-width: 60%;
  max-height: 100%;
  object-fit: contain;
  object-position: right bottom;
}

/* ── "Load more" button (mobile only, hidden on desktop) ──── */
.services__more {
  display: none;
}

/* ============================================================
   MOBILE  (max-width: 767px)
   ============================================================ */
@media (max-width: 767px) {
  .services {
    padding-top:    calc(15 / var(--vw-base) * 100vw);
    padding-bottom: calc(15 / var(--vw-base) * 100vw);
  }

  .services .container {
    gap: calc(20 / var(--vw-base) * 100vw);
  }

  .services__title {
    font-size:   calc(26 / var(--vw-base) * 100vw);
    line-height: 1.15;
  }

  .services__grid {
    grid-template-columns: 1fr;
    gap: calc(15 / var(--vw-base) * 100vw);
  }

  .services__card {
    height: calc(190 / var(--vw-base) * 100vw);
    padding: calc(15 / var(--vw-base) * 100vw) calc(20 / var(--vw-base) * 100vw);
    border-radius: calc(10 / var(--vw-base) * 100vw);
  }

  /* Hide cards 6-11 by default on mobile */
  .services__card:nth-child(n+6) {
    display: none;
  }
  .services__grid.-expanded .services__card:nth-child(n+6) {
    display: flex;
  }

  .services__card-title {
    font-size:   calc(22 / var(--vw-base) * 100vw);
    line-height: 1.09;
  }

  .services__card-btn {
    width:  calc(137 / var(--vw-base) * 100vw);
    height: calc(35  / var(--vw-base) * 100vw);
    border-radius: calc(5 / var(--vw-base) * 100vw);
  }

  .services__card-img {
    max-width: 55%;
  }

  /* Show "load more" button on mobile */
  .services__more {
    display: flex;
    align-items: center;
    justify-content: center;
    width:  calc(240 / var(--vw-base) * 100vw);
    height: calc(45  / var(--vw-base) * 100vw);
    border: 1px solid var(--color-red);
    border-radius: calc(10 / var(--vw-base) * 100vw);
    font-size:   calc(14 / var(--vw-base) * 100vw);
    font-weight: 500;
    line-height: 1.43;
    color: var(--color-red);
    background-color: transparent;
    transition: background-color 0.2s, color 0.2s;
  }
  .services__more:hover {
    background-color: var(--color-red);
    color: var(--color-white);
  }

  /* Hide "load more" when grid expanded */
  .services__grid.-expanded ~ .services__more {
    display: none;
  }
}
