html.menu-open,
body.menu-open {
    overflow: hidden !important;
    height: 100vh !important;
    position: relative;
}

.casa-sheet-list span {
    font-family: var(--special-font);
    font-size: 18px;
}

@media (max-width: 767px) {
    .mobile-nav-viewport {
        flex: 1;
        position: relative;
        overflow-x: hidden; 
    }

    .mobile-overlay a {
        text-decoration: none !important;
    }
    
    .has-sub, .sub-nav-item, .has-sub-level-3{
        display: flex !important;
        justify-content: space-between !important;
        align-items: center;
        padding: 2px 0 !important;
        font-size: 26px !important;
        font-family: var(--special-font);
        font-weight: 400 !important;
        color: #000;
        cursor: pointer;
        width: 100%;
    }

    .no-sub {
        font-family: var(--special-font);
        margin-bottom: -10px;
    }

    
    .sub-visual-layout {
        width: 100%;
        overflow: hidden;
        margin-top: 80px; 
    }

    .visual-card {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory; 
        scroll-behavior: smooth;
        gap: 7px;
        padding: 0;
        text-decoration: none !important;
        scroll-snap-stop: always !important; 
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior-x: contain;
        scrollbar-width: none; 
    }

    .visual-card::-webkit-scrollbar {
        display: none;
    }

    .visual-item {
        flex: 0 0 50.1%;
        position: relative;
        scroll-snap-align: center;
        aspect-ratio: 7/8;
        min-width: 50.1%;
    }

    .visual-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .card-title {
        font-family: var(--special-font);
        position: absolute;
        bottom: 15px;
        left: 15px;
        color: #fff;
        font-size: 16px;
        font-weight: 700;
        text-transform: none;
        letter-spacing: 1px;
        text-shadow: 0 2px 4px rgba(0,0,0,0.3); 
    }




    .has-sub i, .sub-nav-item i, .has-sub-level-3 i {
        width: 26px;
        height: 26px;
        background-color: var(--gray);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 7px; 
        color: #111;
        font-weight: 900 !important;
        -webkit-text-stroke: 0.6px #000;
        transition: background-color 0.2s ease;
    }

    
    .sub-back-trigger {
        font-family: var(--special-font);
        display: flex;
        align-items: center;
        gap: 12px;
        font-size: 18px;
        color: var(--color-grey);
        font-weight: 400;
        margin-bottom: 10px;
        cursor: pointer;
        white-space: nowrap !important; 
    }


    .sub-back-trigger i {
        font-size: 9px;
        color: var(--color-text-muted);
        font-weight: 900;
        -webkit-text-stroke: 0.6px var(--color-grey);
    }

    
    .mobile-nav, .sub-menu-layer {
        display: none;
        flex-direction: column;
    }

    .active {
        display: flex !important;
        animation: fadeIn 0.3s ease;
    }

    .sub-group-title {
        font-size: 11px;
        color: #ccc;
        text-transform: uppercase;
        margin: 20px 0 10px 0;
        letter-spacing: 1px;
    }



    @keyframes fadeIn {
        from { opacity: 0; transform: translateX(10px); }
        to { opacity: 1; transform: translateX(0); }
    }
}





/* ==========================================================================
   2. TABLET NHỎ (min-width: 768px and max-width: 991px): Hiển thị 50% màn hình
   ========================================================================== */
@media (min-width: 768px) and (max-width: 991px) {

    .mobile-overlay,
    #mobileMenu {
        width: 50% !important;
        max-width: 50% !important;
    }

    .mobile-nav-viewport {
        flex: 1;
        position: relative;
        overflow-x: hidden; 
    }

    .mobile-overlay a {
        text-decoration: none !important;
    }
    
    .has-sub, .sub-nav-item, .has-sub-level-3{
        display: flex !important;
        justify-content: space-between !important;
        align-items: center;
        padding: 2px 0 !important;
        font-size: 26px !important;
        font-family: var(--special-font);
        font-weight: 400 !important;
        color: #000;
        cursor: pointer;
        width: 100%;
    }

    .no-sub {
        font-family: var(--special-font);
        margin-bottom: -10px;
    }
    
    .sub-visual-layout {
        width: 100%;
        overflow: hidden;
        margin-top: 80px; 
    }

    .visual-card {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory; 
        scroll-behavior: smooth;
        gap: 7px;
        padding: 0;
        text-decoration: none !important;
        scroll-snap-stop: always !important; 
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior-x: contain;
        scrollbar-width: none; 
    }

    .visual-card::-webkit-scrollbar {
        display: none;
    }

    .visual-item {
        flex: 0 0 50.1%;
        position: relative;
        scroll-snap-align: center;
        aspect-ratio: 7/8;
        min-width: 50.1%;
    }

    .visual-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .card-title {
        position: absolute;
        bottom: 15px;
        left: 15px;
        color: #fff;
        font-size: 16px;
        font-weight: 700;
        text-transform: none;
        letter-spacing: 1px;
        text-shadow: 0 2px 4px rgba(0,0,0,0.3); 
    }

    .has-sub i, .sub-nav-item i, .has-sub-level-3 i {
        width: 26px;
        height: 26px;
        background-color: var(--gray);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 7px; 
        color: #111;
        font-weight: 900 !important;
        -webkit-text-stroke: 0.6px #000;
        transition: background-color 0.2s ease;
    }
    
    .sub-back-trigger {
        font-family: var(--special-font);
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 13px;
        color: var(--color-text-muted);
        font-weight: 400;
        margin-bottom: 10px;
        cursor: pointer;
    }
    

    .sub-back-trigger i {
        font-size: 9px;
        color: var(--color-text-muted);
        font-weight: 900;
        -webkit-text-stroke: 0.6px var(--color-grey);
    }


    .mobile-nav, .sub-menu-layer {
        display: m-nav-group;
        flex-direction: column;
    }

    .active {
        display: flex !important;
        animation: fadeIn 0.3s ease;
    }

    .sub-group-title {
        font-size: 11px;
        color: #ccc;
        text-transform: uppercase;
        margin: 20px 0 10px 0;
        letter-spacing: 1px;
    }

    @keyframes fadeIn {
        from { opacity: 0; transform: translateX(10px); }
        to { opacity: 1; transform: translateX(0); }
    }
}


/* ==========================================================================
   3. TABLET LỚN (min-width: 992px and max-width: 1024px): Hiển thị 50% màn hình
   ========================================================================== */
@media (min-width: 992px) and (max-width: 1024px) {
    .mobile-overlay,
    #mobileMenu {
        width: 50% !important;
        max-width: 50% !important;
    }

    .mobile-nav-viewport {
        flex: 1;
        position: relative;
        overflow-x: hidden; 
    }

    .mobile-overlay a {
        text-decoration: none !important;
    }
    
    .has-sub, .sub-nav-item, .has-sub-level-3{
        display: flex !important;
        justify-content: space-between !important;
        align-items: center;
        padding: 2px 0 !important;
        font-size: 26px !important;
        font-family: var(--special-font);
        font-weight: 300 !important;
        color: #000;
        cursor: pointer;
        width: 100%;
    }
    
    .sub-visual-layout {
        width: 100%;
        overflow: hidden;
        margin-top: 80px; 
    }

    .visual-card {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory; 
        scroll-behavior: smooth;
        gap: 7px;
        padding: 0;
        text-decoration: none !important;
        scroll-snap-stop: always !important; 
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior-x: contain;
        scrollbar-width: none; 
    }

    .visual-card::-webkit-scrollbar {
        display: none;
    }

    .visual-item {
        flex: 0 0 50.1%;
        position: relative;
        scroll-snap-align: center;
        aspect-ratio: 7/8;
        min-width: 50.1%;
    }

    .visual-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .card-title {
        position: absolute;
        bottom: 15px;
        left: 15px;
        color: #fff;
        font-size: 16px;
        font-weight: 700;
        text-transform: none;
        letter-spacing: 1px;
        text-shadow: 0 2px 4px rgba(0,0,0,0.3); 
    }

    .has-sub i, .sub-nav-item i, .has-sub-level-3 i {
        width: 26px;
        height: 26px;
        background-color: var(--gray);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 7px; 
        color: #111;
        font-weight: 900 !important;
        -webkit-text-stroke: 0.6px #000;
        transition: background-color 0.2s ease;
    }

    .no-sub {
        font-family: var(--special-font);
        margin-bottom: -10px;
    }
    
    .sub-back-trigger {
        font-family: var(--special-font);
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 13px;
        color: var(--color-text-muted);
        font-weight: 400;
        margin-bottom: 10px;
        cursor: pointer;
    }

    .sub-back-trigger i {
        font-size: 9px;
        color: var(--color-text-muted);
        font-weight: 900;
        -webkit-text-stroke: 0.6px var(--color-grey);
    }
    
    .mobile-nav, .sub-menu-layer {
        display: none;
        flex-direction: column;
    }

    .active {
        display: flex !important;
        animation: fadeIn 0.3s ease;
    }

    .sub-group-title {
        font-size: 11px;
        color: #ccc;
        text-transform: uppercase;
        margin: 20px 0 10px 0;
        letter-spacing: 1px;
    }

    @keyframes fadeIn {
        from { opacity: 0; transform: translateX(10px); }
        to { opacity: 1; transform: translateX(0); }
    }
}




