/* Мобильный каркас публичного сайта; настольная версия остаётся в основных CSS. */
#header .header-mobile-tools { display: none; }

@media screen and (max-width: 760px) {
  html, body { min-width: 0; width: 100%; height: auto; }
  #heco, #header, #content, #footer, #footer2, .wrapper {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  body > #heco { min-height: 0; height: auto; }
  #content { margin-top: 0; padding: 0 0 24px; }
  #content > .wrapper { padding: 0 12px; overflow-x: auto; }
  #content img { max-width: 100%; }

  /* Шапка: логотип, основные контакты, поиск, раскрываемые меню и кабинет. */
  #header {
    height: auto;
    background: linear-gradient(160deg, #031020, #014090);
  }
  #header > .menu { display: flex; flex-direction: column; padding: 14px 12px 12px; }
  #header .header-brand { order: 1; display: block; }
  #header .header-brand > tbody,
  #header .header-brand > tbody > tr { display: block; }
  #header .header-brand th { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; }
  #header .logo { width: 144px; height: 48px; flex: none; }
  #header .logo a { position: static; width: 144px; height: 48px; }
  #header .years { display: none; }
  #header .phones { display: block; background: none; padding: 8px 0 12px; }
  #header .phones div { font-size: 13px; line-height: 1.5; }
  #header .phones div:not(:first-child) { display: none; }
  #header.has-mobile-controls .header-mobile-tools { display: flex; gap: 6px; }
  #header .header-mobile-tools button {
    display: inline-flex; align-items: center; justify-content: center; gap: 5px;
    min-height: 44px; padding: 0 9px; border: 1px solid rgba(255,255,255,.3);
    border-radius: 6px; background: rgba(255,255,255,.08); color: #fff;
    font: 600 13px/1.2 var(--vp-header-font); cursor: pointer;
  }
  #header .header-mobile-tools button[aria-expanded="true"] { background: #0b5fcc; border-color: #559ced; }
  #header .header-mobile-tools button:focus-visible { outline: 2px solid #ffc563; outline-offset: 2px; }
  #header .header-mobile-tools svg { width: 16px; height: 16px; flex: none; }
  #header .header-top { order: 2; display: block; height: auto !important; }
  #header .header-top > tbody { display: block; }
  #header .header-top > tbody > tr { display: flex; flex-direction: column; gap: 12px; }
  #header .header-top > tbody > tr > td { display: block; width: 100%; min-width: 0; }
  #header .header-top .header-promo { order: -1; }
  #header #lenta { width: 100%; }
  #header #lenta .action {
    position: static; width: auto; height: auto; padding: 9px 12px;
    background: #ffc563; border-radius: 6px; color: #182c42;
  }
  #header #lenta .action, #header #lenta .action span { font-size: 13px; line-height: 1.4; }
  #header .text { padding: 0 0 8px; }
  #header .text, #header .text a { font-size: 13px; line-height: 1.4; }
  #header .header-top .text a,
  #header .header-top .text a:visited,
  #header .header-top .text a:hover,
  #header .header-top .text a:active { color: #c1ddff; }
  #SearchExtendedQuick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  #SearchExtendedQuick .select2-container { width: 100% !important; margin: 0; min-width: 0; }
  #SearchExtendedQuick select.hq-combo-src { width: 100%; height: 44px; margin: 0; font-size: 16px; }
  #SearchExtendedQuick .select2-selection--single.hq-combo { height: 44px; }
  #SearchExtendedQuick .hq-combo .select2-selection__rendered { font-size: 16px; line-height: 42px; }
  #header .header-top .button,
  #header .header-top .button i,
  #header .header-top .button u { font-size: 14px !important; }
  #header .header-top .button { height: 44px !important; line-height: 44px !important; text-align: center; }
  #SearchExtendedQuick > .button { grid-column: 1 / -1; }
  .hq-combo-dd .select2-search--dropdown .select2-search__field { height: 40px; font-size: 16px; }
  .hq-combo-dd li.select2-results__option { min-height: 40px; padding: 9px 10px; box-sizing: border-box; white-space: normal; font-size: 16px; }
  #header.has-mobile-controls .header-account { display: none; }
  #header.has-mobile-controls .header-account.is-open { display: block; }
  #header #SignInBox { width: 100%; height: auto; padding: 12px 0 0; }
  #header #signin { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  #header #signin input[type="text"], #header #signin input[type="password"] {
    box-sizing: border-box !important; width: 100%; height: 44px; margin: 0;
    padding: 10px 8px; font-size: 16px; line-height: 22px;
  }
  #header #signin .button { grid-column: 1 / -1; }
  #header #signin big { grid-column: 1 / -1; width: auto; height: auto; white-space: normal; font-size: 16px; }
  #header .menu-items { order: 3; min-width: 0; height: auto; padding: 12px 0 0; }
  #header.has-mobile-controls .menu-items { display: none; }
  #header.has-mobile-controls .menu-items.is-open { display: block; }
  #header .menu-items table, #header .menu-items tbody { display: block; border: 0; }
  #header .menu-items tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  #header .menu-items td { display: block; border: 0; background: none; min-width: 0; }
  #header .menu-items a, #header .menu-items a:visited, #header .menu-items a:hover, #header .menu-items a:active {
    display: flex; align-items: center; justify-content: center; gap: 4px;
    box-sizing: border-box; min-height: 44px; height: auto; padding: 10px 6px;
    background: rgba(255,255,255,.1); border-radius: 6px; color: #fff;
    font-size: 13px !important; line-height: 1.35; white-space: normal; text-shadow: none;
  }
  #header .menu-items td.active a { background: #0b5fcc; }
  #header .menu-items .chg-count { color: #c0c8d6; }
  #header .menu-items .chg-count.chg-new { color: #ff9898; }

  /* Главная: фотография и баннер целиком, карточки и текст — в одну колонку. */
  .home-modern #content { padding-left: 0; padding-right: 0; }
  .home-modern #content > .wrapper { overflow-x: visible; }
  .home-modern #content .boats {
    display: flex; flex-direction: column; justify-content: flex-end;
    box-sizing: border-box; height: auto; min-height: 320px;
    padding: 116px 16px 16px !important; margin: 16px 0 20px;
    background-position: center !important;
  }
  .home-modern #content .boats > a.button { top: 16px; left: 16px; padding: 11px 16px !important; font-size: 14px !important; }
  .home-modern #content .boats > a.button i { font-size: 14px !important; }
  .home-modern #content .boats h1 {
    order: 1; position: relative; top: auto; left: auto; right: auto; bottom: auto;
    max-width: none; font-size: 19px; font-weight: 700; line-height: 1.4;
    text-align: left; white-space: normal; overflow-wrap: break-word;
  }
  .home-modern #content .boats::before { background: linear-gradient(180deg, rgba(3,16,32,.03) 10%, rgba(3,16,32,.64) 45%, rgba(3,16,32,.94) 100%); }
  .home-modern #content .boats .boatslist { order: 2; position: relative; top: auto; left: auto; right: auto; margin-top: 14px; }
  .home-modern #content .boats .boatslist > div:first-child { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 6px; }
  .home-modern #content .boats .boatslist a { padding: 8px 10px !important; font-size: 12px; line-height: 1.3; }
  .home-modern #content .slider { width: 100%; }
  .home-modern #content .slider img { width: 100%; height: auto; }
  .home-modern #content table.quicklinks { display: block; width: 100%; margin: 16px 0 20px !important; border-spacing: 0; }
  .home-modern #content table.quicklinks > tbody { display: block; }
  .home-modern #content table.quicklinks > tbody > tr { display: grid; grid-template-columns: 1fr; gap: 12px; }
  .home-modern #content table.quicklinks td { display: block; width: auto; min-width: 0; }
  .home-modern #content table.quicklinks img { width: 100%; height: 160px; }
  .home-modern #content .promoTitle { box-sizing: border-box; width: 100%; }
  .home-modern #content table.news-help { display: block; width: 100%; margin: 0; border-spacing: 0; }
  .home-modern #content table.news-help > tbody { display: grid; grid-template-columns: minmax(0, 1fr); }
  .home-modern #content table.news-help > tbody > tr { display: contents; }
  .home-modern #content table.news-help > tbody > tr > td { display: block; width: auto; min-width: 0; }
  .home-modern #content table.news-help > tbody > tr:first-child > td:first-child { grid-row: 1; }
  .home-modern #content table.news-help > tbody > tr:nth-child(2) > td:first-child { grid-row: 2; }
  .home-modern #content table.news-help > tbody > tr:first-child > td:nth-child(2) { grid-row: 3; margin-top: 24px; }
  .home-modern #content table.news-help > tbody > tr:nth-child(2) > td:nth-child(2) { grid-row: 4; }
  .home-modern #content table.imggallery { width: 100%; table-layout: fixed; border-spacing: 0 16px; }
  .home-modern #content table.imggallery td:not(.news-date) { overflow-wrap: break-word; }
  .home-modern #content p { text-align: left !important; }
  .home-modern #content .icon { display: block; padding-top: 12px !important; padding-bottom: 12px !important; }
  .home-modern #content .payment-options { padding-left: 22px; }
  .home-modern #content .payment-options li { line-height: 1.6; }

  /* Подвал без фиксированной ширины и отрицательных отступов. */
  #footer { margin-top: 0; height: auto; padding: 24px 12px 12px; background: #014090; }
  #footer .table_footer, #footer .table_footer > tbody { display: block; }
  #footer .table_footer > tbody > tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 16px; }
  #footer .table_footer > tbody > tr > td { display: block; width: auto; padding: 0 !important; min-width: 0; }
  #footer .table_footer td span { padding: 0 0 10px; font-size: 17px; line-height: 1.3; }
  #footer .table_footer td a { padding: 5px 0; font-size: 14px !important; line-height: 1.5; overflow-wrap: break-word; }
  #footer div.offices { width: 100%; grid-template-columns: 1fr; margin: 24px 0 0; }
  #footer div.office { display: flex; flex-direction: column; gap: 0; }
  #footer .office .week { width: 100%; }
  #footer div.office .week .d { font-size: 12px; height: 30px; line-height: 30px; }
  #footer div.office .week .t { font-size: 13px; }
  #footer2 { width: 100% !important; padding: 0 12px 16px; }
  #map_podval { box-sizing: border-box; width: 100%; }
  #russiatourism_widget_ples, .widget-operator { max-width: 100%; box-sizing: border-box; }
  #footer2 #widget-operators-wrapper { width: 100%; max-width: 332px; height: auto; }
  #footer2 .widget-operator { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px; }
  #footer2 .widget-operator::after { display: none; }
  #footer2 .widget-operator__data { flex: 1; min-width: 0; width: auto; padding: 0; }
  #footer2 .widget-operator__logo { position: static; transform: none; width: 56px; flex: none; }
  #footer2 .widget-operator__logo img { width: 100%; }
  #footer2 .widget-operator__number { overflow-wrap: anywhere; }
  #div-cookies > div { box-sizing: border-box; gap: 8px; padding: 12px !important; }
  #div-cookies > div > div:first-child { min-width: 0; }
  #div-cookies, #div-cookies div, #div-cookies a { font-size: 12px; line-height: 1.4; }
  #div-cookies > div > div:last-child { padding: 0 !important; }
  #AcceptCookies { min-height: 44px; padding: 8px 12px; }
}

@media screen and (max-width: 360px) {
  #header .logo, #header .logo a { width: 100px; }
  #header .header-mobile-tools svg { display: none; }
}

@media screen and (min-width: 480px) and (max-width: 760px) {
  .home-modern #content table.quicklinks > tbody > tr { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .home-modern #content .promoTitle { font-size: 13px; padding: 22px 8px 10px !important; }
  #footer div.offices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
