/*--------------------------------------------------------------
# Исправления для мобильных устройств
--------------------------------------------------------------*/

/* Важно: переопределяем Bootstrap классы */
.d-none {
  display: none !important;
}


/* Базовые настройки для предотвращения проблем */
* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  width: 100%;
}

body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

/* Контейнеры - добавляем отступы от краев */
.container,
.container-fluid {
  padding-left: 1.25rem !important;
  padding-right: 1.25rem !important;
  width: 100%;
  max-width: 100%;
}

/* Мобильные устройства */
@media (max-width: 768px) {
  /* Увеличиваем отступы от краев */
  .container,
  .container-fluid {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
  }
  
  /* Hero секция - отступы от краев */
  #hero .container {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
  }
  
  #hero .dark-bg {
    padding: 2rem 1.5rem !important;
  }
  
  #hero h2,
  #hero p {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  
  /* Секции - отступы */
  .section {
    padding: 3rem 0 !important;
  }
  
  .section-header {
    padding-left: 1rem;
    padding-right: 1rem;
    margin-bottom: 2rem;
  }
  
  /* Контакты - отступы */
  .contact-section .container {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
  }
  
  .contact-information-box-3,
  .contact-form-box {
    padding: 1.5rem !important;
    margin-bottom: 1.5rem;
  }
  
  .single-contact-info-box {
    padding: 1rem 0 !important;
  }
  
  .contact-info h6 {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
  }
  
  .contact-info p {
    font-size: 0.95rem;
    line-height: 1.6;
  }
  
  /* Форма контактов */
  .form-group {
    margin-bottom: 1.25rem;
  }
  
  .form-control {
    padding: 0.875rem 1rem !important;
    font-size: 1rem;
  }
  
  /* Футер - отступы */
  .footer-section .container {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
  }
  
  .footer-widget {
    margin-bottom: 2rem;
    padding: 0 0.5rem;
  }
  
  .footer-text p {
    padding-left: 0;
    margin-bottom: 0.75rem;
  }
  
  /* Иконки в футере - выравнивание */
  .footer-text i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    margin-right: 0.75rem;
    vertical-align: middle;
  }
  
  /* Списки в футере */
  .footer-widget ul {
    padding-left: 0;
  }
  
  .footer-widget ul li {
    padding-left: 0;
    margin-bottom: 0.75rem;
  }
}

/*--------------------------------------------------------------
# Улучшенная форма контактов
--------------------------------------------------------------*/
.contact-form-box {
  background: var(--color-dark, #1a1a1a);
  border: 1px solid rgba(255, 107, 0, 0.2);
  padding: 2.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.contact-form-box h3 {
  color: var(--color-white, #fff);
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.contact-form .form-control {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 107, 0, 0.3);
  color: var(--color-white, #fff);
  padding: 1rem 1.25rem;
  font-size: 1rem;
  border-radius: 6px;
  transition: all 0.3s ease;
  height: auto;
}

.contact-form .form-control:focus {
  background: rgba(0, 0, 0, 0.7);
  border-color: var(--color-orange, #ff6b00);
  box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.1);
  outline: none;
}

.contact-form .form-control::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.contact-form textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

.contact-form button[type="submit"] {
  background: var(--color-orange, #ff6b00);
  color: var(--color-black, #000);
  border: 2px solid var(--color-orange, #ff6b00);
  padding: 1rem 2.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 50px;
  transition: all 0.3s ease;
  cursor: pointer;
  width: 100%;
  font-size: 1rem;
}

.contact-form button[type="submit"]:hover:not(.disabled) {
  background: transparent;
  color: var(--color-orange, #ff6b00);
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(255, 107, 0, 0.4);
}

.contact-form button[type="submit"].disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.contact-information-box-3 {
  background: var(--color-dark, #1a1a1a);
  border: 1px solid rgba(255, 107, 0, 0.2);
  padding: 2.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.single-contact-info-box {
  padding: 1.25rem 0;
  border-bottom: 1px solid rgba(255, 107, 0, 0.1);
  transition: all 0.3s ease;
}

.single-contact-info-box:last-child {
  border-bottom: none;
}

.single-contact-info-box:hover {
  padding-left: 0.5rem;
  border-left: 3px solid var(--color-orange, #ff6b00);
}

.contact-info h6 {
  color: var(--color-orange, #ff6b00);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.contact-info p {
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
}

@media (max-width: 991px) {
  .contact-information-box-3 {
    margin-bottom: 2rem;
  }
  
  .contact-form-box {
    padding: 2rem;
  }
}

@media (max-width: 768px) {
  .contact-form-box,
  .contact-information-box-3 {
    padding: 1.5rem;
  }
  
  .contact-form-box h3 {
    font-size: 1.5rem;
  }
  
  .contact-form .form-control {
    padding: 0.875rem 1rem;
  }
  
  .contact-form button[type="submit"] {
    padding: 0.875rem 2rem;
  }
}

/*--------------------------------------------------------------
# Исправление мобильного меню
--------------------------------------------------------------*/
@media (max-width: 1279px) {
  /* Кнопки переключения меню */
  .mobile-nav-toggle {
    display: inline-block !important;
    color: var(--color-white, #fff);
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
    z-index: 10000;
    position: relative;
  }
  
  .mobile-nav-toggle:hover {
    color: var(--color-orange, #ff6b00);
  }
  
  .mobile-nav-show {
    display: inline-block !important;
  }
  
  .mobile-nav-hide {
    display: none !important;
    position: fixed;
    right: 20px;
    top: 20px;
    z-index: 10000;
    color: #fff;
    font-size: 32px;
  }
  
  /* Когда меню активно */
  body.mobile-nav-active {
    overflow: hidden !important;
  }
  
  body.mobile-nav-active .mobile-nav-show {
    display: none !important;
  }
  
  body.mobile-nav-active .mobile-nav-hide {
    display: inline-block !important;
  }
  
  /* Само меню */
  .navbar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: rgba(0, 0, 0, 0.98);
    backdrop-filter: blur(10px);
    transition: right 0.3s ease;
    z-index: 9997;
    overflow-y: auto;
    padding: 0;
  }
  
  body.mobile-nav-active .navbar {
    right: 0;
  }
  
  /* Overlay при открытом меню */
  body.mobile-nav-active .navbar::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: -1;
  }
  
  /* Список меню */
  .navbar ul {
    position: absolute;
    inset: 0;
    padding: 80px 0 20px 0 !important;
    margin: 0 !important;
    background: rgba(0, 0, 0, 0.98) !important;
    overflow-y: auto;
    display: flex !important;
    flex-direction: column !important;
    list-style: none;
  }
  
  .navbar li {
    width: 100%;
    border-bottom: 1px solid rgba(255, 107, 0, 0.1);
    margin: 0;
    padding: 0;
  }
  
  .navbar a {
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    padding: 15px 25px !important;
    color: #fff !important;
    font-size: 16px !important;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s;
    width: 100%;
  }
  
  .navbar a::after {
    display: none !important;
  }
  
  .navbar a:hover,
  .navbar a.active {
    color: var(--color-orange, #ff6b00) !important;
    background: rgba(255, 107, 0, 0.05);
    padding-left: 30px !important;
  }
}

/*--------------------------------------------------------------
# Исправление иконок и выравнивания
--------------------------------------------------------------*/
@media (max-width: 768px) {
  /* Иконки в карточках услуг */
  .icon-box {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 1rem;
    padding: 1.25rem !important;
    text-align: left !important;
    height: auto !important;
    min-height: 80px;
  }
  
  .icon-box .icon {
    width: 50px !important;
    height: 50px !important;
    min-width: 50px !important;
    margin-bottom: 0 !important;
    flex-shrink: 0;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  
  .icon-box .icon img {
    width: 28px !important;
    height: 28px !important;
    object-fit: contain;
  }
  
  .icon-box .title {
    margin-bottom: 0 !important;
    flex: 1;
    font-size: 0.95rem !important;
    line-height: 1.3;
  }
  
  .icon-box .title a {
    font-size: 0.95rem !important;
    line-height: 1.3;
  }
  
  /* Убираем hover эффекты на мобильных */
  .icon-box::before {
    display: none;
  }
  
  .icon-box:hover {
    transform: none;
  }
  
  /* Контактная информация - выравнивание иконок */
  .contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
  }
  
  .contact-info h6 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  
  .contact-info p {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .contact-info i {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 20px;
    min-width: 20px;
    height: 20px;
    margin-right: 0.5rem;
    flex-shrink: 0;
  }
  
  /* Футер - иконки */
  .footer-text p {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    line-height: 1.6;
  }
  
  .footer-text p i {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 20px;
    min-width: 20px;
    height: 20px;
    margin-right: 0;
    margin-top: 2px;
    flex-shrink: 0;
  }
  
  /* Социальные иконки */
  .footer-social-icon {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
  }
  
  .footer-social-icon a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px;
    height: 40px;
    margin: 0;
  }
  
  .footer-social-icon i {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/*--------------------------------------------------------------
# Дополнительные исправления для маленьких экранов
--------------------------------------------------------------*/
@media (max-width: 576px) {
  .container,
  .container-fluid {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  #hero .dark-bg {
    padding: 1.5rem 1rem !important;
  }
  
  .contact-information-box-3,
  .contact-form-box {
    padding: 1.25rem !important;
  }
  
  .icon-box {
    padding: 1rem !important;
  }
  
  .footer-widget {
    padding: 0;
  }
}

/*--------------------------------------------------------------
# Исправление кнопок на мобильных
--------------------------------------------------------------*/
@media (max-width: 768px) {
  .btn-get-started {
    padding: 0.75rem 1.5rem !important;
    font-size: 0.9rem !important;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
  }
  
  /* Кнопки в hero секции */
  #hero .d-flex {
    gap: 0.75rem;
    flex-wrap: wrap;
  }
  
  #hero .btn-get-started {
    flex: 0 1 auto;
    min-width: 140px;
  }
  
  /* Кнопка отправки формы */
  .contact-form button[type="submit"] {
    width: 100%;
    padding: 1rem !important;
    font-size: 1rem !important;
    min-height: 50px;
  }
}

/*--------------------------------------------------------------
# Исправление переполнения текста
--------------------------------------------------------------*/
@media (max-width: 768px) {
  h1, h2, h3, h4, h5, h6 {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }
  
  p, li, span, a {
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  /* Hero заголовки */
  #hero h2 {
    font-size: clamp(1.5rem, 6vw, 2.25rem) !important;
    line-height: 1.2;
    margin-bottom: 1rem;
  }
  
  #hero p {
    font-size: clamp(0.95rem, 3vw, 1.1rem) !important;
    line-height: 1.6;
    margin-bottom: 1.5rem;
  }
  
  /* Заголовки секций */
  .section-header h2 {
    font-size: clamp(1.75rem, 5vw, 2.25rem) !important;
    line-height: 1.2;
  }
}

/*--------------------------------------------------------------
# Исправление header на мобильных
--------------------------------------------------------------*/
@media (max-width: 768px) {
  .header {
    height: 70px !important;
    padding: 0 1rem;
  }
  
  .header .container-fluid {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }
  
  .header .logo img {
    max-height: 32px !important;
  }
  
  .header .d-flex {
    gap: 0.75rem;
  }
}

/*--------------------------------------------------------------
# Улучшение читаемости на мобильных
--------------------------------------------------------------*/
@media (max-width: 768px) {
  body {
    font-size: 16px;
    line-height: 1.6;
  }
  
  /* Увеличиваем размер текста для лучшей читаемости */
  p {
    font-size: 1rem;
    line-height: 1.6;
  }
  
  /* Увеличиваем размер кликабельных элементов */
  a, button, input, select, textarea {
    min-height: 44px;
  }
  
  /* Улучшаем отступы между элементами */
  .row > * {
    margin-bottom: 1rem;
  }
}

/*--------------------------------------------------------------
# Исправление для очень маленьких экранов
--------------------------------------------------------------*/
@media (max-width: 375px) {
  .container,
  .container-fluid {
    padding-left: 0.875rem !important;
    padding-right: 0.875rem !important;
  }
  
  #hero h2 {
    font-size: 1.5rem !important;
  }
  
  #hero p {
    font-size: 0.95rem !important;
  }
  
  .icon-box {
    padding: 0.875rem !important;
  }
  
  .icon-box .icon {
    width: 45px !important;
    height: 45px !important;
    min-width: 45px !important;
  }
  
  .icon-box .icon img {
    width: 24px !important;
    height: 24px !important;
  }
  
  .icon-box .title {
    font-size: 0.9rem !important;
  }
}
