/* iOS стиль - Темная тема с прозрачностями */
:root {
  --primary-color: #007aff;
  --secondary-color: #5856d6;
  --background-color: rgba(0, 0, 0, 0.85);
  --text-primary: #ffffff;
  --text-secondary: #e5e5ea;
  --border-color: rgba(255, 255, 255, 0.2);
  --overlay-color: rgba(0, 0, 0, 0.7);
  --success-color: #34c759;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #000000;
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
}

/* Заставка с фото */
.splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-size: cover;
  background-position: center;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: fadeOut 0.5s ease-out 3s forwards;
}

.splash-screen::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
}

.splash-content {
  text-align: center;
  animation: scaleUp 1s ease-out;
  z-index: 2;
  position: relative;
}

.logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 30px;
}

.logo i {
  font-size: 64px;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.logo span {
  font-size: 42px;
  font-weight: 700;
  letter-spacing: 2px;
}

.splash-content h1 {
  font-size: 56px;
  font-weight: 300;
  margin-bottom: 20px;
  letter-spacing: 3px;
}

.line {
  width: 100px;
  height: 2px;
  background: var(--primary-color);
  margin: 20px auto;
}

/* Header */
.ios-header {
  background-color: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(20px);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-header i {
  font-size: 24px;
  color: var(--primary-color);
}

.logo-header h1 {
  font-size: 20px;
  font-weight: 600;
}

.ios-nav {
  display: flex;
  gap: 30px;
  align-items: center;
}

.ios-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 15px;
}

.ios-nav a:hover,
.ios-nav a.active {
  color: var(--primary-color);
  background: rgba(0, 122, 255, 0.1);
}

/* Кнопки iOS стиль */
.ios-button {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ios-button:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.ios-button.primary {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
}

/* Главный слайдер */
.main-slider {
  position: relative;
  width: 100%;
  height: 100vh;
  margin-top: 70px;
}

.slideshow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 2s ease-in-out;
}

.slide.active {
  opacity: 1;
}

.slide::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
}

/* Стили для главного контента под слайдером */
.main-content {
  padding: 30px 15px 20px;
  text-align: center;
}

.main-message {
  max-width: 800px;
  margin: 0 auto;
}

.main-title {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--text-primary);
  letter-spacing: 1px;
  line-height: 1.3;
}

.main-subtitle {
  font-size: 20px;
  color: var(--text-secondary);
  margin-bottom: 25px;
}

.action-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Footer */
.ios-footer {
  background: rgba(0, 0, 0, 0.95);
  border-top: 1px solid var(--border-color);
  padding: 30px 20px;
  margin-top: 10px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.footer-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
}

.footer-logo i {
  font-size: 24px;
  color: var(--primary-color);
}

.footer-logo span {
  font-size: 24px;
  font-weight: 700;
}

.footer-info p {
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 10px;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s;
  font-size: 15px;
}

.footer-links a:hover {
  color: var(--primary-color);
}

.footer-links span {
  color: var(--text-secondary);
  opacity: 0.5;
}

/* Стили модальных окн */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

/* Само модальное окно */
.modal-content {
  background: rgba(0, 0, 0, 0.95);
  border-radius: 20px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  border: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.3s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
  opacity: 1;
}

/* Шапка модального окна - БЕЛЫЙ цвет как у кнопки */
.modal-header {
  padding: 25px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 1;
}

.modal-header h3 {
  color: #ffffff;
  font-size: 24px;
  font-weight: 600;
  margin: 0;
}

/* Кнопка закрытия */
.modal-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text-secondary);
  font-size: 20px;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
  transform: rotate(90deg);
}

/* Тело модального окна */
.modal-body {
  padding: 25px;
  overflow-y: auto;
  max-height: calc(80vh - 90px);
}

/* Стили для списка услуг */
.services-list-modal,
.finance-list-modal,
.contacts-list-modal {
  margin: 0;
  padding: 0;
}

/* Элементы списка */
.service-item-modal,
.finance-item-modal,
.contact-item-modal {
  display: flex;
  align-items: flex-start;
  gap: 25px;
  margin-bottom: 30px;
}

/* Иконки в модальных окнах - СВЕТЛО-СИНИЙ цвет */
.service-item-modal i,
.finance-icon-modal,
.contact-icon-modal {
  font-size: 32px;
  color: #007aff;
  min-width: 50px;
  text-align: center;
  padding-top: 5px;
}

/* Заголовки внутри модальных окон - БЕЛЫЕ */
.service-text-modal h4,
.finance-text-modal h4,
.contact-text-modal h4 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #ffffff;
}

/* Текст в модальных окнах */
.service-text-modal p,
.finance-text-modal p,
.contact-text-modal p {
  color: #e5e5ea;
  font-size: 16px;
  line-height: 1.7;
}

/* Ссылки в контактах - СВЕТЛО-СИНИЙ */
.contact-text-modal a {
  color: #007aff;
  text-decoration: none;
  font-size: 18px;
  font-weight: 500;
  display: block;
  margin-bottom: 5px;
  transition: opacity 0.3s;
}

.contact-text-modal a:hover {
  opacity: 0.8;
}

/* Разделители в модальных окнах */
.divider-modal {
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
  margin: 30px 0;
  width: 100%;
}

/* Заглушка для каталога */
.catalog-placeholder {
  text-align: center;
  padding: 40px 20px;
}

.catalog-placeholder i {
  font-size: 64px;
  color: #007aff;
  margin-bottom: 20px;
}

.catalog-placeholder h4 {
  font-size: 22px;
  margin-bottom: 12px;
  color: #ffffff;
  font-weight: 600;
}

.catalog-placeholder p {
  color: #e5e5ea;
  font-size: 16px;
  line-height: 1.6;
  max-width: 400px;
  margin: 0 auto;
}

/* Форма в модальном окне консультации */
.modal-description {
  text-align: center;
  color: #e5e5ea;
  margin-bottom: 30px;
  font-size: 16px;
  line-height: 1.6;
}

/* Стили формы */
.form-group {
  margin-bottom: 25px;
}

#consultationForm input,
#consultationForm textarea {
  width: 100%;
  padding: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  color: #ffffff;
  font-size: 16px;
  font-family: inherit;
  transition: all 0.3s;
}

#consultationForm input:focus,
#consultationForm textarea:focus {
  outline: none;
  border-color: #007aff;
  background: rgba(0, 122, 255, 0.05);
}

#consultationForm input::placeholder,
#consultationForm textarea::placeholder {
  color: rgba(229, 229, 234, 0.6);
}

.form-footer {
  text-align: center;
}

.form-note {
  color: #e5e5ea;
  font-size: 14px;
  margin-top: 20px;
  opacity: 0.8;
}

/* Кнопка отправки в модальном окне - СВЕТЛО-СИНИЙ градиент */
#consultationForm .ios-button.primary {
  width: 100%;
  padding: 18px;
  font-size: 18px;
  font-weight: 600;
  background: linear-gradient(135deg, #007aff, #5856d6);
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

#consultationForm .ios-button.primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Прокрутка в модальном окне */
.modal-body::-webkit-scrollbar {
  width: 8px;
}

.modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.modal-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ====================== */
/* ОБНОВЛЕННЫЕ СТИЛИ ДЛЯ ВСЕХ МОДАЛЬНЫХ ОКОН */
/* ====================== */

#modalServices .modal-header h3,
#modalCatalog .modal-header h3,
#modalFinance .modal-header h3,
#modalContacts .modal-header h3,
#modalConsultation .modal-header h3 {
  color: #ffffff;
}

#modalServices .service-item-modal i,
#modalCatalog .catalog-placeholder i,
#modalFinance .finance-item-modal i,
#modalContacts .contact-item-modal i {
  color: #007aff;
}

#modalServices .service-text-modal h4,
#modalFinance .finance-text-modal h4,
#modalContacts .contact-text-modal h4 {
  color: #ffffff;
}

#modalContacts .contact-text-modal a {
  color: #007aff;
}

/* Анимации */
@keyframes fadeOut {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes scaleUp {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes modalSlideIn {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-content {
  animation: modalSlideIn 0.3s ease;
}

/* ====================== */
/* СТИЛИ ДЛЯ ТЕКСТА ПОВЕРХ СЛАЙДОВ */
/* ====================== */

.slide-text-overlay {
  position: absolute;
  top: 10%;
  right: 3%;
  width: 45%;
  height: auto;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding-right: 0;
  z-index: 2;
}

.slide-content {
  text-align: right;
  max-width: 450px;
  margin-top: 20px;
}

.slide-title {
  font-size: 36px;
  font-weight: 700;
  color: white;
  margin-bottom: 10px;
  line-height: 1.2;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  white-space: nowrap;
}

.title-line {
  display: block;
  text-align: right;
  white-space: nowrap;
  width: 100%;
}

.title-line:first-child {
  margin-bottom: 0;
}

.slide-subtitle {
  font-size: 20px;
  color: white;
  margin-bottom: 20px;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.8);
  opacity: 0.9;
  margin-top: 5px;
}

.slide-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-end;
  margin-top: 10px;
}

.slide-buttons .ios-button {
  min-width: 180px;
  justify-content: center;
}

.slide::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1;
}

/* ====================== */
/* МОБИЛЬНАЯ ВЕРСИЯ */
/* ====================== */

body.mobile-device {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
  touch-action: manipulation;
}

/* Меню-гамбургер - скрываем на десктопе */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 24px;
  cursor: pointer;
  padding: 5px;
}

/* Адаптивность для текста на слайдах */
@media (max-width: 1024px) {
  .slide-text-overlay {
    width: 50%;
    right: 4%;
    top: 8%;
  }

  .slide-title,
  .title-line {
    font-size: 32px;
    line-height: 1.1;
  }

  .slide-subtitle {
    font-size: 18px;
  }
}

/* ОСНОВНЫЕ МОБИЛЬНЫЕ СТИЛИ */

@media (max-width: 768px) {
  /* Главный слайдер на мобильных */
  .main-slider {
    height: calc(100vh - 60px);
    margin-top: 60px;
    position: relative;
  }

  /* Контейнер для текста на слайдах */
  .slide-text-overlay {
    position: absolute !important;
    top: 80% !important; /* БЫЛО 50% - СТАЛО 70% */
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 90% !important;
    max-width: 500px !important;
    right: auto !important;
    text-align: center !important;
    padding: 0 !important;
    margin: 0 !important;
    z-index: 2 !important;
  }

  .slide-content {
    text-align: center !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 20px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    border-radius: 0 !important;
  }

  .slide-title {
    font-size: 24px;
    font-weight: 700;
    color: white;
    margin-bottom: 10px;
    line-height: 1.3;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto;
    width: 100%;
  }

  .title-line-1,
  .title-line-2,
  .title-line {
    display: block;
    font-size: 24px;
    line-height: 1.3;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    text-align: center !important;
    margin-bottom: 5px;
    width: 100%;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
    hyphens: auto;
  }

  .slide-subtitle {
    font-size: 16px;
    color: white;
    margin: 15px 0 20px;
    line-height: 1.4;
    white-space: normal;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    opacity: 0.95;
  }

  .slide-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    width: 100%;
  }

  .slide-buttons .ios-button {
    width: 100%;
    max-width: 280px;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    background: rgba(0, 122, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
  }

  .slide::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.2),
      rgba(0, 0, 0, 0.4),
      rgba(0, 0, 0, 0.6)
    );
    z-index: 1;
  }

  /* Хедер на мобильных */
  .ios-header {
    height: 60px;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .header-content {
    padding: 10px 15px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  /* ЛЕВАЯ ЧАСТЬ С ГАМБУРГЕРОМ И ЛОГО */
  .header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
  }

  /* Кнопка МЕНЮ - БЕЛАЯ БЕЗ РАМКИ */
  .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    padding: 10px 16px;
    min-width: 80px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-left: auto;
  }

  .menu-toggle.text-menu {
    padding: 12px 20px;
    font-size: 18px;
    letter-spacing: 1.5px;
  }

  .menu-toggle.text-menu span {
    font-weight: 700;
  }

  .logo-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
  }

  .logo-header h1 {
    font-size: 18px;
  }

  /* Скрываем десктопную навигацию на мобильных */
  .ios-nav:not(.mobile) {
    display: none !important;
  }

  /* Заставка на мобильных */
  .splash-screen {
    background-position: center;
    background-size: cover;
  }

  .logo i {
    font-size: 48px;
  }

  .logo span {
    font-size: 28px;
    text-align: center;
    line-height: 1.2;
  }

  /* Модальные окна на мобильных */
  .modal-content {
    width: 95%;
    max-height: 85vh;
    margin: 10px;
    border-radius: 15px;
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
  }

  .modal-header {
    padding: 20px;
    position: sticky;
    top: 0;
    background: rgba(0, 0, 0, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  }

  .modal-header h3 {
    font-size: 20px;
    color: white;
  }

  .modal-body {
    padding: 20px;
    max-height: calc(85vh - 70px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Карточки услуг в модалках */
  .service-item-modal,
  .finance-item-modal,
  .contact-item-modal {
    flex-direction: column;
    text-align: center;
    gap: 15px;
    padding: 15px 0;
    align-items: center;
  }

  .service-item-modal i,
  .finance-icon-modal,
  .contact-icon-modal {
    font-size: 28px;
    margin: 0 auto;
    color: var(--primary-color);
  }

  .service-text-modal h4,
  .finance-text-modal h4,
  .contact-text-modal h4 {
    font-size: 18px;
    margin-bottom: 8px;
    color: white;
  }

  .service-text-modal p,
  .finance-text-modal p,
  .contact-text-modal p {
    font-size: 15px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.8);
  }

  /* Форма на мобильных */
  #consultationForm input,
  #consultationForm textarea {
    padding: 16px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: white;
    width: 100%;
  }

  #consultationForm input:focus,
  #consultationForm textarea:focus {
    border-color: var(--primary-color);
    background: rgba(0, 122, 255, 0.05);
    outline: none;
  }

  /* Футер на мобильных */
  .ios-footer {
    padding: 25px 15px;
    background: rgba(0, 0, 0, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .footer-logo {
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
  }

  .footer-info p {
    font-size: 14px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
  }

  .footer-links {
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
  }

  .footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
  }

  .footer-links a:hover {
    color: var(--primary-color);
  }

  .footer-links span {
    display: none;
  }

  /* Улучшение читаемости текста на мобильных */
  body {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  /* Убираем горизонтальную прокрутку */
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
  }
}

/* МОБИЛЬНОЕ МЕНЮ СПРАВА */

/* Мобильное меню - сайдбар справа (ТОЛЬКО НА МОБИЛЬНЫХ) */
.ios-nav.mobile {
  display: none; /* Скрываем по умолчанию */
  position: fixed;
  top: 0;
  right: -300px; /* Начальное положение за экраном справа */
  width: 280px;
  height: 100vh;
  background: rgba(0, 0, 0, 0.98);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  padding: 100px 25px 30px;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  flex-direction: column;
  gap: 12px;
  z-index: 2000;
  overflow-y: auto;
  transition: right 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: -5px 0 30px rgba(0, 0, 0, 0.5);
}

/* КОГДА МЕНЮ АКТИВНО - ПОКАЗЫВАЕМ ЕГО */
.ios-nav.mobile.active {
  display: flex !important; /* ОЧЕНЬ ВАЖНО: принудительно показываем */
  right: 0; /* Выдвигаем на экран */
}

/* Оверлей для мобильного меню */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 1999;
  display: none;
  animation: fadeIn 0.3s ease;
}

.menu-overlay.active {
  display: block;
}

/* Кнопка закрытия меню (крестик) */
.menu-close {
  position: absolute;
  top: 25px;
  right: 25px;
  width: 40px;
  height: 40px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  z-index: 2001;
}

.menu-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

/* Ссылки в мобильном меню - БЕЗ РАМОК */
.ios-nav.mobile a {
  padding: 16px 20px;
  font-size: 18px;
  border-radius: 12px;
  text-align: left;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  color: #ffffff;
  text-decoration: none;
  transition: all 0.3s ease;
  display: block;
  margin-bottom: 8px;
}

.ios-nav.mobile a:hover,
.ios-nav.mobile a.active {
  background: rgba(0, 122, 255, 0.15);
  color: #007aff;
  transform: translateX(-5px);
  border: none;
}

/* Особый стиль для "АГЕНТСТВО НЕДВИЖИМОСТИ" в мобильном меню */
.ios-nav.mobile .agency-item {
  margin-top: 0; /* УБИРАЕМ ОТСТУП СВЕРХУ */
  padding-top: 0; /* УБИРАЕМ ОТСТУП СВЕРХУ */
  border-top: none; /* УБИРАЕМ ЧЕРТОЧКУ */
  text-align: center; /* ВЫРАВНИВАНИЕ ПО ЦЕНТРУ */
}

.ios-nav.mobile .agency-link {
  background: rgba(255, 255, 255, 0.05); /* ТАКОЙ ЖЕ ФОН как у других ссылок */
  color: #ffffff !important; /* БЕЛЫЙ ТЕКСТ как у других */
  font-weight: 600; /* Обычная жирность */
  font-size: 18px; /* Такой же размер */
  text-align: center; /* ВЫРАВНИВАНИЕ ПО ЦЕНТРУ */
  letter-spacing: normal; /* Обычный межбуквенный интервал */
  border: none;
  margin-top: 0; /* Убираем отступ */
  display: block; /* Чтобы text-align работал */
  width: 100%; /* Занимает всю ширину */
}

.ios-nav.mobile .agency-link:hover {
  background: rgba(0, 122, 255, 0.15); /* ТАКОЙ ЖЕ hover как у других */
  color: #007aff !important; /* Синий при наведении */
  border: none;
}

/* ДОПОЛНИТЕЛЬНЫЕ АДАПТИВНЫЕ СТИЛИ */

@media (max-width: 480px) {
  .slide-title {
    font-size: 22px !important;
    line-height: 1.2 !important;
    letter-spacing: 0.5px !important;
  }

  .title-line-1,
  .title-line-2,
  .title-line {
    font-size: 22px !important;
    line-height: 1.2 !important;
    margin-bottom: 4px;
  }

  .slide-subtitle {
    font-size: 15px !important;
    margin: 12px 0 18px;
  }

  .slide-buttons .ios-button {
    padding: 12px 18px;
    font-size: 15px;
    max-width: 260px;
  }

  /* Мобильное меню на очень маленьких экранах */
  .ios-nav.mobile {
    width: 85%;
    padding: 90px 20px 25px;
  }

  .ios-nav.mobile a {
    font-size: 16px;
    padding: 14px 16px;
  }

  .menu-toggle {
    min-width: 70px;
    padding: 10px 14px;
    font-size: 16px;
  }

  /* Модальные окна на очень маленьких экранах */
  .modal-content {
    width: 100%;
    max-height: 90vh;
    margin: 0;
    border-radius: 0;
  }

  .modal-header {
    padding: 15px;
  }

  .modal-body {
    padding: 15px;
    max-height: calc(90vh - 60px);
  }

  .service-item-modal,
  .finance-item-modal,
  .contact-item-modal {
    padding: 12px 0;
  }

  .service-text-modal h4,
  .finance-text-modal h4,
  .contact-text-modal h4 {
    font-size: 16px;
  }

  .service-text-modal p,
  .finance-text-modal p,
  .contact-text-modal p {
    font-size: 14px;
  }
}

@media (max-width: 360px) {
  .slide-title,
  .title-line {
    font-size: 20px !important;
  }

  .title-line-1,
  .title-line-2,
  .title-line {
    font-size: 20px !important;
  }

  .slide-subtitle {
    font-size: 14px !important;
  }

  .slide-buttons .ios-button {
    padding: 10px 16px;
    font-size: 14px;
    max-width: 240px;
  }

  /* Мобильное меню на самых маленьких экранах */
  .ios-nav.mobile {
    width: 90%;
  }

  .ios-nav.mobile a {
    padding: 12px 14px;
    font-size: 15px;
  }

  .menu-toggle {
    padding: 8px 12px;
    font-size: 15px;
    min-width: 60px;
  }
}

/* ============== ЛАНДШАФТНАЯ ОРИЕНТАЦИЯ ============== */
@media (max-width: 768px) and (orientation: landscape) {
  .main-slider {
    height: calc(100vh - 60px);
  }

  .slide-text-overlay {
    top: 45%;
    width: 85%;
    max-width: 600px;
  }

  .slide-content {
    padding: 15px;
  }

  .slide-title {
    font-size: 20px !important;
  }

  .title-line-1,
  .title-line-2,
  .title-line {
    font-size: 20px !important;
  }

  .slide-subtitle {
    font-size: 14px !important;
  }

  .slide-buttons {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .slide-buttons .ios-button {
    flex: 1;
    min-width: 160px;
    max-width: 200px;
    padding: 10px 15px;
    font-size: 14px;
  }

  /* Мобильное меню в ландшафтной ориентации */
  .ios-nav.mobile {
    width: 60%;
    max-width: 350px;
  }
}

/* ============== ДЛЯ ОЧЕНЬ ВЫСОКИХ ЭКРАНОВ ============== */
@media (min-height: 800px) and (max-width: 768px) {
  .slide-text-overlay {
    top: 40%;
  }

  .slide-content {
    padding: 25px;
  }

  .slide-title {
    font-size: 26px !important;
  }

  .title-line-1,
  .title-line-2,
  .title-line {
    font-size: 26px !important;
  }

  .slide-subtitle {
    font-size: 17px !important;
  }

  /* Мобильное меню на высоких экранах */
  .ios-nav.mobile {
    padding-top: 120px;
  }
}

/* ============== PWA СПЕЦИФИЧНЫЕ СТИЛИ ============== */
@media (display-mode: standalone) {
  body {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }

  .ios-header {
    padding-top: max(15px, env(safe-area-inset-top));
    height: calc(70px + env(safe-area-inset-top));
  }

  .slide-text-overlay {
    padding-bottom: env(safe-area-inset-bottom);
  }

  .ios-footer {
    padding-bottom: max(25px, env(safe-area-inset-bottom));
  }

  /* Мобильное меню в PWA режиме */
  .ios-nav.mobile {
    padding-top: max(100px, env(safe-area-inset-top) + 80px);
    padding-bottom: max(30px, env(safe-area-inset-bottom) + 20px);
  }
}

/* ============== iOS SAFARI СПЕЦИФИЧНЫЕ ФИКСЫ ============== */
@supports (-webkit-touch-callout: none) {
  .main-slider {
    height: -webkit-fill-available;
  }

  input,
  select,
  textarea {
    font-size: 16px !important;
  }

  .modal-body {
    -webkit-overflow-scrolling: touch;
  }

  /* Мобильное меню для iOS */
  .ios-nav.mobile {
    height: -webkit-fill-available;
    max-height: 100vh;
    padding-top: max(120px, env(safe-area-inset-top) + 90px);
  }

  body {
    -webkit-tap-highlight-color: transparent;
  }
}

/* ============== ДОПОЛНИТЕЛЬНЫЕ УЛУЧШЕНИЯ ============== */

.slide-text-overlay,
.slide-content,
.slide-title,
.title-line-1,
.title-line-2,
.title-line {
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9) !important;
}

.slide-text-overlay * {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9) !important;
}

.slide-title,
.slide-subtitle {
  word-break: break-word;
  overflow-wrap: break-word;
}

/* Плавные анимации для мобильных */
@media (max-width: 768px) {
  .slide-text-overlay,
  .slide-content,
  .slide-title,
  .slide-subtitle,
  .slide-buttons {
    transition: all 0.3s ease;
  }

  .slide.active .slide-content {
    animation: fadeInUp 0.8s ease 0.3s both;
  }

  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* Анимация появления меню */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInRight {
  from {
    right: -300px;
    opacity: 0;
  }
  to {
    right: 0;
    opacity: 1;
  }
}

.ios-nav.mobile.active {
  animation: slideInRight 0.4s ease forwards;
}

/* СТИЛИ ДЛЯ МОДАЛЬНОГО ОКНА УСЛУГ НЕДВИЖИМОСТИ */

.real-estate-list-modal {
  margin: 0;
  padding: 0;
}

.real-estate-item-modal {
  display: flex;
  align-items: flex-start;
  gap: 25px;
  margin-bottom: 30px;
}

.real-estate-item-modal i {
  font-size: 32px;
  color: #007aff;
  min-width: 50px;
  text-align: center;
  padding-top: 5px;
}

.real-estate-text-modal h4 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #ffffff;
}

.real-estate-text-modal p {
  color: #e5e5ea;
  font-size: 16px;
  line-height: 1.7;
}

#modalRealEstate .modal-header h3 {
  color: #ffffff;
}

#modalRealEstate .modal-header i {
  color: #007aff;
}

@media (max-width: 768px) {
  .real-estate-item-modal {
    flex-direction: column;
    gap: 15px;
    text-align: center;
    align-items: center;
    padding: 15px 0;
  }

  .real-estate-item-modal i {
    margin: 0 auto;
    font-size: 28px;
  }

  .real-estate-text-modal h4 {
    font-size: 20px;
  }

  .real-estate-text-modal p {
    font-size: 15px;
    line-height: 1.5;
  }
}

@media (max-width: 480px) {
  .real-estate-text-modal h4 {
    font-size: 18px;
  }

  .real-estate-text-modal p {
    font-size: 14px;
  }
}

/* Стиль для второго логотипа */
.agency-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 30px;
  padding-left: 30px;
  border-left: 2px solid rgba(255, 255, 255, 0.3);
}

.agency-logo i {
  font-size: 24px;
  color: var(--primary-color);
}

.agency-title {
  font-size: 20px;
  font-weight: 600;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-decoration: none;
  transition: color 0.3s;
  white-space: nowrap;
}

.agency-title:hover {
  color: var(--primary-color);
}

@media (max-width: 1024px) {
  .agency-logo {
    margin-left: 20px;
    padding-left: 20px;
  }

  .agency-title {
    font-size: 18px;
  }
}

@media (max-width: 768px) {
  .agency-logo {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    justify-content: center;
    width: 100%;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
  }

  .agency-title {
    font-size: 20px;
    text-align: center;
  }
}

/* ============== iPhone X И НОВЕЕ ============== */
@supports (padding: max(0px)) {
  .ios-header,
  .modal-content,
  .ios-footer {
    padding-left: max(15px, env(safe-area-inset-left));
    padding-right: max(15px, env(safe-area-inset-right));
  }

  .slide-text-overlay {
    padding-left: max(5%, env(safe-area-inset-left));
    padding-right: max(5%, env(safe-area-inset-right));
  }

  /* Мобильное меню с учетом safe-area */
  .ios-nav.mobile {
    padding-left: max(25px, env(safe-area-inset-left) + 15px);
    padding-right: max(25px, env(safe-area-inset-right) + 15px);
  }
}

/* Прокрутка в мобильном меню */
.ios-nav.mobile::-webkit-scrollbar {
  width: 6px;
}

.ios-nav.mobile::-webkit-scrollbar-track {
  background: transparent;
}

.ios-nav.mobile::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.ios-nav.mobile::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ИСПРАВЛЕНИЕ ПОЗИЦИОНИРОВАНИЯ КНОПКИ МЕНЮ */

@media (max-width: 768px) {
  .header-left {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  .logo-header {
    order: 1;
  }

  .menu-toggle {
    order: 2;
    margin-left: auto;
  }
}
/* В мобильной версии (до 768px) */
@media (max-width: 767px) {
  .menu-toggle {
    display: flex !important;
  }

  .ios-nav:not(.mobile) {
    display: none !important;
  }
}

/* В планшетной/десктопной версии (768px и больше) */
@media (min-width: 768px) {
  .menu-toggle {
    display: none !important;
  }

  .ios-nav:not(.mobile) {
    display: flex !important;
  }

  .ios-nav.mobile,
  .menu-overlay {
    display: none !important;
  }
}

/* ИСПРАВЛЕНИЕ ХЕДЕРА ДЛЯ ВСЕХ УСТРОЙСТВ */

.ios-header {
  background-color: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(20px);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ЛЕВАЯ ЧАСТЬ С ЛОГО И КНОПКОЙ МЕНЮ */
.header-left {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.logo-header i {
  font-size: 24px;
  color: var(--primary-color);
}

.logo-header h1 {
  font-size: 20px;
  font-weight: 600;
  color: white;
}

/* КНОПКА МЕНЮ - ПО УМОЛЧАНИЮ СКРЫТА */
.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: white;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  padding: 12px 24px;
  min-width: 100px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  align-items: center;
  justify-content: center;
}

/* Важно: принудительно скрываем иконку гамбургера и показываем текст */
.menu-toggle.text-menu i.fa-bars {
  display: none !important;
}

.menu-toggle.text-menu span.menu-text {
  display: block !important;
  font-weight: 700;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.menu-toggle.text-menu {
  display: flex;
  padding: 12px 24px;
  font-size: 18px;
  letter-spacing: 1.5px;
  background: transparent;
  border: none;
}

/* НАВИГАЦИЯ - ПО УМОЛЧАНИЮ ПОКАЗАНА */
.ios-nav {
  display: flex;
  gap: 30px;
  align-items: center;
}

.ios-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 15px;
  white-space: nowrap; /* ← ДОБАВЛЕНО: запрет переноса текста */
}

.ios-nav a:hover,
.ios-nav a.active {
  color: var(--primary-color);
  background: rgba(0, 122, 255, 0.1);
}

/* МОБИЛЬНАЯ ВЕРСИЯ (ТЕЛЕФОНЫ И IPAD) */

@media (max-width: 1024px) {
  /* Уменьшаем правый отступ у контейнера для мобильных */
  .header-content {
    padding-right: 10px !important; /* ← УМЕНЬШАЕМ С 20px НА 10px */
  }

  /* Для iPad и планшетов */
  .menu-toggle {
    display: flex !important; /* Показываем кнопку меню */
  }

  .ios-nav:not(.mobile) {
    display: none !important; /* Скрываем десктопную навигацию */
  }

  /* Логотип слева, кнопка меню справа */
  .header-left {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }

  .logo-header {
    order: 1;
    flex: 1;
    text-align: left;
  }

  .menu-toggle {
    order: 2;
    margin-left: auto;
    margin-right: 0 !important; /* ← УБИРАЕМ ВЕСЬ ОТСТУП */
  }
}

/* ====================== */
/* ТОЛЬКО ДЛЯ IPAD MINI И AIR (768px - 1024px) */
/* ====================== */

@media (min-width: 768px) and (max-width: 1024px) {
  /* Увеличиваем размеры для лучшей читаемости на iPad */
  .menu-toggle.text-menu {
    padding: 15px 25px !important; /* ← УМЕНЬШАЕМ ПРАВЫЙ PADDING */
    font-size: 20px;
    min-width: 100px;
    margin-right: 0 !important; /* ← УБИРАЕМ ВЕСЬ ОТСТУП */
  }

  .logo-header h1 {
    font-size: 22px;
  }

  /* Мобильное меню делаем шире для iPad */
  .ios-nav.mobile {
    width: 350px;
    right: -350px;
  }

  .ios-nav.mobile.active {
    right: 0;
  }

  .ios-nav.mobile a {
    padding: 20px 25px;
    font-size: 20px;
    white-space: nowrap; /* ← ДОБАВЛЕНО: запрет переноса текста в мобильном меню */
  }
}

/* ====================== */
/* ТОЛЬКО ДЛЯ ТЕЛЕФОНОВ (< 768px) */
/* ====================== */

@media (max-width: 767px) {
  /* Еще меньше отступ для телефонов */
  .header-content {
    padding-right: 8px !important;
  }

  .menu-toggle.text-menu {
    padding: 10px 15px !important; /* ← УМЕНЬШАЕМ PADDING */
    font-size: 16px;
    min-width: 70px;
    margin-right: 0 !important; /* ← УБИРАЕМ ОТСТУП */
  }

  .logo-header h1 {
    font-size: 18px;
  }

  .ios-nav.mobile {
    width: 280px;
    right: -280px;
  }

  .ios-nav.mobile a {
    white-space: nowrap; /* ← ДОБАВЛЕНО: запрет переноса текста в мобильном меню */
  }
}

/* ====================== */
/* ДЕСКТОПНАЯ ВЕРСИЯ (> 1024px) */
/* ====================== */

@media (min-width: 1025px) {
  .menu-toggle {
    display: none !important; /* Скрываем кнопку меню */
  }

  .ios-nav {
    display: flex !important; /* Показываем десктопную навигацию */
  }
}
/* Убирает синюю рамку фокуса у элементов меню на мобильных */
@media (max-width: 768px) {
    button:focus,
    a:focus,
    [tabindex]:focus,
    .menu-button:focus,
    .menu-item:focus,
    .menu-link:focus,
    .navbar-toggler:focus {
        outline: none !important;
        box-shadow: none !important;
    }
}
