/* ===== LOCATIONS SECTION ===== */
.section--locations {
  background: linear-gradient(180deg, #f5f0eb 0%, #ebe4dc 100%);
  padding: 80px 0;

  /* OVERLAP EFFECT */
  position: relative;
  z-index: 40;
  margin-top: -60px;
  border-radius: 48px 48px 0 0;
  box-shadow:
    0 -20px 60px rgba(var(--c-black-rgb), 0.08),
    0 -4px 20px rgba(var(--c-black-rgb), 0.04);
}

.locations-header {
  text-align: center;
  margin: 0 0 52px 0;
}

.locations-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 300;
  text-align: center;
  color: var(--c-brand);
  margin: 0 0 10px 0;
  letter-spacing: 0.02em;
}

.locations-subtitle {
  font-family: var(--font-body);
  font-size: 11px;
  text-align: center;
  color: var(--c-stone);
  margin: 0;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.locations-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.location-detail-card {
  --metro: var(--c-brand); /* fallback */
  background: var(--c-bg);
  border-radius: 20px;
  border-top: 3px solid var(--metro);
  border-left: 1px solid rgba(var(--c-brand-rgb), 0.08);
  border-right: 1px solid rgba(var(--c-brand-rgb), 0.08);
  border-bottom: 1px solid rgba(var(--c-brand-rgb), 0.08);
  padding: 0;
  overflow: hidden;
}

.location-detail-head {
  padding: 28px 28px 20px 28px;
  border-bottom: 1px solid rgba(var(--c-brand-rgb), 0.07);
}

.location-detail-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 300;
  color: var(--c-brand);
  margin: 0 0 10px 0;
  letter-spacing: 0.01em;
  line-height: 1;
}

.location-detail-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.location-detail-address {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--c-taupe);
  font-weight: 400;
  letter-spacing: 0.02em;
}

.location-detail-metro-tag {
  font-family: var(--font-body);
  font-size: 11px;
  color: color-mix(in srgb, var(--metro) 70%, var(--c-brand) 30%);
  background: color-mix(in srgb, var(--metro) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--metro) 18%, transparent);
  padding: 3px 10px;
  border-radius: 100px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.location-detail-text {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--c-mocha);
  line-height: 1.7;
  margin: 0;
  padding: 20px 28px;
  border-bottom: 1px solid rgba(var(--c-brand-rgb), 0.06);
}

.location-map-embed {
  padding: 0;
  line-height: 0;
}

.location-detail-more {
  display: block;
  width: 100%;
  padding: 14px 28px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-align: center;
  color: var(--c-brand);
  background: transparent;
  border: none;
  border-top: 1px solid rgba(var(--c-brand-rgb), 0.08);
  cursor: pointer;
  transition: background 0.2s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.location-detail-more:hover,
.location-detail-more:active {
  background: rgba(var(--c-brand-rgb), 0.04);
}

/* Locations responsive */
@media (max-width: 768px) {
  .section--locations {
    padding: 60px 0 80px;
  }

  .locations-details {
    grid-template-columns: 1fr;
    gap: 20px;
    /* padding убран — .container уже даёт 20px по бокам */
  }

  .locations-header {
    margin-bottom: 36px;
  }
}

@media (max-width: 479px) {
  .locations-title {
    font-size: 28px;
  }

  .location-detail-head {
    padding: 22px 20px 16px 20px;
  }

  .location-detail-title {
    font-size: 24px;
  }

  .location-detail-text {
    font-size: 12px;
    padding: 16px 20px;
  }

  .location-detail-phone {
    padding: 14px 20px;
  }

  .location-detail-more {
    padding: 14px 20px;
  }
}

/* ===== SECTION TEAM ===== */
.section--team {
  background: linear-gradient(160deg, #d4c4b8 0%, #c9b9ac 100%);
  /* padding-bottom > 60px: следующая секция (.section--locations) наезжает
     margin-top:-60px и накрывала бы подпись роли последнего ряда карточек */
  padding: 80px 0 84px;

  /* OVERLAP EFFECT — наезжает поверх .section--booking */
  position: relative;
  z-index: 30;
  margin-top: -60px;
  border-radius: 48px 48px 0 0;
  box-shadow:
    0 -20px 60px rgba(var(--c-black-rgb), 0.08),
    0 -4px 20px rgba(var(--c-black-rgb), 0.04);
}

.team-header {
  text-align: center;
  margin: 0 0 40px 0;
}

.team-title {
  font-family: var(--font-display);
  font-size: clamp(42px, 6vw, 64px);
  font-weight: 300;
  font-style: italic;
  color: var(--c-brand);
  margin: 0 0 12px 0;
  letter-spacing: -0.01em;
  line-height: 1;
}

.team-subtitle {
  font-family: var(--font-body);
  font-size: 10px;
  color: rgba(var(--c-brand-rgb), 0.45);
  margin: 0;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ----- Team Grid ----- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.trainer-thumb {
  cursor: pointer;
  text-align: center;
  transition: transform 0.3s ease;
}

.trainer-thumb:hover {
  transform: translateY(-4px);
}

.trainer-thumb:hover .trainer-thumb-photo {
  box-shadow: 0 16px 40px rgba(var(--c-brand-rgb), 0.20);
}

.trainer-thumb-photo {
  aspect-ratio: 3 / 4;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 14px;
  background: linear-gradient(145deg, #e0d5cb 0%, #d0c2b6 100%);
  border: 1px solid rgba(var(--c-white-rgb), 0.45);
  box-shadow: 0 8px 24px rgba(var(--c-brand-rgb), 0.12);
  transition: box-shadow 0.3s ease;
}

.trainer-thumb-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.trainer-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 300;
  font-style: italic;
  color: rgba(var(--c-brand-rgb), 0.25);
  user-select: none;
}

.trainer-thumb-name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 300;
  font-style: italic;
  color: var(--c-brand);
  margin: 0 0 5px 0;
  line-height: 1.2;
}

.trainer-thumb-role {
  font-family: var(--font-body);
  font-size: 9px;
  color: rgba(var(--c-brand-rgb), 0.50);
  margin: 0;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

/* ----- Trainer Modal ----- */
.trainer-modal {
  position: fixed;
  inset: 0;
  background: rgba(42, 28, 24, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.trainer-modal.active {
  opacity: 1;
  visibility: visible;
}

.trainer-modal-content {
  background: var(--c-bg);
  border-radius: 20px;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.97) translateY(20px);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.3s ease;
}

.trainer-modal.active .trainer-modal-content {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Scrollbar */
.trainer-modal-content::-webkit-scrollbar { width: 3px; }
.trainer-modal-content::-webkit-scrollbar-track { background: transparent; }
.trainer-modal-content::-webkit-scrollbar-thumb {
  background: rgba(var(--c-mauve-rgb), 0.25);
  border-radius: 3px;
}

/* Close button — glass on photo */
.trainer-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(var(--c-white-rgb), 0.20);
  border-radius: 50%;
  background: rgba(var(--c-white-rgb), 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: rgba(var(--c-white-rgb), 0.85);
  z-index: 10;
  transition: background 0.2s, color 0.2s;
}

.trainer-modal-close:hover {
  background: rgba(var(--c-white-rgb), 0.30);
  color: var(--c-white);
}

/* ===== Level 1: Hero Photo Zone ===== */
.trainer-modal-hero {
  position: relative;
  border-radius: 20px 20px 0 0;
  overflow: hidden;
}

.trainer-modal-hero-img {
  width: 100%;
  height: 44vh;
  max-height: 420px;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}

/* Warm gradient overlay — bottom fade */
.trainer-modal-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 35%,
    rgba(var(--c-brand-deep-rgb), 0.08) 55%,
    rgba(var(--c-brand-deep-rgb), 0.35) 75%,
    rgba(var(--c-brand-deep-rgb), 0.65) 100%
  );
  pointer-events: none;
}

/* Text overlay on hero photo */
.trainer-modal-hero-text {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 28px;
  z-index: 2;
}

.trainer-modal-hero-text .trainer-modal-name {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 300;
  font-style: italic;
  color: var(--c-white);
  margin: 0 0 6px 0;
  line-height: 1.1;
  text-shadow: 0 1px 8px rgba(var(--c-black-rgb), 0.20);
}

.trainer-modal-hero-text .trainer-modal-role {
  font-family: var(--font-body);
  font-size: 10px;
  color: rgba(var(--c-white-rgb), 0.80);
  margin: 0;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.trainer-modal-tagline {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 400;
  font-style: italic;
  color: rgba(var(--c-white-rgb), 0.70);
  margin: 10px 0 0 0;
  line-height: 1.3;
}

/* ===== Level 2: Expert Content ===== */
.trainer-modal-body {
  padding: 28px 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.trainer-modal-bio-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trainer-modal-section-label {
  font-family: var(--font-body);
  font-size: 9px;
  color: rgba(var(--c-mauve-rgb), 0.60);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0;
}

.trainer-modal-bio {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  color: rgba(var(--c-brand-deep-rgb), 0.72);
  line-height: 1.75;
  margin: 0;
}

.trainer-modal-divider {
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(var(--c-mauve-rgb), 0.18) 20%,
    rgba(var(--c-mauve-rgb), 0.18) 80%,
    transparent
  );
}

.trainer-modal-education {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.edu-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 12px;
  border-left: 2px solid rgba(var(--c-mauve-rgb), 0.18);
}

.edu-org {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  color: rgba(var(--c-brand-deep-rgb), 0.80);
  letter-spacing: 0.01em;
}

.edu-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.edu-tag {
  font-family: var(--font-body);
  font-size: 11px;
  color: rgba(var(--c-brand-deep-rgb), 0.58);
  background: rgba(var(--c-mauve-rgb), 0.08);
  border: 1px solid rgba(var(--c-mauve-rgb), 0.16);
  border-radius: 6px;
  padding: 4px 10px;
  line-height: 1.4;
}

/* CTA button */
.trainer-modal-cta {
  display: block;
  width: 100%;
  padding: 16px;
  margin-top: 4px;
  text-align: center;
  text-decoration: none;

  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--c-white);

  background: linear-gradient(135deg, rgba(196, 155, 110, 0.90) 0%, rgba(170, 120, 75, 0.92) 100%);
  border: 1px solid rgba(255, 220, 180, 0.25);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(170, 120, 75, 0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.trainer-modal-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(170, 120, 75, 0.24);
}

.trainer-modal-cta:active {
  transform: translateY(0);
}

/* ----- Team Responsive ----- */
@media (max-width: 768px) {
  .section--team {
    padding: 64px 0 78px; /* >60px нахлёста .section--locations (см. база) */
  }

  .team-header {
    margin-bottom: 32px;
  }

  .team-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 0 16px;
  }

  .trainer-thumb-name {
    font-size: 16px;
  }

  .trainer-modal-hero-text .trainer-modal-name {
    font-size: 28px;
  }

  .trainer-modal-body {
    padding: 24px 24px 28px;
  }
}

@media (max-width: 479px) {
  .section--team {
    padding: 52px 0 72px; /* >60px нахлёста .section--locations — иначе роль ряда карточек под фоном */
  }

  .team-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .trainer-thumb-photo {
    border-radius: 12px;
  }

  .trainer-thumb-name {
    font-size: 14px;
  }

  .trainer-thumb-role {
    font-size: 8px;
  }

  .trainer-modal {
    padding: 10px;
    align-items: center;
  }

  .trainer-modal-content {
    max-height: 92vh;
    width: 100%;
    border-radius: 16px;
  }

  .trainer-modal-hero {
    border-radius: 16px 16px 0 0;
  }

  .trainer-modal-hero-img {
    height: 38vh;
    max-height: none;
  }

  .trainer-modal-hero-text {
    padding: 18px 20px;
  }

  .trainer-modal-hero-text .trainer-modal-name {
    font-size: 24px;
    margin-bottom: 4px;
  }

  .trainer-modal-hero-text .trainer-modal-role {
    font-size: 9px;
  }

  .trainer-modal-tagline {
    font-size: 13px;
    margin-top: 8px;
  }

  .trainer-modal-close {
    top: 10px;
    right: 10px;
    width: var(--tap);
    height: var(--tap);
    font-size: 14px;
  }

  .trainer-modal-body {
    padding: 20px 20px 24px;
    gap: 16px;
  }

  .trainer-modal-bio {
    font-size: 12px;
    line-height: 1.65;
  }

  .trainer-modal-section-label {
    font-size: 8px;
  }

  .trainer-modal-education {
    gap: 10px;
  }

  .edu-group {
    gap: 5px;
    padding-left: 10px;
  }

  .edu-org {
    font-size: 10px;
  }

  .edu-tag {
    font-size: 10px;
    padding: 3px 8px;
  }

  .trainer-modal-cta {
    font-size: 12px;
    padding: 14px;
    border-radius: 12px;
    min-height: var(--tap);
  }
}

/* ===== Фото тренеров: единый тёплый тон =====
   Лёгкая десатурация + тёплый тинт → блок читается как один сет, несмотря на
   разные фоны/свет исходников. Кадрирование выравнивает inline object-position
   (фокус-точка focal_x/focal_y из модели). */
.trainer-thumb-photo img,
.trainer-modal-hero-img {
  filter: saturate(0.86) sepia(0.08) contrast(1.03);
}

