/* ================================
   MOBILE OPTIMIZATION STYLES
   Boise Restoration Experts
   ================================ */

/* Mobile Header Optimization */
@media (max-width: 768px) {
  /* Reduce header height on mobile */
  header nav .h-28 {
    height: 4rem !important; /* Reduced from 7rem (h-28) */
  }
  
  /* Smaller logo on mobile */
  header .w-24.h-24 {
    width: 3rem !important;
    height: 3rem !important;
  }
  
  /* Adjust emergency banner padding */
  .bg-gradient-emergency {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
  }
  
  /* Optimize sticky behavior */
  header.sticky {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
  }
  
  /* Add padding to body to account for fixed header */
  body {
    padding-top: 6rem; /* Account for fixed header height */
  }
}

/* Hero Section Mobile Optimization */
@media (max-width: 768px) {
  /* Fix hero section height and padding */
  .hero-section,
  section.relative.bg-gradient-to-br {
    min-height: calc(100vh - 6rem) !important; /* Account for header */
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }
  
  /* Hero text optimization */
  h1.text-4xl.lg\:text-6xl {
    font-size: 1.875rem !important; /* 30px */
    line-height: 2.25rem !important; /* 36px */
  }
  
  /* Prevent text cutoff */
  h1 span.text-yellow-400 {
    display: block !important;
    margin-top: 0.5rem !important;
  }
  
  /* Hero description text */
  p.text-xl.lg\:text-2xl {
    font-size: 1rem !important; /* 16px */
    line-height: 1.5rem !important; /* 24px */
  }
  
  /* Hero stats grid */
  .grid.grid-cols-3 {
    gap: 0.75rem !important;
  }
  
  .grid.grid-cols-3 .text-3xl {
    font-size: 1.5rem !important;
  }
  
  .grid.grid-cols-3 .text-sm {
    font-size: 0.75rem !important;
  }
}

/* Mobile Form Optimization */
@media (max-width: 768px) {
  .quick-contact-form-mobile {
    margin-top: 2rem !important;
    padding: 1.25rem !important;
  }
  
  .form-header-mobile h3 {
    font-size: 1.125rem !important;
  }
}

/* Button Optimization for Mobile */
@media (max-width: 768px) {
  /* CTA buttons */
  .btn-emergency,
  a[href^="tel:"] {
    font-size: 0.875rem !important;
    padding: 0.75rem 1rem !important;
  }
  
  /* Hero buttons */
  .flex.flex-col.sm\:flex-row a {
    padding: 0.875rem 1.5rem !important;
    font-size: 1rem !important;
  }
}

/* Navigation Menu Mobile */
@media (max-width: 768px) {
  /* Mobile menu button */
  .lg\:hidden button {
    padding: 0.5rem !important;
  }
  
  /* Mobile menu dropdown */
  #mobile-menu {
    max-height: calc(100vh - 6rem);
    overflow-y: auto;
  }
  
  /* Breadcrumb navigation */
  nav[aria-label="Breadcrumb"] {
    display: none !important; /* Hide on mobile to save space */
  }
}

/* Service Cards Mobile */
@media (max-width: 640px) {
  /* Service grid */
  .grid.md\:grid-cols-2.lg\:grid-cols-4 {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
  
  /* Service card padding */
  .bg-white.rounded-lg.shadow-lg {
    padding: 1.25rem !important;
  }
}

/* Footer Mobile Optimization */
@media (max-width: 768px) {
  /* Footer padding */
  footer {
    padding: 2rem 1rem !important;
  }
  
  /* Footer grid */
  footer .grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }
  
  /* Footer text size */
  footer .text-sm {
    font-size: 0.875rem !important;
  }
}

/* Testimonial Section Mobile */
@media (max-width: 768px) {
  .testimonial-carousel-header h2 {
    font-size: 1.5rem !important;
  }
  
  .testimonial-card {
    padding: 1.5rem !important;
  }
  
  .testimonial-text {
    font-size: 0.875rem !important;
  }
}

/* Emergency Banner Mobile */
@media (max-width: 640px) {
  .bg-emergency-600.text-white.py-3 {
    padding: 0.75rem !important;
  }
  
  .bg-emergency-600 .font-semibold {
    font-size: 0.75rem !important;
  }
  
  .bg-emergency-600 a {
    font-size: 0.75rem !important;
    padding: 0.25rem 0.5rem !important;
  }
}

/* General Mobile Improvements */
@media (max-width: 768px) {
  /* Reduce large text sizes */
  .text-4xl {
    font-size: 1.875rem !important;
  }
  
  .text-3xl {
    font-size: 1.5rem !important;
  }
  
  .text-2xl {
    font-size: 1.25rem !important;
  }
  
  .text-xl {
    font-size: 1.125rem !important;
  }
  
  /* Optimize spacing */
  .py-20 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }
  
  .py-32 {
    padding-top: 4rem !important;
    padding-bottom: 4rem !important;
  }
  
  /* Max width containers */
  .max-w-7xl {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}

/* Landscape Mobile Optimization */
@media (max-width: 768px) and (orientation: landscape) {
  /* Further reduce header height in landscape */
  header nav .h-28 {
    height: 3rem !important;
  }
  
  /* Smaller emergency banner */
  .bg-gradient-emergency {
    display: none !important; /* Hide in landscape to save space */
  }
  
  /* Adjust body padding */
  body {
    padding-top: 3rem !important;
  }
  
  /* Hero adjustments */
  .hero-section,
  section.relative.bg-gradient-to-br {
    min-height: calc(100vh - 3rem) !important;
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
  }
}

/* Small Mobile Devices (< 375px) */
@media (max-width: 375px) {
  /* Even smaller text for tiny screens */
  h1.text-4xl.lg\:text-6xl {
    font-size: 1.5rem !important;
    line-height: 2rem !important;
  }
  
  /* Reduce button sizes */
  .btn-emergency,
  a[href^="tel:"] {
    font-size: 0.75rem !important;
    padding: 0.625rem 0.875rem !important;
  }
  
  /* Stack hero stats vertically */
  .grid.grid-cols-3 {
    grid-template-columns: 1fr !important;
    gap: 0.5rem !important;
  }
}

/* Accessibility Improvements */
@media (max-width: 768px) {
  /* Increase tap target sizes */
  a, button {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Improve focus visibility */
  a:focus, button:focus, input:focus, select:focus, textarea:focus {
    outline: 3px solid #3b82f6 !important;
    outline-offset: 2px !important;
  }
}

/* Performance Optimizations */
@media (max-width: 768px) {
  /* Disable animations on mobile for better performance */
  .animate-pulse-glow,
  .animate-fade-in-up,
  .animate-fade-in-scale,
  .animate-slide-right,
  .hover-lift,
  .hover-glow {
    animation: none !important;
  }
  
  /* Simplify transitions */
  * {
    transition-duration: 0.2s !important;
  }
}