/* Plugin-owned brand and layout work without CSS variables or resets from the site theme. */
.tqm, .tqm-image-viewer { --tqm-font: 'Proba Pro', 'Noto Sans Georgian', Arial, sans-serif; --tqm-brand: var(--red, #d92819); font-synthesis: none; }
.tqm :where(h1,h2,h3,p,ul,ol,figure,dl,dt,dd) { margin: 0; padding: 0; }
.tqm > .container { width: 100%; margin-inline: auto; padding-inline: 32px; }
.tqm button, .tqm input, .tqm textarea, .tqm select { box-shadow: none; }
.tqm button::before, .tqm button::after { content: none; }
.tqm a { background-image: none; box-shadow: none; }
.tqm img { max-width: 100%; }
.tqm [hidden] { display: none !important; }
/* Teqtum Masters. Своя типографика; оттенок красного наследуется от темы при наличии --red. */
.tqm { --tqm-dark: #1e1e1e; --tqm-gold: #d4af37; --tqm-gold-dark: #7a5c00; --tqm-grey: #f2f2f2; --tqm-line: #e8e8e8; --tqm-muted: #666; --tqm-wa: #25d366; }
.tqm .container { max-width: 960px; }
.section.tqm[is="masters_card"] .container, .section.tqm.tqm-training-page .container { max-width: 1440px; }
.tqm { font-family: var(--tqm-font); }
.tqm *, .tqm *::before, .tqm *::after { box-sizing: border-box; }

/* Полоса страницы. Тема ведёт страницу цветом во всю ширину — фотография, светлая полоса,
   тёмный подвал, — и голого белого проёма на ней не бывает нигде. Наши секции живут по тем же
   правилам: цвет на всю ширину, содержимое в колонке. В макете клиента фон под карточкой
   тоже светлый (--g1), белым он стал только у нас при сборке. */
.section.tqm { padding-bottom: 100px; background: var(--tqm-grey); }
.section.tqm[is="verify"] { background: var(--tqm-dark); }
/* Список центров идёт вместе с остальными блоками страницы, поэтому и колонка у него как у темы */
.section.tqm[is="centers"] .container { max-width: 1440px; }
/* вход и центры стоят подряд и оба на светлой полосе: без этого между ними 200 px пустого серого */
.section.tqm + .section.tqm { padding-top: 0; }

/* Кнопки */
/* Геометрия кнопки взята у темы: 12 px, обычное начертание, разрядка 2 px, прописными.
   Кнопка — самый повторяемый элемент страницы, по ней вставка и опознаётся как чужая. */
.tqm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 18px 32px; font: 400 12px/1.2 var(--tqm-font); letter-spacing: 2px; text-transform: uppercase; text-decoration: none; border: 0; border-radius: 0; cursor: pointer; transition: opacity .2s; }
.tqm-btn:hover { opacity: .85; }
.tqm-btn--wa { background: var(--tqm-wa); color: #fff; }
.tqm-btn--red { background: var(--tqm-brand); color: #fff; }
.tqm-btn--ghost { background: transparent; color: inherit; border: 1px solid rgba(255,255,255,.25); }
.tqm-state .tqm-btn--ghost { border-color: var(--tqm-line); color: var(--tqm-dark); }
.tqm-label { font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: rgba(255,255,255,.55); margin-bottom: 8px; }
.tqm-label--gold { color: var(--tqm-gold); }
.tqm-pill { display: inline-block; padding: 3px 12px; border-radius: 0; font-size: 12px; font-weight: 700; letter-spacing: .1em; }
.tqm-pill--gold { background: var(--tqm-gold); color: var(--tqm-gold-dark); }

/* Карточка: профиль, примеры работ, подробности. Без вложенных плиток. */
.section.tqm[is="masters_card"] { padding-top: 32px; background: #fff; }
.tqm-card { --tqm-card-space: 32px; color: var(--tqm-dark); background: #fff; font: 400 16px/1.5 var(--tqm-font); }
.tqm-card :is(h1,h2,p,figure,dl,dd,ul) { margin: 0; }
.tqm-card :is(h1,h2,p,span,dd,a,strong) { overflow-wrap: anywhere; }
.tqm-card h2 { font: 500 24px/1.25 var(--tqm-font); text-transform: none; letter-spacing: 0; color: var(--tqm-dark); }
.tqm-card .tqm-btn, .tqm-training-page .tqm-btn, .tqm-mobile-contact .tqm-btn { min-height: 48px; padding: 14px 24px; font: 500 15px/1.3 var(--tqm-font); text-transform: none; letter-spacing: 0; }
.tqm-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 32px; align-items: center; padding: 8px 0 28px; }
.tqm-head--portrait { grid-template-columns: 180px minmax(0, 1fr) auto; }
.tqm-profile-cover { display: contents; }
.tqm-profile-summary { grid-column: 1; grid-row: 2; min-width: 0; }
.tqm-head--portrait .tqm-profile-summary { grid-column: 2; }
.tqm-portrait { grid-column: 1; grid-row: 1 / 3; width: 180px; height: 180px; align-self: start; }
.tqm-portrait img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tqm-identity { grid-column: 1; grid-row: 1; min-width: 0; }
.tqm-head--portrait .tqm-identity { grid-column: 2; align-self: start; }
.tqm-badge { margin-bottom: 6px; font: 500 14px/1.3 var(--tqm-font); color: #555; }
.tqm-badge--ambassador { display: inline-block; max-width: 100%; padding: 7px 12px; background: var(--tqm-gold); color: var(--tqm-dark); font-size: 16px; font-weight: 700; line-height: 1.25; }
.tqm-card .tqm-name { margin-bottom: 8px; font: 500 36px/1.15 var(--tqm-font); color: var(--tqm-dark); letter-spacing: 0; text-transform: none; text-wrap: balance; }
.tqm-card .tqm-location { margin-bottom: 5px; color: #555; font-size: 16px; line-height: 1.4; }
.tqm-status { min-width: 0; font: 400 14px/1.5 var(--tqm-font); }
.tqm-check { color: #28623a; }
.tqm-status--expired { color: #854711; }
.tqm-card .tqm-notice { max-width: 65ch; font-size: 14px; line-height: 1.5; }
.tqm-profile-contact { grid-column: -2; grid-row: 1 / 3; display: flex; flex-direction: column; align-items: stretch; gap: 12px; min-width: 240px; text-align: center; }
.tqm-phone { color: #444; font: 400 14px/1.4 var(--tqm-font); text-decoration: underline; text-underline-offset: 3px; }
.tqm-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Работы: фотографии и подписи без отдельных карточек и рамок. */
.tqm-portfolio { padding: 24px 0 32px; border-top: 1px solid var(--tqm-line); }
.tqm-portfolio-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin-bottom: 18px; }
.tqm-portfolio-head > span { color: var(--tqm-muted); font-size: 14px; }
/* Как в утверждённом макете 14.08: на десктопе всегда три колонки, шесть работ - два ряда. */
.tqm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tqm-photo { min-width: 0; }
.tqm-photo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; background: var(--tqm-grey); }
.tqm-photo figcaption { padding-top: 10px; display: flex; flex-direction: column; gap: 3px; font: 400 14px/1.4 var(--tqm-font); }
.tqm-photo figcaption strong { font-weight: 500; color: var(--tqm-dark); }
.tqm-photo figcaption > span { color: var(--tqm-muted); }
.tqm-gallery-controls { display: none; }
.tqm-empty { margin: 0; padding: 16px 0; color: var(--tqm-muted); font: 400 15px/1.5 var(--tqm-font); }

/* Информация и сертификаты отделяются только горизонтальной линией. */
.tqm-details { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; padding: 28px 0 32px; border-top: 1px solid var(--tqm-line); }
.tqm-details > :only-child { grid-column: 1 / -1; }
.tqm-details h2 { margin-bottom: 18px; }
.tqm-card .tqm-about { max-width: 65ch; white-space: pre-line; font: 400 16px/1.6 var(--tqm-font); color: #444; }
.tqm-card .tqm-profile-facts { display: grid; gap: 10px; margin-top: 20px; }
.tqm-profile-facts > div, .tqm-certificate-facts > div { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.tqm-profile-facts dt, .tqm-certificate-facts dt { color: var(--tqm-muted); }
.tqm-profile-facts dd, .tqm-certificate-facts dd { color: var(--tqm-dark); }
.tqm-profile-facts { font-size: 14px; }
.tqm-card .tqm-courses { list-style: none; padding: 0; display: grid; gap: 22px; }
.tqm-courses li { display: flex; align-items: start; gap: 20px; min-width: 0; }
.tqm-certificate-link { flex: 0 0 80px; text-align: center; font: 400 13px/1.4 var(--tqm-font); color: var(--tqm-brand); background-image: none; }
.tqm-certificate-link > span { display: block; margin-top: 6px; text-decoration: underline; text-underline-offset: 3px; }
.tqm-certificate { display: block; width: 80px; height: 106px; object-fit: contain; }
.tqm-course-info { min-width: 0; }
.tqm-course-title { display: block; font: 500 17px/1.4 var(--tqm-font); }
.tqm-course-meta { display: flex; flex-direction: column; gap: 5px; margin-top: 8px; color: #555; font: 400 14px/1.5 var(--tqm-font); }
.tqm-course--expired .tqm-course-date { color: #854711; }
.tqm-card .tqm-certificate-facts { display: grid; gap: 8px; margin-top: 20px; font: 400 14px/1.5 var(--tqm-font); }
.tqm-certificate-facts dd { font-weight: 500; font-variant-numeric: tabular-nums; }
.tqm-card .tqm-code-hint { margin-top: 8px; color: var(--tqm-muted); font-size: 13px; line-height: 1.5; }
.tqm-guarantee { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--tqm-line); font-size: 14px; }
.tqm-guarantee strong { display: block; color: #444; font-weight: 500; }
.tqm-card .tqm-guarantee p { margin-top: 10px; color: var(--tqm-muted); font-size: 14px; line-height: 1.5; }

/* Заявка готовит сообщение; необязательные поля не превращаем в обязательную анкету. */
.tqm-request { padding: 28px 0 32px; border-top: 1px solid var(--tqm-line); }
.tqm-card .tqm-request-intro { margin: 10px 0 22px; color: var(--tqm-muted); font: 400 14px/1.5 var(--tqm-font); }
.tqm-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, .7fr) auto; align-items: start; gap: 18px; }
.tqm-form label { display: flex; flex-direction: column; min-width: 0; margin: 0; gap: 8px; font: 400 14px/1.4 var(--tqm-font); color: #444; }
.tqm-form label > span { color: inherit; text-transform: none; letter-spacing: 0; }
.tqm-form input, .tqm-form textarea { width: 100%; min-width: 0; min-height: 48px; font: 400 16px/1.4 var(--tqm-font); padding: 12px; border: 0; border-bottom: 1px solid #999; border-radius: 0; background: #f7f7f7; color: var(--tqm-dark); }
.tqm-form textarea { resize: vertical; }
.tqm-request-send { margin-top: 27.6px; }
.tqm-form .tqm-field-error { color: #a92418; font: 400 14px/1.45 var(--tqm-font); }
.tqm-field-error:empty { display: none; }
.tqm-form input[aria-invalid="true"] { border-bottom-color: #a92418; }
.tqm-card :is(input,textarea,button,a,summary):focus-visible, .tqm-center-directory :is(select,button,a):focus-visible, .tqm-mobile-contact a:focus-visible { outline: 2px solid var(--tqm-brand); outline-offset: 3px; }
.tqm-request-extra { grid-column: 1 / -1; font-size: 14px; color: #555; }
.tqm-request-extra summary { width: fit-content; padding: 8px 0; cursor: pointer; }
.tqm-request-extra-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); align-items: start; gap: 18px; padding-top: 14px; }
.tqm-form .tqm-note { grid-column: 1 / -1; font: 400 14px/1.5 var(--tqm-font); color: var(--tqm-muted); }
.tqm-foot { padding: 20px 0; border-top: 1px solid var(--tqm-line); font-size: 14px; }
.tqm-foot a { color: var(--tqm-brand); }
.tqm-mobile-contact { display: none; }

/* Public entry, certificate check and unavailable cards share the master card's scale. */
.section.tqm.tqm-public { --tqm-copy: 18px; --tqm-public-title: 44px; padding-block: 64px 80px; background: #fff; color: var(--tqm-dark); font: 400 var(--tqm-copy)/1.5 var(--tqm-font); }
.section.tqm.tqm-public > .container { width: 100%; max-width: 720px; padding-inline: 32px; }
.tqm-public :is(h1,h2,p) { margin: 0; overflow-wrap: anywhere; }
.tqm-public .tqm-entry-intro { margin-bottom: 32px; }
.tqm-public :is(.tqm-entry-title,.tqm-state-title) { margin: 0; font: 500 var(--tqm-public-title)/1.12 var(--tqm-font); color: var(--tqm-dark); letter-spacing: 0; text-transform: none; text-wrap: pretty; }
.tqm-public .tqm-entry-description { margin-top: 16px; font-size: var(--tqm-copy); line-height: 1.5; color: #555; }
.tqm-entry-fields, .tqm-verify-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; width: 100%; }
.tqm-entry-field { min-width: 0; }
.tqm-entry-field label { display: block; margin-bottom: 8px; color: #444; font: 400 var(--tqm-copy)/1.5 var(--tqm-font); text-transform: none; letter-spacing: 0; }
.tqm-entry-field input { box-sizing: border-box; width: 100%; min-width: 0; min-height: 56px; padding: 14px 16px; border: 0; border-bottom: 1px solid #999; border-radius: 0; background: #f7f7f7; color: var(--tqm-dark); font: 400 var(--tqm-copy)/1.5 var(--tqm-font); font-variant-numeric: tabular-nums; letter-spacing: 0; box-shadow: none; }
.tqm-public .tqm-btn { min-height: 56px; padding: 14px 24px; font: 500 var(--tqm-copy)/1.35 var(--tqm-font); letter-spacing: 0; text-transform: none; white-space: normal; text-align: center; overflow-wrap: anywhere; }
.tqm-public .tqm-btn--ghost { border-color: var(--tqm-line); color: var(--tqm-dark); }
.tqm-public :is(input,a,button):focus-visible { outline: 2px solid var(--tqm-brand); outline-offset: 3px; }
.tqm-public input[aria-invalid="true"] { border-bottom-color: var(--tqm-brand); }
.tqm-public .tqm-entry-field .tqm-field-error { margin: 8px 0 0; color: #a92418; font: 400 var(--tqm-copy)/1.5 var(--tqm-font); overflow-wrap: anywhere; }
.tqm-public .tqm-entry-help { margin-top: 16px; color: #666; font-size: var(--tqm-copy); line-height: 1.5; }
.tqm-entry-footer { border-top: 1px solid var(--tqm-line); margin-top: 24px; padding-top: 20px; font-size: var(--tqm-copy); }
.tqm-public a:not(.tqm-btn) { color: var(--tqm-brand); text-decoration: underline; text-underline-offset: 4px; background-image: none; }
.tqm-entry-phone { margin-top: 20px; font-size: var(--tqm-copy); }
.tqm-entry-phone a { display: inline-flex; align-items: center; min-height: 48px; }
.tqm-entry-footer a { display: inline-flex; align-items: center; min-height: 48px; }
.tqm-public .tqm-message, .tqm-verify-result { margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--tqm-line); font-size: var(--tqm-copy); line-height: 1.5; overflow-wrap: anywhere; }
.tqm-public .tqm-message:empty, .tqm-verify-result:empty { display: none; }
.tqm-message--ok, .tqm-verify-result--ok { color: #28623a; }
.tqm-message--error, .tqm-verify-result--error { color: #a92418; }
.tqm-verify-result--expired, .tqm-verify-result--warn { color: #854711; }
.tqm-verify-result a { display: inline-flex; align-items: center; min-height: 48px; margin-top: 8px; }
.tqm-public button:disabled { opacity: .5; cursor: wait; }
.tqm-public .tqm-state { padding: 0; border: 0; background: #fff; text-align: start; }
.tqm-state .tqm-label { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--tqm-line); color: #666; font: 400 var(--tqm-copy)/1.5 var(--tqm-font); letter-spacing: 0; font-variant-numeric: tabular-nums; }
.tqm-public .tqm-state-text { margin-top: 16px; color: #555; font-size: var(--tqm-copy); line-height: 1.5; }
.tqm-state .tqm-actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 32px; }
#teqtum-master-verify, #teqtum-training-centers { scroll-margin-top: 160px; }
.tqm-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 767px) {
  .section.tqm.tqm-public { --tqm-public-title: 36px; padding-block: 32px 48px; }
  .section.tqm.tqm-public > .container { padding-inline: 20px; }
  .tqm-public .tqm-entry-intro { margin-bottom: 24px; }
  #teqtum-master-verify, #teqtum-training-centers { scroll-margin-top: 128px; }
}

/* Center directory uses the same readable type and open layout as the master card. */
.section.tqm[is="centers"] { background: #fff; }
.section.tqm[is="centers"] > .container { padding-inline: 32px; }
.tqm-center-directory { --tqm-copy: 18px; color: var(--tqm-dark); font: 400 var(--tqm-copy)/1.5 var(--tqm-font); }
.tqm-centers-head { padding: 0 0 28px; border-bottom: 1px solid var(--tqm-line); }
.tqm-centers-head h2 { margin: 0 0 28px; font: 500 44px/1.12 var(--tqm-font); color: var(--tqm-dark); letter-spacing: 0; text-transform: none; overflow-wrap: anywhere; text-wrap: pretty; }
.tqm-center-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 16px; }
.tqm-center-filters[hidden] { display: none; }
.tqm-center-filter-country { width: auto; flex: 0 1 240px; min-width: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: var(--tqm-copy); }
.tqm-center-filter-country > span { color: #444; font-size: var(--tqm-copy); font-weight: 400; text-transform: none; letter-spacing: 0; }
.tqm-center-filters select, .tqm-center-filter-type { min-height: 56px; padding: 14px 16px; border: 1px solid var(--tqm-line); border-radius: 0; background: #fff; color: var(--tqm-dark); font: 400 var(--tqm-copy)/1.4 var(--tqm-font); cursor: pointer; white-space: normal; }
.tqm-center-filters select { width: 100%; border: 0; border-bottom: 1px solid #999; background-color: #f7f7f7; appearance: none; -webkit-appearance: none; padding-right: 48px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%231e1e1e' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; background-size: 16px; }
.tqm-center-filters option { background: #fff; color: var(--tqm-dark); }
.tqm-center-filter-type[aria-pressed="true"] { background: var(--tqm-dark); color: #fff; border-color: var(--tqm-dark); }
.tqm-center-directory :is(select,button,a):focus-visible { outline: 2px solid var(--tqm-brand); outline-offset: 3px; }
.tqm-centers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; padding: 28px 0; }
.tqm-center { min-width: 0; padding: 24px 0; background: #fff; border: 0; border-bottom: 1px solid var(--tqm-line); display: flex; flex-direction: column; align-items: start; }
.tqm-center[hidden], .tqm-center-no-match[hidden] { display: none; }
.tqm-center :is(h3,p) { margin: 0; }
.tqm-center-type { font-size: var(--tqm-copy); font-weight: 400; color: #666; margin-bottom: 12px; }
.tqm-center-type--tc { color: var(--tqm-brand); }
.tqm-center .tqm-center-name { font: 500 30px/1.25 var(--tqm-font); letter-spacing: 0; text-transform: none; margin-bottom: 8px; overflow-wrap: anywhere; }
.tqm-center-city { font-size: var(--tqm-copy); color: #666; line-height: 1.5; overflow-wrap: anywhere; }
.tqm-center-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; width: 100%; margin: 24px 0; padding: 20px 0; border-block: 1px solid var(--tqm-line); }
.tqm-center-stats > div { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tqm-center-stats dt { order: 2; line-height: 1.5; font-size: var(--tqm-copy); color: #666; overflow-wrap: anywhere; }
.tqm-center-stats dd { order: 1; margin: 0; font-size: 26px; line-height: 1.3; font-weight: 500; overflow-wrap: anywhere; }
.tqm-center-stats .tqm-center-graduates dd { color: var(--tqm-brand); }
.tqm-center-link { display: inline-flex; align-items: center; min-height: 48px; margin-top: auto; font-size: var(--tqm-copy); font-weight: 400; color: var(--tqm-brand); text-decoration: underline; text-underline-offset: 4px; background-image: none; }
.tqm-center--open { justify-content: center; align-items: start; padding: 28px; background: #f7f7f7; }
.tqm-center--open .tqm-btn { margin-top: 24px; min-height: 56px; padding: 14px 24px; font: 500 var(--tqm-copy)/1.35 var(--tqm-font); text-transform: none; letter-spacing: 0; white-space: normal; text-align: center; max-width: 100%; }
.tqm-center-no-match { grid-column: 1 / -1; font-size: var(--tqm-copy); }
@media (max-width: 767px) {
  .section.tqm[is="centers"] > .container { padding-inline: 20px; }
  .tqm-centers-head h2 { font-size: 36px; }
  .tqm-center .tqm-center-name { font-size: 26px; }
  .tqm-center-filter-country { flex-basis: 100%; }
  .tqm-center-filter-type { max-width: 100%; overflow-wrap: anywhere; }
  .tqm-centers { gap: 24px; }
  .tqm-center-stats { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .tqm-center-stats > div { display: grid; grid-template-columns: minmax(0, 1fr) fit-content(40%); align-items: baseline; gap: 16px; }
  .tqm-center-stats dt { order: 0; }
  .tqm-center-stats dd { text-align: end; }
  .tqm-center--open { padding: 24px; }
}

@media (max-width: 767px) {
  .section.tqm { padding-bottom: 48px; }
  .tqm-btn { padding: 16px 24px; }
  .tqm-centers { grid-template-columns: 1fr; }
  .tqm-actions .tqm-btn { width: 100%; }
}

.tqm-image-link { display: block; cursor: zoom-in; }
.tqm-portrait .tqm-image-link { width: 100%; height: 100%; }
.tqm-image-link:focus-visible { outline: 3px solid var(--tqm-brand); outline-offset: -3px; }
.tqm-image-viewer { box-sizing: border-box; width: fit-content; max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); padding: 52px 12px 12px; border: 0; background: #171717; color: #fff; margin: auto; }
.tqm-image-viewer::backdrop { background: rgba(0,0,0,.85); }
.tqm-image-viewer[open] { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.tqm-image-viewer img { display: block; width: auto; height: auto; max-width: 100%; max-height: calc(100dvh - 140px); object-fit: contain; }
.tqm-image-viewer-close { position: absolute; top: 4px; right: 8px; min-width: 44px; min-height: 44px; padding: 8px; border: 0; background: transparent; color: #fff; cursor: pointer; font: 32px/1 var(--tqm-font); }
.tqm-image-viewer-close:focus-visible { outline: 2px solid #fff; }
.tqm-image-viewer-caption { margin: 0; max-width: 100%; overflow-wrap: anywhere; font: 14px/1.4 var(--tqm-font); text-align: center; }

@media (min-width: 768px) and (max-width: 1100px) {
  .tqm-head, .tqm-head--portrait { grid-template-columns: 140px minmax(0, 1fr); }
  .tqm-head:not(.tqm-head--portrait) { grid-template-columns: minmax(0, 1fr); }
  .tqm-portrait { width: 140px; height: 140px; }
  .tqm-profile-contact { grid-column: 1 / -1; grid-row: auto; flex-direction: row; align-items: center; margin-top: 10px; }
  .tqm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tqm-details { gap: 32px; }
  .tqm-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tqm-request-send { grid-column: 1 / -1; margin-top: 0; }
}
@media (max-width: 767px) {
  .section.tqm[is="masters_card"]:not(.tqm-public) { padding-top: 0; padding-bottom: 32px; }
  .section.tqm[is="masters_card"] > .container { padding-inline: 20px; }
  .tqm-head, .tqm-head--portrait { display: block; padding: 0; }
  .tqm-profile-cover { display: block; }
  .tqm-identity { padding: 20px 0 14px; }
  .tqm-head--portrait .tqm-profile-cover { position: relative; margin-inline: -20px; }
  .tqm-head--portrait .tqm-portrait { width: 100%; height: auto; margin: 0; }
  .tqm-head--portrait .tqm-portrait .tqm-image-link { height: auto; }
  .tqm-head--portrait .tqm-portrait img { width: 100%; height: auto; object-fit: contain; object-position: center; }
  .tqm-head--portrait .tqm-identity { position: absolute; pointer-events: none; inset: 0; width: 100%; height: 100%; align-self: stretch; display: flex; flex-direction: column; justify-content: end; padding: 20px; background: linear-gradient(transparent 52%, rgba(0,0,0,.78)); }
  .tqm-card .tqm-name { margin: 0; font-size: 30px; line-height: 1.12; text-wrap: pretty; }
  .tqm-head--portrait .tqm-name { color: #fff; }
  .tqm-badge { margin-bottom: 8px; font-size: 14px; }
  .tqm-badge--ambassador { font-size: 16px; }
  .tqm-head--portrait .tqm-badge { position: absolute; top: 16px; left: 20px; max-width: calc(100% - 40px); margin: 0; padding: 6px 10px; color: #fff; background: rgba(30,30,30,.8); }
  .tqm-head--portrait .tqm-badge--ambassador { padding: 7px 12px; color: var(--tqm-dark); background: var(--tqm-gold); font-size: 16px; font-weight: 700; }
  .tqm-profile-summary { padding: 14px 0 18px; }
  .tqm-card .tqm-location { font-size: 15px; }
  .tqm-status { font-size: 14px; line-height: 1.4; }
  .tqm-profile-contact { display: none; }
  .tqm-card h2 { font-size: 21px; }
  .tqm-portfolio { padding: 20px 0 24px; }
  .tqm-portfolio-head { gap: 6px 12px; margin-bottom: 14px; }
  .tqm-portfolio-head > span { font-size: 14px; }
  .tqm-grid { display: flex; gap: 12px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .tqm-grid::-webkit-scrollbar { display: none; }
  .tqm-grid--multiple::after { content: ""; flex: 0 0 16px; }
  .tqm-grid[data-tqm-carousel-ready] .tqm-photo:not([data-tqm-active]) figcaption { visibility: hidden; }
  .tqm-photo { flex: 0 0 calc(100% - 28px); scroll-snap-align: start; }
  .tqm-photo:only-child { flex-basis: 100%; }
  .tqm-photo img { aspect-ratio: 3 / 2; }
  .tqm-photo figcaption { padding-top: 10px; font-size: 14px; }
  .tqm-gallery-controls:not([hidden]) { display: flex; align-items: center; justify-content: end; gap: 4px; margin-top: 6px; color: #555; font: 400 13px/1.4 var(--tqm-font); }
  .tqm-gallery-controls button { width: 44px; height: 44px; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--tqm-dark); cursor: pointer; font: 400 23px/1 var(--tqm-font); touch-action: manipulation; }
  .tqm-gallery-controls button:disabled { opacity: .3; cursor: default; }
  .tqm-gallery-controls button:not(:disabled):hover { color: var(--tqm-brand); }
  .tqm-details { display: block; padding: 0; border-top: 0; }
  .tqm-details > section { padding: 24px 0; border-top: 1px solid var(--tqm-line); }
  .tqm-details h2 { margin-bottom: 16px; }
  .tqm-card .tqm-about { font-size: 16px; }
  .tqm-course-meta { font-size: 14px; }
  .tqm-certificate-link { flex-basis: 76px; }
  .tqm-certificate { width: 76px; height: 101px; }
  .tqm-courses li { gap: 16px; }
  .tqm-profile-facts > div, .tqm-certificate-facts > div { justify-content: space-between; gap: 4px 16px; }
  .tqm-profile-facts dd, .tqm-certificate-facts dd { text-align: end; }
  .tqm-request { padding: 24px 0; }
  .tqm-form, .tqm-request-extra-fields { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .tqm-request-send { margin-top: 0; }
  .tqm-mobile-contact { position: fixed; z-index: 50; bottom: 0; left: 0; right: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 20px; padding: 12px max(20px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); border-top: 1px solid #ddd; background: #fff; }
  .tqm-mobile-contact[hidden] { display: none; }
  .tqm-mobile-contact .tqm-btn { min-width: 0; padding: 13px 12px; font-size: 14px; }
  .tqm-mobile-contact .tqm-phone { display: flex; align-items: center; min-height: 44px; }
  .tqm-card--contact .tqm-foot { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
}

.tqm-image-viewer { overscroll-behavior: contain; }
.tqm-image-viewer img { max-height: calc(100dvh - 225px); }
/* На широком десктопе подпись в одну строку: фото в просмотре занимает почти весь экран, заметно крупнее плитки.
   На 768-1100 подпись может занять две строки, поэтому там прежние 225px, иначе в окне появляется прокрутка. */
@media (min-width: 1101px) { .tqm-image-viewer img { max-height: calc(100dvh - 190px); } }
/* Длинная подпись (2-3 строки): картинка ужимается под неё, а не толкает диалог до прокрутки */
.tqm-image-viewer img { flex: 0 1 auto; min-height: 0; }
.tqm-image-viewer[open] { overflow: hidden; }
.tqm-image-viewer-navigation { display: flex; align-items: center; justify-content: center; gap: 20px; width: 100%; font: 400 14px/1.4 var(--tqm-font); }
.tqm-image-viewer-navigation[hidden] { display: none; }
.tqm-image-viewer-navigation button { width: 48px; height: 44px; padding: 0; border: 0; background: transparent; color: #fff; font: 400 26px/1 var(--tqm-font); cursor: pointer; touch-action: manipulation; }
.tqm-image-viewer-navigation button[aria-disabled="true"] { opacity: .3; cursor: default; }
.tqm-image-viewer-navigation button:focus-visible { outline: 2px solid #fff; }
.tqm-image-viewer-navigation button:not([aria-disabled="true"]):hover { background: #333; }
@media (prefers-reduced-motion: reduce) { .tqm-btn { transition: none; } }

/* The existing theme uses these body classes for its full-screen menus. */
body.nav_mobile_active .tqm-mobile-contact, body.nav_desktop_active .tqm-mobile-contact { display: none; }

/* Accepted reading scale shared by master/center pages and the image viewer. */
.tqm-card, .tqm-training-page, .tqm-mobile-contact, .tqm-image-viewer {
  --tqm-copy: 18px;
  --tqm-heading: 30px;
  --tqm-name-size: 44px;
  --tqm-badge-size: 22px;
}
.tqm-card { font-size: var(--tqm-copy); }
.tqm-card :is(.tqm-location, .tqm-status, .tqm-notice, .tqm-portfolio-head > span,
  .tqm-photo figcaption, .tqm-gallery-controls, .tqm-about, .tqm-profile-facts,
  .tqm-certificate-link, .tqm-course-meta, .tqm-certificate-facts, .tqm-code-hint,
  .tqm-guarantee, .tqm-guarantee p, .tqm-request-intro, .tqm-form label,
  .tqm-form input, .tqm-form textarea, .tqm-field-error, .tqm-request-extra,
  .tqm-note, .tqm-foot, .tqm-empty) {
  font-size: var(--tqm-copy);
  line-height: 1.5;
}
.tqm-card h2 { font-size: var(--tqm-heading); line-height: 1.25; }
.tqm-card .tqm-name { font-size: var(--tqm-name-size); line-height: 1.12; }
.tqm-card .tqm-badge { font-size: var(--tqm-copy); line-height: 1.3; }
.tqm-card .tqm-badge--ambassador { font-size: var(--tqm-badge-size); line-height: 1.25; }
.tqm-card .tqm-course-title { font-size: 20px; line-height: 1.4; }
.tqm-card .tqm-btn, .tqm-training-page .tqm-btn, .tqm-mobile-contact .tqm-btn {
  min-height: 56px;
  font-size: var(--tqm-copy);
  line-height: 1.35;
}
.tqm-mobile-contact { gap: 12px; }
.tqm-card .tqm-phone, .tqm-mobile-contact .tqm-phone { font-size: var(--tqm-copy); line-height: 1.4; }
.tqm-card .tqm-form input, .tqm-card .tqm-form textarea { min-height: 56px; }
.tqm-card .tqm-certificate-link { flex-basis: 104px; }
.tqm-card .tqm-certificate { width: 104px; height: 138px; }
.tqm-card .tqm-gallery-controls button { width: 48px; height: 48px; font-size: 28px; }
.tqm-image-viewer-caption, .tqm-image-viewer-navigation {
  font-size: var(--tqm-copy);
  line-height: 1.4;
}
.tqm-image-viewer-navigation button { font-size: 30px; }
.tqm-image-viewer-close { font-size: 36px; }
@media (max-width: 767px) {
  .tqm-card, .tqm-training-page, .tqm-mobile-contact, .tqm-image-viewer {
    --tqm-heading: 26px;
    --tqm-name-size: 36px;
    --tqm-badge-size: 20px;
  }
  .tqm-card--contact .tqm-foot { padding-bottom: calc(var(--tqm-contact-height, 112px) + 32px); }
  body.teqtum-master-page:has(.tqm-card--contact) :is(.chat_btn, .cookieMessage__manage) {
    bottom: calc(var(--tqm-contact-height, 81px) + 16px);
  }
}
@media (min-width: 1101px) {
  .tqm-card .tqm-request-send { margin-top: 35px; }
}

/* Compact viewing language: the supported theme adapter moves it beside the logo. */
.tqm-language { --tqm-font: 'Proba Pro', 'Noto Sans Georgian', Arial, sans-serif; --tqm-brand: var(--red, #d92819); display: flex; align-items: center; flex: 0 0 auto; gap: 8px; width: 80px; height: 48px; margin: 0 0 8px auto; color: #1e1e1e; font: 400 18px/1.4 var(--tqm-font); }
.tqm[is="masters_card"] > .container { position: relative; }
.tqm-language--header-pending { position: absolute; top: 0; right: 0; margin: 0; }
.tqm-language--in-header { position: relative; margin: 0; }
.tqm-language label { position: relative; display: block; flex: 0 0 80px; width: 80px; height: 48px; margin: 0; color: inherit; font: inherit; letter-spacing: 0; text-transform: none; }
.tqm-language-label { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.tqm-language-current { display: flex; align-items: center; height: 48px; padding: 0 36px 0 12px; font: 500 18px/1.4 var(--tqm-font); pointer-events: none; }
.tqm-language label::after { content: ''; position: absolute; top: 16px; right: 16px; width: 16px; height: 16px; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%231e1e1e' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; }
.tqm-language select, .tqm-language select.basic-select-hidden { position: absolute !important; inset: 0; visibility: visible !important; opacity: 0; box-sizing: border-box; width: 100%; height: 100%; min-height: 0; padding: 0; border: 0; cursor: pointer; font: 400 18px/1.4 var(--tqm-font); }
.tqm-language label:focus-within { outline: 2px solid var(--tqm-brand); outline-offset: 2px; }
/* Legacy Teqtum JS wraps every select; its visual copy is not used by this control. */
.tqm-language .select__box { display: contents !important; }
.tqm-language .select__box > .select, .tqm-language .select__box > .options { display: none !important; }
