/* Responsive Design - Mobile First Approach */

/* Tablet Styles (max-width: 1024px) */
@media (max-width: 1024px) {
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .about-visual {
        height: 300px;
        margin-top: 40px;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile Styles (max-width: 768px) */
@media (max-width: 768px) {
    .mobile-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 72px;
        right: -100%;
        width: 100%;
        height: calc(100vh - 72px);
        background: var(--light);
        flex-direction: column;
        justify-content: start;
        align-items: center;
        padding: 40px 20px;
        transition: right 0.3s ease;
        z-index: 998;
    }
    
    [data-theme="dark"] .nav-menu {
        background: #0a0f1b;
        border-left: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    [data-theme="dark"] .nav-menu .nav-link {
        color: var(--light);
    }
    
    [data-theme="dark"] .nav-menu .nav-link:hover {
        color: var(--primary-light);
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-controls {
        flex-direction: column;
        gap: 30px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .tech-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .stats {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 20px;
    }
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
    body {
        font-size: 16px;
    }
    
    .container {
        padding: 0 16px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero .subtitle {
        font-size: 1rem;
    }
    
    .btn {
        padding: 14px 28px;
        font-size: 15px;
    }
    
    .services {
        padding: 80px 0;
    }
    
    .services-grid {
        gap: 16px;
    }
    
    .service-card {
        padding: 24px;
    }
    
    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .tech-item {
        padding: 16px 12px;
    }
    
    .contact {
        padding: 80px 0;
    }
    
    .btn-contact {
        padding: 14px 32px;
        font-size: 16px;
    }
}

/* Large Desktop (min-width: 1440px) */
@media (min-width: 1440px) {
    .container {
        max-width: 1400px;
    }
    
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 32px;
    }
    
    .tech-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Print Styles */
@media print {
    header,
    .hero-buttons,
    .scroll-indicator,
    .theme-toggle,
    .lang-switch,
    .mobile-toggle,
    .floating-card,
    footer {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: black;
        background: white;
    }
    
    .hero {
        min-height: auto;
        padding: 20px 0;
        background: white !important;
    }
    
    .hero h1,
    .hero .subtitle {
        color: black !important;
        -webkit-text-fill-color: black !important;
    }
    
    .services,
    .tech-stack,
    .about,
    .contact {
        padding: 20px 0;
        background: white !important;
    }
    
    .service-card {
        page-break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ddd;
    }
    
    a {
        color: black;
        text-decoration: underline;
    }
    
    .contact h2,
    .section-header h2,
    .about-text h2 {
        color: black;
    }
}

/* 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;
        scroll-behavior: auto !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary: #0052cc;
        --primary-dark: #003d99;
        --gray: #404040;
        --gray-light: #595959;
    }
    
    .service-card,
    .tech-item {
        border-width: 2px;
    }
    
    .btn {
        border-width: 2px;
        font-weight: 700;
    }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 100px 0 60px;
    }
    
    .nav-menu {
        height: calc(100vh - 60px);
        overflow-y: auto;
    }
}