:root {
    --greygrey-50: rgba(107, 114, 128, 1);
    --greygrey-30: rgba(209, 213, 219, 1);
    --x: rgba(45, 119, 232, 1);
    --2-font-family: "Nunito Sans", Helvetica;
    --2-font-weight: 700;
    --2-font-size: 24px;
    --2-line-height: 24px;
    --3-font-family: "Nunito Sans", Helvetica;
    --3-font-weight: 700;
    --3-font-size: 14px;
    --3-line-height: 18px;
    --4-font-family: "Nunito Sans", Helvetica;
    --4-font-weight: 400;
    --4-font-size: 14px;
    --4-line-height: 20px;
    --5-font-family: "Nunito Sans", Helvetica;
    --5-font-weight: 400;
    --5-font-size: 12px;
    --5-line-height: 15px;
    --6-font-family: "Nunito Sans", Helvetica;
    --6-font-weight: 400;
    --6-font-size: 12px;
    --6-line-height: 12px;
    ---font-family: "Nunito Sans", Helvetica;
    ---font-weight: 400;
    ---font-size: 12px;
    ---line-height: 18px;
}

.container.help-container {
    padding-top: 65px;
    position: relative;
    max-width: 1290px;
    margin: 0 auto;
}

/* Page Title */
.page-title {
    font-size: 32px;
    line-height: 1.2;
    margin-bottom: 20px;
    font-weight: 400;
    margin-left: 311px;
}

.title-bold, .title-blue, .title-orange { font-weight: 700; }
.title-bold { color: #141b31; }
.title-blue { color: #2c77e7; }
.title-orange { color: #ff4c00; }

.content-wrapper {
    display: flex;
    gap: 30px;
    flex-direction: column;
}

/* Sidebar & Illustration */
.sidebar { width: 100%; }
.sidebar-card {
    border-radius: 16px;
    box-shadow: 0px 25px 33px #e1e7f0b2;
    padding: 30px;
    position: relative;
}
.sidebar-card.inactive {
    background-color: transparent !important;
    box-shadow: none;
}
.sidebar-card.inactive > *:not(.sidebar-illustration) { display: none; }

.sidebar-illustration {
    width: 140px;
    height: 140px;
    object-fit: cover;
    display: block;
    margin: -115px 0 0 99px;
}
.sidebar-vector {
    display: block;
    margin: -65px 0 0 -5px;
    position: absolute;
    z-index: -1;
}

.sidebar-title {
    font-weight: bold;
    color: #5E6272;
    font-size: 14px;
    margin-bottom: 15px;
}

/* Category Buttons */
.category-filters {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 15px;
}
.category-btn {
    width: 100%;
    height: 40px;
    border-radius: 5px;
    border: 1px solid #C4C4C4;
    font-weight: bold;
    color: #141b31;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    padding-left: 10px;
}
.category-btn.active {
    border: none;
    filter: brightness(90%);
}

.reset-filter-btn {
    background: none;
    border: none;
    font-weight: var(--6-font-weight);
    color: #8190a6;
    font-size: var(--6-font-size);
    font-family: var(--6-font-family);
    cursor: pointer;
    padding: 10px 0;
}

/* Filter Tabs (Main Sections) */
.articles-section { flex: 1; }
.filter-tabs {
    display: flex;
    margin-bottom: 20px;
    overflow-x: auto;
    scrollbar-color: #8291A7 #8291A7;
}
.filter-tab {
    padding: 10px 15px;
    font-size: 16px;
    color: #5e6272;
    background-color: #ffffff;
    border: 1px solid #cbd2dc;
    cursor: pointer;
    white-space: nowrap;
}
.filter-tab:hover {
    background: #e1e7f0;
}
.filter-tab:first-child { border-radius: 5px 0 0 5px; }
.filter-tab:last-child { border-radius: 0 5px 5px 0; }
.articles-section img,
.articles-section iframe {
    max-width: 100%;
}

/* Search Bar */
.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    position: relative;
}
.search-input {
    flex: 1;
    height: 40px;
    border-radius: 5px;
    border: 1px solid #cbd2dc;
    padding: 0 15px;
    font-weight: var(--6-font-weight);
    color: #141b31;
    font-size: var(--6-font-size);
    font-family: var(--6-font-family);
}
.search-icon {
    position: absolute;
    right: 108px;
    top: 7px;
}
.search-input::placeholder {
    color: #8190a6;
}
.search-clear-btn {
    height: 40px;
    padding: 0 15px;
    border-radius: 5px;
    border: 1px solid #cbd2dc;
    background: #fff;
    color: #8190a6;
    font-size: var(--6-font-size);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.results-count {
    color: #8190a6;
    font-size: var(--6-font-size);
    margin-bottom: 20px;
}

/* Articles Grid & Cards */
.articles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 30px;
}
.article-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0px 25px 33px #e1e7f0b2;
    padding: 30px;
    transition: transform 0.2s;
    min-height: 200px;
}
.article-card:hover { transform: translateY(-2px); }

.article-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}
.article-id {
    color: #8291A7;
    font-size: 12px;
    margin-bottom: 15px;
    display: flex;
}
.article-badge {
    padding: 4px 8px;
    border-radius: 30px;
    font-size: 10px;
    color: #141b31;
    line-height: 16px;
}

.article-content {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 20px;
    min-height: 107px;
}
.article-title {
    font-weight: var(--2-font-weight);
    color: #2c77e7;
    font-size: var(--2-font-size);
    text-decoration: none;
    display: block;
    margin-bottom: 10px;
}
.article-excerpt {
    font-weight: var(--4-font-weight);
    color: #5d6271;
    font-size: var(--4-font-size);
    line-height: var(--4-line-height);
    font-family: var(--4-font-family);
    margin-bottom: 0;
}
.article-meta {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 100%;
}
.article-type {
    font-weight: var(--6-font-weight);
    color: #8190a6;
    font-size: var(--6-font-size);
    font-family: var(--6-font-family);
    margin-bottom: 5px;
}
.article-actions {
    display: flex;
}
.article-actions .read-article-btn {
    margin-top: auto;
}

/* Tags */
.filter-tags { padding-bottom: 20px; display: flex; gap: 8px; flex-wrap: wrap; }
.article-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 20px; }
.tag {
    padding: 4px 7px;
    border-radius: 30px;
    border: 1px solid #5e6272;
    font-weight: 400;
    color: #5d6271;
    font-size: 10px;
    line-height: 12px;
    font-family: "Nunito Sans", Helvetica;
    cursor: pointer;
}
.tag:hover {
    border: 1px solid #a0a0a0;
    color: #5d6271;
}

.read-article-btn {
    width: 150px;
    height: 40px;
    background-color: #89c1f0;
    border-radius: 5px;
    border: none;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
}

.pagination-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    transition: opacity 0.2s;
}

.pagination-btn:hover:not(:disabled) {
    opacity: 0.7;
}

.pagination-btn:disabled {
    cursor: not-allowed;
}

.pagination-text {
    color: var(--greygrey-50);
}
@media (min-width: 768px) {
    .content-wrapper { flex-direction: row; align-items: flex-start; }
    .sidebar { width: 286px; flex-shrink: 0; }
    .page-title { font-size: 40px; }
}

@media (min-width: 1024px) {
    .page-title {
        font-size: 49px;
    }
    article a,
    .article-card a:not(.article-title):not(.read-detail-link):not(.read-article-btn) {
        text-decoration: underline;
        text-decoration-skip-ink: auto;
    }
    article a:hover {
        text-decoration: none;
    }
}

.no-search-results {
    text-align: center;
    padding: 60px 0;
    border: 1px solid #CBD2DC;
    border-radius: 5px;
    color: #8291A7;
}
.no-search-results img {
    margin-top: 40px;
}
.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    margin-top: 60px;
    padding-bottom: 15px;
}
.breadcrumbs a {
    text-decoration: none;
    color: #8291A7;
}
.breadcrumbs a:hover {
    text-decoration: underline;
}
.breadcrumbs .separator {
    color: #999;
}
.article-container h1 {
    margin-bottom: 0;
}
.article-container .articles-section {
    margin-top: -50px;
    padding-right: 200px;
}
.article-container article {
    color: #141B31;
    font-size: 14px;
}
.article-container article h2 {
    color: #2D77E8;
    line-height: 24px;
    font-weight: bold;
    margin-bottom: 15px;
}
.article-container article p {
    line-height: 21px;
    font-size: 12pt;
}
.article-container article .article-header {
    display:block;
}
.article-container .related-articles article {
    margin-bottom: 15px;
}
.article-container .related-articles article .article-header {
    display:flex;
}
.article-date {
    color: #8291A7;
    font-size: 12px;
}
.clipboard-link:hover {
    text-decoration: none;
}

.article-container .article-tags {
    margin-bottom: 15px;
}
.article-header .clipboard-link {
    font-size: 12px;
    color: #5E6272;
    margin-top: -25px;
}
.article-container .related-articles h4 {
    font-size: 14px;
    font-weight: bold;
    margin: 20px 0 15px;
}
.article-container .sidebar-card {
    box-shadow: none;
}

.category-filters-tablet,
.article-meta-mobile,
.sidebar-illustration_mobile,
.sidebar-vector_mobile {
    display: none;
}
.category-filters-tablet {
    margin-bottom: 10px;
    border: 1px solid #CBD2DC;
    border-radius: 5px;
}


@media (max-width: 1023px) {
    .category-filters-tablet { display: block; }

    .sidebar .sidebar-illustration,
    .sidebar .sidebar-title,
    .sidebar .category-filters,
    .article-meta,
    .sidebar .reset-filter-btn,
    .sidebar-illustration,
    .sidebar-vector {
        display: none;
    }
    .article-meta-mobile,
    .sidebar-illustration_mobile,
    .sidebar-vector_mobile {
        display: block;
    }
    .read-detail-link {
        margin-right: 0 !important;
    }
    .sidebar-card.inactive > *:not(.sidebar-illustration) {
        display: none;
    }
    .page-title {
        margin-left: auto;
    }

    .sidebar-vector_mobile {
        display: block;
        margin: -55px 0 0 0;
        position: absolute;
        z-index: -1;
        right: 0;
    }
    .sidebar-illustration_mobile {
        width: 140px;
        height: 140px;
        object-fit: cover;
        display: block !important;
        margin: -140px 0 0 0;
        float: right;
    }
    .sidebar-card {
        background-color: transparent;
    }

    .sidebar-card {
        padding: 0;
    }
    .articles-section {
        width: 100%;
    }
    .article-container .articles-section {
        padding-right: 0;
    }
    h1.page-title {
        text-align: left;
        margin-bottom: 0;
    }
    h1.page-title span:first-child {
        width: 100%;
        display: block;
    }

    .content-wrapper { flex-direction: column; gap: 20px; }
    .sidebar { width: 100%; }

    .sidebar-illustration {
        margin: -100px 0 0 auto;
        width: 110px;
        height: 110px;
    }

    .category-select {
        width: 100%;
        height: 48px;
        border: 1px solid #cbd2dc;
        border-radius: 8px;
        padding: 0 20px;
        font-family: var(--2-font-family);
        font-weight: 700;
        color: #141b31;
        margin-bottom: 15px;
    }

    .article-content {
        grid-template-columns: 1fr auto;
        align-items: center;
        gap: 20px;
    }

    .article-title { font-size: 20px; line-height: 1.3; }
    .article-actions { align-self: center; }
    .open-new-window {
        display: none;
    }
}
@media (max-width: 768px) {
    .filter-tabs {
        padding-bottom: 10px;
    }
    .sidebar-illustration_mobile {
        margin: -110px 0 0 0;
    }
    .article-content {
        grid-template-columns: 1fr;
    }
    .read-article-btn {
        float: right;
    }
}

@media (min-width: 1024px) {
    .content-wrapper { flex-direction: row; }
    .sidebar { width: 286px; }
}
.side-panel-container {
    background: #fff;
}
.side-panel-container .article-tags {
    margin-bottom: 15px;
}
.side-panel-content-container {
    padding: 15px;
}
.side-panel-content-container article h2 {
    font-size: 24px;
    font-weight: bold;
    color: #2D77E8;

}
.side-panel-content-container article p {
    line-height: 18px;
    font-size: 12pt;
}
.side-panel-content-container .article-container .articles-section {
    padding-right: 0;
}
.side-panel-content-container .related-articles {
    margin-top: 15px;
}
.side-panel-content-container .related-articles .article-title {
    font-size: 16px;
}
.side-panel-content-container .related-articles .article-card {
    border: 1px solid #CBD2DC
}
.side-panel-content-container iframe {
    width: 100%;
}
.side-panel-labels {
    display: none;
}
.sidepanel-custom-close {
    position: absolute;
    right: 15px;
}
.side-panel-content-container .related-articles
.side-panel-content-container .related-articles h4 {
    font-size: 14px;
    font-weight: bold;
    margin: 25px 0 15px;
}
.side-panel-content-container  .article-header {
    color: #8291A7;
    font-size: 12px;
}
.clipboard-link {
    color: #5E6272;
    text-decoration: underline;
    margin-top: 15px;
    display: block;
    cursor: pointer;
}
.clipboard-link:hover {
    text-decoration: none;
}
.side-panel-content-container img {
    max-width: 100%;
}
.side-panel-content-container .article-card {
    padding: 20px;
    margin-bottom: 15px;
}
.side-panel-content-container h4 {
    margin-bottom: 15px;
    font-size: 14px;
    font-weight: bold;
}
.docs-panel {
    background: #D6F0FF80;
    border-radius: 5px;
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.docs-panel::before {
    content: "Документы и ссылки";
    font-weight: bold;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    background: url('/local/templates/roomook/components/bitrix/news.detail/help/images/icon-docs.png') no-repeat left center;
    background-size: 15px 20px;
    padding-left: 25px;
    min-height: 20px;
}
.alert-panel {
    background: #F4E1E4;
    border-radius: 5px;
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 15px 0;
}
.alert-panel::before {
    content: "Внимание";
    font-weight: bold;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    background: url('/local/templates/roomook/components/bitrix/news.detail/help/images/icon-alert.png') no-repeat left center;
    background-size: 15px 15px;
    padding-left: 25px;
    min-height: 20px;
}
.important-panel {
    background: #FAF2C3;
    border-radius: 5px;
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 15px 0;
}
.important-panel::before {
    content: "Важно";
    font-weight: bold;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    background: url('/local/templates/roomook/components/bitrix/news.detail/help/images/icon-important.png') no-repeat left center;
    background-size: 15px 20px;
    padding-left: 25px;
    min-height: 20px;
}
.clue-panel {
    background: #F3F3F3;
    border-radius: 5px;
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 15px 0;
}
.clue-panel::before {
    content: "Подсказка";
    font-weight: bold;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    background: url('/local/templates/roomook/components/bitrix/news.detail/help/images/icon-clue.png') no-repeat left center;
    background-size: 15px 15px;
    padding-left: 25px;
    min-height: 20px;
}
.note-panel {
    background: #F2E1F4;
    border-radius: 5px;
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 15px 0;
}
.note-panel::before {
    content: "Примечание";
    font-weight: bold;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    background: url('/local/templates/roomook/components/bitrix/news.detail/help/images/icon-docs.png') no-repeat left center;
    background-size: 15px 15px;
    padding-left: 25px;
    min-height: 20px;
}
.advice-panel {
    background: #E1F4E2;
    border-radius: 5px;
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 15px 0;
}
.advice-panel::before {
    content: "Совет";
    font-weight: bold;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    background: url('/local/templates/roomook/components/bitrix/news.detail/help/images/icon-advice.png') no-repeat left center;
    background-size: 15px 15px;
    padding-left: 25px;
    min-height: 20px;
}
.mobile-select-placeholder {
    width: 100%;
    padding: 12px 20px;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    cursor: pointer;
    font-size: 12px;
    color: #141B31;
}
.mobile-list-title {
    font-size: 14px;
    color: #8190a6;
    margin-bottom: 12px;
    text-transform: uppercase;
}
.mobile-checkbox-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    cursor: pointer;
}
.mobile-checkbox-item.active {
    filter: brightness(90%);
}
.mobile-checkbox-item:last-child { border-bottom: none; }
.label-text {
    font-size: 10px;
    color: #333;
    font-weight: bold;
}
.mobile-subcat-checkbox {
    display: none;
}
.checkbox-custom {
    width: 15px;
    height: 15px;
    border: 1px solid #5E6272;
    border-radius: 4px;
    position: relative;
    transition: all 0.2s;
}
.mobile-subcat-checkbox:checked + .checkbox-custom::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 2px;
    width: 5px;
    height: 7px;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    border-style: solid;
    border-color: #5E6272;
}
.read-detail-link {
    margin-top: auto;
    margin-left: auto;
    margin-right: -15px;
    font-size: 12px;
    font-weight: bold;
    color: #5E6272;
    text-decoration: underline;
}
.read-detail-link:hover {
    text-decoration: none;
}