/* Responsive styles for AiSynk landing page */

/* Mobile First Approach */

/* Extra Small devices (phones, 320px and up) */
@media (min-width: 320px) {
    .container-xs {
        max-width: 320px;
        margin: 0 auto;
        padding: 0 1rem;
    }
}

/* Small devices (phones, 576px and up) */
@media (min-width: 576px) {
    .hero-title {
        font-size: 3rem;
        line-height: 1.1;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    .hero-title {
        font-size: 4rem;
    }
    
    .hero-subtitle {
        font-size: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .integration-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Navigation adjustments */
    .mobile-menu {
        display: none;
    }
    
    .desktop-menu {
        display: flex;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .hero-title {
        font-size: 5rem;
    }
    
    .hero-subtitle {
        font-size: 1.75rem;
    }
    
    .feature-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .integration-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .hero-title {
        font-size: 6rem;
    }
    
    .hero-subtitle {
        font-size: 2rem;
    }
    
    .integration-grid {
        grid-template-columns: repeat(6, 1fr);
    }
    
    .max-width-container {
        max-width: 1200px;
    }
}

/* Ultra wide screens (1400px and up) */
@media (min-width: 1400px) {
    .hero-title {
        font-size: 7rem;
    }
    
    .max-width-container {
        max-width: 1400px;
    }
}

/* Mobile-specific optimizations */
@media (max-width: 767px) {
    /* Typography scaling */
    h1 { font-size: 2.5rem !important; }
    h2 { font-size: 2rem !important; }
    h3 { font-size: 1.5rem !important; }
    h4 { font-size: 1.25rem !important; }
    
    /* Spacing adjustments */
    .py-20 { padding-top: 3rem !important; padding-bottom: 3rem !important; }
    .py-16 { padding-top: 2.5rem !important; padding-bottom: 2.5rem !important; }
    .mb-16 { margin-bottom: 2.5rem !important; }
    .mb-12 { margin-bottom: 2rem !important; }
    
    /* Button adjustments */
    .btn-large {
        padding: 0.875rem 1.5rem !important;
        font-size: 1rem !important;
    }
    
    /* Form adjustments */
    .form-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .form-input {
        padding: 0.875rem !important;
        font-size: 1rem !important;
    }
    
    /* Table responsiveness */
    .comparison-table {
        font-size: 0.75rem;
        overflow-x: auto;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 0.5rem 0.25rem;
        white-space: nowrap;
    }
    
    /* Navigation adjustments */
    .nav-container {
        padding: 0 1rem;
    }
    
    .mobile-menu-btn {
        display: block !important;
    }
    
    .desktop-menu {
        display: none !important;
    }
    
    /* Hero section mobile */
    .hero-section {
        padding-top: 6rem !important;
        padding-bottom: 3rem !important;
    }
    
    .hero-buttons {
        flex-direction: column !important;
        gap: 1rem !important;
    }
    
    .hero-button {
        width: 100% !important;
        text-align: center !important;
    }
    
    /* Stats mobile layout */
    .stats-container {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
    }
    
    .stat-item {
        text-align: center !important;
    }
    
    .stat-number {
        font-size: 2rem !important;
    }
    
    .stat-label {
        font-size: 0.875rem !important;
    }
    
    /* Feature cards mobile */
    .feature-cards {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    
    .feature-card {
        padding: 1.5rem !important;
    }
    
    /* Integration items mobile */
    .integration-items {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
    }
    
    .integration-item {
        padding: 1rem !important;
        font-size: 0.875rem !important;
    }
    
    /* Contact section mobile */
    .contact-container {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }
    
    .contact-form {
        order: 1;
    }
    
    .calendar-widget {
        order: 2;
    }
    
    /* Footer mobile */
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        text-align: center !important;
    }
}

/* Tablet-specific optimizations */
@media (min-width: 768px) and (max-width: 1023px) {
    .hero-title {
        font-size: 4rem;
        line-height: 1.1;
    }
    
    .feature-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .integration-items {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .contact-container {
        gap: 3rem;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets */
    .btn, .button, button {
        min-height: 44px;
        min-width: 44px;
        padding: 0.75rem 1.5rem;
    }
    
    .nav-link {
        padding: 1rem;
    }
    
    .integration-item {
        min-height: 60px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Remove hover effects on touch devices */
    .hover-lift:hover {
        transform: none;
        box-shadow: none;
    }
    
    .integration-item:hover {
        transform: none;
        box-shadow: none;
    }
    
    /* Add tap effects instead */
    .integration-item:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
    
    .btn:active {
        transform: scale(0.98);
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Ensure crisp images and icons */
    .logo, .icon {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Landscape phone orientation */
@media (max-width: 767px) and (orientation: landscape) {
    .hero-section {
        padding-top: 4rem !important;
        padding-bottom: 2rem !important;
    }
    
    .hero-title {
        font-size: 2.25rem !important;
    }
    
    .stats-container {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 1rem !important;
    }
    
    .nav-container {
        height: 60px;
    }
}

/* Print styles */
@media print {
    /* Hide interactive elements */
    nav, .mobile-menu, #contact, footer, .btn, button {
        display: none !important;
    }
    
    /* Optimize for print */
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
        background: #fff;
    }
    
    .hero-section, .feature-section, .comparison-section {
        page-break-inside: avoid;
        margin-bottom: 1cm;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
        color: #000;
    }
    
    .comparison-table {
        page-break-inside: avoid;
        border: 1px solid #000;
    }
    
    .comparison-table th,
    .comparison-table td {
        border: 1px solid #000;
        padding: 0.5cm;
    }
    
    /* Add URLs for links */
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 10pt;
        color: #666;
    }
    
    a[href^="#"]:after {
        content: "";
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .aos-animate {
        animation: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
}

/* Dark mode support (if enabled) */
@media (prefers-color-scheme: dark) {
    /* This would only apply if you want to support dark mode */
    /* Currently disabled to maintain brand consistency */
    /*
    :root {
        --bg-primary: #1a1a1a;
        --text-primary: #ffffff;
        --text-secondary: #cccccc;
    }
    */
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .bg-gradient-to-br,
    .bg-gradient-to-r {
        background: #000 !important;
        color: #fff !important;
    }
    
    .text-gray-600,
    .text-gray-500,
    .text-gray-400 {
        color: #fff !important;
    }
    
    .border-gray-100,
    .border-gray-200,
    .border-gray-300 {
        border-color: #fff !important;
    }
    
    .bg-white {
        background: #fff !important;
        color: #000 !important;
    }
    
    .bg-gray-50,
    .bg-gray-100 {
        background: #f0f0f0 !important;
        color: #000 !important;
    }
}