/* Responsive Design - Mobile First Approach */

/* Extra Small Devices (phones, 576px and down) */
@media (max-width: 575.98px) {
    :root {
        /* Adjust font sizes for mobile */
        --h1-size: 1.75rem;
        --h2-size: 1.5rem;
        --h3-size: 1.25rem;
        --h4-size: 1.1rem;
        --brand-size: 1.25rem;
        
        /* Adjust spacing for mobile */
        --spacing-xl: 2rem;
        --spacing-lg: 1rem;
    }
    
    /* Header adjustments */
    .navbar-brand {
        font-size: var(--brand-size);
    }
    
    .navbar-nav {
        text-align: center;
        padding-top: var(--spacing-md);
    }
    
    .nav-link {
        padding: var(--spacing-sm) var(--spacing-md);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    /* Hero section adjustments */
    .hero-section {
        min-height: 80vh;
        padding-top: 100px;
    }
    
    .hero-content {
        padding: var(--spacing-lg);
        text-align: center;
        margin-bottom: var(--spacing-lg);
    padding-top: 100px;
}
    
    .hero-image img {
        height: 300px;
        margin-top: var(--spacing-lg);
    }
    
    /* Card adjustments */
    .feature-card,
    .service-card .card-body,
    .contact-form {
        padding: var(--spacing-lg);
    }
    
    .service-card .card-img-top {
        height: 180px;
    }
    
    .feature-item {
        padding: var(--spacing-md);
        margin-bottom: var(--spacing-md);
    }
    
    /* Contact form adjustments */
    .contact-info {
        margin-top: var(--spacing-xl);
    }
    
    .contact-item {
        margin-bottom: var(--spacing-md);
    }
    
    /* Content cards for additional pages */
    .content-card,
    .herb-card,
    .maintenance-card,
    .trouble-card,
    .advanced-card,
    .commercial-card,
    .tech-card,
    .sustainability-card,
    .research-card,
    .success-card {
        margin-bottom: var(--spacing-md);
        padding: var(--spacing-md);
    }
    
    /* Space section */
    #space {
        min-height: calc(100vh - 150px);
    }
    
    /* Footer adjustments */
    .footer {
        text-align: center;
    }
    
    .footer .col-md-4 {
        margin-bottom: var(--spacing-xl);
    }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .hero-section {
        min-height: 85vh;
    }
    
    .hero-image img {
        height: 350px;
    }
    
    .service-card .card-img-top {
        height: 200px;
    }
    
    .feature-item {
        padding: var(--spacing-lg);
    }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .hero-content {
        padding: var(--spacing-xl);
    padding-top: 100px;
}
    
    .hero-image img {
        height: 400px;
    }
    
    .navbar-nav {
        text-align: right;
    }
    
    .contact-info {
        margin-top: 0;
        padding-left: var(--spacing-xl);
    }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .hero-section {
        min-height: 90vh;
    }
    
    .hero-content {
        padding-right: var(--spacing-xl);
    padding-top: 100px;
}
    
    .hero-image img {
        height: 450px;
    }
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .hero-section {
        min-height: 100vh;
    }
    
    .hero-image img {
        height: 500px;
    }
    
    .container {
        max-width: 1140px;
    }
}

/* Ultra Wide Screens (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .hero-content {
        padding-right: 4rem;
    padding-top: 100px;
}
}

/* Height-based media queries for better mobile experience */
@media (max-height: 600px) and (max-width: 767.98px) {
    .hero-section {
        min-height: 100vh;
        padding-top: 80px;
    }
    
    .hero-content {
        padding: var(--spacing-md);
    padding-top: 100px;
}
    
    .hero-image img {
        height: 250px;
    }
}

/* Landscape mobile devices */
@media (max-width: 767.98px) and (orientation: landscape) {
    .hero-section {
        min-height: 120vh;
    }
    
    .navbar {
        padding: var(--spacing-xs) 0;
    }
    
    .hero-content h1 {
        font-size: 1.5rem;
    }
    
    .hero-content h2 {
        font-size: 1.25rem;
    }
}

/* Print styles */
@media print {
    .navbar,
    .footer,
    .breadcrumb-section {
        display: none;
    }
    
    .hero-section {
        min-height: auto;
        padding: var(--spacing-lg);
        page-break-after: always;
    }
    
    .hero-image img {
        height: auto;
        max-height: 300px;
    }
    
    .feature-card,
    .service-card,
    .contact-form {
        border: 1px solid var(--medium-gray);
        box-shadow: none;
        page-break-inside: avoid;
    }
    
    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: var(--medium-gray);
    }
}

/* Accessibility improvements for different screen sizes */
@media (max-width: 575.98px) {
    /* Increase touch targets for mobile */
    .btn {
        min-height: 44px;
        min-width: 44px;
        padding: var(--spacing-sm) var(--spacing-lg);
    }
    
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .form-control {
        min-height: 44px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Improve text readability */
    body {
        font-size: 18px;
        line-height: 1.6;
    }
    
    p {
        margin-bottom: 1.2rem;
    }
}

/* High DPI screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-section::before {
        background-image: url('../ROL_images/hero-bg@2x.webp');
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .feature-card:hover,
    .service-card:hover,
    .feature-item:hover,
    .contact-item:hover,
    .btn-primary:hover {
        transform: none;
    }
    
    .navbar,
    .hero-section,
    .feature-card,
    .service-card {
        transition: none;
    }
}

/* Dark mode support */

/* Focus improvements for keyboard navigation */
@media (min-width: 768px) {
    .nav-link:focus,
    .btn:focus,
    .form-control:focus {
        outline: 2px solid var(--primary-blue);
        outline-offset: 2px;
    }
}

/* Container adjustments for different screen sizes */
@media (max-width: 575.98px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    .container {
        max-width: 540px;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .container {
        max-width: 720px;
    }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    .container {
        max-width: 960px;
    }
}

/* Grid system enhancements for better mobile experience */
@media (max-width: 767.98px) {
    .row > * {
        margin-bottom: var(--spacing-md);
    }
    
    .row > *:last-child {
        margin-bottom: 0;
    }
}

/* Service grid improvements */
@media (max-width: 991.98px) {
    .service-card {
        margin-bottom: var(--spacing-lg);
    }
}

/* Feature grid improvements */
@media (max-width: 767.98px) {
    .feature-item {
        text-align: center;
    }
    
    .feature-item i {
        font-size: 2.5rem;
    }
}

/* Gallery responsive adjustments */
@media (max-width: 575.98px) {
    .gallery img {
        margin-bottom: var(--spacing-sm);
    }
}

/* Form responsive improvements */
@media (max-width: 767.98px) {
    .contact-form .row .col-md-6 {
        margin-bottom: var(--spacing-md);
    }
    
    .form-label {
        font-weight: 600;
        margin-bottom: var(--spacing-xs);
    }
} 