/* ==========================================================================
   Mobile Navigation — reference-inspired, KRL theme
   ========================================================================== */

.mobile-menu-right,
.mean-container {
    display: none !important;
}

.mobile-nav-trigger {
    display: none;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: 1px solid #e8ecf3;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    padding: 0;
    z-index: 1001;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.mobile-nav-trigger span {
    display: block;
    width: 20px;
    height: 2px;
    background: #151a33;
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.mobile-nav-trigger.is-active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-nav-trigger.is-active span:nth-child(2) {
    opacity: 0;
}

.mobile-nav-trigger.is-active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.mobile-drawer {
    position: fixed;
    inset: 0;
    z-index: 99999;
    pointer-events: none;
    visibility: hidden;
}

.mobile-drawer.is-open {
    pointer-events: auto;
    visibility: visible;
}

.mobile-drawer__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 20, 35, 0.6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-drawer.is-open .mobile-drawer__overlay {
    opacity: 1;
}

.mobile-drawer__panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(360px, 92vw);
    height: 100%;
    background: #f7f8fc;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.18);
}

.mobile-drawer.is-open .mobile-drawer__panel {
    transform: translateX(0);
}

.mobile-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    background: #222935;
    border-bottom: 3px solid #ffc000;
}

.mobile-drawer__header img {
    height: 38px;
    width: auto;
}

.mobile-drawer__close {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    background: transparent;
    color: #fff;
    font-size: 1.125rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.mobile-drawer__close:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.45);
}

.mobile-drawer__body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #f7f8fc;
}

.mobile-drawer__nav {
    display: block;
}

.mobile-drawer__row {
    border-bottom: 1px solid #e4e8f0;
    background: #fff;
}

.mobile-drawer__row--split {
    display: flex;
    align-items: stretch;
}

.mobile-drawer__link {
    display: flex;
    align-items: center;
    flex: 1;
    min-height: 54px;
    padding: 14px 20px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #151a33;
    text-decoration: none;
    position: relative;
    transition: background 0.2s ease, color 0.2s ease;
}

.mobile-drawer__link:hover,
.mobile-drawer__link.is-active {
    background: #fff9e6;
    color: #151a33;
    text-decoration: none;
}

.mobile-drawer__link.is-active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #ffc000;
}

.mobile-drawer__expand {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    min-height: 54px;
    border: none;
    border-left: 1px solid #e4e8f0;
    background: #f0f2f7;
    color: #151a33;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.mobile-drawer__expand:hover {
    background: #e8ebf2;
}

.mobile-drawer__expand i {
    font-size: 0.8125rem;
    transition: transform 0.25s ease;
}

.mobile-drawer__group.is-expanded .mobile-drawer__expand i {
    transform: rotate(180deg);
}

.mobile-drawer__sub {
    display: none;
    background: #f0f2f7;
    border-bottom: 1px solid #e4e8f0;
    max-height: 280px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-drawer__group.is-expanded .mobile-drawer__sub {
    display: block;
}

.mobile-drawer__sublink {
    display: block;
    padding: 12px 20px 12px 28px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4a5068;
    text-decoration: none;
    border-top: 1px solid #e8ebf2;
    transition: background 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
}

.mobile-drawer__sublink:first-child {
    border-top: none;
}

.mobile-drawer__sublink:hover,
.mobile-drawer__sublink.is-active {
    background: #fff;
    color: #151a33;
    padding-left: 32px;
    text-decoration: none;
}

.mobile-drawer__sublink.is-active {
    font-weight: 700;
    border-left: 3px solid #ffc000;
    padding-left: 29px;
}

.mobile-drawer__empty {
    display: block;
    padding: 14px 20px;
    font-size: 0.875rem;
    color: #9aa0ad;
}

.mobile-drawer__footer {
    padding: 16px 20px 24px;
    border-top: 1px solid #e4e8f0;
    background: #eef1f6;
    display: grid;
    gap: 10px;
}

.mobile-drawer__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 18px;
    font-size: 0.9375rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.mobile-drawer__cta--primary {
    background: #ffc000;
    color: #151a33;
    border: 2px solid #ffc000;
}

.mobile-drawer__cta--primary:hover {
    background: #e6ad00;
    border-color: #e6ad00;
    color: #151a33;
    text-decoration: none;
}

.mobile-drawer__cta--outline {
    background: #fff;
    color: #151a33;
    border: 2px solid #d5dbe8;
}

.mobile-drawer__cta--outline:hover {
    border-color: #ffc000;
    color: #151a33;
    text-decoration: none;
}

body.mobile-nav-open {
    overflow: hidden;
}

@media (max-width: 991px) {
    .header-navigation-area .main-menu {
        display: none !important;
    }

    .mobile-nav-trigger {
        display: flex;
    }

    .header-navigation-area .col-md-12 {
        position: relative;
        min-height: 56px;
        display: flex;
        align-items: center;
        justify-content: flex-start;
    }

    .header-navigation-area .logo,
    .header-navigation-area .navbar-brand.logo {
        float: none !important;
        margin-left: 0 !important;
        margin-right: auto !important;
        padding-top: 0 !important;
        padding-left: 0 !important;
        text-align: left;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        flex: 0 1 auto;
    }

    .header-navigation-area .logo img,
    .header-navigation-area #logo-image {
        margin: 0 !important;
        display: block;
        height: 44px;
        width: auto;
    }

    .header-navigation-area.two-layers-header .container {
        padding-left: 15px;
        padding-right: 15px;
    }
}

@media (min-width: 992px) {
    .mobile-drawer {
        display: none !important;
    }
}
