/* Responsive CSS for Mobile Optimization */
/* Bootstrap 5 Compatible - Mobile First Approach */

/* ===============================
   MOBILE FIRST RESPONSIVE DESIGN
   =============================== */

/* Extra Small Devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
  .hero-title {
    font-size: 2rem;
    line-height: 1.2;
  }
  
  .hero-subtitle {
    font-size: 1.125rem;
  }
  
  .section-title {
    font-size: 1.75rem;
  }
  
  .section-subtitle {
    font-size: 1.125rem;
  }
  
  .section {
    padding: 2rem 0;
  }
  
  .hero-section {
    min-height: 70vh;
    padding: 2rem 0;
  }
  
  .service-card, .feature-card, .price-card, .team-card, .review-card {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  .contact-form {
    padding: 1.5rem;
  }
  
  .navbar-brand {
    font-size: 1.25rem;
  }
  
  .navbar-nav .nav-link {
    padding: 0.5rem 0;
  }
  
  .price-value {
    font-size: 2.5rem;
  }
  
  .team-photo {
    width: 120px;
    height: 120px;
  }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
  .hero-title {
    font-size: 2.25rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .hero-section {
    min-height: 75vh;
  }
  
  .service-card, .feature-card, .price-card, .team-card, .review-card {
    padding: 1.75rem;
  }
  
  .contact-form {
    padding: 1.75rem;
  }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .section-title {
    font-size: 2.25rem;
  }
  
  .hero-section {
    min-height: 85vh;
  }
  
  .section {
    padding: 4rem 0;
  }
  
  .price-card.featured {
    transform: scale(1.02);
  }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .hero-title {
    font-size: 2.75rem;
  }
  
  .section-title {
    font-size: 2.5rem;
  }
  
  .hero-section {
    min-height: 90vh;
  }
  
  .section {
    padding: 4.5rem 0;
  }
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
  .hero-title {
    font-size: 3rem;
  }
  
  .section-title {
    font-size: 2.75rem;
  }
  
  .hero-section {
    min-height: 100vh;
  }
  
  .section {
    padding: 5rem 0;
  }
}

/* ===============================
   ORIENTATION SPECIFIC STYLES
   =============================== */

/* Portrait Orientation */
@media (orientation: portrait) {
  .hero-section {
    padding: 2rem 0;
  }
  
  .hero-decoration {
    display: none;
  }
}

/* Landscape Orientation on Mobile */
@media (orientation: landscape) and (max-height: 600px) {
  .hero-section {
    min-height: 100vh;
    padding: 1rem 0;
  }
  
  .section {
    padding: 3rem 0;
  }
  
  .navbar {
    padding: 0.5rem 0;
  }
}

/* ===============================
   MOBILE ANIMATION DISABLE
   =============================== */

/* Disable all animations and transitions on mobile to improve performance */
@media (max-width: 767px) {
  .navbar-nav .nav-link {
    transition: none !important;
  }
  
  /* Disable any scroll-triggered animations */
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  /* Ensure Sal.js classes don't cause issues */
  [data-sal] {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ===============================
   TOUCH DEVICE OPTIMIZATIONS
   =============================== */

/* Touch-friendly button sizes */
@media (hover: none) and (pointer: coarse) {
  .btn {
    min-height: 44px;
    padding: 0.75rem 1.5rem;
  }
  
  .nav-link {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  
  .form-control {
    min-height: 44px;
    padding: 0.75rem;
  }
}

/* ===============================
   HIGH DPI DISPLAYS
   =============================== */

@media (-webkit-min-device-pixel-ratio: 2),
       (min-resolution: 192dpi) {
  .hero-image,
  .team-photo {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* ===============================
   PRINT STYLES
   =============================== */

@media print {
  .navbar,
  .hero-decoration,
  .contact-form,
  .footer {
    display: none;
  }
  
  .hero-section {
    min-height: auto;
    background: white;
    color: black;
  }
  
  .section {
    padding: 1rem 0;
    page-break-inside: avoid;
  }
  
  .service-card,
  .feature-card,
  .price-card,
  .team-card,
  .review-card {
    box-shadow: none;
    border: 1px solid #ccc;
    page-break-inside: avoid;
  }
  
  a {
    color: black;
    text-decoration: underline;
  }
  
  .price-value {
    color: black;
  }
}

/* ===============================
   ACCESSIBILITY IMPROVEMENTS
   =============================== */

/* Focus indicators for keyboard navigation */
@media (prefers-reduced-motion: no-preference) {
  .btn:focus,
  .nav-link:focus,
  .form-control:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .service-card,
  .feature-card,
  .price-card,
  .team-card,
  .review-card {
    border: 2px solid var(--text-primary);
  }
  
  .hero-section {
    background: var(--bg-white);
    color: var(--text-primary);
  }
  
  .btn-primary {
    border: 2px solid var(--text-primary);
  }
}

/* ===============================
   CONTAINER QUERIES (Progressive Enhancement)
   =============================== */

/* Container-based responsive design for card layouts */
@supports (container-type: inline-size) {
  .services-container {
    container-type: inline-size;
  }
  
  @container (max-width: 400px) {
    .service-card {
      padding: 1rem;
    }
    
    .service-card .card-icon {
      font-size: 2rem;
    }
  }
}

/* ===============================
   PERFORMANCE OPTIMIZATIONS
   =============================== */

/* Reduce animations on low-end devices */
@media (prefers-reduced-motion: reduce) {
  .hero-decoration {
    animation: none;
  }
  
  .service-card:hover,
  .feature-card:hover,
  .price-card:hover,
  .team-card:hover {
    transform: none;
  }
}

/* Optimize for slower connections */
@media (prefers-reduced-data: reduce) {
  .hero-decoration {
    display: none;
  }
  
  .service-card,
  .feature-card,
  .price-card,
  .team-card,
  .review-card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }
} 

.hero-content {
    padding-top: 125px;
}