/* Responsive Styles for AI Grammar Check Template */

/* Mobile First Approach */

/* Extra Small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
  :root {
    --section-padding: 3rem 0;
    --section-padding-sm: 2rem 0;
  }
  
  /* Image responsive fixes for mobile */
  .img-placeholder {
    height: auto !important;
    min-height: 200px;
  }
  
  .team-avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
  }
  
  .gallery-item {
    aspect-ratio: 1;
    min-height: 150px;
  }
  
  .service-card .img-placeholder {
    height: 180px !important;
  }
  
  .navbar-brand {
    font-size: 1rem;
  }
  
  h1 {
    font-size: 1.5rem;
  }
  
  h2 {
    font-size: 1.25rem;
  }
  
  h3 {
    font-size: 1.125rem;
  }
  
  /* Hero adjustments */
  #hero {
    min-height: 80vh;
    text-align: center;
  }
  
  .hero-decorative-shape {
    display: none;
  }
  
  /* Card spacing */
  .feature-card,
  .service-card,
  .price-card,
  .team-card,
  .review-card,
  .case-card,
  .career-card,
  .info-card {
    margin-bottom: 2rem;
  }
  
  /* Contact form */
  .contact-form,
  .contact-info {
    padding: 2rem 1.5rem;
  }
  
  /* Gallery grid */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
  
  /* Footer */
  #footer {
    padding: 3rem 0 2rem;
  }
  
  .footer-section {
    margin-bottom: 2rem;
    text-align: center;
  }
  
  /* Button adjustments */
  .btn-primary,
  .btn-outline-primary {
    padding: 0.5rem 1.5rem;
    font-size: 0.875rem;
  }
  
  /* Timeline adjustments */
  .timeline-item {
    padding: 1.5rem 1rem;
    border-left: 2px solid var(--color-primary);
  }
  
  .timeline-item:before {
    width: 10px;
    height: 10px;
    left: -6px;
  }
  
  /* Process steps */
  .process-number {
    width: 50px;
    height: 50px;
    font-size: 1rem;
  }
  
  /* Team avatar */
  .team-avatar {
    width: 100px;
    height: 100px;
    font-size: 1.5rem;
  }
  
  /* No animations on mobile for reduced motion */
  .feature-card:hover,
  .service-card:hover,
  .price-card:hover,
  .team-card:hover,
  .case-card:hover,
  .career-card:hover,
  .info-card:hover,
  .blog-card:hover,
  .gallery-item:hover {
    transform: none;
  }
  
  .btn-primary:hover {
    transform: none;
  }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  /* Image responsive fixes for small tablets */
  .img-placeholder {
    height: auto !important;
    min-height: 250px;
  }
  
  .team-avatar {
    width: 100px;
    height: 100px;
  }
  
  .service-card .img-placeholder {
    height: 200px !important;
  }
  
  .contact-form,
  .contact-info {
    padding: 2.5rem 2rem;
  }
  
  /* Hero improvements */
  #hero {
    min-height: 90vh;
  }
  
  .hero-decorative-shape {
    width: 200px;
    height: 200px;
  }
  
  .hero-decorative-shape:nth-child(2) {
    width: 150px;
    height: 150px;
  }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  /* Image responsive fixes for tablets */
  .img-placeholder {
    height: auto !important;
    min-height: 300px;
  }
  
  .team-avatar {
    width: 110px;
    height: 110px;
  }
  
  .service-card .img-placeholder {
    height: 220px !important;
  }
  
  /* Hero section two-column layout */
  #hero .row {
    align-items: center;
  }
  
  /* Price card featured scaling */
  .price-card.featured {
    transform: scale(1.02);
  }
  
  .price-card.featured:hover {
    transform: scale(1.02) translateY(-10px);
  }
  
  /* Footer layout */
  .footer-section {
    margin-bottom: 1rem;
  }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .gallery-grid {
    grid-template-columns: repeat(5, 1fr);
  }
  
  /* Enhanced hover effects */
  .feature-card:hover,
  .service-card:hover,
  .team-card:hover,
  .case-card:hover,
  .career-card:hover,
  .info-card:hover,
  .blog-card:hover {
    transform: translateY(-8px);
  }
}

/* Extra Large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
  .gallery-grid {
    grid-template-columns: repeat(6, 1fr);
  }
  
  /* Maximum content width */
  .container {
    max-width: 1200px;
  }
  
  /* Enhanced spacing for large screens */
  :root {
    --section-padding: 6rem 0;
    --section-padding-sm: 4rem 0;
  }
  
  /* Hero enhancements */
  .hero-decorative-shape {
    width: 400px;
    height: 400px;
  }
  
  .hero-decorative-shape:nth-child(2) {
    width: 250px;
    height: 250px;
  }
}

/* Ultra Wide screens (1400px and up) */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
  
  /* Prevent content from becoming too wide */
  .hero-content h1 {
    max-width: 600px;
  }
  
  .hero-content p {
    max-width: 500px;
  }
  
  /* Higher quality images for large screens */
  .img-placeholder {
    min-height: 400px;
  }
  
  .service-card .img-placeholder {
    height: 280px !important;
  }
}

/* High DPI/Retina displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  /* Enhanced image quality for retina displays */
  img {
    image-rendering: -webkit-optimize-contrast;
  }
  
  .img-placeholder {
    background-size: cover;
    background-position: center;
  }
}

/* 4K and ultra-high resolution displays */
@media (min-width: 2560px) {
  .container {
    max-width: 1600px;
  }
  
  .img-placeholder {
    min-height: 500px;
  }
  
  .service-card .img-placeholder {
    height: 350px !important;
  }
}

/* Print Styles */
@media print {
  /* Hide navigation and decorative elements */
  #header,
  .hero-decorative-shape,
  .btn,
  #footer {
    display: none;
  }
  
  /* Adjust colors for print */
  body {
    color: #000;
    background: #fff;
    overflow-x: hidden;
}
  
  .section {
    padding: 2rem 0;
    page-break-inside: avoid;
  }
  
  /* Ensure readable font sizes */
  h1 { font-size: 24pt; }
  h2 { font-size: 20pt; }
  h3 { font-size: 16pt; }
  p { font-size: 12pt; }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  :root {
    --color-primary: #0000ff;
    --color-secondary: #800080;
    --color-accent: #008080;
    --color-success: #008000;
    --color-warning: #ff8c00;
    --color-gray-600: #000000;
    --color-gray-700: #000000;
    --color-gray-800: #000000;
  }
  
  .btn-primary,
  .btn-outline-primary {
    border-width: 2px;
  }
  
  .card,
  .feature-card,
  .service-card,
  .price-card,
  .team-card,
  .review-card,
  .case-card,
  .career-card,
  .info-card,
  .blog-card,
  .faq-card {
    border: 2px solid #000000;
  }
}

/* Dark Mode Support */

/* Focus Styles for Accessibility */
.btn:focus,
.form-control:focus,
.nav-link:focus {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

/* Skip Link for Screen Readers */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--color-primary);
  color: var(--color-white);
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 1040;
}

.skip-link:focus {
  top: 6px;
}

/* Responsive Images */
img {
  max-width: 100%;
  height: auto;
  object-fit: cover;
  object-position: center;
}

/* Ensure images within containers are responsive */
.img-placeholder img,
.gallery-item img,
.team-avatar img,
.blog-image img,
.case-card img,
.service-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Gallery specific responsive fixes */
.gallery-item {
  position: relative;
  overflow: hidden;
}

.gallery-item img {
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* Team avatar responsive fixes */
.team-avatar {
  position: relative;
  overflow: hidden;
}

.team-avatar img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Service card image containers */
.service-card .img-placeholder {
  position: relative;
  overflow: hidden;
}

.service-card .img-placeholder img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Modern image optimization */
img {
  image-rendering: auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}

/* Support for native lazy loading */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.3s;
}

img[loading="lazy"].loaded,
img[loading="lazy"]:not([loading]) {
  opacity: 1;
}

/* Aspect ratio containers for consistent sizing */
.aspect-ratio-1-1 {
  aspect-ratio: 1 / 1;
}

.aspect-ratio-16-9 {
  aspect-ratio: 16 / 9;
}

.aspect-ratio-4-3 {
  aspect-ratio: 4 / 3;
}

/* Container query support for future-proofing */
@supports (container-type: inline-size) {
  .image-container {
    container-type: inline-size;
  }
  
  @container (max-width: 400px) {
    .container img {
      object-fit: contain;
    }
  }
}

/* Responsive Tables */
.table-responsive {
  border-radius: 0.5rem;
  overflow: hidden;
}

/* Landscape Phone Adjustments */
@media (max-height: 500px) and (orientation: landscape) {
  #hero {
    min-height: 100vh;
    padding: 2rem 0;
  }
  
  .section {
    padding: 2rem 0;
  }
}

/* Reduced Motion Enhancements */
@media (prefers-reduced-motion: reduce) {
  .hero-decorative-shape {
    opacity: 0.3;
  }
  
  /* Remove all hover transforms */
  *:hover {
    transform: none;
  }
} 