/* LCDJ Corporate Website - Responsive Styles */

/* Mobile First Approach */

/* Extra Small Devices (phones, 320px and up) */
@media (min-width: 320px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .hero-section h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-section p {
        font-size: 1.125rem;
    }
    
    .section-title {
        font-size: 2.25rem;
    }
    
    /* Grid adjustments for small screens */
    .grid-responsive-sm {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) {
    .container {
        max-width: 768px;
        margin-left: auto;
        margin-right: auto;
        padding-left: 2rem;
        padding-right: 2rem;
    }
    
    .hero-section h1 {
        font-size: 3.5rem;
    }
    
    .hero-section p {
        font-size: 1.25rem;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
    
    /* Navigation improvements for tablets */
    .mobile-menu {
        display: none !important;
    }
    
    .desktop-nav {
        display: flex !important;
    }
    
    /* Grid layouts for tablets */
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .md\:grid-cols-4 {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* Flexbox improvements */
    .md\:flex-row {
        flex-direction: row;
    }
    
    .md\:items-center {
        align-items: center;
    }
    
    .md\:justify-between {
        justify-content: space-between;
    }
    
    .md\:space-x-4 > * + * {
        margin-left: 1rem;
    }
    
    .md\:space-y-0 > * + * {
        margin-top: 0;
    }
    
    /* Text alignments */
    .md\:text-left {
        text-align: left;
    }
    
    .md\:text-center {
        text-align: center;
    }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .container {
        max-width: 992px;
    }
    
    .hero-section h1 {
        font-size: 4rem;
    }
    
    .hero-section p {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 3rem;
    }
    
    /* Enhanced grid layouts for large screens */
    .lg\:grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .lg\:grid-cols-4 {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .lg\:grid-cols-5 {
        grid-template-columns: repeat(5, 1fr);
    }
    
    /* Service cards optimization for large screens */
    .service-cards-lg {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .service-card-lg {
        padding: 2rem;
    }
    
    /* Work section enhancements */
    .work-grid-lg {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
    
    /* Partners section */
    .partners-grid-lg {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }
    
    .hero-section h1 {
        font-size: 4.5rem;
    }
    
    .hero-section p {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 3.5rem;
    }
    
    /* Extra large grid layouts */
    .xl\:grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .xl\:grid-cols-4 {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .xl\:grid-cols-5 {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .xl\:grid-cols-6 {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Ultra Wide Screens (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
    
    /* Ultra-wide optimizations */
    .ultra-wide-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Mobile Navigation Specific Styles */
@media (max-width: 767px) {
    /* Mobile menu styles */
    #mobile-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
        border-radius: 0 0 0.5rem 0.5rem;
        z-index: 50;
    }
    
    #mobile-menu.hidden {
        display: none;
    }
    
    #mobile-menu.show {
        display: block;
    }
    
    .mobile-nav-link {
        border-bottom: 1px solid #f3f4f6;
    }
    
    .mobile-nav-link:last-child {
        border-bottom: none;
    }
    
    /* Hero section mobile optimizations */
    .hero-section {
        padding-top: 6rem;
        padding-bottom: 4rem;
        text-align: center;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
        text-align: center;
    }
    
    /* Service cards mobile layout */
    .service-cards-mobile {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Work section mobile */
    .work-cards-mobile {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Partners mobile */
    .partners-mobile {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    /* Contact form mobile */
    .contact-grid-mobile {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* Typography adjustments for mobile */
    .mobile-text-center {
        text-align: center;
    }
    
    .mobile-text-left {
        text-align: left;
    }
    
    /* Padding adjustments for mobile */
    .mobile-px-4 {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .mobile-py-8 {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    
    .mobile-py-12 {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
}

/* Tablet Portrait Specific (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    /* Service cards for tablets */
    .service-cards-tablet {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    /* Work section for tablets */
    .work-cards-tablet {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    /* Partners for tablets */
    .partners-tablet {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Landscape Phone Specific (576px - 767px) */
@media (min-width: 576px) and (max-width: 767px) {
    .hero-section h1 {
        font-size: 2.75rem;
    }
    
    .service-cards-landscape {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* High DPI / Retina Display Optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Enhance text rendering for high DPI displays */
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    /* Adjust border widths for crisp rendering */
    .border-thin {
        border-width: 0.5px;
    }
}

/* Dark Mode Support (if user prefers) */
@media (prefers-color-scheme: dark) {
    /* Note: This is prepared for future dark mode implementation */
    .dark-mode-ready {
        transition: background-color 0.3s ease, color 0.3s ease;
    }
}

/* Print Media Queries */
@media print {
    /* Hide navigation and interactive elements */
    header, footer, #mobile-menu-btn, .btn, button {
        display: none !important;
    }
    
    /* Adjust layout for print */
    .container {
        max-width: none;
        margin: 0;
        padding: 0;
    }
    
    section {
        page-break-inside: avoid;
        margin-bottom: 2rem;
    }
    
    .hero-section {
        background: none !important;
        color: black !important;
        padding: 2rem 0;
    }
    
    /* Ensure text is readable in print */
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
}

/* Hover Support Check */
@media (hover: hover) and (pointer: fine) {
    /* Enhanced hover effects for devices that support them */
    .hover-lift:hover {
        transform: translateY(-4px);
    }
    
    .hover-scale:hover {
        transform: scale(1.02);
    }
    
    .hover-shadow:hover {
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    }
}

/* No Hover Support (touch devices) */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects for touch devices */
    .service-card:hover,
    .case-card:hover,
    .partner-card:hover {
        transform: none;
        box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    }
    
    /* Enhance touch targets */
    .touch-target {
        min-height: 44px;
        min-width: 44px;
    }
    
    button, .btn, a {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Animation Performance Optimizations */
@media (min-width: 768px) {
    .gpu-accelerated {
        transform: translateZ(0);
        backface-visibility: hidden;
        perspective: 1000px;
    }
}

/* Reduced Data Mode */
@media (prefers-reduced-data: reduce) {
    /* Minimize data usage by hiding non-essential visual elements */
    .data-heavy {
        display: none;
    }
    
    .hero-section {
        background-image: none;
    }
}