/* ─── Trainer cards + modal ─── shared between homepage and services pages.
   Homepage uses inline `#trainers` styles; this file is selector-agnostic
   so each consumer scopes via its own container (.trainers-grid here). */

.trainers-block { background: var(--bg-2); }
.trainers-block .container { padding-top: 56px; padding-bottom: 56px; }
@media (min-width: 768px) { .trainers-block .container { padding-top: 80px; padding-bottom: 80px; } }

.trainers-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
@media (min-width: 768px) { .trainers-grid { gap: 20px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); } }

.trainers-block .t-card {
  background: var(--bg-3, #161616); border: 1px solid var(--border); border-radius: 18px; overflow: hidden;
  cursor: pointer; transition: transform .2s ease, border-color .2s ease;
  text-align: left; display: flex; flex-direction: column;
}
.trainers-block .t-card:hover { transform: translateY(-3px); border-color: var(--accent); }

.trainers-block .t-card .photo { aspect-ratio: 3 / 4; background: var(--bg-3); position: relative; overflow: hidden; }
.trainers-block .t-card .photo img {
  width: 100%; height: 100%; object-fit: cover; object-position: center top;
  transition: transform .5s cubic-bezier(.4,.2,.2,1), filter .3s ease;
}
.trainers-block .t-card:hover .photo img { transform: scale(1.06); filter: brightness(1.08) saturate(1.1); }
.trainers-block .t-card .photo-placeholder {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #1a2e1a, #0d1b2a);
  color: var(--accent); font-family: 'Benzin'; font-weight: 700; font-size: 48px;
  letter-spacing: 0.02em;
}

.trainers-block .t-card .meta { padding: 16px 18px 20px; }
.trainers-block .t-card .rank {
  font-size: 11px; color: var(--accent); letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 6px; font-weight: 500;
}
.trainers-block .t-card .rank-top { color: #ffd34d; }
.trainers-block .t-card .rank-massage { color: #8ecdff; }
.trainers-block .t-card .rank-warn { color: #ff9a9a; }
.trainers-block .t-card .name { font-family: 'Benzin'; font-weight: 700; font-size: 17px; margin-bottom: 6px; line-height: 1.25; }
.trainers-block .t-card .spec { font-size: 12.5px; color: var(--fg-muted); line-height: 1.4; min-height: 2.8em; }
.trainers-block .t-card .title-extra { font-size: 11.5px; color: var(--accent-2); margin-top: 8px; }

/* ─── Trainer dialog modal ─── matches homepage markup; styles work
   on any page that ships <dialog id="trainerDlg"> + this stylesheet. */
#trainerDlg {
  padding: 0; border: 0; border-radius: 20px;
  max-width: 880px; width: 94vw; max-height: 94vh;
  background: var(--bg-2); color: #fff; box-shadow: 0 30px 80px rgba(0,0,0,0.6);
  overflow: hidden;
}
#trainerDlg::backdrop { background: rgba(0,0,0,0.88); backdrop-filter: blur(4px); }
#trainerDlg[open] { display: grid; }

.tdlg-inner { display: grid; grid-template-columns: 1fr; max-height: 94vh; overflow: hidden; }
@media (min-width: 760px) { .tdlg-inner { grid-template-columns: 340px 1fr; } }

.tdlg-photo { position: relative; background: var(--bg-3); aspect-ratio: 3 / 4; overflow: hidden; }
@media (min-width: 760px) { .tdlg-photo { aspect-ratio: auto; min-height: 500px; } }
@media (max-width: 759px) { .tdlg-photo { max-height: 44vh; aspect-ratio: 4 / 5; } }
.tdlg-photo img, .tdlg-photo .photo-placeholder {
  width: 100%; height: 100%; object-fit: cover; object-position: center top;
}
.tdlg-photo .photo-placeholder {
  display: grid; place-items: center;
  background: linear-gradient(135deg, #1a2e1a, #0d1b2a);
  color: var(--accent); font-family: 'Benzin', sans-serif; font-weight: 700; font-size: 92px;
}
.tdlg-close {
  position: absolute; top: 12px; right: 12px; width: 40px; height: 40px;
  border-radius: 50%; background: rgba(0,0,0,0.6); border: 0; color: #fff;
  font-size: 22px; cursor: pointer; z-index: 2; backdrop-filter: blur(4px);
}

.tdlg-body { padding: 28px 28px 24px; overflow-y: auto; max-height: 94vh; }
@media (max-width: 759px) { .tdlg-body { padding: 22px 22px 18px; max-height: none; } }

.tdlg-body h3 { font-size: clamp(22px, 3vw, 28px); margin-bottom: 4px; line-height: 1.15; }
.tdlg-body .rank {
  display: inline-block; font-size: 11px; color: var(--accent);
  letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 18px;
  padding: 4px 10px; border-radius: 999px; background: rgba(126,255,110,0.1);
}
.tdlg-bio { margin-bottom: 20px; }
.tdlg-bio p { margin: 0 0 10px; font-size: 14px; color: #d5d5d5; line-height: 1.6; }
.tdlg-bio p strong { color: #fff; }

.tdlg-form { border-top: 1px solid var(--border); padding-top: 18px; }
.tdlg-form h4 { font-family: 'Benzin', sans-serif; font-weight: 700; font-size: 15px; margin-bottom: 10px; }
.tdlg-form .row { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 520px) { .tdlg-form .row { grid-template-columns: 1fr 1fr auto; align-items: stretch; } }
.tdlg-form input {
  width: 100%; padding: 12px 14px; background: var(--bg-3); color: #fff;
  border: 1px solid var(--border-strong); border-radius: 10px;
  font-size: 15px; font-family: inherit; -webkit-appearance: none;
}
.tdlg-form input:focus { outline: 2px solid var(--accent); border-color: transparent; }
.tdlg-form input::placeholder { color: var(--fg-subtle); }
.tdlg-form button {
  padding: 12px 20px; border-radius: 10px; background: var(--accent); color: #000;
  font-weight: 500; font-size: 14px; border: 0; cursor: pointer; white-space: nowrap;
}
.tdlg-form button:hover { background: var(--accent-2); }
.tdlg-form .hint { font-size: 11.5px; color: var(--fg-subtle); margin-top: 10px; }
.tdlg-form .ok {
  display: none; margin-top: 12px; padding: 12px 14px;
  background: rgba(126,255,110,0.12); color: var(--accent);
  border: 1px solid rgba(126,255,110,0.3); border-radius: 10px; font-size: 14px;
}
.tdlg-form .err {
  display: none; margin-top: 12px; padding: 12px 14px;
  background: rgba(255,120,120,0.1); color: #ff9a9a;
  border: 1px solid rgba(255,120,120,0.3); border-radius: 10px; font-size: 14px;
}
.tdlg-form.sent .row, .tdlg-form.sent h4, .tdlg-form.sent .hint { display: none; }
.tdlg-form.sent .ok { display: block; }
