/* Mobile Header Enhancements */

/* Ensure header navigation takes precedence over page navigation */
.podcast-header .header-nav {
    position: relative;
    z-index: 10000;
}

/* Override any conflicting styles from other nav elements */
.podcast-header nav,
.podcast-header .header-nav {
    position: absolute !important;
    background: rgba(15, 23, 42, 0.98) !important;
    backdrop-filter: blur(20px) !important;
    border-radius: 0 !important;
    filter: none !important;
    opacity: 1 !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
}

/* Improve touch targets for mobile devices */
@media (max-width: 768px) {
    /* Ensure all clickable elements meet minimum touch target size */
    .podcast-header .mobile-menu-btn,
    .podcast-header .subscribe-btn,
    .podcast-header .nav-link {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Add visual feedback for touch interactions */
    .podcast-header .mobile-menu-btn:active,
    .podcast-header .subscribe-btn:active,
    .podcast-header .nav-link:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
    
    /* Prevent text selection on buttons */
    .podcast-header .mobile-menu-btn,
    .podcast-header .subscribe-btn {
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Improve mobile menu overlay */
    .podcast-header .header-nav.open {
        animation: mobileSlideDown 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        z-index: 10001;
    }
    
    @keyframes mobileSlideDown {
        0% {
            opacity: 0;
            transform: translateY(-15px);
        }
        100% {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    /* Add backdrop blur for mobile menu */
    .podcast-header .header-nav.open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.3);
        backdrop-filter: blur(5px);
        z-index: -1;
        animation: fadeIn 0.25s ease;
    }
    
    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }
    
    /* Better spacing for mobile nav items */
    .podcast-header .nav-item:not(:last-child) {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    /* Improve logo touch area */
    .podcast-header .podcast-logo {
        padding: 0.5rem;
        margin: -0.5rem;
        border-radius: 12px;
        transition: background-color 0.2s ease;
    }
    
    .podcast-header .podcast-logo:active {
        background: rgba(255, 255, 255, 0.1);
    }
}

/* Landscape orientation adjustments */
@media (max-width: 768px) and (orientation: landscape) {
    .podcast-header .header-container {
        padding: 0.5rem 1rem;
    }
    
    .podcast-header .logo-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
    
    .podcast-header .brand-title {
        font-size: 1.1rem;
    }
    
    .podcast-header .brand-subtitle {
        font-size: 0.65rem;
    }
    
    body {
        padding-top: 60px;
    }
}

/* Very small devices improvements */
@media (max-width: 375px) {
    /* Optimize for single-hand usage */
    .podcast-header .header-container {
        grid-template-columns: 1fr auto auto;
        align-items: center;
    }
    
    .podcast-header .podcast-logo {
        justify-self: start;
    }
    
    .podcast-header .header-actions {
        gap: 0.5rem;
    }
    
    /* Stack brand text more efficiently */
    .podcast-header .brand-text {
        gap: 0;
    }
    
    .podcast-header .brand-subtitle {
        line-height: 1;
        margin-top: -2px;
    }
}

/* Dark mode support for mobile */
@media (prefers-color-scheme: dark) and (max-width: 768px) {
    .podcast-header .header-nav {
        background: rgba(0, 0, 0, 0.95);
        border-top-color: rgba(255, 255, 255, 0.15);
    }
    
    .podcast-header .nav-link {
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(255, 255, 255, 0.15);
    }
    
    .podcast-header .mobile-menu-btn {
        background: rgba(255, 255, 255, 0.12);
        border-color: rgba(255, 255, 255, 0.25);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) and (max-width: 768px) {
    .podcast-header .nav-link {
        border-width: 2px;
        font-weight: 700;
    }
    
    .podcast-header .mobile-menu-btn {
        border-width: 2px;
    }
    
    .podcast-header .subscribe-btn {
        border: 2px solid rgba(255, 255, 255, 0.5);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .podcast-header .header-nav.open,
    .podcast-header .mobile-menu-btn:hover,
    .podcast-header .subscribe-btn:hover,
    .podcast-header .nav-link:hover {
        animation: none;
        transition: none;
    }
    
    .podcast-header .podcast-logo:hover {
        transform: none;
    }
}
