/* Coffee Ground Recycling Bio-Fertilizer Website - Responsive Styles */
/* Bootstrap 5 compliant responsive additions */

/* Mobile First Approach */

/* Extra Small devices (phones, less than 576px) */
@media (max-width: 575.98px) {
  /* Disable animations on mobile for better performance */
  * {
    animation: none !important;
    transition: none !important;
  }
  
  /* Typography adjustments */
  h1 {
    font-size: 1.8rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  h3 {
    font-size: 1.3rem;
  }
  
  /* Hero section adjustments */
  .hero-section {
    min-height: 80vh;
    text-align: center;
  }
  
  .hero-section .col-md-6 {
    margin-bottom: 2rem;
  }
  
  /* Section padding reduction */
  .section-padding {
    padding: 2rem 0;
  }
  
  /* Card adjustments */
  .service-card,
  .contact-form {
    padding: 1.5rem;
  }
  
  /* Team photos smaller on mobile */
  .team-photo {
    width: 120px;
    height: 120px;
  }
  
  /* Gallery grid adjustments */
  .gallery-item img {
    height: 200px;
  }
  
  /* Form adjustments */
  .btn-primary {
    width: 100%;
    margin-top: 1rem;
  }
  
  /* Footer adjustments */
  .footer {
    text-align: center;
    padding: 2rem 0 1rem;
  }
  
  .footer .col-md-3,
  .footer .col-md-4 {
    margin-bottom: 2rem;
  }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
  .hero-section {
    min-height: 85vh;
  }
  
  .team-photo {
    width: 140px;
    height: 140px;
  }
  
  .gallery-item img {
    height: 220px;
  }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
  .hero-section {
    min-height: 90vh;
  }
  
  .service-card {
    height: 100%;
  }
  
  .gallery-item img {
    height: 240px;
  }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
  .hero-section {
    min-height: 100vh;
  }
  
  /* Enhanced hover effects for larger screens */
  .card:hover {
    transform: translateY(-8px);
  }
  
  .gallery-item:hover img {
    transform: scale(1.08);
  }
  
  /* Explicitly prevent horizontal scrolling on desktop */
  html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
  }
  
  /* Ensure container doesn't overflow */
  .container, .container-fluid {
    max-width: 100%;
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
  .container-xl {
    max-width: 1140px;
  }
  
  /* Larger spacing for XL screens */
  .section-padding {
    padding: 5rem 0;
  }
  
  .hero-section {
    padding: 0 2rem;
  }
}

/* Landscape phone orientation */
@media (orientation: landscape) and (max-height: 500px) {
  .hero-section {
    min-height: 100vh;
    padding: 2rem 0;
  }
  
  .navbar {
    padding: 0.25rem 0;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .card {
    border: 2px solid #000;
  }
  
  .btn-primary {
    border: 2px solid #000;
  }
  
  .form-control {
    border: 2px solid #000;
  }
}

/* Print styles */
@media print {
  .navbar,
  .footer,
  .btn {
    display: none !important;
  }
  
  .hero-section {
    min-height: auto;
    page-break-after: always;
  }
  
  .section-padding {
    padding: 1rem 0;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
  }
  
  h1, h2, h3 {
    page-break-after: avoid;
  }
}

/* Custom grid adjustments for specific sections */
@media (min-width: 768px) {
  .services-grid .col-md-4:nth-child(3n+1) {
    clear: left;
  }
  
  .features-grid .col-md-3:nth-child(4n+1) {
    clear: left;
  }
  
  .team-grid .col-md-2:nth-child(5n+1) {
    clear: left;
  }
}

/* Navbar mobile menu - using standard Bootstrap 5 */
@media (max-width: 991.98px) {
  .navbar-nav {
    text-align: center;
  }
  
  .navbar-nav .nav-link {
    padding: 0.75rem 0;
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  .hero-section::before,
  .hero-section::after {
    display: none;
  }
}

/* Focus states for better accessibility */
@media (min-width: 768px) {
  .card:focus-within {
    outline: 2px solid var(--primary-green);
    outline-offset: 2px;
  }
  
  .btn:focus {
    outline: 2px solid var(--primary-green);
    outline-offset: 2px;
  }
}

.hero-section h1 {
    padding-top: 225px;
}