/* Responsive Menu Styles */

/* Desktop styles - keep original horizontal layout */
@media (min-width: 769px) {
    /* Hide mobile header on desktop */
    #ast-mobile-header {
        display: none !important;
    }

    /* Show desktop header */
    #ast-desktop-header {
        display: block !important;
    }

    /* Keep original desktop layout */
    .ast-primary-header-bar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .ast-builder-grid-row {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .site-header-primary-section-left {
        width: auto;
        margin-bottom: 0;
    }

    .site-header-primary-section-right {
        width: auto;
        margin-left: auto;
    }

    .site-branding {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 15px;
    }

    .site-logo-img {
        margin-bottom: 0;
    }

    .site-logo-img img {
        max-width: 60px;
        height: auto;
    }

    .site-title {
        font-size: 20px;
        font-weight: bold;
        color: #333;
        margin: 0;
    }

    /* Desktop menu - horizontal */
    #ast-hf-menu-1 {
        display: flex !important;
        flex-direction: row !important;
        gap: 20px !important;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    #ast-hf-menu-1 .menu-item {
        width: auto;
        margin: 0;
        padding: 0;
    }

    #ast-hf-menu-1 .menu-link {
        display: block;
        padding: 8px 16px;
        background: transparent;
        border: 1px solid transparent;
        border-radius: 4px;
        color: #333;
        text-decoration: none;
        font-weight: 500;
        font-size: 14px;
        transition: all 0.3s ease;
        text-align: center;
        white-space: nowrap;
    }

    #ast-hf-menu-1 .menu-link:hover {
        background: #ffd700;
        border-color: #ffd700;
        color: #333;
        transform: translateY(-2px);
    }

    #ast-hf-menu-1 .current-menu-item .menu-link {
        background: #ffd700;
        border-color: #ffd700;
        color: #333;
        font-weight: 600;
    }
}

/* Mobile styles - vertical layout */
@media (max-width: 768px) {
    /* Hide mobile header completely */
    #ast-mobile-header {
        display: none !important;
    }

    /* Show desktop header but with mobile layout */
    #ast-desktop-header {
        display: block !important;
    }

    /* Mobile header layout */
    .ast-primary-header-bar {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px 0;
    }

    .site-primary-header-wrap {
        width: 100%;
    }

    .ast-builder-grid-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    /* Logo and title section */
    .site-header-primary-section-left {
        width: 100%;
        margin-bottom: 20px;
    }

    .site-branding {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .site-logo-img {
        margin-bottom: 10px;
    }

    .site-logo-img img {
        max-width: 120px;
        height: auto;
    }

    .site-title {
        font-size: 24px;
        font-weight: bold;
        color: #333;
        margin: 0;
    }

    /* Menu section */
    .site-header-primary-section-right {
        width: 100%;
        margin-left: 0;
    }

    .ast-builder-menu-1 {
        width: 100%;
    }

    .ast-main-header-bar-alignment {
        width: 100%;
    }

    .main-header-bar-navigation {
        width: 100%;
    }

    .site-navigation {
        width: 100%;
    }

    .main-navigation {
        width: 100%;
    }

    /* Vertical menu styling for mobile */
    #ast-hf-menu-1 {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        width: 100%;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    #ast-hf-menu-1 .menu-item {
        width: 100%;
        margin: 0;
        padding: 0;
    }

    #ast-hf-menu-1 .menu-link {
        display: block;
        padding: 12px 20px;
        background: #f8f9fa;
        border: 1px solid #e9ecef;
        border-radius: 8px;
        color: #333;
        text-decoration: none;
        font-weight: 500;
        font-size: 16px;
        transition: all 0.3s ease;
        text-align: left;
        width: 100%;
        box-sizing: border-box;
    }

    #ast-hf-menu-1 .menu-link:hover {
        background: #ffd700;
        border-color: #ffd700;
        color: #333;
        transform: translateX(5px);
    }

    #ast-hf-menu-1 .current-menu-item .menu-link {
        background: #ffd700;
        border-color: #ffd700;
        color: #333;
        font-weight: 600;
    }
}

/* Remove existing menu styles that conflict */
.ast-menu-shadow {
    box-shadow: none !important;
}

.submenu-with-border {
    border: none !important;
}

.stack-on-mobile {
    flex-direction: column !important;
}

/* Additional mobile adjustments */
@media (max-width: 480px) {
    .ast-primary-header-bar {
        padding: 15px 0;
    }
    
    .site-logo-img img {
        max-width: 80px;
    }
    
    .site-title {
        font-size: 18px;
    }
    
    #ast-hf-menu-1 .menu-link {
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
    .site-title {
        color: #fff;
    }
    
    #ast-hf-menu-1 .menu-link {
        background: #2c2c2c;
        border-color: #444;
        color: #fff;
    }
    
    #ast-hf-menu-1 .menu-link:hover {
        background: #ffd700;
        border-color: #ffd700;
        color: #333;
    }
    
    #ast-hf-menu-1 .current-menu-item .menu-link {
        background: #ffd700;
        border-color: #ffd700;
        color: #333;
    }
}
