/* ============================================
   MOBILE ENHANCEMENTS - ULTRA PREMIUM
   Esenler Sürücü Kursu
   ============================================ */

/* Mobile-First Base Styles */
body {
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Improved Touch Targets */
a, button, input, select, textarea {
    min-height: 44px;
    min-width: 44px;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Prevent iOS Text Size Adjustment */
body {
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Safe Area Support (Notch devices) */
@supports (padding: max(0px)) {
    body {
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
    }
}

/* Mobile Navigation Enhancement */
@media (max-width: 768px) {
    .main-nav {
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .main-nav.active {
        transform: translateX(0);
    }
    
    /* Smooth menu animation */
    .main-nav ul li {
        opacity: 0;
        transform: translateX(-20px);
        animation: slideInNav 0.3s forwards;
    }
    
    .main-nav.active ul li {
        animation-play-state: running;
    }
    
    .main-nav ul li:nth-child(1) { animation-delay: 0.1s; }
    .main-nav ul li:nth-child(2) { animation-delay: 0.15s; }
    .main-nav ul li:nth-child(3) { animation-delay: 0.2s; }
    .main-nav ul li:nth-child(4) { animation-delay: 0.25s; }
    .main-nav ul li:nth-child(5) { animation-delay: 0.3s; }
    .main-nav ul li:nth-child(6) { animation-delay: 0.35s; }
}

@keyframes slideInNav {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Mobile Image Optimization */
@media (max-width: 768px) {
    img {
        max-width: 100%;
        height: auto;
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Mobile Font Optimization */
@media (max-width: 480px) {
    h1 { font-size: 28px; }
    h2 { font-size: 24px; }
    h3 { font-size: 20px; }
    h4 { font-size: 18px; }
    p { font-size: 14px; }
}

/* Landscape Mode Optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-slider {
        height: 400px !important;
    }
}

/* Touch Device Optimization */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects */
    *:hover {
        transition: none !important;
    }
    
    /* Better tap highlight */
    * {
        -webkit-tap-highlight-color: rgba(255, 107, 53, 0.2);
    }
}

/* Performance Optimization */
@media (max-width: 768px) {
    /* Reduce animation complexity */
    * {
        will-change: auto !important;
    }
    
    /* Optimize transforms */
    .stat-card,
    .course-card,
    .feature-item {
        transform: translateZ(0);
        backface-visibility: hidden;
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* iOS Specific Fixes */
@supports (-webkit-touch-callout: none) {
    /* Fix iOS scroll bounce */
    body {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Fix iOS input zoom */
    input, select, textarea {
        font-size: 16px !important;
    }
}

/* Mobile Table Fix */
@media (max-width: 768px) {
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* Mobile Video Responsive */
@media (max-width: 768px) {
    video,
    iframe {
        max-width: 100%;
        height: auto;
    }
}

/* Mobile Grid Optimization */
@media (max-width: 768px) {
    [class*="grid"] {
        grid-template-columns: 1fr !important;
    }
}

/* Mobile Button Optimization */
@media (max-width: 768px) {
    .btn-primary,
    .btn-secondary {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        padding: 16px 32px;
        font-size: 16px;
    }
}

/* Mobile Modal Fix */
@media (max-width: 768px) {
    [class*="modal"],
    [class*="popup"] {
        width: 90% !important;
        max-width: 100% !important;
        margin: 0 auto;
    }
}

/* Loading Performance */
@media (max-width: 768px) {
    /* Lazy load images */
    img[loading="lazy"] {
        background: rgba(255, 255, 255, 0.05);
    }
}

/* Mobile Forms */
@media (max-width: 768px) {
    input,
    textarea,
    select {
        width: 100%;
        padding: 14px 16px;
        font-size: 16px;
        border-radius: 8px;
    }
}

/* Orientation Change Handler */
@media (orientation: portrait) {
    .landscape-only {
        display: none !important;
    }
}

@media (orientation: landscape) {
    .portrait-only {
        display: none !important;
    }
}

/* Dark Mode Mobile */
@media (prefers-color-scheme: dark) and (max-width: 768px) {
    :root {
        --dark-bg: #000000;
        --dark-surface: #0a0a0a;
    }
}

