/* Responsive Design for M & T Cabinetry Website */

/* Mobile First Approach - Base styles are for mobile */

/* Small Mobile Devices (320px and up) */
@media (min-width: 320px) {
            .hero-content h1 {
            font-size: 2rem;
        }
        
        .hero-content .subtitle {
            font-size: 1rem;
            line-height: 1.4;
        }
        

        
        .cta-button {
            padding: 15px 30px;
            font-size: 1rem;
        }
    
    .section-title {
        font-size: 1.8rem;
    }
    
            .service-card {
            padding: 20px;
        }
        
        .service-image img {
            height: 150px;
        }
        
        /* Tablet and larger screens */
        @media (min-width: 768px) {
            .service-image img {
                height: 200px;
            }
        }
        
        /* Desktop screens */
        @media (min-width: 1024px) {
            .service-image img {
                height: 220px;
            }
        }
    
    .modal-content {
        margin: 10% auto;
        padding: 20px;
        width: 95%;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .header-content {
        flex-direction: column;
        gap: 10px;
    }
    
            .contact-info {
            justify-content: center;
        }
        
        .header-cta-button {
            padding: 6px 12px;
            font-size: 0.8rem;
        }
}

/* Medium Mobile Devices (480px and up) */
@media (min-width: 480px) {
    .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .hero-content .subtitle {
        font-size: 1.1rem;
    }
    
    .cta-button {
        padding: 16px 32px;
        font-size: 1.05rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

/* Large Mobile Devices (768px and up) */
@media (min-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content .subtitle {
        font-size: 1.2rem;
    }
    
    .cta-button {
        padding: 17px 35px;
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .header-content {
        flex-direction: row;
        gap: 0;
    }
    
    .contact-info {
        justify-content: flex-end;
    }
    
    .form-row {
        grid-template-columns: 1fr 1fr;
    }
}

/* Tablet Devices (1024px and up) */
@media (min-width: 1024px) {
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .hero-content .subtitle {
        font-size: 1.25rem;
    }
    
    .cta-button {
        padding: 18px 40px;
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
    
    .benefits-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

/* Desktop Devices (1200px and up) */
@media (min-width: 1200px) {
    .hero-content h1 {
        font-size: 3.5rem;
    }
    
    .hero-content .subtitle {
        font-size: 1.3rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .benefits-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .areas-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Large Desktop Devices (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
    
    .hero-content h1 {
        font-size: 4rem;
    }
}

/* Landscape Mobile Orientation */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        height: auto;
        min-height: 100vh;
        padding: 100px 0 40px;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
        margin-bottom: 0.5rem;
    }
    
    .hero-content .subtitle {
        margin-bottom: 1rem;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .service-card,
    .benefit-item,
    .area-item {
        box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    }
}

/* Reduced Motion Preferences */
@media (prefers-reduced-motion: reduce) {
    .cta-button,
    .submit-btn,
    .service-card,
    .benefit-item,
    .area-item {
        transition: none;
        animation: none;
    }
    
    .fade-in-up {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    body {
        background: #1a1a1a;
        color: #e0e0e0;
    }
    
    .service-card {
        background: #2a2a2a;
        color: #e0e0e0;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        background: #2a2a2a;
        color: #e0e0e0;
        border-color: #444;
    }
}

/* Focus Styles for Accessibility */
@media (prefers-reduced-motion: no-preference) {
    .cta-button:focus,
    .submit-btn:focus,
    .close:focus {
        outline: 3px solid #e74c3c;
        outline-offset: 2px;
    }
}

/* Print Styles */
@media print {
    .hero {
        background: none !important;
        color: #000 !important;
        height: auto;
        padding: 20px 0;
    }
    
    .hero-content h1 {
        color: #000 !important;
        text-shadow: none !important;
    }
    
    .hero-content .subtitle {
        color: #333 !important;
    }
    
    .cta-button {
        background: #ccc !important;
        color: #000 !important;
        border: 1px solid #999 !important;
        text-decoration: none !important;
    }
    
    .service-card {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
        break-inside: avoid;
    }
    
    .section {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}
