/* ===== RESPONSIVE DESIGN - BIODEGRADABLE PHONE CASES ===== */

/* ===== CRITICAL RESPONSIVE FIXES ===== */
html, body {
  overflow-x: hidden !important;
  width: 100% !important;
  max-width: 100vw !important;
}

.container, .container-fluid {
  max-width: 100% !important;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
}

.row {
  margin-left: -15px !important;
  margin-right: -15px !important;
  max-width: 100% !important;
}

[class*="col-"] {
  padding-left: 15px !important;
  padding-right: 15px !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* Extra Small devices (very small phones, 359px and down) */
@media (max-width: 359.98px) {
  .hero-title {
    font-size: 1.25rem !important;
    line-height: 1.2 !important;
  }
  
  .hero-subtitle {
    font-size: 0.75rem !important;
  }
  
  /* Очень маленькие заголовки */
  h1 { font-size: 1.125rem !important; }
  h2 { font-size: 1rem !important; }
  h3 { font-size: 0.875rem !important; }
  h4 { font-size: 0.75rem !important; }
  h5 { font-size: 0.7rem !important; }
  h6 { font-size: 0.65rem !important; }
  
  /* Очень маленький текст */
  body {
    font-size: 12px !important;
    line-height: 1.4 !important;
  }
  
  /* Минимальные отступы */
  .section {
    padding: 1.5rem 0 !important;
  }
  
  .container {
    padding-left: 5px !important;
    padding-right: 5px !important;
  }
  
  .service-card,
  .contact-form,
  .price-card,
  .testimonial-card {
    padding: 0.75rem !important;
    margin-bottom: 1rem !important;
  }
  
  .card-body {
    padding: 0.75rem !important;
  }
  
  /* Уменьшенные размеры изображений */
  .hero-image img {
    height: 200px !important;
  }
  
  .service-image img {
    height: 150px !important;
  }
  
  .gallery-image img {
    height: 180px !important;
  }
  
  .team-image img {
    width: 100px !important;
    height: 100px !important;
  }
  
  .feature-image img {
    height: 120px !important;
  }
  
  /* Очень маленькие цены */
  .service-price {
    font-size: 1.25rem !important;
  }
  
  .price-amount {
    font-size: 1.5rem !important;
  }
  
  /* Уменьшенные размеры карточек */
  .card-title {
    font-size: 0.875rem !important;
  }
  
  .card-text {
    font-size: 0.75rem !important;
  }
  
  /* Минимальные отступы для всех элементов */
  .row {
    margin-left: -2px !important;
    margin-right: -2px !important;
  }
  
  .row > * {
    padding-left: 2px !important;
    padding-right: 2px !important;
  }
  
  /* Уменьшенный navbar */
  .navbar {
    padding: 0.25rem 0 !important;
  }
  
  .navbar-brand {
    font-size: 1rem !important;
  }
  
  .navbar-nav .nav-link {
    font-size: 0.75rem !important;
    padding: 0.25rem 0.5rem !important;
  }
  
  /* Адаптивная галерея для очень малых экранов */
  .gallery-grid {
    grid-template-columns: 1fr !important;
    gap: 0.5rem !important;
  }
  
  /* Предотвращение overflow */
  * {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  
  html, body {
    overflow-x: hidden !important;
  }
  
  /* Минимальные размеры для всех сеток */
  .services-grid,
  .features-grid,
  .team-grid,
  .reviews-grid,
  .priceplan-grid,
  .casestudy-grid,
  .career-grid,
  .coreinfo-grid,
  .blog-grid {
    grid-template-columns: 1fr !important;
    gap: 0.5rem !important;
  }
  
  /* Дополнительные правила для очень маленьких экранов */
  .container {
    padding-left: 5px !important;
    padding-right: 5px !important;
  }
  
  .row {
    margin-left: -5px !important;
    margin-right: -5px !important;
  }
  
  [class*="col-"] {
    padding-left: 5px !important;
    padding-right: 5px !important;
  }
}

/* Mobile First Approach */
@media (max-width: 575.98px) {
  .hero-title {
    font-size: 1.5rem !important;
  }
  
  .hero-subtitle {
    font-size: 0.875rem !important;
  }
  
  .section {
    padding: 3rem 0 !important;
  }
  
  .service-card {
    margin-bottom: 1.5rem;
  }
  
  .hero-image img {
    width: 100% !important;
    height: 250px !important;
  }
  
  /* Уменьшаем размеры всех заголовков на малых экранах */
  h1 { font-size: 1.25rem !important; }
  h2 { font-size: 1.125rem !important; }
  h3 { font-size: 1rem !important; }
  h4 { font-size: 0.875rem !important; }
  h5 { font-size: 0.8rem !important; }
  h6 { font-size: 0.75rem !important; }
  
  /* Уменьшаем размер основного текста */
  body {
    font-size: 14px !important;
  }
  
  /* Уменьшаем размеры карточек */
  .card-title {
    font-size: 1rem !important;
  }
  
  .card-text {
    font-size: 0.875rem !important;
  }
  
  /* Уменьшаем размер цен */
  .service-price {
    font-size: 1.5rem !important;
  }
  
  .price-amount {
    font-size: 2rem !important;
  }
  
  /* Уменьшаем отступы для экономии места */
  .section {
    padding: 2rem 0 !important;
  }
  
  .service-card,
  .contact-form,
  .price-card,
  .testimonial-card {
    padding: 1rem !important;
  }
  
  .card-body {
    padding: 1rem !important;
  }
  
  .container {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
  
  /* Уменьшенные размеры изображений для мобильных */
  .hero-image img {
    height: 250px !important;
  }
  
  .service-image img {
    height: 160px !important;
  }
  
  .gallery-image img {
    height: 200px !important;
  }
  
  .team-image img {
    width: 120px !important;
    height: 120px !important;
  }
  
  .feature-image img {
    height: 140px !important;
  }
  
  /* Улучшенные отступы для мобильных */
  .row {
    margin-left: -5px !important;
    margin-right: -5px !important;
  }
  
  .row > * {
    padding-left: 5px !important;
    padding-right: 5px !important;
  }
  
  /* Уменьшенный navbar */
  .navbar {
    padding: 0.25rem 0 !important;
  }
  
  .navbar-brand {
    font-size: 1.1rem !important;
  }
  
  .navbar-nav .nav-link {
    font-size: 0.8rem !important;
    padding: 0.3rem 0.6rem !important;
  }
  
  /* Адаптивная галерея для мобильных */
  .gallery-grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }
  
  /* Предотвращение overflow */
  * {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  
  html, body {
    overflow-x: hidden !important;
  }
  
  /* Минимальные размеры для всех сеток */
  .services-grid,
  .features-grid,
  .team-grid,
  .reviews-grid,
  .priceplan-grid,
  .casestudy-grid,
  .career-grid,
  .coreinfo-grid,
  .blog-grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }
  
  /* Дополнительные правила для мобильных устройств */
  .container {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
  
  .row {
    margin-left: -10px !important;
    margin-right: -10px !important;
  }
  
  [class*="col-"] {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
  .hero-title {
    font-size: 1.75rem;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Уменьшаем размеры заголовков для малых экранов */
  h1 { font-size: 1.5rem !important; }
  h2 { font-size: 1.25rem !important; }
  h3 { font-size: 1.125rem !important; }
  h4 { font-size: 1rem !important; }
  h5 { font-size: 0.875rem !important; }
  h6 { font-size: 0.8rem !important; }
  
  body {
    font-size: 15px !important;
  }
  
  .service-price {
    font-size: 1.75rem !important;
  }
  
  .price-amount {
    font-size: 2.5rem !important;
  }
  
  /* Уменьшаем отступы для экономии места */
  .section {
    padding: 2.5rem 0 !important;
  }
  
  .service-card,
  .contact-form,
  .price-card,
  .testimonial-card {
    padding: 1.25rem !important;
  }
  
  .card-body {
    padding: 1.25rem !important;
  }
  
  .container {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .service-card {
    margin-bottom: 2rem;
  }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .hero-title {
    font-size: 2.25rem;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
  .hero-title {
    font-size: 2.5rem;
  }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .hero-section::before {
    background-image: url('../LED_images/hero-bg@2x.webp');
  }
}

/* Print styles */
@media print {
  .navbar, .footer {
    display: none !important;
  }
  
  .section {
    page-break-inside: avoid;
  }
} 