/*
 * Первый экран с фото и поиском - главная и хаб справочника (ночь 20.10.2026, home-hub).
 * Значения - дословно из макетов Home-Tusovka.dc.html и Directory-Tusovka.dc.html
 * (cqw макета = vw: корень макета во всю ширину окна). Разметка - ibd_render_search_hero()
 * (includes/directory-hub.php), поведение - search-hero.js. Телефон - до 759px (как в макете).
 * Специфичность 0,2,0 и выше: tus2.css задаёт .tus2 h1 (0,1,1), старые слои - глобально.
 */

/* ── Фото ─────────────────────────────────────────────── */
.sfh{position:relative}
.sfh .sfh-photo{position:relative;overflow:hidden;background-color:#1E2A32;height:clamp(580px,37vw,720px)}
.sfh--hub .sfh-photo{height:clamp(560px,36vw,700px)}
.sfh .sfh-img{position:absolute;inset:0;display:block;width:100%;height:100%;max-width:none;object-fit:cover;object-position:center 58%}
.sfh .sfh-shade{position:absolute;inset:0;pointer-events:none;
  background-image:linear-gradient(0deg,rgba(10,14,20,.82) 0%,rgba(10,14,20,.34) 42%,rgba(10,14,20,0) 72%),
    linear-gradient(90deg,rgba(10,14,20,.62) 0%,rgba(10,14,20,.16) 48%,rgba(10,14,20,0) 72%)}
[dir="rtl"] .sfh .sfh-shade{background-image:linear-gradient(0deg,rgba(10,14,20,.82) 0%,rgba(10,14,20,.34) 42%,rgba(10,14,20,0) 72%),
    linear-gradient(270deg,rgba(10,14,20,.62) 0%,rgba(10,14,20,.16) 48%,rgba(10,14,20,0) 72%)}
.sfh .sfh-copy{position:relative;z-index:1;height:100%;display:flex;flex-direction:column;justify-content:flex-end;padding-bottom:120px}
.sfh--hub .sfh-copy{padding-bottom:calc(150px - 2.8vw)}
.sfh .sfh-h1{max-width:900px;font-size:clamp(32px,3.1vw,60px);line-height:1.1;font-weight:700;letter-spacing:-.025em;color:#FFFFFF;text-wrap:balance}
.sfh--hub .sfh-h1{max-width:820px}
.sfh .sfh-u{position:relative;z-index:0;white-space:nowrap}
.sfh .sfh-u svg{position:absolute;z-index:-1;left:0;right:0;bottom:.02em;width:100%;height:.3em;color:#FFC24D}
.sfh .sfh-sub{max-width:52ch;margin-top:16px;font-size:clamp(17px,1vw,20px);line-height:1.55;color:#FFFFFF;text-wrap:pretty}

/* ── Карточка поиска ──────────────────────────────────── */
.sfh .sfh-formwrap{position:relative;z-index:5;margin-top:-66px}
.sfh--hub .sfh-formwrap{margin-top:-39px}
.sfh .sf{position:relative;padding:8px;border:1px solid #E3ECF2;border-radius:16px;background:#FFFFFF;box-shadow:0 24px 50px -26px rgba(16,24,40,.5)}
.sf .sf-tabs{display:flex;gap:4px;padding:0 6px;border-bottom:1px solid #E3ECF2}
.sf .sf-tab{position:relative;height:48px;margin:0;padding:0 14px;border:0;border-radius:0;background:transparent;box-shadow:none;font-size:16px;line-height:normal;font-weight:700;white-space:nowrap;color:#39505E;cursor:pointer;min-height:0}
.sf .sf-tab[aria-selected="true"]{color:#1E2A32}
.sf .sf-tab[aria-selected="true"]::after{content:"";position:absolute;left:14px;right:14px;bottom:-1px;height:3px;border-radius:3px;background:#F5820A}
.sf .sf-tab:hover{color:#1E2A32;background:transparent}
.sf .sf-form{margin:0}
.sf .sf-tabs + .sf-form,.sf .sf-tabs ~ .sf-form{margin-top:8px}
.sf .sf-row{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr) auto}
.sf .sf-form--ev .sf-row{grid-template-columns:minmax(0,1.4fr) minmax(0,1fr) minmax(0,1fr) auto}
.sf .sf-field{position:relative;min-width:0}
.sf .sf-field + .sf-field{border-inline-start:1px solid #E3ECF2}
.sf .sf-trig{display:flex;align-items:center;gap:12px;width:100%;height:100%;min-height:60px;margin:0;padding:8px 20px;border:0;border-radius:0;background:transparent;box-shadow:none;font-size:inherit;font-weight:400;line-height:1.5;color:#1E2A32;text-align:start;cursor:pointer}
.sf button.sf-trig{line-height:normal}
.sf .sf-trig:hover,.sf .sf-trig:focus{background:transparent;color:#1E2A32}
.sf .sf-trig--input{cursor:text}
.sf .sf-txt{display:flex;flex:1 1 auto;flex-direction:column;gap:2px;min-width:0}
.sf .sf-lbl{font-size:12px;font-weight:700;color:#39505E}
.sf .sf-val{overflow:hidden;font-size:17px;line-height:1.5;color:#1E2A32;white-space:nowrap;text-overflow:ellipsis}
.sf .sf-val--ph{color:#5B7385}
.sf .sf-trig--input .sf-val{display:none}
.sf input[data-sf-input]{display:block;width:100%;min-width:0;height:auto;min-height:0;margin:0;padding:0;border:0;border-radius:0;outline:none;background:transparent;box-shadow:none;font-size:17px;line-height:normal;color:#1E2A32}
.sf input[data-sf-input]::placeholder{color:#5B7385;opacity:1}
.sf .sf-chev{flex:0 0 18px;color:#39505E;transition:transform .15s}
.sf [aria-expanded="true"] > .sf-chev,.sf .sf-field.is-open .sf-chev{transform:rotate(180deg)}
.sf .sf-nojs{display:none}
.sf .sf-native{width:100%;min-height:0;margin:0;padding:0;border:0;background:transparent;font-size:17px;color:#1E2A32}
.sf .sf-submit{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-width:160px;height:60px;margin:0;padding:0 28px;border:0;border-radius:12px;background:#F5820A;color:#FFFFFF;font-size:17px;line-height:1;font-weight:800;text-shadow:0 1px 1px rgba(120,50,0,.35);white-space:nowrap;cursor:pointer;box-shadow:none}
.sf .sf-submit:hover,.sf .sf-submit:focus-visible{background:#DC7000;color:#FFFFFF}
.sf .sf-submit svg{flex:0 0 20px}

/* ── Выпадающие списки ────────────────────────────────── */
.sf .sf-pop{position:absolute;top:calc(100% + 8px);inset-inline-start:0;z-index:40;width:max(100%,380px);max-height:360px;overflow-y:auto;padding:8px;background:#FFFFFF;border:1.5px solid #E3ECF2;border-radius:16px;box-shadow:0 18px 50px rgba(24,60,90,.18);text-align:start}
.sf .sf-pop[hidden]{display:none}
.sf .sf-pop--when{inset-inline-start:auto;inset-inline-end:0;width:660px;max-width:92vw;max-height:none;overflow:visible;padding:20px 20px 16px}
.sf-list .sf-group{display:flex;flex-direction:column;gap:2px}
.sf-list .sf-gt{padding:12px 14px 6px;font-size:12px;line-height:1.2;font-weight:700;text-transform:uppercase;letter-spacing:.12em;color:#5B7385}
.sf-list .sf-opt{display:flex;align-items:center;gap:12px;min-height:44px;padding:10px 14px;border-radius:10px;background:transparent;font-size:15px;line-height:1.3;color:#1E2A32;cursor:pointer;text-align:start}
.sf-list .sf-opt.is-hi{background:#FFF7EC}
.sf-list .sf-opt[aria-selected="true"]{background:#FDE9CF}
.sf-list .sf-opt-ic{display:flex;flex:0 0 32px;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;background:#FDE9CF;color:#DC7000}
.sf-list .sf-opt-t{flex:1 1 auto;min-width:0;overflow-wrap:anywhere}
.sf-list .sf-opt-t b{font-weight:800}
.sf-list .sf-opt-hint{margin-left:6px;font-weight:500;color:#5B7385}
.sf-list .sf-opt-hint b{font-weight:700;color:#39505E}
.sf-list .sf-opt-ok{flex:0 0 18px;color:#DC7000}
.sf-list .sf-none{padding:12px 14px;font-size:15px;color:#5B7385}
.sf .sf-find{position:sticky;top:-8px;z-index:1;margin:-8px -8px 4px;padding:8px;background:#FFFFFF}
.sf-find label,.sf-sheet .sf-find label{position:relative;display:block;margin:0}
.sf-find .sf-find-ic{position:absolute;inset-inline-start:12px;top:13px;color:#5B7385;line-height:0}
.sf-find input,.sf .sf-find input{display:block;width:100%;height:44px;min-height:44px;margin:0;padding:0 12px;padding-inline-start:40px;border:1.5px solid #E3ECF2;border-radius:10px;outline:none;background:#FFFFFF;box-shadow:none;font-size:16px;line-height:normal;color:#1E2A32}
.sf-find input:focus,.sf .sf-find input:focus,.sf .sf-find input:focus-visible{border-color:#2E86C1;outline:none}

/* ── Календарь «Когда» (Air Datepicker, тема ленты встреч) ── */
.sf .sf-cals{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:28px}
.sf .sf-when-foot,.sf-sheet .sf-when-foot{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px 16px;margin-top:12px;padding-top:14px;border-top:1px solid #E3ECF2}
.sf .sf-when-r{display:flex;align-items:center;gap:16px;min-width:0}
.sf .sf-when-sum,.sf-sheet .sf-when-sum{font-size:14px;color:#39505E}
.sf .sf-reset,.sf-sheet .sf-reset{height:44px;min-height:44px;margin:0;padding:0 4px;border:0;background:transparent;box-shadow:none;font-size:15px;font-weight:700;color:#1F6FA6;cursor:pointer}
.sf .sf-reset:hover,.sf-sheet .sf-reset:hover{text-decoration:underline;background:transparent;color:#1F6FA6}
.sf .sf-done,.sf-sheet .sf-done{display:inline-flex;align-items:center;height:44px;min-height:44px;margin:0;padding:0 22px;border:0;border-radius:12px;background:#F5820A;color:#FFFFFF;font-size:15px;font-weight:800;text-shadow:0 1px 1px rgba(120,50,0,.35);white-space:nowrap;cursor:pointer;box-shadow:none}
.sf .sf-done:hover,.sf-sheet .sf-done:hover{background:#DC7000;color:#FFFFFF}
.sf-cal .air-datepicker{--adp-day-cell-width:1fr;--adp-day-cell-height:38px;--adp-cell-border-radius:9px;--adp-accent-color:#F5820A;--adp-color:#374151;--adp-color-secondary:#9CA3AF;--adp-day-name-color:#9CA3AF;--adp-border-color-inner:transparent;--adp-cell-background-color-selected:#F5820A;--adp-cell-background-color-selected-hover:#DC7000;--adp-cell-background-color-in-range:#FFF7EC;--adp-cell-background-color-in-range-hover:#FDE9CF;--adp-background-color-in-range:#FFF7EC;--adp-font-family:inherit;--adp-width:100%;--adp-padding:0;width:100%;border:0;border-radius:0;background:transparent;font-family:inherit;box-shadow:none}
.sf-cal .air-datepicker-nav{border-bottom:0;padding:0 0 10px;min-height:32px;align-items:center}
.sf-cal .air-datepicker-nav--title{font-size:15px;font-weight:800;color:#1E2A32;pointer-events:none}
.sf-cal .air-datepicker-nav--title i{color:#1E2A32;font-style:normal;margin-inline-start:4px}
.sf-cal .air-datepicker-nav--action{flex:0 0 32px;width:32px;height:32px;border:1px solid #E3ECF2;border-radius:8px;background:#FFFFFF}
.sf-cal .air-datepicker-nav--action:hover{background:#FFF7EC}
.sf-cal .air-datepicker-nav--action path{stroke:#1E2A32}
.sf-cal .air-datepicker-nav--action.-disabled-{visibility:hidden}
.sf-cal[data-cal="a"] .air-datepicker-nav--action[data-action="next"],.sf-cal[data-cal="b"] .air-datepicker-nav--action[data-action="prev"]{visibility:hidden}
.sf-cal .air-datepicker-body--day-name{font-size:12px;font-weight:700;text-transform:none}
.sf-cal .air-datepicker-cell.-day-{font-size:14px;font-weight:600}
.sf-cal .air-datepicker-cell.-current-{color:#1E2A32;position:relative}
.sf-cal .air-datepicker-cell.-current-::after{content:"";position:absolute;left:50%;bottom:5px;width:4px;height:4px;margin-left:-2px;border-radius:50%;background:#F5820A}
.sf-cal .air-datepicker-cell.-day-.-x-in-{background:#FFF7EC;color:#1E2A32;border-radius:0}
.sf-cal .air-datepicker-cell.-day-.-x-end-{background:#F5820A;color:#FFFFFF;font-weight:800;border-radius:9px}
.sf-cal .air-datepicker-cell.-day-.-x-end-.-focus-{background:#DC7000}
.sf-cal .air-datepicker-cell.-current-.-x-end-::after{background:#FFFFFF}
.sf-cal .air-datepicker-cell.-disabled-{color:#C9D3DB}
.sf-cal .air-datepicker-cell.-focus-:not(.-x-end-):not(.-disabled-){background:#FFF7EC}
.sf-cal .air-datepicker-cell.-selected-:not(.-x-end-){background:transparent;color:inherit}

/* ── Быстрые рубрики ──────────────────────────────────── */
.sfh .sfh-chips{display:flex;flex-wrap:wrap;gap:10px;margin-top:28px}
.sfh .sfh-chip{display:inline-flex;align-items:center;gap:8px;height:44px;padding:0 16px;border:1px solid #E3ECF2;border-radius:999px;background:#FFFFFF;font-size:15px;line-height:1;font-weight:600;color:#1E2A32;white-space:nowrap;transition:border-color .15s}
.sfh .sfh-chip svg{flex:0 0 20px;color:#DC7000}
.sfh .sfh-chip:hover,.sfh .sfh-chip:focus-visible{border-color:#F5820A;color:#1E2A32}

/* ── Шторка (телефон) ─────────────────────────────────── */
.sf-sheet{position:fixed;inset:0;z-index:100050;font-family:var(--tus-font,'Onest',system-ui,sans-serif);color:#1E2A32;font-size:16px;line-height:1.5}
.sf-sheet[hidden]{display:none}
.sf-sheet *,.sf-sheet *::before,.sf-sheet *::after{box-sizing:border-box}
.sf-sheet .sf-sheet-bg{position:absolute;inset:0;background:rgba(30,42,50,.45)}
.sf-sheet .sf-sheet-panel{position:absolute;left:0;right:0;bottom:0;display:flex;flex-direction:column;max-height:88%;border-radius:20px 20px 0 0;background:#FFFFFF;box-shadow:0 -10px 40px rgba(24,60,90,.2)}
.sf-sheet .sf-sheet-grip{display:flex;justify-content:center;padding:10px 0 2px}
.sf-sheet .sf-sheet-grip span{width:40px;height:5px;border-radius:3px;background:#D5DEE5}
.sf-sheet .sf-sheet-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 16px 12px}
.sf-sheet .sf-sheet-title{min-width:0;margin:0;font-size:18px;line-height:1.3;font-weight:800;color:#1E2A32;font-family:inherit!important;letter-spacing:normal}
.sf-sheet .sf-sheet-done{flex:0 0 auto;padding:0 20px}
.sf-sheet .sf-find{padding:0 16px 8px}
.sf-sheet .sf-sheet-list{flex:1 1 auto;min-height:0;overflow-y:auto;padding:0 8px calc(16px + env(safe-area-inset-bottom))}
.sf-sheet .sf-sheet-cal{flex:1 1 auto;min-height:0;overflow-y:auto;padding:4px 16px calc(16px + env(safe-area-inset-bottom))}
.sf-sheet .sf-when-foot{margin-top:12px;padding-top:12px;gap:8px 16px}
.sf-sheet button{font-family:inherit}

/* ── Телефон ─────────────────────────────────────────── */
@media (max-width: 759px){
  .sfh--home .sfh-photo{height:520px}
  .sfh--home .sfh-img{object-position:72% 58%}
  .sfh--home .sfh-shade,[dir="rtl"] .sfh--home .sfh-shade{background-image:linear-gradient(0deg,rgba(10,14,20,.85) 0%,rgba(10,14,20,.4) 50%,rgba(10,14,20,0) 80%)}
  .sfh--home .sfh-copy{padding-bottom:92px}
  .sfh--hub .sfh-copy{padding-bottom:calc(150px - 2.8vw)}
  .sfh .sfh-h1{font-size:32px}
  .sfh--home .sfh-h1{line-height:1.12}
  .sfh--home .sfh-sub{margin-top:12px;font-size:17px;line-height:1.5}
  .sfh--home .sfh-formwrap{margin-top:-60px}
  .sfh--hub .sfh-formwrap{margin-top:-105px}
  .sf .sf-tabs{padding:0;gap:0}
  .sf .sf-tab{flex:1 1 0;padding:0 12px}
  .sf .sf-tab[aria-selected="true"]::after{left:12px;right:12px}
  .sf .sf-row,.sf .sf-form--ev .sf-row{display:flex;flex-direction:column}
  .sf .sf-field + .sf-field{border-inline-start:0;border-top:1px solid #E3ECF2}
  .sf .sf-tabs + .sf-form,.sf .sf-tabs ~ .sf-form{margin-top:0}
  .sf .sf-trig{height:64px;min-height:64px;padding:0 14px;line-height:normal}
  .sf .sf-val{line-height:1.4}
  .sf .sf-trig--input .sf-val{display:block}
  .sf input[data-sf-input]{display:none}
  .sf .sf-trig--input{cursor:pointer}
  .sf .sf-submit{width:100%;height:56px;margin-top:8px;min-width:0}
  .sf .sf-pop{display:none!important}
}
