/* Mobile First Responsive Design */

/* Extra Small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
  :root {
    --section-padding: 3rem 0;
    --card-padding: 1.5rem;
    --font-size-h1: 1.75rem;
    --font-size-h2: 1.5rem;
    --font-size-h3: 1.25rem;
  }
  
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  /* Hero Section Mobile */
  #hero {
    min-height: 80vh;
    text-align: center;
  }
  
  .hero-decorative {
    display: none;
  }
  
  /* Navigation Mobile */
  .navbar-brand {
    font-size: var(--font-size-lg);
  }
  
  .navbar-collapse {
    background-color: var(--cream-light);
    margin-top: 1rem;
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
  }
  
  /* Services Grid Mobile */
  .service-card {
    margin-bottom: 2rem;
  }
  
  .service-card .card-body {
    padding: 1.5rem;
    overflow-x: hidden;
}
  
  /* Price Plans Mobile */
  .price-card.featured {
    transform: none;
    margin-bottom: 2rem;
  }
  
  .price-value {
    font-size: 2.5rem;
  }
  
  /* Team Cards Mobile */
  .team-photo {
    width: 100px;
    height: 100px;
  }
  
  /* Contact Form Mobile */
  .contact-form {
    padding: 1.5rem;
  }
  
  /* Gallery Mobile */
  .gallery-item img {
    height: 150px;
  }
  
  /* Footer Mobile */
  .footer-section {
    text-align: center;
    margin-bottom: 2rem;
  }
  
  /* No animations on mobile when specified */
  .feature-card:hover,
  .service-card:hover,
  .team-card:hover,
  .blog-card:hover,
  .gallery-item:hover {
    transform: none;
  }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
  :root {
    --section-padding: 4rem 0;
    --font-size-h1: 2rem;
    --font-size-h2: 1.75rem;
  }
  
  /* Hero adjustments */
  #hero {
    min-height: 90vh;
  }
  
  /* Services grid */
  .service-card {
    margin-bottom: 2rem;
  }
  
  /* Gallery adjustments */
  .gallery-item img {
    height: 180px;
  }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
  :root {
    --section-padding: 4.5rem 0;
  }
  
  /* Navigation */
  .navbar-nav .nav-link {
    padding: 0.5rem 0.75rem;
  }
  
  /* Hero section */
  .hero-decorative {
    width: 150px;
    height: 150px;
  }
  
  /* Cards adjustments */
  .feature-card,
  .service-card,
  .team-card {
    margin-bottom: 1.5rem;
  }
  
  /* Process steps */
  .process-number {
    width: 45px;
    height: 45px;
    font-size: var(--font-size-lg);
  }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
  /* Standard desktop styles - mostly inherited from main.css */
  
  /* Fine-tune hero decorative elements */
  .hero-decorative {
    width: 180px;
    height: 180px;
  }
  
  /* Services grid optimization */
  .service-card {
    margin-bottom: 1rem;
  }
}

/* Extra Large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
  /* Maximum width container for very large screens */
  .container {
    max-width: 1140px;
  }
  
  /* Enhanced hero decorative elements */
  .hero-decorative {
    width: 250px;
    height: 250px;
  }
  
  .hero-decorative::before {
    width: 120px;
    height: 120px;
    top: -60px;
    left: -60px;
  }
  
  /* Larger cards for better spacing */
  .feature-card,
  .service-card,
  .team-card,
  .review-card {
    margin-bottom: 0;
  }
}

/* Ultra-wide screens (1400px and up) */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
  
  :root {
    --section-padding: 6rem 0;
    --card-padding: 2.5rem;
  }
}

/* Print styles */
@media print {
  #header,
  #footer,
  .breadcrumb {
    display: none;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
    color: black;
    background: white;
  }
  
  h1, h2, h3, h4, h5, h6 {
    color: black;
    page-break-after: avoid;
  }
  
  .service-card,
  .feature-card,
  .team-card,
  .review-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }
  
  .btn {
    display: none;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  :root {
    --primary-cream: #FFFFFF;
    --primary-sage: #2D5016;
    --primary-dusty-rose: #8B0000;
    --primary-warm-gray: #2F2F2F;
    --primary-deep-teal: #1B3B36;
    --cream-light: #FFFFFF;
    --sage-light: #4A7C59;
    --rose-light: #CD853F;
  }
  
  .feature-card,
  .service-card,
  .team-card,
  .review-card {
    border: 2px solid var(--primary-warm-gray);
  }
  
  .btn-primary {
    background-color: var(--primary-warm-gray);
    border-color: var(--primary-warm-gray);
    color: white;
  }
}

/* Landscape orientation specific adjustments */
@media (orientation: landscape) and (max-height: 600px) {
  #hero {
    min-height: 100vh;
    padding: 2rem 0;
  }
  
  :root {
    --section-padding: 3rem 0;
  }
}

/* Specific breakpoint adjustments for better grid layouts */
@media (min-width: 576px) and (max-width: 767.98px) {
  .col-sm-6:nth-child(odd) {
    clear: left;
  }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .col-md-4:nth-child(3n+1) {
    clear: left;
  }
  
  .col-md-6:nth-child(odd) {
    clear: left;
  }
}

@media (min-width: 992px) {
  .col-lg-4:nth-child(3n+1) {
    clear: left;
  }
  
  .col-lg-3:nth-child(4n+1) {
    clear: left;
  }
  
  .col-lg-6:nth-child(odd) {
    clear: left;
  }
}

/* Accessibility improvements for touch devices */
@media (hover: none) and (pointer: coarse) {
  .btn {
    min-height: 44px;
    min-width: 44px;
  }
  
  .nav-link {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  
  .feature-card:hover,
  .service-card:hover,
  .team-card:hover,
  .blog-card:hover {
    transform: none;
  }
}

/* Dark mode support (if system prefers dark) */

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  #hero {
    background: var(--primary-cream);
  }
  
  .hero-decorative {
    display: none;
  }
  
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
    transition-duration: 0.01ms;
    scroll-behavior: auto;
  }
  
  .feature-card,
  .service-card,
  .team-card,
  .blog-card,
  .gallery-item,
  .case-card,
  .process-step,
  .info-card,
  .btn-primary {
    transition: none;
  }
  
  .feature-card:hover,
  .service-card:hover,
  .team-card:hover,
  .blog-card:hover,
  .gallery-item:hover,
  .case-card:hover,
  .btn-primary:hover {
    transform: none;
  }
} 