/* Responsive Design - Mobile First Approach */

/* Large screens (1200px and up) */
@media (min-width: 1200px) {
  .container {
    max-width: var(--container-max-width);
  }
  
  .hero-title {
    font-size: 3.5rem;
  }
  
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .features-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .team-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* Medium screens (768px to 1199px) */
@media (min-width: 768px) and (max-width: 1199px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.125rem;
  }
  
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .team-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Small screens (576px to 767px) */
@media (min-width: 576px) and (max-width: 767px) {
  .section {
    padding: 60px 0;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .hero-desc {
    font-size: var(--font-size-base);
  }
  
  .services-grid,
  .features-grid,
  .team-grid,
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .contact-form {
    padding: 2rem;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
  }
  
  .elements-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Extra small screens (below 576px) */
@media (max-width: 575px) {
  /* Disable animations and effects on mobile for better performance */
  .swiper-slide {
    transition: none !important;
  }
  
  .swiper-wrapper {
    transition: none !important;
  }
  
  .swiper-pagination,
  .swiper-button-next,
  .swiper-button-prev {
    display: none !important;
  }
  
  /* Typography adjustments */
  html {
    font-size: 14px;
  }
  
  .hero-title {
    font-size: 1.75rem;
    line-height: 1.3;
  }
  
  .hero-subtitle {
    font-size: 0.9rem;
  }
  
  .hero-desc {
    font-size: 0.875rem;
  }
  
  h1 {
    font-size: 1.75rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  h3 {
    font-size: 1.25rem;
  }
  
  /* Section adjustments */
  .section {
    padding: 40px 0;
  }
  
  .section-desc {
    margin-bottom: 2rem;
  }
  
  /* Navbar adjustments */
  .navbar-brand {
    font-size: 1.25rem !important;
  }
  
  .navbar-collapse {
    margin-top: 1rem;
  }
  
  .navbar-nav .nav-link {
    margin: 0.25rem 0;
    padding: 0.5rem 0;
  }
  
  /* Hero section mobile adjustments */
  .hero-section {
    min-height: 100vh;
    padding: 2rem 0;
  }
  
  .hero-content {
    text-align: center;
  }
  
  .hero-shape-1,
  .hero-shape-2 {
    display: none;
  }
  
  /* Grid layouts - single column on mobile */
  .services-grid,
  .features-grid,
  .team-grid,
  .blog-grid,
  .gallery-grid,
  .elements-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  /* Card adjustments */
  .service-card,
  .team-member,
  .review-item {
    padding: 1.5rem;
  }
  
  .service-image,
  .gallery-image {
    height: 180px;
  }
  
  .team-photo {
    width: 100px;
    height: 100px;
  }
  
  /* Contact form mobile adjustments */
  .contact-form {
    padding: 1.5rem;
    margin-top: 2rem;
  }
  
  .form-control {
    padding: 0.75rem;
    font-size: 0.875rem;
  }
  
  .btn-primary {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    width: 100%;
  }
  
  /* Footer adjustments */
  .footer {
    padding: 2rem 0 1rem;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .footer-section {
    text-align: center;
  }
  
  /* FAQ adjustments */
  .faq-question,
  .faq-answer {
    padding: 1rem;
  }
  
  /* Additional page adjustments */
  .additional-section {
    padding: 3rem 0;
  }
  
  .element-item {
    padding: 1rem;
  }
  
  /* Breadcrumb adjustments */
  .breadcrumb-image {
    width: 30px;
    height: 30px;
  }
  
  /* Blog adjustments */
  .blog-content {
    padding: 1.5rem;
  }
  
  .blog-title {
    font-size: 1rem;
  }
  
  .blog-excerpt {
    font-size: 0.875rem;
  }
  
  /* Space page adjustments */
  #space {
    min-height: 60vh;
    font-size: 1.5rem;
    padding: 2rem;
  }
}

/* Landscape orientation adjustments for mobile */
@media (max-width: 767px) and (orientation: landscape) {
  .hero-section {
    min-height: 100vh;
  }
  
  .section {
    padding: 30px 0;
  }
  
  .navbar {
    padding: 0.5rem 0;
  }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .service-image,
  .gallery-image,
  .team-photo {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Print styles */
@media print {
  .navbar,
  .footer,
  .contact-form,
  .swiper-pagination,
  .swiper-button-next,
  .swiper-button-prev {
    display: none !important;
  }
  
  .section {
    padding: 20px 0;
    page-break-inside: avoid;
  }
  
  .hero-section {
    min-height: auto;
    height: 300px;
  }
  
  .service-card,
  .team-member {
    page-break-inside: avoid;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.5;
  }
  
  h1, h2, h3 {
    page-break-after: avoid;
  }
}

/* Accessibility improvements */
@media (prefers-contrast: high) {
  .service-card,
  .team-member,
  .review-item,
  .blog-item {
    border: 2px solid var(--neutral-gray-dark);
  }
  
  .btn-primary {
    border: 2px solid var(--accent-orange-dark);
  }
  
  .navbar {
    border-bottom: 2px solid var(--primary-green);
  }
}

/* Focus improvements for keyboard navigation */
@media (prefers-reduced-motion: no-preference) {
  .nav-link:focus,
  .btn:focus,
  .form-control:focus {
    outline: 3px solid var(--primary-green);
    outline-offset: 2px;
  }
}

/* Container padding adjustments for different screen sizes */
@media (max-width: 1199px) {
  .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (max-width: 575px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Improved touch targets for mobile */
@media (max-width: 767px) {
  .nav-link,
  .btn,
  .faq-question {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .navbar-toggler {
    padding: 0.5rem;
    border: none;
  }
  
  .navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem var(--primary-green);
  }
}