/* Responsive Styles for 3D-Printed Spare Parts Marketplace */
/* Mobile-first approach with Bootstrap 5 integration */

/* Extra Small devices (phones, less than 576px) */
@media (max-width: 575.98px) {
  :root {
    --fs-h1: 1.75rem;
    --fs-h2: 1.5rem;
    --fs-h3: 1.25rem;
    --fs-brand: 1.25rem;
    --section-padding: 3rem 0;
  }

  /* NO animations on mobile as per requirements */
  * {
    animation: none !important;
    transition: none !important;
  }

  /* Hero section adjustments */
  #hero {
    min-height: 80vh;
    text-align: center;
  }

  #hero .container > .row > .col-md-6:first-child {
    order: 2;
    margin-top: 2rem;
  }

  #hero .container > .row > .col-md-6:last-child {
    order: 1;
  }

  /* Conservative mobile typography */
  h1 { font-size: var(--fs-h1); }
  h2 { font-size: var(--fs-h2); }
  h3 { font-size: var(--fs-h3); }

  .navbar-brand {
    font-size: var(--fs-brand) !important;
  }

  /* Service cards stack nicely */
  .service-card {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
  }

  /* Price cards mobile adjustments */
  .price-card.featured {
    transform: none;
    margin-bottom: 2rem;
  }

  /* Team cards responsive */
  .team-card img {
    height: 200px;
  }

  /* Contact form mobile */
  .contact-form {
    padding: 1.5rem;
    margin-top: 2rem;
  }

  /* Gallery mobile grid */
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  /* Mobile button sizes */
  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }

  /* Footer adjustments */
  footer .row > div {
    text-align: center;
    margin-bottom: 2rem;
  }
}

/* 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 {
    margin-bottom: 1.5rem;
  }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
  :root {
    --section-padding: 4rem 0;
  }

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  #hero {
    min-height: 90vh;
  }

  /* Price card featured scaling */
  .price-card.featured {
    transform: scale(1.02);
  }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Service cards hover effects on larger screens */
  .service-card:hover {
    transform: translateY(-8px);
  }

  /* Team cards enhanced spacing */
  .team-card {
    margin-bottom: 2rem;
  }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }

  #hero::before {
    width: 35%;
  }

  #hero::after {
    width: 25%;
  }
}

/* Ultra-wide screens (1400px and up) */
@media (min-width: 1400px) {
  .container-xxl {
    max-width: 1320px;
  }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {
  .service-card img,
  .team-card img,
  .gallery-item img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

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

  .section {
    padding: 3rem 0;
  }
}

/* Print styles */
@media print {
  #hero::before,
  #hero::after,
  .decorative-blob {
    display: none;
  }

  .service-card,
  .team-card,
  .review-card,
  .faq-card,
  .price-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }

  .btn {
    display: none;
  }
}

/* Accessibility enhancements */
@media (prefers-reduced-motion: reduce) {
  .service-card:hover,
  .blog-card:hover {
    transform: none;
  }

  #hero::before,
  #hero::after {
    animation: none;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .service-card,
  .team-card,
  .review-card,
  .faq-card,
  .price-card,
  .contact-form {
    border: 2px solid currentColor;
  }

  .btn-primary {
    border: 2px solid currentColor;
  }
}

/* Dark mode considerations (if needed) */

/* Focus management for keyboard navigation */
@media (any-hover: none) {
  .service-card:hover,
  .blog-card:hover {
    transform: none;
  }
}

/* Tablet-specific adjustments */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .service-card {
    padding: 1.75rem;
  }
}

/* Prevent horizontal scroll */
@media (max-width: 575.98px) {
  body {
    overflow-x: hidden;
  }

  .container-fluid {
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* Enhanced touch targets for mobile */
@media (hover: none) and (pointer: coarse) {
  .btn {
    min-height: 44px;
    min-width: 44px;
  }

  .navbar-toggler {
    min-height: 44px;
    min-width: 44px;
  }

  .form-control {
    min-height: 44px;
  }
}