/* ===== RESPONSIVE STYLES FOR THRIFT STORE TEMPLATE ===== */

/* Extra Small Devices (phones, 576px and down) */
@media (max-width: 575.98px) {
  :root {
    --font-size-h1: 1.6rem;
    --font-size-h2: 1.4rem;
    --font-size-h3: 1.2rem;
    --font-size-h4: 1.1rem;
    --section-padding: 40px 0;
    --container-padding: 15px;
  }

  .container {
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
  }

  .hero-section {
    min-height: 70vh;
    padding: 2rem 0;
  }

  .hero-title {
    font-size: 1.6rem;
    margin-bottom: 0.8rem;
  }

  .hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 1rem;
  }

  .hero-desc {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .service-item {
    padding: 1.5rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .gallery-item img {
    height: 200px;
  }

  .contact-form {
    padding: 1.5rem 1rem;
    margin: 1rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: center;
  }

  .navbar-brand {
    font-size: 1.2rem !important;
  }

  .navbar-nav {
    text-align: center;
    margin-top: 1rem;
  }

  .section-title {
    font-size: 1.4rem;
  }

  .section-subtitle {
    font-size: 1.1rem;
  }

  .team-member img {
    width: 100px;
    height: 100px;
  }

  .blob-1, .blob-2 {
    display: none; /* Hide decorative elements on very small screens */
  }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-section {
    min-height: 75vh;
  }

  .contact-form {
    padding: 2rem 1.5rem;
  }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .team-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero-section {
    min-height: 85vh;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1.5rem;
  }

  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Swiper adjustments for tablets */
  .swiper-container {
    padding-bottom: 40px;
  }

  .swiper-pagination {
    position: static;
    margin-top: 20px;
  }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .features-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .team-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .footer-content {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .features-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .team-grid {
    grid-template-columns: repeat(5, 1fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(5, 1fr);
  }

  .footer-content {
    grid-template-columns: repeat(4, 1fr);
  }

  .hero-section .container {
    max-width: 1140px;
  }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
  .service-item:hover,
  .team-member:hover,
  .gallery-item:hover {
    transform: none; /* Disable hover effects on touch devices */
  }

  .btn-primary:hover {
    transform: none;
  }

  /* Increase touch targets */
  .nav-link {
  font-size: 10px !important;
    padding: 0.8rem 1rem !important;
  }

  .btn-primary {
    padding: 15px 35px;
    font-size: 1.1rem;
  }

  .form-control {
    padding: 15px;
    font-size: 1.1rem;
  }
}

/* High DPI / Retina Display Optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .service-item img,
  .team-member img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Landscape Orientation Adjustments */
@media screen and (orientation: landscape) and (max-height: 500px) {
  .hero-section {
    min-height: 100vh;
    padding: 1rem 0;
  }

  .hero-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }

  .hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
  }

  .hero-desc {
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }

  .navbar {
    padding: 0.5rem 0;
  }
}

/* Print Styles */
@media print {
  .navbar,
  .hero-section,
  .contact-form,
  footer,
  .blob-1,
  .blob-2 {
    display: none !important;
  }

  body {
  overflow-x: hidden;
    font-size: 12pt;
    line-height: 1.4;
    color: #000;
    background: #fff;
  }

  .section {
    page-break-inside: avoid;
  }

  .service-item,
  .team-member,
  .faq-item {
    page-break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
  .swiper-container {
    animation: none;
  }

  .service-item,
  .team-member,
  .gallery-item,
  .btn-primary {
    transition: none !important;
  }

  .blob-1,
  .blob-2 {
    animation: none !important;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  :root {
    --primary-color: #000;
    --secondary-color: #333;
    --accent-color: #000;
    --text-primary: #000;
    --text-secondary: #333;
    --bg-light: #fff;
  }

  .service-item,
  .team-member,
  .contact-form,
  .faq-item {
    border: 2px solid #000;
  }

  .btn-primary {
    background: #000 !important;
    color: #fff !important;
    border: 2px solid #000;
  }
}

/* Focus Improvements for Keyboard Navigation */
.nav-link:focus,
.btn:focus,
.form-control:focus {
  outline: 3px solid var(--accent-color);
  outline-offset: 2px;
}

/* Skip Link for Screen Readers */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary-color);
  color: var(--text-light);
  padding: 8px;
  text-decoration: none;
  z-index: 9999;
}

.skip-link:focus {
  top: 6px;
}

/* Disable animations on mobile for better performance */
@media (max-width: 767.98px) {
  * {
    animation-duration: 0s !important;
    transition-duration: 0.1s !important;
  }
  
  .swiper-container .swiper-slide {
    transition: none !important;
  }
}
