/* ============================================================
   🚀 MOBILE MENU - CSS CHECKBOX HACK (NO JS REQUIRED)
   ============================================================ */

/* डेस्कटपमा Hamburger बटन लुकाउने */
.mobile-menu-toggle,
.mobile-menu-checkbox {
    display: none !important;
}

/* ============================================================
   मोबाइल भ्यू (768px भन्दा सानो)
   ============================================================ */
@media screen and (max-width: 768px) {

    /* ह्याम्बर्गर बटन डिजाइन */
    .mobile-menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 10px;
        width: 100%;
        background: #e94560 !important;
        color: #fff !important;
        padding: 14px 12px !important;
        border: none !important;
        border-radius: 8px !important;
        font-size: 16px !important;
        font-weight: bold;
        cursor: pointer;
        margin-bottom: 12px;
        transition: background 0.3s ease;
    }

    /* ह्याम्बर्गर आइकन (३ लाइन) */
    .hamburger-icon {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .hamburger-line {
        width: 22px;
        height: 2px;
        background: #fff;
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    /* २. माथिल्लो मेनु (Header Top Bar) सुरुमा लुकाउने */
    .header-top-area .header-top-inner {
        display: none !important;
        background: #fff;
        padding: 10px 15px;
        border-radius: 8px;
        margin-bottom: 10px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.05);
        border: 1px solid #eee;
    }

    /* ३. तल्लो मेनु (Header Bottom Bar) सुरुमा लुकाउने */
    .header-bottom-inner {
        display: none !important;
        width: 100% !important;
        background: #fff !important;
        border-radius: 8px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.05);
        border: 1px solid #eee;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* ========================================================
       🔥 मुख्य जादु: Checkbox चेक भएपछि मेनु देखाउने
       ======================================================== */
       
    /* चेकबक्स चेक हुँदा तल्लो मेनु देखाउने */
    .mobile-menu-checkbox:checked ~ .header-bottom-inner {
        display: block !important;
    }

    /* चेकबक्स चेक हुँदा माथिल्लो मेनु देखाउने (यो CSS ले पेजको माथि खोज्छ) */
    body:has(.mobile-menu-checkbox:checked) .header-top-area .header-top-inner {
        display: block !important;
    }

    /* ह्याम्बर्गर बटन ✕ मा बदलिने (चेक हुँदा) */
    .mobile-menu-checkbox:checked + .mobile-menu-toggle {
        background: #c73d54 !important;
    }
    .mobile-menu-checkbox:checked + .mobile-menu-toggle .hamburger-line:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }
    .mobile-menu-checkbox:checked + .mobile-menu-toggle .hamburger-line:nth-child(2) {
        opacity: 0;
    }
    .mobile-menu-checkbox:checked + .mobile-menu-toggle .hamburger-line:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    /* ========================================================
       ४. मेनु लिस्टहरूलाई ठाडो (Vertical) बनाउने
       ======================================================== */
    .header-top-area .widget_nav_menu ul,
    .header-top-area .menu,
    .header-bottom-area .widget_nav_menu ul,
    .header-bottom-area .menu,
    .header-bottom-widget .menu,
    .header-bottom-widget .menu ul {
        display: flex !important;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        overflow: visible !important;
        gap: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        list-style: none !important;
    }

    /* मेनु आइटम (li) को बोर्डर र सेटिङ */
    .header-top-area .widget_nav_menu li,
    .header-top-area .menu li,
    .header-bottom-area .widget_nav_menu li,
    .header-bottom-widget .menu li {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border-bottom: 1px solid #f1f1f1 !important;
        display: block !important;
        list-style: none !important;
    }

    .header-top-area .widget_nav_menu li:last-child,
    .header-top-area .menu li:last-child,
    .header-bottom-area .widget_nav_menu li:last-child,
    .header-bottom-widget .menu li:last-child {
        border-bottom: none !important;
    }

    /* मेनु लिङ्कहरू (a) को डिजाइन */
    .header-top-area .widget_nav_menu a,
    .header-top-area .menu a,
    .header-bottom-area .widget_nav_menu a,
    .header-bottom-widget .menu a {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        width: 100% !important;
        padding: 14px 18px !important;
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        color: #333 !important;
        font-size: 15px !important;
        font-weight: 500;
        text-align: left;
        transition: background 0.2s ease, color 0.2s ease;
    }

    .header-top-area .widget_nav_menu a:hover,
    .header-top-area .menu a:hover,
    .header-bottom-area .widget_nav_menu a:hover,
    .header-bottom-widget .menu a:hover {
        background: #f8f9fa !important;
        color: #e94560 !important;
    }

    /* Dropdown एरो (▾) */
    .header-top-area .menu-item-has-children > a::after,
    .header-bottom-area .menu-item-has-children > a::after,
    .header-bottom-widget .menu .menu-item-has-children > a::after {
        content: "▼" !important;
        font-size: 10px !important;
        color: #e94560 !important;
        margin-left: auto;
    }

    /* Submenu सुरुमा लुकाउने */
    .header-top-area .widget_nav_menu .sub-menu,
    .header-bottom-area .widget_nav_menu .sub-menu,
    .header-bottom-widget .menu .sub-menu {
        display: none !important;
        position: static !important;
        width: 100% !important;
        background: #f9f9f9 !important;
        padding: 0 !important;
        margin: 0 !important;
        box-shadow: none !important;
    }

    /* Submenu खुला भएको बेला देखाउने (Hover वा Submenu-Open क्लासले) */
    .header-top-area .menu-item-has-children:hover > .sub-menu,
    .header-bottom-area .menu-item-has-children:hover > .sub-menu,
    .header-bottom-area .menu-item-has-children.submenu-open > .sub-menu {
        display: block !important;
    }

    .header-top-area .widget_nav_menu .sub-menu a,
    .header-bottom-area .widget_nav_menu .sub-menu a,
    .header-bottom-widget .menu .sub-menu a {
        padding: 12px 18px 12px 35px !important;
        font-size: 14px !important;
        color: #555 !important;
    }

    /* माथिल्लो मेनुको पुरानो सेपरेटर (|) लुकाउने */
    .header-top-area .menu li:not(:last-child):after {
        display: none !important;
    }
}

/* ============================================================
   📱 HOMEPAGE WIDGETS - MOBILE RESPONSIVE FIX (लम्मेतान फिक्स)
   ============================================================ */
@media screen and (max-width: 768px) {
    .tp-three-col-grid,
    .tp-horizontal-layout,
    .tp-row-section,
    .tp-top-section {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 20px !important;
    }

    .tp-col-category,
    .tp-col-main,
    .tp-col-slider,
    .tp-col-sidebar {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
        min-width: 0 !important;
    }

    .tp-three-col-grid { 
        display: grid !important;
        grid-template-columns: 1fr !important; 
    }

    .tp-col-post,
    .tp-one-col-item {
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start !important;
        gap: 12px !important;
        width: 100% !important;
        padding: 12px !important;
    }

    .tp-col-post.tp-col-featured,
    .tp-one-col-item.tp-featured {
        flex-direction: column !important;
    }

    .tp-col-post-thumb,
    .tp-item-thumb {
        width: 100px !important;
        height: 100px !important;
        flex-shrink: 0 !important;
    }

    .tp-col-post.tp-col-featured .tp-col-post-thumb,
    .tp-one-col-item.tp-featured .tp-item-thumb {
        width: 100% !important;
        height: 200px !important;
    }

    .tp-col-post-thumb img,
    .tp-item-thumb img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    /* "लम्मेतान" टेक्स्ट फिक्स */
    .tp-col-post-content,
    .tp-item-content {
        flex: 1 !important;
        min-width: 0 !important; 
        width: 100% !important;
    }

    .tp-col-post-title a,
    .tp-item-title a {
        font-size: 16px !important;
        line-height: 1.5 !important;
        word-break: keep-all !important;
        overflow-wrap: break-word !important;
        white-space: normal !important;
        display: block !important;
    }
}