/* ============================================================
   SMART WATER INSPECTOR — zamonaviy responsive dizayn
   Eski templatemo klass nomlari saqlangan, shuning uchun barcha
   sahifalar avtomatik yangi ko'rinishga o'tadi.
   ============================================================ */

:root {
  --primary: #0369a1;        /* to'q moviy — suv mavzusi */
  --primary-dark: #075985;
  --accent: #0ea5e9;
  --danger: #dc2626;
  --success: #16a34a;
  --bg: #eef4f8;
  --card: #ffffff;
  --text: #0f172a;
  --text-soft: #475569;
  --border: #dbe4ec;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(2, 32, 71, .08), 0 4px 14px rgba(2, 32, 71, .06);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

img { max-width: 100%; height: auto; }

h1, h2, h3, h4, h5, h6 {
  color: var(--primary-dark);
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 14px;
}
h1 { font-size: 1.9rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }
h5 { font-size: .95rem; }
h6 { font-size: .85rem; }

em { color: var(--accent); font-style: normal; }

a:link, a:visited { color: var(--primary); text-decoration: none; }
a:hover, a:active { color: var(--accent); outline: none; }

.header { display: block; }
.left { float: left; }
.right { float: right; }
.float_l { float: left; }
.float_r { float: right; margin-right: 0; }

.img_fl { float: left; margin: 3px 15px 5px 0; }
.img_fr { float: left; margin: 3px 0 5px 15px; }
.img_border {
  background: var(--card);
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: inline-block;
  max-width: 100%;
}
.img_border img { border-radius: 8px; display: block; max-width: 100%; height: auto; }

a.more {
  clear: none;
  display: inline-block;
  width: auto;
  height: auto;
  line-height: 1.5;
  padding: 9px 22px;
  background: var(--primary);
  color: #fff !important;
  border-radius: 999px;
  font-weight: 600;
  font-size: .9rem;
  transition: background .2s;
}
a.more:hover { background: var(--accent); }

.tmo_ul_list { margin: 0; padding: 0; list-style: none; }
.tmo_ul_list li {
  padding: 9px 0 9px 26px;
  border-bottom: 1px dashed var(--border);
  background: none;
  position: relative;
}
.tmo_ul_list li::before {
  content: "\2713";
  position: absolute;
  left: 2px;
  color: var(--success);
  font-weight: 700;
}
.tmo_ul_list li a { color: var(--text-soft); }
.tmo_ul_list li a:hover { color: var(--primary); }

.no_bullet { margin: 0; padding: 0; list-style: none; }
.no_bullet li { margin-bottom: 10px; }

/* ---------------- Umumiy karkas ---------------- */

#templatemo_body_wrapper { padding: 0; background: none; }

#templatemo_wrapper {
  position: relative;
  margin: 0 auto;
  width: auto;
  max-width: 1140px;
  padding: 0 16px 24px;
  background: none;
}
#templatemo_wrapper_top { display: none; }

/* ---------------- Sarlavha (header) ---------------- */

#templatemo_header {
  width: auto;
  height: auto;
  margin: 16px 0 20px;
  padding: 14px 20px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary) 60%, var(--accent));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

#site_title { float: none; margin: 0; }
#site_title a {
  display: inline-block;
  width: auto;
  height: auto;
  background: none;
  color: #fff;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: .5px;
  text-indent: 0;
  white-space: normal;
}
#site_title a small {
  display: block;
  font-size: .72rem;
  font-weight: 400;
  color: #cfeaff;
  letter-spacing: 1.5px;
}

#templatemo_menu {
  float: none;
  width: auto;
  height: auto;
  background: none;
}
#templatemo_menu ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
#templatemo_menu ul li { float: none; margin: 0; }
#templatemo_menu ul li a {
  display: inline-block;
  padding: 8px 16px;
  color: #eaf6ff;
  background: rgba(255, 255, 255, .12);
  border-radius: 999px;
  font-size: .92rem;
  font-weight: 600;
  border: none;
  transition: background .2s;
}
#templatemo_menu ul li a:hover,
#templatemo_menu ul li a.selected {
  background: rgba(255, 255, 255, .3);
  color: #fff;
}
/* ddsmoothmenu eski stillarini bekor qilish */
.ddsmoothmenu ul li ul { display: none !important; }

/* qurilma nomi (logoblock) header ichida */
#templatemo_menu .logoblock,
.logoblock {
  margin: 0 !important;
  padding: 4px 10px;
  color: #ffd166;
  font-size: 1.15rem !important;
  font-weight: 700;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, .25);
  opacity: 1;
  text-align: center;
}

/* ---------------- Asosiy kontent ---------------- */

#templatemo_slider { display: none; }

#templatemo_main {
  margin: 0 0 24px;
  padding: clamp(16px, 3vw, 32px);
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

#content, .col23 {
  width: 100%;
  max-width: 660px;
}
#sidebar, .col13 {
  width: 100%;
  max-width: 320px;
}
.half { width: 100%; max-width: 480px; }
.col { display: block; float: left; margin-right: 24px; margin-bottom: 24px; }
.col14 { width: 100%; max-width: 230px; }
.no_margin_right { margin-right: 0; }
.padding_right { padding-right: 20px; }

.cleaner { clear: both; width: 100%; height: 1px; font-size: 1px; }
.h20 { height: 20px; }
.h40 { height: 40px; }

/* ---------------- Post kartalari (viloyat/tuman) ---------------- */

.post {
  margin: 0 0 20px;
  padding: 18px 20px;
  background: #f8fbfd;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.post h2 {
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent);
  font-size: 1.3rem;
}
.post_left {
  float: left;
  width: 46%;
  min-width: 240px;
}
.post_right {
  float: right;
  width: 50%;
  min-width: 240px;
  cursor: pointer;
  text-align: center;
}
.post img {
  width: 100%;
  max-width: 440px;
  height: auto;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  display: block;
  margin: 0 auto 12px;
}
.post .post_meta { margin: 0; padding: 0; }
.post .post_meta li {
  padding: 7px 0;
  border-bottom: 1px dashed var(--border);
  font-size: .95rem;
  text-align: left;
}
.post .post_meta strong.header { font-weight: 600; color: var(--text-soft); }
.post .post_meta font[color="red"],
.post font[color="red"] {
  color: var(--primary-dark);
  font-weight: 700;
}

/* shahar element (tuman sahifasi tepasi) */
shahar {
  display: block;
  margin: 0;
  padding: 10px 0 !important;
  text-align: center;
  font-size: 1rem !important;
  line-height: 1.6 !important;
  font-family: inherit !important;
  color: var(--text) !important;
}
img.shahar {
  display: block;
  margin: 12px auto !important;
  width: 100%;
  max-width: 440px;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--border);
}

/* ---------------- Jadval ---------------- */

table {
  margin: 16px auto !important;
  width: 100%;
  max-width: 100%;
  border-collapse: collapse !important;
  background: var(--card) !important;
  font-family: inherit !important;
  font-size: .95rem !important;
  line-height: 1.45 !important;
  color: var(--text) !important;
  opacity: 1 !important;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
caption {
  font-family: inherit !important;
  font-weight: 700;
  padding: 10px !important;
  color: var(--primary-dark) !important;
  text-shadow: none !important;
  font-size: 1.1rem !important;
}
caption::before, caption::after { content: "" !important; margin: 0 !important; }
th {
  padding: 12px 8px !important;
  border: none !important;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: .85rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .4px;
}
td {
  padding: 10px 8px !important;
  border: none !important;
  border-bottom: 1px solid var(--border) !important;
  background: transparent !important;
  text-align: center;
}
tr:nth-child(even) td { background: #f4f9fc !important; }
tr[onclick] { cursor: pointer; }
tr[onclick]:hover td { background: #e0f2fe !important; }
td.first {
  font-weight: 700;
  height: auto !important;
  color: var(--primary-dark);
}
table font[color="red"] { color: var(--danger); }
table img, .post table img {
  vertical-align: middle;
  width: auto;
  max-width: 52px;
  height: auto;
}

/* jadval mobil ekranda gorizontal aylanadi */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---------------- Formalar ---------------- */

input, select, textarea, button {
  font-family: inherit;
  font-size: 1rem;
}

#conform { max-width: 640px; margin: 0 auto; }
#conform form p { margin: 0 0 14px; padding: 0; float: none; }
#conform form label,
#contact_form form label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: var(--text-soft);
  font-size: .92rem;
}

#conform form .input_field,
#contact_form form .input_field,
.input_field {
  width: 100%;
  max-width: 100%;
  height: auto;
  padding: 11px 14px;
  color: var(--text);
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.input_field:focus,
#conform form .input_field:focus,
#contact_form form .input_field:focus,
textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, .15);
}

select.input_field { appearance: auto; background: #fff; }

textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  outline: none;
  resize: vertical;
}
#contact_form form textarea {
  width: 100%;
  height: 160px;
  color: var(--text);
  background: #fff;
}

#conform form .submit_btn,
#contact_form form .submit_btn,
.submit_btn,
input[type="submit"] {
  display: inline-block;
  width: auto;
  min-width: 160px;
  padding: 12px 28px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: background .2s, transform .1s;
  white-space: normal;
}
.submit_btn:hover, input[type="submit"]:hover { background: var(--accent); }
.submit_btn:active, input[type="submit"]:active { transform: scale(.98); }

input::placeholder { color: #9db4c6 !important; font-style: normal !important; }

/* index.php dagi ma'lumot kiritish qatorlari */
.form-row {
  font-size: 1rem !important;
  display: grid !important;
  grid-template-columns: 150px 1fr !important;
  gap: 10px;
  align-items: center;
  margin: 0 0 14px !important;
  max-width: 640px;
  margin-left: auto !important;
  margin-right: auto !important;
}
.form-row label {
  text-align: right !important;
  padding: 0 !important;
  margin: 0 !important;
  font-weight: 600;
  color: var(--text-soft);
  font-size: .92rem !important;
}
.form-row .colon { display: none !important; }
.form-row input, .form-row select { width: 100% !important; }

/* ---------------- Izlash bloki (sidebar) ---------------- */

#newsletter {
  background: linear-gradient(160deg, #e5f4fd, #f2f9ff);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
#newsletter h4 { color: var(--primary-dark); background: none; padding: 0; }
#newsletter p { margin: 0 0 12px; padding: 0; color: var(--text-soft); font-size: .92rem; }
#newsletter form { display: flex; gap: 8px; flex-wrap: wrap; }
#newsletter .txt_field {
  flex: 1 1 130px;
  width: auto;
  height: auto;
  padding: 10px 12px;
  color: var(--text);
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  outline: none;
}
#newsletter .subscribe_btn {
  flex: 0 0 auto;
  width: auto;
  height: auto;
  padding: 10px 18px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
}
#newsletter .subscribe_btn:hover { background: var(--accent); }

/* ---------------- Pastki qism (footer) ---------------- */

#templatemo_bottom {
  width: auto;
  margin: 0 0 20px;
  padding: clamp(16px, 3vw, 28px);
  background: var(--primary-dark);
  border-radius: var(--radius);
  color: #d6e9f5;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}
#templatemo_bottom .col {
  float: none;
  width: auto;
  max-width: none;
  margin: 0;
}
#templatemo_bottom h4 {
  color: #fff;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 8px;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: .5px;
}
#templatemo_bottom a { color: #7dd3fc; }
#templatemo_bottom a:hover { color: #fff; }
#templatemo_bottom p, #templatemo_bottom li { font-size: .9rem; }

.footer_gallery {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.footer_gallery li { float: none; margin: 0; padding: 0; background: none; }
.footer_gallery li img {
  width: 100%;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  border: none;
  display: block;
  transition: transform .2s, opacity .2s;
}
.footer_gallery li img:hover { transform: scale(1.05); opacity: .9; }

#templatemo_footer_wrapper { background: none; padding: 0; }
#templatemo_footer {
  width: auto;
  margin: 0 auto;
  padding: 14px;
  text-align: center;
  color: var(--text-soft);
  font-size: .85rem;
}
#templatemo_footer a { color: var(--primary); }

/* ---------------- Kontakt sahifa ---------------- */

#contact_form { margin: 0; }
#contact_form form { margin: 0; padding: 12px 0 0; }
#contact_form form p { margin: 0 0 14px; padding: 0; float: none; width: auto; }

/* ---------------- Qurilma (id) sahifasi ---------------- */

.quduq {
  color: var(--primary-dark) !important;
  font-size: clamp(1.1rem, 4vw, 1.6rem) !important;
  font-family: inherit !important;
  outline: none !important;
  padding: 4px 10px !important;
}

/* ---------------- Ixcham sahifa (index.php — QR skanerlab ma'lumot kiritish,
   asosan mobilda ishlatiladi) ---------------- */

body.kiritish-sahifa #templatemo_header {
  padding: 7px 12px;
  margin: 8px 0 10px;
}
body.kiritish-sahifa #site_title a { font-size: .95rem; }
body.kiritish-sahifa #site_title a small { font-size: .56rem; letter-spacing: 1px; }
body.kiritish-sahifa #templatemo_menu ul li a { padding: 5px 11px; font-size: .78rem; }
body.kiritish-sahifa #templatemo_main { padding: 12px; }
body.kiritish-sahifa h2 { font-size: 1rem; margin-bottom: 6px; }

/* ixcham forma qatorlari — yorliq ustuni tor, kamroq bo'shliq */
body.kiritish-sahifa .form-row {
  grid-template-columns: 92px 1fr !important;
  gap: 8px;
  margin-bottom: 6px !important;
}
body.kiritish-sahifa .form-row label { font-size: .78rem !important; }
/* !important — eski templatemo_style.css dagi #conform form .input_field
   (ID tufayli yuqori specificity, font-size:35px) ni yengish uchun. */
body.kiritish-sahifa .input_field {
  padding: 5px 9px !important;
  font-size: .85rem !important;
  border-radius: 8px !important;
}
body.kiritish-sahifa select.input_field { padding: 5px 6px !important; }
body.kiritish-sahifa textarea.input_field { font-size: .85rem !important; }
body.kiritish-sahifa .cleaner.h20 { height: 6px; }
body.kiritish-sahifa .cleaner.h40 { height: 12px; }
body.kiritish-sahifa .submit_btn,
body.kiritish-sahifa input[type="submit"] {
  padding: 8px 20px;
  min-width: 130px;
  font-size: .92rem;
  margin: 16px auto !important;
}
body.kiritish-sahifa textarea { font-size: .9rem; }
body.kiritish-sahifa a.more { padding: 6px 14px; font-size: .82rem; }

@media (max-width: 640px) {
  body.kiritish-sahifa #templatemo_header {
    padding: 6px 10px;
    margin: 5px 0 8px;
  }
  body.kiritish-sahifa #templatemo_main { padding: 10px; }
  body.kiritish-sahifa h2 { font-size: .95rem; }
  body.kiritish-sahifa .form-row {
    grid-template-columns: 84px 1fr !important;
    gap: 6px;
  }
  body.kiritish-sahifa .form-row label { text-align: left !important; }
  body.kiritish-sahifa #dropZone { height: 54px !important; margin: 8px auto !important; }
}

/* ---------------- Mobil moslashuv ---------------- */

@media (max-width: 860px) {
  #content, .col23, #sidebar, .col13, .half, .col14 {
    max-width: 100%;
  }
  .col { float: none; margin-right: 0; }
  .post_left, .post_right {
    float: none;
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 640px) {
  body { font-size: 15px; }
  #templatemo_wrapper { padding: 0 10px 16px; }
  #templatemo_header {
    margin: 10px 0 14px;
    padding: 12px 14px;
    flex-direction: column;
    align-items: flex-start;
  }
  #site_title a { font-size: 1.1rem; }
  #templatemo_menu ul { width: 100%; }
  #templatemo_menu ul li a { padding: 7px 13px; font-size: .88rem; }

  .form-row {
    grid-template-columns: 1fr !important;
    gap: 4px;
  }
  .form-row label { text-align: left !important; }

  /* jadvallar mobil ekranda siljiydigan bo'ladi */
  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .footer_gallery { grid-template-columns: repeat(3, 1fr); }
  .submit_btn, input[type="submit"] { width: 100%; }
}
