body {
    overflow-x: hidden;
}

.ems-nav-links {
    flex: 1;
}

.ems-menu-toggle,
.ems-mobile-menu-header,
.ems-mobile-menu-footer,
.ems-mobile-menu-close {
    display: none;
}

@media (max-width: 1000px) {
    .ems-header-inner {
        padding-right: 15px;
        padding-left: 15px;
    }

    .ems-navigation {
        position: relative;
        justify-content: flex-end;
        gap: 0;
    }

    .ems-navigation .ems-nav-links {
        display: none;
    }

    .ems-login-button {
        margin-left: 0;
    }

    .ems-menu-toggle {
        width: 42px;
        height: 42px;
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 42px;
        border: 1px solid rgba(255,255,255,.35);
        border-radius: 12px;
        background: rgba(255,255,255,.12);
        color: #fff;
        cursor: pointer;
    }

    .ems-menu-toggle svg {
        width: 22px;
        height: 22px;
    }

    .ems-navigation.is-open .ems-nav-links {
        position: absolute;
        top: calc(100% + 12px);
        right: 0;
        z-index: 110;
        width: min(250px, calc(100vw - 24px));
        padding: 8px;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 3px;
        border: 1px solid rgba(255,255,255,.18);
        border-radius: 14px;
        background: #10498f;
        box-shadow: 0 14px 30px rgba(8,42,88,.25);
    }

    .ems-navigation.is-open .ems-nav-link {
        height: 42px;
        justify-content: flex-start;
        padding: 0 14px;
    }

    .ems-navigation.is-open .ems-login-button {
        width: 100%;
        height: 42px;
        margin: 4px 0 0;
        border-radius: 10px;
    }
}

@media (max-width: 500px) {
    body.ems-menu-open {
        overflow: hidden;
    }

    .ems-navigation.is-open .ems-nav-links {
        position: fixed;
        inset: 0;
        z-index: 120;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        max-height: none;
        padding: max(24px, env(safe-area-inset-top)) 24px max(22px, env(safe-area-inset-bottom));
        overflow-y: auto;
        gap: 8px;
        border: 0;
        border-radius: 0;
        background: linear-gradient(180deg, #062958 0%, #073a7d 62%, #031d45 100%);
        box-shadow: none;
    }

    .ems-mobile-menu-header {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 18px;
        color: #fff;
    }

    .ems-mobile-menu-logo {
        width: 42px;
        height: 42px;
        flex: 0 0 42px;
        overflow: hidden;
        border: 2px solid rgba(255,255,255,.75);
        border-radius: 50%;
        background: #fff;
    }

    .ems-mobile-menu-logo img {
        width: 100%;
        height: 100%;
        display: block;
        object-fit: cover;
    }

    .ems-mobile-menu-brand {
        display: flex;
        flex: 1;
        flex-direction: column;
        gap: 3px;
        min-width: 0;
    }

    .ems-mobile-menu-brand strong {
        color: #f7fbff;
        font-size: .98rem;
        font-weight: 800;
        line-height: 1.1;
        text-shadow: 0 1px 10px rgba(80,170,255,.7);
    }

    .ems-mobile-menu-brand span {
        color: #c3d9f4;
        font-size: .61rem;
        font-weight: 600;
        line-height: 1.3;
    }

    .ems-mobile-menu-close {
        width: 38px;
        height: 38px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 38px;
        border: 0;
        border-radius: 50%;
        background: transparent;
        color: #fff;
        font-size: 1.5rem;
        cursor: pointer;
    }

    .ems-navigation.is-open .ems-nav-link {
        height: 46px;
        flex: 0 0 46px;
        padding: 0 12px;
        border-radius: 11px;
        color: #f4f8ff;
        font-size: .88rem;
    }

    .ems-navigation.is-open .ems-nav-link.active {
        height: 46px;
        background: linear-gradient(110deg, #1762a8, #145295);
        box-shadow: inset 0 0 0 1px rgba(155,204,255,.15);
    }

    .ems-navigation.is-open .ems-login-button {
        height: 46px;
        flex: 0 0 46px;
        margin: 8px 0 0;
        border: 1px solid #60a8ff;
        border-radius: 999px;
        background: linear-gradient(110deg, #0750b8, #1268d2);
        color: #fff;
        box-shadow: 0 8px 18px rgba(0,0,0,.15);
    }

    .ems-mobile-menu-footer {
        position: relative;
        flex: 0 0 clamp(170px, 38vh, 260px);
        min-height: 0;
        margin: auto -24px calc(-1 * max(22px, env(safe-area-inset-bottom)));
        padding: 0 20px 18px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-end;
        overflow: hidden;
        background: #031d45;
        color: #e4efff;
        text-align: center;
    }

    .ems-mobile-menu-footer::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: 1;
        background: linear-gradient(180deg, #031d45 0%, rgba(3,29,69,.82) 34%, rgba(3,29,69,.34) 68%, rgba(3,29,69,.08) 100%);
        pointer-events: none;
    }

    .ems-mobile-menu-footer img {
        position: absolute;
        inset: 0;
        z-index: 0;
        width: 100%;
        height: 100%;
        display: block;
        object-fit: cover;
        object-position: center 58%;
        filter: brightness(.76) saturate(.85);
        -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.12) 24%, rgba(0,0,0,.72) 62%, #000 78%);
        mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.12) 24%, rgba(0,0,0,.72) 62%, #000 78%);
    }

    .ems-mobile-menu-footer span {
        position: relative;
        z-index: 2;
        color: #fff;
        text-shadow: 0 1px 4px rgba(0,0,0,.65);
    }

    .ems-mobile-menu-footer .ems-mobile-menu-system {
        font-size: .8rem;
        font-weight: 800;
    }

    .ems-mobile-menu-footer .ems-mobile-menu-subtitle,
    .ems-mobile-menu-footer .ems-mobile-menu-tagline {
        font-size: .6rem;
        font-weight: 600;
    }

    .ems-mobile-menu-footer .ems-mobile-menu-subtitle {
        color: #d4e5f8;
    }

    .ems-mobile-menu-footer .ems-mobile-menu-tagline {
        margin-top: 3px;
    }

    .page-banner {
        padding: 2rem 1rem 1.75rem;
    }

    .page-banner-inner h1 {
        font-size: clamp(1.7rem, 7vw, 2rem);
    }

    .page-banner-inner p {
        font-size: .84rem;
    }

    .content-wrap {
        padding-right: 1rem;
        padding-left: 1rem;
    }

    .footer-banner-inner {
        padding: 1.25rem 1rem;
        gap: 1rem;
    }

    .footer-contact {
        align-items: flex-start;
        flex-direction: column;
        gap: .65rem;
    }

    .footer-contact-row {
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .75rem;
    }

    .feature-card {
        padding: 1rem .85rem;
        border-radius: .8rem;
    }

    .feature-card h3 {
        font-size: .9rem;
    }

    .feature-card p {
        font-size: .78rem;
    }

    .feature-icon {
        width: 44px;
        height: 44px;
        margin-bottom: .75rem;
    }

    .contact-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .form-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .panel {
        min-width: 0;
        padding: 1.15rem;
    }

    .split-row,
    .split-row.reverse {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.5rem;
    }

    .split-row.reverse .split-text,
    .split-row.reverse .split-visual {
        order: initial;
    }

    .value-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .75rem;
    }

    .value-card {
        min-width: 0;
        padding: 1rem .85rem;
    }
}
