/* CraftEdge - Responsive CSS */

/* Desktop Large (1920px and above) - Optimized for the specified resolution */
@media (min-width: 1920px) {
    .container {
        max-width: 1800px;
    }
    
    .hero-content h1 {
        font-size: 5rem;
        line-height: 1.2;
    }
    
    .section-title {
        font-size: 4rem;
    }
}

/* Desktop (1440px - 1919px) */
@media (max-width: 1919px) and (min-width: 1440px) {
    .hero-content h1 {
        font-size: 4.5rem;
    }
}

/* Laptop (1024px - 1439px) */
@media (max-width: 1439px) and (min-width: 1024px) {
    .hero-content h1 {
        font-size: 3.5rem;
    }
    
    .section-title {
        font-size: 3rem;
    }
}

/* Tablet (768px - 1023px) */
@media (max-width: 1023px) and (min-width: 768px) {
    nav .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
    
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .hero-content p {
        font-size: 1.25rem;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
    
    .service-card {
        margin-bottom: 1rem;
    }
}

/* Mobile Large (640px - 767px) */
@media (max-width: 767px) and (min-width: 640px) {
    nav .container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .hero-section {
        height: 80vh;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
        line-height: 1.3;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .cta-button,
    .cta-button-secondary {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .service-card,
    .feature-card {
        margin-bottom: 1.5rem;
    }
    
    .stat-card {
        margin-bottom: 1rem;
    }
}

/* Mobile Small (375px - 639px) */
@media (max-width: 639px) {
    /* Navigation adjustments */
    nav {
        padding: 0.75rem 0;
    }
    
    nav .container {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    nav .text-3xl {
        font-size: 1.75rem;
    }
    
    nav .space-x-8 {
        display: none;
    }
    
    /* Hero section */
    .hero-section {
        height: 70vh;
        padding: 1rem;
    }
    
    .hero-content h1 {
        font-size: 1.75rem;
        line-height: 1.4;
        margin-bottom: 1rem;
    }
    
    .hero-content p {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
    
    .cta-button,
    .cta-button-secondary {
        width: 100%;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Sections */
    section {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    .section-title {
        font-size: 1.75rem;
        margin-bottom: 1rem;
    }
    
    .title-underline {
        width: 50px;
        margin-bottom: 1rem;
    }
    
    /* Service cards */
    .service-icon {
        padding: 2rem;
    }
    
    .service-icon i {
        font-size: 3rem;
    }
    
    .service-card h3 {
        font-size: 1.25rem;
    }
    
    /* Feature cards */
    .feature-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 1rem;
    }
    
    .feature-icon i {
        font-size: 1.5rem;
    }
    
    .feature-card h3 {
        font-size: 1.25rem;
    }
    
    /* Gallery */
    .gallery-item {
        height: 250px;
    }
    
    /* Contact form */
    .contact-form {
        padding: 1.5rem;
    }
    
    .contact-form h3 {
        font-size: 1.5rem;
    }
    
    /* Footer */
    footer .grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    footer .text-3xl {
        font-size: 1.75rem;
    }
}

/* Mobile Extra Small (below 375px) */
@media (max-width: 374px) {
    .hero-content h1 {
        font-size: 1.5rem;
    }
    
    .hero-content p {
        font-size: 0.85rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .cta-button,
    .cta-button-secondary {
        padding: 0.625rem 0.875rem;
        font-size: 0.85rem;
    }
}

/* Landscape Orientation for Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        height: 100vh;
        min-height: 500px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
}

/* High-DPI Displays (Retina) */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Ensure crisp text rendering on retina displays */
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Print Styles */
@media print {
    @page {
        margin: 1cm;
    }
    
    body {
        background: white;
        color: black;
    }
    
    nav,
    footer,
    #scrollToTop,
    .cta-button,
    .cta-button-secondary {
        display: none !important;
    }
    
    .hero-section {
        background: none !important;
        height: auto;
        padding: 2rem 0;
    }
    
    section {
        page-break-inside: avoid;
        padding: 1rem 0;
    }
    
    .gallery-overlay,
    .service-icon {
        display: none;
    }
}

/* Accessibility - Focus Visible */
@media (prefers-reduced-motion: no-preference) {
    :focus-visible {
        outline: 3px solid #FF6B35;
        outline-offset: 3px;
    }
}

/* Dark Mode Preferences */
@media (prefers-color-scheme: dark) {
    /* This can be expanded for full dark mode support */
    body {
        color-scheme: light; /* Force light mode for now */
    }
}

/* Contrast Preferences */
@media (prefers-contrast: high) {
    .hero-overlay {
        background: rgba(0, 0, 0, 0.85);
    }
    
    .cta-button,
    .cta-button-secondary {
        border: 2px solid currentColor;
    }
}