/* =========================
   NAVBAR BASE
========================= */

body.menu-open {
    overflow: hidden;
}

/* =========================
   MAIN NAVBAR
========================= */

.navbar {
    position: sticky;
    top: 0;
    background: #ffffff;
    padding: 0.6rem 2rem;
    border-bottom: 1px solid #e6eef4;
    z-index: 999;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: nowrap;
}

/* =========================
   BRAND
========================= */

.nav-left {
    font-size: 1.125rem;
    font-weight: bold;
    color: #0b2b40;
    flex-shrink: 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 0.3px;
    animation: fadeSlide 0.5s ease;
}

.brand-main {
    color: #136bb2;
    position: relative;
    transition: 0.3s ease;
}

.brand-sub {
    color: #0b2b40;
    opacity: 0.8;
    transition: 0.3s ease;
}

.brand-divider {
    opacity: 0.4;
}

.brand:hover .brand-main {
    color: #f8c14f;
    transform: translateY(-1px);
}

.brand:hover .brand-sub {
    opacity: 1;
}

.brand-main::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 0%;
    height: 2px;
    background: linear-gradient(90deg, #136bb2, #f8c14f);
    transition: width 0.3s ease;
}

.brand:hover .brand-main::after {
    width: 100%;
}

/* =========================
   NAV LINKS (DESKTOP)
========================= */

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.4rem;
    margin-left: 2rem;
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    color: #0b2b40;
    transition: all 0.25s ease;
    white-space: nowrap;
    position: relative;
}

.nav-links a i {
    width: 18px;
    text-align: center;
    font-size: 14px;
}

.nav-links a:hover {
    color: #136bb2;
    transform: translateY(-1px);
}

.nav-links a.active {
    color: #136bb2;
}

.nav-links a.active::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 100%;
    height: 3px;
    background: #f8c14f;
    border-radius: 10px;
}

/* =========================
   WELCOME SECTION
========================= */

.nav-welcome {
    flex: 0 1 auto;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
}

.nav-user-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Avatar */
.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #136bb2, #0a8fd8);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    flex-shrink: 0;
}

/* Text */
.nav-user-text {
    font-size: 14px;
    font-weight: 600;
    color: #0b2b40;
    white-space: nowrap;
}

/* =========================
   ACTION BUTTONS
========================= */

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.login-btn,
.request-btn {
    padding: 8px 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    font-size: 14px;
}

.login-btn {
    background: transparent;
    border: 1px solid #57c4ef;
    color: #141515;
}

.request-btn {
    background: rgb(238, 136, 4);
    border: 1px solid #0aaded;
    color: #000000;
}

.login-btn:hover,
.request-btn:hover {
    transform: translateY(-2px);
}

/* =========================
   HAMBURGER MENU
========================= */

.menu-toggle {
    width: 28px;
    height: 22px;
    display: none;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle span {
    height: 3px;
    width: 100%;
    background: #0b2b40;
    border-radius: 3px;
    transition: all 0.35s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* =========================
   OVERLAY
========================= */

.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: 0.3s ease;
    z-index: 998;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* =========================
   TRAINING MODE
========================= */

body.training-mode .nav-links {
    display: none;
}

/* =========================
   LAPTOP RESPONSIVE
========================= */

@media (max-width: 1200px) {
    .nav-links {
        gap: 1rem;
    }

    .nav-links a {
        font-size: 12px;
    }
}

/* =========================
   TABLET / MOBILE SIDEBAR
========================= */

@media (max-width: 992px) {

    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 260px;
        height: 100vh;
        background: #ffffff;
        flex-direction: column;
        align-items: flex-start;
        padding: 90px 1.2rem 1.2rem;
        margin-left: 0;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        z-index: 1000;

        transform: translateX(-100%);
        opacity: 0;
        visibility: hidden;

        transition: all 0.35s ease;
    }

    .nav-links.active {
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-links a {
        width: 100%;
        padding: 14px 10px;
        border-radius: 10px;
        border-bottom: 1px solid #f2f2f2;
    }
}

/* =========================
   MOBILE SMALL FIX (IMPORTANT)
========================= */

@media (max-width: 768px) {

    /* HIDE TEXT TO PREVENT OVERFLOW */
    .nav-user-text {
        display: none;
    }

    .nav-welcome {
        min-width: auto;
    }

    .user-avatar {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }

    .nav-links {
        width: 72px;
        padding: 90px 0.5rem 1rem;
        align-items: center;
    }

    .nav-links a {
        justify-content: center;
        width: 52px;
        height: 52px;
        padding: 0;
        border-radius: 14px;
        border-bottom: none;
        margin-bottom: 10px;
    }
    .nav-links a i {
        width: 18px;
        text-align: center;
        font-size: 20px;
    }
     .nav-links a span {

        display: none;
    }
   
}

/* =========================
   ANIMATION
========================= */

@keyframes fadeSlide {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* ========================= LOGO STYLE ==========================*/

/* =========================
   COMPACT BRAND LOGO
========================= */

.nav-left {

    display: flex;
    align-items: center;

    flex-shrink: 0;

    min-width: 0;
}

/* MAIN LOGO BOX */

.brand-logo {

    position: relative;

    width: 118px;

    height: 42px;

    cursor: pointer;

    animation: fadeSlide 0.5s ease;

    user-select: none;
}

/* =========================
   MYSAHAI
========================= */

.brand-main {

    position: absolute;

    top: 0;
    left: 0;

    font-size: 1.28rem;

    font-weight: 800;

    letter-spacing: 0.4px;

    color: #136bb2;

    line-height: 1;

    transition: all 0.3s ease;

    z-index: 2;
}

/* =========================
   ACMS OVERLAY
========================= */

.brand-sub {

    position: absolute;

    bottom: 1px;

    right: 0;

    font-size: 0.78rem;

    font-weight: 700;

    letter-spacing: 2px;

    padding: 2px 6px;

    border-radius: 20px;

    background: linear-gradient(
        135deg,
        #0b2b40,
        #136bb2
    );

    color: #ffffff;

    box-shadow:
        0 4px 10px rgba(19,107,178,0.2);

    transition: all 0.3s ease;

    z-index: 3;
}

/* =========================
   HOVER EFFECT
========================= */

.brand-logo:hover .brand-main {

    transform: translateY(-1px);

    color: #0a8fd8;
}

.brand-logo:hover .brand-sub {

    transform: scale(1.06);

    background: linear-gradient(
        135deg,
        #136bb2,
        #f8c14f
    );

    color: #0b2b40;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {

    .brand-logo {

        width: 96px;

        height: 36px;
    }

    .brand-main {

        font-size: 1.02rem;
    }

    .brand-sub {

        font-size: 0.62rem;

        letter-spacing: 1px;

        padding: 2px 5px;
    }
}
@media (max-width: 768px) {

    .login-btn .btn-text {
        display: none;
    }
}

/* =========================
NAVBAR TRAINING BUTTON STYLE PART 2
=========================*/

/* ==========================================
   TRAINING ACTIVE BUTTON
========================================== */

#trainingBtn.exit-training {

    background: #fff1f2;

    border: 1px solid #f5a3ad;

    color: #c62828;

    box-shadow: 0 4px 12px rgba(198,40,40,0.12);
}

/* ICON */

#trainingBtn.exit-training i {

    color: #c62828;
}

/* HOVER */

#trainingBtn.exit-training:hover {

    background: #ffe4e8;

    border-color: #ef6c7b;

    transform: translateY(-2px);
}
/* =========================
   MOBILE NAVBAR SPACE FIX
========================= */

@media (max-width: 768px) {

    .navbar {

        padding: 0.55rem 0.7rem;
    }

    .nav-container {

        gap: 0.5rem;
    }

    .nav-left {

        margin: 0;

        padding: 0;
    }

    .brand-logo {

        width: 82px;

        height: 32px;
    }

    .brand-main {

        font-size: 0.9rem;

        left: 0;
    }

    .brand-sub {

        font-size: 0.55rem;

        padding: 1px 4px;

        right: 0;
    }
}