/* ============================================
   MOBILE RESPONSIVE - FRUTIGER AERO MOBILE
   Transforms Vista desktop interface into mobile-friendly cards
   ============================================ */

@media (max-width: 768px) {
    /* Hide desktop-specific elements */
    .vista-desktop-icon-recycle {
        display: none !important;
    }
    
    /* Body adjustments for mobile */
    .vista-desktop-refined {
        overflow-y: auto !important;
        overflow-x: hidden !important;
        height: auto !important;
        min-height: 100vh;
        padding-bottom: 70px; /* Space for bottom nav */
    }
    
    /* Background GIF - ensure it covers */
    #frutiger-background {
        position: fixed;
        z-index: 0;
    }
    
    /* Make windows full-width cards that stack */
    .vista-glass-window {
        position: relative !important;
        width: calc(100% - 20px) !important;
        max-width: 100% !important;
        height: auto !important;
        max-height: none !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        transform: none !important;
        margin: 10px auto !important;
        border-radius: 12px !important;
        display: block !important;
        z-index: 10 !important;
    }
    
    /* Remove window dragging on mobile */
    .vista-glass-titlebar {
        cursor: default !important;
        user-select: none;
    }
    
    /* Simplify taskbar to bottom navigation */
    .vista-glass-taskbar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 60px;
        flex-direction: row;
        justify-content: space-around;
        padding: 0 5px;
        z-index: 10000;
        border-top: 2px solid rgba(255, 255, 255, 0.3);
    }
    
    .vista-glass-taskbar-items {
        display: flex;
        flex-direction: row;
        justify-content: space-around;
        width: 100%;
        gap: 0;
        flex: 1;
    }
    
    .vista-glass-taskbar-item {
        flex: 1;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 6px 4px;
        font-size: 10px;
        min-width: 0;
        max-width: none;
    }
    
    .vista-glass-taskbar-item img {
        width: 24px !important;
        height: 24px !important;
        margin-bottom: 2px;
    }
    
    .vista-glass-taskbar-item span {
        font-size: 9px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* Hide start button on mobile */
    .vista-glass-start-btn {
        display: none !important;
    }
    
    /* Hide notification tray on mobile */
    .vista-glass-notification {
        display: none !important;
    }
    
    /* Hide start menu on mobile (or make it a drawer) */
    .vista-glass-startmenu {
        display: none !important;
    }
    
    /* Make content scrollable and properly sized */
    .vista-glass-content {
        max-height: none !important;
        overflow-y: visible !important;
        padding: 20px !important;
    }
    
    /* Adjust window titles for mobile */
    .vista-glass-titlebar {
        padding: 12px 15px;
        min-height: 44px;
    }
    
    .vista-glass-title {
        font-size: 14px !important;
    }
    
    /* Simplify window controls */
    .vista-glass-control-btn {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    /* Make buttons full-width on mobile */
    .vista-glass-button,
    .vista-glass-button-primary {
        width: 100%;
        margin: 8px 0;
        padding: 12px 20px !important;
        font-size: 14px !important;
    }
    
    /* Button groups stack vertically */
    div[style*="display: flex"][style*="gap"] {
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    /* Adjust text sizes for readability */
    h1 { 
        font-size: 24px !important; 
        margin-bottom: 15px !important;
    }
    h2 { 
        font-size: 20px !important; 
        margin-bottom: 12px !important;
    }
    h3 { 
        font-size: 18px !important; 
        margin-bottom: 10px !important;
    }
    
    p {
        font-size: 15px !important;
        line-height: 1.6 !important;
    }
    
    /* Skills grid - 2 columns on mobile */
    .skills-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }
    
    .skill-item {
        padding: 12px !important;
    }
    
    /* Profile images */
    .profile-image {
        width: 120px !important;
        height: 120px !important;
    }
    
    /* Project cards stack */
    .portfolio-project-card {
        width: 100% !important;
        margin: 15px 0 !important;
    }
    
    /* Contact form full width */
    .vista-glass-input,
    .vista-glass-textarea {
        width: 100% !important;
        font-size: 16px !important; /* Prevents zoom on iOS */
    }
    
    /* Social links - horizontal scroll or wrap */
    .vista-glass-content > div[style*="display: flex"][style*="justify-content: center"] {
        flex-wrap: wrap !important;
        gap: 10px !important;
    }
    
    /* Maximized windows on mobile - full screen modal */
    .vista-glass-window[data-maximized="true"] {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 60px !important; /* Above taskbar */
        width: 100% !important;
        height: calc(100vh - 60px) !important;
        margin: 0 !important;
        border-radius: 0 !important;
        z-index: 9999 !important;
    }
    
    /* Welcome window adjustments */
    #welcome-window {
        margin-top: 20px !important;
    }
}

@media (max-width: 480px) {
    /* Even smaller adjustments for phones */
    .vista-glass-window {
        width: calc(100% - 10px) !important;
        margin: 5px auto !important;
        border-radius: 8px !important;
    }
    
    .vista-glass-content {
        padding: 15px !important;
    }
    
    .skills-grid {
        grid-template-columns: 1fr !important;
    }
    
    h1 { font-size: 20px !important; }
    h2 { font-size: 18px !important; }
    h3 { font-size: 16px !important; }
    
    .vista-glass-titlebar {
        padding: 10px 12px;
        min-height: 40px;
    }
    
    .vista-glass-title {
        font-size: 13px !important;
    }
    
    .profile-image {
        width: 100px !important;
        height: 100px !important;
    }
    
    /* Taskbar even more compact */
    .vista-glass-taskbar {
        height: 55px;
    }
    
    .vista-glass-taskbar-item {
        padding: 4px 2px;
    }
    
    .vista-glass-taskbar-item img {
        width: 20px !important;
        height: 20px !important;
    }
    
    .vista-glass-taskbar-item span {
        font-size: 8px;
    }
}

/* Touch-friendly adjustments */
@media (hover: none) and (pointer: coarse) {
    /* Larger tap targets */
    .vista-glass-button,
    .vista-glass-button-primary,
    .vista-glass-control-btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Remove hover effects on touch devices */
    .vista-glass-button:hover,
    .vista-glass-button-primary:hover {
        transform: none;
    }
}

