
/* mobile-nav.css — compact mobile header + dropdown */
@media (max-width: 991px) {
  /* Small top header so the toggle doesn't float alone */
  .mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 12px;
    background: linear-gradient(135deg, #ff8c42 0%, #ff6b35 100%);
    box-shadow: 0 4px 16px rgba(0,0,0,.15);
    z-index: 1100; /* above panel */
  }
  .mobile-header .mobile-logo {
    height: 36px;
    width: auto;
    border-radius: 8px;
    display: block;
  }

  /* Content should sit under the header */
  .main-content { 
    margin-left: 0; 
    padding-top: 56px; 
  }
  .sidebar-logo { display: none; }

  /* Drop-down panel (uses your existing left menu styles) */
  .sidebar-navigation {
    position: fixed;
    left: 0;
    top: 56px; /* sit below the mobile header */
    width: 100%;
    height: auto;
    max-height: calc(100vh - 56px);
    overflow-y: auto;
    transform: translateY(-110%);
    transition: transform .28s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,.2);
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    padding-top: 12px;
    z-index: 1050; /* under header, above content */
  }
  body.nav-open .sidebar-navigation {
    transform: translateY(0);
  }

  /* Toggle button now lives inside the mobile header */
  .mobile-nav-toggle {
    position: absolute;
    right: 12px;
    top: 6px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    z-index: 1110;
    background: linear-gradient(135deg, #ff8c42 0%, #ff6b35 100%);
    box-shadow: 0 6px 16px rgba(255, 107, 53, .35);
  }
  .mobile-nav-toggle:focus { outline: 2px solid rgba(255,255,255,.6); outline-offset: 2px; }

  .mobile-nav-toggle .bar {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    margin: 3px 0;
    transition: transform .2s ease, opacity .2s ease;
  }
  body.nav-open .mobile-nav-toggle .bar:nth-child(1) { transform: translateY(5px) rotate(45deg); }
  body.nav-open .mobile-nav-toggle .bar:nth-child(2) { opacity: 0; }
  body.nav-open .mobile-nav-toggle .bar:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

  /* Backdrop */
  .mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    z-index: 1040;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
  }
  body.nav-open .mobile-overlay {
    opacity: 1;
    pointer-events: auto;
  }
}

body.nav-open { overflow: hidden; }

/* NEWS: фикс горизонтального скролла и выравнивание кнопки */
@media (max-width: 991px) {
  /* отключаем горизонтальный скролл, если что-то шире вьюпорта */
  html, body { max-width: 100%; overflow-x: hidden; }

  /* у news есть контейнер с огромными отрицательными маргинами — убираем их на мобилке */
  .container-28 { margin-left: 0 !important; margin-right: 0 !important; }

  /* чуть ужмём боковые отступы карточек, чтобы всё ровно смотрелось */
  .div-block-13, .div-block-14 { margin-left: 15px; margin-right: 15px; }

  /* на мобильных основной контент не должен иметь левого отступа под сайдбар */
  .main-content { margin-left: 0 !important; }

  /* перестраховка: прячем левый сайдбар на узких экранах (моб. меню есть) */
}

