/* ============================================
   3D PRINTED KITCHEN GADGETS STORE - RESPONSIVE CSS
   ============================================ */

/* RESPONSIVE IMAGES - MOBILE OPTIMIZATIONS */

/* Глобальные стили для изображений на мобильных */
@media (max-width: 767.98px) {
  img {
    max-width: 100% !important;
    height: auto !important;
    object-fit: cover !important;
    border-radius: 8px;
  }
  
  /* Маленькие изображения на мобильных */
  .service-image {
    height: 150px !important;
  }
  
  .blog-image {
    height: 150px !important;
  }
  
  .team-photo {
    width: 80px !important;
    height: 80px !important;
  }
  
  /* Галерея на мобильных */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
  }
  
  .gallery-item {
    aspect-ratio: 1 !important;
  }
  
  /* Hero изображение на мобильных */
  #hero img {
    max-height: 300px !important;
    width: 100% !important;
    object-fit: cover !important;
    border-radius: 12px !important;
  }
  
  /* Маленькие иконки breadcrumb */
  img[style*="width: 16px"] {
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    min-height: 14px !important;
  }
}

/* Планшеты - средние экраны */
@media (min-width: 768px) and (max-width: 991.98px) {
  .service-image {
    height: 180px !important;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  
  .team-photo {
    width: 100px !important;
    height: 100px !important;
  }
  
  /* Hero изображение на планшетах */
  #hero img {
    max-height: 400px !important;
    width: 100% !important;
    object-fit: cover !important;
  }
}

/* Большие экраны - оптимизация */
@media (min-width: 1200px) {
  .service-image {
    height: 220px !important;
  }
  
  .blog-image {
    height: 220px !important;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr) !important;
  }
  
  /* Hero изображение на больших экранах */
  #hero img {
    max-height: 500px !important;
    width: 100% !important;
    object-fit: cover !important;
  }
}

/* MOBILE FIRST APPROACH */

/* Extra Small Devices (phones, less than 576px) */
@media (max-width: 575.98px) {
  /* Typography */
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.375rem; }
  h3 { font-size: 1.25rem; }
  
  /* Spacing */
  .section-padding {
    padding: 2rem 0;
  }
  
  /* Header */
  .navbar-brand {
    font-size: 1rem;
  }
  
  .navbar-nav .nav-link {
    padding: 0.5rem 0;
    text-align: center;
  }
  
  /* Hero Section */
  #hero {
    min-height: 80vh;
    text-align: center;
  }
  
  .hero-shape {
    display: none; /* No animations on mobile */
  }
  
  /* Cards */
  .feature-card,
  .service-card,
  .price-card,
  .team-card,
  .review-card,
  .case-card,
  .career-card,
  .info-card,
  .blog-card {
    margin-bottom: 1rem;
  }
  
  /* Service Cards */
  .service-image {
    height: 150px;
  }
  
  /* Price Cards */
  .price-card.featured {
    transform: none;
    margin-top: 1rem;
  }
  
  .price-amount {
    font-size: 2rem;
  }
  
  /* Team Photos */
  .team-photo {
    width: 100px;
    height: 100px;
  }
  
  /* Process Steps */
  .process-number {
    width: 50px;
    height: 50px;
    font-size: 1rem;
  }
  
  /* Gallery */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
  
  /* Contact Form */
  .contact-form {
    padding: 1.5rem;
  }
  
  /* Footer */
  #footer {
    text-align: center;
  }
  
  .footer-section {
    margin-bottom: 2rem;
  }
  
  /* Utilities */
  .text-sm-center { text-align: center; }
  .mb-sm-2 { margin-bottom: 1rem; }
  .mt-sm-2 { margin-top: 1rem; }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
  /* Hero Section */
  #hero {
    min-height: 90vh;
  }
  
  /* Cards Grid */
  .row > [class*="col-"] {
    margin-bottom: 1.5rem;
  }
  
  /* Gallery */
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  /* Process Steps */
  .process-step {
    margin-bottom: 2rem;
  }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
  /* Hero Section */
  #hero {
    min-height: 95vh;
  }
  
  /* Typography */
  .section-title {
    font-size: 2rem;
  }
  
  /* Cards */
  .feature-card:hover,
  .service-card:hover,
  .case-card:hover,
  .career-card:hover,
  .info-card:hover,
  .blog-card:hover {
    transform: translateY(-3px);
  }
  
  /* Gallery */
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  /* Footer */
  .footer-section {
    margin-bottom: 1.5rem;
  }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
  /* Hero Section */
  .hero-shape {
    opacity: 0.08;
  }
  
  /* Gallery */
  .gallery-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
  /* Container Max Width */
  .container {
    max-width: 1140px;
  }
  
  /* Hero Shapes */
  .hero-shape {
    opacity: 0.1;
  }
  
  .hero-shape-1 {
    width: 250px;
    height: 250px;
  }
  
  .hero-shape-2 {
    width: 200px;
    height: 200px;
  }
  
  /* Gallery */
  .gallery-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

/* Ultra Wide Screens (1400px and up) */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
  
  /* Increased spacing for ultra-wide */
  .section-padding {
    padding: 5rem 0;
  }
}

/* ORIENTATION SPECIFIC STYLES */

/* Landscape Phones */
@media (max-width: 767.98px) and (orientation: landscape) {
  #hero {
    min-height: 70vh;
  }
  
  .section-padding {
    padding: 1.5rem 0;
  }
}

/* Portrait Tablets */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .price-card.featured {
    transform: scale(1.02);
  }
}

/* REDUCED MOTION RESPONSIVE */
@media (prefers-reduced-motion: reduce) {
  /* Remove all animations on mobile for accessibility */
  @media (max-width: 767.98px) {
    *,
    *::before,
    *::after {
      animation: none !important;
      transition: none !important;
    }
    
    .hover-lift:hover,
    .hover-scale:hover,
    .feature-card:hover,
    .service-card:hover,
    .case-card:hover,
    .career-card:hover,
    .info-card:hover,
    .blog-card:hover,
    .gallery-item:hover {
      transform: none !important;
    }
  }
}

/* HIGH CONTRAST MODE */
@media (prefers-contrast: high) {
  /* Increase contrast for accessibility */
  .feature-card,
  .service-card,
  .price-card,
  .team-card,
  .review-card,
  .case-card,
  .career-card,
  .info-card,
  .blog-card,
  .faq-card {
    border: 2px solid var(--color-neutral-dark);
  }
  
  .btn-primary {
    border: 2px solid var(--color-primary-dark);
  }
}

/* PRINT STYLES */
@media print {
  /* Hide navigation and interactive elements */
  #header,
  .btn,
  .navbar,
  .hero-shape {
    display: none !important;
  }
  
  /* Optimize for print */
  body {
    font-size: 12pt;
    line-height: 1.4;
    overflow-x: hidden;
}
  
  .section-padding {
    padding: 1rem 0;
  }
  
  .container {
    max-width: none;
  }
  
  /* Ensure page breaks */
  .section-title {
    page-break-after: avoid;
  }
  
  .card {
    page-break-inside: avoid;
  }
}

/* DARK MODE SUPPORT (Optional) */

/* ACCESSIBILITY FOCUS STYLES */
button:focus,
.btn:focus,
input:focus,
textarea:focus,
select:focus,
a:focus {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

/* CUSTOM RESPONSIVE UTILITIES */
@media (max-width: 575.98px) {
  .d-xs-none { display: none !important; }
  .d-xs-block { display: block !important; }
  .text-xs-center { text-align: center !important; }
}

@media (min-width: 576px) and (max-width: 767.98px) {
  .d-sm-none { display: none !important; }
  .d-sm-block { display: block !important; }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .d-md-none { display: none !important; }
  .d-md-block { display: block !important; }
}

/* FALLBACKS FOR OLDER BROWSERS */
.gallery-grid {
  /* Fallback for browsers that don't support CSS Grid */
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.gallery-grid > * {
  flex: 1 1 calc(33.333% - 1rem);
  min-width: 200px;
}

/* CSS Grid support check */
@supports (display: grid) {
  .gallery-grid {
    display: grid;
  }
  
  .gallery-grid > * {
    flex: none;
  }
}

/* PERFORMANCE OPTIMIZATIONS */
@media (max-width: 767.98px) {
  /* Reduce complex styles on mobile for better performance */
  .hero-shape,
  .feature-card::before,
  .service-card::before {
    display: none;
  }
  
  /* Simplify shadows on mobile */
  .feature-card,
  .service-card,
  .price-card,
  .team-card,
  .review-card,
  .case-card,
  .career-card,
  .info-card,
  .blog-card {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  }
  
  /* Дополнительная оптимизация изображений на мобильных */
  img {
    image-rendering: auto !important;
    image-rendering: optimizeQuality !important;
  }
}

/* ДОПОЛНИТЕЛЬНЫЕ BREAKPOINTS ДЛЯ ИЗОБРАЖЕНИЙ */

/* Ultra Small Devices (< 400px) */
@media (max-width: 400px) {
  .service-image {
    height: 120px !important;
  }
  
  .blog-image {
    height: 120px !important;
  }
  
  .team-photo {
    width: 60px !important;
    height: 60px !important;
  }
  
  .gallery-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 0.25rem !important;
  }
  
  #hero img {
    max-height: 200px !important;
  }
}

/* Ultra Wide Screens (> 1600px) */
@media (min-width: 1600px) {
  .service-image {
    height: 250px !important;
  }
  
  .blog-image {
    height: 250px !important;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(5, 1fr) !important;
  }
  
  #hero img {
    max-height: 600px !important;
  }
} 

.hero-content {
    padding-top: 225px;
}