@media (min-width: 768px) {
    .header {
        display: block;
    }
    .name {
        display: none;
    }
    .navbar {
        --bs-navbar-padding-y: 0;
    }
    .navbar-brand  {
        display: none;
    }
}
@media (max-width: 767px) {
    .navbar {
        font-size: 1.2em;
    }
    .header {
        display: none;
    }
    .name {
        display: block;
    }
    .navbar-header {
        background-color: #FFF;
    }
    .navbar-brand  {
        display: block;
    }
  
    .navbar .navbar-toggler {
        border-color: #FFF;
    }

    .navbar .navbar-collapse {
        width: 100%;
        margin-top: 8px;
    }

    .navbar .navbar-collapse .navbar-nav {
        border-top: 1px solid #FFF;
    }

    .navbar .navbar-collapse .dropdown-item {
        white-space: normal !important;
        word-wrap: break-word;
        /*text-align: center;*/
    }
    
    /* ОСНОВНОЙ ФИКС ДЛЯ ПУНКТОВ МЕНЮ */
    .navbar-nav .nav-link {
        white-space: normal !important;
        word-wrap: break-word !important;
        word-break: break-word !important;
        text-align: center !important;
        padding: 10px 35px 10px 15px !important;
        line-height: 1.4 !important;
        position: relative;
        width: 100%;
        display: block;
    }
    
    /* ОСОБЫЕ СТИЛИ ТОЛЬКО ДЛЯ DROPDOWN-ПУНКТОВ */
    .navbar-nav .dropdown > .dropdown-toggle {
        padding-right: 35px !important; /* Место для стрелочки */
        text-align: center;
    }
    
    /* СТРЕЛОЧКА ДЛЯ ВСЕХ DROPDOWN */
    .navbar-nav .dropdown-toggle::after {
        position: absolute !important;
        right: 15px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        margin: 0 !important;
        border-width: 0.35em !important;
    }
    
    /* ВЫРАВНИВАНИЕ ВСЕГО СПИСКА МЕНЮ */
    .navbar-nav {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
    }
    
    /* КАЖДЫЙ ЭЛЕМЕНТ МЕНЮ */
    .navbar-nav .nav-item {
        width: 100% !important;
        text-align: center !important;
    }
}

/* Для всех элементов */
* {
    font-family: sans-serif;
    line-height: 1.5;
}

/* Прижатие футера к низу */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

html {
    scrollbar-gutter: stable;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-y: auto;
}

main {
    flex: 1 0 auto;
}

footer {
    flex-shrink: 0;
}

thead, tbody, tfoot, tr, td, th {
    border-width: 1px;
    border-collapse: collapse;
    line-height: 1.5;
}

.navbar .nav-item a {
    line-height: 2;
    padding-right: var(--bs-navbar-nav-link-padding-x);
    padding-left: var(--bs-navbar-nav-link-padding-x);
    margin-right: 1px;
}

.navbar a {
    color: #FFF !important;
    white-space: nowrap;
}

.nav-link.dropdown-toggle.show {
    color: #FFF;
    cursor: pointer;
    text-decoration: none;
    background-color: #04549b;
}

.navbar .nav-item.dropdown .dropdown-menu {
    --bs-dropdown-padding-y: 0rem;
    --bs-dropdown-spacer: 0;
    min-width: 500px;
}

.navbar .nav-item.dropdown .dropdown-menu a {
    color: #000 !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    display: block !important;
    padding: 8px 15px;
    line-height: 1.3;
}

.navbar .nav-item.dropdown .dropdown-menu a:hover, 
.navbar .nav-item.dropdown .dropdown-menu a.active, 
.navbar .nav-item a:hover, 
.navbar .nav-item a.active {
    color: #FFF !important;
    background-color: #04549b;
}

.navbar .dropdown-divider {
    margin: 0;
}

.navbar .navbar-toggler {
    margin: 4px 0px;
}

.news-section > a.border-hover {
    border: 2px solid #000 !important;
}

.news-section > a.border-hover:hover {
    background-color: #FFF;
    border-color: #04549b !important;
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.5)!important;
}

.news-section > a.border-hover:hover > div > div > h4 {
    color: #04549b !important;
}

.gallery-thumb {
    transition: all 0.2s ease;
    border: 2px solid #999;
    cursor: pointer;
}

.gallery-thumb:hover {
    border-color: #04549b;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: rgba(0,0,0,0.5);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    background-size: 20px;
}

a[href$='.pdf'],
a[href$='.zip'],
a[href$='.doc'],
a[href$='.docx'] {
    padding: 5px 5px 5px 25px;
    background-repeat: no-repeat;
    background-position: left;
    background-size: 22px 22px;
}

a[href$='.pdf'] { background-image: url(../images/pdf.png); }
a[href$='.zip'] { background-image: url(../images/zip.png); }
a[href$='.doc'] { background-image: url(../images/doc.png); }
a[href$='.docx'] { background-image: url(../images/docx.png); }

a, a:visited {
    color: #04549b;
    cursor: pointer;
    padding: 5px;
    line-height: 1.5;
}

a:hover {
    color: #FFF;
    cursor: pointer;
    text-decoration: none;
    background-color: #04549b;
}

.crumb-inner {
    display: inline;
    margin-left: 5px;
}

/*header*/
.header > .row-fluid > .col-md-12 {
    color: #000; 
    margin-top: 10px; 
    text-align: center !important; 
    padding: 0;
}

.header > .row-fluid > .col-md-12 > a > .logo {
    vertical-align: top; 
    max-height: 100px; 
    margin: -5px 10px 5px 0px;
}


.header > .row-fluid > .col-md-12 > a:hover {
    color: #FFF;
    cursor: pointer;
    text-decoration: none;
    background-color: #FFF;
}

.header > .row-fluid > .col-md-12 > span {
    display: inline-block;
}

.header > .row-fluid > .col-md-12 > span > h4 {
    margin: 0px; 
    font-size: 14px;
}
.header > .row-fluid > .col-md-12 > span > h1 {
    font-size: 30px;
    font-weight: bold;
    margin: 5px 0px;
}

.header > .row-fluid > .col-md-12 > span > h5 {
    margin: 0px 0px 10px;
    font-size: 14px;
}

.vk > img {
    vertical-align: top; 
    max-height: 24px; 
    margin-top: -2px;
}

.vk:hover {
    color: #FFF;
    cursor: pointer;
    text-decoration: none;
    background-color: #FFF;
}

/*empty*/
.empty {
    display: none;
}

/*navbar logo*/
.logo768 {
    height: 50px;
    float: left;
    border: 2px solid #0066CC;
    border-radius: 4px;
}

.photo {
    max-width: 100%;
    overflow: hidden;
}

.photo.hide {
    display: none;
}

.photo img {
    width: 100%;
    height: auto;
    display: block;
}

a.tile-link {
    background-color: #04549b !important;
    transition: all 0.3s ease;
    min-height: 125px;
}

a.tile-link:hover {
    color: #04549b !important;
    background-color: #FFF !important;
    box-shadow: 0 0 0 3px #04549b, 0 5px 15px rgba(0, 0, 0, 0.5);
}

a.tile-link:hover h4 {
    color: #04549b !important;
}

.page-content figure.table,
.page-content > table {
    width: 100%;
    overflow-x: auto;
    display: block;
    margin-top: 0;
    margin-bottom: 1em;
}

.page-content figure.table table {
    /*min-width: 800px;*/
    width: 100%;
    margin-top: 0;
    margin-bottom: 1em;
}

.page-content figure.table td p {
    margin-bottom: 0.5rem;
    margin-top: 0.5rem;
}

@media (max-width: 768px) {
    .page-content figure.table table {
        /*min-width: 700px;*/
        font-size: 0.9em;
    }
    
    .page-content figure.table td,
    .page-content figure.table th {
        padding: 6px 8px;
    }
}

/* Для всех широких элементов в контенте */
.page-content {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.page-content img {
    max-width: 100%;
    height: auto;
}

.page-content figure.table table th, .page-content figure.table table td {
    text-align: center;
}

.features-section {
    margin-top: 1em;
}

/* Для подписи */
.pdf-signature-icon {
    color: #28a745; /* зеленый */
    font-weight: bold;
    cursor: help;
    margin-left: 5px;
    display: inline-block;
}
.pdf-signature-icon:hover {
    opacity: 0.8;
    text-decoration: none;
}
#js-show-iframe-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    background: linear-gradient(138.4deg,#38bafe 26.49%,#2d73bc 79.45%);
    color: #fff;
    cursor: pointer;
}

#js-show-iframe-wrapper .pos-banner-fluid * {
    box-sizing: border-box;
}

#js-show-iframe-wrapper .pos-banner-fluid .pos-banner-btn_2 {
    display: block;
    width: 240px;
    min-height: 56px;
    font-size: 18px;
    line-height: 24px;
    cursor: pointer;
    background: #0d4cd3;
    color: #fff;
    border: none;
    border-radius: 8px;
    outline: 0;
}

#js-show-iframe-wrapper .pos-banner-fluid .pos-banner-btn_2:hover {
    background: #1d5deb;
}
#js-show-iframe-wrapper .pos-banner-fluid .pos-banner-btn_2:focus,
#js-show-iframe-wrapper .pos-banner-fluid .pos-banner-btn_2:active {
    background: #2a63ad;
}

/* Анимации */
@-webkit-keyframes fadeInFromNone {
    0% { display: none; opacity: 0; }
    1% { display: block; opacity: 0; }
    100% { display: block; opacity: 1; }
}
@keyframes fadeInFromNone {
    0% { display: none; opacity: 0; }
    1% { display: block; opacity: 0; }
    100% { display: block; opacity: 1; }
}

/* Шрифты (оставьте только нужные) */
@font-face {
    font-family: LatoWeb;
    src: url(https://pos.gosuslugi.ru/bin/fonts/Lato/fonts/Lato-Regular.woff2) format("woff2"),
         url(https://pos.gosuslugi.ru/bin/fonts/Lato/fonts/Lato-Regular.woff) format("woff");
    font-weight: 400;
}
@font-face {
    font-family: LatoWebBold;
    src: url(https://pos.gosuslugi.ru/bin/fonts/Lato/fonts/Lato-Bold.woff2) format("woff2"),
         url(https://pos.gosuslugi.ru/bin/fonts/Lato/fonts/Lato-Bold.woff) format("woff");
    font-weight: 700;
}

/* Баннер */
#js-show-iframe-wrapper .bf-160 {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 90px;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #0d4cd3;
    border-radius: 4px;
    display: flex;
    align-items: center;
    padding: 12px;
}

#js-show-iframe-wrapper .bf-160__content {
    width: 100%;
    height: auto;
    margin: 0;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

#js-show-iframe-wrapper .bf-160__logo-wrap {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

#js-show-iframe-wrapper .bf-160__logo {
    width: 61.01px;
    height: 16.28px;
}

#js-show-iframe-wrapper .bf-160__logo2 {
    width: 41px;
    height: 40px;
    flex-shrink: 0;
}

#js-show-iframe-wrapper .bf-160__text {
    color: #0b40b3;
    font-family: LatoWeb, sans-serif;
    font-weight: 700;
    font-size: 13.08px;
    line-height: 1.3;
}

#js-show-iframe-wrapper .bf-160__description {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex: 1;
}

/* Мобильные устройства */
@media (max-width: 480px) {
    #js-show-iframe-wrapper .bf-160__content {
        flex-direction: column;
        text-align: center;
    }
    #js-show-iframe-wrapper .bf-160__description {
        width: 100%;
    }
}

.navbar-nav {
    flex-wrap: wrap;
}

/* Немного уменьшаем отступы для компактности */
.navbar-nav .nav-link {
    padding: 0.5rem 0.75rem;
}