/* ========================
   NAVBAR (MENU) STYLES
======================== */

.custom-navbar {
    background: var(--color-navbar-bg);
    box-shadow: 0 18px 40px rgba(3, 13, 32, 0.45);
    z-index: 1100;
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: min(1280px, calc(100% - 1rem));
    border: 1px solid rgba(129, 200, 255, 0.36);
    border-radius: 18px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.custom-navbar .container-fluid {
    padding: 0.24rem 0.68rem;
}

.custom-navbar .navbar-brand {
    font-weight: 700;
    color: var(--color-navbar-text);
}

.umx-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.umx-brand-logo {
    display: block;
    flex: 0 0 var(--umx-brand-logo-size, 39px);
    width: var(--umx-brand-logo-size, 39px);
    height: var(--umx-brand-logo-size, 39px);
    min-width: var(--umx-brand-logo-size, 39px);
    max-width: var(--umx-brand-logo-size, 39px);
    max-height: var(--umx-brand-logo-size, 39px);
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(33, 163, 241, 0.4));
    transition: transform 0.22s ease;
}

.umx-brand:hover .umx-brand-logo {
    transform: translateY(-1px) scale(1.04);
}

.umx-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.umx-brand-title {
    font-size: 1.10rem;
    letter-spacing: 0.02em;
    color: #f7fcff;
}

.umx-brand-subtitle {
    font-size: 0.41rem;
    font-weight: 500;
    opacity: 0.8;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.custom-navbar .nav-link {
    color: rgba(236, 247, 255, 0.88) !important;
    font-size: 0.89rem;
    font-weight: 500;
    padding: 0.45rem 0.56rem;
    border-radius: 10px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    position: relative;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.custom-navbar .nav-link:hover,
.custom-navbar .nav-link:focus {
    color: #ffffff !important;
    background: linear-gradient(145deg, rgba(37, 160, 239, 0.3), rgba(18, 100, 178, 0.35));
    transform: translateY(-1px);
}

.custom-navbar .nav-link.active {
    color: #ffffff !important;
    background: linear-gradient(145deg, rgba(43, 184, 255, 0.28), rgba(25, 122, 205, 0.35));
    box-shadow: inset 0 0 0 1px rgba(155, 223, 255, 0.35);
}

.special-cloud-link {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    font-weight: 600;
    color: #f8fdff !important;
    border-radius: 10px;
    margin-left: 0.25rem;
    background: linear-gradient(120deg, #1a85d7 0%, #1d9de2 45%, #1bc5c5 100%);
    background-size: 210% 210%;
    animation: none;
    box-shadow: 0 10px 24px rgba(18, 105, 179, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: transform 0.28s ease, box-shadow 0.28s ease, filter 0.28s ease, background 0.28s ease;
}

.special-cloud-link::before {
    content: '';
    position: absolute;
    inset: -45% -30%;
    background: linear-gradient(
        115deg,
        rgba(255, 255, 255, 0) 38%,
        rgba(236, 252, 255, 0.52) 48%,
        rgba(145, 239, 255, 0.4) 54%,
        rgba(255, 255, 255, 0) 66%
    );
    transform: translateX(-140%) rotate(8deg);
    opacity: 0;
    pointer-events: none;
}

.special-cloud-link:hover,
.special-cloud-link:focus-visible {
    background: linear-gradient(120deg, #1f92e5 0%, #22b2df 45%, #34d4bc 100%);
    box-shadow: 0 14px 32px rgba(18, 114, 186, 0.5), 0 0 0 1px rgba(178, 238, 255, 0.62), inset 0 1px 0 rgba(255, 255, 255, 0.24);
    filter: saturate(1.08) brightness(1.04);
    transform: translateY(-2px);
}

.special-cloud-link:hover::before,
.special-cloud-link:focus-visible::before {
    opacity: 1;
    animation: none;
    opacity: 0;
}

.special-cloud-link:active {
    transform: translateY(0);
}

.special-cloud-link i {
    margin-right: 5px;
}

@keyframes cloudGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes cloudSweep {
    from {
        transform: translateX(-140%) rotate(8deg);
    }
    to {
        transform: translateX(145%) rotate(8deg);
    }
}

.nav-item {
    position: relative;
}

.custom-navbar .navbar-nav > .nav-item {
    margin: 0 0.14rem;
}

.dropdown-menu {
    background: linear-gradient(175deg, rgba(4, 29, 65, 0.98), rgba(14, 71, 132, 0.96)) !important;
    border: 1px solid rgba(130, 209, 255, 0.25);
    box-shadow: 0 18px 35px rgba(2, 15, 37, 0.55);
    margin-top: 0;
    border-radius: 12px;
    padding: 0.35rem;
    min-width: 230px;
}

.dropdown-item {
    color: rgba(236, 247, 255, 0.9);
    border-radius: 8px;
    padding: 0.5rem 0.7rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.22s ease, color 0.22s ease, transform 0.22s ease;
}

.dropdown-item i {
    width: 16px;
    text-align: center;
    opacity: 0.9;
}

.dropdown-item:hover,
.dropdown-item:focus,
.dropdown-item.active {
    background: linear-gradient(145deg, rgba(41, 167, 255, 0.24), rgba(17, 105, 185, 0.24));
    color: #ffffff;
    transform: translateX(2px);
}

@media (max-width: 991px) {
    .custom-navbar {
        width: calc(100% - 0.6rem);
        top: 4px;
        border-radius: 14px;
    }

    .custom-navbar .container-fluid {
        padding: 0.32rem 0.65rem;
    }

    .custom-navbar .navbar-toggler {
        border: 1px solid rgba(190, 236, 255, 0.72);
        border-radius: 9px;
        padding: 0.38rem 0.55rem;
        background: linear-gradient(145deg, rgba(16, 96, 165, 0.55), rgba(22, 133, 194, 0.4));
    }

    .custom-navbar .navbar-toggler:focus {
        outline: none;
        box-shadow: 0 0 0 0.2rem rgba(49, 166, 239, 0.25);
    }

    .custom-navbar .navbar-toggler-icon {
        width: 1.28rem;
        height: 1.28rem;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(242,250,255,0.98)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.7' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }

    .custom-navbar .navbar-collapse {
        background: linear-gradient(160deg, rgba(7, 33, 67, 0.94), rgba(14, 69, 128, 0.9));
        border: 1px solid rgba(129, 200, 255, 0.24);
        border-radius: 12px;
        padding: 0.5rem;
        margin-top: 0.55rem;
        max-height: calc(100vh - var(--navbar-height) - 1rem);
        overflow-y: auto;
    }

    .custom-navbar .nav-link {
        width: 100%;
        justify-content: flex-start;
        margin-bottom: 0.22rem;
        min-height: 44px;
        font-size: 0.94rem;
    }

    .custom-navbar .navbar-nav > .nav-item {
        margin: 0;
    }

    .dropdown-menu {
        position: static !important;
        float: none;
        width: 100%;
        box-shadow: none;
        margin: 0.25rem 0 0.5rem;
    }

    .special-cloud-link {
        margin-left: 0;
        justify-content: center;
    }

    .umx-brand-title {
        font-size: 0.9rem;
    }

    .umx-brand-subtitle {
        font-size: 0.45rem;
        opacity: 0.72;
    }

    .umx-brand-logo {
        --umx-brand-logo-size: 30px;
    }
}

@media (max-width: 540px) {
    .custom-navbar .container-fluid {
        padding: 0.24rem 0.5rem;
    }

    .umx-brand-logo {
        --umx-brand-logo-size: 28px;
    }

    .umx-brand-title {
        font-size: 0.78rem;
    }
}

@media (max-width: 420px) {
    .custom-navbar {
        width: calc(100% - 0.32rem);
    }

    .custom-navbar .container-fluid {
        padding: 0.22rem 0.38rem;
    }

    .umx-brand-text {
        display: flex;
    }

    .umx-brand-logo {
        --umx-brand-logo-size: 26px;
    }

    .umx-brand-title {
        font-size: 0.82rem;
    }

    .umx-brand-subtitle {
        font-size: 0.38rem;
    }

    .custom-navbar .navbar-toggler {
        padding: 0.32rem 0.45rem;
    }
}

/* Shared navigation disclosure controls. */
.custom-navbar button.nav-link { border: 0; background: transparent; font-family: inherit; text-align: left; cursor: pointer; }
.custom-navbar .dropdown-menu.show { display: block; }
.custom-navbar a { text-decoration: none !important; }
.custom-navbar .nav-link[aria-current="page"] { background: #2b7da547; box-shadow: inset 0 0 0 1px #9bdfff59; }
@media (prefers-reduced-motion: reduce) {
    .custom-navbar *, .custom-navbar *::before { animation: none !important; transition: none !important; }
}
.custom-navbar .nav-link:focus-visible,
.custom-navbar .dropdown-item:focus-visible { outline: 2px solid #7bdcff; outline-offset: 2px; }
@media (max-width: 991px) {
    .custom-navbar .container-fluid { position: relative; }
    .custom-navbar .navbar-toggler { width: 44px; height: 44px; flex: 0 0 44px; }
    .custom-navbar .navbar-collapse {
        position: absolute; top: calc(100% + 10px); left: 0; right: 0;
        margin: 0; padding: 10px; border-radius: 16px;
        max-height: calc(100vh - var(--navbar-height) - 24px);
        max-height: calc(100dvh - var(--navbar-height) - 24px);
        overscroll-behavior: contain;
        box-shadow: 0 18px 36px rgba(0, 12, 30, .5);
        background: #0d2949;
    }
    .custom-navbar .navbar-collapse:not(.show) { display: none; }
    .custom-navbar .navbar-collapse.show { display: block; }
    .custom-navbar .navbar-nav { margin: 0; padding: 0; }
    .custom-navbar .nav-link { white-space: normal; min-height: 46px; padding: 10px 12px; font-size: 15px; }
    .custom-navbar .dropdown-toggle::after { margin-left: auto; }
    .custom-navbar .dropdown-toggle[aria-expanded="true"] { background: #19456a; }
    .custom-navbar .dropdown-menu { min-width: 0; padding: 4px; border: 0; background: #09213c !important; transform: none !important; }
    .custom-navbar .dropdown-item { white-space: normal; min-height: 44px; font-size: 14px; padding: 10px 12px; }
}
