/* Mobile First Responsive Design */
/* Extra Small Devices (Portrait Phones, less than 576px) */
@media (max-width: 575.98px) {
  /* Typography adjustments for mobile */
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }
  h4 { font-size: 1.25rem; }
  
  /* No animations on mobile for better performance */
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  
  /* Hero section mobile adjustments */
  #hero {
    min-height: 80vh;
    text-align: center;
  }
  
  #hero .hero-content {
    padding: 2rem;
    margin: 1rem;
    padding-top: 275px;
}
  
  /* Service cards stack properly */
  .service-card {
    margin-bottom: 2rem;
  }
  
  .service-image {
    height: 150px;
    font-size: 2rem;
  }
  
  /* Team photos smaller on mobile */
  .team-photo {
    width: 100px;
    height: 100px;
    font-size: 1.5rem;
  }
  
  /* Contact form full width */
  .contact-form {
    padding: 2rem;
    margin: 1rem;
  }
  
  /* Gallery grid adjustments */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
  
  /* Features grid mobile */
  .features-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  /* Process steps stack */
  .process-step {
    padding: 1rem;
  }
  
  .process-number {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }
  
  /* Price cards mobile */
  .price-card.featured {
    transform: none;
    margin-bottom: 2rem;
  }
  
  /* Navbar mobile adjustments */
  .navbar-brand {
    font-size: 1.1rem !important;
  }
  
  /* Section padding reduction */
  .section-padding,
  #hero, #about, #services, #features, #priceplan, 
  #team, #reviews, #casestudy, #process, #timeline, 
  #career, #coreinfo, #contact, #blog, #faq, #gallery {
    padding: 3rem 0;
  }
  
  /* Footer mobile */
  #footer {
    padding: 2rem 0 1rem;
  }
  
  .footer-section {
    text-align: center;
    margin-bottom: 1.5rem;
  }
}

/* Small Devices (Landscape Phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
  /* Gallery adjustments */
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  /* Service cards 2 per row */
  .service-card {
    margin-bottom: 2rem;
  }
  
  /* Team layout */
  .team-member {
    margin-bottom: 2rem;
  }
  
  /* Price cards */
  .price-card.featured {
    transform: none;
    margin-bottom: 2rem;
  }
}

/* Medium Devices (Tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
  /* Hero section tablet */
  #hero .hero-content {
    padding: 2.5rem;
    padding-top: 275px;
}
  
  /* Gallery grid */
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  /* Features grid */
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Service cards responsive */
  .service-card {
    margin-bottom: 2rem;
  }
  
  /* Price cards tablet */
  .price-card.featured {
    transform: scale(1.02);
  }
  
  /* Contact form tablet */
  .contact-form {
    padding: 2.5rem;
  }
}

/* Large Devices (Desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
  /* Gallery full grid */
  .gallery-grid {
    grid-template-columns: repeat(5, 1fr);
  }
  
  /* Features full grid */
  .features-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  /* Service cards proper spacing */
  .service-card {
    margin-bottom: 2rem;
  }
}

/* Extra Large Devices (Large Desktops, 1200px and up) */
@media (min-width: 1200px) {
  /* Container max-width adjustments */
  .container-fluid {
    max-width: 1400px;
    margin: 0 auto;
  }
  
  /* Gallery optimal layout */
  .gallery-grid {
    grid-template-columns: repeat(6, 1fr);
  }
  
  /* Large screen optimizations */
  #hero .hero-content {
    padding: 4rem;
    padding-top: 275px;
}
  
  .contact-form {
    padding: 4rem;
  }
}

/* Specific Bootstrap 5 responsive utilities compliance */
@media (max-width: 575.98px) {
  .d-sm-none { display: none !important; }
  .text-sm-center { text-align: center !important; }
}

@media (min-width: 576px) and (max-width: 767.98px) {
  .d-md-none { display: none !important; }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .d-lg-none { display: none !important; }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
  .d-xl-none { display: none !important; }
}

/* High DPI / Retina Display Adjustments */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .image-placeholder,
  .service-image,
  .blog-image,
  .gallery-item {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Print Styles */
@media print {
  *, *::before, *::after {
    background: transparent !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  
  #header, #footer, .navbar {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.5;
    overflow-x: hidden;
}
  
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
  }
  
  .section-padding {
    padding: 1rem 0;
  }
}

/* Landscape Orientation */
@media (orientation: landscape) and (max-height: 600px) {
  #hero {
    min-height: 90vh;
  }
  
  .section-padding {
    padding: 2rem 0;
  }
}

/* Accessibility: High Contrast Mode */
@media (prefers-contrast: high) {
  :root {
    --primary-color: #000000;
    --secondary-color: #333333;
    --accent-color: #666666;
    --white: #FFFFFF;
    --black: #000000;
  }
  
  .btn-primary {
    background-color: #000000;
    border-color: #000000;
    color: #FFFFFF;
  }
  
  .btn-primary:hover {
    background-color: #333333;
    border-color: #333333;
  }
}

/* Dark Mode Support */

/* Focus Styles for Accessibility */
.btn:focus,
.form-control:focus,
.nav-link:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Skip to Content Link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary-color);
  color: var(--white);
  padding: 8px;
  text-decoration: none;
  border-radius: 0 0 4px 4px;
  z-index: 1000;
}

.skip-link:focus {
  top: 0;
}

/* Container Responsive Adjustments */
@media (max-width: 575.98px) {
  .container {
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* Navbar Responsive */
@media (max-width: 991.98px) {
  .navbar-collapse {
    background: var(--white);
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  }
  
  .navbar-nav {
    text-align: center;
  }
  
  .navbar-nav .nav-link {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--gray-light);
  }
  
  .navbar-nav .nav-link:last-child {
    border-bottom: none;
  }
}

/* Image Responsive */
.img-responsive {
  max-width: 100%;
  height: auto;
}

/* Flex utilities for responsive design */
@media (max-width: 767.98px) {
  .flex-column-sm {
    flex-direction: column !important;
  }
  
  .text-center-sm {
    text-align: center !important;
  }
  
  .order-1-sm { order: 1 !important; }
  .order-2-sm { order: 2 !important; }
}

/* Grid System Responsive Helpers */
.row-cols-auto-sm {
  --bs-rows-cols: auto;
}

@media (min-width: 576px) {
  .row-cols-sm-auto { --bs-rows-cols: auto; }
  .row-cols-sm-1 { --bs-rows-cols: 1; }
  .row-cols-sm-2 { --bs-rows-cols: 2; }
  .row-cols-sm-3 { --bs-rows-cols: 3; }
}

/* Spacing Responsive */
@media (max-width: 575.98px) {
  .mb-3-sm { margin-bottom: 1rem !important; }
  .mt-3-sm { margin-top: 1rem !important; }
  .py-3-sm { padding-top: 1rem !important; padding-bottom: 1rem !important; }
  .px-3-sm { padding-left: 1rem !important; padding-right: 1rem !important; }
} 