/* responsive2026.css -- mobile adaptation layer for Tpl_2016
 * Loaded AFTER base.css / v3.css / svc2026.css.
 * Goal:
 *   1) Unlock the legacy 990px min-width lock (body.min990 / .wide1190) so the
 *      existing responsive breakpoints (base.css 1180/860/900/620,
 *      svc2026.css 1100/760) can actually take effect on phones/tablets.
 *   2) Contain images / iframes so legacy table pages don't blow out sideways.
 * Desktop (>991px) is 100% unchanged -- every rule below lives in a max-width
 * media query.
 */

/* ---- tablet / small laptop: relax fixed side padding ---- */
@media (max-width: 1100px) {
  .wide1190 { padding-left: 20px; padding-right: 20px; }
}

/* ---- phones / small tablets: break the 990px lock ---- */
@media (max-width: 991px) {
  body.min990 { min-width: 0 !important; }

  .wide1190 {
    min-width: 0 !important;
    max-width: 100% !important;
    width: auto !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  .container .wide1190 { min-width: 0 !important; max-width: 100% !important; }

  /* legacy media should never overflow the viewport */
  img, iframe, video, object { max-width: 100% !important; height: auto !important; }
}


/* ---- mobile hamburger menu (<=860px, mirrors base.css nav-hide breakpoint) ---- */
#siteHdr .hd-burger { display: none; }

@media (max-width: 860px) {
  #siteHdr .hd-burger {
    display: inline-flex; order: 3; margin-left: auto;
    width: 40px; height: 40px; flex-direction: column; gap: 5px;
    align-items: center; justify-content: center;
    background: none; border: 0; padding: 0; cursor: pointer;
  }
  #siteHdr .hd-burger span {
    display: block; width: 22px; height: 2px; border-radius: 2px;
    background: var(--ym-ink); transition: transform .25s, opacity .25s;
  }
  #siteHdr .hd-act { display: none; }

  body.nav-open #siteHdr .hd-nav {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border-top: 1px solid var(--ym-line);
    box-shadow: 0 12px 24px rgba(20,22,28,.12);
    padding: 6px 0 10px; max-height: calc(100vh - 56px); overflow-y: auto;
  }
  body.nav-open #siteHdr .hd-nav > li { position: static; }
  body.nav-open #siteHdr .hd-nav > li > a {
    display: flex; align-items: center; justify-content: space-between;
    padding: 13px 18px; border-bottom: 0; font-size: 15px;
  }
  body.nav-open #siteHdr .hd-drop {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; background: none; padding: 0 0 6px; min-width: 0;
  }
  body.nav-open #siteHdr .hd-drop a {
    padding: 10px 18px 10px 34px; font-size: 14px; color: var(--ym-ink-2);
    border-top: 1px solid var(--ym-line);
  }
  body.nav-open #siteHdr .hd-act {
    display: flex; flex-direction: column; gap: 10px; align-items: stretch;
    padding: 12px 18px; border-top: 1px solid var(--ym-line);
  }
  body.nav-open #siteHdr .hd-act .hd-btn { justify-content: center; }
  body.nav-open #siteHdr .hd-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.nav-open #siteHdr .hd-burger span:nth-child(2) { opacity: 0; }
  body.nav-open #siteHdr .hd-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}
