/* Responsive Styles - Mobile & Tablet Optimizations */

/* Large Desktop (1440px+) */
@media (min-width: 1440px) {
  .container {
    max-width: 1400px;
  }
}

/* Desktop (1024px - 1439px) */
@media (max-width: 1439px) {
  :root {
    --font-size-5xl: 2.5rem;  /* Slightly smaller on smaller desktops */
  }
}

/* Tablet Landscape (768px - 1023px) */
@media (max-width: 1023px) {
  :root {
    --font-size-4xl: 2rem;
    --font-size-5xl: 2.25rem;
  }
  
  /* Header adjustments */
  .header-actions .cta-button {
    display: none; /* Hide CTA button in header on tablet */
  }
  
  /* Hero section */
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--space-2xl);
  }
  
  .hero-cta {
    justify-content: center;
  }
  
  .hero-trust-bar {
    justify-content: center;
  }
  
  /* Process steps */
  .process-steps {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .process-steps::before {
    display: none;
  }
}

/* Tablet Portrait & Large Mobile (640px - 767px) */
@media (max-width: 767px) {
  :root {
    --font-size-3xl: 1.5rem;
    --font-size-4xl: 1.75rem;
    --font-size-5xl: 2rem;
  }
  
  /* Typography adjustments */
  h1 {
    font-size: var(--font-size-4xl);
    line-height: 1.2;
  }
  
  h2 {
    font-size: var(--font-size-3xl);
  }
  
  /* Spacing adjustments */
  section {
    padding: var(--space-3xl) 0;
  }
  
  /* Hero section */
  .hero {
    padding: var(--space-3xl) 0;
  }
  
  .hero-subheading {
    font-size: var(--font-size-base);
  }
  
  .hero-cta {
    flex-direction: column;
    width: 100%;
  }
  
  .hero-cta .btn-primary,
  .hero-cta .btn-secondary {
    width: 100%;
  }
  
  /* Service cards */
  .services-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  
  .service-card {
    padding: var(--space-xl);
  }
  
  /* Case studies */
  .case-studies-grid {
    grid-template-columns: 1fr;
  }
  
  /* Testimonials */
  .testimonials-grid {
    grid-template-columns: 1fr;
  }
  
  /* Process steps */
  .process-steps {
    grid-template-columns: 1fr;
  }
  
  /* Contact section */
  .contact-cta .container {
    grid-template-columns: 1fr;
  }
  
  /* Footer */
  .footer-columns {
    grid-template-columns: 1fr;
  }
}

/* Mobile (480px - 639px) */
@media (max-width: 639px) {
  /* Container padding */
  .container {
    padding-left: var(--space-md);
    padding-right: var(--space-md);
  }
  
  /* Button sizing */
  .btn-primary,
  .btn-secondary,
  .cta-button {
    padding: var(--space-md) var(--space-lg);
    font-size: var(--font-size-sm);
  }
  
  /* Cards */
  .card,
  .service-card,
  .problem-card {
    padding: var(--space-lg);
  }
  
  /* Form groups */
  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: var(--font-size-base);
  }
  
  /* Hero trust bar - stack vertically */
  .hero-trust-bar {
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
  }
  
  /* Problem grid */
  .problem-grid {
    gap: var(--space-md);
  }
  
  /* Contact options */
  .contact-options-list {
    gap: var(--space-sm);
  }
  
  .contact-option {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--font-size-xs);
  }
}

/* Small Mobile (< 480px) */
@media (max-width: 479px) {
  :root {
    --font-size-5xl: 1.75rem;
    --font-size-4xl: 1.5rem;
  }
  
  /* Extra tight spacing on very small screens */
  section {
    padding: var(--space-2xl) 0;
  }
  
  /* Logo sizing */
  .logo img {
    height: 32px;
  }
  
  /* Hero */
  .hero-content h1 {
    font-size: 1.75rem;
  }
  
  .hero-subheading {
    font-size: var(--font-size-sm);
  }
  
  /* Service icons */
  .service-icon {
    width: 50px;
    height: 50px;
    font-size: var(--font-size-2xl);
  }
  
  /* Step numbers */
  .step-number {
    width: 50px;
    height: 50px;
    font-size: var(--font-size-xl);
  }
  
  /* Reason icons */
  .reason-icon {
    width: 60px;
    height: 60px;
    font-size: var(--font-size-3xl);
  }
}

/* Landscape mode on mobile */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    padding: var(--space-2xl) 0;
  }
  
  section {
    padding: var(--space-xl) 0;
  }
}

/* Fix for iOS Safari button styling */
@media (max-width: 767px) {
  input[type="submit"],
  input[type="button"],
  button {
    -webkit-appearance: none;
    border-radius: var(--radius-md);
  }
  
  select {
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
  }
}

/* Print styles */
@media print {
  .main-header,
  .site-footer,
  .contact-cta,
  .cta-button,
  .btn-primary,
  .btn-secondary {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.5;
  }
  
  .container {
    max-width: 100%;
  }
}

/* Accessibility improvements for reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .card:hover,
  .service-card:hover,
  .case-study-card:hover {
    transform: none;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --color-border: #000;
  }
  
  .card,
  .service-card,
  .problem-card {
    border: 2px solid var(--color-dark);
  }
}
