/* Mobile First Responsive Design */

/* Extra Small devices (portrait phones, less than 578px) */
@media (max-width: 575.98px) {
  /* Typography adjustments */
  h1, .h1 {
    font-size: 2.07rem;
  }
  
  h2, .h2 {
    font-size: 1.65rem;
  }
  
  .display-4 {
    font-size: 2rem;
  }
  
  .lead {
    font-size: 1rem;
  }
  
  /* Navbar brand size */
  .navbar-brand {
    font-size: 1.43rem;
  }
  
  /* Hero section adjustments */
  #hero {
    min-height: 80vh;
    text-align: center;
  }
  
  #hero .container {
    padding-top: 2rem;
  }
  
  /* Card spacing */
  .card {
    margin-bottom: 1.74rem;
  }
  
  /* Process section circles */
  #process .rounded-circle {
    width: 50px;
    height: 50px;
    font-size: 1rem;
  }
  
  /* Reduce padding on mobile */
  .py-5 {
    padding-top: 2.86rem;
    padding-bottom: 2.82rem;
  }
  
  /* Contact form */
  .form-control {
    padding: 10px 12px;
  }
  
  /* Gallery grid adjustments */
  #gallery .col-md-4 {
    margin-bottom: 1rem;
  }
  
  /* Footer spacing */
  #footer .col-lg-4 {
    margin-bottom: 2rem;
  }
  
  /* Team cards */
  #team .card-img-top {
    height: 200px;
  }
  
  /* Service cards */
  #services .card-img-top {
    height: 180px;
  }
  
  /* NO animations on mobile as per requirements */
  .card {
    transition: none !important;
  }
  
  .card:hover {
    transform: none !important;
    box-shadow: 0 6px 15px rgba(0,0,0,0.1) !important;
  }
  
  #gallery img:hover {
    transform: none !important;
  }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
  /* Hero adjustments */
  #hero {
    min-height: 90vh;
  }
  
  .display-4 {
    font-size: 2.43rem;
  }
  
  /* Process circles */
  #process .rounded-circle {
    width: 55px;
    height: 55px;
  }
  
  /* Card grid adjustments */
  .row.g-4 > .col-md-6 {
    margin-bottom: 1.89rem;
  }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
  /* Hero section */
  #hero {
    min-height: 100vh;
  }
  
  /* Typography */
  h1, .h1 {
    font-size: 2.46rem;
  }
  
  h2, .h2 {
    font-size: 2.00rem;
  }
  
  /* Services grid */
  #services .card-img-top {
    height: 220px;
  }
  
  /* Team grid */
  #team .card-img-top {
    height: 280px;
  }
  
  /* Gallery responsive */
  #gallery .col-md-4 {
    margin-bottom: 1rem;
  }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
  /* Full hero height */
  #hero {
    min-height: 100vh;
  }
  
  /* Optimal card heights */
  #services .card-img-top {
    height: 200px;
  }
  
  #team .card-img-top {
    height: 250px;
  }
  
  /* Process section optimization */
  #process .col-lg-2 {
    flex: 0 0 auto;
    width: 20%;
  }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
  /* Container max-width adjustments */
  .container {
    max-width: 1140px;
  }
  
  /* Hero section full height */
  #hero {
    min-height: 100vh;
  }
  
  /* Optimal spacing */
  .py-5 {
    padding-top: 5rem;
    padding-bottom: 5rem;
  }
  
  /* Card optimal heights */
  #services .card-img-top {
    height: 220px;
  }
  
  #team .card-img-top {
    height: 280px;
  }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 600px) {
  #hero {
    min-height: 100vh;
    padding-top: 1rem;
    padding-bottom: 1rem;
  }
  
  .py-5 {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  /* Ensure crisp text rendering */
  body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}
}

/* Print styles */
@media print {
  /* Hide navigation and footer */
  #header,
  #footer {
    display: none !important;
  }
  
  /* Adjust body padding */
  body {
    padding-top: 0;
  }
  
  /* Ensure good contrast */
  .card {
    border: 1px solid #cfcacb !important;
    box-shadow: none !important;
  }
  
  /* Page breaks */
  .py-5 {
    page-break-inside: avoid;
  }
}

/* Accessibility improvements */
@media (prefers-contrast: high) {
  .card {
    border: 2px solid var(--primary-charcoal) !important;
  }
  
  .btn-primary {
    border: 2px solid var(--primary-charcoal) !important;
  }
}

/* Focus management for keyboard navigation */
@media (prefers-reduced-motion: no-preference) {
  .nav-link:focus,
  .btn:focus,
  .form-control:focus {
    outline: 3px solid var(--primary-green);
    outline-offset: 2px;
  }
}

/* Container responsive adjustments */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
}

/* Navbar collapse improvements */
@media (max-width: 991.98px) {
  .navbar-collapse {
    background-color: white;
    padding: 1rem;
    margin-top: 0.80rem;
    border-radius: 8px;
    box-shadow: 0 7px 15px rgba(0,0,0,0.1);
  }
  
  .navbar-nav .nav-link {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--light-sage);
  }
  
  .navbar-nav .nav-link:last-child {
    border-bottom: none;
  }
}

/* Image responsiveness improvements */
@media (max-width: 767.98px) {
  #hero img,
  .card-img-top {
    width: 100%;
    height: auto;
    object-fit: cover;
  }
}

/* Form responsive improvements */
@media (max-width: 575.98px) {
  .row.g-3 > .col-md-6 {
    margin-bottom: 1rem;
  }
  
  .btn {
    width: 100%;
    padding: 12px;
  }
}

/* Gallery responsive grid */
@media (max-width: 575.98px) {
  #gallery .col-md-4 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

@media (min-width: 576px) and (max-width: 767.98px) {
  #gallery .col-md-4 {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

/* Process section responsive */
@media (max-width: 767.98px) {
  #process .col-lg-2 {
    margin-bottom: 2rem;
  }
  
  #process .col-lg-2:last-child {
    margin-bottom: 0;
  }
} 