/* Responsive CSS for Boutique Puzzle Store Template */
/* Mobile-First Approach with Bootstrap 5 Responsive Utilities */

/* Extra Small Devices (Portrait Phones, less than 576px) */
@media (max-width: 575.98px) {
  :root {
    --font-size-h1: 1.5rem;
    --font-size-h2: 1.375rem;
    --font-size-h3: 1.25rem;
    --section-padding: 2rem 0;
  }
  
  .navbar-brand {
    font-size: 1rem !important;
  }
  
  .hero-section {
    min-height: 70vh;
    text-align: center;
  }
  
  .service-card,
  .team-card,
  .review-card,
  .price-card,
  .blog-card {
    margin-bottom: 1.70rem;
  }
  
  .contact-form {
    padding: 2rem 1rem;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
  }
  
  .gallery-item img {
    height: 150px;
  }
  
  .footer {
    padding: 2rem 0 1rem;
    text-align: center;
  }
  
  .process-item,
  .timeline-item,
  .casestudy-card,
  .career-card {
    padding: 1.5rem;
  }
  
  .add-page-item {
    padding: 1rem;
  }
}

/* Small Devices (Landscape Phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
  :root {
    --section-padding: 3rem 0;
  }
  
  .hero-section {
    min-height: 80vh;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
  
  .contact-form {
    padding: 2.5rem;
  }
}

/* Medium Devices (Tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
  .hero-section {
    min-height: 90vh;
  }
  
  .navbar {
    padding: 1.5rem 0;
  }
  
  .service-card,
  .team-card,
  .review-card,
  .price-card {
    height: auto;
    min-height: 300px;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
  
  .team-photo {
    height: 200px;
  }
}

/* Large Devices (Desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .hero-section {
    min-height: 100vh;
  }
  
  .service-card,
  .team-card,
  .review-card,
  .price-card {
    min-height: 350px;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
  
  .team-photo {
    height: 250px;
  }
  
  .contact-form {
    max-width: 600px;
    margin: 0 auto;
  }
}

/* Extra Large Devices (Large Desktops, 1200px and up) */
@media (min-width: 1200px) {
  .hero-section {
    min-height: 100vh;
  }
  
  .container {
    max-width: 1140px;
  }
  
  .service-card,
  .team-card,
  .review-card,
  .price-card {
    min-height: 400px;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
  }
  
  .gallery-item img {
    height: 250px;
  }
  
  .team-photo {
    height: 300px;
  }
  
  .contact-form {
    max-width: 700px;
    margin: 0 auto;
    padding: 3rem;
  }
}

/* Landscape Orientation for Mobile and Tablets */
@media (max-width: 991.98px) and (orientation: landscape) {
  .hero-section {
    min-height: 70vh;
  }
  
  .section {
    padding: 2rem 0;
  }
  
  .navbar {
    padding: 0.5rem 0;
  }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .gallery-item img,
  .team-photo {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Print Styles */
@media print {
  .navbar,
  .footer,
  .btn,
  .contact-form {
    display: none !important;
  }
  
  .hero-section {
    min-height: auto;
    padding: 2rem 0;
  }
  
  .section {
    padding: 1rem 0;
    page-break-inside: avoid;
  }
  
  .service-card,
  .team-card,
  .review-card,
  .price-card,
  .blog-card {
    box-shadow: none;
    border: 1px solid #f6f1f1;
    page-break-inside: avoid;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
  }
  
  h1, h2, h3 {
    page-break-after: avoid;
  }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
  .hero-section::before {
    animation: none;
  }
  
  .service-card:hover,
  .team-card:hover,
  .gallery-item:hover,
  .btn-primary:hover {
    transform: none;
  }
  
  .nav-link,
  .form-control,
  .btn-primary {
    transition: none;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  :root {
    --color-primary: #017110;
    --color-secondary: #f44a0b;
    --color-accent: #7e0093;
    --color-dark: #000000;
    --color-light: #ffffff;
  }
  
  .service-card,
  .team-card,
  .review-card,
  .price-card,
  .blog-card {
    border: 2px solid var(--color-dark);
  }
  
  .btn-primary {
    background: var(--color-dark);
    color: var(--color-white);
  }
}

/* Dark Mode Preference */

/* Focus Styles for Accessibility */
.btn:focus,
.form-control:focus,
.nav-link:focus {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

/* Skip Link for Screen Readers */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--color-dark);
  color: var(--color-white);
  padding: 8px;
  text-decoration: none;
  z-index: 100;
}

.skip-link:focus {
  top: 6px;
}

/* Loading States */
.loading {
  position: relative;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--color-primary);
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Grid System Responsive Adjustments */
.row {
  margin-left: -15px;
  margin-right: -15px;
}

.col-1, .col-2, .col-3, .col-4, .col-5, .col-6,
.col-7, .col-8, .col-9, .col-10, .col-11, .col-12,
.col-auto, .col,
.col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6,
.col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12,
.col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6,
.col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12,
.col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6,
.col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12,
.col-xl-1, .col-xl-2, .col-xl-3, .col-xl-4, .col-xl-5, .col-xl-6,
.col-xl-7, .col-xl-8, .col-xl-9, .col-xl-10, .col-xl-11, .col-xl-12 {
  padding-left: 15px;
  padding-right: 15px;
}

/* Custom Container Adjustments */
@media (min-width: 1400px) {
  .container {
    max-width: 1200px;
  }
} 

.hero-section h1 {
    padding-top: 100px;
}

/* Disable all scroll animations on mobile devices */
@media (max-width: 768px) {
  /* Disable all animations and transitions */
  *,
  *::before,
  *::after {
    animation-duration: 0s !important;
    animation-delay: 0s !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
    animation-fill-mode: none !important;
    animation-play-state: paused !important;
  }
  
  /* Disable SAL.js animations specifically */
  [data-sal] {
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
  
  /* Reset any transform animations */
  .service-card,
  .team-card,
  .review-card,
  .price-card,
  .feature-item,
  .process-item,
  .timeline-item,
  .casestudy-card {
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }
  
  /* Ensure elements are visible */
  .section-title,
  .hero-content {
    opacity: 1 !important;
    transform: none !important;
  }
}