/* ==========================================================================
   bukhara.uz — zamonaviy ko'rinish + mobil versiya
   Bu fayl default.css dan KEYIN ulanadi va faqat ko'rinishni yangilaydi.
   HTML tuzilishi, PHP, URL va bloklar o'zgarmaydi.
   O'chirib qo'yish uchun: index.tpl dagi modern.css va mobile-menu.js
   qatorlarini olib tashlash kifoya — sayt eski holiga qaytadi.
   ========================================================================== */

:root {
  --mq-orange: #ff9000;
  --mq-orange-dark: #e07800;
  --mq-orange-soft: #fff4e5;
  --mq-blue: #285d99;
  --mq-red: #d7261e;
  --mq-text: #33302b;
  --mq-muted: #8a8378;
  --mq-line: #f0e4d2;
  --mq-bg: #f4f1ec;
  --mq-card: #ffffff;
  --mq-radius: 12px;
  --mq-shadow: 0 1px 2px rgba(60, 40, 10, .06), 0 4px 14px rgba(60, 40, 10, .07);
}

/* ---------- Umumiy ---------- */
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--mq-bg);
  color: var(--mq-text);
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--mq-blue); transition: color .15s ease, background-color .15s ease; }
a:hover { color: var(--mq-red); }
img { max-width: 100%; }

/* ---------- Header ---------- */
.header {
  border-radius: 0 0 var(--mq-radius) var(--mq-radius);
  overflow: hidden;
  box-shadow: var(--mq-shadow);
  margin-bottom: 4px;
}
.moduletable-topMenu a {
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  padding: 4px 11px;
  margin-top: 1px;
  border-radius: 20px;
}
.moduletable-topMenu a:hover {
  background: var(--mq-orange);
  color: #fff;
}
.flags a.flag { display: inline-block; transition: transform .15s ease; }
.flags a.flag:hover { transform: translateY(-2px); }

/* ---------- Kartochkalar (eski burchak rasmlari o'rniga) ---------- */
.rbtl, .rbtr, .rbbl, .rbbr { display: none; }
.cntin {
  background: var(--mq-card);
  border: 1px solid var(--mq-line);
  border-top: 3px solid var(--mq-orange);
  border-radius: var(--mq-radius);
  box-shadow: var(--mq-shadow);
  padding: 12px 14px 10px;
  margin-bottom: 12px;
}
.componentheading, .top {
  background: none;
  margin: 0 0 10px;
  padding: 0 0 8px;
  border-bottom: 1px solid var(--mq-line);
  font-size: 14px;
  color: #2b2620;
  position: relative;
}
.componentheading:after, .top:after {
  content: "";
  position: absolute;
  left: 0; bottom: -1px;
  width: 42px; height: 2px;
  background: var(--mq-orange);
  border-radius: 2px;
}

/* ---------- Yon menyular ---------- */
.cat li {
  border-bottom: 1px dashed #eadfcf;
  background-position: 4px 11px;
  padding: 0;
}
.cat li a {
  padding: 5px 8px 5px 16px;
  border-radius: 6px;
}
/* KENG EKRAN (≥ 1240px) — sayt 985px o'rniga 1200px */
@media (min-width: 1240px) {
  .wrapper { width: 1200px; }
  .header { width: 1200px; height: 253px; background-size: 100% 100%; }
  .flags { top: 205px; left: 134px; }
  .moduletable-topMenu { top: 203px; right: 49px; }
  .moduletable-topMenu a { font-size: 14px; }
  .sidebar { width: 230px; }
  .content { width: 716px; margin-left: 12px; }
  .foot1 { width: 930px; }
}
.cat li a:hover { background: var(--mq-orange-soft); color: var(--mq-orange-dark); }
.sidebar .menu:not(.cat) li a, .menu-1 li a { text-decoration: none; }
.sidebar .menu:not(.cat) li a:hover, .menu-1 li a:hover { text-decoration: underline; }
.pritchi { width: 100%; font-size: 12px; border-spacing: 0; }
.pritchi td { padding: 2px 0; white-space: nowrap; }
.pritchi a { text-decoration: none; }
.pritchi a:hover { color: var(--mq-orange-dark); }
.sidebar img { height: auto; }
.sidebar .cntin { padding-left: 10px; padding-right: 10px; }
.sidebar .top { font-size: 13px; }

/* ---------- Kontent ---------- */
#page { word-wrap: break-word; }
#page img { height: auto; }
#page img.left, #page img.right, .article-post .post-gallery img,
.dgimg, .dgu_img1, img.img-rounded { border-radius: 8px; }
#page h2, #page h3 { color: #2b2620; }
.contentheading { color: var(--mq-orange-dark); }

/* Bosh sahifadagi yangiliklar */
.article-post { padding: 4px 0 14px; margin-bottom: 14px; border-bottom: 1px solid var(--mq-line); }
.article-post:last-of-type { border-bottom: 0; }
.article-post .post-gallery { overflow: hidden; border-radius: 8px; }
.article-post .post-gallery img { display: block; transition: transform .3s ease; }
.article-post .post-gallery a:hover img { transform: scale(1.04); }
.article-post .post-content h3 { font-size: 17px; line-height: 1.3; margin-bottom: 4px; }
.article-post .post-content h3 a { text-decoration: none; }
.article-post .post-content h3 a:hover { text-decoration: underline; }

/* "Batafsil" tugmasi */
.readon {
  display: inline-block !important;
  background: var(--mq-orange-soft);
  border: 1px solid #ffd8a6;
  color: var(--mq-orange-dark);
  padding: 5px 14px;
  border-radius: 20px;
  font-weight: 600;
}
.readon:hover { background: var(--mq-orange); border-color: var(--mq-orange); color: #fff; }

/* Sahifalash */
.navigation a, .navigation span { border-radius: 6px; min-width: 18px; }
.navigation a:hover { background: var(--mq-orange-soft); border-color: var(--mq-orange); }
.navigation span.current { background: var(--mq-orange); border-color: var(--mq-orange); color: #fff; }

/* Formalar */
input[type=text], input[type=email], input:not([type]), textarea, select, .inputbox {
  border: 1px solid #d9cfc1;
  border-radius: 8px;
  padding: 7px 10px;
  background: #fff;
  box-sizing: border-box;
  max-width: 100%;
}
input[type=text]:focus, textarea:focus, select:focus, .inputbox:focus {
  outline: none;
  border-color: var(--mq-orange);
  box-shadow: 0 0 0 3px rgba(255, 144, 0, .18);
}
input[type=submit], input[type=button], .button, .btn {
  background: var(--mq-orange);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 8px 18px;
  font-weight: 600;
  cursor: pointer;
}
input[type=submit]:hover, input[type=button]:hover, .button:hover, .btn:hover { background: var(--mq-orange-dark); }

/* Footer */
.foot1 .cntin { font-size: 12px; line-height: 17px; }

/* Ijtimoiy tarmoqlar */
#socialf a { border-radius: 6px 0 0 6px; }

/* ---------- Mobil menyu (JS qo'shadi; kompyuterda ko'rinmaydi) ---------- */
.mq-burger, .mq-drawer, .mq-overlay { display: none; }

/* ==========================================================================
   PLANSHET va TELEFON (≤ 1000px)
   ========================================================================== */
@media (max-width: 1000px) {
  body { font-size: 14px; }

  .wrapper {
    width: auto;
    height: auto;
    max-width: 760px;
    padding: 0 10px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
  }
  .wrapper > * { box-sizing: border-box; }
  .wrapper > script, .wrapper > .clr { display: none; }
  .header, .breadcrumbs, .content, .footer, #ok_group_widget { width: 100%; }

  /* Tartib: sarlavha → kontent → yon bloklar → footer */
  .header      { order: 1; }
  .breadcrumbs { order: 2; }
  .content     { order: 3; }
  .sl          { order: 4; }
  .sr          { order: 5; }
  .footer      { order: 6; }
  #ok_group_widget { order: 7; overflow: hidden; }
  #ok_group_widget iframe { max-width: 100%; }

  /* Header: rasm proporsional kichrayadi, bayroqlar va menyu ostida */
  .header {
    height: auto;
    margin: 0 -10px 8px;
    width: calc(100% + 20px);
    padding-top: 21.1%;             /* 208 / 985 — rasm nisbati */
    background-size: 100% auto;
    background-color: #fff;
    border-radius: 0 0 var(--mq-radius) var(--mq-radius);
  }
  .flags, .moduletable-topMenu { position: static; }
  .flags {
    line-height: 24px;
    padding: 10px 12px 2px;
    text-align: center;
    white-space: nowrap;
  }
  .flags a.flag { margin: 0 1px; }

  /* Yuqori menyu: 5 ta ikonkali "tab" — bitta qatorda, hech biri kesilmaydi */
  .moduletable-topMenu { padding: 8px 8px 10px; }
  .moduletable-topMenu ul {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
    margin: 0;
    padding: 0;
    max-width: 560px;
    margin: 0 auto;
  }
  .moduletable-topMenu li { float: none; padding: 0; margin: 0; display: flex; }
  .moduletable-topMenu a {
    float: none;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
    white-space: normal;
    text-align: center;
    background: #fff8ef;
    border: 1px solid #ffe0b8;
    padding: 9px 2px 8px;
    margin: 0;
    font-size: 11.5px;
    line-height: 1.2;
    font-weight: 600;
    color: #4a3a26;
    border-radius: 12px;
    box-sizing: border-box;
  }
  .moduletable-topMenu a:before {
    font-family: FontAwesome;
    font-weight: normal;
    color: var(--mq-orange);
    font-size: 19px;
    line-height: 1;
  }
  .moduletable-topMenu a[href="/"]:before                { content: "\f015"; }
  .moduletable-topMenu a[href*="pogoda"]:before          { content: "\f0c2"; }
  .moduletable-topMenu a[href*="bozorcha"]:before        { content: "\f0a1"; }
  .moduletable-topMenu a[href*="oprosov"]:before         { content: "\f080"; }
  .moduletable-topMenu a[href*="nagradi"]:before         { content: "\f091"; }
  .moduletable-topMenu a:active,
  .moduletable-topMenu a:hover { background: var(--mq-orange); border-color: var(--mq-orange); color: #fff; }
  .moduletable-topMenu a:active:before,
  .moduletable-topMenu a:hover:before { color: #fff; }

  /* Ustunlar */
  .content { float: none; margin-left: 0; }
  .sidebar { float: none; width: calc(50% - 6px); }

  /* Kontent ichidagi keng elementlar ekrandan chiqib ketmasin */
  #page { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  #page table { max-width: 100%; border-collapse: collapse; }
  #page td, #page th { padding: 4px 6px; }
  #page iframe, #page embed, #page object, #page video { max-width: 100%; }
  #page iframe[src*="youtube"], #page iframe[src*="youtu.be"] { width: 100%; height: auto; aspect-ratio: 16 / 9; }
  .a-center, .content > div[style*="text-align"] { overflow: hidden; }
  .content img, .sidebar img { max-width: 100%; height: auto; }

  /* Formalar (aloqa, yangilik qo'shish, sharh): yorliq tepada, maydon to'liq kenglikda */
  #page table:has(form), #page table:has(form) > tbody, #page table:has(form) > tbody > tr, #page table:has(form) > tbody > tr > td,
  #page form table, #page form tbody, #page form tr, #page form td {
    display: block; width: 100% !important; height: auto !important; box-sizing: border-box;
  }
  #page table:has(form) > tbody > tr > td { padding: 0 !important; }
  #page form td { padding: 2px 0 !important; }
  #page form tr[bgcolor] { background: var(--mq-orange-soft) !important; border-radius: 8px; padding: 8px; margin: 6px 0; }
  #page form input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=hidden]):not([type=image]),
  #page form select, #page form textarea { width: 100% !important; margin-bottom: 8px; }
  #page form input[type=submit] { width: 100%; padding: 12px; font-size: 15px; }

  /* Katalog (djcatalog) — balandlik qat'iy bo'lmasin */
  .djcat_blog_item_bg { height: auto !important; min-height: 0 !important; }

  /* Footer */
  .foot { height: auto; background-size: 160px auto; padding-bottom: 130px; }
  .foot1 { float: none; width: auto; }
  .foot1 .cntin { height: auto; overflow: visible; }
  .foot2 { display: none; }
  .foot_copy, .foot3 { position: static; width: auto; padding: 0 4px 8px; }
  .foot3 img { vertical-align: middle; }

  /* --- Burger tugma --- */
  .mq-burger {
    display: flex;
    position: fixed;
    top: 10px; right: 10px;
    z-index: 4000;
    width: 46px; height: 46px;
    border: 0;
    border-radius: 50%;
    background: var(--mq-orange);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
    align-items: center; justify-content: center;
    flex-direction: column; gap: 5px;
    cursor: pointer;
    padding: 0;
  }
  .mq-burger span { display: block; width: 20px; height: 2px; background: #fff; border-radius: 2px; }

  .mq-overlay {
    display: block;
    position: fixed; inset: 0;
    background: rgba(20, 15, 5, .45);
    z-index: 4001;
    opacity: 0; visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
  }
  .mq-drawer {
    display: block;
    position: fixed; top: 0; right: 0; bottom: 0;
    width: 86%; max-width: 330px;
    background: #fff;
    z-index: 4002;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateX(100%);
    transition: transform .25s ease;
    box-shadow: -6px 0 24px rgba(0, 0, 0, .18);
    padding: 0 16px 30px;
    box-sizing: border-box;
  }
  .mq-open .mq-overlay { opacity: 1; visibility: visible; }
  .mq-open .mq-drawer { transform: translateX(0); }
  body.mq-open { overflow: hidden; }

  .mq-drawer-head {
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; background: #fff; z-index: 1;
    padding: 14px 0 10px;
    border-bottom: 3px solid var(--mq-orange);
    margin-bottom: 6px;
  }
  .mq-drawer-head b { font-size: 16px; letter-spacing: .5px; }
  .mq-close {
    width: 36px; height: 36px; border: 0; border-radius: 50%;
    background: var(--mq-orange-soft); color: var(--mq-orange-dark);
    font-size: 22px; line-height: 36px; cursor: pointer; padding: 0;
  }
  .mq-drawer .top { margin: 16px 0 6px; }
  .mq-drawer ul { margin: 0; padding: 0; }
  .mq-drawer li { background: none; padding: 0; border-bottom: 1px solid #f3ebdf; }
  .mq-drawer li a {
    display: block; padding: 10px 6px;
    text-decoration: none; font-weight: 600; font-size: 15px;
  }
  .mq-drawer li a:active { background: var(--mq-orange-soft); }
  .mq-drawer table.pritchi td { padding: 6px 0; }
  .mq-drawer table.pritchi a { font-size: 14px; }

  #socialf { bottom: 18%; }
  #socialf a { width: 40px; right: -12px; }
}

/* ==========================================================================
   TELEFON (≤ 600px)
   ========================================================================== */
@media (max-width: 600px) {
  .wrapper { padding: 0 8px; }
  .header { margin: 0 -8px 8px; width: calc(100% + 16px); }
  .sidebar { width: 100%; }
  .cntin { padding: 12px 12px 10px; }
  h1 { font-size: 21px; }
  .article-post .post-content h3 { font-size: 16px; }

  /* Rasm + matn: rasm tepada, matn ostida */
  #page img.left, #page img.right {
    float: none;
    display: block;
    margin: 4px auto 10px;
  }

  /* Foto galereya: 2 ta ustun */
  table.dg_body_background, table.dg_body_background > tbody, table.dg_body_background > tbody > tr { display: block; width: 100%; }
  table.dg_body_background td { display: inline-block; width: 48% !important; vertical-align: top; box-sizing: border-box; }
  table.dg_body_background td p, table.dg_body_background td div { width: auto !important; }

  .foot { background-size: 130px auto; padding-bottom: 110px; }
}
/* "Новости Бухары" — menyuda ajralib tursin */
.sidebar .item131 a, .mq-drawer .item131 a { font-weight: 800; font-size: 14px; color: #c0392b; }
.sidebar .item131 a:hover { color: #e07800; }