/* ===========================================================
   БАЗА
=========================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Arial, sans-serif;
    background: #f5f7fa;
    color: #1f1f1f;
    font-size: 16px;
}

a {
    color: #005ff9;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.gs-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===========================================================
   ШАПКА В СТИЛЕ ГОСУСЛУГ
=========================================================== */

.gs-header {
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid #e0e3e6;
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Верхняя линия: логотип */
.gs-header-top {
    max-width: 1320px;
    margin: 0 auto;
    padding: 10px 24px;
    display: flex;
    align-items: center;
    height: 64px;
}

.gs-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gs-logo-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #005ff9;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #ffffff;
    font-weight: 700;
    font-size: 16px;
}

.gs-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.gs-logo-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f1f1f;
}

.gs-logo-sub {
    font-size: 12px;
    color: #6f7480;
}

/* Бургер */
.gs-burger {
    margin-left: auto;
    display: none;
    flex-direction: column;
    gap: 4px;
    border: none;
    background: none;
    cursor: pointer;
}

.gs-burger span {
    width: 24px;
    height: 2px;
    background: #1f1f1f;
}

/* Нижняя линия: горизонтальное меню */
.gs-header-bottom {
    background: #f4f6f9;
    border-top: 1px solid #e3e5ea;
}

.gs-header-bottom-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
    height: 48px;
    display: flex;
    align-items: center;
}

.gs-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.gs-nav > li > a,
.gs-sub-btn {
    display: flex;
    align-items: center;
    height: 48px;
    line-height: 48px;
    font-size: 15px;
    padding: 0 2px;
    color: #1f1f1f;
    white-space: nowrap;
}

.gs-nav > li > a:hover,
.gs-sub-btn:hover {
    color: #005ff9;
}

.gs-nav > li > a.active {
    border-bottom: 3px solid #005ff9;
    line-height: 45px;
}

/* Подменю */
.gs-has-sub {
    position: relative;
}

.gs-sub-btn {
    border: none;
    background: none;
    cursor: pointer;
}

.gs-arrow {
    width: 8px;
    height: 8px;
    margin-left: 6px;
    border-right: 2px solid #1f1f1f;
    border-bottom: 2px solid #1f1f1f;
    transform: rotate(45deg);
    transition: transform .15s ease;
}

.gs-has-sub:hover .gs-arrow {
    transform: rotate(-135deg);
}

.gs-submenu {
    position: absolute;
    top: 46px;
    left: 0;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
    padding: 8px 0;
    min-width: 260px;
    display: none;
    list-style: none;
}

.gs-submenu li a {
    display: block;
    padding: 8px 16px;
    font-size: 14px;
    color: #1f1f1f;
}

.gs-submenu li a:hover {
    background: #eff4ff;
}

.gs-has-sub:hover .gs-submenu {
    display: block;
}

/* ===========================================================
   МОБИЛЬНОЕ МЕНЮ
=========================================================== */

.gs-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease;
    z-index: 900;
}

.gs-overlay.show {
    opacity: 1;
    visibility: visible;
}

.gs-mobile-menu {
    position: fixed;
    top: 0;
    left: -280px;
    width: 260px;
    height: 100%;
    background: #ffffff;
    box-shadow: 4px 0 16px rgba(15, 23, 42, 0.35);
    z-index: 950;
    display: flex;
    flex-direction: column;
    transition: left .2s ease;
}

.gs-mobile-menu.open {
    left: 0;
}

.gs-mobile-header {
    padding: 14px 16px;
    border-bottom: 1px solid #e2e4ea;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.gs-mobile-close {
    border: none;
    background: none;
    font-size: 22px;
    cursor: pointer;
}

.gs-mobile-list {
    list-style: none;
    margin: 0;
    padding: 10px 16px 20px;
    overflow-y: auto;
}

.gs-mobile-list > li > a {
    display: block;
    padding: 8px 0;
    font-size: 15px;
    color: #1f1f1f;
    border-bottom: 1px solid #f0f2f7;
}

/* Мобильные подменю */
.gs-mobile-has-sub {
    border-bottom: 1px solid #f0f2f7;
}

.gs-mobile-toggle {
    width: 100%;
    padding: 8px 0;
    border: none;
    background: none;
    text-align: left;
    font-size: 15px;
    cursor: pointer;
    color: #1f1f1f;
}

.gs-mobile-sub {
    list-style: none;
    margin: 0;
    padding: 0 0 8px 12px;
    max-height: 0;
    overflow: hidden;
    transition: max-height .2s ease;
}

.gs-mobile-sub li a {
    display: block;
    padding: 6px 0;
    font-size: 14px;
}

/* ===========================================================
   СЕТКА СТРАНИЦЫ
=========================================================== */

.page-grid {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr) 320px;
    gap: 24px;
    margin-top: 24px;
    margin-bottom: 40px;
}

/* ===========================================================
   SIDEBAR В СТИЛЕ ГОСУСЛУГИ-2024 (ЛИПКИЙ)
=========================================================== */

.sidebar {
    align-self: fixed;
}

.sidebar-inner {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e4ea;
    padding: 18px 16px 20px;
}

.sidebar-sticky {
    position: sticky;
    top: 137px; /* ниже шапки */
}

.sidebar-section-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 14px;
}

.sidebar-group {
    margin-bottom: 10px;
}

.sidebar-group-title {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #8a94a8;
    margin-bottom: 6px;
}

.sidebar-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-links li {
    margin-bottom: 4px;
}

.sidebar-links a {
    display: block;
    padding: 6px 8px;
    border-radius: 8px;
    font-size: 14px;
    color: #1f1f1f;
    line-height: 1.4;
}

.sidebar-links a:hover {
    background: #eff4ff;
}

.sidebar-links a.active {
    background: #dfeaff;
    color: #0051cc;
    font-weight: 600;
}

.sidebar-separator {
    height: 1px;
    background: #eef1f5;
    margin: 10px 0;
}

/* ===========================================================
   КОНТЕНТ
=========================================================== */

.content {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e4ea;
    padding: 26px 28px 30px;
}

.breadcrumbs {
    font-size: 13px;
    color: #7b8495;
    margin-bottom: 10px;
}

.breadcrumbs a {
    color: #7b8495;
}

.breadcrumbs span {
    color: #1f1f1f;
}

.content h1 {
    margin: 0 0 16px;
    font-size: 26px;
}

.content h2 {
    margin-top: 22px;
    margin-bottom: 10px;
    font-size: 20px;
}

.content p,
.content li {
    font-size: 15px;
    line-height: 1.6;
}

.content ul {
    padding-left: 20px;
    margin-top: 4px;
    margin-bottom: 14px;
}

/* ===========================================================
   ПРАВЫЙ БЛОК — ФОРМА (ЛИПКИЙ)
=========================================================== */

.question-box {
    align-self: fixed;
}

.question-inner {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e4ea;
    padding: 20px 18px 22px;
    font-size: 14px;
}

.question-sticky {
    position: sticky;
    top: 137px;
}

.question-inner h2 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 18px;
}

.question-intro {
    margin-bottom: 10px;
    color: #555f70;
}

.question-form {
    margin-top: 6px;
}

.form-field {
    display: block;
    margin-bottom: 10px;
}

.form-field span {
    display: block;
    font-size: 13px;
    color: #5c6573;
    margin-bottom: 4px;
}

.form-field input,
.form-field textarea {
    width: 100%;
    border-radius: 8px;
    border: 1px solid #ccd1dd;
    padding: 8px 9px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    background: #f7f9fc;
}

.form-field input:focus,
.form-field textarea:focus {
    outline: none;
    border-color: #005ff9;
    box-shadow: 0 0 0 2px rgba(0,95,249,0.18);
}

.btn-main {
    width: 100%;
    border: none;
    border-radius: 8px;
    background: #005ff9;
    color: #ffffff;
    font-size: 15px;
    padding: 10px 12px;
    cursor: pointer;
}

.btn-main:hover {
    background: #0043c3;
}

.form-note {
    margin-top: 8px;
    font-size: 12px;
    color: #80889c;
}

/* ===========================================================
   FOOTER
=========================================================== */

.footer {
    background: #ffffff;
    border-top: 1px solid #e2e4ea;
    padding: 14px 0 18px;
    font-size: 13px;
    color: #7a8393;
}

.footer-inner {
    text-align: center;
}

/* ===========================================================
   АДАПТИВ
=========================================================== */

@media (max-width: 1100px) {
    .gs-header-bottom {
        display: none;
    }

    .gs-burger {
        display: flex;
    }

    .page-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }

    .sidebar,
    .question-box {
        position: static;
    }

    .sidebar-sticky,
    .question-sticky {
        position: static;
    }
}

@media (max-width: 768px) {
    .content {
        padding: 20px 18px 22px;
    }

    .gs-header-top {
        padding-inline: 16px;
    }

    .gs-logo-sub {
        display: none; /* экономим место */
    }
}
