/* Mobile First Responsive Design */

/* Extra Small Devices (phones, less than 576px) */
@media (max-width: 575.98px) {
  /* Typography Adjustments */
  .navbar-brand {
    font-size: 1.16rem;
  }
  
  .display-5 {
    font-size: 1.84rem;
    line-height: 1.3;
  }
  
  .h3 {
    font-size: 1.50rem;
  }
  
  .h4 {
    font-size: 1.23rem;
  }
  
  .h5 {
    font-size: 1rem;
  }
  
  .h6 {
    font-size: 1.00rem;
  }
  
  p.lead {
    font-size: 1rem;
  }
  
  /* Hero Section Mobile */
  #hero {
    min-height: 70vh;
    padding: 2rem 0;
  }
  
  #hero .btn-lg {
    font-size: 0.98rem;
    padding: 0.6rem 1.2rem;
    margin-bottom: 0.58rem;
  }
  
  /* Card Spacing */
  .card-body {
    padding: 1rem;
    overflow-x: hidden;
}
  
  /* Footer Mobile */
  #footer .row > div {
    margin-bottom: 2rem;
  }
  
  /* Contact Form Mobile */
  .form-control {
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  /* Gallery Mobile */
  #gallery .col-md-4 {
    margin-bottom: 1rem;
  }
  
  /* Team Section Mobile */
  #team .col-md-6 {
    margin-bottom: 2rem;
  }
  
  /* Services Mobile */
  .card-title {
    font-size: 1rem;
  }
  
  .card-text {
    font-size: 0.89rem;
  }
  
  /* Disable hover effects on mobile */
  .card:hover {
    transform: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  }
  
  .rounded-circle:hover {
    transform: none;
  }
  
  #gallery img:hover {
    transform: none;
  }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
  .display-5 {
    font-size: 2.31rem;
  }
  
  #hero {
    min-height: 80vh;
  }
  
  .btn-lg {
    font-size: 1rem;
    padding: 0.7rem 1.5rem;
  }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
  .display-5 {
    font-size: 2.35rem;
  }
  
  #hero {
    min-height: 90vh;
  }
  
  /* Tablet-specific adjustments */
  .card-columns {
    column-count: 2;
  }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) {
  #hero {
    min-height: 100vh;
  }
  
  .display-5 {
    font-size: 2.63rem;
  }
}

/* Mobile Navigation Improvements */
@media (max-width: 991.98px) {
  .navbar-collapse {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
  }
  
  .navbar-nav .nav-link {
    padding: 0.7rem 0;
    font-size: 1.15rem;
  }
  
  .navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
  }
  
  .navbar-toggler:focus {
    box-shadow: none;
  }
}

/* Accessibility Improvements for Mobile */
@media (max-width: 768px) {
  /* Larger touch targets */
  .btn {
    min-height: 44px;
    min-width: 44px;
  }
  
  .nav-link {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  
  /* Better spacing for touch */
  .form-control {
    min-height: 44px;
  }
  
  .form-check-input {
    margin-top: 0.56rem;
  }
}

/* Print Styles */
@media print {
  .navbar,
  .btn,
  #footer,
  .breadcrumb {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
  }
  
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
  }
  
  .card {
    border: 1px solid #000;
    page-break-inside: avoid;
  }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  /* Optimize for retina displays */
  .navbar-brand {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

/* Landscape Orientation */
@media (orientation: landscape) and (max-height: 500px) {
  #hero {
    min-height: 70vh;
    padding: 1rem 0;
  }
  
  #hero h1 {
    font-size: 1.86rem;
  }
  
  #hero .btn-lg {
    font-size: 0.93rem;
    padding: 0.5rem 1rem;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  /* Disable animations on mobile for better performance */
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}

/* Dark Mode Support */