/* Базовые настройки */
:root {
  --primary: #FF6B6B;
  --primary-hover: #a0d8f3;
  --text: #2D3047;
  --light: #FFF9F2;
  --dark: #2D3047;
  --header-height: 120px;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --font-main: 'Montserrat', sans-serif;
  --font-heading: 'Playfair Display', serif;
}

/* Сброс и базовые стили */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  color: var(--text);
  line-height: 1.6;
  background: var(--light);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
  margin-bottom: 1rem;
}

/* Конкретные размеры заголовков */
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }

.no-scroll {
  overflow: hidden;
}

/* Вспомогательные классы */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Шапка */
header {
  position: fixed;
  top: 0;
  width: 100%;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.header-container {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  height: 100%;
  padding: 0 20px;
}

/* Логотип с текстом */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1001;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.logo:hover {
  opacity: 0.9;
}

.logo img {
  height: auto;
  max-width: 110px;
  width: 100%;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  margin-left: 10px;
}

.logo-title {
  font-family: var(--font-main);
  font-size: 1.0rem;
  font-weight: 400;
  color: var(--text);
  white-space: nowrap;
  padding-left: 70px;
  letter-spacing: 0.3px;
}

.logo-subtitle {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text);
  opacity: 0.8;
  white-space: nowrap;
  margin-top: 2px;
  padding-left: 8px;
}

/* Бургер-меню */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  width: 30px;
  height: 24px;
  position: relative;
  cursor: pointer;
  z-index: 1001;
  padding: 0;
  margin-left: auto;
}

.menu-line {
  display: block;
  position: absolute;
  height: 3px;
  width: 100%;
  background: var(--text);
  border-radius: 3px;
  left: 0;
  transition: var(--transition);
}

.menu-line:nth-child(1) {
  top: 0;
}
.menu-line:nth-child(2) {
  top: 50%;
  transform: translateY(-50%);
}
.menu-line:nth-child(3) {
  bottom: 0;
}

.menu-toggle.active .menu-line:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}
.menu-toggle.active .menu-line:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active .menu-line:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}

/* Основная навигация */
.main-nav {
  margin-left: 50px;
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.main-nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.3rem;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  transition: var(--transition);
}

.main-nav a:hover {
  background: var(--primary-hover);
  color: var(--text);
  box-shadow: 0 4px 8px rgba(160, 216, 243, 0.3);
}

/* Hero-секция */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  margin-top: var(--header-height);
  background: 
    linear-gradient(rgba(45, 48, 71, 0.3), rgba(45, 48, 71, 0.7)),
    var(--dark) center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-content {
  text-align: center;
  padding: 0 20px;
  max-width: 800px;
}

/* Подвал */
footer {
  background: var(--dark);
  color: white;
  padding: 2rem 0;
}

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


/* Адаптация для мобильных */
@media (max-width: 1280px) {
  :root {
    --header-height: 70px;
  }
  
  .header-container {
    padding: 0 10px; /* Уменьшаем общий отступ в шапке */
  }
  
  .menu-toggle {
    display: block;
  }
  
  .main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 0;
  }
  
  .main-nav.active {
    transform: translateX(0);
  }
  
  .main-nav ul {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }
  
  .main-nav a {
    font-size: 1.2rem;
    padding: 0.8rem 1.5rem;
  }
  
  .logo {
    flex-direction: row;
    align-items: center;
    gap: 8px; /* Оптимальный отступ между лого и текстом */
    margin-right: auto;
    padding-left: 0; /* Лого вплотную к левому краю */
  }
  
  .logo-text {
    margin-left: 0;
    padding-left: 0;
    align-items: flex-start;
  }
  
  .logo-title {
    font-size: 0.7rem;
    padding-left: 0;
    white-space: nowrap;
    margin-left: 0; /* Убираем все отступы слева */
  }
  
  .logo-subtitle {
    font-size: 1.1rem;
    padding-left: 0;
    margin-top: 0;
    margin-left: 0; /* Убираем все отступы слева */
  }
  
  .logo img {
    max-width: 50px;
    margin-left: 0; /* Лого прижимаем к левому краю */
  }
  
  .hero {
    min-height: 500px;
    background-position: center 30%;
  }
}

@media (max-width: 480px) {
  .header-container {
    padding: 0 5px; /* Еще меньше отступ по бокам */
  }
  
  .logo {
    gap: 5px; /* Чуть меньше отступ между лого и текстом */
  }
  
  .logo-title {
    font-size: 0.6rem;
  }
  
  .logo-subtitle {
    font-size: 0.9rem;
  }
  
  .logo img {
    max-width: 40px;
  }
}


/* Оптимизация для медленных соединений */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}
