/* ===================================
   RESPONSIVE CSS - MOBILE & TABLET STYLES
   ================================== */

/* Extra Small Devices (Phones, 576px and down) */
@media (max-width: 575.98px) {
  /* Typography Adjustments */
  .display-4 {
    font-size: 1.83rem !important;
  }
  
  .display-6 {
    font-size: 1.37rem !important;
  }
  
  .lead {
    font-size: 1.08rem !important;
  }
  
  /* Hero Section */
  #hero {
    padding-top: 90px;
    min-height: 80vh;
  }
  
  #hero .container {
    padding: 0 15px;
  }
  
  /* Navigation */
  .navbar-brand {
    font-size: 1rem !important;
  }
  
  .navbar-nav .nav-link {
    padding: 0.75rem 1rem;
    text-align: center;
  }
  
  /* Cards */
  .card {
    margin-bottom: 1.57rem;
  }
  
  .card-body {
    padding: 1rem;
  }
  
  /* Team Section */
  .team-section img {
    width: 100px;
    height: 100px;
  }
  
  /* Process Steps */
  .process-step {
    width: 50px;
    height: 50px;
    font-size: 0.99rem;
  }
  
  /* Gallery */
  #gallery img {
    height: 150px;
  }
  
  /* Contact Form */
  .form-control {
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  /* Buttons */
  .btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }
  
  /* Spacing */
  .py-5 {
    padding-top: 2.57rem !important;
    padding-bottom: 2.59rem !important;
  }
  
  .mb-5 {
    margin-bottom: 2rem !important;
  }
}

/* Small Devices (Landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
  /* Hero Section */
  #hero {
    padding-top: 85px;
  }
  
  /* Cards in grid */
  .card-columns {
    column-count: 1;
  }
  
  /* Gallery adjustments */
  #gallery img {
    height: 180px;
  }
}

/* Medium Devices (Tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
  /* Hero Section */
  #hero {
    padding-top: 80px;
  }
  
  /* Typography */
  .display-4 {
    font-size: 2.38rem;
  }
  
  /* Team Grid */
  .team-section .col-lg-2 {
    flex: 0 0 50%;
    max-width: 50%;
  }
  
  /* Process Steps */
  .process-step {
    width: 55px;
    height: 55px;
  }
  
  /* Gallery */
  #gallery img {
    height: 180px;
  }
}

/* Large Devices (Desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
  /* Team Grid Adjustment */
  .team-section .col-lg-2 {
    flex: 0 0 20%;
    max-width: 20%;
  }
}

/* Mobile-First Responsive Utilities */
.mobile-only {
  display: block;
}

.desktop-only {
  display: none;
}

@media (min-width: 768px) {
  .mobile-only {
    display: none;
  }
  
  .desktop-only {
    display: block;
  }
}

/* Mobile Navigation Enhancements */
@media (max-width: 991.98px) {
  .navbar-collapse {
    border-top: 1px solid rgba(0,0,0,.1);
    margin-top: 0.56rem;
    padding-top: 0.72rem;
  }
  
  .navbar-nav {
    padding: 0.5rem 0;
  }
  
  .navbar-nav .nav-item {
    margin: 0.25rem 0;
  }
  
  .navbar-nav .nav-link {
    padding: 0.75rem 0;
    border-radius: 0.375rem;
    text-align: center;
  }
  
  .navbar-nav .nav-link:hover {
    background-color: var(--color-primary-light);
  }
}

/* Touch-Friendly Improvements */
@media (hover: none) and (pointer: coarse) {
  /* Larger touch targets */
  .btn {
    min-height: 44px;
    min-width: 44px;
  }
  
  .nav-link {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Remove hover effects on touch devices */
  .card:hover {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  }
  
  #gallery img:hover {
    transform: none;
  }
}

/* Landscape Orientation on Mobile */
@media (max-width: 767.98px) and (orientation: landscape) {
  #hero {
    min-height: 100vh;
  }
  
  .py-5 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  /* Ensure images look crisp on retina displays */
  img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Mobile-Specific Animations Disabled */
@media (max-width: 768px) {
  /* Disable all animations on mobile for performance */
  * {
    animation-duration: 0s !important;
    animation-delay: 0s !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
  }
  
  [data-sal] {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Focus Improvements for Keyboard Navigation */
@media (min-width: 768px) {
  .btn:focus,
  .nav-link:focus,
  .form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(123, 123, 255, 0.50);
    outline: none;
  }
}

/* Print Responsive Adjustments */
@media print {
  .container {
    max-width: none !important;
    width: 100% !important;
  }
  
  .row {
    margin: 0 !important;
  }
  
  .col-lg-4,
  .col-lg-6,
  .col-lg-8,
  .col-lg-12 {
    flex: 0 0 100%;
    max-width: 100%;
  }
  
  .py-5 {
    padding: 1rem 0 !important;
  }
}

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
  .card {
    transition: none;
  }
  
  #gallery img {
    transition: none;
  }
  
  footer a {
    transition: none;
  }
}

/* Dark Mode Support (if browser supports) */

/* Container Fluid Adjustments */
.container-fluid {
  padding-left: 15px;
  padding-right: 15px;
}

@media (max-width: 575.98px) {
  .container-fluid {
    padding-left: 10px;
    padding-right: 10px;
  }
}

/* Grid Gaps for Mobile */
@media (max-width: 767.98px) {
  .row.g-4 {
    --bs-gutter-x: 1rem;
    --bs-gutter-y: 1rem;
  }
  
  .row.g-3 {
    --bs-gutter-x: 0.75rem;
    --bs-gutter-y: 0.75rem;
  }
}

/* Safe Area Adjustments for Mobile Browsers */
@supports (padding: max(0px)) {
  .container {
    padding-left: max(15px, env(safe-area-inset-left));
    padding-right: max(15px, env(safe-area-inset-right));
  }
  
  .navbar {
    padding-left: max(15px, env(safe-area-inset-left));
    padding-right: max(15px, env(safe-area-inset-right));
  }
} 
/* Disable horizontal scroll on desktop resolutions */
@media (min-width: 992px) {
    html, body {
        overflow-x: hidden;
        max-width: 100%;
    }
}
