/* Mobile-First Responsive Design */

/* Extra Small Devices (phones, up to 576px) */
@media (max-width: 575.98px) {
  /* Disable animations on mobile for performance */
  * {
    animation: none !important;
    transition: none !important;
  }
  
  :root {
    --section-padding: 3rem 0;
    --font-size-3xl: 1.5rem;
    --font-size-2xl: 1.25rem;
    --font-size-xl: 1.125rem;
  }
  
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  /* Hero Section */
  #hero {
    min-height: 80vh;
    text-align: center;
  }
  
  .hero-decorative {
    display: none;
  }
  
  /* Navigation */
  .navbar-brand {
    font-size: 1.125rem !important;
  }
  
  .navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
  }
  
  .navbar-collapse {
    margin-top: 1rem;
  }
  
  .navbar-nav .nav-link {
    padding: 0.75rem 0;
    text-align: center;
  }
  
  /* Typography */
  h1 {
    font-size: 1.5rem;
  }
  
  h2 {
    font-size: 1.25rem;
  }
  
  h3 {
    font-size: 1.125rem;
  }
  
  p {
    font-size: 0.9rem;
  }
  
  /* Cards */
  .feature-card,
  .service-card,
  .price-card,
  .team-card {
    margin-bottom: 1.5rem;
  }
  
  .service-card,
  .price-card {
    padding: 1.5rem;
  }
  
  .price-card.featured {
    transform: none;
  }
  
  /* Contact Form */
  .contact-form {
    padding: 2rem 1.5rem;
  }
  
  /* Gallery */
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  
  /* Process Steps */
  .process-step {
    padding: 1.5rem 0.5rem;
  }
  
  .process-number {
    width: 50px;
    height: 50px;
    font-size: 1rem;
  }
  
  /* Team Photos */
  .team-photo {
    width: 100px;
    height: 100px;
  }
  
  /* Footer */
  #footer {
    padding: 2rem 0 1rem;
  }
  
  .footer-section {
    text-align: center;
    margin-bottom: 1.5rem;
  }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .service-card,
  .price-card {
    margin-bottom: 2rem;
  }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
  :root {
    --section-padding: 4rem 0;
  }
  
  /* Hero adjustments */
  #hero {
    min-height: 90vh;
  }
  
  /* Gallery */
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  /* Services and Features */
  .service-card,
  .feature-card {
    margin-bottom: 2rem;
  }
  
  /* Contact Form */
  .contact-form {
    padding: 2.5rem;
  }
  
  /* Process Steps */
  .process-step {
    padding: 2rem 1rem;
  }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  /* Price cards */
  .price-card.featured {
    transform: scale(1.02);
  }
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
  .container {
    max-width: var(--container-max-width);
  }
  
  .gallery-grid {
    grid-template-columns: repeat(5, 1fr);
  }
  
  /* Enhanced hover effects on larger screens */
  .feature-card:hover {
    transform: translateY(-8px);
  }
  
  .service-card:hover {
    transform: translateY(-10px);
  }
}

/* Print Styles */
@media print {
  * {
    background: transparent !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  
  #header,
  #footer,
  .navbar,
  .btn {
    display: none !important;
  }
  
  section {
    page-break-inside: avoid;
    padding: 1rem 0;
  }
  
  h1, h2, h3 {
    page-break-after: avoid;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  :root {
    --primary-color: #0066cc;
    --secondary-color: #008800;
    --quaternary-color: #cc0000;
    --black: #000000;
    --white: #ffffff;
  }
  
  .btn {
    border-width: 2px;
  }
  
  .card,
  .feature-card,
  .service-card {
    border: 2px solid var(--dark-gray);
  }
}

/* Reduced Motion Preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .hero-decorative {
    display: none;
  }
}

/* Dark Mode Support */

/* Landscape Orientation on Mobile */
@media (orientation: landscape) and (max-height: 500px) {
  #hero {
    min-height: 100vh;
  }
  
  .navbar {
    padding: 0.25rem 0;
  }
  
  section {
    padding: 2rem 0;
  }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
  /* Remove hover effects on touch devices */
  .feature-card:hover,
  .service-card:hover,
  .team-card:hover,
  .blog-card:hover,
  .gallery-item:hover {
    transform: none;
    box-shadow: inherit;
  }
  
  /* Larger touch targets */
  .btn {
    min-height: 44px;
    padding: 0.75rem 1.5rem;
  }
  
  .navbar-nav .nav-link {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Remove transitions that can cause lag */
  * {
    transition-duration: 0.1s !important;
  }
}

/* Ultra-wide Screens */
@media (min-width: 1600px) {
  .container {
    max-width: 1400px;
  }
  
  :root {
    --font-size-3xl: 2rem;
    --font-size-2xl: 1.75rem;
  }
  
  section {
    padding: 6rem 0;
  }
}

/* Small Height Screens */
@media (max-height: 600px) and (orientation: landscape) {
  #hero {
    min-height: 100vh;
    padding: 2rem 0;
  }
  
  section {
    padding: 3rem 0;
  }
}

/* Focus Styles for Accessibility */
@media (prefers-reduced-motion: no-preference) {
  *:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
  }
  
  .btn:focus {
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
  }
} 