* {
    box-sizing: border-box;
}

html {
    font-family: 'Noto Sans', sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body {
    margin: 0;
    background: #f5f8fc;
    color: #071b3a;
    font-family: 'Noto Sans', sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(1250px, calc(100% - 48px));
    margin: 0 auto;
}

/* HEADER */
.site-header {
    background: white;
    box-shadow: 0 10px 28px rgba(7, 27, 58, 0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-line {
    background: linear-gradient(90deg, #061a3b, #082d62);
    color: white;
}

.top-line-inner {
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.top-left {
    display: flex;
    align-items: center;
    gap: 18px;
    font-weight: 700;
}

.divider {
    width: 1px;
    height: 24px;
    background: rgba(255,255,255,0.35);
}

.phone-top {
    color: #ffcc00;
    font-size: 19px;
    font-weight: 900;
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lang-switcher a {
    color: white;
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 900;
}

.lang-switcher a.active {
    background: #0a63c7;
}

.main-header {
    padding: 38px 0 34px;
}

.header-grid {
    display: grid;
    grid-template-columns: 330px 1fr 300px;
    align-items: center;
    gap: 32px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 18px;
}

.brand img {
    width: 76px;
    height: 76px;
    object-fit: contain;
}

.brand-title {
    font-size: 27px;
    line-height: 1.15;
    font-weight: 900;
    color: #071b3a;
}

.brand-subtitle {
    margin-top: 8px;
    font-size: 16px;
    color: #53627a;
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.main-nav a {
    font-size: 17px;
    font-weight: 900;
    color: #071b3a;
    white-space: nowrap;
}

.main-nav a:hover {
    color: #0a63c7;
}

.header-tools {
    display: grid;
    gap: 14px;
}

.header-search input {
    width: 100%;
    height: 48px;
    border: 1px solid #d7e2f1;
    background: #f9fbff;
    border-radius: 20px;
    padding: 0 18px;
    font-size: 16px;
    font-family: inherit;
    font-weight: 700;
    outline: none;
}

.header-search input:focus {
    border-color: #0a63c7;
    background: white;
}

.accessibility-toggle {
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: 999px;
    background: #061a3b;
    color: white;
    font-family: inherit;
    font-weight: 900;
    font-size: 15px;
    cursor: pointer;
}

.accessibility-toggle:hover {
    background: #0a63c7;
}

/* HERO */
.hero-modern {
    padding: 36px 0 22px;
}

.hero-modern-grid {
    display: grid;
    grid-template-columns: 1fr 370px;
    gap: 28px;
    align-items: stretch;
}

.hero-image-card {
    position: relative;
    min-height: 395px;
    border-radius: 28px;
    overflow: hidden;
    background-image:
        linear-gradient(90deg, rgba(4, 20, 45, 0.92), rgba(4, 20, 45, 0.28)),
        url("https://www.zakon.kz/pbi/WEBP/2023-12-25/file-823a2389-a47b-4d46-a97e-143e0778d509/800x450.webp");
    background-size: cover;
    background-position: center;
    box-shadow: 0 24px 60px rgba(7, 27, 58, 0.18);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 680px;
    padding: 64px 70px;
    color: white;
}

.hero-badge {
    display: inline-block;
    background: #0a63c7;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 900;
    text-transform: uppercase;
}

.hero-content h1 {
    font-size: 46px;
    line-height: 1.18;
    margin: 28px 0 18px;
    color: white;
}

.hero-content p {
    font-size: 20px;
    line-height: 1.6;
    color: #eef5ff;
    margin: 0;
}

.hero-btn {
    margin-top: 28px;
    display: inline-flex;
    background: white;
    color: #071b3a;
    padding: 15px 34px;
    border-radius: 14px;
    font-size: 17px;
    font-weight: 900;
}

.hero-arrow {
    position: absolute;
    top: 53%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 999px;
    border: 0;
    background: rgba(6, 26, 59, 0.78);
    color: white;
    font-size: 34px;
    font-weight: 900;
}

.hero-arrow.left {
    left: 22px;
}

.hero-arrow.right {
    right: 22px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    display: flex;
    gap: 14px;
}

.hero-dots span {
    width: 13px;
    height: 13px;
    border-radius: 999px;
    background: white;
    opacity: 0.9;
}

.hero-dots span.active {
    background: #0a63c7;
}

.hero-side {
    display: grid;
    gap: 26px;
}

.emergency-box {
    background: linear-gradient(135deg, #ee1919, #c90000);
    border-radius: 26px;
    color: white;
    padding: 38px 34px;
    display: flex;
    align-items: center;
    gap: 28px;
    box-shadow: 0 22px 50px rgba(214, 0, 0, 0.24);
}

.phone-circle {
    width: 82px;
    height: 82px;
    background: white;
    color: #d30000;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
}

.emergency-title {
    font-size: 21px;
    font-weight: 900;
}

.emergency-number {
    font-size: 64px;
    line-height: 1;
    font-weight: 900;
}

.emergency-text {
    font-size: 18px;
    opacity: 0.95;
}

.stats-box {
    background: white;
    border-radius: 26px;
    padding: 32px;
    text-align: center;
    box-shadow: 0 22px 50px rgba(7, 27, 58, 0.08);
    border: 1px solid #e0e8f3;
}

.stats-box h3 {
    margin: 0;
    font-size: 19px;
}

.today-number {
    font-size: 48px;
    font-weight: 900;
    color: #0a63c7;
    margin: 16px 0 22px;
}

.stats-row {
    border-top: 1px solid #e5edf7;
    padding-top: 18px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.stats-row strong {
    display: block;
    font-size: 20px;
}

.stats-row span {
    display: block;
    margin-top: 5px;
    font-size: 13px;
    color: #53627a;
    font-weight: 800;
}

.green {
    color: #0a8b45;
}

/* QUICK PANEL */
.quick-panel {
    margin-top: 18px;
    background: white;
    border-radius: 26px;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    box-shadow: 0 20px 50px rgba(7, 27, 58, 0.08);
    border: 1px solid #e0e8f3;
    overflow: hidden;
}

.quick-panel a {
    min-height: 92px;
    padding: 22px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-right: 1px solid #e5edf7;
}

.quick-panel a:last-child {
    border-right: 0;
}

.quick-panel a:hover {
    background: #eef5ff;
}

.quick-panel span {
    font-size: 33px;
    color: #0a63c7;
}

.quick-panel strong {
    font-size: 15px;
    line-height: 1.3;
}

/* COMMON */
.section {
    padding: 48px 0;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 22px;
}

.section-kicker {
    color: #0a63c7;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.section h2,
.section-head h2,
h1,
h2 {
    color: #071b3a;
}

.section-link {
    color: #0a63c7;
    font-weight: 900;
}

.btn {
    display: inline-flex;
    padding: 15px 20px;
    border-radius: 16px;
    font-weight: 900;
}

.btn.primary {
    background: #ffcc00;
    color: #071b3a;
}

/* CARDS */
.service-grid,
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.service-card,
.news-card,
.leader-card,
.vacancy-card,
.gallery-album,
.video-card,
.doc-item,
.doc-list > a,
.card {
    background: white;
    border: 1px solid #e0e8f3;
    border-radius: 24px;
    box-shadow: 0 12px 32px rgba(7,27,58,.07);
    overflow: hidden;
}

.service-card {
    padding: 24px;
}

.service-card:hover,
.news-card:hover,
.leader-card:hover {
    transform: translateY(-3px);
    transition: 0.18s ease;
}

.service-icon {
    width: 56px;
    height: 56px;
    background: #eef5ff;
    color: #0a63c7;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}

.service-card h3,
.news-body h3,
.leader-body h3 {
    color: #0a63c7;
}

.service-card p,
.news-body p,
.leader-body p,
.muted {
    color: #53627a;
    line-height: 1.6;
}

/* APPEAL */
.appeal-banner {
    background: linear-gradient(135deg, #0a63c7, #06356f);
    color: white;
    border-radius: 28px;
    padding: 34px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    box-shadow: 0 22px 55px rgba(10,99,199,.22);
}

.appeal-banner h2 {
    color: white;
    margin: 8px 0;
}

.appeal-banner p {
    color: #e8f1ff;
    max-width: 760px;
}

/* NEWS */
.news-card img,
.news-placeholder {
    width: 100%;
    height: 190px;
    object-fit: cover;
}

.news-placeholder,
.leader-placeholder,
.gallery-placeholder {
    background: linear-gradient(135deg, #0a63c7, #06356f);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}

.news-placeholder {
    font-size: 46px;
}

.news-body {
    padding: 20px;
}

.important-label,
.news-category {
    display: inline-block;
    padding: 7px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.important-label {
    background: #ffcc00;
    color: #071b3a;
}

.news-category {
    background: #eef5ff;
    color: #0a63c7;
}

/* LEADERS */
.leaders-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.leader-card img,
.leader-placeholder {
    width: 100%;
    height: 230px;
    object-fit: cover;
}

.leader-placeholder {
    font-size: 42px;
}

.leader-body {
    padding: 20px;
}

/* OTHER PAGES */
.page {
    background: white;
    margin-top: 32px;
    margin-bottom: 32px;
    padding: 36px;
    border-radius: 26px;
    box-shadow: 0 12px 34px rgba(28,45,74,0.08);
}

.doc-list,
.vacancy-list,
.faq-list,
.search-results {
    display: grid;
    gap: 14px;
}

.doc-list > a,
.doc-item,
.vacancy-card,
.search-item {
    padding: 20px;
}

.appeal-form {
    display: grid;
    gap: 14px;
    max-width: 760px;
}

.appeal-form label {
    font-weight: 900;
}

.appeal-form input,
.appeal-form select,
.appeal-form textarea,
.search-form input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #dfe8f5;
    border-radius: 16px;
    font-family: inherit;
    font-size: 16px;
    outline: none;
    background: #f8fbff;
}

.search-form {
    display: flex;
    gap: 12px;
    margin: 24px 0;
}

.search-item {
    display: block;
    background: #f8fbff;
    border-radius: 14px;
    font-weight: 800;
    color: #0a63c7;
}

.faq-item {
    background: white;
    border: 1px solid #dfe8f5;
    border-radius: 18px;
    overflow: hidden;
}

.faq-item summary {
    cursor: pointer;
    padding: 18px 20px;
    font-weight: 900;
    color: #0a63c7;
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "+";
    float: right;
    font-size: 24px;
}

.faq-item[open] summary::after {
    content: "−";
}

.faq-answer {
    padding: 0 20px 20px;
    color: #53627a;
    line-height: 1.7;
}

/* GALLERY / VIDEO */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.gallery-album img,
.gallery-placeholder {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.gallery-placeholder {
    font-size: 50px;
}

.gallery-body,
.video-body {
    padding: 20px;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.photo-card {
    background: white;
    border: 1px solid #e0e8f3;
    border-radius: 20px;
    overflow: hidden;
}

.photo-card img {
    width: 100%;
    height: 190px;
    object-fit: cover;
}

.photo-card span {
    display: block;
    padding: 12px 14px;
    font-weight: 800;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
}

.video-frame {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #101827;
}

.video-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* FOOTER */
.footer {
    background: #061a3b;
    color: white;
    padding: 36px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.footer-logo-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.footer-logo-img {
    width: 64px;
    height: 64px;
    background: white;
    border-radius: 16px;
    padding: 6px;
}

/* ACCESSIBILITY SOFT */
body.accessibility-mode {
    font-size: 20px;
    line-height: 1.75;
}

body.accessibility-mode p,
body.accessibility-mode li,
body.accessibility-mode .muted {
    font-size: 20px;
    line-height: 1.75;
}

body.accessibility-mode .main-nav a,
body.accessibility-mode .lang-switcher a,
body.accessibility-mode .accessibility-toggle {
    font-size: 17px;
}

/* RESPONSIVE */
@media (max-width: 1180px) {
    .header-grid {
        grid-template-columns: 1fr;
    }

    .main-nav {
        justify-content: flex-start;
    }

    .header-tools {
        max-width: 500px;
    }

    .hero-modern-grid {
        grid-template-columns: 1fr;
    }

    .quick-panel {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 800px) {
    .container {
        width: min(100% - 28px, 1250px);
    }

    .main-header {
        padding: 24px 0;
    }

    .top-line-inner {
        height: auto;
        padding: 10px 0;
        gap: 10px;
        flex-direction: column;
    }

    .brand img {
        width: 64px;
        height: 64px;
    }

    .brand-title {
        font-size: 21px;
    }

    .main-nav {
        gap: 12px;
    }

    .hero-content {
        padding: 44px 28px;
    }

    .hero-content h1 {
        font-size: 34px;
    }

    .emergency-box {
        flex-direction: column;
        align-items: flex-start;
    }

    .quick-panel {
        grid-template-columns: repeat(2, 1fr);
    }

    .service-grid,
    .news-grid,
    .leaders-grid,
    .gallery-grid,
    .video-grid {
        grid-template-columns: 1fr;
    }

    .appeal-banner {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .quick-panel {
        grid-template-columns: 1fr;
    }

    .stats-row {
        grid-template-columns: 1fr;
    }

    .search-form {
        flex-direction: column;
    }
}

/* ===== COMPACT HEADER OVERRIDE ===== */

.top-line,
.main-header {
    display: none !important;
}

.site-header {
    background: rgba(255,255,255,0.96) !important;
    backdrop-filter: blur(14px);
    border-bottom: 1px solid #e0e8f3;
    box-shadow: 0 8px 26px rgba(7, 27, 58, 0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-compact {
    min-height: 86px;
    display: grid;
    grid-template-columns: 270px 1fr auto;
    align-items: center;
    gap: 18px;
}

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

.compact-brand img {
    width: 58px;
    height: 58px;
    object-fit: contain;
    flex-shrink: 0;
}

.compact-brand .brand-title {
    font-size: 18px;
    line-height: 1.15;
    font-weight: 900;
    color: #071b3a;
    white-space: normal;
}

.compact-brand .brand-subtitle {
    font-size: 13px;
    margin-top: 4px;
    color: #53627a;
}

.compact-nav {
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
}

.compact-nav::-webkit-scrollbar {
    display: none;
}

.compact-nav a {
    white-space: nowrap;
    font-size: 14px;
    font-weight: 900;
    color: #071b3a;
    padding: 9px 10px;
    border-radius: 12px;
}

.compact-nav a:hover {
    color: #0a63c7;
    background: #eef5ff;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 9px;
}

.compact-search input {
    width: 150px;
    height: 42px;
    border-radius: 999px;
    padding: 0 14px;
    font-size: 14px;
    font-weight: 700;
    border: 1px solid #d7e2f1;
    background: #f9fbff;
}

.compact-accessibility {
    width: 42px !important;
    height: 42px !important;
    padding: 0 !important;
    border-radius: 999px !important;
    background: #061a3b !important;
    color: white !important;
    font-size: 16px !important;
    border: 0 !important;
    cursor: pointer;
}

.language-dropdown {
    position: relative;
}

.language-current {
    height: 42px;
    min-width: 66px;
    border: 0;
    border-radius: 999px;
    background: #0a63c7;
    color: white;
    font-weight: 900;
    font-family: inherit;
    cursor: pointer;
    padding: 0 14px;
}

.language-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: white;
    min-width: 145px;
    border-radius: 16px;
    border: 1px solid #dfe8f5;
    box-shadow: 0 16px 40px rgba(7, 27, 58, 0.14);
    overflow: hidden;
    z-index: 2000;
}

.language-menu a {
    display: block;
    padding: 12px 14px;
    font-weight: 800;
    color: #071b3a;
    white-space: nowrap;
}

.language-menu a:hover {
    background: #eef5ff;
    color: #0a63c7;
}

.language-dropdown:hover .language-menu,
.language-dropdown:focus-within .language-menu {
    display: block;
}

@media (max-width: 1200px) {
    .header-compact {
        grid-template-columns: 250px 1fr;
    }

    .header-right {
        grid-column: 1 / -1;
        justify-content: flex-end;
        padding-bottom: 10px;
    }

    .compact-nav {
        justify-content: flex-start;
    }
}

@media (max-width: 760px) {
    .header-compact {
        grid-template-columns: 1fr;
        min-height: auto;
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .compact-nav {
        justify-content: flex-start;
        padding: 4px 0;
    }

    .header-right {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .compact-search input {
        width: 190px;
    }
}

@media (max-width: 460px) {
    .compact-search input {
        width: 150px;
    }

    .compact-brand .brand-title {
        font-size: 16px;
    }

    .compact-brand .brand-subtitle {
        font-size: 12px;
    }
}

/* ===== FIX LANGUAGE SELECT AND HERO ARROWS ===== */

.language-select-form {
    margin: 0;
}

.language-select {
    height: 42px;
    min-width: 72px;
    border: 0;
    border-radius: 999px;
    background: #0a63c7;
    color: white;
    font-weight: 900;
    font-family: inherit;
    padding: 0 12px;
    outline: none;
    cursor: pointer;
}

.language-select option {
    color: #071b3a;
    background: white;
}

.hero-arrow {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    padding: 0 !important;
    font-size: 36px !important;
    cursor: pointer;
    z-index: 10;
}

.hero-arrow.left,
.hero-arrow.right {
    top: 50% !important;
}

.hero-arrow.left {
    left: 24px !important;
}

.hero-arrow.right {
    right: 24px !important;
}

.hero-dots {
    z-index: 10;
}

.hero-dots button {
    width: 13px;
    height: 13px;
    border: 0;
    border-radius: 999px;
    background: white;
    opacity: 0.9;
    padding: 0;
    cursor: pointer;
}

.hero-dots button.active {
    background: #0a63c7;
}

/* ===== FINAL HERO ARROW CENTER FIX ===== */

.hero-arrow {
    width: 54px !important;
    height: 54px !important;
    border-radius: 50% !important;
    background: rgba(6, 26, 59, 0.82) !important;
    color: transparent !important;
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    border: 0 !important;
    line-height: 1 !important;
    font-size: 0 !important;
}

.hero-arrow::before {
    content: "";
    width: 14px;
    height: 14px;
    border-top: 4px solid #ffffff;
    border-right: 4px solid #ffffff;
    display: block;
}

.hero-arrow.left::before {
    transform: rotate(-135deg);
    margin-left: 5px;
}

.hero-arrow.right::before {
    transform: rotate(45deg);
    margin-right: 5px;
}

.hero-arrow.left {
    left: 24px !important;
}

.hero-arrow.right {
    right: 24px !important;
}

.hero-arrow:hover {
    background: #0a63c7 !important;
}

/* ===== APPEAL STATS / DASHBOARD ===== */

.stats-box {
    display: block;
    color: inherit;
}

.latest-appeals-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.latest-appeal-card {
    background: white;
    border: 1px solid #e0e8f3;
    border-radius: 22px;
    padding: 20px;
    box-shadow: 0 10px 28px rgba(7, 27, 58, 0.06);
}

.latest-appeal-card h3 {
    margin: 8px 0;
    color: #0a63c7;
}

.latest-appeal-card p {
    color: #53627a;
    line-height: 1.4;
    min-height: 42px;
}

.appeal-id {
    font-weight: 900;
    color: #071b3a;
}

.appeal-status {
    display: inline-flex;
    padding: 7px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.status-new {
    background: #fff3cd;
    color: #856404;
}

.status-in_progress {
    background: #d9ecff;
    color: #0a63c7;
}

.status-done {
    background: #d8f5e4;
    color: #0a8b45;
}

.status-rejected {
    background: #f8d7da;
    color: #842029;
}

.statistics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-top: 26px;
}

.stat-dashboard-card {
    background: #f8fbff;
    border: 1px solid #e0e8f3;
    border-radius: 22px;
    padding: 24px;
    text-align: center;
}

.stat-dashboard-card strong {
    display: block;
    font-size: 42px;
    color: #0a63c7;
    line-height: 1;
}

.stat-dashboard-card span {
    display: block;
    margin-top: 10px;
    color: #53627a;
    font-weight: 900;
}

.appeals-table {
    display: grid;
    gap: 8px;
    margin-top: 20px;
}

.appeals-table-head,
.appeals-table-row {
    display: grid;
    grid-template-columns: 90px 160px 1fr 130px 150px;
    gap: 12px;
    align-items: center;
}

.appeals-table-head {
    font-weight: 900;
    color: #071b3a;
    padding: 12px 16px;
}

.appeals-table-row {
    background: #f8fbff;
    border: 1px solid #e0e8f3;
    border-radius: 16px;
    padding: 14px 16px;
}

@media (max-width: 1100px) {
    .latest-appeals-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .statistics-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .appeals-table-head {
        display: none;
    }

    .appeals-table-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .latest-appeals-grid,
    .statistics-grid {
        grid-template-columns: 1fr;
    }
}

.public-appeal-number {
    display: inline-flex;
    margin: 14px 0 20px;
    padding: 18px 24px;
    background: #eef5ff;
    color: #0a63c7;
    border: 2px dashed #0a63c7;
    border-radius: 18px;
    font-size: 34px;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.secondary-page {
    margin-left: 10px;
    background: #eef5ff;
    color: #0a63c7;
}

.status-check-form {
    margin-top: 24px;
}

.status-result {
    margin-top: 28px;
    background: #f8fbff;
    border: 1px solid #dfe8f5;
    border-radius: 22px;
    padding: 24px;
}

.status-error {
    margin-top: 24px;
    background: #fff3cd;
    border: 1px solid #ffe69c;
    color: #856404;
    border-radius: 18px;
    padding: 16px 18px;
    font-weight: 800;
}

.quick-panel {
    grid-template-columns: repeat(7, 1fr);
}

@media (max-width: 1180px) {
    .quick-panel {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 800px) {
    .quick-panel {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 520px) {
    .quick-panel {
        grid-template-columns: 1fr;
    }
}

/* ===== CONTACTS AND SITE SETTINGS ===== */

.contact-main-card {
    background: linear-gradient(135deg, #0a63c7, #06356f);
    color: white;
    border-radius: 28px;
    padding: 34px;
    box-shadow: 0 22px 55px rgba(10,99,199,.22);
}

.contact-main-card h2 {
    color: white;
    margin-top: 0;
}

.contact-big-phone {
    font-size: 72px;
    line-height: 1;
    font-weight: 900;
    color: #ffcc00;
    margin: 18px 0;
}

.contact-main-card p {
    color: #eef5ff;
    font-size: 18px;
}

.contact-departments-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.contact-department-card {
    background: white;
    border: 1px solid #e0e8f3;
    border-radius: 22px;
    padding: 22px;
    box-shadow: 0 10px 28px rgba(7, 27, 58, 0.06);
}

.contact-department-card h3 {
    color: #0a63c7;
    margin-top: 0;
}

.contact-department-card p {
    color: #53627a;
    line-height: 1.55;
}

@media (max-width: 900px) {
    .contact-departments-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .contact-departments-grid {
        grid-template-columns: 1fr;
    }

    .contact-big-phone {
        font-size: 54px;
    }
}

/* ===== NEW FINAL HEADER ===== */

.site-header,
.header-compact,
.top-line,
.main-header,
.header-grid,
.header-right,
.compact-nav,
.language-dropdown,
.language-select-form {
    display: none !important;
}

.new-header {
    position: sticky;
    top: 0;
    z-index: 2000;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid #dfe8f5;
    box-shadow: 0 8px 24px rgba(7, 27, 58, 0.06);
}

.new-header-inner {
    min-height: 78px;
    display: grid;
    grid-template-columns: 265px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
}

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

.new-brand img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    flex-shrink: 0;
}

.new-brand-title {
    font-size: 18px;
    font-weight: 900;
    line-height: 1.14;
    color: #071b3a;
}

.new-brand-subtitle {
    margin-top: 4px;
    color: #53627a;
    font-size: 13px;
    line-height: 1.2;
}

.new-nav {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex-wrap: nowrap;
}

.new-nav > a,
.more-menu > button {
    height: 38px;
    display: inline-flex;
    align-items: center;
    padding: 0 9px;
    border-radius: 11px;
    font-size: 13px;
    font-weight: 900;
    color: #071b3a;
    white-space: nowrap;
    border: 0;
    background: transparent;
    font-family: inherit;
    cursor: pointer;
}

.new-nav > a:hover,
.more-menu > button:hover {
    background: #eef5ff;
    color: #0a63c7;
}

.more-menu,
.lang-menu {
    position: relative;
}

.more-dropdown,
.lang-menu-list {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    background: white;
    border: 1px solid #dfe8f5;
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(7, 27, 58, 0.16);
    overflow: hidden;
    z-index: 3000;
}

.more-dropdown {
    left: 0;
    min-width: 190px;
}

.lang-menu-list {
    right: 0;
    min-width: 170px;
}

.more-menu:hover .more-dropdown,
.more-menu:focus-within .more-dropdown,
.lang-menu:hover .lang-menu-list,
.lang-menu:focus-within .lang-menu-list {
    display: block;
}

.more-dropdown a,
.lang-menu-list a {
    display: block;
    padding: 12px 14px;
    color: #071b3a;
    font-weight: 800;
    font-size: 14px;
    white-space: nowrap;
}

.more-dropdown a:hover,
.lang-menu-list a:hover {
    background: #eef5ff;
    color: #0a63c7;
}

.new-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.new-search input {
    width: 135px;
    height: 42px;
    border: 1px solid #d7e2f1;
    background: #f8fbff;
    border-radius: 999px;
    padding: 0 14px;
    outline: none;
    font-family: inherit;
    font-weight: 700;
    font-size: 14px;
}

.new-search input:focus {
    background: white;
    border-color: #0a63c7;
}

.new-accessibility {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 0;
    background: #061a3b;
    color: white;
    font-size: 16px;
    cursor: pointer;
}

.lang-menu-btn {
    height: 42px;
    border: 0;
    border-radius: 999px;
    padding: 0 14px;
    background: #0a63c7;
    color: white;
    font-family: inherit;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    white-space: nowrap;
}

.lang-menu-btn:hover,
.new-accessibility:hover {
    background: #084f9f;
}

@media (max-width: 1240px) {
    .new-header-inner {
        grid-template-columns: 250px 1fr;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .new-header-actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }

    .new-nav {
        justify-content: flex-end;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .new-nav::-webkit-scrollbar {
        display: none;
    }
}

@media (max-width: 760px) {
    .new-header-inner {
        grid-template-columns: 1fr;
    }

    .new-nav {
        justify-content: flex-start;
        overflow-x: auto;
    }

    .new-header-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .new-search input {
        width: 180px;
    }
}

@media (max-width: 460px) {
    .new-brand-title {
        font-size: 16px;
    }

    .new-brand-subtitle {
        font-size: 12px;
    }

    .new-search input {
        width: 145px;
    }
}

/* ===== NEW FINAL HEADER ===== */

.site-header,
.header-compact,
.top-line,
.main-header,
.header-grid,
.header-right,
.compact-nav,
.language-dropdown,
.language-select-form {
    display: none !important;
}

.new-header {
    position: sticky;
    top: 0;
    z-index: 2000;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid #dfe8f5;
    box-shadow: 0 8px 24px rgba(7, 27, 58, 0.06);
}

.new-header-inner {
    min-height: 78px;
    display: grid;
    grid-template-columns: 265px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
}

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

.new-brand img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    flex-shrink: 0;
}

.new-brand-title {
    font-size: 18px;
    font-weight: 900;
    line-height: 1.14;
    color: #071b3a;
}

.new-brand-subtitle {
    margin-top: 4px;
    color: #53627a;
    font-size: 13px;
    line-height: 1.2;
}

.new-nav {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex-wrap: nowrap;
}

.new-nav > a,
.more-menu > button {
    height: 38px;
    display: inline-flex;
    align-items: center;
    padding: 0 9px;
    border-radius: 11px;
    font-size: 13px;
    font-weight: 900;
    color: #071b3a;
    white-space: nowrap;
    border: 0;
    background: transparent;
    font-family: inherit;
    cursor: pointer;
}

.new-nav > a:hover,
.more-menu > button:hover {
    background: #eef5ff;
    color: #0a63c7;
}

.more-menu,
.lang-menu {
    position: relative;
}

.more-dropdown,
.lang-menu-list {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    background: white;
    border: 1px solid #dfe8f5;
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(7, 27, 58, 0.16);
    overflow: hidden;
    z-index: 3000;
}

.more-dropdown {
    left: 0;
    min-width: 190px;
}

.lang-menu-list {
    right: 0;
    min-width: 170px;
}

.more-menu:hover .more-dropdown,
.more-menu:focus-within .more-dropdown,
.lang-menu:hover .lang-menu-list,
.lang-menu:focus-within .lang-menu-list {
    display: block;
}

.more-dropdown a,
.lang-menu-list a {
    display: block;
    padding: 12px 14px;
    color: #071b3a;
    font-weight: 800;
    font-size: 14px;
    white-space: nowrap;
}

.more-dropdown a:hover,
.lang-menu-list a:hover {
    background: #eef5ff;
    color: #0a63c7;
}

.new-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.new-search input {
    width: 135px;
    height: 42px;
    border: 1px solid #d7e2f1;
    background: #f8fbff;
    border-radius: 999px;
    padding: 0 14px;
    outline: none;
    font-family: inherit;
    font-weight: 700;
    font-size: 14px;
}

.new-search input:focus {
    background: white;
    border-color: #0a63c7;
}

.new-accessibility {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 0;
    background: #061a3b;
    color: white;
    font-size: 16px;
    cursor: pointer;
}

.lang-menu-btn {
    height: 42px;
    border: 0;
    border-radius: 999px;
    padding: 0 14px;
    background: #0a63c7;
    color: white;
    font-family: inherit;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    white-space: nowrap;
}

.lang-menu-btn:hover,
.new-accessibility:hover {
    background: #084f9f;
}

@media (max-width: 1240px) {
    .new-header-inner {
        grid-template-columns: 250px 1fr;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .new-header-actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }

    .new-nav {
        justify-content: flex-end;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .new-nav::-webkit-scrollbar {
        display: none;
    }
}

@media (max-width: 760px) {
    .new-header-inner {
        grid-template-columns: 1fr;
    }

    .new-nav {
        justify-content: flex-start;
        overflow-x: auto;
    }

    .new-header-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .new-search input {
        width: 180px;
    }
}

@media (max-width: 460px) {
    .new-brand-title {
        font-size: 16px;
    }

    .new-brand-subtitle {
        font-size: 12px;
    }

    .new-search input {
        width: 145px;
    }
}

/* ===== HEADER MENU OVERLAP FIX ===== */

.new-header-inner {
    grid-template-columns: 285px minmax(520px, 1fr) 300px !important;
    gap: 14px !important;
}

.new-nav {
    justify-content: flex-start !important;
    gap: 2px !important;
    overflow: visible !important;
}

.new-nav > a,
.more-menu > button {
    font-size: 13px !important;
    padding: 0 8px !important;
}

.new-header-actions {
    min-width: 300px;
    justify-content: flex-end;
}

.new-search input {
    width: 120px !important;
}

.more-menu {
    flex-shrink: 0;
    z-index: 4000;
}

.more-dropdown {
    right: 0;
    left: auto !important;
}

@media (max-width: 1320px) {
    .new-header-inner {
        grid-template-columns: 270px minmax(430px, 1fr) 270px !important;
    }

    .new-brand-title {
        font-size: 17px !important;
    }

    .new-nav > a,
    .more-menu > button {
        font-size: 12px !important;
        padding: 0 7px !important;
    }

    .new-header-actions {
        min-width: 270px;
    }

    .new-search input {
        width: 105px !important;
    }
}

@media (max-width: 1180px) {
    .new-header-inner {
        grid-template-columns: 250px 1fr !important;
    }

    .new-header-actions {
        grid-column: 1 / -1;
        min-width: 0;
        justify-content: flex-end;
    }

    .new-nav {
        justify-content: flex-end !important;
        overflow-x: auto !important;
    }
}

/* ===== MOBILE LAYOUT FINAL ===== */

.mobile-menu-toggle {
    display: none;
}

/* Планшеты */
@media (max-width: 1024px) {
    .new-header-inner {
        grid-template-columns: 1fr auto auto !important;
        min-height: 70px;
        gap: 10px;
    }

    .new-brand img {
        width: 48px;
        height: 48px;
    }

    .new-brand-title {
        font-size: 16px;
        line-height: 1.15;
    }

    .new-brand-subtitle {
        font-size: 12px;
    }

    .mobile-menu-toggle {
        display: inline-flex;
        width: 42px;
        height: 42px;
        border: 0;
        border-radius: 999px;
        background: #061a3b;
        color: white;
        align-items: center;
        justify-content: center;
        font-size: 22px;
        font-weight: 900;
        cursor: pointer;
        grid-column: 2;
        grid-row: 1;
    }

    .new-header-actions {
        grid-column: 3;
        grid-row: 1;
        justify-content: flex-end;
        gap: 6px;
        min-width: auto;
    }

    .new-search {
        display: none;
    }

    .new-accessibility {
        width: 42px;
        height: 42px;
    }

    .lang-menu-btn {
        height: 42px;
        padding: 0 12px;
    }

    .new-nav {
        display: none;
        grid-column: 1 / -1;
        width: 100%;
        padding: 10px 0 8px;
        border-top: 1px solid #e0e8f3;
        margin-top: 8px;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        overflow: visible !important;
    }

    .new-nav.mobile-open {
        display: flex;
    }

    .new-nav > a,
    .more-menu > button {
        width: 100%;
        justify-content: flex-start;
        height: 42px;
        padding: 0 14px !important;
        background: #f8fbff;
        border: 1px solid #e0e8f3;
        border-radius: 14px;
        font-size: 15px !important;
    }

    .more-menu {
        width: 100%;
    }

    .more-dropdown {
        position: static !important;
        display: grid !important;
        margin-top: 6px;
        box-shadow: none;
        border-radius: 14px;
        overflow: hidden;
    }

    .more-dropdown a {
        padding: 12px 14px;
        background: white;
        border-bottom: 1px solid #eef2f7;
    }
}

/* Смартфоны */
@media (max-width: 760px) {
    body {
        background: #f5f8fc;
    }

    .container {
        width: calc(100% - 24px) !important;
    }

    .new-header-inner {
        display: grid !important;
        grid-template-columns: 1fr auto auto !important;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .new-brand {
        min-width: 0;
    }

    .new-brand img {
        width: 44px;
        height: 44px;
    }

    .new-brand-title {
        font-size: 15px !important;
        max-width: 170px;
    }

    .new-brand-subtitle {
        font-size: 11px;
        max-width: 170px;
    }

    .new-accessibility {
        display: none;
    }

    .lang-menu-btn {
        min-width: 62px;
        height: 40px;
        font-size: 13px;
    }

    .mobile-menu-toggle {
        width: 40px;
        height: 40px;
    }

    .hero-modern {
        padding: 18px 0 12px;
    }

    .hero-modern-grid {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }

    .hero-image-card {
        min-height: 420px;
        border-radius: 22px;
        background-position: center;
    }

    .hero-content {
        padding: 44px 24px 70px !important;
        max-width: 100%;
    }

    .hero-badge {
        font-size: 12px;
        padding: 7px 12px;
    }

    .hero-content h1 {
        font-size: 30px !important;
        line-height: 1.18;
        margin: 18px 0 12px;
    }

    .hero-content p {
        font-size: 16px;
        line-height: 1.55;
    }

    .hero-btn {
        padding: 13px 22px;
        font-size: 15px;
    }

    .hero-arrow {
        width: 42px !important;
        height: 42px !important;
    }

    .hero-arrow.left {
        left: 12px !important;
    }

    .hero-arrow.right {
        right: 12px !important;
    }

    .hero-dots {
        bottom: 18px;
    }

    .hero-side {
        gap: 14px;
    }

    .emergency-box {
        border-radius: 22px;
        padding: 24px;
        display: grid;
        grid-template-columns: 58px 1fr;
        gap: 16px;
        align-items: center;
    }

    .phone-circle {
        width: 58px;
        height: 58px;
        font-size: 28px;
    }

    .emergency-title {
        font-size: 17px;
    }

    .emergency-number {
        font-size: 44px;
    }

    .emergency-text {
        font-size: 14px;
    }

    .stats-box {
        border-radius: 22px;
        padding: 22px;
    }

    .today-number {
        font-size: 38px;
    }

    .stats-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .quick-panel {
        grid-template-columns: 1fr !important;
        border-radius: 22px;
        margin-top: 14px;
    }

    .quick-panel a {
        min-height: 70px;
        padding: 16px;
        border-right: 0;
        border-bottom: 1px solid #e5edf7;
    }

    .quick-panel a:last-child {
        border-bottom: 0;
    }

    .quick-panel span {
        font-size: 28px;
    }

    .section {
        padding: 30px 0;
    }

    .section-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .section-head h2 {
        font-size: 25px;
        margin: 4px 0 0;
    }

    .service-grid,
    .news-grid,
    .leaders-grid,
    .gallery-grid,
    .video-grid,
    .contact-departments-grid,
    .latest-appeals-grid,
    .statistics-grid {
        grid-template-columns: 1fr !important;
        gap: 14px;
    }

    .service-card,
    .news-card,
    .leader-card,
    .gallery-album,
    .video-card,
    .vacancy-card,
    .latest-appeal-card,
    .stat-dashboard-card {
        border-radius: 20px;
    }

    .appeal-banner {
        border-radius: 22px;
        padding: 24px;
        flex-direction: column;
        align-items: flex-start;
    }

    .appeal-banner h2 {
        font-size: 25px;
    }

    .page {
        margin-top: 18px;
        margin-bottom: 18px;
        padding: 22px;
        border-radius: 22px;
    }

    .appeal-form,
    .search-form {
        max-width: 100%;
    }

    .search-form {
        flex-direction: column;
    }

    .public-appeal-number {
        font-size: 24px;
        padding: 14px 18px;
    }

    .footer-grid {
        grid-template-columns: 1fr !important;
    }

    .footer-logo-row {
        align-items: flex-start;
    }
}

/* Очень маленькие экраны */
@media (max-width: 390px) {
    .new-brand-title {
        font-size: 14px !important;
        max-width: 145px;
    }

    .new-brand-subtitle {
        font-size: 10px;
        max-width: 145px;
    }

    .hero-content h1 {
        font-size: 27px !important;
    }

    .hero-image-card {
        min-height: 390px;
    }
}
