/* ============================================================
   Truly Permanent Beauty - services / treatments grid.
   services.php se load hoti hai (25 pages par shared).
   Grid ke saare box exactly same size ke hain - align-items: stretch
   aur card par height:100%, plus title/desc ke liye fixed min-height.
   ============================================================ */

.tpb-serv {
  padding: 66px 0 70px;
  background: linear-gradient(180deg, #fdf8f9 0%, #fbeff2 100%);
}

/* Heading site ke apne .section_heading (h3 + h2 + p) se aati hai -
   font-family, size, colour sab wahi rehte hain. Yahan sirf neeche ki
   jagah adjust ki hai, aur kuch nahi. */
.tpb-serv .section_heading { margin-bottom: 38px; }

/* ---------- grid: har box bilkul same size ---------- */
.tpb-serv__grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-rows: 1fr;          /* saari rows barabar - description chhoti ho ya lambi */
  gap: 18px;
  align-items: stretch;
  list-style: none; padding: 0; margin: 0;
}
.tpb-serv__grid > li { margin: 0; display: flex; height: 100%; }
.tpb-serv__grid > li::before { content: none; }

.tpb-serv__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: 26px 16px 22px;
  background: #fff;
  border: 1px solid #f3e4e7;
  border-radius: 12px;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 2px 10px rgba(120,70,80,.05);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.tpb-serv__card:hover,
.tpb-serv__card:focus-visible {
  transform: translateY(-6px);
  border-color: #e4c4cb;
  box-shadow: 0 16px 34px rgba(120,70,80,.14);
  text-decoration: none;
}

.tpb-serv__icon {
  display: grid; place-items: center; flex: none;
  width: 62px; height: 62px; margin-bottom: 16px;
  border-radius: 50%;
  background: #fbeef1; color: #b8737f;
  transition: background .22s ease, transform .22s ease;
}
.tpb-serv__card:hover .tpb-serv__icon { background: #f6dfe4; transform: scale(1.07); }
.tpb-serv__icon svg { width: 28px; height: 28px; }

/* min-height se sab titles aur descriptions ek hi line par baithte hain */
.tpb-serv__card h3 {
  font-size: 15px; font-weight: 600; line-height: 1.35;
  color: #2f2528; margin: 0 0 8px;
  min-height: 2.7em;
  display: flex; align-items: center; justify-content: center;
}
.tpb-serv__card p {
  font-size: 12.8px; line-height: 1.55; color: #7d6e72; margin: 0;
  flex: 1 1 auto;               /* bachi hui jagah le lo - box barabar rehta hai */
}
.tpb-serv__card:hover h3 { color: #a5626e; }

/* ---------- CTA ---------- */
.tpb-serv__cta { text-align: center; margin-top: 34px; }
.tpb-serv__btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 30px; border-radius: 7px;
  background: #b8737f; color: #fff;
  font-size: 13.5px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase;
  text-decoration: none; box-shadow: 0 8px 22px rgba(184,115,127,.26);
  transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}
.tpb-serv__btn:hover { background: #a5626e; color: #fff; transform: translateY(-2px); box-shadow: 0 12px 28px rgba(184,115,127,.34); text-decoration: none; }
.tpb-serv__btn svg { width: 13px; height: 13px; transition: transform .18s ease; }
.tpb-serv__btn:hover svg { transform: translateX(3px); }

/* ---------- scroll par card ek-ek karke aate hain ---------- */
.tpb-serv__card { opacity: 0; transform: translateY(18px); }
.tpb-serv.is-in .tpb-serv__card { animation: tpbServIn .6s cubic-bezier(.22,.61,.36,1) forwards; }
.tpb-serv.is-in li:nth-child(1)  .tpb-serv__card { animation-delay: .00s; }
.tpb-serv.is-in li:nth-child(2)  .tpb-serv__card { animation-delay: .05s; }
.tpb-serv.is-in li:nth-child(3)  .tpb-serv__card { animation-delay: .10s; }
.tpb-serv.is-in li:nth-child(4)  .tpb-serv__card { animation-delay: .15s; }
.tpb-serv.is-in li:nth-child(5)  .tpb-serv__card { animation-delay: .20s; }
.tpb-serv.is-in li:nth-child(6)  .tpb-serv__card { animation-delay: .25s; }
.tpb-serv.is-in li:nth-child(7)  .tpb-serv__card { animation-delay: .30s; }
.tpb-serv.is-in li:nth-child(8)  .tpb-serv__card { animation-delay: .35s; }
.tpb-serv.is-in li:nth-child(9)  .tpb-serv__card { animation-delay: .40s; }
.tpb-serv.is-in li:nth-child(10) .tpb-serv__card { animation-delay: .45s; }
.tpb-serv.is-in li:nth-child(11) .tpb-serv__card { animation-delay: .50s; }
.tpb-serv.is-in li:nth-child(12) .tpb-serv__card { animation-delay: .55s; }
@keyframes tpbServIn { to { opacity: 1; transform: translateY(0); } }

/* ---------- responsive ---------- */
@media (max-width: 1199px) { .tpb-serv__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 991px)  { .tpb-serv__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; } }
@media (max-width: 767px)  {
  .tpb-serv { padding: 46px 0 50px; }
  .tpb-serv__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
  .tpb-serv__card { padding: 20px 12px 18px; }
  .tpb-serv__icon { width: 54px; height: 54px; margin-bottom: 12px; }
  .tpb-serv__icon svg { width: 24px; height: 24px; }
  .tpb-serv__card h3 { font-size: 14px; }
  .tpb-serv__card p { font-size: 12px; }
}
@media (max-width: 400px) {
  .tpb-serv__card p { min-height: 5.5em; }
}

/* jinhe motion se dikkat hai */
@media (prefers-reduced-motion: reduce) {
  .tpb-serv__card { opacity: 1; transform: none; animation: none !important; }
  .tpb-serv *, .tpb-serv *::before { transition: none !important; animation: none !important; }
}
