/**
 * Responsive Styles - Mobile First Approach
 * Enhanced mobile experience for AliOne Child Theme
 * 
 * @package AliOne_Child
 * @version 2.0.0
 */

/* Mobile First - Base Styles (320px+) */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    /* Header Mobile */
    .header-content {
        flex-direction: column;
        gap: 20px;
        padding: 15px 0;
    }
    
    .nav-menu {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--glass-bg);
        backdrop-filter: blur(25px);
        border: 1px solid var(--glass-border);
        border-radius: 0 0 20px 20px;
        padding: 20px;
        flex-direction: column;
        gap: 20px;
        z-index: 999;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .mobile-menu-toggle {
        display: block;
        background: var(--glass-bg);
        border: 1px solid var(--glass-border);
        border-radius: 8px;
        padding: 10px;
        color: var(--text-primary);
        font-size: 18px;
        cursor: pointer;
        transition: all var(--transition-normal);
    }
    
    .mobile-menu-toggle:hover {
        background: var(--glass-bg-hover);
        box-shadow: var(--shadow-accent);
    }
    
    /* Hero Mobile */
    .hero {
        padding-top: 120px;
        min-height: 90vh;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .btn-primary-hero,
    .btn-secondary-hero {
        width: 100%;
        max-width: 280px;
        padding: 16px 24px;
        font-size: 16px;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 25px;
        align-items: center;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    /* Dashboard Mockup Mobile */
    .dashboard-mockup {
        transform: none;
        padding: 15px;
    }
    
    .mockup-content {
        width: 100%;
        max-width: 300px;
        height: 200px;
        padding: 15px;
    }
    
    /* Theme Toggle Mobile */
    .theme-toggle {
        right: 15px;
        padding: 12px;
    }
    
    .theme-icon {
        font-size: 20px;
    }
    
    /* WPML Language Switcher Mobile */
    .wpml-language-switcher {
        top: 15px;
        right: 15px;
    }
    
    .current-language {
        padding: 8px 12px;
        min-width: 100px;
    }
    
    .current-language .name {
        display: none;
    }
}

/* Small Mobile (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    /* Hero adjustments */
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-buttons {
        flex-direction: row;
        justify-content: center;
    }
    
    .btn-primary-hero,
    .btn-secondary-hero {
        width: auto;
        min-width: 180px;
    }
    
    .hero-stats {
        flex-direction: row;
        justify-content: center;
        gap: 30px;
    }
    
    /* Dashboard mockup */
    .mockup-content {
        width: 350px;
        height: 250px;
    }
    
    /* Show language name on larger mobile */
    .current-language .name {
        display: inline;
    }
    
    .current-language {
        min-width: 120px;
    }
}

/* Tablet Portrait (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    /* Header */
    .header-content {
        flex-direction: row;
        padding: 18px 0;
    }
    
    .nav-menu {
        display: flex;
        position: static;
        background: none;
        border: none;
        border-radius: 0;
        padding: 0;
        flex-direction: row;
        gap: 30px;
    }
    
    .mobile-menu-toggle {
        display: none;
    }
    
    /* Hero */
    .hero-content {
        grid-template-columns: 1fr 0.8fr;
        gap: 60px;
        text-align: left;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .hero-buttons {
        flex-direction: row;
        justify-content: flex-start;
    }
    
    .hero-stats {
        justify-content: flex-start;
        gap: 40px;
    }
    
    /* Services grid */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    /* Features grid */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

/* Desktop Small (1025px - 1200px) */
@media (min-width: 1025px) and (max-width: 1200px) {
    .container {
        max-width: 1100px;
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Desktop Large (1201px+) */
@media (min-width: 1201px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Add more spacing on large screens */
    .hero {
        padding-top: 120px;
    }
    
    section {
        padding: 120px 0;
    }
}

/* Ultra Wide (1400px+) */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
    
    .hero-title {
        font-size: 4.8rem;
    }
    
    .hero-content {
        gap: 100px;
    }
}

/* Service Cards Responsive */
@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 40px;
    }
    
    .service-card {
        padding: 25px;
        margin: 0 10px;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
    
    .service-title {
        font-size: 1.3rem;
    }
    
    .service-price {
        font-size: 1.1rem;
    }
}

/* Features Responsive */
@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        margin-top: 40px;
    }
    
    .feature-card {
        padding: 25px;
        text-align: center;
    }
    
    .feature-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        margin: 0 auto 15px;
    }
}

/* Section Headers Responsive */
@media (max-width: 768px) {
    .section-title {
        font-size: 2.5rem;
        line-height: 1.3;
    }
    
    .section-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-badge,
    .section-badge {
        font-size: 13px;
        padding: 8px 16px;
    }
}

/* CTA Section Responsive */
@media (max-width: 768px) {
    .cta {
        padding: 80px 0;
    }
    
    .cta-title {
        font-size: 2.2rem;
    }
    
    .cta-description {
        font-size: 1.1rem;
    }
}

/* Landscape Mode for Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 80px 0 60px;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .hero-stats {
        margin-top: 30px;
    }
    
    .dashboard-mockup {
        display: none;
    }
}

/* High-density screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {
    /* Optimize graphics for retina displays */
    .particle {
        transform: translateZ(0);
        backface-visibility: hidden;
    }
    
    .mockup-bar,
    .dot {
        transform: translateZ(0);
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets */
    .nav-link {
        padding: 15px 10px;
    }
    
    .btn-glass,
    .btn-neon {
        padding: 16px 28px;
        min-height: 48px;
    }
    
    .service-button {
        padding: 16px;
        min-height: 48px;
    }
    
    .theme-toggle {
        padding: 18px;
        min-width: 48px;
        min-height: 48px;
    }
    
    .back-to-top {
        width: 55px;
        height: 55px;
        font-size: 22px;
    }
    
    /* Remove hover effects that don't work on touch */
    .service-card:hover,
    .feature-card:hover {
        transform: none;
    }
    
    /* Add touch feedback */
    .service-card:active,
    .feature-card:active {
        transform: scale(0.98);
        transition: transform 0.1s;
    }
    
    .btn-primary-hero:active,
    .btn-secondary-hero:active,
    .service-button:active {
        transform: scale(0.95);
    }
}

/* Print Styles */
@media print {
    .header,
    .theme-toggle,
    .wpml-language-switcher,
    .back-to-top,
    .mesh-background,
    .neon-grid,
    .bg-animation {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .hero,
    .services,
    .features,
    .cta {
        background: white !important;
        color: black !important;
    }
    
    .hero-title,
    .section-title {
        color: black !important;
        background: none !important;
        -webkit-text-fill-color: black !important;
    }
    
    .service-card,
    .feature-card {
        border: 1px solid #ccc !important;
        background: white !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* Reduced Motion Preferences */
@media (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;
    }
    
    .mesh-background,
    .neon-grid,
    .bg-animation {
        display: none;
    }
}

/* Focus Management for Accessibility */
@media (prefers-reduced-motion: no-preference) {
    .fade-up {
        transition: opacity 0.6s ease, transform 0.6s ease;
    }
}