/* ===== Services page — violet brand palette, matches the homepage =====
   Reuses the site's global tokens (--violet-*, --ink-*, --gradient-brand,
   --gradient-logo) from base.css instead of a separate palette, plus the
   established glassmorphism treatment already used for icon circles
   elsewhere on the site (side-tab / stat-card icons). */

/* ---------- Hero (photo band) ---------- */
.sv-hero { background: linear-gradient(180deg, var(--violet-50) 0%, var(--surface-0) 60%); padding-top: 130px; padding-bottom: 110px; position: relative; overflow: hidden; }
.sv-hero__top {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px);
  gap: 48px; align-items: center; position: relative; z-index: 1;
}
/* Clears the fixed left-anchored side-tab AI-assistant button
   (position:fixed, top:50% of the VIEWPORT) — this hero is short
   enough that the viewport's vertical center falls across the copy
   text, so without this the button would sit on top of it. */
.sv-hero__copy { padding-left: 92px; }

.sv-breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-500); margin-bottom: 22px; }
.sv-breadcrumb a { color: var(--ink-500); transition: color var(--dur-fast) var(--ease-out); }
.sv-breadcrumb a:hover { color: var(--violet-600); }

.sv-hero__copy h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(32px, 4vw, 50px); line-height: 1.16; color: var(--ink-900); }
.sv-hero__copy p { margin-top: 18px; font-size: 16px; color: var(--ink-500); max-width: 440px; line-height: 1.6; }

.sv-btn-dark {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 30px; padding: 16px 26px;
  border-radius: var(--radius-pill);
  background: var(--gradient-brand); color: #fff;
  font-weight: 600; font-size: 14.5px; white-space: nowrap;
  box-shadow: var(--shadow-glow);
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.sv-btn-dark:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(124, 58, 237, 0.38); }
.sv-btn-dark .btn-arrow { display: inline-flex; }

.sv-hero__photo-wrap { position: relative; }
.sv-hero__photo-wrap::before {
  content: ''; position: absolute; inset: -14%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.22), transparent 70%);
  filter: blur(20px); z-index: -1;
}
.sv-hero__photo { border-radius: var(--radius-xl); aspect-ratio: 4 / 3; width: 100%; box-shadow: var(--shadow-lg); }

/* ---------- Category filter pills ---------- */
.sv-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.sv-filter-btn {
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--surface-line);
  background: transparent;
  font-family: var(--font-body); font-size: 13.5px; font-weight: 600; color: var(--ink-700);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.sv-filter-btn:hover { border-color: var(--violet-400); color: var(--violet-700); background: var(--violet-50); }
.sv-filter-btn:active { transform: scale(0.96); }
.sv-filter-btn.is-active { background: var(--gradient-brand); border-color: transparent; color: #fff; box-shadow: var(--shadow-glow); }

/* ---------- Services grid: white card overlapping the hero photo ---------- */
.sv-services-wrap { margin-top: -90px; position: relative; z-index: 2; padding-bottom: clamp(56px, 8vw, 108px); }
.sv-card {
  background: var(--surface-0); border-radius: var(--radius-xl);
  box-shadow: 0 30px 70px rgba(46, 16, 101, 0.14);
  padding: clamp(20px, 3vw, 40px);
  border: 1px solid var(--surface-line);
}
.sv-cards-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }

.sv-item {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform var(--dur-med) var(--ease-out), opacity var(--dur-fast) var(--ease-out);
}
.sv-item.is-filtered-out { display: none; }
.sv-item:hover { transform: translateY(-6px); }
.sv-item__photo { position: relative; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4 / 3; flex: none; }
.sv-item__badge {
  position: absolute; top: 10px; right: 10px; z-index: 2; overflow: hidden;
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(165deg, rgba(220, 171, 218, 0.85) 0%, rgba(187, 114, 192, 0.8) 45%, rgba(116, 83, 178, 0.88) 100%);
  backdrop-filter: blur(8px) saturate(160%);
  -webkit-backdrop-filter: blur(8px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 4px 14px rgba(122, 83, 178, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  color: #fff;
}
.sv-item__badge::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 55%);
}
.sv-item__badge svg { width: 16px; height: 16px; position: relative; }
.sv-item__body { padding: 16px 4px 4px; display: flex; flex-direction: column; flex: 1; min-height: 0; }
.sv-item__body h3 { font-family: var(--font-body); font-size: 16px; font-weight: 700; color: var(--ink-900); line-height: 1.3; }
.sv-item__body p {
  margin-top: 6px; font-size: 12.5px; color: var(--ink-500); line-height: 1.5;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
}
.sv-item__body p.is-expanded { -webkit-line-clamp: unset; overflow: visible; }
.sv-item__more {
  align-self: flex-start; margin-top: 4px; padding: 0;
  border: none; background: none; font-family: inherit;
  font-size: 12px; font-weight: 700; color: var(--violet-600); cursor: pointer;
}
.sv-item__more:hover { color: var(--violet-700); text-decoration: underline; }
.sv-item__more[hidden] { display: none; }
.sv-item__footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 16px; }
.sv-item__price { font-size: 13px; font-weight: 700; color: var(--ink-900); }
.sv-item__arrow {
  flex: none; width: 38px; height: 38px; border-radius: 50%;
  border: 1.5px solid var(--surface-line);
  display: flex; align-items: center; justify-content: center; color: var(--violet-700);
  transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.sv-item__arrow svg { width: 15px; height: 15px; }
.sv-item:hover .sv-item__arrow { background: var(--gradient-brand); border-color: transparent; color: #fff; transform: rotate(45deg); box-shadow: var(--shadow-glow); }

/* ---------- Full price list (accordion) ---------- */
/* The floating/sticky header sits on top of the page rather than
   pushing content down, so a plain #prices anchor jump lands with its
   heading hidden underneath it — offset the scroll target instead. */
#prices { scroll-margin-top: 110px; }
.price-section__intro { margin-top: 14px; max-width: 640px; font-size: 15.5px; color: var(--ink-500); line-height: 1.6; }
.price-accordion { margin-top: 32px; border-top: 1px solid var(--surface-line); }
.price-accordion__item { border-bottom: 1px solid var(--surface-line); }

.price-accordion__trigger {
  width: 100%; display: flex; align-items: center; gap: 16px;
  padding: 22px 4px;
  border: none; background: transparent;
  font-family: inherit; text-align: left; cursor: pointer;
}
.price-accordion__num { font-family: var(--font-display); font-size: 14px; font-weight: 600; color: var(--violet-400); flex: none; width: 26px; }
.price-accordion__title { flex: 1; font-size: 16.5px; font-weight: 700; color: var(--ink-900); }
.price-accordion__count { font-size: 13px; color: var(--ink-500); flex: none; }
.price-accordion__chevron { width: 18px; height: 18px; flex: none; color: var(--violet-500); transition: transform var(--dur-med) var(--ease-out); }
.price-accordion__item.is-open .price-accordion__chevron { transform: rotate(180deg); }

.price-accordion__panel-wrap { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--dur-med) var(--ease-out); }
.price-accordion__item.is-open .price-accordion__panel-wrap { grid-template-rows: 1fr; }
.price-accordion__panel { overflow: hidden; }
.price-accordion__row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 4px 12px 42px;
  font-size: 14.5px; color: var(--ink-700);
  border-top: 1px solid var(--surface-line);
}
.price-accordion__row:first-child { border-top: none; }
.price-accordion__price { font-weight: 700; color: var(--violet-600); flex: none; }

@media (max-width: 899px) {
  .price-accordion__row { padding-left: 30px; }
}
@media (max-width: 560px) {
  .price-accordion__title { font-size: 15px; }
  .price-accordion__count { display: none; }
}

/* ---------- Consultation band (glass) ---------- */
.sv-consult {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, rgba(237, 233, 254, 0.9), rgba(245, 243, 255, 0.6));
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-xl);
  padding: clamp(32px, 4vw, 48px);
  display: flex; align-items: center; justify-content: space-between; gap: 40px; flex-wrap: wrap;
  box-shadow: var(--shadow-md);
}
.sv-consult__text h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(22px, 2.6vw, 30px); margin-top: 10px; color: var(--ink-900); line-height: 1.25; }
.sv-consult__text p { margin-top: 10px; font-size: 14.5px; color: var(--ink-500); max-width: 360px; line-height: 1.55; }
.sv-consult .sv-btn-dark { margin-top: 22px; }

.sv-consult__social { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.sv-consult__rating { display: flex; flex-direction: column; min-width: 0; }
.sv-consult__rating b { display: flex; align-items: center; gap: 6px; font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--ink-900); }
.sv-consult__rating svg { width: 18px; height: 18px; color: #F0B429; }
.sv-consult__rating span { font-size: 12.5px; color: var(--ink-500); margin-top: 2px; }

.doctor-avatars { display: flex; align-items: center; }
.doctor-avatar { position: relative; margin-left: -14px; }
.doctor-avatar:first-child { margin-left: 0; }
.doctor-avatar__img {
  display: block; width: 56px; height: 56px; border-radius: 50%; flex: none;
  border: 3px solid #fff; box-shadow: var(--shadow-sm);
  position: relative; z-index: 1;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}
.doctor-avatar:hover .doctor-avatar__img { transform: scale(1.08) translateY(-2px); box-shadow: var(--shadow-glow); z-index: 5; }

.doctor-avatars__more {
  display: flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 50%; margin-left: -14px; flex: none;
  background: var(--gradient-brand); color: #fff; font-weight: 700; font-size: 13px;
  border: 3px solid #fff; box-shadow: var(--shadow-sm);
  position: relative; z-index: 1;
  transition: transform var(--dur-fast) var(--ease-out);
}
.doctor-avatars__more:hover { transform: scale(1.08); }

/* ---------- Stats row ----------
   Sits right under the consult band, which already carries its own
   section-pad bottom spacing — this section's own top padding is
   dropped to 0 so the two don't stack into one large empty gap. */
.sv-stats { padding-top: 0; padding-bottom: clamp(56px, 8vw, 96px); }
.sv-stats-card {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.95), rgba(245, 243, 255, 0.75));
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: clamp(28px, 3.5vw, 44px) clamp(20px, 3vw, 36px);
}
.sv-stats-card::before {
  content: ''; position: absolute; inset: -30% -10% auto auto; width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.16), transparent 70%);
  pointer-events: none;
}

.sv-stats__grid { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.sv-stat {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px;
  padding: 8px 18px; border-right: 1px solid var(--surface-line);
  transition: transform var(--dur-med) var(--ease-out);
}
.sv-stat:hover { transform: translateY(-4px); }
.sv-stat:last-child { border-right: none; }
.sv-stat__icon {
  position: relative; overflow: hidden;
  width: 52px; height: 52px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(165deg, rgba(220, 171, 218, 0.8) 0%, rgba(187, 114, 192, 0.75) 45%, rgba(116, 83, 178, 0.82) 100%);
  backdrop-filter: blur(8px) saturate(160%);
  -webkit-backdrop-filter: blur(8px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 6px 16px rgba(122, 83, 178, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  color: #fff;
}
.sv-stat__icon::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 55%);
}
.sv-stat__icon svg { width: 23px; height: 23px; position: relative; }
.sv-stat b { display: block; font-family: var(--font-display); font-size: 30px; font-weight: 700; color: var(--ink-900); line-height: 1; }
.sv-stat__label { display: block; font-size: 13px; color: var(--ink-500); line-height: 1.4; }
.sv-stat--text { justify-content: center; }
.sv-stat--text .sv-stat__label { max-width: 160px; }

/* Desktop: .sv-stats__track is only a marquee wrapper on mobile (see
   below) — on desktop it must not affect the parent's CSS grid, so its
   children participate directly, and the duplicated loop-copy stays hidden. */
.sv-stats__track { display: contents; }
.sv-stats__track[aria-hidden="true"] { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 899px) {
  .sv-hero { padding-bottom: 90px; }
  .sv-hero__top { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .sv-hero__copy { padding-left: 0; padding-right: 74px; }
  .sv-hero__photo { aspect-ratio: 4 / 3; }
  .sv-services-wrap { margin-top: -64px; }
  .sv-cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .sv-consult { flex-direction: column; align-items: flex-start; }
  .sv-consult__social { width: 100%; justify-content: space-between; }
  .sv-stats-card { padding: 24px 18px; }
  .sv-stats__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 8px; }
  .sv-stat { border-right: none; border-bottom: 1px solid var(--surface-line); padding: 4px 8px 20px; }
  .sv-stat:nth-child(3), .sv-stat:nth-child(4) { border-bottom: none; }
  .sv-stat:last-child { grid-column: 1 / -1; border-bottom: none; }
}

/* Phone layout for the services grid, matching the reference site's own
   mobile pattern: the category filter stays a narrow persistent column
   on the left instead of stacking above the grid, and the card grid
   itself always stays 2-up rather than collapsing to 1 column. */
@media (max-width: 640px) {
  .sv-card { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 10px; align-items: start; padding: 16px 12px; }
  .sv-filters { flex-direction: column; flex-wrap: nowrap; gap: 6px; margin-bottom: 0; position: sticky; top: 104px; align-self: start; z-index: 1; }
  .sv-filter-btn { padding: 9px 8px; font-size: 12px; text-align: left; white-space: normal; line-height: 1.3; border-radius: var(--radius-sm); }
  .sv-cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; min-height: 480px; }
  .sv-item__body { padding: 10px 2px 2px; }
  .sv-item__body h3 { font-size: 14px; line-height: 1.3; }
  .sv-item__body p { font-size: 12px; margin-top: 4px; -webkit-line-clamp: 4; }
  .sv-item__more { font-size: 11.5px; }
  .sv-item__footer { margin-top: auto; padding-top: 10px; }
  .sv-item__price { font-size: 12.5px; }
  .sv-item__arrow { width: 32px; height: 32px; }
  .sv-item__arrow svg { width: 13px; height: 13px; }
  .sv-item__badge { width: 30px; height: 30px; top: 6px; right: 6px; }
  .sv-item__badge svg { width: 14px; height: 14px; }
}
