/* Mobile First Responsive Design */
/* Following Bootstrap 5 breakpoints and avoiding overrides */

/* Extra Small devices (phones, less than 576px) */
@media (max-width: 575.98px) {
    /* Typography adjustments for mobile */
    h1, .display-4 {
        font-size: 2rem;
    }
    
    h2, .h2 {
        font-size: 1.75rem;
    }
    
    h3, .h3 {
        font-size: 1.5rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    /* Hero section mobile adjustments */
    .home-box {
        min-height: 80vh;
        padding: 2rem 0;
    }
    
    .home-box .display-4 {
        font-size: 1.75rem;
        margin-bottom: 1rem;
    }
    
    /* Hide decorative shapes on mobile for cleaner look */
    .hero-shapes {
        display: none;
    }
    
    /* Button adjustments */
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Card adjustments */
    .card-body {
        padding: 1rem;
    overflow-x: hidden;
}
    
    /* Service cards mobile layout */
    .service-card .card-img-top {
        height: 150px;
    }
    
    /* Team member images */
    .team-member img {
        width: 120px;
        height: 120px;
    }
    
    /* Contact form adjustments */
    .contact-form {
        margin-bottom: 2rem;
    }
    
    /* Footer adjustments */
    #footer .col-lg-4 {
        margin-bottom: 2rem;
        text-align: center;
    }
    
    /* Gallery grid adjustments */
    #gallery .col-md-4 {
        margin-bottom: 1rem;
    }
    
    /* FAQ cards */
    .faq-card .card-body {
        padding: 1rem;
    overflow-x: hidden;
}
    
    /* Price cards */
    .price-display {
        margin-bottom: 1.5rem;
    }
    
    .price-display .display-4 {
        font-size: 2rem;
    }
    
    /* Section padding reduction for mobile */
    section {
        padding: 3rem 0;
    }
    
    /* Additional page elements */
    .product-item .card-img-top,
    .category-card .card-img-top {
        height: 120px;
    }
    
    .impact-stat .stat-number {
        font-size: 2rem;
    }
    
    .goal-card .goal-year {
        font-size: 1.5rem;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .home-box .display-4 {
        font-size: 2.25rem;
    }
    
    .service-card .card-img-top {
        height: 180px;
    }
    
    .team-member img {
        width: 130px;
        height: 130px;
    }
    
    .price-display .display-4 {
        font-size: 2.5rem;
    }
    
    section {
        padding: 4rem 0;
    }
    
    .product-item .card-img-top,
    .category-card .card-img-top {
        height: 140px;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .home-box {
        min-height: 90vh;
    }
    
    .service-card .card-img-top {
        height: 200px;
    }
    
    .team-member img {
        width: 140px;
        height: 140px;
    }
    
    /* Adjust grid for tablets */
    .col-md-6.col-lg-3 {
        margin-bottom: 2rem;
    }
    
    .product-item .card-img-top,
    .category-card .card-img-top {
        height: 160px;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .home-box {
        min-height: 100vh;
    }
    
    .service-card .card-img-top {
        height: 220px;
    }
    
    .product-item .card-img-top,
    .category-card .card-img-top {
        height: 180px;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .home-box {
        min-height: 100vh;
    }
    
    .service-card .card-img-top {
        height: 240px;
    }
    
    .product-item .card-img-top,
    .category-card .card-img-top {
        height: 200px;
    }
}

/* Specific mobile navigation adjustments */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        border-radius: 0.5rem;
        margin-top: 1rem;
        padding: 1rem;
    }
    
    .navbar-nav {
        text-align: center;
    }
    
    .nav-item {
        margin: 0.25rem 0;
    }
}

/* Accessibility and motion preferences for mobile */
@media (max-width: 767.98px) and (prefers-reduced-motion: reduce) {
    .card:hover {
        transform: none;
    }
    
    .btn-success:hover {
        transform: none;
    }
    
    .gallery img:hover {
        transform: none;
    }
}

/* High contrast mode adjustments */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid #333;
    }
    
    .btn-success {
        border: 2px solid #000;
    }
    
    .nav-link {
        border-bottom: 1px solid transparent;
    }
    
    .nav-link:hover,
    .nav-link.active {
        border-bottom-color: var(--primary-green);
    }
}

/* Dark mode preferences */

/* Print optimizations */
@media print {
    /* Hide interactive elements */
    .navbar,
    .btn,
    .hero-shapes,
    #footer {
        display: none !important;
    }
    
    /* Optimize spacing for print */
    section {
        padding: 1rem 0;
        page-break-inside: avoid;
    }
    
    .card {
        border: 1px solid #333;
        box-shadow: none;
        page-break-inside: avoid;
    }
    
    /* Ensure readable text */
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
    }
    
    h1, h2, h3, h4, h5, h6 {
        color: #000;
        page-break-after: avoid;
    }
    
    /* Remove background colors for print */
    .bg-light,
    .bg-success {
        background-color: transparent !important;
    }
}

/* Landscape orientation adjustments for mobile */
@media (max-width: 767.98px) and (orientation: landscape) {
    .home-box {
        min-height: 60vh;
    }
    
    section {
        padding: 2rem 0;
    }
    
    .navbar-collapse {
        max-height: 60vh;
        overflow-y: auto;
    }
}

/* Ultra-wide screen adjustments */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .home-box .container {
        max-width: 1200px;
    }
}

/* Specific adjustments for touch devices */
@media (hover: none) and (pointer: coarse) {
    .card:hover,
    .btn-success:hover,
    .feature-item:hover,
    .feature-box:hover,
    .support-item:hover {
        transform: none;
    }
    
    /* Increase touch targets */
    .nav-link {
        padding: 1rem;
    }
    
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Reduce animations on lower-end devices */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .card,
    .btn,
    .nav-link {
        transition: none !important;
    }
} 

.home-box h1 {
    padding-top: 100px;
}