/* Mobile category menu */

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

#openMobileNav:checked + .mobileNav {
    right: 0;
    visibility: visible;
    pointer-events: auto;
}

.mobileNav {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    position: fixed;
    z-index: 1200;
    top: 0;
    right: -100%;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    background: transparent;
    overflow: hidden;
    visibility: hidden;
    pointer-events: none;
    transition: right 0.3s ease, visibility 0.3s ease;
}

.mobileNav .collapseList {
    width: min(88vw, 360px);
    min-height: 100%;
    background: #fff;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
    margin: 0;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.mobile-nav-overlay {
    flex: 1;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(0, 0, 0, 0.45);
    cursor: pointer;
    min-width: 0;
    position: relative;
    z-index: 1;
    appearance: none;
    -webkit-appearance: none;
}

.mobile-menu-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: #666;
    cursor: pointer;
    margin: 0;
    padding: 0;
    appearance: none;
    -webkit-appearance: none;
}

.mobile-menu-close:hover {
    color: #c62828;
    border-color: rgba(198, 40, 40, 0.2);
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    background: #fafafa;
    flex-shrink: 0;
}

.mobile-menu-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 700;
    color: #222;
}

.mobile-menu-header-title .fa-th {
    color: #1a5fb4;
    font-size: 16px;
}

.mobile-menu-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
    margin: 0;
    padding: 8px 0 20px;
    width: 100%;
}

.mobile-menu-home-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    color: #333;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.mobile-menu-home-link:hover {
    color: #1a5fb4;
    text-decoration: none;
    background: #f8fbff;
}

.mobile-menu-home-link .fa-home {
    color: #1a5fb4;
}

.mobile-cat-group {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.mobile-cat-toggle {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.mobile-cat-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    margin: 0;
    cursor: pointer;
    background: #fff;
    transition: background 0.2s ease, color 0.2s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.mobile-cat-trigger-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.mobile-cat-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #f3f6fa;
    color: #666;
    flex-shrink: 0;
}

.mobile-cat-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
}

.mobile-cat-chevron {
    font-size: 12px;
    color: #999;
    transition: transform 0.25s ease, color 0.2s ease;
    flex-shrink: 0;
}

.mobile-cat-toggle:checked + .mobile-cat-trigger {
    background: #eef4fc;
}

.mobile-cat-toggle:checked + .mobile-cat-trigger .mobile-cat-icon {
    background: #dce8f8;
    color: #1a5fb4;
}

.mobile-cat-toggle:checked + .mobile-cat-trigger .mobile-cat-title {
    color: #1a5fb4;
}

.mobile-cat-toggle:checked + .mobile-cat-trigger .mobile-cat-chevron {
    transform: rotate(180deg);
    color: #1a5fb4;
}

.mobile-cat-panel {
    display: block;
    max-height: 0;
    overflow: hidden;
    background: #f8fafc;
    transition: max-height 0.35s ease, padding 0.25s ease;
    padding: 0 18px;
}

.mobile-cat-toggle:checked + .mobile-cat-trigger + .mobile-cat-panel {
    max-height: 5000px;
    padding: 12px 18px 16px;
}

.mobile-all-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #1a5fb4;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 14px;
    text-decoration: none;
}

.mobile-all-link:hover {
    color: #0d47a1;
    text-decoration: none;
}

.mobile-sub-section {
    display: block;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.08);
    max-height: none;
    overflow: visible;
}

.mobile-sub-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
}

.mobile-sub-title {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #222;
    margin-bottom: 8px;
    text-decoration: none;
    line-height: 1.5;
    padding: 0;
}

.mobile-sub-title:hover {
    color: #1a5fb4;
    text-decoration: none;
}

.mobile-sub-links {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-right: 8px;
    max-height: none;
    overflow: visible;
}

.mobile-sub-link {
    display: block;
    font-size: 13px;
    color: #666;
    padding: 6px 12px 6px 0;
    text-decoration: none;
    line-height: 1.5;
    position: relative;
}

.mobile-sub-link::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #c5d3e3;
    transform: translateY(-50%);
}

.mobile-sub-link:hover {
    color: #1a5fb4;
    text-decoration: none;
}

.mobile-menu-footer {
    display: block;
    padding: 16px 18px 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    margin-top: 8px;
    max-height: none;
    overflow: visible;
}

.mobile-menu-special {
    border-radius: 8px;
    font-weight: 600;
    padding: 12px 16px;
}

.mobile-menu-open-btn {
    cursor: pointer;
    text-align: center;
    color: #333;
    font-size: 12px;
    line-height: 1.3;
}

@media screen and (min-width: 768px) {
    .mobileNav,
    #openMobileNav + .mobileNav {
        display: none !important;
    }

    body.mobile-nav-open {
        overflow: auto;
        touch-action: auto;
    }
}
