/* =====================================================================
   БЛОК 1: CSS КАТЕГОРИЯ — :root
   =====================================================================*/
:root {
    --bg-body: #f4f5f7;
    --bg-surface: #ffffff;
    --bg-soft: #f0f1f4;
    --bg-nav: rgba(240, 241, 244, 0.6);
    --text-main: #1f2328;
    --text-sec: #59636e;
    --text-muted: #8b949e;
    --cat-bg: #e7f6ec;
    --cat-text: #2e8540;
}

body.dark {
    --bg-body: #0f1115;
    --bg-surface: #181b22;
    --bg-soft: #252a34;
    --bg-nav: rgba(37, 42, 52, 0.6);
    --text-main: #f0f3f6;
    --text-sec: #a8b1bd;
    --text-muted: #76808f;
    --cat-bg: #183624;
    --cat-text: #56c271;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: sans-serif;
}

html,
body {
    height: 100%;
    overflow-x: hidden;
    overscroll-behavior: none;
}

body {
    background: var(--bg-body);
    color: var(--text-main);
    transition: background 0.2s, color 0.2s;
    padding: 106px 0 42px;
    width: 100%;
    overflow-y: auto;
}

/*скрытия админских кнопок и*/
body:not(.admin-mode) .fab-add,
body:not(.admin-mode) .fab-menu,
body:not(.admin-mode) .edit-post-btn,
body:not(.admin-mode) .del-post-btn {
    display: none !important;
}

.del-post-btn {
    background: #fdecec;
    color: #d93025;
}

/* =====================================================================
   БЛОК 2: CSS КАТЕГОРИЯ — ЕДИНОЕ УПРАВЛЕНИЕ ВСЕМИ КНОПКАМИ В ОДНОМ МЕСТЕ
   =====================================================================*/
:root {
    --btn-bg: #264663;
    --btn-color: #ffffff;
    --btn-radius: 10px;
    --btn-font: 14px;
    --btn-pad: 10px 16px;
}

.login-submit,
.reg-submit-btn,
.post-reg-btn,
.cat-ok-btn,
.btn-yes,
.btn-no,
.cat-close-bar {
    background: var(--btn-bg);
    color: var(--btn-color);
    border-radius: var(--btn-radius);
    font-size: var(--btn-font);
    padding: var(--btn-pad);
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.login-submit:active,
.reg-submit-btn:active,
.post-reg-btn:active,
.cat-ok-btn:active,
.btn-yes:active {
    opacity: 0.85;
}

.login-submit {
    width: 100%;
    height: 44px;
    margin-top: 4px;
}

.reg-submit-btn {
    width: 90%;
    margin: 8px auto 16px;
    display: block;
    border-radius: 0;
    background: #3b6387;
}

.post-reg-btn {
    height: 42px;
    padding: 0 12px;
    background: #3b6387;
    font-size: 13px;
    flex-shrink: 0;
}

.cat-ok-btn {
    height: 46px;
    background: #0d8bf2;
    flex-shrink: 0;
}

.btn-yes {
    height: 42px;
    background: #4a6b88;
}

.btn-no {
    height: 42px;
    background: var(--bg-soft);
    color: var(--text-sec);
    font-weight: 500;
}

.cat-close-bar {
    width: 100%;
    height: 48px;
    background: #e6ebf1;
    color: #1f2328;
    flex-shrink: 0;
}

.icon-btn,
.act-btn,
.tool-btn,
.search-close,
.menu-close,
.cat-row-btn {
    border: none;
    border-radius: var(--btn-radius);
    background: var(--bg-soft);
    color: var(--text-sec);
    font-size: var(--btn-font);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.icon-btn {
    width: 40px;
    height: 40px;
}

.icon-btn.logged-in {
    background: #1e462b;
    color: #56c271;
}

.act-btn {
    width: 40px;
    height: 42px;
}

.tool-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 8px;
    flex-shrink: 0;
    font-weight: 700;
    gap: 4px;
}

.search-close {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.menu-close {
    width: 34px;
    height: 34px;
    font-size: 18px;
}

.cat-row-btn {
    width: 36px;
    height: 36px;
    background: #ffffff;
    flex-shrink: 0;
}

.cat-row-btn.del {
    background: #fdecec;
    color: #d93025;
}

.tab-btn {
    height: 42px;
    flex-shrink: 0;
    padding: 0 14px;
    border: none;
    background: transparent;
    color: var(--text-sec);
    font-size: var(--btn-font);
    display: flex;
    align-items: center;
    cursor: pointer;
}

.tab-btn.active {
    background: var(--bg-surface);
    color: var(--text-main);
    font-weight: 600;
}

.fab-add {
    position: fixed;
    right: 16px;
    bottom: 48px;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: none;
    background: var(--btn-bg);
    color: #ffffff;
    font-size: 32px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(38, 70, 99, 0.35);
    cursor: pointer;
    z-index: 925;
    transition: transform 0.2s;
}

.fab-add.open {
    transform: rotate(45deg);
}

.fab-item {
    width: 100%;
    padding: 11px 14px;
    border: none;
    border-radius: var(--btn-radius);
    background: transparent;
    color: var(--text-main);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    cursor: pointer;
}

.fab-item:active {
    background: var(--bg-soft);
}

/* =====================================================================
   БЛОК 3: CSS КАТЕГОРИЯ — ШАПКА, ЛОГОТИП, АДАПТИВНОСТЬ ПК/ANDROID И ПОИСК 
   =====================================================================*/

.site-header {
    width: 100%;
    background: var(--bg-surface);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 900;
}

.brand-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.custom-logo-img {
    height: 40px;
    max-width: 140px;
    width: auto;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

.pc-company-info {
    display: none;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.company-bar {
    width: 100%;
    height: 36px;
    background: var(--bg-surface);
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 900;
}

.company-desc {
    font-size: 13px;
    color: var(--text-sec);
}

.company-title {
    font-family: Georgia, serif;
    font-size: 13px;
    font-weight: 700;
    color: #8C6223;
    letter-spacing: 0.6px;
}

body.dark .company-title {
    color: #f6d594;
}

@media (min-width: 768px) {
    body {
        padding-bottom: 16px;
    }

    .company-bar {
        display: none;
    }

    .pc-company-info {
        display: flex;
    }
}

body.hide-logo-mob .brand-wrap svg,
body.hide-logo-mob .brand-wrap .custom-logo-img {
    display: none !important;
}

@media (min-width: 768px) {
    body.hide-logo-mob .brand-wrap svg {
        display: block !important;
    }

    body.hide-logo-mob .brand-wrap.has-custom svg {
        display: none !important;
    }

    body.hide-logo-mob .brand-wrap.has-custom .custom-logo-img {
        display: block !important;
    }

    body.hide-logo-pc .brand-wrap svg,
    body.hide-logo-pc .brand-wrap .custom-logo-img {
        display: none !important;
    }
}

.header-top {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    position: relative;
}

.header-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.icon-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
}

.header-tabs {
    width: 100%;
    height: 42px;
    display: flex;
    align-items: center;
    overflow-x: auto;
    scrollbar-width: none;
    background: var(--bg-nav);
}

.header-tabs::-webkit-scrollbar {
    display: none;
}

.search-box {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: var(--bg-surface);
    padding: 0 16px;
    align-items: center;
    gap: 8px;
    z-index: 950;
}

.search-box.open {
    display: flex;
}

.search-input-wrap {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-run-btn {
    position: absolute;
    left: 4px;
    width: 34px;
    height: 34px;
    border: none;
    background: transparent;
    color: var(--text-sec);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.search-run-btn svg,
.search-close svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
}

.search-box input {
    width: 100%;
    height: 40px;
    padding: 0 12px 0 38px;
    border: none;
    border-radius: 12px;
    background: var(--bg-soft);
    color: var(--text-main);
    outline: none;
    font-size: 15px;
}

.fab-menu {
    display: none;
    position: fixed;
    right: 16px;
    bottom: 112px;
    width: 265px;
    max-height: 70vh;
    overflow-y: auto;
    background: var(--bg-surface);
    border-radius: 16px;
    padding: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    z-index: 925;
    flex-direction: column;
    gap: 2px;
}

.fab-menu.open {
    display: flex;
}

.fab-item svg {
    width: 19px;
    height: 19px;
    stroke: var(--text-sec);
    fill: none;
    stroke-width: 1.8;
    flex-shrink: 0;
}

/* =====================================================================
   БЛОК 4: CSS КАТЕГОРИЯ — СВАЙП-ГАЛЕРЕЯ (ФОТО И ВИДЕО), КАРТОЧКИ ЛЕНТЫ И БОКОВОЕ МЕНЮ
   =====================================================================*/

.main-wrap {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 14px 16px 76px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feed {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.swipe-gallery {
    width: 100%;
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding: 2px 0;
}

.swipe-gallery::-webkit-scrollbar {
    display: none;
}

.swipe-slide {
    flex: 0 0 65%;
    height: 200px;
    padding: 0;
    border-radius: 10px;
    overflow: hidden;
    scroll-snap-align: center;
    background: var(--bg-surface);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    position: relative;
}

.swipe-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

#pvMedia img {
    width: 100% !important;
    max-height: 360px !important;
    object-fit: contain !important;
    border-radius: 10px !important;
    background: #111827 !important;
}





.video-slide {
    flex: 0 0 85%;
    height: 200px;
    border-radius: 12px;
    overflow: hidden;
    scroll-snap-align: center;
    background: #0f1115;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-slide video,
.video-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.video-play-badge {
    position: absolute;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    padding-left: 3px;
    border: 2px solid rgba(255, 255, 255, 0.85);
}

.post-card {
    width: 100%;
    max-width: 448px;
    min-height: 320px;
    max-height: 350px;
    background: var(--bg-surface);
    border-radius: 7px;
    padding: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
}

.post-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
    flex-shrink: 0;
}

.post-text {
    font-size: 15px;
    line-height: 1.45;
    color: var(--text-sec);
    flex: 1;
    overflow-y: auto;
    margin-bottom: 12px;
}

.post-text img,
.editor-area img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-top: 6px;
    display: block;
}

.post-text ul,
.editor-area ul {
    padding-left: 20px;
}

.post-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
    padding-top: 8px;
    flex-shrink: 0;
}

.badge-cat {
    background: var(--cat-bg);
    color: var(--cat-text);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 8px;
}

.post-date {
    font-size: 12px;
    color: var(--text-sec);
    text-align: right;
    margin-left: auto;
}

.post-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-shrink: 0;
}

.post-views {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-sec);
    font-size: 13px;
    height: 42px;
    padding: 0 10px;
    border-radius: 12px;
    background: var(--bg-soft);
}

.post-views svg,
.act-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
}

.post-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.empty-msg {
    text-align: center;
    padding: 30px 16px;
    color: var(--text-muted);
    font-size: 15px;
}

.menu-overlay,
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1010;
}

.menu-overlay.open,
.modal-overlay.open {
    display: block;
}

.menu-drawer {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100%;
    background: var(--bg-surface);
    z-index: 1015;
    transition: right 0.25s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.15);
}

.menu-drawer.open {
    right: 0;
}

.menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    font-weight: 600;
    font-size: 16px;
    background: var(--bg-surface);
    z-index: 15;
    flex-shrink: 0;
}

.menu-list {
    display: flex;
    flex-direction: column;
    padding: 10px;
    gap: 4px;
    overflow-y: auto;
}

.menu-item {
    padding: 12px 14px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-main);
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    white-space: nowrap;
    cursor: pointer;
}

.menu-item.reg-link {
    font-weight: 600;
    color: #3b6387;
    background: var(--bg-soft);
    margin-top: 4px;
}

/* =====================================================================
   БЛОК 5: CSS КАТЕГОРИЯ — МОДАЛЬНЫЕ ОКНА, УВЕДОМЛЕНИЯ, ГАЛЕРЕЯ, LIGHTBOX И ВИДЕОПЛЕЕР
   =====================================================================*/

.login-modal,
.dialog-modal,
.settings-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 32px);
    max-width: 380px;
    background: var(--bg-surface);
    border-radius: 10px;
    overflow: hidden;
    z-index: 1020;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.login-modal.open,
.dialog-modal.open,
.settings-modal.open {
    display: block;
}

.dialog-box {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.dialog-title {
    font-size: 19px;
    font-weight: 700;
    color: var(--text-main);
}

.dialog-desc {
    font-size: 14px;
    color: var(--text-sec);
    line-height: 1.4;
}

.dialog-input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1.5px solid #cbd5e1;
    background: var(--bg-soft);
    color: var(--text-main);
    font-size: 15px;
    outline: none;
}

.dialog-btns {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 4px;
}

.toast-bar {
    position: fixed;
    bottom: 108px;
    left: 50%;
    transform: translate(-50%, 20px);
    background: #1f2328;
    color: #fff;
    padding: 11px 18px;
    border-radius: 12px;
    font-size: 14px;
    z-index: 1060;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    white-space: nowrap;
    max-width: calc(100% - 32px);
    overflow: hidden;
    text-overflow: ellipsis;
}

.toast-bar.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

.cat-mgr-modal,
.reg-modal,
.reglist-modal,
.gal-mgr-modal,
.regbuild-modal,
.about-modal {
    display: none;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    color: #1f2328;
    z-index: 1008;
    flex-direction: column;
    overflow-y: auto;
}

.cat-mgr-modal.open,
.reg-modal.open,
.reglist-modal.open,
.gal-mgr-modal.open,
.regbuild-modal.open,
.about-modal.open {
    display: flex;
}

.cat-mgr-inner {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    min-height: 100%;
    padding: 20px 16px 44px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cat-mgr-heading {
    font-size: 20px;
    font-weight: 600;
    color: #1f2328;
}

.cat-add-form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cat-add-input {
    flex: 1;
    height: 46px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1.5px solid #cbd5e1;
    background: #ffffff;
    color: #1f2328;
    font-size: 15px;
    outline: none;
}

.cat-mgr-scroll {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cat-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #f4f6f9;
}

.cat-row-name {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
    color: #1f2328;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cat-row-thumb {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    background: #e2e8f0;
}

.cat-row-btn svg {
    width: 17px;
    height: 17px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.9;
}

.lightbox-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.94);
    z-index: 1055;
    flex-direction: column;
}

.lightbox-modal.open {
    display: flex;
}

.lightbox-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    color: #fff;
    z-index: 10;
}

.lightbox-zoom-btns {
    display: flex;
    gap: 8px;
}

.lightbox-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: none;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}

.lightbox-body {
    flex: 1;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: pinch-zoom pan-x pan-y;
    padding: 16px;
}

.lightbox-body img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    transition: transform 0.2s ease;
    transform-origin: center center;
}

.video-player-box {
    width: 100%;
    max-width: 720px;
    max-height: 82vh;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-player-box video,
.video-player-box iframe {
    width: 100%;
    height: 420px;
    max-height: 80vh;
    border: none;
    background: #000;
}

/* =====================================================================
   БЛОК 6: CSS КАТЕГОРИЯ — АНКЕТА РЕГИСТРАЦИИ, «СУРОҒА / ДАР БОРАИ МО» И РЕДАКТОР
   УБИРАЕМ БОРДЮРЫ И ЗАКРЕПЛЕНИЯ В ФОРМЕ БАҚАЙДГИРӢ (ВСЕ УСТРОЙСТВА)
   ===================================================================== */

.reg-modal .reg-input,
.reg-modal .reg-select,
.reg-modal .reg-textarea,
.reg-modal .reg-radio-box,
.reg-modal .reg-file-box,
#postViewModal .reg-input,
#postViewModal .reg-select,
#postViewModal .reg-textarea,
#postViewModal .reg-radio-box,
#postViewModal .reg-file-box {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

#regModal.open,
#postViewModal.open {
    display: block !important;
    overflow-y: auto !important;
}

#regModal #hajjRegForm,
#postViewModal .cat-mgr-inner {
    min-height: auto !important;
    padding-bottom: 90px !important;
}

#regModal .reg-submit-btn,
#postViewModal .reg-submit-btn {
    width: 100% !important;
    margin: 24px 0 0 !important;
    border-radius: 0 !important;
    position: static !important;
}


.reg-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    text-align: center;
}

.reg-head-text {
    flex: 1;
}

.reg-head-text h2 {
    font-size: 18px;
    font-weight: 700;
    color: #1f2328;
    line-height: 1.25;
}

.reg-head-text p {
    font-size: 14px;
    color: #59636e;
    margin-top: 6px;
}

.reg-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.reg-field label {
    font-size: 14px;
    font-weight: 600;
    color: #1f2328;
}

.reg-field label span {
    color: #d93025;
}

.reg-input,
.reg-select,
.reg-textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1.5px solid #cbd5e1;
    background: #f4f6f9;
    color: #1f2328;
    font-size: 14px;
    outline: none;
}

.reg-textarea {
    min-height: 82px;
    resize: vertical;
}

.reg-radio-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 14px;
    border-radius: 12px;
    border: 1.5px solid #cbd5e1;
    background: #f8fafc;
    font-size: 14px;
    color: #1f2328;
    cursor: pointer;
}

.reg-radio-box input {
    width: 18px;
    height: 18px;
    accent-color: #0d8bf2;
}

.reg-file-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 18px 14px;
    border-radius: 12px;
    border: 1.5px dashed #cbd5e1;
    background: #f4f6f9;
    font-size: 14px;
    font-weight: 600;
    color: #1f2328;
    cursor: pointer;
    text-align: center;
}

.reg-hint {
    font-size: 13px;
    color: #59636e;
}

.reg-agree {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: #1f2328;
    cursor: pointer;
    line-height: 1.35;
}

.reg-agree input {
    width: 20px;
    height: 20px;
    accent-color: #0d8bf2;
    flex-shrink: 0;
    margin-top: 2px;
}

.reg-item-card {
    background: #f4f6f9;
    border-radius: 14px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 14px;
    color: #1f2328;
}

.reg-item-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
    font-size: 16px;
}

.about-card {
    background: #f4f6f9;
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 14px;
    color: #1f2328;
}

.about-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.about-lbl {
    font-size: 12px;
    font-weight: 600;
    color: #59636e;
}

.about-val {
    font-size: 15px;
    color: #1f2328;
    line-height: 1.4;
}

.phone-line {
    display: flex;
    align-items: center;
    gap: 10px;
}

.social-badge {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #ffffff;
    flex-shrink: 0;
}

.social-badge.wa {
    background: #25D366;
}

.social-badge.tg {
    background: #229ED9;
}

.social-badge svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.edit-modal {
    display: none;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-surface);
    z-index: 1005;
}

.edit-modal.open {
    display: flex;
    flex-direction: column;
}

.edit-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 0 16px 32px;
    max-width: 640px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.login-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
}

.form-group label {
    font-size: 13px;
    color: var(--text-sec);
    font-weight: 500;
}

.form-group input {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: none;
    border-radius: 10px;
    background: var(--bg-soft);
    color: var(--text-main);
    outline: none;
    font-size: 14px;
}

.cat-select-wrap {
    position: relative;
    width: 100%;
}

.cat-select-btn {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: none;
    border-radius: 10px;
    background: var(--bg-soft);
    color: var(--text-main);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.cat-select-btn svg {
    width: 16px;
    height: 16px;
    stroke: var(--text-sec);
    fill: none;
    stroke-width: 2;
}

.cat-dropdown {
    display: none;
    position: absolute;
    top: 46px;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    padding: 6px;
    z-index: 30;
    flex-direction: column;
    gap: 4px;
}

.cat-select-wrap.open .cat-dropdown {
    display: flex;
}

.cat-option,
.px-option {
    padding: 9px 12px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-main);
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cat-option.selected,
.px-option.selected {
    background: var(--bg-soft);
    font-weight: 600;
    color: var(--cat-text);
}

.editor-box {
    position: relative;
    display: flex;
    flex-direction: column;
}

.editor-toolbar {
    position: sticky;
    top: 0;
    z-index: 12;
    background: var(--bg-surface);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0 8px;
    overflow-x: auto;
    scrollbar-width: none;
}

.editor-toolbar::-webkit-scrollbar {
    display: none;
}

.tool-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.px-dropdown {
    display: none;
    position: absolute;
    top: 50px;
    left: 100px;
    width: 110px;
    max-height: 210px;
    overflow-y: auto;
    background: var(--bg-surface);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    padding: 6px;
    z-index: 25;
    flex-direction: column;
    gap: 2px;
}

.px-dropdown.open {
    display: flex;
}

.editor-area {
    width: 100%;
    min-height: 320px;
    padding: 14px;
    border-radius: 12px;
    background: var(--bg-soft);
    color: var(--text-main);
    outline: none;
    font-size: 15px;
    line-height: 1.45;
    word-break: break-word;
}

.check-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 4px 2px;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 15px;
    color: var(--text-main);
}

.check-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #5b6b7c;
}

.toggle-pass {
    position: absolute;
    right: 10px;
    bottom: 11px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 12px;
    cursor: pointer;
}

.login-status {
    font-size: 13px;
    text-align: center;
    color: #d93025;
    display: none;
}

/* ===================================================================== 
   БЛОК FAQ 7: СТИЛИ ДЛЯ FAQ И СЕТКА КАРТОЧЕК ДЛЯ ПК (ПОДДЕРЖКА 2 РЯДОВ) 
   ===================================================================== */
.faq-accordion-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.faq-item {
    border-radius: 12px;
    background: var(--bg-soft);
    overflow: hidden;
    transition: background 0.2s;
}

.faq-trigger {
    width: 100%;
    padding: 14px 16px;
    border: none;
    background: transparent;
    color: var(--text-main);
    font-size: 15px;
    font-weight: 600;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    gap: 10px;
}

.faq-icon {
    font-size: 12px;
    transition: transform 0.2s;
    color: var(--text-sec);
}

.faq-item.open .faq-icon {
    transform: rotate(180deg);
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease-out;
    background: var(--bg-surface);
}

.faq-content-inner {
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-sec);
    border-top: 1px solid var(--bg-soft);
    word-break: break-word;
}

/* Кнопки управления внутри менеджера FAQ */
body:not(.admin-mode) .fab-faq-mgr {
    display: none !important;
}

/* =====================================================================
   БЛОК 9: Медиа-запрос для ПК: отображение контента в 2 ряда 
   ===================================================================== */

@media (min-width: 992px) {
    .main-wrap {
        max-width: 960px;
    }

    .feed {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        align-items: start;
        width: 100%;
    }

    .post-card {
        max-width: 100%;
    }

    .swipe-gallery,
    .swipe-gallery+.swipe-gallery {
        grid-column: span 2;
    }
}


/* === КОМПАКТНЫЕ КАРТОЧКИ, ПРОСМОТРЫ И SVG ДЛЯ ПК === */
@media (min-width: 992px) {
    .main-wrap {
        max-width: 1140px !important;
    }

    .feed {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        align-items: stretch !important;
        gap: 16px !important;
    }

    .post-card {
        max-width: 100% !important;
        min-height: 210px !important;
        max-height: 250px !important;
        padding: 12px !important;
    }

    /* Уменьшаем плашку просмотров и убираем у неё фон */
    .post-views {
        height: 28px !important;
        padding: 0 4px !important;
        font-size: 12px !important;
        gap: 4px !important;
        background: transparent !important;
    }

    /* Уменьшаем кнопки действий и убираем у них фон */
    .act-btn,
    .post-card button {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        min-height: 28px !important;
        padding: 4px !important;
        background: transparent !important;
    }

    /* Уменьшаем кнопки шапки */
    .icon-btn {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        min-height: 28px !important;
        padding: 4px !important;
    }

    /* Уменьшаем глазик просмотров и все SVG-иконки */
    .post-views svg,
    .act-btn svg,
    .post-card svg,
    .icon-btn svg,
    .fab-item svg {
        width: 14px !important;
        height: 14px !important;
        min-width: 14px !important;
        min-height: 14px !important;
    }
    /* Уменьшаем плавающую кнопку со знаком + для ПК */
    .fab-add {
        width: 42px !important;
        height: 42px !important;
        font-size: 22px !important;
        line-height: 1 !important;
        bottom: 20px !important;
        right: 20px !important;
    }

    /* Чуть приподнимаем выпадающее меню над уменьшенной кнопкой + */
    .fab-menu {
        bottom: 70px !important;
        right: 20px !important;
    }
    /* 1. Заголовки (в шапке, карточках и внутри текста) */
    .company-title {
        font-size: 16px !important;
    }
    .company-desc {
        font-size: 11px !important;
    }
    .post-title,
    .post-card h1,
    .post-card h2 {
        font-size: 15px !important;
        line-height: 1.3 !important;
        margin-bottom: 6px !important;
    }

    /* 2. Текст, категория и дата внутри карточки */
    .post-text {
        font-size: 13px !important;
        line-height: 1.4 !important;
        margin-bottom: 8px !important;
    }
    .badge-cat {
        font-size: 11px !important;
        padding: 4px 8px !important;
    }
    .post-date {
        font-size: 11px !important;
    }

    /* 3. Навигация (вкладки категорий под шапкой) */
    .header-tabs,
    .header-tabs button,
    .header-tabs a,
    .tab-btn {
        font-size: 13px !important;
        padding-top: 5px !important;
        padding-bottom: 5px !important;
    }

    /* 4. Боковое меню и плавающее меню (+) */
    .menu-header {
        font-size: 14px !important;
        padding: 12px 14px !important;
    }
    .menu-item {
        font-size: 13px !important;
        padding: 8px 12px !important;
    }
    .fab-item {
        font-size: 13px !important;
        padding: 7px 12px !important;
    }
    /* Компактная кнопка «Пӯшидан» в окне просмотра на ПК */
    #pvCloseBottom {
        height: 30px !important;
        min-height: 30px !important;
        padding: 0 12px !important;
        font-size: 12px !important;
        border-radius: 7px !important;
    }

    /* Если рядом есть кнопка «Бақайдгирӣ», делаем её такой же высоты на ПК */
    #pvRegBtn {
        height: 30px !important;
        min-height: 30px !important;
        padding: 0 12px !important;
        font-size: 12px !important;
        border-radius: 7px !important;
    }

}




/* === КОМПАКТНЫЕ КАРТОЧКИ, ПРОСМОТРЫ И SVG ДЛЯ ПЛАНШЕТА === */
@media (min-width: 768px) and (max-width: 991px) {
    .main-wrap {
        max-width: 100% !important;
        padding: 16px 20px 56px !important;
    }

    .feed {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        align-items: stretch !important;
        gap: 16px !important;
    }

    .post-card {
        max-width: 100% !important;
        min-height: 240px !important;
        max-height: 290px !important;
        padding: 14px !important;
    }

    .swipe-gallery,
    .swipe-gallery + .swipe-gallery {
        grid-column: span 2 !important;
    }

    .swipe-slide,
    .video-slide {
        flex: 0 0 32% !important;
        height: 170px !important;
        padding: 0 !important;
    }
    

    .post-views {
        height: 32px !important;
        padding: 0 4px !important;
        font-size: 13px !important;
        gap: 5px !important;
        background: transparent !important;
    }

    .act-btn,
    .post-card button:not(.post-reg-btn) {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        min-height: 32px !important;
        padding: 4px !important;
        background: transparent !important;
    }

    .post-reg-btn {
        height: 32px !important;
        padding: 0 12px !important;
        font-size: 13px !important;
    }

    .icon-btn {
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
        min-height: 34px !important;
        padding: 4px !important;
    }
.post-views svg,
.act-btn svg,
.post-card svg,
.icon-btn svg,
.fab-item svg {
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    min-height: 16px !important;
}

.fab-add {
    width: 48px !important;
    height: 48px !important;
    font-size: 28px !important;
    bottom: 20px !important;
    right: 20px !important;
}

.fab-menu {
    bottom: 76px !important;
    right: 20px !important;
}

.post-title,
.post-card h1,
.post-card h2 {
    font-size: 17px !important;
    line-height: 1.3 !important;
    margin-bottom: 6px !important;
}

.post-text {
    font-size: 15px !important;
    line-height: 1.45 !important;
    margin-bottom: 10px !important;
}

.badge-cat {
    font-size: 12px !important;
    padding: 4px 8px !important;
}

.post-date {
    font-size: 12px !important;
}

.header-tabs,
.header-tabs button,
.header-tabs a,
.tab-btn {
    font-size: 16px !important;
}

.menu-header {
    font-size: 18px !important;
}

.menu-item {
    font-size: 17px !important;
}

.fab-item {
    font-size: 16px !important;
}

#pvCloseBottom,
.cat-close-bar {
    width: 100% !important;
    display: block !important;
}
.site-header .icon-btn {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
}

.site-header .icon-btn svg {
    width: 19px !important;
    height: 19px !important;
    min-width: 19px !important;
    min-height: 19px !important;
}

}x !important;
}

}