/* Inner pages */

.nav a.active {
  color: var(--coral);
}

.page-hero {
  background: linear-gradient(135deg, var(--dark-bg) 0%, #1a3a1a 100%);
  color: var(--white);
  padding: 44px 0;
  text-align: center;
}

.page-hero h1 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.page-hero p {
  font-size: 1.0625rem;
  opacity: .85;
  max-width: 600px;
  margin: 0 auto;
}

.breadcrumbs {
  position: relative;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  padding: 16px 0;
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--text-muted);
  background: transparent;
  overflow: visible;
  white-space: normal;
  word-break: break-word;
}

.breadcrumbs a,
.breadcrumbs span {
  display: inline;
  position: relative;
  z-index: 1;
}

.breadcrumbs a:hover { color: var(--green); }
.breadcrumbs span { margin: 0 8px; }

/* Контейнер крошек — поверх декора, без наложения фото/кораллов */
main > .container:has(.breadcrumbs) {
  position: relative;
  z-index: 3;
  isolation: isolate;
}

.page-content {
  padding: 20px 0 40px;
}

.page-content.narrow {
  max-width: 900px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* Price tables */
.price-category {
  margin-bottom: 32px;
  scroll-margin-top: 100px;
}

.price-category h2 {
  font-size: 1.5rem;
  margin-bottom: 8px;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 12px;
}

.price-category h2::before {
  content: '';
  width: 4px;
  height: 28px;
  background: var(--gold);
  border-radius: 2px;
}

.price-category .cat-desc {
  color: var(--text-muted);
  margin-bottom: 20px;
  font-size: 0.9375rem;
}

.price-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.price-table th,
.price-table td {
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.price-table th {
  background: var(--bg-light);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--dark);
}

.price-table tr:last-child td { border-bottom: none; }

.price-table tr:hover td { background: #fafafa; }

.price-table .price {
  font-weight: 700;
  color: var(--green);
  white-space: nowrap;
}

.price-table .price-code {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  width: 1%;
  font-variant-numeric: tabular-nums;
}

.price-table .price-old {
  text-decoration: line-through;
  color: var(--text-muted);
  font-weight: 400;
  font-size: 0.875rem;
  margin-left: 8px;
}

.price-note {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 12px;
  font-style: italic;
}

.price-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
  position: static;
  top: auto;
  z-index: auto;
  background: var(--white);
  padding: 8px 0 16px;
  border-bottom: 1px solid #eee;
}

.price-nav a {
  padding: 8px 16px;
  border: 2px solid #e5e5e5;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: .2s;
}

.price-nav a:hover,
.price-nav a.active {
  border-color: var(--green);
  background: var(--green);
  color: var(--white);
}

/* Cases */
.cases-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
  justify-content: center;
}

.cases-filter button {
  padding: 10px 20px;
  border: 2px solid #e5e5e5;
  border-radius: 50px;
  background: var(--white);
  font-family: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  transition: .2s;
}

.cases-filter button.active,
.cases-filter button:hover {
  border-color: var(--btn, var(--green));
  background: var(--btn, var(--green));
  color: var(--white);
}

.cases-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.case-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.case-card.hidden { display: none; }

.case-header {
  padding: 20px 24px 0;
}

.case-header h3 {
  font-size: 1.125rem;
  margin-bottom: 4px;
  color: var(--dark);
}

.case-tag {
  display: inline-block;
  background: var(--gold);
  color: var(--dark);
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.case-body {
  padding: 16px 24px 24px;
}

.case-body p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 12px;
}

.case-meta {
  display: flex;
  gap: 16px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.case-card .ba-comparison,
.case-card .ba-pair {
  border-radius: 0;
  max-width: none;
  gap: 0;
}

.case-card .ba-pair + .ba-pair {
  margin-top: 0;
}

.case-card .ba-shot {
  border-radius: 0;
  aspect-ratio: 4/3;
}

.case-card .ba-shot--wide {
  aspect-ratio: 10 / 3;
}

/* Doctors page */
.doctors-page-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.doctor-profile {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: minmax(140px, 200px) minmax(0, 1fr);
}

.doctor-profile-photo {
  background: var(--bg-warm, #FAF8F6);
  display: block;
  font-size: 0;
  min-height: 280px;
  overflow: hidden;
  position: relative;
}

.doctor-profile-photo img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  object-position: center 22%;
  display: block;
}

.doctor-profile-photo--valentienko,
.doctor-profile-photo--negodov {
  overflow: hidden;
}

.doctor-profile-photo--valentienko img,
.doctor-profile-photo--negodov img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
}

.doctor-profile-info {
  padding: 24px;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  position: relative;
  z-index: 1;
  background: var(--white);
}

.doctor-profile-info h2 {
  font-size: 1.25rem;
  margin-bottom: 4px;
  color: var(--dark);
}

.doctor-profile-info .role {
  color: var(--green);
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: 12px;
}

.doctor-profile-info .bio {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.doctor-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.doctor-skills span {
  background: var(--bg-light);
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  color: var(--text);
}

/* Vacancies */
.vacancy-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
  border-left: 4px solid var(--gold);
}

.vacancy-card h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
  color: var(--dark);
}

.vacancy-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.vacancy-card ul {
  list-style: disc;
  padding-left: 20px;
  margin-bottom: 16px;
}

.vacancy-card li {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  line-height: 1.5;
}

.vacancy-card h4 {
  font-size: 0.9375rem;
  margin: 16px 0 8px;
  color: var(--dark);
}

/* Legal */
.legal-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 100px;
}

.legal-nav a {
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.875rem;
  transition: .2s;
}

.legal-nav a:hover,
.legal-nav a.active {
  background: var(--bg-light);
  color: var(--green);
  font-weight: 600;
}

.legal-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  align-items: start;
}

.legal-section {
  margin-bottom: 48px;
  scroll-margin-top: 100px;
}

.legal-section h2 {
  font-size: 1.5rem;
  margin-bottom: 16px;
  color: var(--dark);
  padding-bottom: 12px;
  border-bottom: 2px solid var(--gold);
}

.legal-section h3 {
  font-size: 1.125rem;
  margin: 24px 0 12px;
  color: var(--dark);
}

.legal-section p,
.legal-section li {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 12px;
}

.legal-section ul,
.legal-section ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

.legal-section li { margin-bottom: 6px; }

.legal-section a.legal-ext {
  color: var(--coral, #b04549);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-cite {
  white-space: nowrap;
}

.legal-approve {
  font-size: 0.875rem;
  color: var(--text);
  font-style: italic;
  margin-bottom: 20px;
}

.legal-info-box {
  background: var(--bg-light);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}

.legal-info-box dt {
  font-weight: 600;
  color: var(--dark);
  margin-top: 12px;
}

.legal-info-box dt:first-child { margin-top: 0; }

.legal-info-box dd {
  color: var(--text-muted);
  margin-left: 0;
  margin-bottom: 4px;
}

/* Promotions */
.promo-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  justify-content: center;
}

.promo-tab {
  padding: 12px 28px;
  border: 2px solid #e5e5e5;
  border-radius: 50px;
  background: var(--white);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: .2s;
}

.promo-tab.active {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--dark);
}

.promo-section { display: none; }
.promo-section.active { display: block; }

.promo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.promo-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.promo-card-image {
  height: 180px;
  display: block;
  overflow: hidden;
  padding: 0;
  font-size: 0;
  background: var(--bg-light, #f5f3f1);
}

.promo-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.promo-card-image.therapy,
.promo-card-image.orthopedics {
  background: var(--bg-light, #f5f3f1);
}

.promo-card-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.promo-card-badge {
  display: inline-block;
  background: var(--gold);
  color: var(--dark);
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 12px;
  align-self: flex-start;
}

.promo-card-body h3 {
  font-size: 1.125rem;
  margin-bottom: 8px;
  color: var(--dark);
}

.promo-card-body p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
}

.promo-prices {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 16px;
}

.promo-prices .current {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--green);
}

.promo-prices .old {
  font-size: 1rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.promo-rules {
  background: var(--bg-light);
  border-radius: var(--radius);
  padding: 32px;
  margin-top: 48px;
}

.promo-rules h3 {
  font-size: 1.125rem;
  margin-bottom: 12px;
  color: var(--dark);
}

.promo-rules ol {
  padding-left: 20px;
}

.promo-rules li {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1.6;
}

.footer-grid {
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr !important;
}

@media (max-width: 1024px) {
  .legal-layout { grid-template-columns: 1fr; }
  .legal-nav {
    flex-direction: row;
    flex-wrap: wrap;
    position: static;
  }
  .doctors-page-grid { grid-template-columns: 1fr; }
  .doctor-profile { grid-template-columns: 1fr; }
  .doctor-profile-photo { min-height: 180px; }
}

@media (max-width: 768px) {
  .cases-grid,
  .promo-grid { grid-template-columns: 1fr; }
  .price-nav {
    position: static;
    top: auto;
    z-index: auto;
    margin-bottom: 20px;
    padding: 8px 0;
  }
  .price-table { font-size: 0.875rem; }
  .price-table th,
  .price-table td { padding: 10px 12px; }
  .page-hero h1 { font-size: 1.75rem; }
  .footer-grid { grid-template-columns: 1fr !important; }
}
