/* EcoClean Pro - Responsive CSS */

/* Mobile First Approach */

/* Extra Small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
    .hero-section h1 {
        font-size: 2.59rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    
    .navbar-brand {
        font-size: 1.27rem;
    }
    
    .feature-card, .service-card, .price-card, .case-card, .career-card, .info-card, .blog-card, .element-card {
        margin-bottom: 1.65rem;
    }
    
    .team-member img {
        width: 100px;
        height: 100px;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    .contact-info {
        margin-top: 1rem;
        padding: 1.5rem;
    }
    
    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.81rem; }
    h3 { font-size: 1.63rem; }
    h4 { font-size: 1.28rem; }
    h5 { font-size: 1.15rem; }
    
    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    section {
        padding: 2rem 0;
    }
    
    .breadcrumb-nav {
        margin-top: 60px;
    }
    
    #space {
        margin-top: 60px;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .hero-section h1 {
        font-size: 3rem;
    }
    
    .team-member img {
        width: 110px;
        height: 110px;
    }
    
    .contact-form {
        padding: 2rem;
    }
    
    .contact-info {
        padding: 2rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .hero-section h1 {
        font-size: 3.29rem;
    }
    
    .review-card {
        margin-bottom: 1rem;
    }
    
    .process-step {
        margin-bottom: 2rem;
    }
    
    .timeline-item {
        margin-bottom: 1.58rem;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .hero-section h1 {
        font-size: 3.63rem;
    }
    
    .container {
        max-width: 960px;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .hero-section h1 {
        font-size: 4rem;
    }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 600px) {
    .hero-section h1 {
    padding-top: 150px !important;
}

.hero-section {
        min-height: auto;
        padding: 5rem 0;
    }
    
    .hero-section h1 {
        font-size: 2.54rem;
    }
    
    #space {
        min-height: 60vh;
    }
}

/* Print styles */
@media print {
    .navbar, .breadcrumb-nav, footer, .btn, .contact-form, #gallery {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
        background: #fff !important;
    }
    
    h1, h2, h3, h4, h5, h6 {
        color: #000 !important;
        page-break-after: avoid;
    }
    
    .feature-card, .service-card, .price-card, .case-card, .career-card, .info-card, .blog-card, .element-card {
        box-shadow: none !important;
        border: 1px solid #bdb9ba;
        page-break-inside: avoid;
    }
    
    a {
        text-decoration: underline;
        color: #000 !important;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 10pt;
        color: #7e7e7e;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --primary-green: #000000;
        --primary-blue: #000000;
        --dark-green: #000000;
        --dark-blue: #000000;
        --gray: #000000;
        --dark-gray: #000000;
        --white: #ffffff;
        --light-gray: #ffffff;
        --light-green: #ffffff;
        --light-blue: #ffffff;
    }
    
    .feature-card, .service-card, .price-card, .case-card, .career-card, .info-card, .blog-card, .element-card {
        border: 2px solid #000;
    }
    
    .btn {
        border: 2px solid #000;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .hero-section::before {
        animation: none;
    }
    
    .feature-card:hover, .service-card:hover, .price-card:hover, .case-card:hover, .career-card:hover, .info-card:hover, .blog-card:hover, .element-card:hover {
        transform: none;
    }
    
    .team-member:hover img {
        transform: none;
    }
    
    .navbar-nav .nav-link:hover {
        transform: none;
    }
    
    .btn-primary:hover, .btn-outline-primary:hover {
        transform: none;
    }
    
    #gallery img:hover {
        transform: none;
    }
}

/* Focus management */
.focus-visible {
    outline: 3px solid var(--primary-green);
    outline-offset: 2px;
}

/* Skip links for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-green);
    color: var(--white);
    padding: 8px;
    text-decoration: none;
    z-index: 1000;
    border-radius: 0 0 4px 4px;
}

.skip-link:focus {
    top: 0;
}

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 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-green);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Dark mode support (if needed in future) */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles would go here if implemented */
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-green);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--dark-green);
}

/* Mobile menu improvements */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: rgba(32, 124, 88, 0.95);
        margin-top: 1rem;
        padding: 1rem;
        border-radius: var(--border-radius);
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
}

/* Image optimization */
img {
    max-width: 100%;
    height: auto;
}

/* Form improvements for mobile */
@media (max-width: 767.98px) {
    .contact-form .row .col-md-6 {
        margin-bottom: 1rem;
    }
    
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Better spacing for review cards on mobile */
@media (max-width: 767.98px) {
    .review-card {
        margin-bottom: 1.64rem;
    }
    
    #reviews .col-lg-2 {
        margin-bottom: 1rem;
    }
}

/* Timeline improvements for mobile */
@media (max-width: 767.98px) {
    .timeline-item {
        margin-bottom: 1rem;
        padding: 1rem;
    }
    
    #timeline .col-lg-2 {
        margin-bottom: 1rem;
    }
}

/* FAQ accordion improvements */
@media (max-width: 767.98px) {
    .accordion-button {
        padding: 1rem;
        font-size: 0.96rem;
    }
    
    .accordion-body {
        padding: 1rem;
    }
}
