/* ===========================================
   Peer-to-Peer Car Share Hub - Responsive CSS
   ========================================== */

/* Mobile First Approach */

/* Extra Small Devices (portrait phones) */
@media (max-width: 575.98px) {
  /* Typography adjustments */
  .hero-title {
    font-size: var(--font-size-2xl);
  }
  
  .hero-subtitle {
    font-size: var(--font-size-lg);
  }
  
  .hero-desc {
    font-size: var(--font-size-base);
  }
  
  /* Hero section adjustments */
  .hero-section {
    min-height: 80vh;
    padding: 2rem 0;
  }
  
  /* Section padding */
  .section {
    padding: 3rem 0;
  }
  
  /* Service cards */
  .service-card {
    margin-bottom: 2rem;
  }
  
  /* Contact form */
  .contact-form {
    padding: 2rem 1.5rem;
  }
  
  /* Team photos */
  .team-photo {
    width: 120px;
    height: 120px;
  }
  
  /* Process numbers */
  .process-number {
    width: 50px;
    height: 50px;
    font-size: var(--font-size-lg);
  }
  
  /* Footer adjustments */
  .footer {
    padding: 2rem 0 1rem;
  }
  
  /* Hide decorative shapes on mobile */
  .shape-blob {
    display: none;
  }
  
  /* Gallery grid adjustments */
  .gallery-img {
    height: 200px;
  }
}

/* Small Devices (landscape phones) */
@media (max-width: 767.98px) {
  /* Disable Swiper autoplay and effects on mobile */
  .swiper-container {
    --swiper-autoplay: 0;
  }
  
  .swiper-slide {
    transition: none !important;
  }
  
  /* Navigation adjustments */
  .navbar-collapse {
    background: white;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-top: 1rem;
  }
  
  /* Hero section mobile adjustments */
  .hero-section {
    text-align: center;
  }
  
  .hero-content {
    padding: 1rem;
  }
  
  /* Two-column layout adjustments */
  .row.align-items-center > div {
    margin-bottom: 2rem;
  }
  
  /* Service grid */
  .service-card {
    max-width: 100%;
  }
  
  /* Price cards */
  .price-card.featured {
    transform: none;
    margin-bottom: 2rem;
  }
  
  .price-card.featured:hover {
    transform: translateY(-5px);
  }
  
  /* FAQ mobile styling */
  .faq-question {
    font-size: var(--font-size-base);
    padding: 1rem;
  }
  
  .faq-answer {
    padding: 0.5rem 1rem 1rem;
  }
  
  /* Contact info stack */
  .footer .row > div {
    margin-bottom: 2rem;
    text-align: center;
  }
}

/* Medium Devices (tablets) */
@media (min-width: 768px) and (max-width: 991.98px) {
  /* Hero adjustments */
  .hero-title {
    font-size: calc(var(--font-size-3xl) * 0.9);
  }
  
  /* Service cards in 2 columns */
  .service-card {
    max-width: 100%;
  }
  
  /* Team members in 2-3 columns */
  .team-member {
    padding: 1rem;
  }
  
  /* Process steps adjustment */
  .process-step {
    padding: 1.5rem 1rem;
  }
  
  /* Contact form */
  .contact-form {
    padding: 2.5rem;
  }
}

/* Large Devices (desktops) */
@media (min-width: 992px) and (max-width: 1199.98px) {
  /* Fine-tuning for desktop */
  .hero-section {
    min-height: 90vh;
  }
  
  /* Service cards optimal spacing */
  .service-card {
    margin-bottom: 2rem;
  }
  
  /* Team photos standard size */
  .team-photo {
    width: 140px;
    height: 140px;
  }
}

/* Extra Large Devices (large desktops) */
@media (min-width: 1200px) {
  /* Container max-width adjustments */
  .container-xl {
    max-width: 1200px;
  }
  
  /* Hero section full glory */
  .hero-title {
    font-size: calc(var(--font-size-3xl) * 1.1);
  }
  
  /* Service cards optimal display */
  .service-card {
    margin-bottom: 2rem;
  }
  
  /* Process steps with connecting lines */
  .process-step::after {
    content: '';
    position: absolute;
    top: 30px;
    right: -50%;
    width: 100%;
    height: 2px;
    background: var(--primary-light);
    z-index: 0;
  }
  
  .process-step:last-child::after {
    display: none;
  }
  
  .process-number {
    position: relative;
    z-index: 1;
  }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  /* Ensure crisp images on retina displays */
  .gallery-img,
  .team-photo,
  img {
    image-rendering: crisp-edges;
  }
}

/* Landscape Orientation */
@media (orientation: landscape) and (max-height: 500px) {
  /* Adjust hero for landscape mobile */
  .hero-section {
    min-height: 100vh;
    padding: 1rem 0;
  }
  
  .hero-title {
    font-size: var(--font-size-xl);
    margin-bottom: 0.5rem;
  }
  
  .hero-subtitle {
    font-size: var(--font-size-lg);
    margin-bottom: 0.5rem;
  }
  
  .hero-desc {
    font-size: var(--font-size-base);
    margin-bottom: 1rem;
  }
}

/* Print Styles */
@media print {
  /* Hide unnecessary elements */
  .navbar,
  .footer,
  .btn,
  .swiper-button-next,
  .swiper-button-prev,
  .swiper-pagination {
    display: none !important;
  }
  
  /* Optimize for print */
  .section {
    padding: 1rem 0;
    page-break-inside: avoid;
  }
  
  .service-card,
  .price-card,
  .review-card {
    box-shadow: none;
    border: 1px solid #ddd;
    page-break-inside: avoid;
  }
  
  /* Ensure text is readable */
  body {
    font-size: 12pt;
    line-height: 1.4;
    color: #000;
  }
  
  h1, h2, h3 {
    color: #000;
  }
}

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
  /* Disable animations for users who prefer reduced motion */
  .shape-blob {
    animation: none;
  }
  
  .swiper-container {
    --swiper-autoplay: 0;
  }
  
  .service-card:hover,
  .price-card:hover,
  .btn-primary:hover {
    transform: none;
  }
  
  .gallery-item:hover .gallery-img {
    transform: none;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  /* Enhance contrast for better accessibility */
  .hero-section {
    background: #000;
    color: #fff;
  }
  
  .service-card,
  .price-card,
  .review-card {
    border: 2px solid #000;
  }
  
  .btn-primary {
    background: #000;
    color: #fff;
    border: 2px solid #fff;
  }
}

/* Focus Indicators */
.btn:focus,
.form-control:focus,
.nav-link:focus {
  outline: 3px solid var(--accent-color);
  outline-offset: 2px;
}

/* Skip to content link for screen readers */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary-color);
  color: white;
  padding: 8px;
  text-decoration: none;
  z-index: 9999;
  border-radius: 4px;
}

.skip-link:focus {
  top: 6px;
}

/* Loading States */
.loading {
  opacity: 0.7;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--primary-color);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
} 