пhtml {
  font-size: 16px;
}

body {
   overflow-x: hidden;
   font-family: 'Montserrat', sans-serif;
   background: linear-gradient(45deg, #000000, #1a1a1a, #000000);
   background-size: 400% 400%;
   animation: gradientShift 10s ease infinite;
   color: #e0e0e0;
   min-height: 100vh;
   padding-top: 1.25rem;
   font-size: 1rem;
   line-height: 1.5;
   width: 100%;
   max-width: 100vw;
   box-sizing: border-box;
}

/* Критично: предотвращение горизонтальной прокрутки */
* {
  box-sizing: border-box;
}

html, body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

.container {
  width: 100%;
  max-width: 100%;
  padding-left: 15px;
  padding-right: 15px;
  margin-left: auto;
  margin-right: auto;
}

/* Ограничение ширины контента на десктопе */
@media (min-width: 1200px) {
  .container {
    max-width: 1280px !important;
  }

  .my-custom-container {
    max-width: 1280px !important;
    margin: 0 auto !important;
  }

  /* Ограничение ширины основного контента */
  .container.mt-3.mb-5,
  .container.mt-3.mb-3,
  .container.custom-block {
    max-width: 1280px !important;
    margin: 0 auto !important;
  }

  /* Центрирование карусели */
  #carouselExampleIndicators {
    max-width: 1280px !important;
    margin: 0 auto !important;
  }

  /* Ограничение ширины секций */
  section .container {
    max-width: 1280px !important;
  }
}

@media (max-width: 576px) {
  .container {
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* Увеличенные боковые отступы для мобильных устройств */
@media (max-width: 768px) {
  .container {
    padding-left: 20px;
    padding-right: 20px;
  }

  .card-body {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .btn {
    min-width: 200px;
    height: 40px;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    font-size: 14px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
	border-radius: 30px;
  }

  .custom-block {
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* Увеличенные боковые отступы для планшетов */
@media (min-width: 769px) and (max-width: 1024px) {
  .container {
    padding-left: 25px;
    padding-right: 25px;
  }

  .card-body {
    padding-left: 2rem;
    padding-right: 2rem;
  }

  .btn {
    min-width: 250px;
    height: 50px;
    padding-left: 2rem;
    padding-right: 2rem;
    font-size: 16px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .custom-block {
    padding-left: 25px;
    padding-right: 25px;
  }
}

button:focus {
  outline: none;
}

li {
  list-style-type: none;
}

ul {
  margin-left: 0;
  padding-left: 0;
}
.flip:hover {
  background: #555;
}

.link-green {
    color: #fff;
    text-decoration: underline;
}
.link-green:hover {
    color: #8B4513;
    text-decoration: underline;
}

.btn.btn-green {
  background: linear-gradient(135deg, #8B4513 0%, #A0522D 50%, #8B4513 100%);
  color: #fff;
  border: none;
  border-radius: 30px;
  padding: 0.8rem 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.0625rem;
  box-shadow: 0 8px 25px rgba(111, 66, 193, 0.4), 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  font-size: 1.1rem;
  position: relative;
  overflow: hidden;
}

.btn.btn-green::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn.btn-green:hover {
  color: #fff;
  background: linear-gradient(135deg, #A0522D 0%, #CD853F 50%, #A0522D 100%);
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 12px 35px rgba(111, 66, 193, 0.6), 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn.btn-green:hover::before {
  left: 100%;
}

/* Состояние при нажатии */
.btn.btn-green:active {
  color: #fff;
  background: linear-gradient(135deg, #A0522D 0%, #CD853F 50%, #A0522D 100%);
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 12px 35px rgba(111, 66, 193, 0.6), 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn.btn-green:active::before {
  left: 100%;
}

/* Адаптация для iOS и Android */
* {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

input, textarea, select {
  -webkit-user-select: text;
  -khtml-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

/* Для iOS Safari */
@media screen and (max-width: 768px) {
  ::-webkit-scrollbar {
    display: none;
  }
  body {
    -webkit-overflow-scrolling: touch;
  }
}

.card {
   border: none;
   border-radius: 20px;
   box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), 0 5px 15px rgba(111, 66, 193, 0.1);
   background: #6a587836;
   backdrop-filter: blur(10px);
   -webkit-backdrop-filter: blur(10px);
   color: #ffffff;
   transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
   overflow: hidden;
   position: relative;
}

.card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), 0 10px 25px rgba(111, 66, 193, 0.3);
  cursor: pointer;
}

/* Оптимизация производительности анимаций */
.card, .btn, .navbar-toggler, .fancybox-content, .navbar-collapse {
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

/* Плавные анимации для iOS */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Оптимизация для iOS устройств */
@media (hover: none) and (pointer: coarse) {
  .card:hover {
    transform: none;
  }

  .btn:hover {
    transform: none;
  }

  /* Использование transform3d для аппаратного ускорения */
  .animated-modal, .fancybox-slide, .navbar-collapse {
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
  }
}

.card-body {
  padding: 2rem;
}

.btn.btn-outline-green {
  border-style: solid;
  border-width: 1px;
  border-color: #8B4513;
  background-color: transparent;
  color: #8B4513;
}

.btn.btn-outline-green:hover {
  background-color: #8B4513;
  color: #fff;
  border-color: #8B4513;
}
.navbar-toggler {
  border: none;
  background: linear-gradient(135deg, #8B4513 0%, #8B4513 100%) !important;
  border-radius: 25px;
  padding: 12px 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(111, 66, 193, 0.4);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff;
}

/* Скрываем бургер-меню на десктопе */
@media (min-width: 992px) {
  .navbar-toggler {
    display: none !important;
  }

  .navbar-collapse {
    display: block !important;
    position: static !important;
    height: auto !important;
    background: transparent !important;
    backdrop-filter: none !important;
    padding: 0 !important;
    z-index: auto !important;
    overflow: visible !important;
    margin-top: -20px !important;
  }

  .navbar-nav {
    flex-direction: row !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
    justify-content: flex-end !important;
    width: 100% !important;
  }

  .navbar-nav .nav-item {
    margin: 0 15px !important;
    border-bottom: none !important;
    border-radius: 0 !important;
  }

  .navbar-nav .nav-link {
    color: #fff !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    padding: 15px 0 !important;
    display: block !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    min-height: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    border-radius: 0 !important;
  }

  .navbar-nav .nav-link:hover {
    color: #8B4513 !important;
    background: transparent !important;
    transform: translateY(-2px) !important;
    box-shadow: none !important;
  }

  .navbar-nav .nav-link:active {
    transform: translateY(0) !important;
    box-shadow: none !important;
  }
}
.navbar-toggler::before {
  content: 'Меню';
  color: white;
  font-size: 14px;
  font-weight: bold;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
.navbar-toggler .icon-bar {
  display: none;
}
.navbar-toggler:hover {
  background: linear-gradient(135deg, rgba(111, 66, 193, 0.5), rgba(26, 26, 26, 0.7)) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(111, 66, 193, 0.5);
}
.navbar-toggler:focus {
  box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.5), 0 2px 10px rgba(139, 69, 19, 0.3);
}

/* Ссылка телефона в одну строчку на десктопе */
.navbar a[href^="tel:"] {
  white-space: nowrap;
  display: inline-block;
}

/* Сдвинуть логотип и телефон вправо на десктопе */
@media (min-width: 992px) {
  .navbar .logo {
    margin-left: 20px;
  }
}
.navbar-toggler:active::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(139, 69, 19, 0.4);
  transform: translate(-50%, -50%);
  animation: ripple 0.6s linear;
}
@keyframes ripple {
  to {
    width: 100px;
    height: 100px;
    opacity: 0;
  }
}
.nav-item {
    margin: 10px 0;
    padding: 0 0px;
}
.navbar-toggler .top-bar {
  transform: rotate(45deg) translate(6px, 6px);
  transform-origin: center;
}

.navbar-toggler .middle-bar {
  opacity: 0;
}

.navbar-toggler .bottom-bar {
  transform: rotate(-45deg) translate(6px, -6px);
  transform-origin: center;
}

.navbar-toggler.collapsed .top-bar {
  transform: rotate(0) translate(0, 0);
}

.navbar-toggler.collapsed .middle-bar {
  opacity: 1;
}

.navbar-toggler.collapsed .bottom-bar {
    transform: rotate(0) translate(0, 0);
  }

.navbar-toggler:not(.collapsed) .top-bar {
  transform: rotate(45deg) translate(6px, 6px);
}

.navbar-toggler:not(.collapsed) .middle-bar {
  opacity: 0;
}

.navbar-toggler:not(.collapsed) .bottom-bar {
  transform: rotate(-45deg) translate(6px, -6px);
}

 .navbar-collapse.show {
   z-index: 1050;
   margin: 0;
 }

 .navbar-brand {
  padding: 0;
}

.logo {
  height: 80px;
}

.navbar-nav .nav-link {
  padding-bottom: 0;
  height: 60px;
  line-height: 60px;
}

.navbar-toggler {
  padding-top: 15px;
  padding-bottom: 10px;
}

.collapse a {
  color: #ffffff;
  font-weight: 500;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.collapse a:hover {
  color: #8B4513;
  text-decoration: none;
}

.icon-bar {
  width: 25px;
  height: 3px;
  background-color: #212529;
  display: block;
  transition: all 0.2s;
  margin-top: 4px;
}

.f300 {
  font-weight: 300;
}

.p-12 {
  color: #ccc;
  font-size: 15px;
}
.grey {
  background-color: #444;
  color: #e0e0e0;
}

.grey-box {
  background-color: #444;
  border-radius: 8px;
}
.black-box {
  background: linear-gradient(135deg, #8B4513 0%, #8B4513 100%);
  color: #fff;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(111, 66, 193, 0.2);
  position: relative;
  overflow: hidden;
}

.black-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.black-box:hover::before {
  left: 100%;
}

.icon-bar {
  width: 25px;
  height: 3px;
  background-color: #212529;
  display: block;
  transition: all 0.2s;
  margin-top: 4px;
}

.line { 
  border-left: 1px solid #00000020;
}
@media screen and (max-width: 576px) {
.line {
  border-left: 0px solid #00000020;
  }
}
.line-two { 
  border-left: 1px solid #00000020;
}
@media screen and (max-width: 768px) {
.line-two {
  border-left: 0px solid #00000020;
  }
}

.img-job:hover {
  box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22);
  transition: .5s;
}

/* Стили для изображений */
.card-body img {
  border-radius: 5px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.card-body img:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.custom-block img,
section img {
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.custom-block img:hover,
section img:hover {
  transform: scale(1.02);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.my-custom-container {
  max-width: 1850px !important;
  height: 65vh !important;

}

.my-custom-container .carousel,
.my-custom-container .carousel-inner,
.my-custom-container .carousel-item {
  height: 100% !important;
}

.my-custom-container .carousel-item img {
  object-fit: revert;
  height: 100%;
  width: 100%;
}

.carousel-container {
  position: relative;
  width: 100%;
}
    
.navbar-over-carousel {
    position: fixed;
    padding: 1rem 25px;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.8) !important;
    transform: translateY(0);
    opacity: 1;
    transition: all 0.3s ease;
}

.navbar-over-carousel.show {
    transform: translateY(0);
    opacity: 1;
}
    
.navbar-over-carousel .navbar-brand,
.navbar-over-carousel .nav-link {
  color: white !important;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}
    
.navbar-over-carousel .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.5);
}
    
.navbar-over-carousel .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
    
.owl-carousel.slide-two {
  max-width: 1280px;
  height: 433px;
  margin: 0 auto;
}

.owl-carousel .item {
  height: 433px;
}

.owl-carousel .item img {
  object-fit: cover;
  height: 100%;
  width: 100%;
}

.owl-carousel .item {
  position: relative;
  z-index: 100; 
  -webkit-backface-visibility: hidden; 
}

.owl-nav i {
  display: none;
  font-size: 10px;
}

.owl-nav .owl-prev {
  display: none;
  left: -30px;
}

.owl-nav .owl-next {
  display: none;
  right: -30px;
}

.video iframe {
  height: 100%;
  width: 100%;
}

@media screen and (max-width: 767px) {
.mobile-space {margin-top:10px;}
}

.animated-modal {
  max-width: 550px;
  border-radius: 4px;
  overflow: hidden;
  transform: translateY(-50px);
  transition: all .7s;
}

.animated-modal h2,
.animated-modal p {
  transform: translateY(-50px);
  opacity: 0;
  transition-property: transform, opacity;
  transition-duration: .4s;
}

.fancybox-slide--current .animated-modal,
.fancybox-slide--current .animated-modal h2,
.fancybox-slide--current .animated-modal p {
  transform: translateY(0);
  opacity: 1;
}

.fancybox-slide--current .animated-modal h2 {
  transition-delay: .1s;
}

.fancybox-slide--current .animated-modal p {
  transition-delay: .3s;
}

/* Кнопка для десктопа */
.callback-desktop {
  width: 50px;
  height: 50px;
  background: url("../img/message.svg") no-repeat center;
  background-size: 50px;
  position: fixed;
  bottom: 40px;
  right: 40px;
  z-index: 1001;
  display: none;
  -webkit-animation: callback 3s cubic-bezier(0.68, -0.55, 0.27, 1.55) 0s infinite;
          animation: callback 3s cubic-bezier(0.68, -0.55, 0.27, 1.55) 0s infinite;
}

/* Показывать на десктопе */
@media (min-width: 1025px) {
  .callback-desktop {
    display: block;
  }
}

/* Кнопка для мобильных и планшетов */
.callback-mobile {
  width: 50px;
  height: 50px;
  background: no-repeat center;
  background-size: 50px;
  position: fixed;
  bottom: 100px;
  right: 40px;
  z-index: 1001;
  display: block;
  -webkit-animation: callback 3s cubic-bezier(0.68, -0.55, 0.27, 1.55) 0s infinite;
          animation: callback 3s cubic-bezier(0.68, -0.55, 0.27, 1.55) 0s infinite;
}

/* Скрывать на десктопе */
@media (min-width: 1025px) {
  .callback-mobile {
    display: none;
  }
}

@-webkit-keyframes callback {
  0% {
    -webkit-transform: scale(1);
            transform: scale(1);
  }
  50% {
    -webkit-transform: scale(1.2);
            transform: scale(1.2);
  }
  100% {
    -webkit-transform: scale(1);
            transform: scale(1);
  }
}
@keyframes callback {
  0% {
    -webkit-transform: scale(1);
            transform: scale(1);
  }
  50% {
    -webkit-transform: scale(1.2);
            transform: scale(1.2);
  }
  100% {
    -webkit-transform: scale(1);
            transform: scale(1);
  }
}

#sidebar {
  width: 250px;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 999;
  background: #ffffff;
  transition: all 0.3s;
}

#sidebar.active {
  margin-left: -250px;
}

#sidebar .sidebar-header {
  padding-top: 30px;
  padding-left: 30px;
  padding-right: 30px;
  background: #ffffff;
}

#sidebar ul.components {
  padding: 30px 0;
  border-bottom: 1px solid #f0f0f0;
}

#sidebar ul p {
  padding-top: 10px;
  padding-right: 10px;
}

#sidebar form {
  padding-right: 20px;
}

#content {
  width: calc(100% - 250px);
  padding: 40px;
  min-height: 100vh;
  transition: all 0.3s;
  position: absolute;
  top: 0;
  right: 0;
}

#content.active {
  width: 100%;
}

@media (max-width: 991px) {
  #sidebar {
      margin-left: -250px;
  }
  #sidebar.active {
      margin-left: 0;
  }
  #content {
      width: 100%;
      padding: 0;
  }
  #content.active {
      width: calc(100% - 250px);
  }
  #sidebarCollapse span {
      display: none;
  }
}
@media (max-width: 350px) {
  .text-break {
      font-size: 1.75rem;
  }
}
@media (max-width: 305px) {
  .text-break {
      overflow-wrap: break-word;
  }
}

/* Медиа-запросы для кнопок */
@media (max-width: 768px) {
  .btn.btn-green {
    padding: 6px 18px;
    font-size: 12px;
  }
  .btn.btn-outline-green {
    padding: 6px 18px;
    font-size: 12px;
  }
}

@media (max-width: 576px) {
  .btn.btn-green {
    padding: 4px 12px;
    font-size: 10px;
  }
  .btn.btn-outline-green {
    padding: 4px 12px;
    font-size: 10px;
  }
}

@media (max-width: 480px) {
  .btn.btn-green {
    padding: 3px 10px;
    font-size: 9px;
  }
  .btn.btn-outline-green {
    padding: 3px 10px;
    font-size: 9px;
  }
}

@media (max-width: 360px) {
  .btn.btn-green {
    padding: 2px 8px;
    font-size: 8px;
  }
  .btn.btn-outline-green {
    padding: 2px 8px;
    font-size: 8px;
  }
}

@media (max-width: 320px) {
  .btn.btn-green {
    padding: 1px 6px;
    font-size: 7px;
  }
  .btn.btn-outline-green {
    padding: 1px 6px;
    font-size: 7px;
  }
}

/* Адаптация для btn-lg на мобильных */
@media (max-width: 768px) {
  .btn.btn-lg {
    padding: 8px 20px;
    font-size: 14px;
  }
}

@media (max-width: 576px) {
  .btn.btn-lg {
    padding: 6px 16px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .btn.btn-lg {
    padding: 4px 12px;
    font-size: 10px;
  }
}

@media (max-width: 360px) {
  .btn.btn-lg {
    padding: 3px 10px;
    font-size: 9px;
  }
}

@media (max-width: 320px) {
  .btn.btn-lg {
    padding: 2px 8px;
    font-size: 8px;
  }
}

/* Для длинного текста в кнопках на мобильных */
@media (max-width: 768px) {
  .btn {
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
  }
}
/* Медиа-запросы для карточек */
@media (max-width: 768px) {
  .card-body {
    padding: 0.9rem;
  }
  .card {
    margin-bottom: 0.5rem;
  }
}

@media (max-width: 576px) {
  .card-body {
    padding: 0.65rem;
  }
  .card {
    margin-bottom: 0.25rem;
  }
}

@media (max-width: 480px) {
  .card-body {
    padding: 0.5rem;
  }
  .card {
    margin-bottom: 0.1rem;
  }
}

@media (max-width: 320px) {
  .card-body {
    padding: 0.45rem;
  }
  .card {
    margin-bottom: 0.05rem;
  }
}
/* Медиа-запросы для текста и шрифтов */
@media (max-width: 768px) {
  body {
    font-size: 1rem;
  }
  h1 {
    font-size: 2rem;
  }
  h2 {
    font-size: 1.6rem;
  }
  h3 {
    font-size: 1.4rem;
	padding: 0 0.725rem;
  }
  p, .lead {
    font-size: 1rem;
  }
  .p-12 {
    font-size: 1rem;
  }
}

@media (max-width: 576px) {
  body {
    font-size: 0.9rem;
  }
  h1 {
    font-size: 1.8rem;
  }
  h2 {
    font-size: 1.5rem;
  }
  h3 {
    font-size: 1.3rem;
	padding: 0 0.725rem;
  }
  p, .lead {
    font-size: 0.9rem;
  }
  .p-12 {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 0.8rem;
  }
  h1 {
    font-size: 1.4rem;
  }
  h2 {
    font-size: 1.2rem;
  }
  h3 {
    font-size: 1.1rem;
	padding: 0 0.725rem;
  }
  p {
    font-size: 0.8rem;
  }
  .p-12 {
    font-size: 0.8rem;
  }
}

@media (max-width: 320px) {
  body {
    font-size: 0.75rem;
  }
  h1 {
    font-size: 1.3rem;
  }
  h2 {
    font-size: 1.1rem;
  }
  h3 {
    font-size: 1.0rem;
	margin-left: 3%;
	padding: 0 0.725rem;
  }
  p {
    font-size: 0.75rem;
  }
  .p-12 {
    font-size: 0.75rem;
  }
}
/* Медиа-запросы для навигации */
@media (max-width: 768px) {
    .navbar-nav .nav-link {
      padding: 10px 20px;
      height: 30px;
      line-height: 30px;
      font-size: 14px;
    }
    .navbar-nav a {
      display: block;
      width: 100%;
      padding: 15px 0;
      text-decoration: none;
      transition: all 0.3s ease;
    }
    .navbar-nav a:hover {
      color: #8B4513;
      background: rgba(139, 69, 19, 0.1);
      border-radius: 5px;
    }
   .navbar-brand {
     font-size: 1.25rem;
   }
   .navbar-toggler {
     padding-top: 8px;
     padding-bottom: 0;
   }
 }

@media (max-width: 576px) {
  .navbar-nav .nav-link {
    padding-bottom: 0;
    height: 35px;
    line-height: 45px;
    font-size: 13px;
  }
  .navbar-brand {
    font-size: 1.1rem;
  }
  .navbar-toggler {
    padding-top: 6px;
    padding-bottom: 0;
  }
}
/* Адаптивная карусель для разных разрешений экрана */

/* Десктоп - большие экраны */
@media (min-width: 1200px) {
  .owl-carousel .item {
    height: 500px;
  }
  .owl-carousel.slide-two {
    height: 500px;
  }
  .my-custom-container {
    height: 60vh;
  }
}

/* Планшеты - средние экраны */
@media (min-width: 768px) and (max-width: 1199px) {
  .owl-carousel .item {
    height: 450px;
  }
  .owl-carousel.slide-two {
    height: 450px;
  }
  .my-custom-container {
    height: 55vh;
  }
}

/* Большие мобильные устройства (iPad, большие Android) */
@media (min-width: 576px) and (max-width: 767px) {
  .owl-carousel .item {
    height: 400px;
  }
  .owl-carousel.slide-two {
    height: 400px;
  }
  .my-custom-container {
    height: 50vh;
  }
}

/* iPhone 12 Pro Max, 13, 13 Pro, 13 Pro Max, 14, 14 Pro, 14 Pro Max */
@media (max-width: 428px) {
  .owl-carousel .item {
    height: 350px;
  }
  .owl-carousel.slide-two {
    height: 350px;
  }
  .my-custom-container {
    height: 45vh;
  }
}

/* iPhone 12, 12 Pro, 13 mini, 14 */
@media (max-width: 390px) {
  .owl-carousel .item {
    height: 320px;
  }
  .owl-carousel.slide-two {
    height: 320px;
  }
  .my-custom-container {
    height: 42vh;
  }
}

/* iPhone SE (3rd gen), 11 Pro, X, XS, 12 mini */
@media (max-width: 375px) {
  .owl-carousel .item {
    height: 300px;
  }
  .owl-carousel.slide-two {
    height: 300px;
  }
  .my-custom-container {
    height: 40vh;
  }
}

/* iPhone SE (1st gen), 5, 5s, 5c */
@media (max-width: 320px) {
  .owl-carousel .item {
    height: 280px;
  }
  .owl-carousel.slide-two {
    height: 280px;
  }
  .my-custom-container {
    height: 38vh;
  }
}

/* Portrait ориентация на мобильных */
@media (max-width: 767px) and (orientation: portrait) {
  .owl-carousel .item {
    height: 35vh;
    min-height: 250px;
  }
  .owl-carousel.slide-two {
    height: 35vh;
    min-height: 250px;
  }
}

/* Landscape ориентация на мобильных */
@media (max-width: 767px) and (orientation: landscape) {
  .owl-carousel .item {
    height: 50vh;
    max-height: 400px;
  }
  .owl-carousel.slide-two {
    height: 50vh;
    max-height: 400px;
  }
}

/* Адаптивная кнопка для мобильных и планшетов */
@media (max-width: 768px) {
  .callback-mobile {
    width: 50px;
    height: 50px;
    background-size: 50px;
    bottom: max(100px, calc(100px + env(safe-area-inset-bottom)));
    right: max(30px, calc(30px + env(safe-area-inset-right)));
  }
}

@media (max-width: 576px) {
  .callback-mobile {
    width: 45px;
    height: 45px;
    background-size: 45px;
    bottom: max(100px, calc(100px + env(safe-area-inset-bottom)));
    right: max(25px, calc(25px + env(safe-area-inset-right)));
  }
}

@media (max-width: 480px) {
  .callback-mobile {
    width: 40px;
    height: 40px;
    background-size: 40px;
    bottom: max(100px, calc(100px + env(safe-area-inset-bottom)));
    right: max(20px, calc(20px + env(safe-area-inset-right)));
  }
}

@media (max-width: 360px) {
  .callback-mobile {
    width: 35px;
    height: 35px;
    background-size: 35px;
    bottom: max(100px, calc(100px + env(safe-area-inset-bottom)));
    right: max(15px, calc(15px + env(safe-area-inset-right)));
  }
}

/* Адаптивная кнопка для десктопа */
@media (min-width: 1025px) {
  .callback-desktop {
    width: 50px;
    height: 50px;
    background-size: 50px;
    bottom: 40px;
    right: 40px;
  }
}

  /* Bootstrap Carousel improvements for mobile */
  .carousel {
    touch-action: pan-y pinch-zoom;
  }

  .carousel-item {
    min-height: 300px;
  }

  .carousel-item img {
    object-fit: cover;
    height: 100%;
    width: 100%;
  }

  .carousel-indicators {
    bottom: 10px;
  }

  .carousel-indicators li {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin: 0 4px;
  }

  /* Mobile menu improvements - iOS style */
  .navbar-collapse {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100vw;
    height: 100vh;
    margin: 0;
    background: rgba(26, 26, 26, 0.9);
    backdrop-filter: blur(20px);
    z-index: 1050;
    overflow-y: auto;
    padding-top: 120px; /* Space for navbar */
  }

  .navbar-collapse.show {
    display: block !important;
  }

  .navbar-collapse.show::before {
    content: '';
    display: block;
    background: url('../img/logo.avif') no-repeat center;
    background-size: contain;
    height: 80px;
    margin: 0 auto;
    cursor: pointer;
  }

  .navbar-nav {
    padding: 40px 30px;
    margin: 0;
    text-align: center;
  }

  .navbar-nav .nav-item {
    margin: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
  }

  .navbar-nav .nav-link {
    color: #fff !important;
    font-size: 20px;
    font-weight: 500;
    padding: 20px 25px;
    display: block;
    text-decoration: none;
    transition: all 0.3s ease;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
  }

  .navbar-nav .nav-link:hover {
    color: #fff !important;
    background: linear-gradient(135deg, #8B4513 0%, #8B4513 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(111, 66, 193, 0.4);
  }

  .navbar-nav .nav-link:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(111, 66, 193, 0.3);
  }

@media (max-width: 576px) {
  .owl-carousel .item {
    height: 300px;
  }
  .owl-carousel.slide-two {
    height: 300px;
  }
  .my-custom-container {
    height: 40vh !important;
  }
  .callback-mobile {
    width: 35px;
    height: 35px;
    background-size: 35px;
    bottom: 100px;
    right: 20px;
  }
}

/* Улучшенный navbar на мобильных - не фиксированный для удобства */
@media (max-width: 768px) {
  .navbar {
    position: relative;
    background: rgba(26, 26, 26, 0.9);
    height: auto;
    padding: 10px 20px;
  }
  .navbar-brand img {
    height: 50px;
  }
  .navbar-toggler {
    padding-top: 15px;
    padding-bottom: 10px;
  }
  .nav-item {
    margin: 2px 0;
  }
  .navbar-nav .nav-link {
    padding: 10px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .navbar-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
  }
  body {
    padding-top: 0;
  }
  #carouselExampleIndicators {
    margin-top: 0;
  }
}

.custom-block {
  background: rgba(51, 51, 51, 0.8);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  color: #e0e0e0;
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3), 0 5px 15px rgba(111, 66, 193, 0.1);
  padding: 40px 20px;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
}

.custom-block::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.6s;
}

@media (max-width: 768px) {
  .custom-block {
    padding: 14px 9px;
  }
}

@media (max-width: 576px) {
  .custom-block {
    padding: 9px 7px;
  }
}

@media (max-width: 480px) {
  .custom-block {
    padding: 7px 6px;
  }
}

@media (max-width: 320px) {
  .custom-block {
    padding: 6px 5px;
  }
}

.custom-block:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 8px 20px rgba(111, 66, 193, 0.2);
  transform: translateY(-3px);
}

.custom-block:hover::before {
  left: 100%;
}

/* Form controls styling */
.form-control {
  background-color: #6a587836;
  color: #e0e0e0;
  border: 1px solid #8B4513;
  border-radius: 5px;
}

.form-control:focus {
  background-color: #44444400;
  color: #e0e0e0;
  border-color: #8B4513;
  box-shadow: 0 0 0 0.2rem rgba(111, 66, 193, 0.25);
}

.form-control::placeholder {
  color: #ccc;
}

/* reCAPTCHA styling */
.g-recaptcha {
  margin-top: 10px;
}

.g-recaptcha iframe {
  filter: sepia(1) hue-rotate(200deg) saturate(2);
}

/* Адаптивность для reCAPTCHA на мобильных */
@media (max-width: 768px) {
  .g-recaptcha {
    transform: scale(0.9);
    transform-origin: 0 0;
    margin-bottom: 10px;
  }
}

@media (max-width: 576px) {
  .g-recaptcha {
    transform: scale(0.8);
    margin-bottom: 15px;
  }
}

@media (max-width: 480px) {
  .g-recaptcha {
    transform: scale(0.75);
    margin-bottom: 20px;
  }
}

@media (max-width: 360px) {
  .g-recaptcha {
    transform: scale(0.7);
    margin-bottom: 25px;
  }
}

@media (max-width: 320px) {
  .g-recaptcha {
    transform: scale(0.65);
    margin-bottom: 30px;
  }
}

/* Fancybox styling in site colors */
.fancybox-container {
  background: rgba(0, 0, 0, 0.8);
}

.fancybox-bg {
  background: rgba(0, 0, 0, 0.8);
}

.fancybox-inner {
  background: #6a587836 !important;
  color: #e0e0e0 !important;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(111, 66, 193, 0.3);
}

.fancybox-content {
  background: #6a587836 !important;
  color: #e0e0e0 !important;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(111, 66, 193, 0.3);
}

/* Mobile modal improvements */
@media (max-width: 768px) {
  .fancybox-content {
    padding: 15px !important;
    margin: 10px !important;
    max-width: 95vw !important;
    max-height: 90vh !important;
    overflow-y: auto;
    border-radius: 12px !important;
  }

  .fancybox-inner {
    padding: 0 !important;
  }

  #modal .form-control {
    font-size: 16px; /* Prevent zoom on iOS */
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 12px;
  }

  #modal .btn {
    min-height: 48px;
    font-size: 16px;
    border-radius: 8px;
    margin-top: 10px;
  }

  #modal h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
  }

  #modal p {
    font-size: 0.9rem;
    margin-bottom: 20px;
  }

  #modal .g-recaptcha {
    margin-top: 15px;
    margin-bottom: 15px;
  }
}

/* Tablet modal improvements */
@media (min-width: 769px) and (max-width: 1024px) {
  .fancybox-content {
    padding: 25px !important;
    margin: 20px !important;
    max-width: 80vw !important;
    max-height: 85vh !important;
    overflow-y: auto;
    border-radius: 15px !important;
  }


  #modal .form-control {
    font-size: 16px;
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 15px;
  }

  #modal .btn {
    min-height: 50px;
    font-size: 16px;
    border-radius: 8px;
    margin-top: 15px;
  }

  #modal h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
  }

  #modal p {
    font-size: 1rem;
    margin-bottom: 25px;
  }

  #modal .g-recaptcha {
    margin-top: 20px;
    margin-bottom: 20px;
  }
}

/* Small mobile modal improvements */
@media (max-width: 480px) {
  .fancybox-content {
    padding: 12px !important;
    margin: 8px !important;
    max-width: 96vw !important;
    max-height: 92vh !important;
    border-radius: 10px !important;
  }


  #modal .form-control {
    font-size: 16px;
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 10px;
  }

  #modal .btn {
    min-height: 44px;
    font-size: 15px;
    border-radius: 6px;
    margin-top: 8px;
  }

  #modal h2 {
    font-size: 1.3rem;
    margin-bottom: 6px;
  }

  #modal p {
    font-size: 0.85rem;
    margin-bottom: 18px;
  }

  #modal .g-recaptcha {
    margin-top: 12px;
    margin-bottom: 12px;
  }

  #modal .p-12 {
    font-size: 12px;
    padding: 0 8px;
  }
}

/* Extra small mobile modal improvements */
@media (max-width: 360px) {
  .fancybox-content {
    padding: 10px !important;
    margin: 5px !important;
    max-width: 98vw !important;
    max-height: 95vh !important;
    border-radius: 8px !important;
  }



  #modal .form-control {
    font-size: 16px;
    padding: 8px 12px;
    border-radius: 5px;
    margin-bottom: 8px;
  }

  #modal .btn {
    min-height: 40px;
    font-size: 14px;
    border-radius: 5px;
    margin-top: 6px;
  }

  #modal h2 {
    font-size: 1rem;
    margin-bottom: 15px;
  }

  #modal p {
    font-size: 0.8rem;
    margin-bottom: 15px;
  }

  #modal .g-recaptcha {
    margin-top: 10px;
    margin-bottom: 10px;
  }

  #modal .p-12 {
    font-size: 11px;
    padding: 0 5px;
  }
}

.fancybox-close-small {
  color: #e0e0e0;
  background: transparent;
  border: none;
}

.fancybox-close-small:hover {
  color: #8B4513;
}

.fancybox-close {
  color: #e0e0e0;
}

.fancybox-close:hover {
  color: #8B4513;
}

/* Additional styles for modal content */
#modal {
  background: #6a587836 !important;
  color: #e0e0e0 !important;
}

#modal h2,
#modal p,
#modal label {
  color: #e0e0e0 !important;
}

.fancybox-slide {
  background: #6a587836 !important;
}

.fancybox-slide--current {
  background: #6a587836 !important;
}

/* Hover effect for Why Choose Us block */
.why-choose-us-alert {
  background-color: #6a587836;
  color: white;
  transition: all 0.3s ease;
}

.why-choose-us-alert:hover {
  background-color: #444;
  transform: scale(1.02);
  box-shadow: 0 10px 30px rgba(111, 66, 193, 0.3);
}

.why-choose-us-alert .col-md-3 {
  transition: all 0.3s ease;
}

.why-choose-us-alert .col-md-3:hover {
  transform: translateY(-5px);
}

/* Alert messages styling for better readability */
.alert {
  font-size: 16px !important;
  line-height: 1.5 !important;
  color: #e0e0e0 !important;
  background-color: #6a587836 !important;
  border: 1px solid #8B4513 !important;
  border-radius: 8px !important;
  padding: 15px !important;
  margin: 20px 0 !important;
}

.alert-danger {
  background-color: #3333335c !important;
  border-color: #804215ab !important;
  color: #ff0000 !important;
}

.alert-success {
  background-color: #3333335c !important;
  border-color: #804215ab !important;
  color: #ffffff !important;
}

.alert h4 {
  font-size: 18px !important;
  font-weight: bold !important;
  margin-bottom: 10px !important;
}

.alert p {
  margin-bottom: 8px !important;
}

.alert ul {
  margin-left: 20px !important;
}

.alert li {
  margin-bottom: 5px !important;
}

/* Изменение порядка колонок на мобильных для контактов */
@media (max-width: 576px) {
  #contact .row {
    display: flex;
    flex-direction: column;
  }
  #contact .col-sm-6.col-xs-12.text-right {
    order: -1;
    text-align: left !important;
  }
}

/* Медиа-запросы для .lead */
@media (max-width: 768px) {
  .lead {
    font-size: 1.25rem;
  }
}

@media (max-width: 576px) {
  .lead {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .lead {
    font-size: 0.9rem;
  }
}

@media (max-width: 320px) {
  .lead {
    font-size: 0.7rem;
  }
/* Центрирование текста в card-body на мобильных */
@media (max-width: 576px) {
  .card-body.text-right {
    text-align: center !important;
  }
  #contact .card-text.lead {
    text-align: center !important;
  }
}
/* Увеличение блоков на мобильных */
@media (max-width: 768px) {
  .card-body {
    padding: 0.75rem !important;
  }
  .custom-block {
    padding: 15px 10px !important;
  }
}

@media (max-width: 576px) {
  .card-body {
    padding: 0.5rem !important;
  }
  .custom-block {
    padding: 10px 5px !important;
  }
}

@media (max-width: 480px) {
  .card-body {
    padding: 0.25rem !important;
  }
  .custom-block {
    padding: 5px 3px !important;
  }
}

@media (max-width: 320px) {
  .card-body {
    padding: 0.1rem !important;
  }
  .custom-block {
    padding: 3px 2px !important;
  }
}
/* Увеличение размера карусели на мобильных */
@media (max-width: 768px) {
  .owl-carousel .item {
    height: 450px !important;
  }
  .owl-carousel.slide-two {
    height: 450px !important;
  }
  .my-custom-container {
    height: 55vh !important;
  }
}

@media (max-width: 576px) {
  .owl-carousel .item {
    height: 350px !important;
  }
  .owl-carousel.slide-two {
    height: 350px !important;
  }
  .my-custom-container {
    height: 45vh !important;
  }
}

/* Дополнительные медиа-запросы для лучшей адаптации Android и iOS */

/* Landscape ориентация на мобильных */
@media screen and (max-width: 768px) and (orientation: landscape) {
  .navbar {
    height: 70px;
  }
  .logo {
    height: 60px;
  }
  .card-body {
    padding: 1rem;
  }
  .custom-block {
    padding: 10px 5px;
  }
  h1 {
    font-size: 1.5rem;
  }
  h2 {
    font-size: 1.2rem;
  }
  .lead {
    font-size: 0.9rem;
  }
}

/* Улучшения для touch устройств */
@media (hover: none) and (pointer: coarse) {
  .btn {
    min-height: 44px;
    min-width: 44px;
  }
  .navbar-toggler {
    min-height: 44px;
    min-width: 44px;
  }
  .callback-mobile,
  .callback-desktop {
    width: 30px;
    height: 30px;
    background-size: 30px;
	margin-right: -30px;
	margin-bottom: 5px;
  }

  /* Увеличение зон клика для всех интерактивных элементов */
  a, button, .btn, .nav-link, .navbar-toggler, .callback,
  input[type="submit"], input[type="button"], .form-control {
    min-height: 44px;
    min-width: 44px;
    touch-action: manipulation;
  }

  /* Специальные правила для слайдера */
  .carousel-control-prev, .carousel-control-next {
    width: 60px !important;
    height: 60px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: rgba(0, 0, 0, 0.5) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .carousel-control-prev-icon, .carousel-control-next-icon {
    width: 20px !important;
    height: 20px !important;
  }

  .carousel-indicators li {
    width: 12px !important;
    height: 12px !important;
    margin: 0 6px !important;
    border-radius: 50% !important;
  }

  /* Специальные правила для ссылок */
  .nav-link {
    padding: 12px 16px;
    display: inline-block;
  }

  /* Увеличение отступов вокруг кликабельных элементов */
  .card-body a, .card-body button {
    margin: 8px 0;
  }

  /* Улучшение видимости активных состояний */
  a:active, button:active, .btn:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
  }

  /* Увеличение зон клика для всех ссылок в контенте */
  .card a, .custom-block a, p a, .lead a {
    padding: 8px 12px;
    margin: 4px 0;
    display: inline-block;
    min-height: 44px;
    line-height: 1.4;
  }
}

/* Дополнительные улучшения для форм на мобильных */
@media (max-width: 768px) {
  .form-group {
    margin-bottom: 1rem;
  }

  .form-control {
    padding: 0.75rem;
    font-size: 16px; /* Предотвращает зум на iOS */
    border-radius: 8px;
  }

  textarea.form-control {
    min-height: 100px;
  }

  .btn[type="submit"] {
    width: 100%;
    min-height: 48px;
    font-size: 16px;
  }
}

@media (max-width: 576px) {
  .form-group {
    margin-bottom: 0.75rem;
  }

  .form-control {
    padding: 0.625rem;
  }

  .btn[type="submit"] {
    min-height: 44px;
  }
}

@media (max-width: 480px) {
  .form-group {
    margin-bottom: 0.5rem;
  }

  .form-control {
    padding: 0.5rem;
  }

  .btn[type="submit"] {
    min-height: 40px;
    font-size: 14px;
  }
}

/* Специфические стили для iOS Safari */
@supports (-webkit-touch-callout: none) {
  .navbar-toggler {
    -webkit-appearance: none;
    border-radius: 25px;
  }
  input, textarea, select {
    -webkit-appearance: none;
    border-radius: 5px;
  }
}

/* Safe Area для iPhone с вырезом (iPhone X и новее) */
@supports (padding: max(0px)) {
  body {
    padding-top: max(1.25rem, env(safe-area-inset-top));
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
    padding-left: max(0px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
  }

  .navbar-over-carousel {
    top: max(0px, env(safe-area-inset-top));
  }

  .navbar-collapse {
    padding-top: max(120px, calc(120px + env(safe-area-inset-top)));
  }

  .callback-mobile {
    bottom: max(90px, calc(90px + env(safe-area-inset-bottom)));
    right: max(40px, calc(40px + env(safe-area-inset-right)));
  }

  .fancybox-content {
    margin: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)) !important;
  }
}

/* Специфические стили для Android Chrome */
@supports (-webkit-appearance: none) and (not (-webkit-touch-callout: none)) {
  .form-control {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
  }
}

/* Улучшения для очень маленьких экранов */
@media (max-width: 360px) {
  .container {
    padding-left: 10px;
    padding-right: 10px;
  }
  .navbar-toggler {
    padding: 8px 30px;
  }
  .navbar-toggler::before {
    font-size: 12px;
  }
  .card-body {
    padding: 0.75rem;
  }
  .btn.btn-green {
    padding: 15px 16px;
    font-size: 10px;
  }
  h1 {
    font-size: 1.2rem;
  }
  h2 {
    font-size: 1.0rem;
  }
  .lead {
    font-size: 0.75rem;
  }
}

/* Специфические медиазапросы для iPhone разрешений */
/* iPhone SE (1st gen), 5, 5s, 5c */
@media (max-width: 320px) {
  .card-body {
    padding: 0.5rem;
  }
  .custom-block {
    padding: 8px 5px;
  }
}

/* Адаптивность для картинок в формах и контенте */
@media (max-width: 768px) {
  .card-body img {
    max-width: 20%;
    height: auto;
  }

  .custom-block img {
    max-width: 100%;
    height: auto;
  }
}

@media (max-width: 576px) {
  .card-body img[style*="width: 40%"] {
    width: 60% !important;
    height: auto !important;
  }

  .card-body img[style*="width: 55%"] {
    width: 70% !important;
    height: auto !important;
  }
}

@media (max-width: 480px) {
  .card-body img[style*="width: 40%"] {
    width: 80% !important;
    height: auto !important;
  }

  .card-body img[style*="width: 55%"] {
    width: 90% !important;
    height: auto !important;
  }
}

@media (max-width: 360px) {
  .card-body img[style*="width: 40%"] {
    width: 40% !important;
    height: auto !important;
  }

  .card-body img[style*="width: 55%"] {
    width: 55% !important;
    height: auto !important;
  }
}

/* iPhone 6, 6s, 7, 8, SE (2nd gen) */
@media (max-width: 375px) {
  .card-body {
    padding: 0.75rem;
  }
  .custom-block {
    padding: 12px 8px;
  }
}

/* iPhone 6+, 6s+, 7+, 8+ */
@media (max-width: 414px) {
  .card-body {
    padding: 1rem;
  }
  .custom-block {
    padding: 15px 10px;
  }
}

/* iPhone X, XS, 11 Pro */
@media (max-width: 375px) and (max-height: 812px) {
  .navbar {
    height: 90px;
  }
  .logo {
    height: 70px;
  }
}

/* iPhone XR, 11 */
@media (max-width: 414px) and (max-height: 896px) {
  .card-body {
    padding: 1.25rem;
  }
}

/* iPhone XS Max, 11 Pro Max */
@media (max-width: 414px) and (max-height: 896px) and (min-height: 812px) {
  .custom-block {
    padding: 20px 15px;
  }
}

/* iPhone 12, 12 Pro */
@media (max-width: 390px) {
  .card-body {
    padding: 1rem;
  }
}

/* iPhone 12 Pro Max, 13, 13 Pro, 13 Pro Max */
@media (max-width: 428px) {
  .card-body {
    padding: 1.25rem;
  }
  .custom-block {
    padding: 18px 12px;
  }
}

/* Дополнительные улучшения для предотвращения выхода элементов за пределы */
@media (max-width: 480px) {
  .container {
    padding-left: 8px;
    padding-right: 8px;
  }

  .card {
    margin-bottom: 0.75rem;
  }

  .form-control {
    font-size: 16px; /* Предотвращает зум на iOS */
  }

  .btn {
    min-height: 44px; /* Touch-friendly */
    font-size: 14px;
  }
}

@media (max-width: 360px) {
  .container {
    padding-left: 5px;
    padding-right: 5px;
  }

  .card-body {
    padding: 0.75rem;
  }

  .custom-block {
    padding: 10px 8px;
  }

  h1 {
    font-size: 1.1rem;
  }

  h2 {
    font-size: 0.95rem;
  }

  .lead {
    font-size: 0.8rem;
  }
}

@media (max-width: 320px) {
  .container {
    padding-left: 3px;
    padding-right: 3px;
  }

  .card-body {
    padding: 0.5rem;
  }

  .custom-block {
    padding: 8px 5px;
  }

  .navbar-toggler {
    padding: 6px 25px;
  }

  .navbar-toggler::before {
    font-size: 11px;
  }
}

/* Улучшения для планшетов в портретной ориентации */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
  .card-body {
    padding: 1.5rem;
  }
  .custom-block {
    padding: 30px 15px;
  }
  h1 {
    font-size: 2.2rem;
  }
  h2 {
    font-size: 1.8rem;
  }
}

/* Улучшения для планшетов в ландшафтной ориентации */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
  .navbar {
    height: 90px;
  }
  .logo {
    height: 70px;
  }
  .card-body {
    padding: 1.25rem;
  }
  .custom-block {
    padding: 25px 10px;
  }
}

/* Адаптивность для иконок в карточках */
@media (max-width: 768px) {
  .card-body img[height="60"] {
    height: 50px !important;
    width: auto !important;
  }
}

@media (max-width: 576px) {
  .card-body img[height="60"] {
    height: 45px !important;
    width: auto !important;
  }
}

@media (max-width: 480px) {
  .card-body img[height="60"] {
    height: 40px !important;
    width: auto !important;
  }
}

@media (max-width: 360px) {
  .card-body img[height="60"] {
    height: 35px !important;
    width: auto !important;
  }
}

@media (max-width: 320px) {
  .card-body img[height="60"] {
    height: 30px !important;
    width: auto !important;
  }
}
}

/* Полное скрытие навигационной панели на мобильных устройствах и планшетах */
@media (max-width: 1024px) {
  .navbar {
    display: none !important;
  }
  
  /* Убираем отступ сверху, который был для навбара */
  body {
    padding-top: 0 !important;
  }
  
  /* Убираем отступ сверху у карусели */
  #carouselExampleIndicators {
    margin-top: 0 !important;
  }
  
  /* Убираем отступ снизу у навбара */
  .mb-3 {
    margin-bottom: 0 !important;
  }
}

/* Дополнительное скрытие для очень маленьких экранов */
@media (max-width: 768px) {
  .navbar,
  .navbar-expand-lg,
  .navbar-toggler,
  .navbar-collapse,
  .navbar-nav,
  .navbar-brand {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
  }
}

/* Скрытие навбара на планшетах */
@media (min-width: 769px) and (max-width: 1024px) {
  .navbar {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
  }
}

/* Скрытие секции контактов на мобильных устройствах и планшетах */
@media (max-width: 1024px) {
  #contact {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
  }
}

/* Мобильная панель вкладок (Bottom Navigation) */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 80px;
  background: linear-gradient(135deg, rgba(26, 26, 26, 0.95) 0%, rgba(51, 51, 51, 0.9) 50%, rgba(26, 26, 26, 0.95) 100%);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-top: 3px solid #8B4513;
  box-shadow: 0 -6px 25px rgba(0, 0, 0, 0.4), 0 -3px 15px rgba(139, 69, 19, 0.3);
  z-index: 1000;
  display: none;
  padding: 0 15px;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.mobile-bottom-nav.show {
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #e0e0e0;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 8px;
  border-radius: 12px;
  transition: all 0.3s ease;
  min-width: 60px;
  min-height: 60px;
  position: relative;
  overflow: hidden;
}

.mobile-nav-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(139, 69, 19, 0.2), transparent);
  transition: left 0.5s;
}

.mobile-nav-item:hover::before {
  left: 100%;
}

.mobile-nav-item i {
  font-size: 24px;
  margin-bottom: 5px;
  transition: all 0.3s ease;
}

.mobile-nav-item span {
  font-size: 13px;
  text-align: center;
  line-height: 1.2;
  transition: all 0.3s ease;
  font-weight: 600;
}

.mobile-nav-item:hover,
.mobile-nav-item:active {
  color: #8B4513;
  background: rgba(139, 69, 19, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(139, 69, 19, 0.3);
}

.mobile-nav-item.active {
  color: #8B4513;
  background: linear-gradient(135deg, rgba(139, 69, 19, 0.2) 0%, rgba(139, 69, 19, 0.1) 100%);
  box-shadow: 0 2px 10px rgba(139, 69, 19, 0.4);
}

.mobile-nav-item.active i {
  transform: scale(1.1);
}

/* Показать мобильную панель только на мобильных и планшетах */
@media (max-width: 1024px) {
  .mobile-bottom-nav {
    display: flex;
    align-items: center;
    justify-content: space-around;
  }

  /* Добавить отступ снизу для контента, чтобы он не перекрывался панелью */
  body {
    padding-bottom: 90px !important;
  }
}

/* Адаптация для очень маленьких экранов */
@media (max-width: 480px) {
  .mobile-bottom-nav {
    height: 75px;
    padding: 0 8px;
  }

  .mobile-nav-item {
    padding: 10px 6px;
    min-width: 55px;
    min-height: 55px;
    font-size: 13px;
  }

  .mobile-nav-item i {
    font-size: 22px;
  }

  .mobile-nav-item span {
    font-size: 12px;
    font-weight: 600;
  }

  body {
    padding-bottom: 85px !important;
  }
}

/* Улучшенная типографика для планшетов */
@media (min-width: 481px) and (max-width: 1024px) {
  .mobile-nav-item {
    font-size: 15px;
    padding: 14px 10px;
    min-height: 65px;
  }

  .mobile-nav-item i {
    font-size: 26px;
    margin-bottom: 6px;
  }

  .mobile-nav-item span {
    font-size: 14px;
    font-weight: 600;
  }

  .mobile-bottom-nav {
    height: 85px;
  }

  body {
    padding-bottom: 95px !important;
  }
}

/* Адаптация для iPhone с вырезом (safe area) */
@supports (padding: max(0px)) {
  .mobile-bottom-nav {
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    height: max(80px, calc(80px + env(safe-area-inset-bottom)));
  }

  @media (max-width: 1024px) {
    body {
      padding-bottom: max(90px, calc(90px + env(safe-area-inset-bottom))) !important;
    }
  }

  @media (max-width: 480px) {
    body {
      padding-bottom: max(85px, calc(85px + env(safe-area-inset-bottom))) !important;
    }
  }

  @media (min-width: 481px) and (max-width: 1024px) {
    body {
      padding-bottom: max(95px, calc(95px + env(safe-area-inset-bottom))) !important;
    }
  }
}

/* Анимация появления панели */
@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.mobile-bottom-nav {
  animation: slideUp 0.3s ease-out;
}

/* Скрыть панель на десктопе */
@media (min-width: 1025px) {
  .mobile-bottom-nav {
    display: none !important;
  }

  body {
    padding-bottom: 0 !important;
	padding-top: 15px !important;
  }
}

/* Анимация переливания фона */
.animated-bg {
  background: linear-gradient(45deg, #6a587836, #555, #6a587836);
  background-size: 400% 400%;
  animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Улучшения для touch устройств */
@media (hover: none) and (pointer: coarse) {
  .mobile-nav-item {
    min-height: 48px;
    min-width: 48px;
    touch-action: manipulation;
  }

  .mobile-nav-item:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
  }
}

/* Дополнительные отступы для мобильных устройств и планшетов */

/* Мобильные устройства (max-width: 768px) */
@media (max-width: 768px) {
  /* Отступы между секциями */
  section {
    margin-bottom: 30px !important;
  }

  /* Отступы между контейнерами */
  .container {
    margin-bottom: 20px !important;
  }

  /* Отступы между карточками */
  .card {
    margin-bottom: 15px !important;
  }

  /* Отступы в секции услуг */
  .col-md-4.mb-3 {
    margin-bottom: 20px !important;
  }

  /* Отступы в секции "Почему выбирают нас" */
  .col-md-3.mt-3 {
    margin-bottom: 20px !important;
  }

  /* Отступы для карусели */
  #carouselExampleIndicators {
    margin-bottom: 25px !important;
  }

  /* Отступы для custom-block */
  .custom-block {
    margin-bottom: 25px !important;
  }
}

/* Планшеты (max-width: 1024px) */
@media (max-width: 1024px) {
  /* Отступы между секциями */
  section {
    margin-bottom: 25px !important;
  }

  /* Отступы между контейнерами */
  .container {
    margin-bottom: 15px !important;
  }

  /* Отступы между карточками */
  .card {
    margin-bottom: 12px !important;
  }

  /* Отступы в секции услуг */
  .col-md-4.mb-3 {
    margin-bottom: 15px !important;
  }

  /* Отступы в секции "Почему выбирают нас" */
  .col-md-3.mt-3 {
    margin-bottom: 15px !important;
  }

  /* Отступы для карусели */
  #carouselExampleIndicators {
    margin-bottom: 20px !important;
  }

  /* Отступы для custom-block */
  .custom-block {
    margin-bottom: 20px !important;
  }
}

/* Стили для логотипа в карусели */
.carousel-logo {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 10;
  display: none; /* Скрыт по умолчанию */
}

.carousel-logo-img {
  height: 60px;
  width: auto;
  max-width: 100px; /* Ограничение ширины для маленьких экранов */
}

/* Показать логотип только на мобильных и планшетах */
@media (max-width: 1024px) {
  .carousel-logo {
    display: block;
  }
}

/* Скрыть логотип на десктопе */
@media (min-width: 1025px) {
  .carousel-logo {
    display: none !important;
  }
}

/* Адаптация строк "Почему выбирают нас?" для мобильных и планшетов */
@media (max-width: 768px) {
  .why-choose-us h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    text-align: center;
  }

  .why-choose-us p.lead {
    font-size: 1.2rem;
    line-height: 1.4;
    text-align: center;
    margin-bottom: 1rem;
    text-align: left;
    margin: 6px;
  }

  .why-choose-us .col-md-6 {
    margin-bottom: 1.5rem;
    padding-left: 10px;
    padding-right: 10px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .why-choose-us h4 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.3;
  }

  .why-choose-us p.lead {
    font-size: 1rem;
    line-height: 1.4;
    margin-bottom: 1.25rem;
  }

  .why-choose-us .col-md-6 {
    margin-bottom: 1.25rem;
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* Дополнительная адаптация для очень маленьких экранов */
@media (max-width: 480px) {
  .why-choose-us h4 {
    font-size: 0.8rem;
    margin-bottom: 0.4rem;
  }

  .why-choose-us p.lead {
    font-size: 0.85rem;
    margin-bottom: 0.8rem;
    text-align: left;
    margin: 10px;
  }

  .why-choose-us .col-md-6 {
    margin-bottom: 1rem;
    padding-left: 5px;
    padding-right: 5px;
  }
}

/* Стили для footer */
.site-footer {
  background: linear-gradient(135deg, #1a1a1a 0%, #6a587836 100%);
  color: #e0e0e0;
  padding: 2rem 0;
  border-top: 3px solid #8B4513;
  width: 100vw;
  position: relative;
  margin: 0;
}

.site-footer .container {
  max-width: 1280px;
}

.site-footer h3 {
  color: #8B4513;
  font-weight: 600;
  margin-bottom: 1rem;
}

.site-footer .small {
  color: #ccc;
  font-size: 0.9rem;
}

.site-footer .small strong {
  color: #e0e0e0;
}

/* Выравнивание контента по нижней части страницы */
html, body {
  height: 100%;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.site-footer {
  margin-top: auto;
}


/* Адаптивность для ссылки */
@media (max-width: 768px) {
  .back-to-home-link {
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
    margin-top: 1.5rem;
  }
}

@media (max-width: 480px) {
  .back-to-home-link {
    font-size: 0.85rem;
    padding: 0.3rem 0.6rem;
    margin-top: 1rem;
  }
}

/* Стили для ссылки "Вернуться на главную" */
.back-to-home-link {
  font-size: 1.1rem;
  color: #ccc;
  text-decoration: none;
  margin-top: 20px;
  margin-bottom: 10px;
  display: block;
  text-align: left;
  transition: all 0.3s ease;
}

.back-to-home-link:hover {
  color: #8B4513;
  text-decoration: underline;
}

.back-to-home-link i {
  margin-right: 5px;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
  .back-to-home-link {
    font-size: 1rem;
    margin-top: 15px;
    margin-bottom: 8px;
  }
}

@media (max-width: 576px) {
  .back-to-home-link {
    font-size: 0.9rem;
    margin-top: 12px;
    margin-bottom: 6px;
	margin-left: 2%;
  }
}

/* Скрыть ссылку "Вернуться на главную" на мобильных устройствах и планшетах */
@media (max-width: 1024px) {
  .back-to-home-link {
    display: none;
  }
}

/* Стандартизированный footer */
.site-footer {
  background: linear-gradient(135deg, #1a1a1a 0%, #6a587836 100%);
  color: #e0e0e0;
  padding: 10px 0 2px;
  border-top: 2px dashed #8B4513;
  width: 100vw;
  position: relative;
  margin: 0;
}

.site-footer .container {
  max-width: 1280px;
  margin: 0 auto;
}

.site-footer hr {
  border-color: #8B4513;
  margin: 20px 0;
}

.site-footer h3 {
  color: #e0e0e0;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.site-footer .small {
  color: #ccc;
  font-size: 0.9rem;
  line-height: 1.1;
}

.site-footer strong {
  color: #e0e0e0;
}

.site-footer a {
  color: #8B4513;
  text-decoration: none;
}

.site-footer a:hover {
  color: #A0522D;
  text-decoration: underline;
}

/* Адаптация footer для мобильных */
@media (max-width: 768px) {
  .site-footer {
    padding: 30px 0 15px;
  }

  .site-footer h3 {
    font-size: 1.1rem;
  }

  .site-footer .small {
    font-size: 0.85rem;
  }
}

@media (max-width: 576px) {
  .site-footer {
    padding: 25px 0 10px;
  }

  .site-footer h3 {
    font-size: 1rem;
  }

  .site-footer .small {
    font-size: 0.8rem;
  }
}

/* Выравнивание контента по нижней части страницы */
html {
  height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* Мобильная навигация внизу */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 80px;
  background: linear-gradient(135deg, rgba(26, 26, 26, 0.95) 0%, rgba(51, 51, 51, 0.9) 50%, rgba(26, 26, 26, 0.95) 100%);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-top: 3px solid #8B4513;
  box-shadow: 0 -6px 25px rgba(0, 0, 0, 0.4), 0 -3px 15px rgba(139, 69, 19, 0.3);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 15px;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Соотношение сторон 16:9 для изображений в карусели */
#carouselExampleIndicators .carousel-item {
  aspect-ratio: 16/9;
}

/* Управление видимостью каруселей */
@media (min-width: 1025px) {
  /* На десктопе скрыть мобильную карусель и показать десктопную */
  #carouselExampleIndicators {
    display: none !important;
  }
  #desktopCarousel {
    display: block !important;
  }
}


@media (max-width: 1024px) {
  /* На мобильных и планшетах скрыть десктопную карусель и показать мобильную */
  #desktopCarousel {
    display: none !important;
  }
  #carouselExampleIndicators {
    display: block !important;
  }
}


.link-red {
    color: #fff;
    text-decoration: underline;
}
.link-red:hover {
    color: #8B4513;
    text-decoration: underline;
}



.btn.btn-red {
  background: linear-gradient(135deg, #8B4513 0%, #A0522D 50%, #8B4513 100%);
  color: #fff;
  border: none;
  border-radius: 30px;
  padding: 0.8rem 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.0625rem;
  box-shadow: 0 8px 25px rgba(111, 66, 193, 0.4), 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  font-size: 1.1rem;
  position: relative;
  overflow: hidden;
}

.btn.btn-red::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn.btn-red:hover {
  color: #fff;
  background: linear-gradient(135deg, #A0522D 0%, #CD853F 50%, #A0522D 100%);
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 12px 35px rgba(111, 66, 193, 0.6), 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn.btn-red:hover::before {
  left: 100%;
}

/* Медиа-запросы для кнопок */
@media (max-width: 768px) {
  .btn.btn-red {
    padding: 6px 18px;
    font-size: 12px;
  }
  .btn.btn-outline-red {
    padding: 6px 18px;
    font-size: 12px;
  }
}

@media (max-width: 576px) {
  .btn.btn-red {
    padding: 4px 12px;
    font-size: 10px;
  }
  .btn.btn-outline-red {
    padding: 4px 12px;
    font-size: 10px;

  }
}

@media (max-width: 480px) {
  .btn.btn-red {
    padding: 3px 10px;
    font-size: 9px;
  }
  .btn.btn-outline-red {
    padding: 3px 10px;
    font-size: 9px;
  }
}

@media (max-width: 360px) {
  .btn.btn-red {
    padding: 2px 8px;
    font-size: 8px;
  }
  .btn.btn-outline-red {
    padding: 2px 8px;
    font-size: 8px;
  }
}

@media (max-width: 320px) {
  .btn.btn-red {
    padding: 1px 6px;
    font-size: 7px;
  }
  .btn.btn-outline-red {
    padding: 1px 6px;
    font-size: 7px;
  }

  .btn.btn-red {
    padding: 15px 16px;
    font-size: 10px;
  }
  h1 {
    font-size: 1.2rem;
  }
  h2 {
    font-size: 1.0rem;
  }
  .lead {
    font-size: 0.75rem;
  }
}

/* Позиционирование кнопки .btn.btn-red для мобильных и планшетов */
@media (max-width: 1024px) {
  .btn.btn-red {
    float: right;
    margin-left: 20px;
  }
}

@media (max-width: 768px) {
  .btn.btn-red {
    margin-left: 15px;
  }
}