/* Responsive Design - Mobile First */

/* Extra Small Devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
    :root {
        --section-padding: 40px 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-desc {
        font-size: 1rem;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .service-card,
    .feature-card,
    .price-card {
        padding: 1.5rem;
    }
    
    .service-icon,
    .feature-icon {
        font-size: 2rem;
    }
    
    .gallery {
        grid-template-columns: 1fr;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .service-card,
    .feature-card,
    .price-card {
        padding: 2rem;
    }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .hero-title {
        font-size: 3.2rem;
    }
    
    .gallery {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .navbar-nav .nav-link {
        margin: 0 12px;
    }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .hero-title {
        font-size: 3.5rem;
    }
    
    .gallery {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .hero-content {
        text-align: left;
    }
    
    .section-title {
        text-align: left;
    }
    
    .section-desc {
        text-align: left;
        margin: 0;
    }
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .hero-title {
        font-size: 4rem;
    }
    
    .gallery {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .container {
        max-width: var(--container-max-width);
    }
    
    .hero-content {
        text-align: left;
    }
    
    .section-title {
        text-align: left;
    }
    
    .section-desc {
        text-align: left;
        margin: 0;
    }
}

/* High Resolution Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero::before {
        background-image: url('../JEV_images/hero-bg.webp');
    }
}

/* Landscape Orientation */
@media (orientation: landscape) and (max-height: 500px) {
    .hero {
        min-height: 500px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
}

/* Dark Mode Support */

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .hero::before {
        animation: none !important;
    }
    
    .card:hover,
    .service-card:hover,
    .feature-card:hover,
    .price-card:hover,
    .team-card:hover,
    .review-card:hover,
    .gallery-item:hover {
        transform: none !important;
    }
    
    .btn:hover {
        transform: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-forest: #000000;
        --primary-sage: #2D5016;
        --primary-earth: #8B4513;
        --primary-sky: #0000FF;
        --primary-stone: #333333;
        
        --light-mint: #FFFFFF;
        --light-sage: #F5F5F5;
        --light-earth: #FFFAF0;
        --light-sky: #E6F3FF;
        --light-stone: #FFFFFF;
        
        --dark-forest: #000000;
        --dark-sage: #2D5016;
        --dark-earth: #654321;
        --dark-sky: #000080;
        --dark-stone: #000000;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
    
    .card {
        border: 1px solid var(--dark-stone);
    }
    
    .form-control {
        border: 2px solid var(--dark-stone);
    }
}

/* Print Styles */
@media print {
    * {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    .navbar,
    .footer,
    .btn,
    .hero {
        display: none !important;
    }
    
    .section {
        page-break-inside: avoid;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
    
    .card {
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
    }
    
    img {
        max-width: 100% !important;
        height: auto !important;
    }
}

/* Focus Management */
:focus-visible {
    outline: 2px solid var(--primary-forest);
    outline-offset: 2px;
}

/* Skip Links */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-forest);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* Form Validation */
.form-control:invalid {
    border-color: #dc3545;
}

.form-control:valid {
    border-color: var(--primary-forest);
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary-forest);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Utilities for Responsive Design */
.d-none-mobile {
    display: none;
}

@media (min-width: 768px) {
    .d-none-mobile {
        display: block;
    }
}

.d-block-mobile {
    display: block;
}

@media (min-width: 768px) {
    .d-block-mobile {
        display: none;
    }
}

/* Text Responsiveness */
.text-responsive {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
}

.title-responsive {
    font-size: clamp(2rem, 5vw, 4rem);
}

.subtitle-responsive {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
}

/* Container Responsiveness */
.container-fluid-responsive {
    padding-left: clamp(1rem, 5vw, 3rem);
    padding-right: clamp(1rem, 5vw, 3rem);
}

/* Grid Responsiveness */
.grid-responsive {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: clamp(1rem, 3vw, 2rem);
}

/* Accessibility Improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Touch Targets */
@media (pointer: coarse) {
    .btn,
    .nav-link,
    .card,
    .form-control {
        min-height: 44px;
        min-width: 44px;
    }
    
    .navbar-toggler {
        padding: 0.5rem;
    }
} 