/* Responsive Design */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .why-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    /* Navigation */
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(55, 65, 81, 0.98);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow);
        padding: 20px 0;
        backdrop-filter: blur(20px);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    /* Hero */
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-graphic {
        height: 300px;
    }
    
    .hero-graphic {
        height: 300px;
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, 1fr);
        gap: 15px;
        padding: 20px;
    }
    
    .floating-card {
        padding: 15px;
        font-size: 0.9rem;
        height: 100px;
        min-width: 130px;
    }
    
    /* Arrange cards in single column for mobile */
    .card-1 {
        grid-column: 1;
        grid-row: 1;
    }
    
    .card-2 {
        grid-column: 1;
        grid-row: 2;
    }
    
    .card-3 {
        grid-column: 1;
        grid-row: 3;
    }
    
    .card-4 {
        grid-column: 1;
        grid-row: 4;
    }
    
    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .service-card {
        padding: 20px;
    }
    
    /* Stats */
    .why-stats {
        grid-template-columns: 1fr;
    }
    
    /* Technologies */
    .technologies {
        padding: 30px 0;
    }
    
    .tech-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .tech-category {
        padding: 20px;
    }
    
    /* CTA */
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .service-card {
        padding: 20px;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .tech-category {
        padding: 20px;
    }
    
    .feature {
        gap: 15px;
    }
    
    .feature-icon {
        width: 40px;
        height: 40px;
    }
    
    .floating-card {
        padding: 10px;
        font-size: 0.8rem;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 10px 25px;
        font-size: 0.9rem;
    }
    
    .nav-logo .logo-image {
        height: 30px;
        width: 30px;
    }
    
    .nav-logo h2 {
        font-size: 1.1rem;
    }
}

/* Tablet Portrait */
@media (max-width: 834px) and (min-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Large Mobile Landscape */
@media (max-width: 926px) and (min-width: 768px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 120px 0 80px;
    }
    
    .hero-container {
        min-height: auto;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .hamburger,
    .cta-section,
    .footer {
        display: none;
    }
    
    .hero {
        background: white;
        color: black;
    }
    
    .hero-title,
    .gradient-text {
        color: black;
    }
    
    .service-card,
    .tech-category {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .service-icon,
    .feature-icon {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* 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;
    }
    
    .floating-card {
        animation: none;
    }
    
    .hero::before {
        animation: none;
    }
}

/* Dark Mode Support - Keep consistent greyish theme */
@media (prefers-color-scheme: dark) {
    .navbar {
        background: rgba(55, 65, 81, 0.95);
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
    
    .nav-link {
        color: white;
    }
    
    .nav-logo h2 {
        color: white;
        font-size: 1.3rem;
    }
    
    .nav-logo .logo-image {
        height: 35px;
        width: 35px;
    }
    
    .nav-logo span {
        color: #A50000;
    }
}

/* Container Queries Support */
@container (max-width: 600px) {
    .service-card {
        padding: 20px;
    }
    
    .tech-category {
        padding: 20px;
    }
}