/* Mobile First Responsive Design */

/* Small devices (landscape phones, 576px and up) */
@media (max-width: 575.98px) {
  .container {
    padding-left: var(--spacing-sm);
    padding-right: var(--spacing-sm);
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  .section {
    padding: var(--spacing-md) 0;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-sm);
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  
  .navbar-brand {
    font-size: 1.2rem !important;
  }
  
  .contact-form {
    padding: var(--spacing-md);
  }
  
  .contact-info {
    padding: var(--spacing-md);
    text-align: center;
  }
  
  .blob-1, .blob-2 {
    display: none;
  }
  
  .hero-section {
    padding-top: 100px;
    text-align: center;
  }
  
  .footer {
    text-align: center;
  }
  
  .footer .row > div {
    margin-bottom: var(--spacing-md);
  }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .team-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .contact-info {
    text-align: center;
  }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .team-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 992px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .features-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .pricing-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .team-grid {
    grid-template-columns: repeat(5, 1fr);
  }
  
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Mobile-specific adjustments for Swiper */
@media (max-width: 767.98px) {
  .swiper {
    overflow: visible;
  }
  
  .swiper-slide {
    padding: 0 var(--spacing-xs);
  }
  
  /* Disable autoplay and effects on mobile as required */
  .swiper[data-mobile-disabled] {
    --swiper-navigation-size: 0;
    --swiper-pagination-bullet-size: 0;
  }
  
  .swiper[data-mobile-disabled] .swiper-button-next,
  .swiper[data-mobile-disabled] .swiper-button-prev,
  .swiper[data-mobile-disabled] .swiper-pagination {
    display: none;
  }
}

/* Touch-friendly adjustments */
@media (hover: none) and (pointer: coarse) {
  .service-card:hover,
  .feature-item:hover,
  .price-card:hover,
  .team-member:hover {
    transform: none;
  }
  
  .gallery-item:hover .gallery-image {
    transform: none;
  }
  
  .faq-question {
    padding: var(--spacing-md) var(--spacing-lg);
  }
  
  .btn-primary:hover {
    transform: none;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --color-primary: #000000;
    --color-secondary: #ffff00;
    --color-accent: #ff0000;
    --shadow-light: 0 2px 4px rgba(0,0,0,0.5);
    --shadow-medium: 0 4px 8px rgba(0,0,0,0.6);
    --shadow-heavy: 0 8px 16px rgba(0,0,0,0.8);
  }
  
  .service-card,
  .feature-item,
  .price-card,
  .team-member,
  .review-item,
  .faq-item {
    border: 2px solid var(--color-primary);
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root {
    --color-primary: #ffffff;
    --color-white: #1a1a1a;
    --color-light-gray: #2d2d2d;
    --color-gray: #b0b0b0;
    --color-dark-gray: #d0d0d0;
  }
  
  body {
    overflow-x: hidden;
    background-color: var(--color-white);
    color: var(--color-primary);
  }
  
  .service-card,
  .feature-item,
  .price-card,
  .team-member,
  .review-item,
  .faq-item,
  .contact-form {
    background-color: #2d2d2d;
    color: var(--color-primary);
  }
  
  .form-control {
    background-color: #3d3d3d;
    color: var(--color-primary);
    border-color: #4d4d4d;
  }
}

/* Print styles */
@media print {
  .navbar,
  .footer,
  .decorative-blob,
  .swiper-button-next,
  .swiper-button-prev,
  .swiper-pagination {
    display: none !important;
  }
  
  .hero-section {
    min-height: auto;
    padding: var(--spacing-md) 0;
  }
  
  .section {
    padding: var(--spacing-sm) 0;
    break-inside: avoid;
  }
  
  .service-card,
  .price-card,
  .team-member {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }
  
  a {
    text-decoration: underline;
  }
  
  .gallery-grid {
    display: none;
  }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 600px) {
  .hero-section {
    min-height: 90vh;
  }
  
  .section {
    padding: var(--spacing-md) 0;
  }
}

/* Extra small screens */
@media (max-width: 320px) {
  .container {
    padding-left: var(--spacing-xs);
    padding-right: var(--spacing-xs);
  }
  
  .hero-title {
    font-size: 1.8rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .navbar-brand {
    font-size: 1.1rem !important;
  }
  
  .team-grid {
    grid-template-columns: 1fr;
  }
  
  .service-card,
  .price-card {
    padding: var(--spacing-sm);
  }
  
  .contact-form {
    padding: var(--spacing-sm);
  }
}

/* Large screens optimization */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
  
  .hero-title {
    font-size: 4.5rem;
  }
  
  .hero-subtitle {
    font-size: 2rem;
  }
  
  .section {
    padding: 5rem 0;
  }
}

/* Accessibility: Focus styles */
.nav-link:focus,
.btn:focus,
.form-control:focus,
.faq-question:focus {
  outline: 3px solid var(--color-secondary);
  outline-offset: 2px;
}

/* Skip to main content link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--color-secondary);
  color: var(--color-primary);
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 9999;
}

.skip-link:focus {
  top: 6px;
}

/* Loading animations for better UX */
.service-card,
.feature-item,
.price-card,
.team-member {
  animation: fadeInUp 0.6s ease-out forwards;
  opacity: 0;
  transform: translateY(30px);
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Stagger animation delays */
.service-card:nth-child(1) { animation-delay: 0.1s; }
.service-card:nth-child(2) { animation-delay: 0.2s; }
.service-card:nth-child(3) { animation-delay: 0.3s; }
.service-card:nth-child(4) { animation-delay: 0.4s; }
.service-card:nth-child(5) { animation-delay: 0.5s; }
.service-card:nth-child(6) { animation-delay: 0.6s; }

.feature-item:nth-child(1) { animation-delay: 0.1s; }
.feature-item:nth-child(2) { animation-delay: 0.2s; }
.feature-item:nth-child(3) { animation-delay: 0.3s; }
.feature-item:nth-child(4) { animation-delay: 0.4s; }

.team-member:nth-child(1) { animation-delay: 0.1s; }
.team-member:nth-child(2) { animation-delay: 0.2s; }
.team-member:nth-child(3) { animation-delay: 0.3s; }
.team-member:nth-child(4) { animation-delay: 0.4s; }
.team-member:nth-child(5) { animation-delay: 0.5s; } 