/* ======================================================
   GASTROENTEROLOG PAGE — extra styles on top of priem-styles
   ====================================================== */

/* Keep the final service block separated from the footer. */
.service-page--without-tail,
.appointment-service-page { padding-bottom: var(--section-pad); }

/* Hero: identical to Приём врачей — only image, gradient & text differ. */
.gastro-hero .priem-hero-wrap {
  background: linear-gradient(135deg, #FFD7D4 0%, #D9E0EB 100%);
}
/* Image slightly smaller than the doctors photo */
.gastro-hero .priem-hero-doctors {
  max-height: 520px;
  max-width: 82%;
}

/* Card a bit more translucent so the gradient shows through */
.gastro-hero .priem-hero-card {
  background: rgba(255, 255, 255, 0.55);
}
/* ---------- CONDITION CHIPS ---------- */
.gastro-chips-section {
  padding-top: 36px;
  padding-bottom: 12px;
}
.gastro-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.gchip {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--violet-pill, #ECE5FB);
  color: var(--violet, #6D5BD0);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  transition: background 0.12s ease-out, color 0.12s ease-out, transform 0.18s ease;
}
/* Гасим унаследованную от .reveal-stagger задержку — иначе смена цвета
   на hover запаздывает на величину stagger-delay (до 0.55s). */
.gastro-chips.reveal-stagger > .gchip { transition-delay: 0s; }
.gchip:hover {
  background: var(--violet, #6D5BD0);
  color: #fff;
  transform: translateY(-1px);
}
/* No permanent dark state — dark violet appears only on hover */
.gchip.is-active {
  background: var(--violet-pill, #ECE5FB);
  color: var(--violet, #6D5BD0);
}
.gchip.is-active:hover {
  background: var(--violet, #6D5BD0);
  color: #fff;
}

/* Сворачивание чипов до 3 рядов (мобильный) */
.gchip-collapsed { display: none; }
.gchip-more-wrap { display: none; margin-top: 14px; text-align: center; }

@media (max-width: 600px) {
  .gastro-chips { gap: 8px; justify-content: flex-start; }
  .gchip { padding: 8px 14px; font-size: 13px; }
}

/* ---------- СТОИМОСТЬ ---------- */
.gastro-prices-section { padding: 0; margin-top: var(--section-pad-tight); }
.gastro-prices-bg {
  background: var(--bg-soft, #F5F4F8);
  padding: var(--section-pad-tight) 0;
}
.price-table {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.price-row {
  display: grid;
  grid-template-columns: 1fr auto 132px;
  align-items: center;
  gap: 32px;
  padding: 26px 32px;
  border-radius: var(--r-xl);
  background: #fff;
  box-shadow: 0 4px 18px rgba(48, 30, 110, 0.05);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.price-row:hover {
  transform: scale(1.015);
  box-shadow: 0 14px 34px rgba(48, 30, 110, 0.12);
}
.price-row.is-hidden { display: none; }
.price-table.is-expanded .price-row.is-hidden { display: grid; }

.price-name {
  font-size: 17px;
  font-weight: 400;
  color: var(--text);
  line-height: 1.4;
}
.price-amount {
  font-size: 19px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  text-align: right;
}
.price-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 22px;
  border-radius: 999px;
  background: var(--violet-pill, #ECE5FB);
  color: var(--violet, #6D5BD0);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.price-cta:hover { background: var(--violet, #6D5BD0); color: #fff; }

.price-more {
  text-align: center;
  margin-top: 18px;
}
.link-more {
  background: none;
  border: none;
  color: var(--violet, #6D5BD0);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 8px;
  transition: color 0.2s ease;
}
.link-more:hover { color: var(--violet-hover, #5848B8); text-decoration: underline; }

/* ---------- Single specialist grid ---------- */
.spec-grid--single {
  justify-content: center;
}
.spec-grid--single > .spec-card {
  flex: 0 1 360px;
}

/* ---------- BOOKING (same as Приём врачей, без формы) ---------- */
.gastro-booking-section {
  padding: var(--section-pad-tight) 0 0;
}
.gastro-booking-section .section-title {
  text-align: center;
  margin-bottom: 28px;
}
/* Single-column variant — no form on the right */
.booking-wrap--solo {
  grid-template-columns: 1fr;
}
.booking-wrap--solo .booking-left p {
  max-width: 720px;
}

/* ---------- PROSE: Лечение заболеваний ЖКТ ---------- */
.gastro-prose-section { padding-top: var(--section-pad); }
.gastro-prose {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
}
.gastro-prose .lead {
  font-size: 15px;
  color: var(--text);
  margin: 0 0 22px;
}
.gastro-prose h3 {
  font-size: clamp(22px, 1.8vw, 26px);
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  margin: 32px 0 12px;
}
.gastro-prose p {
  margin: 0 0 12px;
  color: var(--text);
}
.gastro-prose ul {
  margin: 8px 0 18px;
  padding-left: 22px;
  color: var(--text);
}
.gastro-prose ul li {
  margin-bottom: 6px;
}
.gastro-prose ul li::marker {
  color: var(--violet, #6D5BD0);
}
.gastro-prose strong {
  color: var(--text);
  font-weight: 600;
}
.gastro-prose a {
  color: var(--violet, #6054B1);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}
.gastro-prose a:hover {
  color: var(--violet-hover, #4F44A0);
}

/* Collapse last 2 sections by default; expand on click */
.gastro-prose > h3:nth-of-type(3),
.gastro-prose > h3:nth-of-type(3) ~ * {
  display: none;
}
.gastro-prose.is-expanded > h3:nth-of-type(3),
.gastro-prose.is-expanded > h3:nth-of-type(3) ~ * {
  display: block;
}
.gastro-prose-more {
  margin-top: 8px;
}
.gastro-prose-more .link-more {
  padding: 0;
}

/* FAQ bottom — same look, but slightly less top padding */
.faq-section--bottom { padding-top: var(--section-pad-tight); }

/* ---------- VIDEO ---------- */
.gastro-video-section { padding-top: var(--section-pad-tight); padding-bottom: var(--section-pad); }
.gastro-video {
  position: relative;
  border-radius: var(--r-2xl);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #1A1A1E;
}
.gastro-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.gastro-video-btn {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.9);
  color: var(--violet, #6D5BD0);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
  padding-left: 6px;
}
.gastro-video-btn:hover {
  background: #fff;
  transform: scale(1.06);
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .booking-wrap--solo .booking-left { padding: 40px; }
}
@media (max-width: 720px) {
  .gastro-chips { justify-content: flex-start; }
  .price-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 15px 16px;
    border-radius: var(--r-lg);
  }
  .price-name { font-size: 14.5px; }
  .price-amount { font-size: 16px; }
  .price-cta { padding: 9px 18px; font-size: 13px; }
  .price-amount, .price-cta { justify-self: start; text-align: left; }
  .booking-wrap--solo .booking-left { padding: 28px 24px; }
  .gastro-prose h3 { font-size: 19px; margin: 26px 0 12px; }
  .gastro-video { aspect-ratio: 16 / 10; }
}
