/* Responsive Design for Virtual Co-authoring Platform */

/* Mobile First Approach */

/* Extra Small devices (phones, 576px and down) */
@media (max-width: 575.98px) {
  /* Navigation */
  .navbar-brand {
    font-size: 1.25rem;
  }
  
  /* Hero Section */
  #hero {
    padding: 4rem 0;
  }
  
  #hero .display-4 {
    font-size: 2rem;
    line-height: 1.2;
  }
  
  #hero .h4 {
    font-size: 1.1rem;
  }
  
  #hero .lead {
    font-size: 0.95rem;
  }
  
  /* Buttons */
  .btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }
  
  /* Cards */
  .card-body {
    padding: 1rem;
    overflow-x: hidden;
}
  
  /* Services Grid */
  .services-grid .col-md-6 {
    margin-bottom: 1.5rem;
  }
  
  /* Team Images */
  .team-member img {
    width: 120px;
    height: 120px;
  }
  
  /* Gallery */
  #gallery .col-md-4 {
    margin-bottom: 1rem;
  }
  
  /* Contact Form */
  .contact-form .col-md-6 {
    margin-bottom: 1rem;
  }
  
  /* Section Spacing */
  .py-5 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }
  
  /* Footer */
  #footer .col-lg-4 {
    margin-bottom: 2rem;
  }
  
  /* Typography */
  .h2 {
    font-size: 1.75rem;
  }
  
  .h3 {
    font-size: 1.25rem;
  }
  
  .h5 {
    font-size: 1.1rem;
  }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
  /* Hero adjustments */
  #hero .display-4 {
    font-size: 2.25rem;
  }
  
  /* Service cards grid */
  .service-card .card-img-top {
    height: 180px;
  }
  
  /* Team grid adjustments */
  .team-member img {
    width: 130px;
    height: 130px;
  }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
  /* Navigation */
  .navbar-nav {
    text-align: center;
  }
  
  .navbar-nav .nav-item {
    margin: 0.25rem 0;
  }
  
  /* Hero Section */
  #hero .display-4 {
    font-size: 2.5rem;
  }
  
  /* Services */
  .service-card .card-img-top {
    height: 200px;
  }
  
  /* Gallery grid */
  #gallery img {
    margin-bottom: 1rem;
  }
  
  /* Pricing cards */
  .pricing-card {
    margin-bottom: 2rem;
  }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
  /* Container adjustments */
  .container {
    max-width: 960px;
  }
  
  /* Hero fine-tuning */
  #hero .display-4 {
    font-size: 3rem;
  }
  
  /* Service cards */
  .service-card .card-img-top {
    height: 220px;
  }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
  /* Hero Section */
  #hero {
    min-height: 100vh;
  }
  
  #hero .display-4 {
    font-size: 3.5rem;
  }
  
  /* Service cards optimal size */
  .service-card .card-img-top {
    height: 240px;
  }
  
  /* Enhanced spacing */
  .py-5 {
    padding-top: 5rem !important;
    padding-bottom: 5rem !important;
  }
}

/* Mobile Specific Optimizations */
@media (max-width: 768px) {
  /* Hide decorative elements on mobile for performance */
  #hero::before {
    display: none;
  }
  
  .decorative-blob {
    display: none;
  }
  
  /* Simplified animations for mobile */
  .card:hover {
    transform: none;
  }
  
  /* Mobile-friendly spacing */
  .mb-3 {
    margin-bottom: 1.5rem !important;
  }
  
  .mb-4 {
    margin-bottom: 2rem !important;
  }
  
  .mb-5 {
    margin-bottom: 2.5rem !important;
  }
  
  /* Mobile navigation improvements */
  .navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
  }
  
  .navbar-toggler:focus {
    box-shadow: none;
  }
  
  /* Mobile form improvements */
  .form-control {
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  /* Mobile button improvements */
  .btn {
    width: 100%;
    margin-bottom: 0.5rem;
  }
  
  .btn:last-child {
    margin-bottom: 0;
  }
  
  /* Mobile hero buttons */
  #hero .btn {
    width: auto;
    margin: 0.25rem;
  }
  
  /* Mobile gallery grid */
  #gallery .col-md-4 {
    padding: 0.25rem;
  }
  
  #gallery img {
    border-radius: 4px;
  }
}

/* Tablet Portrait Optimizations */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
  /* Hero adjustments for tablet portrait */
  #hero {
    padding: 3rem 0;
  }
  
  /* Service grid optimization */
  .services-grid .col-lg-4 {
    margin-bottom: 2rem;
  }
  
  /* Team grid for tablet */
  .team-section .col-lg-4 {
    margin-bottom: 2rem;
  }
}

/* Tablet Landscape Optimizations */
@media (min-width: 1024px) and (max-width: 1366px) and (orientation: landscape) {
  /* Fine-tune spacing for tablet landscape */
  .container {
    max-width: 1140px;
  }
  
  /* Gallery grid optimization */
  #gallery .col-md-4 {
    padding: 0.5rem;
  }
}

/* High DPI Display Optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  /* Enhance images for retina displays */
  .card-img-top,
  .team-member img,
  #gallery img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Print Styles */
@media print {
  /* Hide non-essential elements */
  .navbar,
  #footer,
  .btn,
  .social-links {
    display: none !important;
  }
  
  /* Optimize for print */
  body {
    font-size: 12pt;
    line-height: 1.4;
  }
  
  .card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }
  
  /* Ensure proper page breaks */
  section {
    break-inside: avoid;
  }
}

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
  /* Mobile-specific motion reduction */
  @media (max-width: 768px) {
    * {
      animation: none !important;
      transition: none !important;
    }
  }
}

/* Dark Mode Media Query Support */

/* Performance Optimizations for Mobile */
@media (max-width: 768px) {
  /* Optimize image loading */
  img {
    loading: lazy;
  }
  
  /* Reduce complex shadows on mobile */
  .shadow-lg {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
  }
  
  /* Simplify gradients on mobile */
  .bg-primary-gradient {
    background: var(--primary-color) !important;
  }
} 