/* ============================================================
   site-custom.css — mustaqil sayt uchun qo'shimcha bezaklar
   1) Yuqori (desktop) menyu animatsiyasi
   2) Kategoriya-filtr (YANGILIKLAR/OMMALASHGAN) tez almashuvi
   3) "HIMOYA HAQIDA E'LONLAR" sahifasi paginatsiyasi
   ============================================================ */

/* ---------- HIMOYA HAQIDA E'LONLAR — paginatsiya ---------- */
/* har bir e'lon bloki orasida nafas oladigan bo'shliq */
.hh-ann-item {
    padding-bottom: 22px;
    margin-bottom: 26px;
    border-bottom: 1px solid #ececec;
}
.hh-ann-item:last-of-type {
    border-bottom: none;
}
/* yengil paydo bo'lish animatsiyasi sahifa almashganda */
.hh-ann-item {
    animation: hhFade .25s ease both;
}
@keyframes hhFade {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
/* paginatsiya panelini ajratib turamiz */
.hh-page-nav {
    margin-top: 30px;
    padding-top: 6px;
}

/* ---------- 1. MENYU ANIMATSIYASI (desktop sf-menu) ---------- */
/* Mavzuning o'z rangli chiziqlari (har bir band ostidagi) saqlanadi.
   Faqat yumshoq, professional o'tishlar qo'shamiz — yangi/o'sadigan chiziq YO'Q.
   Hover/joriy bandda fon va rang silliq o'zgaradi, rangli chiziqcha
   muloyim paydo bo'ladi. */

/* yumshoq fon + matn rangi o'tishi */
.sf-menu > li > a {
    transition: color .22s ease, background-color .25s ease;
}

/* menyu ostidagi chiziqni (mavzu accent) butunlay olib tashlaymiz —
   hover / sfHover / joriy band / barcha header-uslublarida hech qanday
   pastki chiziq (accent bar, border, underline) chiqmaydi */
.sf-menu > li > a:after,
.sf-menu > li > a:before,
.sf-menu > li:hover > a:after,
.sf-menu > li.sfHover > a:after,
.sf-menu > li.current-menu-item > a:after,
.sf-menu > li.current-category-ancestor > a:after,
.td-header-wrap .sf-menu > li > a:after,
.td-header-menu-wrap .sf-menu > li > a:after {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
    border: 0 !important;
    content: none !important;
}
.sf-menu > li > a,
.sf-menu > li > a:hover,
.sf-menu > li:hover > a,
.sf-menu > li.sfHover > a {
    text-decoration: none !important;
    border-bottom: 0 !important;
    box-shadow: none !important;
}

/* ---------- 1b. PORTAL TUGMALARI (12 ta to'rtburchak) — hover animatsiya ---------- */
.vc_raw_html button {
    cursor: pointer;
    transition: transform .2s ease, box-shadow .25s ease, filter .2s ease;
    will-change: transform;
}
.vc_raw_html button:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, .22);
    filter: brightness(1.08);
}
.vc_raw_html button:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, .2);
}

/* ---------- 1c. PASTGA OCHILADIGAN MENYU (dropdown) — chiroyli ---------- */
/* Mavzuning superfish JS'i submenu'ni inline `display:none` bilan yashiradi
   va hover'ni o'zi boshqaradi (lokal nusxada bu ba'zan ishlamaydi/qo'pol
   ko'rinadi). Shu sababli dropdown'ni to'liq CSS-hover bilan o'z qo'limizga
   olamiz: har doim silliq paydo bo'ladi, oq fon + yumshoq soya + ko'k accent. */

/* har bir band — submenu'ning langari */
.sf-menu li {
    position: relative;
}

/* submenu qutisi */
.sf-menu ul.sub-menu {
    display: block !important;          /* inline display:none ni bekor qilamiz */
    position: absolute;
    top: 100%;
    left: 0;
    width: auto !important;
    min-width: 230px;
    margin: 0;
    padding: 6px 0;
    background: #ffffff;
    border-top: none;                   /* hover'da chiqadigan ko'k chiziq olib tashlandi */
    border-radius: 0 0 7px 7px;
    box-shadow: 0 14px 32px rgba(0, 0, 0, .16);
    list-style: none;
    z-index: 9999;
    /* boshlang'ich (yashirin) holat */
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
}

/* hover / fokus / klaviatura — silliq ochilish */
.sf-menu li:hover > ul.sub-menu,
.sf-menu li.sfHover > ul.sub-menu,
.sf-menu li:focus-within > ul.sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ikkinchi daraja (submenu ichidagi submenu) — yonga ochiladi */
.sf-menu ul.sub-menu ul.sub-menu {
    top: -9px;
    left: 100%;
    transform: translateX(10px);
    border-radius: 7px;
    border-top-width: 0;
    border-left: none;                  /* 2-daraja: yon ko'k chiziq ham olib tashlandi */
}
.sf-menu ul.sub-menu li:hover > ul.sub-menu,
.sf-menu ul.sub-menu li.sfHover > ul.sub-menu {
    transform: translateX(0);
}

/* submenu bandlari */
.sf-menu ul.sub-menu li {
    width: 100%;
    float: none !important;
}
.sf-menu ul.sub-menu li a {
    display: block;
    width: auto !important;
    padding: 9px 20px;
    color: #232323 !important;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
    background: transparent;
    border-left: 3px solid transparent;
    transition: background-color .18s ease, color .18s ease,
                border-color .18s ease, padding-left .18s ease;
}
.sf-menu ul.sub-menu li a:hover {
    background: #f3f7fc;
    color: #1e5799 !important;
    border-left-color: #1e5799;
    padding-left: 25px;
}

/* "has-children" bandida o'ng strelka (ikkinchi daraja borligini bildiradi) */
.sf-menu ul.sub-menu li.menu-item-has-children > a::after {
    content: "›";
    float: right;
    margin-left: 12px;
    font-weight: 700;
    opacity: .55;
}

/* ---------- 2. KATEGORIYA-FILTR TEZ ALMASHUVI ---------- */

/* blok ichidagi tez fade (sekin AJAX o'rniga) */
.td_block_inner.scf-fading {
    opacity: 0;
    transition: opacity .15s ease;
}
.td_block_inner {
    transition: opacity .15s ease;
}

/* yashirilgan modul */
.td_module_wrap.scf-hidden {
    display: none !important;
}

/* yangi ko'ringan modullarning yengil "pop" animatsiyasi */
@keyframes scfPop {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.td_module_wrap.scf-show {
    animation: scfPop .22s ease both;
}

/* tanlangan filtr bandini ajratib ko'rsatish */
.td-subcat-link.scf-active {
    font-weight: 700;
    text-decoration: underline;
}

/* ---------- 3. XATO SAHIFALARI (400/403/404/500) ---------- */
.site-error {
    max-width: 720px;
    margin: 0 auto;
    padding: 70px 20px 90px;
    text-align: center;
}
.site-error__code {
    font-size: clamp(90px, 18vw, 170px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #2989d8 0%, #1e5799 55%, #207cca 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #1e5799; /* fallback */
    margin-bottom: 6px;
}
.site-error__title {
    font-size: clamp(22px, 4vw, 32px);
    font-weight: 700;
    margin: 0 0 12px;
    color: #222;
}
.site-error__text {
    font-size: 16px;
    line-height: 1.6;
    color: #666;
    margin: 0 auto 28px;
    max-width: 520px;
}
.site-error__btn {
    display: inline-block;
    padding: 13px 30px;
    border-radius: 6px;
    background: #1e5799;
    color: #fff !important;
    font-weight: 600;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .25s ease, background .2s ease;
}
.site-error__btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 22px rgba(30, 87, 153, .35);
    background: #207cca;
}

/* ---------- 4. MUROJAAT FORMASI ---------- */
.site-form {
    max-width: 640px;
    margin: 18px 0 8px;
}
.site-form__row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.site-form__row > label {
    flex: 1 1 240px;
}
.site-form label {
    display: block;
    margin-bottom: 14px;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}
.site-form label span {
    color: #d33;
}
.site-form input,
.site-form select,
.site-form textarea {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 11px 13px;
    font-size: 15px;
    font-weight: 400;
    border: 1px solid #d4d4d4;
    border-radius: 6px;
    background: #fff;
    box-sizing: border-box;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.site-form input:focus,
.site-form select:focus,
.site-form textarea:focus {
    outline: none;
    border-color: #1e5799;
    box-shadow: 0 0 0 3px rgba(30, 87, 153, .15);
}
.site-form textarea {
    resize: vertical;
}
.site-form__btn {
    display: inline-block;
    padding: 12px 32px;
    border: none;
    border-radius: 6px;
    background: #1e5799;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .25s ease, background .2s ease;
}
.site-form__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(30, 87, 153, .3);
    background: #207cca;
}
.site-form__btn:disabled {
    opacity: .6;
    cursor: default;
    transform: none;
    box-shadow: none;
}
.site-form__status {
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 6px;
    font-size: 14px;
}
.site-form__status.is-ok {
    background: #e7f6ec;
    color: #1b7a3d;
    border: 1px solid #b8e6c5;
}
.site-form__status.is-err {
    background: #fdeaea;
    color: #b3261e;
    border: 1px solid #f5c2c0;
}

/* ---------- 5. FOOTER — keng, lekin chetga yopishmaydi ---------- */
/* Pastki sub-footer chizig'i ("© Created by", "Barcha huquqlar") butunlay
   HTML'dan olib tashlangan. Asosiy footer konteynerini to'liq kenglikka
   cho'zamiz, ammo ikki yonda qulay bo'shliq qoldiramiz (clamp). */
.td-footer-wrapper .td-container {
    width: 100% !important;
    max-width: none !important;
    padding-left: clamp(24px, 5vw, 90px);
    padding-right: clamp(24px, 5vw, 90px);
    box-sizing: border-box;
}

/* Asosiy footer: ustunlarni vertikal markazlash + nafas oladigan bo'shliq */
.td-footer-wrapper .td-container {
    padding-top: 14px;
    padding-bottom: 14px;
}
.td-footer-wrapper .td-pb-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    row-gap: 24px;
}
.td-footer-wrapper .td-pb-row > div[class*="td-pb-span"] {
    float: none !important;
}

/* Logo ustunini vertikal markazda, rasm toza ko'rinsin */
.td-footer-wrapper .footer-logo-wrap {
    display: flex;
    align-items: center;
}
.td-footer-wrapper .footer-logo-wrap img {
    max-width: 100%;
    height: auto;
}

/* Ijtimoiy tarmoq ikonlari orasida bir tekis bo'shliq */
.td-footer-wrapper .footer-social-wrap .td-social-icon-wrap {
    margin-right: 10px;
}

/* ---------- 6. STICKY FOOTER — har bir sahifada pastga yopishib tursin ---------- */
/* Mazmun kam bo'lsa ham footer ekran tagiga "yopishadi" (o'rtada osilib
   qolmaydi). td-outer-wrap'ni vertikal flex qilamiz, footer'ni pastga itaramiz. */
html, body {
    min-height: 100%;
}
#td-outer-wrap {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
#td-outer-wrap > .td-footer-wrapper {
    margin-top: auto;
}

/* ---------- 7. MENYU: uch tilda bir xil o'lcham + DOIM bitta qatorda ---------- */
/* Maqsad: uz/ru/en uchala tilda menyu BIR XIL o'lchamda, BITTA qatorda tursin va
   HECH QACHON pastga tushmasin/qidiruv ustiga chiqmasin. Ruscha matn eng uzun
   ("МЕТОДОЛОГИЧЕСКОЕ РУКОВОДСТВО"), shu sababli tor desktopda (tema 1018px dan past
   mobil menyuga o'tadi → eng tor desktop = 1019px) 11px sig'maydi.
   Yechim: shrift va oraliqni VIEWPORTGA moslab silliq kichraytiramiz (clamp) —
   til/kenglikdan qat'i nazar bir formula, shuning uchun uch tilda bir xil. nowrap
   esa ikki qatorga tushishni butunlay to'xtatadi. */
@media (min-width: 1019px) {
    #menu-td-demo-header-menu-1 {
        white-space: nowrap;
    }
    #menu-td-demo-header-menu-1 > li {
        float: none;
        display: inline-block;
        vertical-align: middle;
    }
    #menu-td-demo-header-menu-1 > li > a {
        font-size: 10.5px !important;
        margin: 0 4px !important;
        letter-spacing: 0 !important;
    }
    #menu-td-demo-header-menu-1 > li > a.sf-with-ul {
        padding-right: 11px !important;
    }
    #menu-td-demo-header-menu-1 .td-has-sub-caret {
        margin-left: 2px;
        font-size: 10px;
        opacity: .7;
        display: inline-block;
        vertical-align: middle;
    }
}
/* Tor desktop (tema 1018px da mobil menyuga o'tadi → 1019–1100px oralig'ida konteyner
   1068px dan tor): ruscha sig'sin uchun yanada kichikroq shrift/oraliq. */
@media (min-width: 1019px) and (max-width: 1100px) {
    #menu-td-demo-header-menu-1 > li > a {
        font-size: 9px !important;
        margin: 0 2px !important;
    }
    #menu-td-demo-header-menu-1 > li > a.sf-with-ul {
        padding-right: 8px !important;
    }
}

/* ---------- 8. KONTENT JADVALI sidebar vidjeti ustiga oqib chiqmasin ---------- */
/* Jurnallar ro'yxati kabi jadvallarda uzun URL'lar katakka sig'may o'ng tomondagi
   "SAYTGA TASHRIFLAR" vidjeti ustiga chiqib ketmasin — matn katak ichida o'ralsin. */
.td-main-content .wp-block-table {
    overflow-x: auto;
    max-width: 100%;
}
.td-main-content .wp-block-table table {
    table-layout: fixed;
    width: 100%;
}
.td-main-content .wp-block-table td,
.td-main-content .wp-block-table th {
    word-break: break-word;
    overflow-wrap: anywhere;
}
.td-main-content .wp-block-table td a {
    word-break: break-all;
    overflow-wrap: anywhere;
}

/* ---------- 9. Bayroqli til almashtirgich (site-custom.js qo'shadi) ---------- */
/* Submenu tema CSS'i (.sf-menu li:hover ul) bilan ochiladi — qo'shimcha kerak emas.
   Bayroq bilan til nomi bir qatorda turishi uchun. */
.sf-menu li.lang-switcher .sub-menu a,
.td-mobile-main-menu li.lang-switcher .sub-menu a {
    white-space: nowrap;
}

/* ---------- TEPA HEADER BAR: matn/havolalarni OQ qilish ----------
   Eng tepadagi qora fonli panel (email, telefon, telegram, "Bizni kuzating",
   KIRISH) matni to'q kulrang edi — qora fon ustida o'qilishi uchun oq qilamiz.
   Ijtimoiy tarmoq belgilarining (FB/IG) o'z ranglariga tegmaymiz. */
.td-header-top-menu-full,
.td-header-top-menu-full .td-header-sp-top-widget,
.td-header-top-menu-full a:not(.td-social-but-text):not([class*="td-social-icon"]),
.td-header-top-menu-full span,
.td-header-top-menu-full .td-icon-font,
.td-header-top-menu .td-social-icon-wrap + span,
#td-header-menu .td-header-top-menu-full,
.td-header-top-menu-full .tdb-block-inner {
    color: #ffffff !important;
}
/* KIRISH tugmasi matni ham oq */
.td-header-top-menu-full .tds-button,
.td-header-top-menu-full .tds-button a,
.td-header-top-menu-full a.tds-button {
    color: #ffffff !important;
}
.td-header-top-menu-full a:hover,
.td-header-top-menu-full .td-icon-font:hover {
    color: #d8d8d8 !important;
}
