/* Mobile First Responsive Design */

/* Extra Small Devices (phones, 576px and down) */
@media (max-width: 575.98px) {
  :root {
    --h1-size: 1.8rem;
    --h2-size: 1.5rem;
    --h3-size: 1.3rem;
    --navbar-brand-size: 1.1rem;
  }

  .hero-section {
    min-height: 70vh;
    padding: 2rem 0;
    text-align: center;
  }

  .hero-blob {
    display: none;
  }

  .section {
    padding: 3rem 0;
  }

  .service-card,
  .about-feature,
  .feature-item,
  .price-card {
    margin-bottom: 2rem;
  }

  .team-photo {
    width: 150px;
    height: 150px;
  }

  .contact-form {
    padding: 2rem 1rem;
  }

  .navbar-brand {
    font-size: 1.1rem !important;
  }

  .navbar-nav {
    text-align: center;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .process-item,
  .timeline-item,
  .case-study-card {
    padding: 1.5rem;
  }

  /* Disable animations on mobile for better performance */
  .hero-blob,
  .about-feature:hover,
  .service-card:hover,
  .team-photo:hover,
  .gallery-item:hover {
    animation: none !important;
    transform: none !important;
  }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
  .hero-section {
    min-height: 80vh;
  }

  .section {
    padding: 4rem 0;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .team-photo {
    width: 180px;
    height: 180px;
  }

  .contact-form {
    padding: 2.5rem;
  }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
  .hero-section {
    min-height: 90vh;
  }

  .section {
    padding: 4.5rem 0;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .service-card {
    padding: 2rem 1.5rem;
  }

  .about-feature {
    padding: 1.8rem;
  }

  .team-photo {
    width: 180px;
    height: 180px;
  }

  /* Enable reduced animations on tablets */
  .hero-blob {
    animation-duration: 8s;
  }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .hero-section {
    min-height: 95vh;
  }

  .section {
    padding: 5rem 0;
  }

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .service-card {
    padding: 2.3rem 1.8rem;
  }

  .contact-form {
    padding: 3rem 2.5rem;
  }
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
  .hero-section {
    min-height: 100vh;
  }

  .section {
    padding: 5.5rem 0;
  }

  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .service-card {
    padding: 2.5rem 2rem;
  }

  .contact-form {
    padding: 3.5rem;
  }

  .container {
    max-width: 1140px;
  }
}

/* Ultra Wide Screens (1400px and up) */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }

  .section {
    padding: 6rem 0;
  }

  .hero-section {
    min-height: 100vh;
  }
}

/* Landscape Orientation */
@media (orientation: landscape) and (max-height: 600px) {
  .hero-section {
    min-height: 100vh;
    padding: 1rem 0;
  }

  .navbar {
    padding: 0.5rem 0;
  }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .service-card img,
  .team-photo {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Print Styles */
@media print {
  .navbar,
  .footer,
  .hero-blob,
  .btn-submit {
    display: none !important;
  }

  .hero-section {
    min-height: auto;
    background: none !important;
    color: var(--black) !important;
  }

  .section {
    padding: 2rem 0;
    break-inside: avoid;
  }

  .service-card,
  .about-feature,
  .feature-item {
    box-shadow: none;
    border: 1px solid var(--medium-gray);
  }
}

/* Reduced Motion Preferences */
@media (prefers-reduced-motion: reduce) {
  .hero-blob,
  .about-feature,
  .service-card,
  .feature-item,
  .price-card,
  .team-photo,
  .gallery-item,
  .blog-card,
  .career-card,
  .process-item,
  .timeline-item {
    animation: none !important;
    transition: none !important;
  }

  .hero-section::before {
    animation: none !important;
  }

  #space::before {
    animation: none !important;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  :root {
    --white: #1a1a1a;
    --light-gray: #2d2d2d;
    --medium-gray: #888;
    --dark-gray: #f0f0f0;
    --black: #ffffff;
  }

  .service-card,
  .about-feature,
  .price-card,
  .case-study-card,
  .timeline-item,
  .core-info-card,
  .blog-card,
  .faq-item {
    background-color: var(--light-gray);
    color: var(--dark-gray);
  }

  .form-control {
    background-color: var(--light-gray);
    color: var(--dark-gray);
  }
}

/* Focus Styles for Accessibility */
@media (any-hover: hover) {
  .nav-link:focus,
  .btn-submit:focus,
  .blog-link:focus {
    outline: 2px solid var(--primary-warm-coral);
    outline-offset: 2px;
  }
}

/* Container Adjustments */
.container-fluid {
  padding-left: 15px;
  padding-right: 15px;
}

@media (min-width: 576px) {
  .container-fluid {
    padding-left: 20px;
    padding-right: 20px;
  }
}

@media (min-width: 768px) {
  .container-fluid {
    padding-left: 30px;
    padding-right: 30px;
  }
}

@media (min-width: 992px) {
  .container-fluid {
    padding-left: 40px;
    padding-right: 40px;
  }
}

/* Mobile Navigation Improvements */
@media (max-width: 991.98px) {
  .navbar-collapse {
    background: rgba(46, 179, 152, 0.95);
    margin-top: 1rem;
    border-radius: 10px;
    padding: 1rem;
  }

  .navbar-nav .nav-item {
    text-align: center;
    margin: 0.5rem 0;
  }

  .navbar-nav .nav-link {
    padding: 0.8rem 1rem;
    border-radius: 8px;
    transition: background-color 0.3s ease;
  }

  .navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }
}

/* Swiper Responsive Adjustments */
@media (max-width: 767.98px) {
  .swiper-slide {
    padding: 1rem;
  }

  .swiper-button-next,
  .swiper-button-prev {
    display: none;
  }

  .swiper-pagination {
    bottom: 10px;
  }
}

/* Form Responsiveness */
@media (max-width: 575.98px) {
  .contact-form .row {
    margin: 0;
  }

  .contact-form .col-md-6 {
    padding: 0;
    margin-bottom: 1rem;
  }

  .form-control {
    font-size: 16px; /* Prevents zoom on iOS */
  }
}

/* Image Optimization */
@media (max-width: 768px) {
  .service-card img {
    width: 60px;
    height: 60px;
  }

  .gallery-item img {
    height: 200px;
  }

  .blog-card img {
    height: 150px;
  }
}

/* Button Responsiveness */
@media (max-width: 575.98px) {
  .btn-submit {
    width: 100%;
    padding: 1rem;
    font-size: 0.9rem;
  }
}

/* Card Grid Responsiveness */
@media (max-width: 575.98px) {
  .row .col-lg-4,
  .row .col-md-6 {
    margin-bottom: 2rem;
  }
}

@media (min-width: 576px) and (max-width: 767.98px) {
  .row .col-lg-4 {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

/* Typography Scaling */
@media (max-width: 575.98px) {
  .section-title {
    margin-bottom: 2rem;
  }

  .section-subtitle {
    margin-bottom: 1.5rem;
  }

  .hero-section h1 {
    line-height: 1.2;
  }
}

/* Navigation Brand Adjustments */
@media (max-width: 360px) {
  .navbar-brand {
    font-size: 1rem !important;
  }
}

/* Ensure proper spacing on very small screens */
@media (max-width: 320px) {
  .container {
    padding-left: 10px;
    padding-right: 10px;
  }

  .section {
    padding: 2rem 0;
  }

  .contact-form {
    padding: 1.5rem 1rem;
  }
} 