/* ===== N3XIA V2 - RESPONSIVE STYLES ===== */

/* ===== BREAKPOINTS ===== */
/* 
- Mobile: 320px - 767px
- Tablet: 768px - 1023px
- Desktop: 1024px - 1439px
- Large Desktop: 1440px+
*/

/* ===== LARGE DESKTOP (1440px+) ===== */
@media (min-width: 1440px) {
    .container {
        max-width: 1400px;
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .section-title {
        font-size: 3rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .ai-visual-container {
        width: 500px;
        height: 500px;
    }
    
    .visual-core {
        width: 140px;
        height: 140px;
        font-size: 5.5rem;
    }
}

/* ===== DESKTOP (1024px - 1439px) ===== */
@media (max-width: 1439px) and (min-width: 1024px) {
    .container {
        max-width: 1200px;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===== TABLET (768px - 1023px) ===== */
@media (max-width: 1023px) and (min-width: 768px) {
    .container {
        padding: 0 var(--space-lg);
    }
    
    /* Navigation */
    .nav-container {
        padding: 0 var(--space-lg);
    }
    
    .nav-menu {
        gap: var(--space-lg);
    }
    
    /* Hero */
    .hero-container {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
        text-align: center;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    /* Services */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-lg);
    }
    
    /* About */
    .about-content {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
        text-align: center;
    }
    
    .about-features {
        max-width: 600px;
        margin: var(--space-2xl) auto 0;
    }
    
    .tech-showcase {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-md);
    }
    
    /* Contact */
    .contact-content {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }
    
    .contact-methods {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-lg);
    }
    
    /* Footer */
    .footer-main {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }
    
    .footer-links {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-lg);
    }
    
    /* Visual Elements */
    .ai-visual-container {
        width: 350px;
        height: 350px;
    }
    
    .visual-core {
        width: 100px;
        height: 100px;
        font-size: 3.5rem;
    }
    
    .neuron {
        width: 16px;
        height: 16px;
    }
}

/* ===== MOBILE LARGE (481px - 767px) ===== */
@media (max-width: 767px) and (min-width: 481px) {
    .container {
        padding: 0 var(--space-md);
    }
    
    /* Navigation */
    .nav-container {
        padding: 0 var(--space-md);
        height: 70px;
    }
    
    .nav-logo {
        font-size: 1.3rem;
    }
    
    .logo-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--bg-primary);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: flex-start;
        padding: var(--space-2xl) var(--space-lg);
        transition: var(--transition-normal);
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-item {
        margin-bottom: var(--space-lg);
    }
    
    .nav-link {
        font-size: 1.1rem;
        padding: var(--space-md) 0;
    }
    
    /* Hero */
    .hero {
        padding: 100px 0 var(--space-2xl);
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: var(--space-lg);
        align-items: center;
    }
    
    .stat-item {
        text-align: center;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
        gap: var(--space-md);
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    /* Services */
    .services {
        padding: var(--space-2xl) 0;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .service-card {
        padding: var(--space-xl);
    }
    
    .service-icon {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
    
    /* About */
    .about {
        padding: var(--space-2xl) 0;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
        text-align: center;
    }
    
    .about-features {
        margin-top: var(--space-xl);
    }
    
    .feature-item {
        flex-direction: column;
        text-align: center;
        gap: var(--space-md);
    }
    
    .tech-showcase {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
    }
    
    .tech-item {
        padding: var(--space-md);
    }
    
    .tech-item i {
        font-size: 1.5rem;
    }
    
    /* Contact */
    .contact {
        padding: var(--space-2xl) 0;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }
    
    .contact-methods {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .contact-form-container {
        padding: var(--space-xl);
    }
    
    /* Footer */
    .footer {
        padding: var(--space-2xl) 0 var(--space-lg);
    }
    
    .footer-main {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }
    
    .footer-links {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }
    
    .footer-legal {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    /* Visual Elements */
    .ai-visual-container {
        width: 300px;
        height: 300px;
    }
    
    .visual-core {
        width: 80px;
        height: 80px;
        font-size: 3rem;
    }
    
    .neuron {
        width: 14px;
        height: 14px;
    }
    
    /* Sections */
    .section-title {
        font-size: 2rem;
    }
    
    .section-description {
        font-size: 1rem;
    }
}

/* ===== MOBILE SMALL (320px - 480px) ===== */
@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-sm);
    }
    
    /* Navigation */
    .nav-container {
        padding: 0 var(--space-sm);
        height: 60px;
    }
    
    .nav-logo {
        font-size: 1.2rem;
    }
    
    .logo-icon {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
    
    .nav-menu {
        top: 60px;
        height: calc(100vh - 60px);
        padding: var(--space-xl) var(--space-md);
    }
    
    .nav-link {
        font-size: 1rem;
    }
    
    /* Hero */
    .hero {
        padding: 80px 0 var(--space-xl);
    }
    
    .hero-container {
        gap: var(--space-lg);
    }
    
    .hero-badge {
        padding: var(--space-xs) var(--space-md);
        font-size: 0.8rem;
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.1;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-stats {
        gap: var(--space-md);
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .hero-actions {
        gap: var(--space-sm);
    }
    
    .btn {
        padding: var(--space-md) var(--space-lg);
        font-size: 0.9rem;
    }
    
    /* Services */
    .services {
        padding: var(--space-xl) 0;
    }
    
    .service-card {
        padding: var(--space-lg);
    }
    
    .service-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-md);
    }
    
    .service-icon {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
    
    .service-title {
        font-size: 1.3rem;
    }
    
    .service-description {
        font-size: 0.9rem;
    }
    
    .service-features {
        font-size: 0.8rem;
    }
    
    /* About */
    .about {
        padding: var(--space-xl) 0;
    }
    
    .about-content {
        gap: var(--space-lg);
    }
    
    .about-features {
        margin-top: var(--space-lg);
    }
    
    .feature-item {
        gap: var(--space-sm);
    }
    
    .feature-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .feature-content h4 {
        font-size: 1rem;
    }
    
    .feature-content p {
        font-size: 0.9rem;
    }
    
    .tech-showcase {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }
    
    .tech-item {
        padding: var(--space-sm);
    }
    
    .tech-item i {
        font-size: 1.3rem;
    }
    
    .tech-item span {
        font-size: 0.8rem;
    }
    
    /* Contact */
    .contact {
        padding: var(--space-xl) 0;
    }
    
    .contact-content {
        gap: var(--space-lg);
    }
    
    .contact-methods {
        gap: var(--space-md);
    }
    
    .contact-method {
        flex-direction: column;
        text-align: center;
        gap: var(--space-sm);
    }
    
    .method-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .method-content h4 {
        font-size: 1rem;
    }
    
    .method-content p {
        font-size: 0.9rem;
    }
    
    .contact-form-container {
        padding: var(--space-lg);
    }
    
    .form-group {
        margin-bottom: var(--space-lg);
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 0.9rem;
    }
    
    /* Footer */
    .footer {
        padding: var(--space-xl) 0 var(--space-md);
    }
    
    .footer-main {
        gap: var(--space-lg);
    }
    
    .footer-brand {
        text-align: center;
    }
    
    .footer-logo {
        justify-content: center;
        font-size: 1.3rem;
    }
    
    .footer-description {
        font-size: 0.9rem;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .social-link {
        width: 35px;
        height: 35px;
    }
    
    .footer-links {
        gap: var(--space-md);
    }
    
    .link-group h4 {
        font-size: 1rem;
    }
    
    .link-group a {
        font-size: 0.9rem;
    }
    
    .footer-bottom {
        gap: var(--space-sm);
    }
    
    .footer-copyright {
        font-size: 0.8rem;
    }
    
    .footer-legal a {
        font-size: 0.8rem;
    }
    
    /* Visual Elements */
    .ai-visual-container {
        width: 250px;
        height: 250px;
    }
    
    .visual-core {
        width: 60px;
        height: 60px;
        font-size: 2.5rem;
    }
    
    .neuron {
        width: 12px;
        height: 12px;
    }
    
    .stream {
        width: 1px;
        height: 60px;
    }
    
    /* Sections */
    .section-badge {
        padding: var(--space-xs) var(--space-md);
        font-size: 0.8rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .section-description {
        font-size: 0.9rem;
    }
    
    /* Scroll Indicator */
    .scroll-indicator {
        bottom: var(--space-lg);
    }
    
    .scroll-arrow {
        width: 35px;
        height: 35px;
    }
    
    .scroll-text {
        font-size: 0.8rem;
    }
}

/* ===== LANDSCAPE ORIENTATION ===== */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 80px 0 var(--space-lg);
    }
    
    .hero-container {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-lg);
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-stats {
        flex-direction: row;
        gap: var(--space-lg);
    }
    
    .ai-visual-container {
        width: 200px;
        height: 200px;
    }
    
    .visual-core {
        width: 50px;
        height: 50px;
        font-size: 2rem;
    }
}

/* ===== HIGH DPI DISPLAYS ===== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo-icon,
    .service-icon,
    .feature-icon,
    .method-icon {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* ===== REDUCED MOTION ===== */
@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;
    }
    
    .gradient-orb,
    .particle,
    .neuron,
    .stream {
        animation: none;
    }
    
    .custom-cursor {
        display: none;
    }
}

/* ===== DARK MODE PREFERENCES ===== */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #0F0F23;
        --bg-secondary: #1A1A2E;
        --bg-tertiary: #16213E;
        --text-primary: #FFFFFF;
        --text-secondary: #A1A1AA;
        --text-muted: #71717A;
        --border-color: rgba(255, 255, 255, 0.1);
    }
}

/* ===== LIGHT MODE PREFERENCES ===== */
@media (prefers-color-scheme: light) {
    :root {
        --bg-primary: #FFFFFF;
        --bg-secondary: #F8FAFC;
        --bg-tertiary: #F1F5F9;
        --text-primary: #1F2937;
        --text-secondary: #4B5563;
        --text-muted: #6B7280;
        --border-color: rgba(0, 0, 0, 0.1);
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .navbar,
    .hero-visual,
    .animated-background,
    .custom-cursor,
    .scroll-indicator,
    .btn,
    .social-links,
    .footer {
        display: none !important;
    }
    
    .hero,
    .services,
    .about,
    .contact {
        padding: var(--space-md) 0;
    }
    
    .hero-container,
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .service-card,
    .contact-form-container {
        border: 1px solid #000;
        box-shadow: none;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .section-title,
    .hero-title {
        color: black !important;
    }
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
@media (prefers-contrast: high) {
    :root {
        --border-color: rgba(255, 255, 255, 0.3);
        --text-secondary: #FFFFFF;
        --text-muted: #CCCCCC;
    }
    
    .btn-primary {
        border: 2px solid #FFFFFF;
    }
    
    .service-card,
    .contact-form-container {
        border: 2px solid var(--border-color);
    }
}

/* ===== FOCUS STYLES ===== */
@media (prefers-reduced-motion: no-preference) {
    *:focus {
        outline: 2px solid var(--primary-purple);
        outline-offset: 2px;
    }
    
    .btn:focus,
    .nav-link:focus,
    .social-link:focus {
        outline: 2px solid var(--primary-purple);
        outline-offset: 2px;
    }
}

/* ===== HOVER SUPPORT ===== */
@media (hover: hover) {
    .service-card:hover,
    .tech-item:hover,
    .social-link:hover {
        transform: translateY(-5px);
    }
}

@media (hover: none) {
    .service-card:hover,
    .tech-item:hover,
    .social-link:hover {
        transform: none;
    }
}

/* ===== TOUCH DEVICES ===== */
@media (pointer: coarse) {
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .nav-link {
        padding: var(--space-md) var(--space-sm);
    }
    
    .social-link {
        min-height: 44px;
        min-width: 44px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        min-height: 44px;
    }
}

/* ===== FOLDABLE DEVICES ===== */
@media (min-width: 280px) and (max-width: 653px) and (min-height: 300px) {
    .hero-container {
        padding: var(--space-md);
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    .tech-showcase {
        grid-template-columns: repeat(2, 1fr);
    }
}
