/* === COLUMN HEIGHT BALANCE 2026-09-24 ===
   Sitewide rubber columns: .content left + aside.right match height on desktop.
   Short columns absorb leftover height via flex stretch / margin-top:auto —
   no fake empty cards, no invented content.
   Load AFTER locks + home-city-fill; BEFORE font-scale-110 (scale stays last).
   Do NOT edit side-column / vozduh / maps-hub / readability lock sheets.
   Do NOT tip-wipe main.tpl / adaptive.css / vozduh.php.
   Owner: bc-8a829a6a (column-height-balance pass). */
@media (min-width: 1021px) {
  /* Row: main stack + right sidebar stretch to shared height */
  .content.wrap.cf {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 0 30px !important;
    box-sizing: border-box !important;
  }

  /* Neutralize clearfix pseudos — they become stray flex items otherwise */
  .content.wrap.cf::before,
  .content.wrap.cf::after,
  .content.wrap.cf > .left.cf::before,
  .content.wrap.cf > .left.cf::after,
  .content.wrap.cf > .left > .hblock.cf::before,
  .content.wrap.cf > .left > .hblock.cf::after,
  .content.wrap.cf > .left > .mblock.cf::before,
  .content.wrap.cf > .left > .mblock.cf::after {
    content: none !important;
    display: none !important;
  }

  .content.wrap.cf > .left,
  .content.wrap.cf > .left.cf {
    float: none !important;
    width: 870px !important;
    max-width: 870px !important;
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-self: stretch !important;
    min-width: 0 !important;
    min-height: 0 !important;
    box-sizing: border-box !important;
  }

  .content.wrap.cf > aside.right,
  .content.wrap.cf > aside.right.side-column {
    float: none !important;
    width: 300px !important;
    max-width: 300px !important;
    flex: 0 0 300px !important;
    display: flex !important;
    flex-direction: column !important;
    align-self: stretch !important;
    align-items: stretch !important;
    /* Pack widgets at top — equal column box height already aligns
       bottoms with .left. Avoid space-between (huge gaps when left >> aside). */
    justify-content: flex-start !important;
    min-height: 0 !important;
    box-sizing: border-box !important;
  }

  .content.wrap.cf > aside.right.side-column > .side_block {
    flex: 0 0 auto !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .content.wrap.cf > aside.right.side-column > .side_block:last-child {
    margin-bottom: 0 !important;
  }

  /* Inner pages: left_col + mid_col share .left height */
  .content.wrap.cf > .left:has(> .left_col) {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 0 30px !important;
  }

  .content.wrap.cf > .left > .left_col {
    float: none !important;
    width: 210px !important;
    max-width: 210px !important;
    flex: 0 0 210px !important;
    display: flex !important;
    flex-direction: column !important;
    align-self: stretch !important;
    min-height: 0 !important;
    box-sizing: border-box !important;
  }

  .content.wrap.cf > .left > .mid_col {
    float: none !important;
    width: auto !important;
    max-width: none !important;
    margin-left: 0 !important;
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-self: stretch !important;
    min-width: 0 !important;
    min-height: 0 !important;
    box-sizing: border-box !important;
  }

  /* Short left rail: stretch the digest widget, pin «Все…» footer */
  .content.wrap.cf > .left > .left_col > .last_news_widget,
  .content.wrap.cf > .left > .left_col > .mblock.last_news_widget,
  .content.wrap.cf > .left > .left_col > .mblock {
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
    margin-bottom: 0 !important;
    box-sizing: border-box !important;
  }

  .content.wrap.cf > .left > .left_col .last_news_widget > a.all_news {
    margin-top: auto !important;
    padding-top: 12px !important;
    align-self: flex-start;
  }

  /* Mid column: keep sequential content packed (no flex-grow holes
     between full-story and related blocks). Extra height sits below
     the last child. Pin only true bottom chrome when present. */
  .content.wrap.cf > .left > .mid_col {
    justify-content: flex-start !important;
  }

  .content.wrap.cf > .left > .mid_col > .full-story,
  .content.wrap.cf > .left > .mid_col > .mblock,
  .content.wrap.cf > .left > .mid_col > .hblock {
    flex: 0 0 auto !important;
  }

  .content.wrap.cf > .left > .mid_col > .navigation-holder,
  .content.wrap.cf > .left > .mid_col > .bottom-nav,
  .content.wrap.cf > .left > .mid_col > .nav_block {
    margin-top: auto !important;
  }

  /* Homepage: keep stacked mid sections packed (home-city-fill owns top row).
     Equal-height with aside still applies via the row flex stretch above. */
  .content.wrap.cf > .left:not(:has(> .left_col)) {
    justify-content: flex-start !important;
  }
}

/* Mobile / tablet stack unchanged — single column OK */
@media (max-width: 1020px) {
  .content.wrap.cf {
    display: block;
  }
  .content.wrap.cf > .left > .left_col .last_news_widget > a.all_news {
    margin-top: 10px !important;
    padding-top: 0 !important;
  }
}
/* === end COLUMN HEIGHT BALANCE === */
