/* YarLand.ru — Responsive overrides on top of new.css */

body { min-width: 0; }
#i_container { min-width: 0; }

/* Content-first: i_yar full-width standalone */
#i_yar { width: 100%; float: none; clear: both; }
#i_yar .ibc { height: auto; overflow: visible; line-height: 1.6; }
#i_yar h1 { font-size: 18pt; color: #09364c; margin-bottom: 10px; }
#i_yar h2 { margin-top: 15px; }
#i_yar table { border-collapse: collapse; }
#i_yar table td { border-bottom: 1px solid #ebedec; }

/* Burger (hidden desktop) */
.burger-toggle {
  display: none;
  background: #1d5575;
  color: #fff;
  border: none;
  padding: 7px 12px;
  font-size: 10pt;
  font-family: Tahoma, Verdana, Arial, sans-serif;
  cursor: pointer;
  position: absolute;
  right: 10px;
  top: 8px;
  z-index: 10;
  border-radius: 3px;
}
.burger-toggle:hover { background: #164560; }

/* Placeholders */
.img-placeholder {
  background: #e8eaec;
  border: 1px solid #d3dde2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9cb2be;
  overflow: hidden;
}
.img-placeholder::after { content: "📷"; font-size: 24px; opacity: .4; }

.firm-placeholder {
  display: inline-block;
  width: 65px;
  height: 55px;
  background: #287098;
  color: #fff;
  font-size: 22pt;
  font-weight: bold;
  font-family: Tahoma, Verdana, Arial, sans-serif;
  text-align: center;
  line-height: 55px;
  border: 1px solid #ebedec;
  float: left;
  margin: 0 5px 2px 0;
  border-radius: 3px;
}

.weather-icon, .currency-icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  text-align: center;
  line-height: 20px;
  vertical-align: bottom;
  font-size: 14px;
}
.currency-icon { font-weight: bold; color: #287098; font-size: 12px; }

/* Panel auto-heights */
#idom_msgs_block .ibc, #i_catalog .ibc, #manage_news,
#info_block, #i_last_photos .ibc, #manage_realty {
  height: auto;
  min-height: 50px;
}

/* Full-width blocks */
#idom_msgs_block { width: 100%; float: none; }
#i_realty { display: none; }
#i_catalog { width: 100%; float: none; }

#i_submit { cursor: pointer; }

/* Footer layout */
#i_footer {
  clear: both;
  border-top: 2px solid #999;
  margin-top: 10px;
  padding: 12px 0;
  font-size: 9pt;
}
.footer-inner {
  width: 96%;
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  gap: 20px;
}
.footer-left {
  flex: 1;
  min-width: 0;
}
.footer-right {
  flex: 0 0 250px;
  text-align: right;
}
.footer-left a { margin-right: 2px; }

/* Hide empty banners */
#ban_728x90, #i_ban_240x400x1, #i_ban_240x400x2,
#ban_row, #ban_row_2, #ban_row_3, #ban_row_4,
#full_banner { display: none !important; }

/* Quick-links widget */
.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.quick-links a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #287098;
  color: #fff;
  padding: 6px 12px;
  border-radius: 3px;
  font-size: 9pt;
  font-weight: bold;
  text-decoration: none;
  white-space: nowrap;
}
.quick-links a:visited { color: #fff; }
.quick-links a:hover { background: #1d5575; text-decoration: none; }
.quick-links a .ql-icon { font-size: 14px; }

/* Seed: city facts cards */
.facts-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.fact-card {
  flex: 1 1 110px;
  background: #287098;
  color: #fff;
  padding: 12px 10px;
  border-radius: 4px;
  text-align: center;
  min-width: 100px;
}
.fact-card .fact-val { display: block; font-size: 16pt; font-weight: bold; line-height: 1.2; }
.fact-card .fact-lbl { display: block; font-size: 8pt; opacity: .85; margin-top: 2px; }

/* ========== TABLET ========== */
@media (max-width: 960px) {
  #i_container { max-width: 100%; }
  #i_news { width: 58%; }
  #i_info { width: 40%; }
  .new_firm { width: 48%; }
}

/* ========== MOBILE ========== */
@media (max-width: 768px) {
  body { font-size: 10pt; }

  /* Logo bar: compact, keep original gradient feel */
  #i_top {
    height: auto;
    position: relative;
    padding: 0;
  }
  #i_logo_h1 {
    float: none;
    width: auto;
    height: auto;
    text-align: left;
    padding: 6px 10px;
    margin: 0;
  }
  #i_logo_h1 svg { width: 130px; height: 45px; }

  /* Burger visible, positioned in logo bar */
  .burger-toggle { display: block; top: 10px; }

  /* Menu: original blue, collapses */
  #menu {
    display: none;
    height: auto;
    white-space: normal;
  }
  #menu.open { display: block; }
  .menu_item { float: none; width: 100%; margin: 0; }
  a.mmenu_a, a.mmenu_a:visited {
    height: auto;
    line-height: 36px;
    padding: 0 12px;
    font-size: 9pt;
    border-bottom: 1px solid rgba(255,255,255,.12);
  }
  .i_submenu { display: none; }

  /* Topline: compact single row with weather + currency, no search */
  #i_top_line {
    height: auto;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid #bcbcba;
  }
  #i_search { display: none; }
  #i_weather {
    float: none;
    flex: 1;
    height: auto;
    border-right: 1px solid #dadbd6;
    border-bottom: none;
    padding: 5px 8px;
    margin: 0;
    font-size: 8pt;
    line-height: 1.4;
  }
  #i_weather h2 { display: inline; font-size: 8pt; }
  #i_weather br { display: none; }
  #i_currency {
    float: none;
    flex: 1;
    height: auto;
    border-right: none;
    padding: 5px 8px;
    margin: 0;
    font-size: 8pt;
    line-height: 1.4;
  }
  #i_user { display: none; }

  /* Content blocks full-width */
  #i_news, #i_info { float: none; width: 100%; margin: 0 0 5px; }

  .catalog_list { float: none; width: 100%; }
  .new_firm {
    float: none;
    width: 100%;
    height: auto;
    padding: 5px;
    margin-bottom: 3px;
  }
  .new_firm .firm-placeholder {
    width: 40px; height: 40px; line-height: 40px; font-size: 16pt;
  }

  #info_block ul { float: none; width: 100%; padding-left: 15px; }

  .msgcat { font-size: 8pt; }
  .tab-content { overflow-x: auto; }

  .footer-inner { flex-direction: column; gap: 12px; }
  .footer-right { flex: none; text-align: left; }

  .facts-row { gap: 6px; }
  .fact-card { flex: 1 1 70px; padding: 8px 6px; min-width: 70px; }
  .fact-card .fact-val { font-size: 13pt; }

  #i_yar h1 { font-size: 14pt; }
}

/* ========== SMALL MOBILE ========== */
@media (max-width: 480px) {
  .tabs dt { float: none; display: block; margin: 2px 0; text-align: center; }
  .msgcat th, .msgcat td { font-size: 7pt; padding: 2px; }
  .quick-links a { font-size: 8pt; padding: 5px 8px; }
}

@media print {
  .burger-toggle, #i_user, .quick-links { display: none; }
  #menu { display: block; }
  body { min-width: 0; }
  #i_container { max-width: 100%; min-width: 0; }
}
