/*
 * Sanad AI - Mobile Optimizations
 * Clean, accessible, performance-focused
 */

/* ============================================
   Core Mobile Adjustments
   ============================================ */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.25rem;
        line-height: 1.15;
    }

    .hero-subtitle {
        font-size: 1.15rem;
        line-height: 1.4;
    }

    .hero-description {
        font-size: 1rem;
        line-height: 1.7;
    }

    .section-title {
        font-size: 1.875rem;
        line-height: 1.25;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    .feature-card {
        padding: 1.5rem;
    }

    .feature-icon {
        width: 3.5rem;
        height: 3.5rem;
    }

    .mobile-padding {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .mobile-gap {
        gap: 1rem;
    }

    /* Better section spacing on mobile */
    section {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
}

/* ============================================
   Touch-Friendly Buttons
   ============================================ */
.btn-touch {
    min-height: 48px;
    min-width: 48px;
    touch-action: manipulation;
    font-weight: 600;
}

.btn-touch:active {
    transform: scale(0.97);
    transition: transform 0.1s ease;
}

.btn-touch:focus-visible {
    outline: 2px solid var(--vivid-indigo);
    outline-offset: 2px;
}

/* ============================================
   Mobile Navigation
   ============================================ */
.mobile-nav-item {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.mobile-nav-item:hover {
    background-color: rgba(68, 60, 206, 0.15);
}

.mobile-nav-item:last-child {
    border-bottom: none;
}

/* ============================================
   Mobile Form Inputs
   ============================================ */
.mobile-form-input {
    font-size: 16px; /* Prevents iOS zoom */
    padding: 0.875rem;
    border: 2px solid var(--light-gray);
    border-radius: 0.75rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.mobile-form-input:focus {
    border-color: var(--vivid-indigo);
    box-shadow: 0 0 0 3px rgba(68, 60, 206, 0.1);
    outline: none;
}

/* ============================================
   Touch Target Sizing
   ============================================ */
@media (max-width: 768px) {
    .btn-touch {
        min-height: 44px;
        min-width: 44px;
    }
}

/* ============================================
   Small Phone Adjustments
   ============================================ */
@media (max-width: 480px) {
    html {
        font-size: 15px;
    }

    .hero-title {
        font-size: 1.875rem;
    }

    .hero-subtitle {
        font-size: 1.05rem;
    }

    .section-title {
        font-size: 1.625rem;
    }
}

/* Extra-Small Screens */
@media (max-width: 360px) {
    .container-custom {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .mobile-padding {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

/* ============================================
   Landscape Orientation
   ============================================ */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        min-height: auto;
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    nav {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
}

/* ============================================
   Disable Hover on Touch Devices
   ============================================ */
@media (max-width: 768px) and (hover: none) {
    .card-hover-rise:hover,
    .feature-card:hover {
        transform: none;
    }
}

/* ============================================
   Mobile Fade-In Effect
   ============================================ */
.mobile-fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.mobile-fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   Mobile Bottom Action Bar
   ============================================ */
.mobile-bottom-bar {
    background: rgba(6, 11, 39, 0.96);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(68, 60, 206, 0.2);
}

/* ============================================
   Mobile Interactive Feedback
   ============================================ */
@media (max-width: 768px) {
    .mobile-interactive {
        transition: all 0.2s ease;
    }

    .mobile-interactive:active {
        transform: scale(0.98);
    }

    .mobile-accessible {
        min-height: 44px;
        min-width: 44px;
        padding: 0.75rem;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    nav, .mobile-bottom-bar, #lang-toggle {
        display: none !important;
    }

    * {
        background: white !important;
        color: var(--midnight-blue) !important;
    }

    .gradient-text, .stat-number {
        color: var(--midnight-blue) !important;
        -webkit-text-fill-color: var(--midnight-blue) !important;
    }
}
