/* ========================================
   Responsive Breakpoints
   - Desktop: 1200px+
   - Laptop: 1024px - 1199px
   - Tablet: 768px - 1023px
   - Mobile: 480px - 767px
   - Small Mobile: < 480px
   ======================================== */

/* ========================================
   Large Desktop (1400px+)
   ======================================== */
@media (min-width: 1400px) {
    :root {
        --container-max: 1320px;
    }
    
    .hero h1 {
        font-size: 3.5rem;
    }
    
    .hero h1 .highlight {
        font-size: 4rem;
    }
}

/* ========================================
   Desktop (1200px - 1399px)
   ======================================== */
@media (max-width: 1399px) {
    :root {
        --container-max: 1140px;
    }
}

/* ========================================
   Laptop (1024px - 1199px)
   ======================================== */
@media (max-width: 1199px) {
    :root {
        --container-max: 960px;
        --space-4xl: 80px;
    }
    
    .services-grid.cols-6 {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: 1.5fr 1fr 1fr 1fr;
        gap: var(--space-xl);
    }
}

/* ========================================
   Tablet (768px - 1023px)
   ======================================== */
@media (max-width: 1023px) {
    :root {
        --container-max: 720px;
        --header-height: 70px;
        --space-4xl: 64px;
        --space-3xl: 48px;
    }
    
    /* Header */
    .nav-menu {
        position: fixed;
        top: var(--header-height);
        right: -100%;
        width: 300px;
        height: calc(100vh - var(--header-height));
        background: var(--bg-secondary);
        flex-direction: column;
        align-items: stretch;
        padding: var(--space-lg);
        gap: var(--space-sm);
        overflow-y: auto;
        transition: right var(--transition-base);
        border-left: 1px solid var(--border-primary);
        z-index: var(--z-fixed);
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-menu::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: 
            radial-gradient(circle at top right, rgba(0, 240, 255, 0.05), transparent 50%),
            radial-gradient(circle at bottom left, rgba(255, 0, 255, 0.05), transparent 50%);
        pointer-events: none;
    }
    
    .hamburger {
        display: flex;
    }
    
    .nav-actions {
        display: none;
    }
    
    .nav-link {
        padding: var(--space-md);
        border: 1px solid var(--border-muted);
        border-radius: var(--radius-md);
        justify-content: space-between;
    }
    
    .btn-primary-nav {
        border: none;
        justify-content: center;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        max-height: 0;
        overflow: hidden;
        padding: 0;
        border: none;
        background: rgba(0, 0, 0, 0.2);
        box-shadow: none;
        border-radius: var(--radius-md);
        margin-top: var(--space-sm);
        transition: max-height var(--transition-base), padding var(--transition-base);
    }
    
    .dropdown-menu::before {
        display: none;
    }
    
    .nav-item.active .dropdown-menu {
        max-height: 500px;
        padding: var(--space-sm);
    }
    
    /* Hero */
    .hero h1 {
        font-size: var(--text-3xl);
    }
    
    .hero h1 .highlight {
        font-size: var(--text-4xl);
    }
    
    /* Services */
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .services-grid.cols-6 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-col:first-child {
        grid-column: span 2;
    }
    
    /* Corners */
    .corner {
        width: 50px;
        height: 50px;
    }
    
    .corner-tl,
    .corner-bl {
        left: 10px;
    }
    
    .corner-tr,
    .corner-br {
        right: 10px;
    }
    
    .corner-tl,
    .corner-tr {
        top: 10px;
    }
    
    .corner-bl,
    .corner-br {
        bottom: 10px;
    }
}

/* ========================================
   Mobile (480px - 767px)
   ======================================== */
@media (max-width: 767px) {
    :root {
        --container-padding: 15px;
        --header-height: 65px;
        --space-4xl: 48px;
        --space-3xl: 40px;
        --space-2xl: 32px;
    }
    
    /* Typography */
    h1 {
        font-size: var(--text-2xl);
    }
    
    h2 {
        font-size: var(--text-xl);
    }
    
    h3 {
        font-size: var(--text-lg);
    }
    
    /* Section Header */
    .section-header {
        margin-bottom: var(--space-2xl);
    }
    
    .section-header h2 {
        font-size: var(--text-xl);
    }
    
    .section-header p {
        font-size: var(--text-sm);
    }
    
    /* Header */
    .logo {
        font-size: var(--text-lg);
    }
    
    .logo-icon {
        width: 35px;
        height: 35px;
    }
    
    .nav-menu {
        width: 100%;
        right: -100%;
    }
    
    /* Hero */
    .hero {
        padding: calc(var(--header-height) + var(--space-2xl)) 0 var(--space-2xl);
        min-height: auto;
    }
    
    .hero h1 {
        font-size: var(--text-xl);
        line-height: 1.5;
    }
    
    .hero h1 .highlight {
        font-size: var(--text-2xl);
    }
    
    .hero-description {
        font-size: var(--text-sm);
        margin-bottom: var(--space-xl);
    }
    
    .search-box {
        flex-direction: column;
        padding: var(--space-sm);
        border-radius: var(--radius-lg);
        margin-bottom: var(--space-xl);
    }
    
    .search-box input {
        width: 100%;
        text-align: center;
        padding: var(--space-md);
    }
    
    .search-btn {
        width: 100%;
        border-radius: var(--radius-md);
    }
    
    .social-buttons {
        gap: var(--space-sm);
    }
    
    .social-btn {
        padding: var(--space-sm) var(--space-md);
    }
    
    .social-btn span {
        display: none;
    }
    
    .social-btn i {
        font-size: var(--text-lg);
    }
    
    /* Features */
    .features {
        padding: var(--space-3xl) 0;
    }
    
    .slider-btn {
        display: none;
    }
    
    .features-track {
        padding: var(--space-md) var(--space-sm);
        gap: var(--space-md);
    }
    
    .feature-card {
        width: 160px;
        padding: var(--space-lg) var(--space-md);
    }
    
    .feature-icon {
        width: 55px;
        height: 55px;
    }
    
    .feature-icon i {
        font-size: 26px;
    }
    
    .feature-card h3 {
        font-size: var(--text-xs);
    }
    
    /* Services */
    .services-section {
        padding: var(--space-3xl) 0;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
    }
    
    .services-grid.cols-6 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .service-card {
        padding: var(--space-lg) var(--space-sm);
    }
    
    .service-icon {
        width: 50px;
        height: 50px;
    }
    
    .service-icon i {
        font-size: 22px;
    }
    
    .service-card h3 {
        font-size: var(--text-xs);
    }
    
    /* Banner */
    .banner-section {
        padding: var(--space-2xl) 0;
    }
    
    .banner-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    .banner-card {
        height: 200px;
    }
    
    .banner-content {
        padding: var(--space-lg);
    }
    
    .banner-content h3 {
        font-size: var(--text-lg);
    }
    
    .banner-content p {
        font-size: var(--text-sm);
    }
    
    /* Footer */
    .footer {
        padding: var(--space-3xl) 0 var(--space-lg);
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
        text-align: center;
    }
    
    .footer-col:first-child {
        grid-column: auto;
    }
    
    .footer-col h4::after {
        right: 50%;
        transform: translateX(50%);
    }
    
    .footer-col ul li a {
        justify-content: center;
        padding-right: 0;
    }
    
    .footer-col ul li a::before {
        display: none;
    }
    
    .footer-logo {
        justify-content: center;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .contact-info li {
        justify-content: center;
    }
    
    /* Back to Top */
    .back-to-top {
        bottom: 20px;
        left: 20px;
        width: 45px;
        height: 45px;
    }
    
    /* Corners - Hide on mobile */
    .corner {
        display: none;
    }
}

/* ========================================
   Small Mobile (< 480px)
   ======================================== */
@media (max-width: 479px) {
    :root {
        --container-padding: 12px;
        --space-3xl: 32px;
        --space-2xl: 24px;
    }
    
    /* Header */
    .logo {
        font-size: var(--text-base);
    }
    
    .logo-icon {
        width: 30px;
        height: 30px;
    }
    
    .hamburger {
        width: 36px;
        height: 36px;
    }
    
    /* Hero */
    .hero h1 {
        font-size: var(--text-lg);
    }
    
    .hero h1 .highlight {
        font-size: var(--text-xl);
    }
    
    .hero-description {
        font-size: var(--text-xs);
    }
    
    .social-btn {
        padding: var(--space-xs) var(--space-sm);
    }
    
    .social-btn i {
        font-size: var(--text-base);
    }
    
    /* Features */
    .feature-card {
        width: 140px;
        padding: var(--space-md);
    }
    
    .feature-icon {
        width: 45px;
        height: 45px;
        margin-bottom: var(--space-sm);
    }
    
    .feature-icon i {
        font-size: 22px;
    }
    
    /* Services */
    .services-grid {
        gap: var(--space-sm);
    }
    
    .service-card {
        padding: var(--space-md) var(--space-xs);
    }
    
    .service-icon {
        width: 40px;
        height: 40px;
        margin-bottom: var(--space-sm);
    }
    
    .service-icon i {
        font-size: 18px;
    }
    
    .service-card h3 {
        font-size: 10px;
        line-height: 1.4;
    }
    
    /* Banner */
    .banner-card {
        height: 160px;
    }
    
    .banner-content {
        padding: var(--space-md);
    }
    
    .banner-content h3 {
        font-size: var(--text-base);
    }
    
    .banner-content p {
        font-size: var(--text-xs);
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    /* Footer */
    .footer-logo {
        font-size: var(--text-lg);
    }
    
    .footer-col h4 {
        font-size: var(--text-base);
    }
    
    .footer-col p,
    .footer-col ul li a {
        font-size: var(--text-xs);
    }
    
    .footer-social a {
        width: 38px;
        height: 38px;
        font-size: var(--text-base);
    }
    
    .footer-bottom p {
        font-size: var(--text-xs);
    }
    
    /* Back to Top */
    .back-to-top {
        bottom: 15px;
        left: 15px;
        width: 40px;
        height: 40px;
        font-size: var(--text-base);
    }
}

/* ========================================
   Landscape Mobile
   ======================================== */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: calc(var(--header-height) + var(--space-lg)) 0 var(--space-lg);
    }
    
    .hero h1 {
        font-size: var(--text-xl);
        margin-bottom: var(--space-md);
    }
    
    .hero-description {
        display: none;
    }
    
    .search-box {
        margin-bottom: var(--space-md);
    }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    .header,
    .scanner-line,
    .cyber-grid,
    .orb,
    .corner,
    .particles,
    .back-to-top,
    .hamburger,
    .social-buttons,
    .search-box {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .hero {
        min-height: auto;
        padding: 20px 0;
    }
    
    .hero-bg {
        display: none;
    }
    
    .service-card,
    .feature-card {
        border: 1px solid #ccc;
        box-shadow: none;
    }
}

/* ========================================
   Reduced Motion
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .scanner-line,
    .particle,
    .orb {
        animation: none;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* ========================================
   High Contrast Mode
   ======================================== */
@media (prefers-contrast: high) {
    :root {
        --neon-blue: #00ffff;
        --neon-pink: #ff00ff;
        --text-primary: #ffffff;
        --text-secondary: #e0e0e0;
        --border-primary: rgba(255, 255, 255, 0.5);
    }
    
    .service-card,
    .feature-card,
    .banner-card {
        border-width: 2px;
    }
}

/* ========================================
   Dark Mode (System Preference)
   ======================================== */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #0a0a0f;
        --bg-secondary: #0d0d14;
        --text-primary: #ffffff;
    }
}

/* ========================================
   Touch Device Optimizations
   ======================================== */
@media (hover: none) and (pointer: coarse) {
    .service-card:hover,
    .feature-card:hover,
    .banner-card:hover {
        transform: none;
    }
    
    .service-card:active,
    .feature-card:active,
    .banner-card:active {
        transform: scale(0.98);
    }
    
    .nav-link:hover {
        background: transparent;
    }
    
    .dropdown-menu {
        display: none;
    }
    
    .nav-item.active .dropdown-menu {
        display: block;
    }
}