/* ===== RESPONSIVE STYLES - MOBILE FIRST ===== */

/* ===== EXTRA SMALL DEVICES (xs) - Portrait phones (<576px) ===== */
@media (max-width: 575.98px) {
  /* Typography adjustments */
  :root {
    --font-size-h1: 1.5rem;
    --font-size-h2: 1.25rem;
    --font-size-h3: 1.125rem;
    --section-padding: 1.5rem 0;
  }
  
  /* Header */
  .navbar-brand {
    font-size: 1rem !important;
  }
  
  /* Hero section */
  #hero {
    min-height: 80vh;
    text-align: center;
  }
  
  .hero-content h1 {
    font-size: 1.5rem;
  }
  
  /* Service cards */
  .service-card {
    margin-bottom: 1rem;
  }
  
  /* Price cards */
  .price-card {
    margin-bottom: 1rem;
  }
  
  .price-value {
    font-size: 2rem;
  }
  
  /* Team cards */
  .team-photo {
    width: 120px;
    height: 120px;
  }
  
  /* Contact form */
  .contact-form {
    padding: 1.5rem;
  }
  
  /* Gallery grid */
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  
  /* Process steps */
  .process-number {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }
  
  /* Footer */
  #footer {
    text-align: center;
  }
  
  .footer-section {
    margin-bottom: 2rem;
  }
}

/* ===== SMALL DEVICES (sm) - Landscape phones (≥576px) ===== */
@media (min-width: 576px) and (max-width: 767.98px) {
  /* Gallery grid */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Service cards spacing */
  .service-card {
    margin-bottom: 1.5rem;
  }
  
  /* Price cards */
  .price-card {
    margin-bottom: 1.5rem;
  }
}

/* ===== MEDIUM DEVICES (md) - Tablets (≥768px) ===== */
@media (min-width: 768px) and (max-width: 991.98px) {
  /* Hero section */
  #hero {
    min-height: 90vh;
  }
  
  /* Gallery grid */
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  /* Team photos */
  .team-photo {
    width: 140px;
    height: 140px;
  }
  
  /* Process layout */
  .process-step {
    padding: 1.5rem;
  }
}

/* ===== LARGE DEVICES (lg) - Desktops (≥992px) ===== */
@media (min-width: 992px) and (max-width: 1199.98px) {
  /* Gallery grid */
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  /* Hero decorative elements */
  .hero-decorative {
    width: 250px;
    height: 250px;
  }
}

/* ===== EXTRA LARGE DEVICES (xl) - Large desktops (≥1200px) ===== */
@media (min-width: 1200px) {
  /* Gallery grid */
  .gallery-grid {
    grid-template-columns: repeat(5, 1fr);
  }
  
  /* Container max width */
  .container {
    max-width: var(--container-max-width);
  }
  
  /* Enhanced hover effects for larger screens */
  .service-card:hover {
    transform: translateY(-15px);
  }
  
  .feature-card:hover {
    transform: translateY(-8px);
  }
}

/* ===== MOBILE NAVIGATION FIXES ===== */
@media (max-width: 991.98px) {
  /* Use standard Bootstrap 5 mobile menu - no customization */
  .navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
  }
  
  .navbar-toggler:focus {
    box-shadow: none;
  }
  
  .navbar-collapse {
    background-color: rgba(255, 255, 255, 0.98);
    border-radius: 10px;
    margin-top: 1rem;
    padding: 1rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  }
  
  .navbar-nav .nav-link {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--color-neutral-light);
  }
  
  .navbar-nav .nav-link:last-child {
    border-bottom: none;
  }
}

/* ===== PRINT STYLES ===== */
@media print {
  /* Hide non-essential elements */
  #header,
  #footer,
  .btn,
  .navbar,
  .hero-decorative {
    display: none !important;
  }
  
  /* Adjust colors for print */
  * {
    background: white !important;
    color: black !important;
  }
  
  /* Page breaks */
  .section {
    page-break-inside: avoid;
  }
  
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
  }
}

/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: high) {
  :root {
    --color-primary: #2d5016;
    --color-secondary: #f0e68c;
    --color-accent: #4a6741;
    --color-neutral: #8b7355;
    --color-dark: #1a1a1a;
  }
  
  .service-card,
  .feature-card,
  .price-card,
  .team-card,
  .review-card,
  .case-card,
  .faq-card,
  .blog-card {
    border-width: 2px;
  }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  /* Disable all animations and transitions */
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  /* Remove hover transforms */
  .service-card:hover,
  .feature-card:hover,
  .price-card:hover,
  .team-card:hover,
  .case-card:hover,
  .btn-primary:hover,
  .gallery-item:hover img {
    transform: none !important;
  }
}

/* ===== LANDSCAPE ORIENTATION FIXES ===== */
@media (max-height: 500px) and (orientation: landscape) {
  #hero {
    min-height: 100vh;
    padding: 2rem 0;
  }
  
  .hero-content {
    padding: 1rem 0;
    padding-top: 150px;
}
}

/* ===== TOUCH DEVICE OPTIMIZATIONS ===== */
@media (hover: none) and (pointer: coarse) {
  /* Larger touch targets */
  .btn,
  .nav-link,
  .navbar-toggler {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Remove hover effects on touch devices */
  .service-card:hover,
  .feature-card:hover,
  .price-card:hover,
  .team-card:hover,
  .case-card:hover {
    transform: none;
  }
  
  /* Adjust gallery for touch */
  .gallery-item:hover img {
    transform: none;
  }
}

/* ===== DARK MODE SUPPORT ===== */

/* ===== SPECIFIC BREAKPOINT ADJUSTMENTS ===== */

/* iPad specific */
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) {
  .hero-content {
    text-align: center;
    padding-top: 150px;
}
  
  .contact-form {
    padding: 2rem;
  }
}

/* iPhone specific landscape */
@media only screen and (min-device-width: 375px) and (max-device-width: 812px) and (orientation: landscape) {
  #hero {
    min-height: 100vh;
  }
  
  .section {
    padding: 2rem 0;
  }
}

/* Ultra-wide screens */
@media (min-width: 1400px) {
  .container-xxl {
    max-width: 1320px;
  }
  
  .hero-decorative {
    width: 300px;
    height: 300px;
  }
  
  .hero-decorative::before {
    width: 400px;
    height: 400px;
  }
} 

body {
    overflow-x: hidden;
}