/* Responsive CSS for Mobile Optimization */

/* Extra Large devices (desktops, 1200px and up) */
@media (min-width: 1200px) {
  .hero h1 {
    font-size: 2.55rem;
  }
  
  .section {
    padding: 100px 0;
  }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
  .hero-content {
    padding-right: 2rem;
    padding-top: 200px;
}
  
  .hero-image {
    padding-left: 2rem;
  }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
  .hero {
    min-height: 80vh;
    padding-top: 60px;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .section {
    padding: 60px 0;
  }
  
  .section-title {
    margin-bottom: 2rem;
  }
  
  .feature-card, .service-card, .price-card, .team-card {
    margin-bottom: 2rem;
  }
  
  .contact-form, .contact-info {
    margin-bottom: 2rem;
  }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
  .hero {
    min-height: 70vh;
    padding-top: 60px;
    text-align: center;
  }
  
  .hero h1 {
    font-size: 2.02rem;
  }
  
  .hero p {
    font-size: 0.92rem;
  }
  
  .section {
    padding: 50px 0;
  }
  
  .section-title {
    margin-bottom: 1.61rem;
  }
  
  .feature-card, .service-card, .price-card, .team-card, .review-card, .case-card, .career-card, .info-card {
    margin-bottom: 1.58rem;
  }
  
  .process-step {
    padding: 1.5rem;
  }
  
  .timeline-item {
    margin-bottom: 1rem;
  }
  
  .faq-card {
    margin-bottom: 1rem;
  }
  
  .contact-form, .contact-info {
    margin-bottom: 1.64rem;
  }
  
  .blog-card {
    margin-bottom: 1.57rem;
  }
  
  .gallery-item {
    margin-bottom: 1rem;
  }
}

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
  .hero {
    min-height: 60vh;
    padding-top: 60px;
    text-align: center;
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .hero h1 {
    font-size: 1.87rem;
    margin-bottom: 1rem;
  }
  
  .hero p {
    font-size: 0.95rem;
    margin-bottom: 1.59rem;
  }
  
  .section {
    padding: 40px 0;
  }
  
  .section-title {
    margin-bottom: 1.61rem;
  }
  
  .section-title h2 {
    font-size: 1.60rem;
  }
  
  .section-subtitle {
    font-size: 0.92rem;
  }
  
  /* Navigation */
  .navbar-brand {
    font-size: 1rem;
  }
  
  .navbar-nav .nav-link {
    font-size: 0.94rem;
    padding: 0.5rem 1rem;
  }
  
  /* Cards */
  .feature-card, .service-card, .price-card, .team-card, .review-card, .case-card, .career-card, .info-card {
    margin-bottom: 1.64rem;
    padding: 1.5rem;
  }
  
  .feature-icon, .info-icon {
    font-size: 2rem;
  }
  
  .service-price, .price-value {
    font-size: 1.64rem;
  }
  
  .team-photo {
    width: 100px;
    height: 100px;
  }
  
  /* Process */
  .process-step {
    padding: 1rem;
  }
  
  .process-number {
    width: 50px;
    height: 50px;
    font-size: 1.27rem;
  }
  
  /* Timeline */
  .timeline-item {
    padding: 1rem;
    margin-bottom: 1rem;
  }
  
  /* FAQ */
  .faq-card {
    padding: 1.5rem;
    margin-bottom: 1rem;
  }
  
  .faq-question {
    font-size: 1rem;
  }
  
  .faq-answer {
    font-size: 0.96rem;
  }
  
  /* Contact */
  .contact-form {
    padding: 1.5rem;
    margin-bottom: 1.72rem;
  }
  
  .contact-info {
    padding: 1.5rem;
  }
  
  .contact-info-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  
  /* Blog */
  .blog-card {
    margin-bottom: 1.69rem;
  }
  
  .blog-content {
    padding: 1rem;
  }
  
  .blog-image {
    height: 150px;
  }
  
  /* Gallery */
  .gallery-item {
    margin-bottom: 1rem;
  }
  
  .gallery-image {
    height: 200px;
  }
  
  /* Footer */
  .footer {
    padding: 2rem 0 1rem;
    text-align: center;
  }
  
  .footer h5 {
    font-size: 1rem;
    margin-bottom: 0.93rem;
  }
  
  .footer p {
    font-size: 1.01rem;
  }
  
  /* Buttons */
  .btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.98rem;
  }
  
  /* Forms */
  .form-control {
    padding: 0.6rem;
    font-size: 0.97rem;
  }
  
  /* Utility adjustments */
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  /* Hero decorative elements - hide on mobile */
  .hero::before,
  .hero::after {
    display: none;
  }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 600px) {
  .hero {
    min-height: 100vh;
    padding-top: 60px;
  }
  
  .section {
    padding: 40px 0;
  }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .hero-image img,
  .team-photo,
  .gallery-image,
  .blog-image {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Print styles */
@media print {
  .header,
  .footer,
  .btn,
  .navbar {
    display: none;
  }
  
  .hero,
  .section {
    page-break-inside: avoid;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
  }
  
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
  }
}

/* Focus styles for accessibility */
@media (prefers-reduced-motion: no-preference) {
  .btn:focus,
  .form-control:focus,
  .nav-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
  }
}

/* Mobile animation disabling - отключение анимаций с исключениями для Bootstrap */
@media (max-width: 768px) {
  /* Отключаем анимации, НО исключаем все важные Bootstrap классы */
  *:not(.navbar-collapse):not(.collapse):not(.collapsing):not(.navbar-toggler):not(.dropdown-menu):not(.dropdown):not(.modal):not(.modal-backdrop):not(.carousel):not(.carousel-item):not(.fade):not(.show):not(.btn),
  *:not(.navbar-collapse):not(.collapse):not(.collapsing):not(.navbar-toggler):not(.dropdown-menu):not(.dropdown):not(.modal):not(.modal-backdrop):not(.carousel):not(.carousel-item):not(.fade):not(.show):not(.btn)::before,
  *:not(.navbar-collapse):not(.collapse):not(.collapsing):not(.navbar-toggler):not(.dropdown-menu):not(.dropdown):not(.modal):not(.modal-backdrop):not(.carousel):not(.carousel-item):not(.fade):not(.show):not(.btn)::after {
    animation-duration: 0s !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    animation-fill-mode: forwards !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
  }
  
  /* Обеспечиваем что Bootstrap navbar работает правильно */
  .navbar-collapse,
  .collapse {
    transition: height 0.35s ease !important;
  }
  
  .navbar-collapse.collapsing {
    transition: height 0.35s ease !important;
  }
  
  .navbar-toggler {
    transition: all 0.15s ease-in-out !important;
  }
  
  /* Сохраняем работу Bootstrap кнопок */
  .btn {
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
  }
  
  /* Отключаем все hover эффекты для кастомных элементов */
  .feature-card:hover,
  .service-card:hover,
  .price-card:hover,
  .team-card:hover,
  .career-card:hover,
  .blog-card:hover,
  .gallery-image:hover,
  .social-link:hover,
  .shadow-hover:hover,
  .facebook-link:hover,
  .linkedin-link:hover,
  .x-link:hover {
    transform: none !important;
  }
  
  /* Отключаем трансформации для кастомных элементов */
  .feature-card,
  .service-card,
  .price-card,
  .team-card,
  .career-card,
  .blog-card,
  .gallery-image,
  .social-link {
    transition: none !important;
    transform: none !important;
  }
  
  /* Отключаем Sal.js анимации */
  [data-sal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* Dark mode support (optional) */