/* Страница /kursy (макет mockups/kursy, одобрен 2026-11-15). База — landing.css:
   токены, шрифт, кнопки, hero, коробка формы, FAQ. Здесь только новое: hero страницы,
   лента и анкета преподавателя, строка «Заявка к» и экран после отправки. */

/* ---------- hero ---------- */
.kh h1{font-size:clamp(1.75rem,5.4vw,3.2rem);}
.kh .hero__place{color:var(--accent-ink);}
.kh__cta{display:flex;flex-wrap:wrap;gap:10px;margin-top:22px;}
.kh__cta .btn--primary,.ask__submit .btn--primary{background:var(--accent-ink);color:#fff;}
.kh__cta .btn--primary:hover,.ask__submit .btn--primary:hover{background:var(--navy);}
@media (max-width:559px){.kh__cta .btn{width:100%;}}
@media (560px <= width < 700px){
  .kh .hero__pic{width:min(100%,420px);justify-self:center;}
}
@media (700px <= width < 860px){
  .kh{padding-block:32px 24px;}
  .kh .hero__grid{grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);align-items:center;gap:24px;}
  .kh .hero__pic{aspect-ratio:4/3;}
  .kh .hero__pic picture{display:block;height:100%;}
  .kh .hero__pic img{object-position:50% 40%;}
}
@media (min-width:860px){.kh__cta{gap:12px;margin-top:32px;}.kh__cta .btn--primary{min-width:240px;}}

/* ---------- лента преподавателей ---------- */
/* Решение по лицу: фото крупное и квадратное, 2 в ряд на телефоне, 4 на десктопе. */
.feed{padding-block:44px 40px;}
.feed__head{display:grid;gap:8px;margin-bottom:24px;}
.feed__head .lead{color:var(--muted);}
.feed__list{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px 12px;}
.tcard{position:relative;isolation:isolate;display:flex;flex-direction:column;gap:10px;min-width:0;}
.tcard__pic{position:relative;margin:0;border-radius:var(--r-md);overflow:hidden;aspect-ratio:1/1;background:var(--sky-soft);}
.tcard__pic img{width:100%;height:100%;object-fit:cover;transition:transform .5s var(--ease);}
/* Анкета без фото: первая буква имени вместо пустого квадрата. */
.tcard__initial{display:grid;place-items:center;width:100%;height:100%;color:var(--navy);font-size:clamp(2.5rem,12vw,4rem);font-weight:800;opacity:.45;}
.tcard__name{font-size:1.05rem;font-weight:800;line-height:1.25;letter-spacing:-.01em;overflow-wrap:anywhere;}
.tcard__dirs{color:var(--muted);font-size:.92rem;line-height:1.4;margin:2px 0 0;}
.tcard__cta{margin-top:auto;width:100%;min-height:44px;padding:10px 12px;font-size:.92rem;}
.tcard__cta[hidden]{display:none;}
.tcard__cta::after{content:"";position:absolute;inset:0;z-index:1;}
/* Сдвиг кнопки из landing.css перехватывает позиционирование её псевдоэлемента. */
.tcard__cta:active{transform:none;}
.tcard:hover .tcard__pic img{transform:scale(1.03);}
/* Выбранный преподаватель: рамка на фото и подпись, без иконок. */
.tcard--picked .tcard__pic{outline:3px solid var(--accent);outline-offset:-3px;}
.tcard__badge{position:absolute;left:10px;top:10px;padding:4px 12px;border-radius:var(--r-full);background:var(--navy);color:#fff;font-size:.78rem;font-weight:700;}
@media (prefers-reduced-motion:reduce){.tcard__pic img{transition:none;}.tcard:hover .tcard__pic img{transform:none;}}
@media (min-width:860px){
  .feed{padding-block:80px 64px;}
  .feed__head{grid-template-columns:1fr auto;align-items:end;gap:24px;margin-bottom:36px;}
  .feed__list{grid-template-columns:repeat(4,minmax(0,1fr));gap:28px;}
  .tcard{gap:14px;}
  .tcard__name{font-size:1.2rem;}
  .tcard__dirs{font-size:1rem;}
  .tcard__cta{font-size:1rem;min-height:48px;}
}

/* ---------- анкета преподавателя ---------- */
html:has(.teacher-profile[open]){overflow:hidden;}
.teacher-profile{
  width:min(100% - 40px,632px);
  max-width:none;
  max-height:none;
  padding:0;
  border:1px solid var(--border-2);
  border-radius:var(--r-lg);
  background:var(--surface);
  color:var(--ink);
  box-shadow:var(--sh-2);
}
.teacher-profile:not([open]){display:none;}
.teacher-profile::backdrop{background:color-mix(in srgb,var(--navy-deep) 56%,transparent);}
.teacher-profile__layout{
  display:grid;
  grid-template-rows:auto minmax(0,1fr) auto;
  max-height:calc(100dvh - 48px);
}
.teacher-profile__head{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:16px;
  padding:24px 28px;
  border-bottom:1px solid var(--border);
  background:var(--bg-tint);
}
.teacher-profile__avatar{
  display:grid;
  place-items:center;
  width:68px;
  aspect-ratio:1;
  overflow:hidden;
  border-radius:var(--r-sm);
  background:var(--sky);
  color:var(--navy);
  font-size:1.5rem;
  font-weight:800;
}
.teacher-profile__avatar img{width:100%;height:100%;object-fit:cover;}
.teacher-profile__head h2{font-size:1.5rem;line-height:1.14;overflow-wrap:anywhere;}
.teacher-profile__head p{margin-top:4px;overflow-wrap:anywhere;}
.teacher-profile__muted{color:var(--muted);font-size:.875rem;}
.teacher-profile__close{
  display:grid;
  place-items:center;
  align-self:start;
  width:44px;
  height:44px;
  padding:0;
  border:1px solid var(--border-2);
  border-radius:var(--r-full);
  background:var(--surface);
  color:var(--navy);
  font:inherit;
  font-size:1.5rem;
  line-height:1;
  cursor:pointer;
}
.teacher-profile__close:hover{background:var(--sky-soft);}
.teacher-profile__body{
  min-height:0;
  overflow-y:auto;
  overscroll-behavior:contain;
  padding:4px 28px;
  scrollbar-color:var(--border-2) transparent;
}
.teacher-profile__body:focus-visible{outline-offset:-4px;}
.teacher-profile__section{padding-block:16px;font-size:.875rem;overflow-wrap:anywhere;}
.teacher-profile__section + .teacher-profile__section{border-top:1px solid var(--border);}
.teacher-profile__section h3{margin-bottom:5px;font-size:1.125rem;line-height:1.35;}
.teacher-profile__section ul{list-style:none;margin:0;padding:0;}
.teacher-profile__section li + li{margin-top:8px;}
.teacher-profile__section li .teacher-profile__muted{display:block;}
.teacher-profile__about{max-width:65ch;white-space:pre-line;}
.teacher-profile__footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px 20px;
  padding:18px 28px;
  border-top:1px solid var(--border);
}
.teacher-profile__price{
  display:flex;
  align-items:baseline;
  flex-wrap:wrap;
  column-gap:9px;
  color:var(--muted);
  font-size:.875rem;
}
.teacher-profile__price strong{color:var(--navy);font-size:1.5rem;line-height:1.2;font-weight:800;}
.teacher-profile__apply{flex:none;background:var(--accent-ink);}
.teacher-profile__apply:hover{background:var(--navy);}
@media (max-width:599px){
  .teacher-profile{inset:auto 0 0;width:100%;margin-block:0;border-radius:var(--r-lg) var(--r-lg) 0 0;}
  .teacher-profile__layout{max-height:calc(100dvh - 28px);}
  .teacher-profile__head{gap:12px;padding:16px;}
  .teacher-profile__avatar{width:48px;font-size:1.125rem;}
  .teacher-profile__head h2{font-size:1.125rem;}
  .teacher-profile__body{padding-inline:16px;}
  .teacher-profile__section{padding-block:12px;}
  .teacher-profile__footer{flex-direction:column;align-items:stretch;padding:12px 16px max(14px,env(safe-area-inset-bottom));}
  .teacher-profile__price{justify-content:center;}
  .teacher-profile__apply{min-height:46px;padding-block:10px;}
}

/* ---------- форма: строка «Заявка к» ---------- */
.ask{padding-block:8px 48px;}
.ask__pick{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;padding:10px 14px 10px 10px;border-radius:var(--r-sm);background:#fff;border:1.5px solid var(--accent);}
.ask__pick img{width:44px;height:44px;border-radius:50%;flex:none;object-fit:cover;}
.ask__pick p{min-width:0;margin:0;color:var(--ink);font-weight:500;overflow-wrap:anywhere;}
.ask__pick strong{color:var(--navy);font-weight:800;}
.ask__pick .link{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;}
.ask__form .chip[hidden]{display:none;}
@media (min-width:860px){.ask{padding-block:8px 80px;}}

/* ---------- заявка отправлена ---------- */
.kursy-sent-page{
  display:flex;
  flex-direction:column;
  min-height:100svh;
  color-scheme:light;
}
.kursy-sent{
  flex:1;
  display:grid;
  place-items:center;
  padding:clamp(40px,8vw,96px) var(--gut);
  background:var(--bg-tint);
}
.kursy-sent__panel{
  width:min(100%,36rem);
  padding:clamp(28px,6vw,56px) clamp(16px,5vw,44px);
  border:1px solid var(--border-2);
  border-radius:var(--r-lg);
  background:var(--surface);
  text-align:center;
}
.kursy-sent__check{
  display:grid;
  place-items:center;
  width:56px;
  height:56px;
  margin:0 auto 20px;
  border-radius:50%;
  background:color-mix(in srgb,var(--good) 12%,var(--surface));
  color:var(--good);
}
.kursy-sent__check::before{
  content:"";
  width:13px;
  height:23px;
  border:solid currentColor;
  border-width:0 3px 3px 0;
  transform:translateY(-2px) rotate(45deg);
}
.kursy-sent__message{max-width:36ch;margin:12px auto 0;}
.kursy-sent__back{
  display:inline-block;
  min-height:44px;
  margin-top:12px;
  padding-block:9px;
  color:var(--accent-ink);
  font-weight:600;
  text-underline-offset:3px;
}
.kursy-sent__back:hover,.kursy-sent__back:focus-visible{text-decoration:underline;}
