/* Mobile Experience Enhancements */

/* Touch-friendly button sizes */
.touch-target {
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Enhanced mobile menu */
@media (max-width: 768px) {
    /* Mobile menu improvements */
    [data-mobile-menu] {
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
        border-radius: 0 0 16px 16px;
        animation: slideDown 0.3s ease-out;
    }
    
    [data-mobile-menu] nav {
        padding: 2rem 1.5rem;
        gap: 1.5rem;
    }
    
    [data-mobile-menu] .nav-link {
        padding: 1rem 1.5rem;
        border-radius: 12px;
        width: 100%;
        text-align: center;
        font-size: 1.125rem;
        font-weight: 500;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    [data-mobile-menu] .nav-link:hover,
    [data-mobile-menu] .nav-link:focus {
        background: rgba(6, 182, 212, 0.2);
        border-color: rgba(6, 182, 212, 0.3);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(6, 182, 212, 0.2);
    }
    
    /* Mobile menu button enhancements */
    [data-mobile-menu-button] {
        padding: 0.75rem;
        border-radius: 8px;
        transition: all 0.3s ease;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    [data-mobile-menu-button]:hover,
    [data-mobile-menu-button]:focus {
        background: rgba(6, 182, 212, 0.2);
        border-color: rgba(6, 182, 212, 0.3);
        transform: scale(1.05);
    }
    
    [data-mobile-menu-button][aria-expanded="true"] {
        background: rgba(6, 182, 212, 0.3);
        border-color: rgba(6, 182, 212, 0.5);
    }
    
    /* Improved typography for mobile */
    h1 {
        font-size: 2.5rem !important;
        line-height: 1.2 !important;
        margin-bottom: 1.5rem;
    }
    
    h2 {
        font-size: 2rem !important;
        line-height: 1.3 !important;
        margin-bottom: 1rem;
    }
    
    h3 {
        font-size: 1.5rem !important;
        line-height: 1.4 !important;
        margin-bottom: 0.75rem;
    }
    
    p {
        font-size: 1rem !important;
        line-height: 1.6 !important;
        margin-bottom: 1rem;
    }
    
    /* Enhanced button styles for mobile */
    .btn-primary {
        padding: 1rem 2rem;
        font-size: 1.125rem;
        font-weight: 600;
        border-radius: 12px;
        min-height: 48px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
    }
    
    .btn-primary:hover,
    .btn-primary:focus {
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(6, 182, 212, 0.4);
    }
    
    .btn-primary:active {
        transform: translateY(0);
        box-shadow: 0 2px 8px rgba(6, 182, 212, 0.3);
    }
    
    /* Improved spacing for mobile */
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    section {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
    
    /* Enhanced card styles for mobile */
    .card {
        padding: 1.5rem;
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .card:hover {
        transform: translateY(-4px);
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(6, 182, 212, 0.3);
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
    }
    
    /* FAQ improvements for mobile */
    .faq-item {
        margin-bottom: 1rem;
        border-radius: 12px;
        overflow: hidden;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .faq-button {
        padding: 1.25rem 1.5rem;
        width: 100%;
        text-align: left;
        font-size: 1.125rem;
        font-weight: 500;
        transition: all 0.3s ease;
        background: transparent;
        border: none;
        color: white;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .faq-button:hover,
    .faq-button:focus {
        background: rgba(6, 182, 212, 0.1);
    }
    
    .faq-content {
        padding: 0 1.5rem 1.5rem;
        font-size: 1rem;
        line-height: 1.6;
        color: #d1d5db;
    }
    
    /* Smooth scrolling improvements */
    html {
        scroll-behavior: smooth;
        scroll-padding-top: 80px;
    }
    
    /* Loading states for mobile */
    .loading-state {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 2rem;
        font-size: 1.125rem;
        color: #6b7280;
    }
    
    .loading-spinner {
        width: 24px;
        height: 24px;
        border: 2px solid rgba(6, 182, 212, 0.3);
        border-top: 2px solid #06b6d4;
        border-radius: 50%;
        animation: spin 1s linear infinite;
        margin-right: 0.75rem;
    }
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Enhanced focus styles for accessibility */
@media (max-width: 768px) {
    *:focus {
        outline: 2px solid #06b6d4;
        outline-offset: 2px;
        border-radius: 4px;
    }
    
    /* Skip link for accessibility */
    .skip-link {
        position: absolute;
        top: -40px;
        left: 6px;
        background: #06b6d4;
        color: white;
        padding: 8px;
        text-decoration: none;
        border-radius: 4px;
        z-index: 1000;
        transition: top 0.3s;
    }
    
    .skip-link:focus {
        top: 6px;
    }
}

/* Improved touch feedback */
@media (max-width: 768px) {
    .touch-feedback {
        position: relative;
        overflow: hidden;
    }
    
    .touch-feedback::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.3);
        transform: translate(-50%, -50%);
        transition: width 0.3s, height 0.3s;
    }
    
    .touch-feedback:active::before {
        width: 200px;
        height: 200px;
    }
}

/* Performance optimizations for mobile */
@media (max-width: 768px) {
    /* Reduce motion for better performance */
    .reduce-motion {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    /* GPU acceleration for smooth animations */
    .gpu-accelerated {
        transform: translateZ(0);
        will-change: transform;
    }
    
    /* Optimize images for mobile */
    img {
        max-width: 100%;
        height: auto;
        object-fit: cover;
        border-radius: 8px;
    }
    
    /* Optimize videos for mobile */
    video {
        max-width: 100%;
        height: auto;
        object-fit: cover;
        border-radius: 8px;
    }
}

/* Dark mode enhancements for mobile */
@media (max-width: 768px) and (prefers-color-scheme: dark) {
    .auto-dark-mobile {
        background: #0a0f18;
        color: #f9fafb;
    }
    
    .auto-dark-mobile .card {
        background: rgba(255, 255, 255, 0.03);
        border-color: rgba(255, 255, 255, 0.08);
    }
}

/* High contrast mode for mobile */
@media (max-width: 768px) and (prefers-contrast: high) {
    .high-contrast-mobile {
        border: 2px solid;
        background: transparent;
    }
    
    .high-contrast-mobile .nav-link {
        border: 2px solid;
        background: transparent;
    }
}

/* Reduced motion for mobile */
@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}