/* ===== RESPONSIVE STYLES ===== */
/* Bootstrap 5 Compliant - Mobile First Approach */

/* ===== EXTRA SMALL DEVICES (xs) - Portrait phones ===== */
@media (max-width: 575.98px) {
  /* Typography adjustments for mobile */
  :root {
    --fs-h1: 1.8rem;
    --fs-h2: 1.5rem;
    --fs-h3: 1.3rem;
    --fs-body: 0.9rem;
    --section-padding: 3rem 0;
  }
  
  /* Hero section mobile */
  .hero-section {
    min-height: 70vh;
  }
  
  .hero-content {
    min-height: 70vh;
    text-align: center;
    padding-top: 175px;
}
  
  .hero-decorative {
    width: 120px;
    height: 120px;
    top: 5%;
    right: -10%;
  }
  
  .hero-decorative::before {
    width: 80px;
    height: 80px;
    top: -25px;
    left: -25px;
  }
  
  /* Service cards mobile */
  .service-card {
    padding: 1.5rem;
    margin-bottom: 1.59rem;
  }
  
  .service-price {
    font-size: 1.52rem;
  }
  
  /* Team photos mobile */
  .team-photo {
    width: 100px;
    height: 100px;
  }
  
  /* Contact form mobile */
  .contact-form {
    padding: 1.5rem;
  }
  
  /* Gallery mobile */
  .gallery-item img {
    height: 200px;
  }
  
  /* Footer mobile */
  .footer {
    padding: 2rem 0 1rem;
    text-align: center;
  }
  
  /* Card adjustments */
  .custom-card,
  .testimonial-card,
  .faq-card {
    margin-bottom: 1rem;
  }
  
  .testimonial-card,
  .faq-card {
    padding: 1.5rem;
  }
  
  /* Button adjustments */
  .btn-primary {
    padding: 0.6rem 1.5rem;
    font-size: 0.92rem;
  }
}

/* ===== SMALL DEVICES (sm) - Landscape phones ===== */
@media (min-width: 576px) and (max-width: 767.98px) {
  :root {
    --fs-h1: 2rem;
    --fs-h2: 1.6rem;
    --section-padding: 3.5rem 0;
  }
  
  .hero-section {
    min-height: 80vh;
  }
  
  .hero-content {
    min-height: 80vh;
    padding-top: 175px;
}
  
  .hero-decorative {
    width: 150px;
    height: 150px;
  }
  
  .service-card {
    padding: 1.75rem;
  }
  
  .contact-form {
    padding: 2rem;
  }
  
  .gallery-item img {
    height: 220px;
  }
}

/* ===== MEDIUM DEVICES (md) - Tablets ===== */
@media (min-width: 768px) and (max-width: 991.98px) {
  :root {
    --section-padding: 4rem 0;
  }
  
  .hero-section {
    min-height: 90vh;
  }
  
  .hero-content {
    min-height: 90vh;
    padding-top: 175px;
}
  
  .hero-decorative {
    width: 180px;
    height: 180px;
  }
  
  .gallery-item img {
    height: 240px;
  }
  
  /* Adjust grid spacing for tablets */
  .service-card,
  .custom-card,
  .team-member {
    margin-bottom: 2rem;
  }
}

/* ===== LARGE DEVICES (lg) - Desktops ===== */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .gallery-item img {
    height: 250px;
  }
  
  /* Optimize spacing for desktop */
  .service-card {
    padding: 2rem;
  }
  
  .contact-form {
    padding: 2.5rem;
  }
}

/* ===== EXTRA LARGE DEVICES (xl) - Large desktops ===== */
@media (min-width: 1200px) and (max-width: 1399.98px) {
  .hero-decorative {
    width: 220px;
    height: 220px;
  }
  
  .hero-decorative::before {
    width: 170px;
    height: 170px;
    top: -60px;
    left: -60px;
  }
}

/* ===== XXL DEVICES (xxl) - Extra large desktops ===== */
@media (min-width: 1400px) {
  :root {
    --fs-h1: 2.5rem;
    --fs-h2: 2rem;
    --section-padding: 5rem 0;
  }
  
  .hero-decorative {
    width: 250px;
    height: 250px;
  }
  
  .hero-decorative::before {
    width: 200px;
    height: 200px;
    top: -70px;
    left: -70px;
  }
  
  .service-card {
    padding: 2.5rem;
  }
  
  .contact-form {
    padding: 3rem;
  }
}

/* ===== LANDSCAPE ORIENTATION ===== */
@media (orientation: landscape) and (max-height: 600px) {
  .hero-section {
    min-height: 100vh;
  }
  
  .hero-content {
    min-height: 100vh;
    padding: 2rem 0;
    padding-top: 175px;
}
  
  :root {
    --section-padding: 2rem 0;
  }
}

/* ===== HIGH DPI DISPLAYS ===== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  /* Ensure crisp rendering on retina displays */
  .custom-card,
  .service-card,
  .testimonial-card,
  .faq-card,
  .contact-form {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

/* ===== PRINT STYLES ===== */
@media print {
  .hero-decorative,
  .navbar,
  .footer,
  .btn,
  .gallery-item:hover img {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
    color: #000;
  }
  
  h1, h2, h3, h4, h5, h6 {
    color: #000;
    page-break-after: avoid;
  }
  
  .custom-card,
  .service-card,
  .testimonial-card,
  .faq-card {
    border: 1px solid #c4c0c0;
    box-shadow: none;
    page-break-inside: avoid;
  }
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
@media (max-width: 767.98px) {
  /* Larger touch targets for mobile */
  .btn {
    min-height: 44px;
    min-width: 44px;
  }
  
  .form-control {
    min-height: 44px;
  }
  
  /* Improved spacing for touch interaction */
  .navbar-nav .nav-link {
    font-size: 10px !important;
    padding: 1rem 0.5rem;
  }
}

/* ===== HOVER EFFECTS OPTIMIZATION ===== */
@media (hover: none) and (pointer: coarse) {
  /* Remove hover effects on touch devices */
  .custom-card:hover,
  .service-card:hover,
  .team-member:hover,
  .btn-primary:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
  }
  
  .gallery-item:hover img {
    transform: none;
  }
}

/* ===== REDUCED MOTION QUERIES ===== */
@media (prefers-reduced-motion: reduce) {
  @media (max-width: 767.98px) {
    /* Ensure no motion on mobile for accessibility */
    * {
      animation: none !important;
      transition: none !important;
    }
  }
}

/* ===== DARK MODE SUPPORT (if system preference) ===== */