/* Responsive Design Specific Styles */

/* Tablet */
@media (max-width: 991px) {
    .hero-title {
        font-size: 2.75rem;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .about-content .section-title {
        font-size: 2rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .feature-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 767px) {
    .hero-section {
        padding: 80px 0 60px;
        min-height: auto;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .about-content .section-title {
        font-size: 1.75rem;
    }
    
    .about-text {
        font-size: 1rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .service-card {
        padding: 24px 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .stat-item {
        padding: 24px 16px;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .feature-cards-grid {
        grid-template-columns: 1fr;
    }
    
    .feature-card {
        padding: 24px 20px;
    }
    
    /* Loading Animation for Mobile */
@media (max-width: 767px) {
    .loader-spinner {
        width: 40px;
        height: 40px;
    }
    
    /* Mobile-specific animations */
    @keyframes slideInUp {
        from {
            transform: translateY(50px);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }
    
    .mobile-animate {
        animation: slideInUp 0.5s ease;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Increase hit targets */
    .btn, 
    .menu-toggle, 
    .scroll-to-top,
    input[type="submit"],
    input[type="button"] {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Remove hover effects on touch devices */
    .service-card:hover,
    .team-member-card:hover,
    .testimonial-card:hover,
    .project-card:hover {
        transform: none;
        box-shadow: var(--shadow-md);
    }
    
    /* Improve touch scrolling */
    .modal-content {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Disable smooth scroll on touch devices */
    html {
        scroll-behavior: auto;
    }
}

/* High DPI Screens */
@media (-webkit-min-device-pixel-ratio: 2), 
       (min-resolution: 192dpi) {
    /* Use higher resolution background images */
    .hero-section {
        background-image: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    }
    
    /* Crisper borders */
    .btn, 
    input, 
    textarea,
    .service-card,
    .team-member-card {
        border-width: 0.5px;
    }
}

/* 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;
    }
    
    .animate-on-scroll,
    .fade-in,
    .pulse,
    .shake {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    :root {
        --dark-color: #f5f5f5;
        --light-color: #1a1a1a;
        --text-color: #e0e0e0;
        --text-light: #a0a0a0;
        --border-color: #333;
        --white: #121212;
        --black: #ffffff;
        --shadow-sm: 0 2px 4px rgba(0,0,0,0.3);
        --shadow-md: 0 4px 8px rgba(0,0,0,0.3);
        --shadow-lg: 0 8px 16px rgba(0,0,0,0.3);
        --shadow-xl: 0 12px 24px rgba(0,0,0,0.3);
    }
    
    body {
        background: #121212;
        color: #e0e0e0;
    }
    
    /* Component adjustments for dark mode */
    .service-card,
    .team-member-card,
    .project-card,
    .feature-card,
    .contact-form,
    .modal-content {
        background: #1a1a1a;
        border-color: #333;
        color: #e0e0e0;
    }
    
    input,
    textarea,
    select {
        background: #2a2a2a;
        border-color: #444;
        color: #e0e0e0;
    }
    
    input:focus,
    textarea:focus,
    select:focus {
        background: #2a2a2a;
        border-color: var(--primary-color);
    }
    
    .header-top-bar {
        background: #000;
    }
    
    .site-header {
        background: #1a1a1a;
        border-bottom-color: #333;
    }
    
    .footer-widgets {
        background: #000;
    }
    
    .footer-bottom {
        background: #111;
    }
    
    .testimonial-card {
        background: linear-gradient(135deg, #006688, #008866);
    }
    
    /* Images in dark mode */
    img {
        opacity: 0.9;
        transition: opacity 0.3s ease;
    }
    
    img:hover {
        opacity: 1;
    }
}

/* Print Styles Enhancement */
@media print {
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
        background: #fff !important;
    }
    
    .container {
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* Hide unnecessary elements */
    .no-print,
    .header-top-bar,
    .site-header,
    .footer-widgets,
    .footer-bottom,
    .scroll-to-top,
    .hero-buttons,
    .contact-form,
    .social-links,
    .menu-toggle {
        display: none !important;
    }
    
    /* Links */
    a {
        color: #000 !important;
        text-decoration: underline !important;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 0.9em;
        font-weight: normal;
    }
    
    /* Page breaks */
    .page-break {
        page-break-before: always;
    }
    
    /* Images */
    img {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* Avoid breaking inside important elements */
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
    
    p, li {
        page-break-inside: avoid;
    }
    
    /* Table styling */
    table {
        page-break-inside: avoid;
        border-collapse: collapse;
    }
    
    th, td {
        border: 1px solid #000;
        padding: 0.5em;
    }
}