/* Mobile-only layout rules transferred from the reference archive.
   All declarations are scoped to max-width media queries so desktop styles remain unchanged. */

@media (max-width: 820px) {
  .collections-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .collection {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: 0 !important;
    height: auto !important;
    padding: 28px !important;
    gap: 0;
  }
  .collection h3,
  .collection p {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    overflow-wrap: anywhere;
  }
  .collection h3 {
    font-size: 26px;
    line-height: 1.25;
    margin-bottom: 14px;
  }
  .collection p {
    margin-bottom: 20px;
    font-size: 17px;
    line-height: 1.5;
  }
  .collection .btn {
    position: static !important;
    max-width: 100%;
    white-space: normal;
    line-height: 1.4;
    text-align: center;
    min-height: 44px;
    flex-shrink: 0;
    margin: 0;
    z-index: auto;
  }
  .collection .collection-icon {
    position: static !important;
    align-self: flex-end;
    width: 180px !important;
    max-width: 100% !important;
    height: 150px !important;
    object-fit: contain !important;
    margin: 18px 0 0 !important;
    flex-shrink: 0;
  }
  .about-grid,
  .about-cards {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .about-lead {
    min-height: 0 !important;
    padding: 28px !important;
  }
  .about-lead-top {
    margin-bottom: 22px;
    flex-wrap: wrap;
  }
  .about-lead-stat {
    margin-top: 0;
    padding-top: 26px;
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .about-card,
  .about-card.wide {
    height: auto !important;
    min-height: 0 !important;
  }
  .about-card strong,
  .about-card p {
    height: auto !important;
    overflow-wrap: anywhere;
  }
  .course,
  .direction-course,
  .format,
  .collection,
  .about-card,
  .hero-benefit {
    min-width: 0;
  }
  .course h3,
  .direction-course h3,
  .course p,
  .direction-course p {
    overflow-wrap: anywhere;
  }
}

@media (max-width: 560px) {
  .collection {
    padding: 24px !important;
  }
  .collection h3 {
    font-size: 24px;
  }
  .collection p {
    font-size: 16px;
  }
  .about-lead {
    padding: 24px !important;
  }
  .about-lead strong {
    font-size: 27px;
    line-height: 1.25;
  }
  .about-lead p {
    font-size: 16px;
    line-height: 1.55;
  }
  .nav {
    gap: 12px;
    min-width: 0;
  }
  .nav .brand {
    min-width: 0;
    max-width: calc(100% - 54px);
  }
  .nav .brand img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
  }
  .nav .menu {
    flex-shrink: 0;
  }
  .hero-benefits,
  .course-grid,
  .formats {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .contact-card {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .tool-row input,
  .search-filters > * {
    min-width: 0;
    max-width: 100%;
  }
}

/* Точечные мобильные правки по скриншотам пользователя */
@media (max-width: 820px) {
  /* Обложки направлений: сохраняем верх изображения, чтобы не обрезались головы */
  .course-grid .course-cover {
    object-position: center top !important;
  }

  /* Компактнее карточки подборок и выше расположение иллюстраций */
  .collection {
    padding: 22px 24px !important;
  }
  .collection p {
    margin-bottom: 12px !important;
  }
  .collection .btn {
    margin-bottom: 0 !important;
  }
  .collection .collection-icon {
    width: 150px !important;
    height: 112px !important;
    margin-top: 2px !important;
    align-self: flex-end !important;
    object-fit: contain !important;
  }

  /* В мобильной миссии оставляем только заданный текст */
  .about-lead-stat {
    display: none !important;
  }

  /* Логотип контактов — по левому краю текстовой композиции */
  .contact-logo-wrap {
    justify-content: flex-start !important;
    align-items: flex-start !important;
    text-align: left !important;
  }
  .contact-logo {
    margin-left: 0 !important;
    margin-right: auto !important;
  }
}

@media (max-width: 560px) {
  .collection {
    padding: 20px 22px !important;
  }
  .collection .collection-icon {
    width: 132px !important;
    height: 100px !important;
    margin-top: 0 !important;
  }
}

/* Дополнительная точечная настройка четырёх иллюстраций подборок */
@media (max-width: 820px) {
  .collection .collection-icon {
    width: 190px !important;
    height: 160px !important;
    margin-top: -6px !important;
    margin-bottom: -4px !important;
  }
}
@media (max-width: 560px) {
  .collection .collection-icon {
    width: 180px !important;
    height: 150px !important;
    margin-top: -8px !important;
    margin-bottom: -4px !important;
  }
}

/* Точечные правки обложек курсов и изображения направления «Сервис на транспорте» */
.modal-image {
  object-position: center top !important;
}
.direction-hero-media img[src*="transport-service.png"] {
  object-position: 78% center !important;
}

/* Точечные настройки мобильной навигации и обложки «Сервис на транспорте» */
.mobile-login {
  display: none !important;
}

@media (max-width: 820px) {
  /* Картинка направления: сдвигаем кадр влево, чтобы был виден мужчина справа */
  .online-hero-reference .direction-hero-media img {
    object-position: 100% center !important;
  }

  /* Меню раскрывается поверх страницы и не меняет высоту строки логотипа */
  header .nav {
    position: relative !important;
  }
  header .nav.open {
    flex-wrap: nowrap !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
  header .nav.open .links {
    position: absolute !important;
    top: calc(100% + 1px) !important;
    left: 0 !important;
    right: 0 !important;
    width: auto !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0 !important;
    padding: 12px 16px 18px !important;
    margin: 0 !important;
    background: rgba(255, 255, 255, 0.98) !important;
    -webkit-backdrop-filter: blur(18px) !important;
    backdrop-filter: blur(18px) !important;
    border: 1px solid rgba(220, 222, 235, 0.85) !important;
    border-top: 0 !important;
    border-radius: 0 0 18px 18px !important;
    box-shadow: 0 16px 28px rgba(23, 22, 53, 0.12) !important;
    z-index: 100 !important;
  }
  header .nav.open .links a {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 0 !important;
  }
  header .nav.open .links .mobile-login {
    display: block !important;
    color: #d41124 !important;
    font-weight: 800 !important;
    border-top: 1px solid rgba(220, 222, 235, 0.85) !important;
    margin-top: 4px !important;
    padding-top: 16px !important;
  }
  header .nav .menu {
    color: #d41124 !important;
    position: relative !important;
    z-index: 101 !important;
    line-height: 1 !important;
  }
}

/* Мобильная двухэкранная заставка с плавным переходом по первому скроллу */
.mobile-hero-scroll {
  display: none;
}

@media (max-width: 700px) {
  .mobile-hero-scroll {
    display: block !important;
    position: relative;
    height: 200svh;
    height: 200vh;
    margin: 0;
    padding: 0;
  }
  .mobile-hero-sticky {
    position: sticky;
    top: 54px;
    height: calc(100svh - 54px);
    height: calc(100vh - 54px);
    overflow: hidden;
    isolation: isolate;
    background: #65b8f5;
  }
  .mobile-hero-scene {
    position: absolute;
    inset: 0;
    overflow: hidden;
    will-change: opacity, transform;
    transition: opacity 0.12s linear;
  }
  .mobile-hero-scene-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: 63% center;
  }
  .mobile-hero-scene-one {
    opacity: 1;
    z-index: 2;
    background: linear-gradient(
      180deg,
      #69bdf8 0%,
      #b7e3ff 48%,
      #e8f7ff 72%,
      #d41124 100%
    );
  }
  .mobile-hero-scene-one:after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(
      180deg,
      rgba(95, 184, 247, 0.28) 0%,
      rgba(95, 184, 247, 0) 45%,
      rgba(212, 17, 36, 0) 70%,
      #d41124 100%
    );
  }
  .mobile-scene-one-copy {
    position: absolute;
    z-index: 3;
    top: 18px;
    left: 16px;
    right: 16px;
    text-align: center;
    color: #25234f;
  }
  .mobile-scene-kicker {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 34px;
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.95);
    border-radius: 999px;
    color: #fff;
    font-size: 11px;
    line-height: 1.2;
    font-weight: 700;
    white-space: nowrap;
    max-width: 100%;
  }
  .mobile-scene-title-small {
    margin-top: 28px;
    color: #25234f;
    font-size: clamp(19px, 5.5vw, 25px);
    line-height: 1.05;
    letter-spacing: -0.035em;
    font-weight: 850;
    text-transform: uppercase;
    white-space: nowrap;
  }
  .mobile-scene-title-large {
    margin-top: 2px;
    color: #d41124;
    font-size: clamp(42px, 12vw, 56px);
    line-height: 0.92;
    letter-spacing: -0.055em;
    font-weight: 800;
    white-space: nowrap;
  }
  .mobile-scene-scroll-cue {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 26px;
    width: 36px;
    height: 62px;
    transform: translateX(-50%);
    display: flex;
    align-items: flex-start;
    justify-content: center;
  }
  .mobile-scene-scroll-cue span {
    width: 4px;
    height: 54px;
    border-radius: 4px;
    background: #fff;
    position: relative;
    animation: mobileScrollArrow 1.5s ease-in-out infinite;
  }
  .mobile-scene-scroll-cue span:after {
    content: "";
    position: absolute;
    left: -8px;
    bottom: 0;
    width: 16px;
    height: 16px;
    border-right: 4px solid #fff;
    border-bottom: 4px solid #fff;
    transform: rotate(45deg);
    border-radius: 1px;
  }
  @keyframes mobileScrollArrow {
    0%,
    100% {
      transform: translateY(0);
      opacity: 0.75;
    }
    50% {
      transform: translateY(8px);
      opacity: 1;
    }
  }
  .mobile-hero-scene-two {
    opacity: 0;
    z-index: 1;
    background: #fff;
  }
  .mobile-hero-scene-two .mobile-hero-scene-image {
    object-position: 64% center;
  }
  .mobile-hero-scene-two:after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.05) 0%,
      rgba(255, 255, 255, 0) 48%,
      rgba(23, 22, 53, 0.1) 100%
    );
    pointer-events: none;
  }
  .mobile-scene-two-copy {
    position: absolute;
    z-index: 3;
    top: 18px;
    left: 16px;
    right: 10px;
    text-align: center;
  }
  .mobile-scene-two-copy .mobile-scene-title-small {
    margin-top: 0;
    font-size: clamp(17px, 4.8vw, 22px);
  }
  .mobile-scene-two-copy .mobile-scene-title-large {
    font-size: clamp(40px, 11vw, 52px);
  }
  .mobile-scene-two-actions {
    position: absolute;
    z-index: 4;
    left: 7%;
    right: 7%;
    bottom: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
  }
  .mobile-scene-two-actions a {
    display: block;
    width: 48%;
    line-height: 0;
  }
  .mobile-scene-two-actions img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
  }
  /* Старый карточный первый экран остаётся для компьютеров, на телефоне его заменяет сцена */
  body > .hero {
    display: none !important;
  }
  .mobile-hero-scroll + .hero {
    display: none !important;
  }
  .hero-benefits-section {
    padding-top: 14px !important;
  }
}
@media (max-width: 700px) {
  .mobile-scene-title-small {
    font-size: 18px;
  }
  .mobile-scene-title-large {
    font-size: 40px;
  }
  .mobile-scene-one-copy {
    top: 14px;
  }
  .mobile-scene-kicker {
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .mobile-scene-scroll-cue span {
    animation: none;
  }
}

@media (max-width: 700px) {
  header {
    background: rgba(99, 184, 247, 0.98) !important;
    border-bottom-color: transparent !important;
    box-shadow: none !important;
    transition:
      background 0.35s ease,
      border-color 0.35s ease !important;
  }
  body.mobile-scene-two-active header {
    background: rgba(255, 255, 255, 0.98) !important;
    border-bottom-color: rgba(220, 222, 235, 0.72) !important;
  }
}

/* Новая мобильная заставка на готовом изображении пользователя. */
.mobile-intro {
  display: none;
}
@media (max-width: 700px) {
  header {
    position: sticky !important;
    top: 0 !important;
    z-index: 120 !important;
    background: transparent !important;
    border-bottom-color: transparent !important;
    box-shadow: none !important;
    transition:
      background 0.28s ease,
      border-color 0.28s ease,
      box-shadow 0.28s ease !important;
  }
  header.mobile-intro-passed {
    background: rgba(255, 255, 255, 0.98) !important;
    border-bottom-color: rgba(220, 222, 235, 0.8) !important;
    box-shadow: 0 5px 18px rgba(23, 22, 53, 0.06) !important;
  }
  header .nav {
    min-height: 54px !important;
    width: calc(100% - 24px) !important;
    gap: 8px !important;
  }
  header .official-logo {
    width: 154px !important;
    max-width: calc(100vw - 100px) !important;
  }
  header .menu {
    color: #d41124 !important;
    font-size: 25px !important;
    padding: 5px 0 5px 8px !important;
  }
  .mobile-intro {
    display: block !important;
    position: relative;
    height: 100vh;
    height: 100svh;
    min-height: 620px;
    margin-top: -54px !important;
    overflow: hidden;
    isolation: isolate;
    background: #63b8f7 url("../images/2026/mobile-intro-cover.png") center
      top/100% 100% no-repeat;
    will-change: opacity, transform;
    transition: opacity 0.12s linear;
  }
  .mobile-intro-copy {
    position: absolute;
    z-index: 2;
    top: 68px;
    left: 12px;
    right: 12px;
    text-align: center;
    color: #25234f;
  }
  .mobile-intro-kicker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    max-width: calc(100vw - 52px);
    padding: 6px 13px;
    border: 1.5px solid rgba(255, 255, 255, 0.98);
    border-radius: 999px;
    color: #fff;
    font-size: 11px;
    line-height: 1.15;
    font-weight: 750;
    white-space: nowrap;
  }
  .mobile-intro-title-small {
    margin-top: 30px;
    color: #25234f;
    font-size: clamp(18px, 5.1vw, 22px);
    line-height: 1.05;
    letter-spacing: -0.035em;
    font-weight: 850;
    white-space: nowrap;
  }
  .mobile-intro-title-large {
    margin-top: 2px;
    color: #d41124;
    font-size: clamp(43px, 11.9vw, 49px);
    line-height: 0.94;
    letter-spacing: -0.055em;
    font-weight: 800;
    white-space: nowrap;
  }
  .mobile-intro-logo-letter {
    display: inline-flex;
    width: 0.55em;
    height: 0.68em;
    align-items: center;
    justify-content: center;
    vertical-align: baseline;
    position: relative;
    top: 0.055em;
    margin: 0 0.015em 0 0.045em;
  }
  .mobile-intro-logo-letter img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
  .mobile-intro-scroll-cue {
    position: absolute;
    z-index: 3;
    left: 50%;
    bottom: 48px;
    width: 38px;
    height: 60px;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: flex-start;
  }
  .mobile-intro-scroll-cue span {
    position: relative;
    display: block;
    width: 4px;
    height: 46px;
    border-radius: 4px;
    background: #fff;
    animation: introArrowFloat 1.45s ease-in-out infinite;
  }
  .mobile-intro-scroll-cue span:after {
    content: "";
    position: absolute;
    left: -8px;
    bottom: 0;
    width: 16px;
    height: 16px;
    border-right: 4px solid #fff;
    border-bottom: 4px solid #fff;
    border-radius: 1px;
    transform: rotate(45deg);
  }
  @keyframes introArrowFloat {
    0%,
    100% {
      transform: translateY(0);
      opacity: 0.8;
    }
    50% {
      transform: translateY(7px);
      opacity: 1;
    }
  }
  .hero {
    display: block !important;
    padding: 0 !important;
    margin-top: 54px !important;
  }
  .hero .wrap {
    width: 100% !important;
    max-width: none !important;
  }
  .hero-visual-with-copy {
    width: 100% !important;
    height: 544px !important;
    min-height: 544px !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
  .hero-visual-with-copy .hero-visual-image {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 544px !important;
    aspect-ratio: auto !important;
    object-fit: cover !important;
    object-position: 58% center !important;
  }
  .hero-copy-overlay {
    left: 8px !important;
    right: 8px !important;
    top: 20px !important;
    width: auto !important;
    max-width: none !important;
    text-align: center !important;
  }
  .hero-kicker-overlay,
  .hero-copy-overlay p {
    display: none !important;
  }
  .hero-copy-overlay .hero-headline {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    margin: 0 !important;
    text-align: center !important;
  }
  .hero-copy-overlay .hero-title-small {
    font-size: clamp(18px, 5vw, 21px) !important;
    line-height: 1.08 !important;
    white-space: nowrap !important;
  }
  .hero-copy-overlay .hero-title-large {
    font-size: clamp(43px, 11.5vw, 48px) !important;
    line-height: 0.94 !important;
    white-space: nowrap !important;
  }
  .hero-visual-with-copy .hero-visual-actions {
    left: 7% !important;
    right: 7% !important;
    bottom: 18px !important;
    max-width: none !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 8px !important;
  }
  .hero-visual-with-copy .hero-visual-actions a:first-child {
    width: 38% !important;
    flex: 0 1 38% !important;
  }
  .hero-visual-with-copy .hero-visual-actions a:last-child {
    width: 43% !important;
    flex: 0 1 43% !important;
  }
  .hero-visual-with-copy .hero-visual-actions img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
  }
  .hero-benefits-section {
    padding: 6px 0 36px !important;
  }
}
@media (max-width: 380px) {
  .mobile-intro-title-small {
    font-size: 17px;
  }
  .mobile-intro-title-large {
    font-size: 40px;
  }
  .hero-visual-with-copy {
    height: 520px !important;
    min-height: 520px !important;
  }
  .hero-visual-with-copy .hero-visual-image {
    min-height: 520px !important;
  }
  .hero-copy-overlay .hero-title-small {
    font-size: 17px !important;
  }
  .hero-copy-overlay .hero-title-large {
    font-size: 40px !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  .mobile-intro-scroll-cue span {
    animation: none;
  }
}

/* Финальная мобильная компоновка: без отдельной заставки, сразу основная главная */
@media (max-width: 700px) {
  .mobile-intro {
    display: none !important;
  }
  header {
    position: sticky !important;
    top: 0 !important;
    background: rgba(255, 255, 255, 0.98) !important;
    border-bottom: 1px solid rgba(220, 222, 235, 0.72) !important;
    box-shadow: 0 4px 16px rgba(23, 22, 53, 0.045) !important;
  }
  header.mobile-intro-passed {
    background: rgba(255, 255, 255, 0.98) !important;
  }
  .hero {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .hero .wrap {
    width: 100% !important;
    max-width: none !important;
  }
  .hero-visual-with-copy {
    width: 100% !important;
    height: 140vw !important;
    min-height: 510px !important;
    max-height: 650px !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: hidden !important;
    position: relative !important;
  }
  .hero-visual-with-copy .hero-visual-image {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: 72% center !important;
  }
  .hero-copy-overlay {
    top: 20px !important;
    left: 8px !important;
    right: 8px !important;
    width: auto !important;
    max-width: none !important;
    text-align: center !important;
  }
  .hero-copy-overlay .hero-headline {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    margin: 0 !important;
    text-align: center !important;
  }
  .hero-copy-overlay .hero-title-small {
    font-size: clamp(18px, 5vw, 21px) !important;
    line-height: 1.08 !important;
    white-space: nowrap !important;
  }
  .hero-copy-overlay .hero-title-large {
    font-size: clamp(42px, 11.2vw, 48px) !important;
    line-height: 0.94 !important;
    white-space: nowrap !important;
  }
  .hero-kicker-overlay,
  .hero-copy-overlay p {
    display: none !important;
  }
  .hero-visual-with-copy .hero-visual-actions {
    left: 7% !important;
    right: 7% !important;
    bottom: 18px !important;
    max-width: none !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 8px !important;
  }
  .hero-visual-with-copy .hero-visual-actions a:first-child {
    width: 38% !important;
    flex: 0 1 38% !important;
  }
  .hero-visual-with-copy .hero-visual-actions a:last-child {
    width: 43% !important;
    flex: 0 1 43% !important;
  }
  .hero-visual-with-copy .hero-visual-actions img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
  }
  .hero-benefits-section {
    padding: 6px 0 36px !important;
  }
}
@media (max-width: 380px) {
  .hero-visual-with-copy {
    height: 145vw !important;
  }
  .hero-visual-with-copy .hero-visual-image {
    object-position: 72% center !important;
  }
  .hero-copy-overlay .hero-title-small {
    font-size: 17px !important;
  }
  .hero-copy-overlay .hero-title-large {
    font-size: 40px !important;
  }
}

/* Точечное увеличение заголовка и кнопок на первом экране мобильной версии */
@media (max-width: 700px) {
  .hero-copy-overlay .hero-title-small {
    font-size: clamp(20px, 5.5vw, 23px) !important;
  }
  .hero-copy-overlay .hero-title-large {
    font-size: clamp(46px, 12.2vw, 52px) !important;
  }
  .hero-visual-with-copy .hero-visual-actions a:first-child {
    width: 41% !important;
    flex-basis: 41% !important;
  }
  .hero-visual-with-copy .hero-visual-actions a:last-child {
    width: 46% !important;
    flex-basis: 46% !important;
  }
}
@media (max-width: 380px) {
  .hero-copy-overlay .hero-title-small {
    font-size: 19px !important;
  }
  .hero-copy-overlay .hero-title-large {
    font-size: 44px !important;
  }
}

/* Полноэкранная мобильная заставка на готовом фоне пользователя */
.mobile-intro-track {
  display: none;
}

@media (max-width: 700px) {
  .mobile-intro-track {
    display: block !important;
    position: relative;
    height: 100vh;
    height: 100svh;
    margin-top: -54px !important;
    padding: 0 !important;
  }
  .mobile-intro-stage {
    position: sticky;
    top: 0;
    width: 100%;
    height: 100vh;
    height: 100svh;
    min-height: 620px;
    overflow: hidden;
    isolation: isolate;
    background: #55b4f4 url("../images/2026/mobile-intro-background.png") center
      center / cover no-repeat;
    transform-origin: center center;
    will-change: opacity, transform;
    transition: opacity 0.08s linear;
  }
  header.mobile-intro-active {
    position: sticky !important;
    top: 0 !important;
    z-index: 130 !important;
    background: transparent !important;
    border-bottom-color: transparent !important;
    box-shadow: none !important;
  }
  header.mobile-intro-active .official-logo {
    filter: brightness(0) invert(1) !important;
  }
  header.mobile-intro-active .menu {
    color: #fff !important;
  }
  header:not(.mobile-intro-active) {
    background: rgba(255, 255, 255, 0.98) !important;
    border-bottom: 1px solid rgba(220, 222, 235, 0.72) !important;
    box-shadow: 0 4px 16px rgba(23, 22, 53, 0.045) !important;
  }
  .mobile-intro-copy {
    position: absolute;
    z-index: 2;
    top: 68px;
    left: 12px;
    right: 12px;
    text-align: center;
    color: #25234f;
  }
  .mobile-intro-kicker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    max-width: calc(100vw - 52px);
    padding: 6px 13px;
    border: 1.5px solid rgba(255, 255, 255, 0.98);
    border-radius: 999px;
    color: #fff;
    font-size: 11px;
    line-height: 1.15;
    font-weight: 750;
    white-space: nowrap;
  }
  .mobile-intro-title-small {
    margin-top: 30px;
    color: #25234f;
    font-size: clamp(20px, 5.5vw, 23px);
    line-height: 1.05;
    letter-spacing: -0.035em;
    font-weight: 850;
    white-space: nowrap;
  }
  .mobile-intro-title-large {
    margin-top: 2px;
    color: #d41124;
    font-size: clamp(46px, 12.2vw, 52px);
    line-height: 0.94;
    letter-spacing: -0.055em;
    font-weight: 800;
    white-space: nowrap;
  }
  .mobile-intro-logo-letter {
    display: inline-flex;
    width: 0.55em;
    height: 0.68em;
    align-items: center;
    justify-content: center;
    vertical-align: baseline;
    position: relative;
    top: 0.055em;
    margin: 0 0.015em 0 0.045em;
  }
  .mobile-intro-logo-letter img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
  .mobile-intro-scroll-cue {
    position: absolute;
    z-index: 3;
    left: 50%;
    bottom: 48px;
    width: 38px;
    height: 60px;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: flex-start;
  }
  .mobile-intro-scroll-cue span {
    position: relative;
    display: block;
    width: 4px;
    height: 46px;
    border-radius: 4px;
    background: #fff;
    animation: introArrowFloat 1.45s ease-in-out infinite;
  }
  .mobile-intro-scroll-cue span:after {
    content: "";
    position: absolute;
    left: -8px;
    bottom: 0;
    width: 16px;
    height: 16px;
    border-right: 4px solid #fff;
    border-bottom: 4px solid #fff;
    border-radius: 1px;
    transform: rotate(45deg);
  }
  @keyframes introArrowFloat {
    0%,
    100% {
      transform: translateY(0);
      opacity: 0.8;
    }
    50% {
      transform: translateY(7px);
      opacity: 1;
    }
  }
}
@media (max-width: 380px) {
  .mobile-intro-copy {
    top: 68px;
  }
  .mobile-intro-title-small {
    font-size: 19px;
  }
  .mobile-intro-title-large {
    font-size: 44px;
  }
  .mobile-intro-kicker {
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .mobile-intro-scroll-cue span {
    animation: none;
  }
}

/* Финальная мобильная настройка: шапка поверх изображения + переход одним жестом */
@media (max-width: 700px) {
  header.mobile-intro-active {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 140 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }
  header.mobile-intro-active .wrap,
  header.mobile-intro-active .nav {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }
  header.mobile-intro-active .official-logo {
    filter: brightness(0) invert(1) !important;
  }
  header.mobile-intro-active .menu {
    color: #fff !important;
    background: transparent !important;
  }
  .mobile-intro-track {
    height: 100svh !important;
    height: 100vh !important;
    margin-top: 0 !important;
  }
  .mobile-intro-stage {
    position: relative !important;
    top: auto !important;
    height: 100svh !important;
    height: 100vh !important;
    min-height: 0 !important;
  }
}

/* Мобильная заставка: новый фон, логотип поверх фона, без кнопки меню,
   переход между заставкой и главной страницей через crossfade */
@media (max-width: 700px) {
  .mobile-intro-track {
    position: static !important;
    height: 54px !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  html.mobile-intro-dismissed .mobile-intro-track {
    height: 0 !important;
  }
  .mobile-intro-stage {
    position: fixed !important;
    inset: 0 !important;
    z-index: 200 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100svh !important;
    min-height: 0 !important;
    background: #55b4f4 url("../images/2026/mobile-intro-background.png") center
      center / cover no-repeat !important;
    opacity: 1;
    transform: none !important;
    transition:
      opacity 0.68s cubic-bezier(0.22, 0.72, 0.2, 1),
      visibility 0.68s;
    visibility: visible;
    pointer-events: auto;
  }
  html.mobile-intro-visible .mobile-intro-stage {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  html.mobile-intro-dismissed .mobile-intro-stage {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
  header.mobile-intro-active {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 220 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }
  header.mobile-intro-active .wrap,
  header.mobile-intro-active .nav {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }
  header.mobile-intro-active .official-logo {
    filter: brightness(0) invert(1) !important;
  }
  header.mobile-intro-active .menu {
    display: none !important;
  }
  html.mobile-intro-visible main#top {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
  html.mobile-intro-dismissed main#top {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  main#top {
    transition:
      opacity 0.68s cubic-bezier(0.22, 0.72, 0.2, 1),
      visibility 0.68s;
  }
  html.mobile-intro-visible {
    overflow: hidden;
  }
  html.mobile-intro-dismissed {
    overflow-x: hidden;
    overflow-y: auto;
  }
}
@media (min-width: 701px) {
  .mobile-intro-track,
  .mobile-intro-stage {
    display: none !important;
  }
}

/* Исправление: логотип непосредственно на фоне заставки, без отдельной шапки */
@media (max-width: 700px) {
  header.mobile-intro-active {
    position: fixed !important;
    inset: 0 0 auto 0 !important;
    width: 100% !important;
    height: 64px !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    border: 0 !important;
    box-shadow: none !important;
    outline: 0 !important;
    overflow: visible !important;
  }
  header.mobile-intro-active::before,
  header.mobile-intro-active::after,
  header.mobile-intro-active .wrap::before,
  header.mobile-intro-active .wrap::after,
  header.mobile-intro-active .nav::before,
  header.mobile-intro-active .nav::after {
    content: none !important;
    display: none !important;
    background: none !important;
    box-shadow: none !important;
  }
  header.mobile-intro-active .wrap,
  header.mobile-intro-active .nav {
    width: 100% !important;
    min-height: 64px !important;
    height: 64px !important;
    padding: 0 16px !important;
    margin: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    border: 0 !important;
    box-shadow: none !important;
  }
  header.mobile-intro-active .brand,
  header.mobile-intro-active .official-logo {
    background: transparent !important;
    box-shadow: none !important;
  }
  header.mobile-intro-active .official-logo {
    filter: brightness(0) invert(1) !important;
  }
  header.mobile-intro-active .menu,
  header.mobile-intro-active .links,
  header.mobile-intro-active .login {
    display: none !important;
  }
  .mobile-intro-copy {
    top: 76px !important;
  }
  .mobile-intro-title-small {
    font-size: clamp(24px, 6.2vw, 27px) !important;
    margin-top: 32px !important;
  }
  .mobile-intro-title-large {
    font-size: clamp(54px, 14vw, 61px) !important;
    line-height: 0.92 !important;
  }
}
@media (max-width: 380px) {
  .mobile-intro-title-small {
    font-size: 22px !important;
  }
  .mobile-intro-title-large {
    font-size: 51px !important;
  }
}

/* Вся карточка результата фильтра — единая активная ссылка на курс */
@media (max-width: 700px) {
  #resultsGrid .result-card[data-course-url] {
    cursor: pointer !important;
    -webkit-tap-highlight-color: transparent;
    transition:
      transform 0.18s ease,
      box-shadow 0.18s ease,
      border-color 0.18s ease !important;
  }
  #resultsGrid .result-card[data-course-url]:active {
    transform: scale(0.985) !important;
  }
  #resultsGrid .result-card[data-course-url]:focus-visible {
    outline: 2px solid #d41124 !important;
    outline-offset: 3px !important;
  }
  #resultsGrid .result-card[data-course-url] > a {
    position: relative;
    z-index: 1;
  }
}

/* Главная мобильная обложка: центрируем персонажа в кадре */
@media (max-width: 700px) {
  .hero .hero-visual-with-copy {
    overflow: hidden !important;
  }
  .hero .hero-visual-with-copy > .hero-visual-image {
    object-fit: cover !important;
    object-position: 67% 50% !important;
  }
}

/* Только мобильное окно курса «Памятка для работников...»: опускаем изображение,
   чтобы верх головы мужчины не обрезался. Десктоп не затрагивается. */
@media (max-width: 700px) {
  .modal-image[src*="service-02.webp"] {
    object-position: center -28px !important;
  }
}

/* Только компьютерная версия: показываем больше верхней части обложки курса
   «Памятка...», чтобы голова мужчины целиком попадала в кадр. */
@media (min-width: 701px) {
  .modal-image[src*="service-02.webp"] {
    height: 420px !important;
    object-fit: cover !important;
    object-position: center top !important;
  }
}

/* Только обложка карточки курса «Единый стандарт...» на странице направления.
   На компьютере показываем верх фотографии, чтобы голова мужчины не обрезалась.
   Окно подробностей и мобильную версию не затрагиваем. */
@media (min-width: 701px) {
  .direction-course[data-course-card="course1"]
    .direction-course-media
    img[src*="service-01.webp"] {
    object-position: center top !important;
  }
}

/* Небольшой дополнительный отступ между главным изображением и первым блоком.
   Только мобильная главная страница. */
@media (max-width: 700px) {
  .hero {
    padding-bottom: 24px !important;
  }
}
