/**
 * CRITICAL Mobile Fixes - Loads Last with !important
 * Ensures hamburger menu visibility and mobile nav
 */

/* Force hamburger visible on mobile */
@media screen and (max-width: 992px) {
    /* HAMBURGER BUTTON - MUST BE VISIBLE */
    .revved-menu-toggle {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        width: 48px !important;
        height: 48px !important;
        background: transparent !important;
        border: 2px solid #1E1E1E !important;
        border-radius: 8px !important;
        cursor: pointer !important;
        padding: 10px !important;
        gap: 5px !important;
        z-index: 10000 !important;
        position: relative !important;
    }
    
    /* HAMBURGER LINES - DARK AND VISIBLE */
    .hamburger-line {
        display: block !important;
        width: 22px !important;
        height: 3px !important;
        background: #1E1E1E !important;
        border-radius: 2px !important;
        transition: all 0.3s ease !important;
    }
    
    /* HIDE DESKTOP NAV ON MOBILE */
    .revved-nav {
        position: fixed !important;
        top: 70px !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        background: #ffffff !important;
        padding: 20px !important;
        transform: translateX(-100%) !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transition: all 0.3s ease !important;
        z-index: 9998 !important;
        overflow-y: auto !important;
    }
    
    /* SHOW NAV WHEN ACTIVE */
    .revved-nav.active {
        transform: translateX(0) !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    /* HAMBURGER X ANIMATION */
    .revved-menu-toggle.active .hamburger-line:nth-child(1) {
        transform: translateY(8px) rotate(45deg) !important;
    }
    
    .revved-menu-toggle.active .hamburger-line:nth-child(2) {
        opacity: 0 !important;
        transform: scaleX(0) !important;
    }
    
    .revved-menu-toggle.active .hamburger-line:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg) !important;
    }
    
    /* MOBILE MENU ITEMS */
    .revved-menu {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    
    .revved-menu > li {
        border-bottom: 1px solid #eee !important;
    }
    
    .revved-menu > li > a {
        display: block !important;
        padding: 16px 0 !important;
        font-size: 18px !important;
        color: #1E1E1E !important;
    }
    
    /* HIDE SEARCH ON MOBILE HEADER */
    .revved-search {
        display: none !important;
    }
    
    /* HEADER LAYOUT */
    .revved-header-content {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 10px 16px !important;
    }
    
    /* LOGO SIZE */
    .revved-logo img {
        max-height: 40px !important;
    }
}

/* REDUCE CROWDING ON MOBILE */
@media screen and (max-width: 768px) {
    /* Bigger spacing between sections */
    section,
    .section {
        padding: 24px 0 !important;
    }
    
    /* Single column layouts */
    .article-grid,
    .post-grid,
    .hero-grid,
    .story-grid {
        display: block !important;
    }
    
    .article-grid > *,
    .post-grid > *,
    .story-grid > * {
        margin-bottom: 20px !important;
    }
    
    /* Smaller cards */
    .article-card,
    .story-card,
    .card {
        margin-bottom: 16px !important;
    }
    
    /* Better typography */
    .card-title,
    .article-title {
        font-size: 16px !important;
        line-height: 1.3 !important;
    }
    
    /* Hide less important elements */
    .card-excerpt,
    .article-excerpt {
        display: none !important;
    }
    
    /* Container padding */
    .container,
    .revved-container {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
    
    /* Footer simplification */
    .footer-grid {
        display: block !important;
        text-align: center !important;
    }
    
    .footer-grid > * {
        margin-bottom: 24px !important;
    }
}
