/* ===== RESPONSIVE DESIGN ===== */
/* Используем Bootstrap 5 брейкпоинты */

/* Отключаем кастомные контейнеры для Bootstrap совместимости */
.bootstrap-compatible .custom-container {
  max-width: none !important;
  padding: 0 !important;
}

/* Extra Large Devices (1400px and up) */
@media (min-width: 1400px) {
  .custom-container {
    max-width: 1320px;
  }
  
  /* Отключаем для Bootstrap */
  .bootstrap-compatible .custom-container {
    max-width: none !important;
  }
  
  .hero-title {
    font-size: 4.5rem;
  }
  
  h1 { font-size: 4rem; }
  h2 { font-size: 3.2rem; }
}

/* Large Devices (1200px and up) */
@media (min-width: 1200px) {
  .custom-container {
    max-width: 1140px;
  }
  
  /* Отключаем для Bootstrap */
  .bootstrap-compatible .custom-container {
    max-width: none !important;
  }
}

/* Medium Devices (992px and up) */
@media (min-width: 992px) {
  .custom-container {
    max-width: 960px;
  }
  
  /* Отключаем для Bootstrap */
  .bootstrap-compatible .custom-container {
    max-width: none !important;
  }
}

/* Small Devices (768px and up) */
@media (min-width: 768px) {
  .custom-container {
    max-width: 720px;
  }
  
  /* Отключаем для Bootstrap */
  .bootstrap-compatible .custom-container {
    max-width: none !important;
  }
}

/* Mobile Devices (767.98px and down) - Bootstrap 5 breakpoint */
@media (max-width: 767.98px) {
  /* Typography adjustments */
  .hero-title {
    font-size: 2.5rem;
  }
  
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.8rem; }
  h3 { font-size: 1.5rem; }
  h4 { font-size: 1.3rem; }
  h5 { font-size: 1.1rem; }
  
  /* Header adjustments */
  .navbar-brand {
    font-size: 1.4rem;
  }
  
  .navbar-nav .nav-link {
    margin: 5px 0;
    text-align: center;
  }
  
  /* Section padding */
  section {
    padding: 60px 0;
  }
  
  /* Hero section */
  .hero-section {
    min-height: 80vh;
    text-align: center;
  }
  
  .hero-subtitle {
    font-size: 1.2rem;
  }
  
  .hero-desc {
    font-size: 1rem;
  }
  
  /* Cards */
  .card {
    margin-bottom: 2rem;
  }
  
  .card-img-top {
    height: 180px;
  }
  
  /* Team cards */
  .team-card {
    margin-bottom: 2rem;
    padding: 1.5rem 1rem;
  }
  
  .team-img {
    width: 100px;
    height: 100px;
  }
  
  /* Contact form */
  .contact-form {
    padding: 2rem 1.5rem;
  }
  
  /* Gallery */
  .gallery-img {
    height: 200px;
    margin-bottom: 1rem;
  }
  
  /* Decorative shapes - hide on mobile */
  .shape {
    display: none;
  }
  
  /* Footer */
  footer {
    padding: 2rem 0 1rem;
  }
  
  /* Disable animations on mobile for better performance */
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Small Mobile Devices (575.98px and down) - Bootstrap 5 breakpoint */
@media (max-width: 575.98px) {
  /* Container padding - используем Bootstrap утилиты */
  .custom-container {
    padding: 0 15px;
  }
  
  /* Typography */
  .hero-title {
    font-size: 2rem;
  }
  
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.5rem; }
  
  /* Section padding */
  section {
    padding: 40px 0;
  }
  
  /* Cards */
  .card-body {
    padding: 1rem;
  }
  
  .card-img-top {
    height: 150px;
  }
  
  /* Contact form */
  .contact-form {
    padding: 1.5rem 1rem;
  }
  
  /* Team cards */
  .team-card {
    padding: 1rem;
  }
  
  .team-img {
    width: 80px;
    height: 80px;
  }
  
  /* Testimonial cards */
  .testimonial-card {
    padding: 1.5rem;
  }
  
  /* Gallery */
  .gallery-img {
    height: 150px;
  }
  
  /* Price display */
  .price {
    font-size: 1.5rem;
  }
}

/* Extra Small Mobile Devices (479.98px and down) */
@media (max-width: 479.98px) {
  /* Hero section */
  .hero-title {
    font-size: 1.8rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.3rem; }
  h3 { font-size: 1.1rem; }
  
  /* Section padding */
  section {
    padding: 30px 0;
  }
  
  /* Contact form */
  .contact-form {
    padding: 1rem;
  }
  
  /* Cards */
  .card-img-top {
    height: 120px;
  }
  
  /* Gallery */
  .gallery-img {
    height: 120px;
  }
}

/* Landscape mobile devices */
@media (max-width: 767.98px) and (orientation: landscape) {
  .hero-section {
    min-height: 60vh;
  }
  
  section {
    padding: 40px 0;
  }
}

/* High DPI devices */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  /* Optimize images for retina displays */
  .card-img-top,
  .team-img,
  .gallery-img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .shape {
    animation: none;
  }
  
  .hero-title,
  .hero-subtitle,
  .hero-desc {
    animation: none;
  }
}

/* Print styles */
@media print {
  header,
  footer,
  .shape,
  .btn,
  .contact-form {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
  }
  
  .custom-container {
    max-width: none;
    padding: 0;
  }
  
  .card {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  
  h1, h2, h3, h4, h5, h6 {
    break-after: avoid;
    page-break-after: avoid;
  }
}

/* Focus management for accessibility */
@media (prefers-reduced-motion: no-preference) {
  :focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
  }
  
  .btn:focus {
    box-shadow: 0 0 0 0.2rem rgba(46, 204, 113, 0.5);
  }
  
  .form-control:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 0.2rem rgba(46, 204, 113, 0.25);
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root {
    --color-white: #121212;
    --color-black: #ffffff;
    --color-light-gray: #1e1e1e;
    --color-gray: #b0b0b0;
    --color-neutral-dark: #ffffff;
    --color-neutral-light: #d0d0d0;
  }
  
  body {
    background-color: var(--color-white);
    color: var(--color-neutral-dark);
  }
  
  .card {
    background-color: var(--color-light-gray);
    color: var(--color-neutral-dark);
  }
  
  .testimonial-card,
  .contact-form {
    background-color: var(--color-light-gray);
  }
} 