:root {
    --blue-main: #3f7ec5;
    --blue-deep: #2f4d73;
    --yellow: #f9c318;
}

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

.home-header {
    padding: 22px 0 20px;
}

.home-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.home-logo {
    display: inline-flex;
    align-items: center;
}

.home-logo img {
    display: block;
    width: auto;
    max-width: 258px;
    height: auto;
    max-height: 81px;
    object-fit: contain;
}

.home-logo__text {
    font: 800 39px/1 "Poppins", sans-serif;
    letter-spacing: 0.04em;
    color: var(--blue-main);
}

.home-menu-toggle {
    display: none;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid #c9d6e4;
    border-radius: 14px;
    background: #ffffff;
    color: #17304f;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex-direction: column;
    cursor: pointer;
}

.home-menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.home-menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.home-menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.home-menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.home-nav ul {
    display: flex;
    align-items: center;
    gap: 14px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.home-nav li {
    position: relative;
}

.home-nav li a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 16px;
    border-radius: 999px;
    background: transparent;
    color: #1f2430;
    text-decoration: none;
    font: 300 14px/1 "Poppins", sans-serif;
    position: relative;
    transition: color 0.25s ease;
}

.home-nav li a::after {
    content: "";
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 6px;
    height: 2px;
    border-radius: 999px;
    background: #3f7dc5;
    pointer-events: none;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.22s ease;
}

.home-nav li a:hover::after,
.home-nav li a:focus-visible::after,
.home-nav li.has-sublinks:hover > a::after,
.home-nav li.has-sublinks:focus-within > a::after {
    transform: scaleX(1);
}

.home-nav__heading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 16px;
    color: #1f2430;
    text-decoration: none;
    font: 700 14px/1 "Poppins", sans-serif;
    cursor: default;
}

.home-subnav {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    min-width: 220px;
    width: max-content;
    max-width: 320px;
    margin: 0;
    padding: 12px;
    list-style: none;
    background: #ffffff;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 8px);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
    z-index: 20;
}

.home-nav li.has-sublinks:hover > .home-subnav,
.home-nav li.has-sublinks:focus-within > .home-subnav {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.home-subnav li a {
    display: inline-flex;
    align-items: center;
    min-height: auto;
    padding: 7px 6px 11px;
    border-radius: 0;
    white-space: nowrap;
    position: relative;
}

.home-subnav li a::after {
    display: none;
}

.home-subnav li a::before {
    content: "";
    position: absolute;
    left: 6px;
    right: 6px;
    bottom: 5px;
    height: 2px;
    background: #3f7dc5;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.22s ease;
}

.home-subnav li a:hover::before,
.home-subnav li a:focus-visible::before {
    transform: scaleX(1);
}

.home-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    min-width: 62px;
    border-radius: 999px;
    text-decoration: none;
    color: #ffffff;
    font: 600 12px/1 "Poppins", sans-serif;
    background: linear-gradient(135deg, #4a93e2, #2b6cb6);
}

.home-auth {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.home-panel-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 14px;
    border-radius: 999px;
    background: #eef3f8;
    color: #17304f;
    text-decoration: none;
    font: 600 11px/1 "Poppins", sans-serif;
}

.home-panel-link:hover,
.home-panel-link:focus-visible {
    background: #f9c318;
    color: #17304f;
}

.site-messages {
    display: grid;
    gap: 12px;
    margin: 0 auto 20px;
}

.site-message {
    padding: 14px 18px;
    border-radius: 18px;
    font: 500 14px/1.5 "Poppins", sans-serif;
    color: #1d2735;
    background: #edf5ff;
    border: 1px solid rgba(63, 126, 197, 0.22);
}

.site-message--success {
    background: #edf9f0;
    border-color: rgba(34, 139, 83, 0.22);
}

.site-message--error,
.site-message--warning {
    background: #fff5eb;
    border-color: rgba(201, 117, 36, 0.22);
}

.home-footer {
    padding: 56px 0 52px;
    background: var(--footer-bg-color, var(--blue-deep));
    color: var(--footer-text-color, #e7edf9);
}

.home-footer__grid {
    display: grid;
    grid-template-columns: 1.35fr repeat(3, 1fr);
    gap: 28px;
}

.home-footer img {
    max-width: 180px;
    max-height: 56px;
    height: auto;
    width: auto;
    object-fit: contain;
    display: block;
}

.home-footer__logo-svg {
    display: block;
    width: auto;
    height: 56px;
    max-width: 180px;
    max-height: 56px;
    color: var(--footer-logo-color, var(--footer-text-color, #e7edf9));
}

.home-footer h3 {
    margin: 0;
    color: var(--footer-text-color, #ffffff);
    font: 400 18.7px/1.2 "Poppins", sans-serif;
}

.home-footer p,
.home-footer li,
.home-footer a {
    color: var(--footer-text-color, #e7edf9);
    text-decoration: none;
    font: 200 15.3px/1.65 "Poppins", sans-serif;
}

.home-footer__buttons {
    display: grid;
    gap: 10px;
}

.home-footer__button {
    display: inline;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    transition: color 0.2s ease;
}

.home-footer__button:hover,
.home-footer__button:focus-visible {
    color: #1f3552;
}

.home-footer__brand p {
    margin-top: 14px;
}

.home-footer ul {
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
}

@media (max-width: 1180px) {
    .home-footer__grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }

    .home-footer__brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 900px) {
    .home-header__inner {
        flex-wrap: wrap;
        align-items: center;
    }

    .home-menu-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .home-auth {
        align-items: flex-end;
        margin-left: 0;
        width: 100%;
    }

    .home-nav {
        order: 4;
        width: 100%;
        padding-top: 6px;
    }

    .home-nav[hidden] {
        display: none;
    }

    .home-nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        padding: 12px;
        border-radius: 16px;
        background: #ffffff;
        box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
    }

    .home-nav li,
    .home-nav li a {
        width: 100%;
    }

    .home-nav li a {
        justify-content: flex-start;
        min-height: 36px;
        padding: 0 12px;
        background: transparent;
        font-size: 13px;
    }

    .home-nav__heading {
        width: 100%;
        justify-content: flex-start;
        min-height: 36px;
        padding: 0 12px;
        font-size: 13px;
    }

    .home-subnav {
        position: static;
        min-width: 0;
        width: 100%;
        max-width: none;
        padding: 4px 0 0 12px;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: transparent;
    }

    .home-nav li.has-sublinks:hover > .home-subnav,
    .home-nav li.has-sublinks:focus-within > .home-subnav {
        transform: none;
    }

    .home-subnav li a {
        min-height: 30px;
        padding: 4px 0;
    }

    .home-subnav li a::before {
        left: 0;
        right: auto;
        width: 24px;
        bottom: 3px;
    }

    .home-footer__grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .container {
        width: calc(100% - 28px);
    }

    .home-logo img {
        max-height: 76px;
    }
}
