/* IoT Plant Care - Responsive CSS */

/* Mobile First Responsive Design */

/* Extra Small devices (phones, 576px and down) */
@media (max-width: 575.98px) {
    :root {
        --font-size-h1: 1.8rem;
        --font-size-h2: 1.5rem;
        --font-size-h3: 1.3rem;
        --font-size-h4: 1.2rem;
        --font-brand: 1.2rem;
    }
    
    .hero-section {
        padding-top: 70px;
        text-align: center;
    }
    
    .hero-content {
        padding-top: 50px !important;
        margin-bottom: 30px;
    }
    
    .hero-content h1 {
        padding-top: 50px !important;
        font-size: 1.95rem;
        margin-bottom: 0.67rem;
    }
    
    .hero-content h2 {
        font-size: 1.42rem;
        margin-bottom: 1rem;
    }
    
    .hero-content p {
        font-size: var(--font-size-base);
    }
    
    section {
        padding: 50px 0;
    }
    
    .feature-box,
    .service-card,
    .feature-item,
    .price-card,
    .team-member,
    .review-card,
    .case-card,
    .process-step,
    .job-card,
    .info-card,
    .blog-card,
    .faq-card {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .service-image {
        height: 150px;
    }
    
    .team-photo {
        width: 100px;
        height: 100px;
    }
    
    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.29rem;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item {
        width: 100%;
        margin-left: 40px !important;
        padding: 20px;
    }
    
    .timeline-item::before {
        left: -35px !important;
    }
    
    .contact-form {
        padding: 25px;
    }
    
    .navbar-brand {
        font-size: 1.22rem !important;
    }
    
    .gallery-section {
        padding: 40px 0;
    }
    
    .footer-section {
        padding: 40px 0 20px;
        text-align: center;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    :root {
        --font-size-h1: 2rem;
        --font-size-h2: 1.7rem;
        --font-size-h3: 1.4rem;
        --font-brand: 1.3rem;
    }
    
    .hero-section {
        padding-top: 75px;
    }
    
    .hero-content {
        padding-top: 50px !important;
        text-align: center;
        margin-bottom: 30px;
    }
    
    section {
        padding: 60px 0;
    }
    
    .service-image {
        height: 180px;
    }
    
    .team-photo {
        width: 110px;
        height: 110px;
    }
    
    .timeline::before {
        left: 30px;
    }
    
    .timeline-item {
        width: calc(100% - 60px);
        margin-left: 60px !important;
    }
    
    .timeline-item::before {
        left: -45px !important;
    }
    
    .contact-form {
        padding: 30px;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .hero-section {
        padding-top: 80px;
    }
    
    section {
        padding: 70px 0;
    }
    
    .service-image {
        height: 200px;
    }
    
    .timeline::before {
        left: 50%;
    }
    
    .timeline-item {
        width: 45%;
    }
    
    .timeline-item:nth-child(odd) {
        margin-left: 0;
    }
    
    .timeline-item:nth-child(even) {
        margin-left: 55%;
    }
    
    .timeline-item:nth-child(odd)::before {
        right: -35px;
        left: auto;
    }
    
    .timeline-item:nth-child(even)::before {
        left: -35px;
        right: auto;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .hero-section {
        padding-top: 80px;
    }
    
    .hero-content {
        padding-top: 50px !important;
        padding-right: 30px;
    }
    
    section {
        padding: 80px 0;
    }
    
    .service-card,
    .feature-box,
    .feature-item,
    .price-card {
        margin-bottom: 30px;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .hero-content {
        padding-top: 50px !important;
        padding-right: 40px;
    }
    
    .hero-content h1 {
        padding-top: 50px !important;
        font-size: 2.54rem;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
}

/* Landscape Orientation */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        min-height: auto;
        padding: 80px 0 60px;
    }
    
    section {
        padding: 40px 0;
    }
}

/* Print Styles */
@media print {
    .header-section,
    .footer-section {
        display: none;
    }
    
    section {
        padding: 20px 0;
        page-break-inside: avoid;
    }
    
    .hero-section {
        padding-top: 0;
        min-height: auto;
    }
    
    .service-card,
    .feature-box,
    .review-card,
    .case-card,
    .blog-card,
    .faq-card {
        box-shadow: none;
        border: 1px solid #d7d6d6;
        page-break-inside: avoid;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-image img,
    .service-image,
    .team-photo,
    .gallery-image {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduced Motion Preferences */
@media (prefers-reduced-motion: reduce) {
    .feature-box:hover,
    .service-card:hover,
    .feature-item:hover,
    .price-card:hover,
    .team-member:hover,
    .review-card:hover,
    .case-card:hover,
    .process-step:hover,
    .job-card:hover,
    .info-card:hover,
    .blog-card:hover,
    .faq-card:hover,
    .gallery-image:hover,
    .btn-primary:hover {
        transform: none;
    }
    
    .timeline-item,
    .price-card.featured {
        transform: none !important;
    }
}

/* Dark Mode Support (System Preference) */
@media (prefers-color-scheme: dark) {
    /* Keeping light theme as specified - no dark theme for accessibility */
}

/* Container Queries (Future Support) */
@container (max-width: 400px) {
    .service-card,
    .feature-box {
        padding: 15px;
    }
}

/* Accessibility - Focus States */
@media (max-width: 767.98px) {
    .navbar-toggler {
        padding: 8px 12px;
    }
    
    .nav-link {
        padding: 10px 15px !important;
        text-align: center;
    }
    
    .dropdown-menu {
        width: 100%;
        text-align: center;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .feature-box,
    .service-card,
    .feature-item,
    .price-card,
    .team-member,
    .review-card,
    .case-card,
    .process-step,
    .job-card,
    .info-card,
    .blog-card,
    .faq-card {
        transition: none;
    }
    
    .btn-primary {
        min-height: 48px;
        padding: 12px 24px;
    }
    
    .form-control {
        min-height: 48px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .navbar-toggler {
        min-height: 48px;
        min-width: 48px;
    }
}

/* Very Small Screens (320px and below) */
@media (max-width: 320px) {
    :root {
        --font-size-base: 14px;
        --font-size-h1: 1.6rem;
        --font-size-h2: 1.4rem;
        --font-size-h3: 1.2rem;
        --font-brand: 1.1rem;
    }
    
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .hero-content h1 {
        padding-top: 50px !important;
        font-size: 1.65rem;
    }
    
    .hero-content h2 {
        font-size: 1.22rem;
    }
    
    section {
        padding: 40px 0;
    }
    
    .feature-box,
    .service-card,
    .contact-form {
        padding: 15px;
    }
    
    .price {
        font-size: 1.59rem;
    }
    
    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* Tablet Portrait */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
    .hero-section {
        text-align: center;
    }
    
    .hero-content {
        padding-top: 50px !important;
        margin-bottom: 40px;
    }
    
    .service-image {
        height: 220px;
    }
}

/* Tablet Landscape */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .hero-section {
        min-height: 100vh;
    }
    
    section {
        padding: 60px 0;
    }
}

/* Navigation Responsive Behavior */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: rgba(43, 70, 23, 0.95);
        border-radius: 10px;
        margin-top: 10px;
        padding: 15px;
    }
    
    .navbar-nav {
        text-align: center;
    }
    
    .nav-item {
        margin: 5px 0;
    }
}

/* Gallery Responsive Grid */
@media (max-width: 575.98px) {
    .gallery-section .col-lg-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    .gallery-section .col-lg-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .gallery-section .col-lg-3 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
} 