/* Mobile Navigation - SIMPLE FIX */

/* Digest pages now use the same transparent navigation as the home page */
/* All transparent nav styling is handled in header.css */


/* Post template specific adjustments */
body.post-template #gh-head {
    position: relative !important;
    z-index: 1000 !important;
}

/* Header color overrides are now handled globally in header.css */


/* Center logo on mobile/smallest breakpoint */
@media (max-width: 767px) {
    
    /* Simple hamburger button styling - clean SVG version */
    .gh-burger {
        position: relative !important;
        z-index: 1000 !important;
        background: transparent !important;
        border: none !important;
        padding: 8px !important;
        cursor: pointer !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .gh-burger svg {
        width: 24px !important;
        height: 24px !important;
        stroke: #ffffff !important;
    }
    
    /* Search button styling */
    .gh-search {
        color: #ffffff !important;
        opacity: 1 !important;
    }
    
    /* Override screen.css with higher specificity - use ID selectors */
    #gh-head {
        height: 120px !important;
        min-height: 100px !important;
        padding: 8px 0 !important;
    }
    
    #gh-head .gh-head-inner {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        height: 100% !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
        width: 100% !important;
        grid-template-columns: none !important; /* Override grid layout */
        grid-template-rows: none !important;
    }
    
    /* Logo container - left side */
    #gh-head .gh-head-brand {
        display: flex !important;
        grid-template-columns: none !important; /* Override grid */
        align-items: center !important;
        order: 1 !important;
        height: auto !important;
        width: 100%;
    }
    
    /* Logo itself */
    #gh-head .gh-head-brand .gh-head-logo {
        flex: 0 0 auto !important;
    }
    
    /* Controls container - move search and burger to right edge */
    #gh-head .gh-head-brand .gh-search {
        flex: 0 0 auto !important;
        margin-left: auto !important; /* Pushes search and burger to the right */
        position: static !important;
    }
    
    #gh-head .gh-head-brand .gh-burger {
        flex: 0 0 auto !important;
        margin-left: 12px !important;
        position: static !important;
    }
    
    /* Override the original gh-head-actions positioning */
    #gh-head .gh-head-actions {
        display: none !important; /* Hide desktop actions on mobile */
    }
    
    
    /* Hide desktop navigation menu but keep actions container */
    .gh-head-menu {
        display: none !important;
    }
}

/* Mobile menu dropdown styling */
@media (max-width: 767px) {
    /* Show mobile menu when burger is clicked */
    .gh-head-open .gh-head-menu {
        display: block !important;
        position: fixed !important;
        top: 80px !important;
        left: 0 !important;
        right: 0 !important;
        background: rgba(0, 0, 0, 0.95) !important;
        z-index: 999 !important;
        padding: 20px !important;
        border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    }
    
    .gh-head-open .gh-head-menu .nav {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
    }
    
    .gh-head-open .gh-head-menu .nav li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
        padding-bottom: 16px !important;
    }
    
    .gh-head-open .gh-head-menu .nav li:last-child {
        border-bottom: none !important;
    }
    
    .gh-head-open .gh-head-menu .nav a {
        color: #ffffff !important;
        font-size: 18px !important;
        font-weight: 600 !important;
        text-decoration: none !important;
        transition: color 0.2s ease !important;
    }
    
    .gh-head-open .gh-head-menu .nav a:hover {
        color: #e6d7c7 !important;
    }
    
    /* Ensure body doesn't scroll when menu is open */
    .gh-head-open {
        overflow: hidden !important;
    }
}

/* Make Subscribe button text red in all states - Applied Globally */
.gh-head-button[data-portal="signup"],
a[href="#/portal/signup"].gh-head-button {
    color: #dc3545 !important;
    border-color: #dc3545 !important;
}

.gh-head-button[data-portal="signup"]:hover,
a[href="#/portal/signup"].gh-head-button:hover {
    color: #ffffff !important;
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
}