
.tpmh-mobile-header{
    display:none;
    font-family:Arial,"Noto Sans Kannada",sans-serif;
}

@media(max-width:767px){

    .tpmh-mobile-header{
        display:block;
        width:100%;
        position:relative;
        z-index:99990;
    }

    .tpmh-topbar{
        height:76px;
        display:flex;
        align-items:center;
        gap:10px;
        padding:0 12px;
        box-sizing:border-box;
        background:var(--tpmh-brand,#881A10);
    }

    .tpmh-logo{
        min-width:0;
        flex:1 1 auto;
        display:flex;
        align-items:center;
        text-decoration:none!important;
        color:#fff!important;
        overflow:hidden;
    }

    .tpmh-logo img{
        display:block;
        max-width:100%;
        width:auto;
        max-height:52px;
        object-fit:contain;
    }

    .tpmh-logo span{
        color:#fff;
        font-size:29px;
        font-weight:800;
        line-height:1;
        white-space:nowrap;
    }

    .tpmh-subscribe{
        flex:0 0 auto;
        display:flex;
        align-items:center;
        justify-content:center;
        min-height:42px;
        padding:0 16px;
        border-radius:7px;
        background:#fff;
        color:var(--tpmh-brand,#881A10)!important;
        text-decoration:none!important;
        font-size:16px;
        font-weight:800;
        white-space:nowrap;
    }

    .tpmh-trigger{
        flex:0 0 48px;
        width:48px;
        height:48px;
        padding:3px;
        border:0;
        background:#fff;
        color:#111;
        cursor:pointer;
        display:flex;
        align-items:center;
        justify-content:center;
    }

    .tpmh-trigger svg{
        width:100%;
        height:100%;
        display:block;
    }

    .tpmh-fixed-tabs{
        display:grid;
        grid-template-columns:repeat(3,1fr);
        width:100%;
        min-height:50px;
        background:#fff;
        border-bottom:1px solid #e5e5e5;
        box-shadow:0 2px 7px rgba(0,0,0,.045);
    }

    .tpmh-fixed-tabs a{
        display:flex;
        align-items:center;
        justify-content:center;
        min-width:0;
        padding:8px 4px;
        box-sizing:border-box;
        color:#111!important;
        text-decoration:none!important;
        text-align:center;
        font-size:15px;
        line-height:1.25;
        font-weight:800;
        white-space:nowrap;
    }

    .tpmh-fixed-tabs a+a{
        border-left:1px solid #ededed;
    }

    .tpmh-overlay{
        position:fixed;
        inset:0;
        z-index:999999;
        background:var(--tpmh-brand,#881A10);
        transform:translateX(100%);
        transition:transform .25s ease;
        overflow-y:auto;
        visibility:hidden;
    }

    .tpmh-overlay.is-open{
        transform:translateX(0);
        visibility:visible;
    }

    .tpmh-overlay-inner{
        min-height:100%;
        padding:22px 18px 36px;
        box-sizing:border-box;
    }

    .tpmh-overlay-top{
        display:flex;
        align-items:flex-start;
        gap:12px;
        margin-bottom:24px;
    }

    .tpmh-close{
        flex:0 0 42px;
        width:42px;
        height:52px;
        padding:0;
        border:0;
        background:transparent;
        color:#fff;
        font-size:44px;
        font-weight:300;
        line-height:1;
        cursor:pointer;
    }

    .tpmh-search{
        position:relative;
        flex:1 1 auto;
        background:#fff;
        border:10px solid rgba(255,255,255,.22);
        box-sizing:border-box;
    }

    .tpmh-search input{
        width:100%;
        height:54px;
        padding:0 52px 0 15px;
        border:0;
        outline:0;
        box-sizing:border-box;
        background:#fff;
        color:#222;
        font-size:16px;
    }

    .tpmh-search button{
        position:absolute;
        top:10px;
        right:10px;
        width:42px;
        height:54px;
        border:0;
        background:transparent;
        color:#8b8b8b;
        cursor:pointer;
        display:flex;
        align-items:center;
        justify-content:center;
    }

    .tpmh-search button svg{
        width:27px;
        height:27px;
    }

    .tpmh-overlay-menu{
        display:flex;
        flex-direction:column;
    }

    .tpmh-overlay-menu a{
        display:flex;
        align-items:center;
        min-height:66px;
        padding:10px;
        box-sizing:border-box;
        color:#fff!important;
        text-decoration:none!important;
        font-size:25px;
        line-height:1.25;
        font-weight:800;
        border-bottom:1px solid rgba(255,255,255,.18);
    }

    body.tpmh-menu-open{
        overflow:hidden!important;
    }
}

@media(max-width:390px){
    .tpmh-topbar{
        height:70px;
        padding:0 8px;
        gap:7px;
    }

    .tpmh-logo span{
        font-size:25px;
    }

    .tpmh-subscribe{
        min-height:39px;
        padding:0 12px;
        font-size:14px;
    }

    .tpmh-trigger{
        flex-basis:44px;
        width:44px;
        height:44px;
    }

    .tpmh-fixed-tabs a{
        font-size:14px;
    }
}


/* =========================================================
   v1.1.0 - Logo reliability + refined search + Primary menu
   ========================================================= */

@media(max-width:767px){

    /* More reliable logo fit for wide transparent PNG logos */
    .tpmh-logo img{
        width:auto !important;
        height:auto !important;
        max-width:100% !important;
        max-height:48px !important;
        object-fit:contain !important;
        object-position:left center !important;
    }

    /* Refined search container */
    .tpmh-search{
        position:relative !important;
        flex:1 1 auto !important;
        padding:7px !important;
        border:1px solid rgba(255,255,255,.24) !important;
        border-radius:10px !important;
        background:rgba(255,255,255,.13) !important;
        box-shadow:0 7px 22px rgba(0,0,0,.12) !important;
    }

    .tpmh-search input{
        height:56px !important;
        padding:0 56px 0 17px !important;
        border:0 !important;
        border-radius:7px !important;
        background:#fff !important;
        color:#242424 !important;
        font-size:16px !important;
        box-shadow:inset 0 0 0 1px #ececec, 0 2px 7px rgba(0,0,0,.06) !important;
    }

    .tpmh-search input::placeholder{
        color:#8a8a8a !important;
        opacity:1 !important;
    }

    .tpmh-search button{
        top:7px !important;
        right:7px !important;
        width:50px !important;
        height:56px !important;
        border:0 !important;
        border-radius:0 7px 7px 0 !important;
        background:transparent !important;
        color:#881A10 !important;
    }

    .tpmh-search button svg{
        width:25px !important;
        height:25px !important;
    }

    /* Primary WordPress Menu */
    .tpmh-overlay-menu,
    .tpmh-overlay-menu ul{
        margin:0 !important;
        padding:0 !important;
        list-style:none !important;
    }

    .tpmh-overlay-menu .tpmh-overlay-menu-list{
        display:flex !important;
        flex-direction:column !important;
    }

    .tpmh-overlay-menu li{
        position:relative !important;
        margin:0 !important;
        padding:0 !important;
        list-style:none !important;
        border-bottom:1px solid rgba(255,255,255,.18) !important;
    }

    .tpmh-overlay-menu li > a{
        display:flex !important;
        align-items:center !important;
        min-height:64px !important;
        padding:10px 12px !important;
        box-sizing:border-box !important;
        color:#fff !important;
        text-decoration:none !important;
        font-size:23px !important;
        line-height:1.25 !important;
        font-weight:800 !important;
    }

    .tpmh-overlay-menu .sub-menu{
        display:none;
        padding:0 0 10px 18px !important;
        background:rgba(0,0,0,.08) !important;
    }

    .tpmh-overlay-menu .menu-item-has-children.tpmh-submenu-open > .sub-menu{
        display:block !important;
    }

    .tpmh-overlay-menu .sub-menu li{
        border-bottom:0 !important;
    }

    .tpmh-overlay-menu .sub-menu li > a{
        min-height:48px !important;
        padding:7px 12px !important;
        font-size:18px !important;
        font-weight:700 !important;
    }

    .tpmh-submenu-toggle{
        position:absolute;
        right:4px;
        top:8px;
        width:48px;
        height:48px;
        border:0;
        background:transparent;
        color:#fff;
        font-size:28px;
        cursor:pointer;
        z-index:2;
    }
}


/* =========================================================
   v1.2.0 - Fixed mobile header + remove body gaps
   ========================================================= */

@media(max-width:767px){

    html,
    body.tpmh-active{
        margin-top:0 !important;
        padding-top:0 !important;
    }

    body.tpmh-active{
        overflow-x:hidden !important;
    }

    /* Remove common theme/Elementor spacing before first content */
    body.tpmh-active .site,
    body.tpmh-active #page,
    body.tpmh-active .site-content,
    body.tpmh-active #content,
    body.tpmh-active .content-area,
    body.tpmh-active main,
    body.tpmh-active .elementor-location-header + *,
    body.tpmh-active .tpmh-mobile-header + *{
        margin-top:0 !important;
    }

    /* Mobile header stays fixed while page scrolls */
    .tpmh-mobile-header{
        display:block !important;
        position:sticky !important;
        top:0 !important;
        left:0 !important;
        right:0 !important;
        width:100% !important;
        margin:0 !important;
        padding:0 !important;
        z-index:999990 !important;
        background:#fff !important;
    }

    .tpmh-topbar,
    .tpmh-fixed-tabs{
        width:100% !important;
        margin:0 !important;
        box-sizing:border-box !important;
    }

    /* No unwanted gap directly above or below header */
    .tpmh-topbar{
        margin-top:0 !important;
    }

    .tpmh-fixed-tabs{
        margin-bottom:0 !important;
    }

    /* Remove WP admin-bar gap handling on the public mobile header */
    body.admin-bar .tpmh-mobile-header{
        top:0 !important;
    }

    /* Common Elementor empty section/spacing immediately around header */
    body.tpmh-active > .elementor,
    body.tpmh-active .elementor-section-wrap,
    body.tpmh-active .elementor-location-header{
        margin-top:0 !important;
        padding-top:0 !important;
    }

    /* Keep first real content snug under mobile nav */
    .tpmh-mobile-header + .site,
    .tpmh-mobile-header + #page,
    .tpmh-mobile-header + main,
    .tpmh-mobile-header + .elementor,
    .tpmh-mobile-header + .site-content,
    .tpmh-mobile-header + #content{
        margin-top:0 !important;
        padding-top:0 !important;
    }
}


/* =========================================================
   v1.2.1 - Aggressive removal of gap below mobile header
   ========================================================= */
@media(max-width:767px){

    /* Header itself must end exactly at the menu row */
    .tpmh-mobile-header,
    .tpmh-mobile-header *,
    .tpmh-topbar,
    .tpmh-fixed-tabs{
        box-sizing:border-box !important;
    }

    .tpmh-mobile-header{
        margin-bottom:0 !important;
        padding-bottom:0 !important;
    }

    .tpmh-fixed-tabs{
        margin-bottom:0 !important;
        padding-bottom:0 !important;
    }

    /* The first page wrapper/content after our header must start immediately */
    .tpmh-mobile-header ~ #page,
    .tpmh-mobile-header ~ .site,
    .tpmh-mobile-header ~ #content,
    .tpmh-mobile-header ~ .site-content,
    .tpmh-mobile-header ~ main,
    .tpmh-mobile-header ~ .elementor,
    .tpmh-mobile-header ~ .elementor-location-single,
    .tpmh-mobile-header ~ .elementor-location-archive{
        margin-top:0 !important;
        padding-top:0 !important;
    }

    /* Common WordPress/JNews/Elementor wrappers causing top blank space */
    body.tpmh-active #page,
    body.tpmh-active .site,
    body.tpmh-active #content,
    body.tpmh-active .site-content,
    body.tpmh-active .content-area,
    body.tpmh-active .jeg_main,
    body.tpmh-active .jeg_content,
    body.tpmh-active .jeg_content_container,
    body.tpmh-active .jeg_container,
    body.tpmh-active .jeg_archive,
    body.tpmh-active .elementor-location-single,
    body.tpmh-active .elementor-location-archive{
        margin-top:0 !important;
        padding-top:0 !important;
    }

    /* Hide empty desktop-header placeholders on mobile */
    body.tpmh-active .elementor-location-header:empty,
    body.tpmh-active header.elementor-element:empty,
    body.tpmh-active .jeg_header_placeholder,
    body.tpmh-active .jeg_navbar_mobile_wrapper:empty,
    body.tpmh-active .jeg_header_wrapper:empty{
        display:none !important;
        height:0 !important;
        min-height:0 !important;
        margin:0 !important;
        padding:0 !important;
    }

    /* Prevent a first Elementor section from inheriting artificial top spacing */
    body.tpmh-active main > .elementor:first-child,
    body.tpmh-active #content > .elementor:first-child,
    body.tpmh-active .site-content > .elementor:first-child,
    body.tpmh-active .elementor-location-single > .elementor-section:first-child,
    body.tpmh-active .elementor-location-archive > .elementor-section:first-child{
        margin-top:0 !important;
        padding-top:0 !important;
    }
}
