/* =============================================================================
   Каспийский цифровой форум — слой 2026 для публичной части.

   Подключается последним, после стилей купленной темы. Айдентика сохранена:
   тёмный «каспийский космос», синий акцент, градиентные заголовки, шрифт Sora.
   Меняется исполнение — по рубрике docs/design-rubric.md:

   · флюидная шкала кегля на clamp() вместо набора медиазапросов;
   · единый вертикальный ритм секций вместо 80/100/120px вразнобой;
   · поверхности слоями и волосяной кромкой, а не тяжёлыми рамками;
   · цели нажатия от 44px, видимое кольцо фокуса;
   · движение только там, где объясняет смену состояния, и никакого —
     при prefers-reduced-motion.

   Раньше эти правила жили тегом <style> в <head> каждой страницы:
   не кэшировались и росли вместе с правками.
   ========================================================================== */

:root {
   --c-bg: #0f0715;
   --c-surface: rgba(255, 255, 255, 0.04);
   --c-surface-2: rgba(255, 255, 255, 0.07);
   --c-hairline: rgba(255, 255, 255, 0.10);
   --c-hairline-strong: rgba(255, 255, 255, 0.20);
   --c-text: #f5f5f7;
   /* Вторичный текст: 0.66 на фоне #0f0715 даёт ~7:1. */
   --c-text-2: rgba(235, 235, 245, 0.66);
   /* Акцент для текста на тёмном: brand-400, 7.6:1. */
   --c-accent: #3ba3f5;
   /* Заливка кнопки: белый на brand-600 — 5.2:1. brand-500 дал бы 4.0. */
   --c-accent-fill: #0b6ec4;
   --c-accent-fill-hover: #085292;
   --c-focus: #6dbcfa;

   --r-xl: 32px;
   --r-lg: 24px;
   --r-md: 16px;
   --r-sm: 12px;

   --space-section: clamp(72px, 4rem + 5vw, 144px);
   --fs-display: clamp(2.25rem, 1.35rem + 3.9vw, 4.25rem);
   --fs-title: clamp(1.875rem, 1.35rem + 2.3vw, 3rem);
   --fs-subtitle: clamp(1.25rem, 1.1rem + 0.6vw, 1.625rem);
   --fs-lead: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
   --fs-body: 1.0625rem;
   --fs-small: 0.9375rem;

   /* Пружинная кривая: быстрый старт, мягкая посадка. */
   --ease: cubic-bezier(0.32, 0.72, 0, 1);
}

/* --- Основа ---------------------------------------------------------------- */

html { -webkit-text-size-adjust: 100%; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
   outline: 2px solid var(--c-focus);
   outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
   html { scroll-behavior: auto !important; }

   *,
   *::before,
   *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
   }

   /* Поле частиц на первом экране — непрерывное движение без смысла. */
   #particles-js { display: none; }
}

/* --- Ритм и заголовки секций --------------------------------------------- */

.speakers-section,
.welcome-message-section,
.sessions-2026,
.testimonial-section,
.portfolio-section,
.contact-section {
   padding-block: var(--space-section) !important;
}

.site-content .section-header {
   margin-bottom: clamp(32px, 1.5rem + 2vw, 56px);
   max-width: 760px;
}

.site-content .section-header .section-title {
   font-size: var(--fs-title);
   line-height: 1.1;
   letter-spacing: -0.02em;
   text-wrap: balance;
   margin-bottom: 0;
}

.section-lead {
   margin: 16px auto 0;
   max-width: 62ch;
   font-size: var(--fs-lead);
   line-height: 1.55;
   color: var(--c-text-2);
   text-wrap: pretty;
}

/* --- Первый экран ---------------------------------------------------------- */

.hero-2026.hero-section {
   padding: clamp(112px, 5rem + 6vw, 184px) 0 clamp(64px, 3rem + 4vw, 120px);
}

.hero-2026__grid {
   display: grid;
   grid-template-columns: minmax(0, 1fr);
   gap: clamp(32px, 1.5rem + 3vw, 72px);
   align-items: center;
}

@media (min-width: 992px) {
   .hero-2026__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
}

.hero-2026__title.hero-title {
   margin: 0 0 20px;
   font-size: var(--fs-display);
   line-height: 1.05;
   letter-spacing: -0.03em;
   text-wrap: balance;
}

.hero-2026__meta {
   display: flex;
   flex-direction: column;
   gap: 6px;
   margin: 0 0 32px;
}

.hero-2026__date {
   font-size: var(--fs-subtitle);
   font-weight: 600;
   line-height: 1.2;
   letter-spacing: -0.01em;
   color: var(--c-text);
}

.hero-2026__city {
   font-size: var(--fs-body);
   line-height: 1.45;
   color: var(--c-text-2);
}

.hero-2026__actions {
   display: flex;
   flex-wrap: wrap;
   gap: 12px;
}

.hero-2026__hint {
   margin: 12px 0 0;
   font-size: var(--fs-small);
   color: var(--c-text-2);
}

.hero-btn {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   min-height: 52px;
   padding: 0 28px;
   border: 1px solid transparent;
   border-radius: 999px;
   font-size: var(--fs-body);
   font-weight: 600;
   letter-spacing: -0.01em;
   text-decoration: none;
   cursor: pointer;
   transition: transform 0.25s var(--ease), background-color 0.2s ease,
      border-color 0.2s ease, color 0.2s ease;
}

.hero-btn:active:not(:disabled) { transform: scale(0.97); }

.hero-btn--primary {
   background: var(--c-accent-fill);
   color: #fff;
}

/* Под курсором темнее, а не светлее: светлее — это brand-500, и белая
   подпись на нём падает до 4:1. */
.hero-btn--primary:hover { background: var(--c-accent-fill-hover); color: #fff; }

.hero-btn--secondary {
   background: rgba(255, 255, 255, 0.06);
   border-color: var(--c-hairline-strong);
   color: var(--c-text);
   -webkit-backdrop-filter: blur(20px) saturate(160%);
   backdrop-filter: blur(20px) saturate(160%);
}

.hero-btn--secondary:hover { background: rgba(255, 255, 255, 0.12); color: var(--c-text); }

.hero-btn:disabled {
   background: transparent;
   border-color: var(--c-hairline);
   color: var(--c-text-2);
   cursor: not-allowed;
}

.hero-2026__banner {
   position: relative;
   margin: 0;
   overflow: hidden;
   border-radius: var(--r-xl);
   /* Кромка и мягкое свечение цвета бренда вместо фиолетовой рамки в 2px. */
   box-shadow: 0 0 0 1px var(--c-hairline), 0 40px 90px -30px rgba(14, 132, 233, 0.45);
}

.hero-2026__banner img {
   display: block;
   width: 100%;
   height: auto;
   aspect-ratio: 922 / 513;
   object-fit: cover;
   object-position: center;
}

@media (max-width: 991.98px) {
   /* В одну колонку баннер идёт первым, как и раньше. В разметке он после
      текста — это порядок чтения; баннер не фокусируется, поэтому порядок
      обхода клавиатурой от перестановки не страдает. */
   .hero-2026__banner { order: -1; }
}

@media (max-width: 767.98px) {
   /* Телефон: вертикальный кадр 4:5. Ширина ограничена, чтобы заголовок,
      дата и кнопка остались в первом экране под баннером. */
   .hero-2026__banner {
      width: min(100%, 320px);
      margin-inline: auto;
      border-radius: var(--r-lg);
   }

   .hero-2026__banner img { aspect-ratio: 4 / 5; }

   .hero-2026__actions .hero-btn { flex: 1 1 100%; }
}

/* --- Гости ---------------------------------------------------------------- */

.speakers-empty {
   max-width: 560px;
   margin: 0 auto;
   padding: 28px 32px;
   border-radius: var(--r-lg);
   background: var(--c-surface);
   box-shadow: inset 0 0 0 1px var(--c-hairline);
   text-align: center;
   font-size: var(--fs-body);
   line-height: 1.55;
   color: var(--c-text-2);
}

/* --- Приветственные адреса ------------------------------------------------ */

.welcome-message-section { background: transparent; }

.welcome-slide {
   display: grid;
   grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
   gap: clamp(32px, 1.5rem + 3vw, 72px);
   align-items: start;
}

/* Пока скрипт не сработал, адреса идут друг за другом. */
.welcome-slide + .welcome-slide { margin-top: 64px; }
.welcome-carousel.is-ready .welcome-slide { margin-top: 0; }
.welcome-carousel.is-ready .welcome-slide[hidden] { display: none; }

.welcome-slide__person {
   position: sticky;
   top: 110px;
}

.welcome-slide__photo {
   display: block;
   width: 100%;
   height: auto;
   aspect-ratio: 4 / 5;
   object-fit: cover;
   object-position: top center;
   border-radius: var(--r-lg);
   box-shadow: 0 0 0 1px var(--c-hairline);
   margin-bottom: 20px;
}

.welcome-slide__name {
   margin: 0 0 6px;
   font-size: 1.375rem;
   font-weight: 600;
   line-height: 1.25;
   letter-spacing: -0.01em;
   color: var(--c-text);
}

.welcome-slide__position {
   margin: 0;
   font-size: 1rem;
   line-height: 1.45;
   color: var(--c-text-2);
}

/* Текст по левому краю: выключка по ширине на узкой колонке давала
   «реки» пробелов. Длина строки ограничена ~68 знаками. */
.welcome-slide__text {
   min-width: 0;
   max-width: 68ch;
   font-size: var(--fs-body);
   line-height: 1.65;
   color: rgba(245, 245, 247, 0.88);
   text-align: left;
   hyphens: auto;
}

.welcome-slide__text p { margin: 0 0 1.1em; }
.welcome-slide__text p:last-child { margin-bottom: 0; font-weight: 600; color: var(--c-text); }

.welcome-carousel__controls {
   display: flex;
   align-items: center;
   justify-content: center;
   gap: 8px;
   margin: 0 0 clamp(24px, 1rem + 2vw, 40px);
}

.welcome-carousel__btn {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   width: 44px;
   height: 44px;
   padding: 0;
   border: 0;
   border-radius: 50%;
   background: var(--c-surface-2);
   box-shadow: inset 0 0 0 1px var(--c-hairline);
   color: var(--c-text);
   font-size: 18px;
   line-height: 1;
   cursor: pointer;
   transition: background-color 0.2s ease, transform 0.25s var(--ease);
}

.welcome-carousel__btn:hover { background: rgba(255, 255, 255, 0.14); }
.welcome-carousel__btn:active { transform: scale(0.94); }

.welcome-carousel__dots {
   display: flex;
   align-items: center;
   margin: 0 4px;
   padding: 0;
   list-style: none;
}

/* Точка маленькая, цель нажатия — 44px: размер набирается полями. */
.welcome-carousel__dot {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   width: 44px;
   height: 44px;
   padding: 0;
   border: 0;
   background: transparent;
   cursor: pointer;
}

.welcome-carousel__dot::before {
   content: "";
   width: 8px;
   height: 8px;
   border-radius: 999px;
   background: rgba(255, 255, 255, 0.3);
   transition: width 0.3s var(--ease), background-color 0.2s ease;
}

/* Текущая точка вытягивается в «пилюлю» — положение видно и без цвета. */
.welcome-carousel__dot[aria-current="true"]::before {
   width: 22px;
   background: #fff;
}

@media (max-width: 991.98px) {
   .welcome-slide { grid-template-columns: minmax(0, 1fr); gap: 24px; }

   /* На телефоне фото не занимает экран целиком: сначала человек —
      миниатюрой с именем, сразу за ним текст. */
   .welcome-slide__person {
      position: static;
      display: grid;
      grid-template-columns: 88px minmax(0, 1fr);
      gap: 4px 16px;
      align-items: center;
   }

   .welcome-slide__photo {
      grid-row: span 2;
      width: 88px;
      aspect-ratio: 1;
      margin: 0;
      border-radius: 50%;
   }

   .welcome-slide__name { margin: 0; align-self: end; font-size: 1.1875rem; }
   .welcome-slide__position { align-self: start; font-size: var(--fs-small); }
}

/* --- Сессии --------------------------------------------------------------- */

.sessions-2026.services-section { background-color: transparent; }

.sessions-2026__heading {
   margin: 0 0 16px;
   font-size: var(--fs-subtitle);
   font-weight: 600;
   letter-spacing: -0.01em;
   color: var(--c-text);
}

.sessions-2026__list {
   display: grid;
   grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
   gap: 12px;
   margin: 0;
   padding: 0;
   list-style: none;
}

.sessions-2026__item {
   display: flex;
   gap: 16px;
   align-items: flex-start;
   padding: 20px 22px;
   border-radius: var(--r-lg);
   background: var(--c-surface);
   box-shadow: inset 0 0 0 1px var(--c-hairline);
}

.sessions-2026__number {
   flex: none;
   min-width: 2ch;
   padding-top: 0.1em;
   font-size: var(--fs-small);
   font-weight: 600;
   font-variant-numeric: tabular-nums;
   color: var(--c-accent);
}

.sessions-2026__body { min-width: 0; }

.sessions-2026__title {
   margin: 0;
   font-size: var(--fs-body);
   font-weight: 600;
   line-height: 1.4;
   color: var(--c-text);
   text-wrap: pretty;
}

.sessions-2026__topics {
   margin: 10px 0 0;
   padding: 0 0 0 1.1em;
   font-size: var(--fs-small);
   line-height: 1.5;
   color: var(--c-text-2);
}

.sessions-2026__topics li + li { margin-top: 4px; }

/* --- Площадки --------------------------------------------------------------- */

.venue-list {
   display: grid;
   gap: 12px;
   margin: 8px 0 0;
   padding: 0;
   list-style: none;
}

.venue-item {
   padding: 20px 22px;
   border-radius: var(--r-lg);
   background: var(--c-surface);
   box-shadow: inset 0 0 0 1px var(--c-hairline);
}

.venue-list .venue-item__role {
   margin: 0 0 6px;
   font-size: 0.8125rem;
   font-weight: 600;
   letter-spacing: 0.06em;
   text-transform: uppercase;
   color: var(--c-accent);
}

.venue-list .venue-item__name {
   margin: 0 0 4px;
   font-size: var(--fs-subtitle);
   font-weight: 600;
   line-height: 1.25;
   letter-spacing: -0.01em;
   color: var(--c-text);
}

/* Адрес был #636363 на почти чёрном — 3.4:1, ниже порога. */
.venue-list .venue-item__address {
   margin: 0;
   font-size: 1rem;
   line-height: 1.45;
   color: var(--c-text-2);
}

.venue-map {
   position: relative;
   width: 100%;
   aspect-ratio: 650 / 450;
   overflow: hidden;
   border-radius: var(--r-lg);
   box-shadow: 0 0 0 1px var(--c-hairline);
}

.venue-map iframe {
   position: absolute;
   inset: 0;
   width: 100%;
   height: 100%;
   border: 0;
}

@media (max-width: 991.98px) {
   .venue-map { margin-top: 24px; }
}

/* --- Гостиницы -------------------------------------------------------------- */

.filter-button-group button { min-height: 44px; min-width: 44px; }

/* --- Контакты --------------------------------------------------------------- */

.contact-form-label {
   display: block;
   margin: 0 0 8px;
   font-size: var(--fs-small);
   font-weight: 600;
   color: var(--c-text);
}

.contact-topic + .contact-topic { margin-top: 32px; }

.contact-topic__title {
   margin: 0 0 4px;
   font-size: 0.8125rem;
   font-weight: 600;
   letter-spacing: 0.06em;
   text-transform: uppercase;
   color: var(--c-accent);
}

.contact-topic__name {
   margin: 0 0 12px;
   font-size: var(--fs-subtitle);
   font-weight: 600;
   letter-spacing: -0.01em;
   color: var(--c-text);
}

.contact-modal__title {
   margin: 0 0 8px;
   font-size: 1.25rem;
   font-weight: 600;
}

/* Телефон, почта и пункты подвала были высотой в строку текста (19–22px).
   Область нажатия добирается полями, вид не меняется. */
.contact-info-list .text-box a {
   display: inline-flex;
   align-items: center;
   min-height: 44px;
}

/* --- Шапка ------------------------------------------------------------------ */

/* Пункт «Архив» был 42px в ширину: короткое слово не добирало минимум. */
.tj-header-area nav ul li > a {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   min-width: 44px;
   min-height: 44px;
}

.language-switcher .btn { min-height: 44px; }

/* Кнопка меню. Тема рисовала «лесенку» из полосок 35/40/30px и крутила
   кнопку на 45° при открытии; дотянутая до 44px, лесенка разъезжалась.
   Теперь три одинаковые полоски в центре цели 44×44; при открытии
   крайние сходятся в крестик, средняя гаснет. */
.tj-header-area .menu-bar { margin-left: 12px; }

.tj-header-area .menu-bar button,
.tj-header-area .menu-bar.menu-bar-toggeled button {
   display: grid;
   place-content: center;
   gap: 5px;
   width: 44px;
   height: 44px;
   padding: 0;
   border-radius: var(--r-sm);
   transform: none;
   transition: background-color 0.2s ease;
}

.tj-header-area .menu-bar button:hover { background: rgba(255, 255, 255, 0.08); }

.tj-header-area .menu-bar button span,
.tj-header-area .menu-bar button span:nth-child(2),
.tj-header-area .menu-bar button span:nth-child(3) {
   position: static;
   width: 22px;
   height: 2px;
   margin: 0;
   border-radius: 2px;
   background: #fff;
   transform: none;
   opacity: 1;
   transition: transform 0.3s var(--ease), opacity 0.2s ease;
}

/* Шаг между центрами полосок — 7px (2px толщина + 5px зазор). */
.tj-header-area .menu-bar.menu-bar-toggeled button span:nth-child(1) {
   width: 22px;
   transform: translateY(7px) rotate(45deg);
}

.tj-header-area .menu-bar.menu-bar-toggeled button span:nth-child(2) { opacity: 0; }

.tj-header-area .menu-bar.menu-bar-toggeled button span:nth-child(3) {
   width: 22px;
   transform: translateY(-7px) rotate(-45deg);
}

/* --- Подвал: организаторы -------------------------------------------------- */

.footer-organizers {
   padding: clamp(48px, 2rem + 3vw, 80px) 0 clamp(32px, 1.5rem + 2vw, 56px);
   text-align: center;
}

.footer-organizers__title {
   margin: 0 0 clamp(24px, 1rem + 2vw, 40px);
   font-size: 0.8125rem;
   font-weight: 600;
   letter-spacing: 0.08em;
   text-transform: uppercase;
   color: var(--c-text-2);
}

.footer-organizers__list {
   display: flex;
   flex-wrap: wrap;
   align-items: center;
   justify-content: center;
   gap: clamp(24px, 1rem + 3vw, 56px);
   margin: 0;
   padding: 0;
   list-style: none;
}

/* Все знаки одной высоты; ширину считает картинка. height:auto не нужен —
   высота задана явно, а width:auto отменяет атрибут width. */
.footer-organizers__item img {
   display: block;
   width: auto;
   height: 56px;
   max-width: 260px;
   object-fit: contain;
}

/* Круглый знак «Цифровых форумов» с подписью под ним визуально мельче
   горизонтальных — подтягиваем его по высоте. */
.footer-organizers__item img[src$=".svg"] { height: 72px; }

.footer-organizers__item a {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   min-height: 44px;
   border-radius: var(--r-sm);
   opacity: 0.9;
   transition: opacity 0.2s ease;
}

.footer-organizers__item a:hover { opacity: 1; }

@media (max-width: 575.98px) {
   .footer-organizers__item img { height: 44px; max-width: 220px; }
   .footer-organizers__item img[src$=".svg"] { height: 60px; }
}

/* --- Форма обратной связи --------------------------------------------------- */

.tj-contact-form .form_group input:not([type="hidden"]):not([type="submit"]):not([type="radio"]):not([type="checkbox"]),
.tj-contact-form .form_group textarea,
.tj-contact-form .form_group .nice-select {
   min-height: 52px;
   border-radius: var(--r-sm);
   font-size: var(--fs-body);
}

.tj-contact-form .form_group [aria-invalid="true"] {
   border-color: #ff6b6b !important;
}

/* Красный подобран под тёмный фон: #ff8a8a даёт 7:1 на #0f0715. */
.contact-form-error {
   margin: 8px 0 0;
   font-size: var(--fs-small);
   color: #ff8a8a;
}

.contact-form-status {
   margin: 0 0 24px;
   padding: 16px 20px;
   border-radius: var(--r-md);
   background: rgba(52, 199, 89, 0.12);
   box-shadow: inset 0 0 0 1px rgba(52, 199, 89, 0.35);
   color: var(--c-text);
}

/* --- Заголовок секции по центру ------------------------------------------- */

/* У блока с text-center не было авто-полей: текст центрировался внутри
   760px, а сам блок прижимался к левому краю контейнера. */
.site-content .section-header.text-center { margin-inline: auto; }

/* --- Подвал ------------------------------------------------------------------ */

.site-footer { padding-bottom: clamp(32px, 1.5rem + 2vw, 56px); }

.site-footer__main {
   display: flex;
   flex-direction: column;
   align-items: center;
   gap: 24px;
   padding: clamp(32px, 1.5rem + 2vw, 48px) 0;
   border-top: 1px solid var(--c-hairline);
}

.site-footer__brand {
   display: inline-flex;
   align-items: center;
   gap: 12px;
   min-height: 44px;
   text-decoration: none;
}

.site-footer__mark { width: 84px; height: auto; }
.site-footer__wordmark { width: 112px; height: auto; }

.site-footer__nav,
.site-footer__docs {
   display: flex;
   flex-wrap: wrap;
   justify-content: center;
   gap: 0 8px;
   margin: 0;
   padding: 0;
   list-style: none;
}

.site-footer__nav a,
.site-footer__docs a {
   display: inline-flex;
   align-items: center;
   min-height: 44px;
   padding: 0 12px;
   border-radius: var(--r-sm);
   color: var(--c-text);
   font-size: var(--fs-small);
   font-weight: 500;
   text-decoration: none;
   transition: background-color 0.2s ease;
}

.site-footer__nav a:hover,
.site-footer__docs a:hover { background: var(--c-surface-2); color: var(--c-text); }

.site-footer__legal {
   display: flex;
   flex-wrap: wrap;
   align-items: center;
   justify-content: space-between;
   gap: 8px 24px;
   padding-top: 24px;
   border-top: 1px solid var(--c-hairline);
}

.site-footer__copy { margin: 0; font-size: var(--fs-small); color: var(--c-text-2); }
.site-footer__docs a { color: var(--c-text-2); font-weight: 400; }

@media (max-width: 767.98px) {
   .site-footer__legal { flex-direction: column; text-align: center; }
}

/* Знак «Цифровых форумов» внутри своего файла окружён пустыми полями,
   поэтому при общей высоте выглядит вдвое мельче соседей. */
.footer-organizers__item img[src$=".svg"] { height: 96px; margin: -16px 0; }

@media (max-width: 575.98px) {
   .footer-organizers__item img[src$=".svg"] { height: 76px; margin: -12px 0; }
}

/* --- Форма обратной связи: поля в цветах темы -------------------------- */

.tj-contact-form .form_group input:not([type="hidden"]):not([type="submit"]):not([type="radio"]):not([type="checkbox"]),
.tj-contact-form .form_group textarea,
.tj-contact-form .form_group select {
   width: 100%;
   padding: 12px 16px;
   border: 1px solid var(--c-hairline-strong);
   background-color: var(--c-surface-2);
   color: var(--c-text);
   transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.tj-contact-form .form_group input:not([type="hidden"]):not([type="submit"]):not([type="radio"]):not([type="checkbox"]):hover,
.tj-contact-form .form_group textarea:hover,
.tj-contact-form .form_group select:hover { border-color: rgba(255, 255, 255, 0.32); }

.tj-contact-form .form_group input:not([type="hidden"]):not([type="submit"]):not([type="radio"]):not([type="checkbox"]):focus,
.tj-contact-form .form_group textarea:focus,
.tj-contact-form .form_group select:focus {
   border-color: var(--c-accent);
   background-color: rgba(255, 255, 255, 0.09);
   box-shadow: 0 0 0 4px rgba(59, 163, 245, 0.25);
   outline: none;
}

.tj-contact-form .form_group textarea { min-height: 140px; resize: vertical; }

/* Свой выпадающий список: родная стрелка на тёмном поле рисовалась
   чёрной, а открытый список — белым прямоугольником. */
.tj-contact-form .form_group select {
   min-height: 52px;
   border-radius: var(--r-sm);
   font-size: var(--fs-body);
   -webkit-appearance: none;
   appearance: none;
   padding-right: 44px;
   background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23f5f5f7' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.8' d='m3.5 6 4.5 4.5L12.5 6'/%3e%3c/svg%3e");
   background-repeat: no-repeat;
   background-position: right 16px center;
   background-size: 16px;
   color-scheme: dark;
}

.tj-contact-form .form_group select option { background: #1a1024; color: var(--c-text); }

.tj-contact-form .form_group { margin-bottom: 20px; }
.tj-contact-form .form_btn .hero-btn { min-width: 180px; }

/* Капча без ключа ничего не рисует, а высота 100px задана в разметке. */
#contact-captcha-container:empty { height: 0 !important; }

/* --- Попапы гостиниц ------------------------------------------------------ */

.mfp-bg { background: #05020a; opacity: 0.8 !important; }

.mfp-content .popup_content_area {
   max-width: 1040px;
   margin: 40px auto;
   overflow: hidden;
   border-radius: var(--r-xl);
   background: #150c1f;
   box-shadow: 0 0 0 1px var(--c-hairline), 0 40px 120px -20px rgba(0, 0, 0, 0.7);
   color: var(--c-text);
}

.mfp-content .popup_modal_img {
   background: #0f0715;
   max-height: 440px;
   overflow: hidden;
}

.mfp-content .popup_modal_img img {
   display: block;
   width: 100%;
   height: 100%;
   max-height: 440px;
   object-fit: cover;
}

.mfp-content .popup_modal_content {
   padding: clamp(24px, 1rem + 3vw, 48px);
   background: transparent;
}

.mfp-content .popup_content_area .title {
   margin: 0 0 12px;
   font-size: var(--fs-title);
   font-weight: 600;
   line-height: 1.1;
   letter-spacing: -0.02em;
   color: var(--c-text);
   -webkit-text-fill-color: currentColor;
   background: none;
}

.mfp-content .portfolio_description .title { font-size: var(--fs-subtitle); margin-top: 8px; }

.mfp-content .popup_content_area .desc,
.mfp-content .popup_content_area .desc p {
   font-size: var(--fs-body);
   line-height: 1.6;
   color: rgba(245, 245, 247, 0.85);
}

.mfp-content .portfolio_info {
   display: grid;
   grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
   gap: clamp(24px, 1rem + 3vw, 56px);
   margin-bottom: 32px;
}

/* Тема задавала колонкам и плиткам max-width: calc(50% - …) под свой флекс.
   Внутри сетки это резало половину от уже половинной колонки — текст
   плиток ломался по буквам. Ширину теперь задаёт только сетка. */
.mfp-content .portfolio_info > .portfolio_info_text,
.mfp-content .portfolio_info > .portfolio_info_items,
.mfp-content .portfolio_info_items > .info_item {
   max-width: none;
   width: auto;
   min-width: 0;
}

.mfp-content .popup_modal_content .portfolio_info { padding: 0; }

.mfp-content .info_item .value { overflow-wrap: anywhere; }

.mfp-content .portfolio_info_items {
   display: grid;
   grid-template-columns: repeat(2, minmax(0, 1fr));
   gap: 12px;
   align-content: start;
}

.mfp-content .info_item {
   padding: 14px 16px;
   border-radius: var(--r-md);
   background: var(--c-surface);
   box-shadow: inset 0 0 0 1px var(--c-hairline);
}

.mfp-content .info_item .key {
   margin-bottom: 4px;
   font-size: 0.8125rem;
   font-weight: 600;
   letter-spacing: 0.04em;
   text-transform: uppercase;
   color: var(--c-text-2);
}

.mfp-content .info_item .value,
.mfp-content .info_item .value a { font-size: var(--fs-body); font-weight: 600; color: var(--c-text); }

.mfp-content .info_item .value a {
   display: inline-flex;
   align-items: center;
   min-height: 44px;
   margin: -12px 0;
   text-decoration: none;
}

.mfp-content .portfolio_gallery .gallery_item img {
   border-radius: var(--r-md);
   aspect-ratio: 3 / 2;
   object-fit: cover;
}

.mfp-content .popup_content_area .hero-btn { margin-top: 20px; }

/* Кнопка закрытия — 44px, в стекле, внутри карточки. */
.mfp-content .mfp-close,
.popup_content_area .mfp-close {
   top: 16px !important;
   right: 16px !important;
   width: 44px !important;
   height: 44px !important;
   line-height: 44px !important;
   border-radius: 50%;
   background: rgba(15, 7, 21, 0.6) !important;
   -webkit-backdrop-filter: blur(20px);
   backdrop-filter: blur(20px);
   color: #fff !important;
   opacity: 1 !important;
   box-shadow: 0 0 0 1px var(--c-hairline-strong);
}

@media (max-width: 767.98px) {
   .mfp-content .popup_content_area { margin: 12px; border-radius: var(--r-lg); }
   .mfp-content .portfolio_info { grid-template-columns: minmax(0, 1fr); }
   .mfp-content .popup_modal_img,
   .mfp-content .popup_modal_img img { max-height: 260px; }
}

/* --- Логотип в шапке на телефоне ------------------------------------------ */

/* Тема прятала надпись «Каспийский цифровой форум» ниже 768px, и на телефоне
   оставалась одна волна. Логотип форума — это волна и надпись вместе:
   показываем обе, уменьшив до 44px по высоте. */
@media (max-width: 768px) {
   #second_logo figure { display: block; }

   .tj-header-area .logo-box { gap: 8px; margin-right: 0 !important; }

   .tj-header-area .header__logo-main svg {
      width: auto;
      height: 44px;
   }

   #second_logo {
      height: 44px !important;
      max-width: 104px !important;
   }
}

/* --- Кнопка «Регистрация» в шапке ---------------------------------------- */

/* Тема отодвигала кнопку на 55px — вместе с меню и переключателем языка
   это на 24px шире контейнера, и меню переносилось на вторую строку.
   Ниже 1400px кнопки в шапке нет вовсе (d-xxl-block): регистрация там
   остаётся главной кнопкой первого экрана. */
.tj-header-area .header-button { margin-left: 24px; }

/* Меню шапки. Тема ставила между пунктами 45px, и шесть пунктов
   не помещались рядом с логотипом и переключателем языка — «Контакты»
   и «Архив» уезжали на вторую строку. От 1200px пункты в одну строку,
   отступ тянется вместе с экраном. */
@media (min-width: 1200px) {
   .tj-header-area .header-menu ul {
      flex-wrap: nowrap;
      column-gap: clamp(14px, 1.6vw - 4px, 32px);
   }

   .tj-header-area .header-menu ul > li > a { white-space: nowrap; }
}

/* --- Переключатель языка ---------------------------------------------------- */

.locale-switch {
   display: inline-flex;
   align-items: center;
   gap: 2px;
   padding: 2px;
   border-radius: 999px;
   box-shadow: inset 0 0 0 1px var(--c-hairline-strong);
}

.locale-switch__item {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   min-width: 44px;
   min-height: 40px;
   padding: 0 10px;
   border-radius: 999px;
   font-size: 0.875rem;
   font-weight: 600;
   letter-spacing: 0.04em;
   color: var(--c-text-2);
   text-decoration: none;
}

.locale-switch a.locale-switch__item:hover { color: var(--c-text); background: var(--c-surface-2); }
.locale-switch__item.is-current { background: var(--c-surface-2); color: var(--c-text); }

/* В меню шапки у пунктов свои поля и подчёркивание темы — переключателю
   они не нужны. */
.tj-header-area .header-menu ul > li.menu-locale > .locale-switch a::before { display: none; }
.tj-header-area .header-menu ul > li.menu-locale > .locale-switch a,
.tj-header-area .header-menu ul > li.menu-locale > .locale-switch span.locale-switch__item { padding: 0 10px; }

/* Регистрация пунктом меню (992–1399px): акцентом, чтобы не терялась
   среди разделов сайта. */
.tj-header-area .header-menu ul > li.menu-register > a {
   color: var(--c-accent);
   font-weight: 600;
}

/* Кнопка регистрации рядом с гамбургером: компактная, чтобы помещалась
   с логотипом на экране 320px. */
@media (max-width: 991.98px) {
   .tj-header-area .header-button { margin-left: auto; }
   .tj-header-area .menu-bar { margin-left: 12px; }

   /* Тема прятала ссылку кнопки на узком экране — здесь она нужна. */
   .tj-header-area .header-button .btn {
      display: inline-flex;
      align-items: center;
      min-height: 40px;
      padding: 0 16px;
      font-size: 0.875rem;
      line-height: 40px;
      white-space: nowrap;
   }
}

/* В мобильном меню — отдельной строкой с отступом. */
.mean-container .mean-nav ul li.menu-locale { padding: 12px 5%; }
.mean-container .mean-nav ul li.menu-locale a.locale-switch__item {
   width: auto;
   padding: 0 10px;
   border: 0;
   float: none;
}
