* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #2d5ba1;
    --a11y-font-size: 18px;
    --a11y-letter-spacing: 0;
    font-size: 16px;
}

.header {
    background-color: #ffffff;
    padding: 15px 30px;
    border-bottom: 2px solid #2c5aa0;
    position: sticky;
    top: 0;
    z-index: 9999;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    max-width: 1600px;
    margin: 0 auto;
    position: relative;
}

.header-logo {
    height: 80px;
    width: auto;
    flex-shrink: 0;
}

.site-title {
    font-size: 26px;
    font-weight: 600;
    color: #000000;
    text-align: left;
    flex: 1;
    word-wrap: break-word;
}

.content-link1 {
    position: absolute;
    right: 0;
    padding: 12px 28px;
    background-color: #2c5aa0;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 20px;
    transition: background-color 0.3s;
    flex-shrink: 0;
    font-weight: 600;
}

.content-link1:hover {
    background-color: #1e3d6f;
}

.nav-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 15px 20px;
    background: #2c5aa0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    cursor: pointer;
    transition: background 0.3s;
    position: relative;
}

.nav-row.active {
    background: rgba(255, 255, 255, 0.15);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 12px;
    color: white;
    cursor: default;
    border-radius: 8px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.nav-item.active {
    background-color: rgba(255, 255, 255, 0.25);
}

.main-nav {
    display: flex;
    flex-direction: column;
    background-color: #2c5aa0;
    border-bottom: 2px solid rgba(255,255,255,0.3);
    position: relative;
}

.nav-icon {
    width: 40px;
    height: 40px;
    filter: brightness(0) invert(1);
}

.nav-text {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.main-content {
    flex: 1;
    background-color: #2c5aa0;
    position: relative;
    overflow: hidden;
    padding: 30px 35px;
}

.columns-wrapper {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 25px;
    max-width: 1600px;
    margin: 0 auto;
    align-items: start;
}

.column {
    display: flex;
    flex-direction: column; 
    gap: 15px;
    opacity: 0.75;
    transition: opacity 0.3s;
}

.column.active {
    opacity: 1;
}

.columns-wrapper.single-mode .column {
    display: none;
}

.columns-wrapper.single-mode .column.active {
    display: flex;
}

.content-link {
    color: white;
    text-decoration: none;
    font-size: 22px;
    padding: 15px 18px;
    border-radius: 8px;
    transition: background-color 0.3s;
    line-height: 1.5;
    text-align: left;
    font-weight: 600;
    display: block;
    min-height: 50px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.content-link:hover {
    background-color: rgba(255, 255, 255, 0.25);
}

.background-emblem {
    position: fixed;
    right: 8%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
}

.bg-img {
    width: 450px;
    height: auto;
    display: block;
}

.footer {
    background-color: #1a2a3a;
    padding: 30px 35px;
    position: relative;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 35px;
    max-width: 1600px;
    margin: 0 auto;
}

.footer-left {
    flex-shrink: 0;
}

.footer-emblem {
    height: 90px;
    width: 90px;
    filter: brightness(0) invert(1);
    display: block;
}

.footer-center {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 20px;
}

.footer-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 14px 20px;
    border-radius: 12px;
    transition: background-color 0.3s;
    flex: 0 0 calc(25% - 15px);
    max-width: calc(25% - 15px);
    min-width: 240px;
    height: 100px;
    overflow: hidden;
}

.footer-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.footer-link-img {
    width: 170px;
    height: 170px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 5px;
}

.footer-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.footer-link span {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.footer-help {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 9998;
}

.help-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.5);
    background: rgba(44, 90, 160, 0.9);
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.help-btn:hover {
    background: rgba(44, 90, 160, 1);
    border-color: rgba(255,255,255,0.8);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.help-tooltip {
    position: absolute;
    bottom: 60px;
    right: 0;
    transform: scale(0.95);
    background: #fff;
    color: #000;
    padding: 12px 18px;
    border-radius: 10px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    z-index: 9999;
}

.help-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 15px;
    border: 8px solid transparent;
    border-top-color: #fff;
}

.help-tooltip.show {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.help-link {
    color: #2c5aa0;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.2s;
}

.help-link:hover {
    color: #1e3d6f;
    text-decoration: underline;
}

.row-number {
    position: absolute;
    top: 4px;
    left: 8px;
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(0,0,0,0.2);
    line-height: 1;
    z-index: 10;
    pointer-events: auto;
    font-family: monospace;
    font-weight: 700;
}

.row-number:hover,
.row-number.active {
    color: #bdbdbd;
    background: rgba(0,0,0,0.4);
}

@media (max-width: 1200px) {
    .main-nav {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .columns-wrapper {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .nav-text {
        font-size: 18px;
    }
    
    .content-link {
        font-size: 20px;
    }
    
    .site-title {
        font-size: 24px;
    }
    
    .background-emblem {
        right: 5%;
        top: 45%;
    }
    
    .bg-img {
        width: 350px;
    }
    
    .footer-link {
        flex: 0 0 calc(33.333% - 14px);
        max-width: calc(33.333% - 14px);
    }
}

@media (max-width: 900px) {
    .main-nav {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .columns-wrapper {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .content-link {
        font-size: 22px;
        padding: 16px 20px;
        min-height: 55px;
    }
    
    .nav-text {
        font-size: 18px;
    }
    
    .background-emblem {
        display: none;
    }
    
    .footer-link {
        flex: 0 0 calc(50% - 10px);
        max-width: calc(50% - 10px);
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .header-logo {
        height: 70px;
    }
    
    .site-title {
        font-size: 22px;
    }
    
    .content-link1 {
        position: static;
        margin-top: 15px;
        font-size: 20px;
        padding: 14px 32px;
    }
    
    .main-nav {
        grid-template-columns: 1fr;
    }
    
    .columns-wrapper {
        grid-template-columns: 1fr;
    }
    
    .footer-inner {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .footer-left {
        order: 1;
    }
    
    .footer-center {
        order: 2;
        width: 100%;
    }
    
    .footer-link {
        flex: 0 0 100%;
        max-width: 100%;
        width: 100%;
        height: 80px;
    }
    
    .footer-link span {
        font-size: 14px;
    }
    
    .nav-text {
        font-size: 20px;
    }
    
    .content-link {
        font-size: 22px;
        padding: 16px 20px;
    }
    
    .background-emblem {
        display: none;
    }
    
    .footer-help {
        bottom: 15px;
        right: 15px;
    }
    
    .help-btn {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}

.content-link:focus,
.nav-item:focus,
.footer-link:focus,
.content-link1:focus {
    outline: 4px solid #DADBDD;
    outline-offset: 3px;
}

@media (prefers-contrast: high) {
    .content-link {
        font-weight: 700;
        text-decoration: underline;
        border: 2px solid rgba(255,255,255,0.5);
    }
    
    .content-link:hover {
        background-color: rgba(255, 255, 255, 0.35);
        border: 2px solid white;
    }
    
    .nav-text,
    .footer-link span {
        font-weight: 700;
    }
}

.is-hidden {
    display: none !important;
}

.a11y-mode {
    font-size: var(--a11y-font-size);
}

.a11y-mode .site-title {
    font-size: calc(var(--a11y-font-size) * 1.45) !important;
}

.a11y-mode .nav-text {
    font-size: calc(var(--a11y-font-size) * 1.1) !important;
}

.a11y-mode .content-link,
.a11y-mode .content-link1 {
    font-size: var(--a11y-font-size) !important;
}

.a11y-mode .footer-link span {
    font-size: calc(var(--a11y-font-size) * 1.1) !important;
}

.a11y-mode p,
.a11y-mode span:not(.nav-text):not(.footer-link span),
.a11y-mode div:not(.a11y-panel__group),
.a11y-mode a:not(.content-link):not(.content-link1) {
    font-size: var(--a11y-font-size) !important;
}

.a11y-panel,
.a11y-panel *,
.lang-modal,
.lang-modal * {
    font-size: initial !important;
}

.a11y-mode {
    letter-spacing: var(--a11y-letter-spacing);
}

.a11y-mode .site-title,
.a11y-mode .nav-text,
.a11y-mode .content-link,
.a11y-mode .content-link1,
.a11y-mode .footer-link span {
    letter-spacing: var(--a11y-letter-spacing);
}

.a11y-hide-images img,
.a11y-hide-images .background-emblem {
    visibility: hidden !important;
}

body[data-a11y-theme="light"] {
    background: #ffffff;
    color: #000000;
}

body[data-a11y-theme="light"] .header,
body[data-a11y-theme="light"] .main-nav,
body[data-a11y-theme="light"] .main-content,
body[data-a11y-theme="light"] .footer {
    background: #ffffff;
    color: #000000;
}

body[data-a11y-theme="light"] .site-title,
body[data-a11y-theme="light"] .nav-text,
body[data-a11y-theme="light"] .content-link,
body[data-a11y-theme="light"] .footer-link,
body[data-a11y-theme="light"] .footer-link span {
    color: #000000;
    text-shadow: none;
}

body[data-a11y-theme="light"] .nav-icon,
body[data-a11y-theme="light"] .footer-emblem {
    filter: none;
}

body[data-a11y-theme="light"] .content-link1,
body[data-a11y-theme="light"] .footer-link,
body[data-a11y-theme="light"] .nav-item:hover,
body[data-a11y-theme="light"] .nav-item.active,
body[data-a11y-theme="light"] .content-link:hover {
    background: #f1f1f1;
    color: #000000;
}

body[data-a11y-theme="dark"] {
    background: #000000;
    color: #ffffff;
}

body[data-a11y-theme="dark"] .header,
body[data-a11y-theme="dark"] .main-nav,
body[data-a11y-theme="dark"] .main-content,
body[data-a11y-theme="dark"] .footer {
    background: #000000;
    color: #ffffff;
}

body[data-a11y-theme="dark"] .site-title,
body[data-a11y-theme="dark"] .nav-text,
body[data-a11y-theme="dark"] .content-link,
body[data-a11y-theme="dark"] .footer-link,
body[data-a11y-theme="dark"] .footer-link span,
body[data-a11y-theme="dark"] .content-link1 {
    color: #ffffff;
    text-shadow: none;
}

body[data-a11y-theme="dark"] .nav-icon,
body[data-a11y-theme="dark"] .footer-emblem,
body[data-a11y-theme="dark"] .header-logo,
body[data-a11y-theme="dark"] .footer-img {
    filter: grayscale(1) brightness(1.2);
}

body[data-a11y-theme="dark"] .content-link1,
body[data-a11y-theme="dark"] .footer-link,
body[data-a11y-theme="dark"] .nav-item:hover,
body[data-a11y-theme="dark"] .nav-item.active,
body[data-a11y-theme="dark"] .content-link:hover {
    background: #111111;
    border-color: #ffffff;
}

body[data-a11y-theme="blue"] {
    background: #9dd1ff;
    color: #063462;
}

body[data-a11y-theme="blue"] .header,
body[data-a11y-theme="blue"] .main-nav,
body[data-a11y-theme="blue"] .main-content,
body[data-a11y-theme="blue"] .footer {
    background: #9dd1ff;
    color: #063462;
}

body[data-a11y-theme="blue"] .site-title,
body[data-a11y-theme="blue"] .nav-text,
body[data-a11y-theme="blue"] .content-link,
body[data-a11y-theme="blue"] .footer-link,
body[data-a11y-theme="blue"] .footer-link span,
body[data-a11y-theme="blue"] .content-link1 {
    color: #063462;
    text-shadow: none;
}

body[data-a11y-theme="blue"] .content-link1,
body[data-a11y-theme="blue"] .footer-link,
body[data-a11y-theme="blue"] .nav-item:hover,
body[data-a11y-theme="blue"] .nav-item.active,
body[data-a11y-theme="blue"] .content-link:hover {
    background: rgba(255, 255, 255, 0.5);
}

.a11y-panel-open {
    padding-top: 64px;
}

.a11y-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10002;
    background: #efefef;
    border-bottom: 1px solid #d0d0d0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.a11y-panel__inner {
    min-height: 64px;
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 10px 14px;
    flex-wrap: wrap;
}

.a11y-panel__group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.a11y-panel__label {
    font-size: 15px;
    font-weight: 600;
    color: #1b1b1b;
}

.a11y-range {
    width: 110px;
}

.a11y-text-btn,
.a11y-kern-btn,
.a11y-panel__close {
    min-width: 36px;
    height: 36px;
    border: 1px solid #bdbdbd;
    background: #ffffff;
    color: #111111;
    cursor: pointer;
    font-family: Georgia, 'Times New Roman', serif;
}

.a11y-text-btn {
    font-size: 24px;
    line-height: 1;
}

.a11y-text-btn--large {
    font-size: 38px;
}

.a11y-color-btn {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.35);
    border: 2px solid #1f1f1f;
    cursor: pointer;
}

.a11y-color-btn--light {
    background: #ffffff;
}

.a11y-color-btn--dark {
    background: #000000;
}

.a11y-color-btn--blue {
    background: #8ec9ff;
}

.a11y-radio {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 15px;
    color: #1b1b1b;
}

.a11y-kern-btn {
    font-size: 22px;
    padding: 0 6px;
}

.a11y-kern-btn.is-active,
.a11y-color-btn.is-active,
.a11y-text-btn.is-active {
    outline: 3px solid #2c5aa0;
    outline-offset: 1px;
}

.a11y-panel__close {
    margin-left: auto;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
}

.a11y-toolbar {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 190px;
    z-index: 10001;
    display: flex;
    gap: 12px;
    align-items: center;
    overflow: visible;
    flex-wrap: nowrap;
}

.a11y-icon-button {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    padding: 0;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
}

.a11y-icon-button img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.a11y-icon-button:focus {
    outline: 4px solid #bdbdbd;
    outline-offset: 3px;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    padding: 20px;
}

.lang-modal {
    width: 100%;
    max-width: 360px;
    background: #ffffff;
    border-radius: 16px;
    padding: 18px 20px;
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.35);
}

.lang-modal__title {
    color: #0a2f6c;
    font-weight: 800;
    font-size: 16px;
    margin-bottom: 14px;
}

.lang-modal__buttons {
    display: flex;
    gap: 12px;
}

.lang-btn {
    flex: 1;
    border: 1px solid rgba(10, 47, 108, 0.25);
    border-radius: 12px;
    padding: 10px 12px;
    background: #0a2f6c;
    color: #ffffff;
    cursor: pointer;
    font-weight: 800;
    transition: background-color 0.2s ease, transform 0.05s ease;
}

.lang-btn:hover {
    background: #1565c0;
}

.lang-btn:active {
    transform: translateY(1px);
}

@media (max-width: 700px) {
    .a11y-toolbar {
        gap: 10px;
    }

    .a11y-icon-button {
        width: 42px;
        height: 42px;
    }

    .a11y-icon-button img {
        width: 22px;
        height: 22px;
    }

    .a11y-panel__inner {
        gap: 12px;
    }

    .a11y-panel__close {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .a11y-toolbar {
        right: 16px;
        top: 50%;
    }
}

.a11y-mode {
    font-size: var(--a11y-font-size, 18px);
}

.a11y-mode * {
    font-size: inherit;
}

.a11y-mode .a11y-panel,
.a11y-mode .a11y-panel *,
.a11y-mode .lang-modal,
.a11y-mode .lang-modal *,
.a11y-mode .a11y-toolbar,
.a11y-mode .a11y-toolbar * {
    font-size: initial !important;
}

.a11y-mode .site-title {
    font-size: 1.4em !important;
}

.a11y-mode .nav-text {
    font-size: 1.1em !important;
}

.a11y-mode .footer-link span {
    font-size: 1em !important;
}

.a11y-mode {
    letter-spacing: var(--a11y-letter-spacing);
}

.a11y-mode * {
    letter-spacing: inherit;
}

.nav-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 15px 20px;
    background: #2c5aa0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    cursor: pointer;
    transition: background 0.3s;
    position: relative;
}
.nav-row.active {
    background: rgba(255, 255, 255, 0.15);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 12px;
    color: white;
    cursor: default;
    border-radius: 8px;
    text-align: center;
    position: relative;
    z-index: 1;
    transition: background-color 0.3s;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.nav-item.active {
    background-color: rgba(0, 110, 253, 0.25);
}

.main-nav {
    display: flex;
    flex-direction: column;
    background-color: #2c5aa0;
    border-bottom: 2px solid rgba(255,255,255,0.3);
    position: relative;
}

.nav-icon {
    width: 40px;
    height: 40px;
    filter: brightness(0) invert(1);
}

.nav-text {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}