
:root {
  --main-color: #007bff;
  --accent: #007bff;
  --dark: #0b0f1a;
  --hover: #003f88;
}

* { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--dark);
  margin: 0;
  padding: 0;
}

.main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255,255,255,0.97);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  z-index: 9999;
}

.main-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
}

.logo {
  font-weight: 700;
  color: var(--dark);
  text-decoration: none;
}

/* --- Навигация --- */
.main-nav ul {
  list-style: none;
  display: flex;
  gap: 18px;
  margin: 0;
  padding: 0;
  align-items: center;
}

.main-nav a {
  text-decoration: none;
  color: #333;
  padding: 6px 8px;
  border-radius: 6px;
  transition: color .2s, background .2s;
}

.main-nav a:hover,
.main-nav a.active {
  color: #fff;
  background: var(--main-color);
}

.lang-switch a {
  margin-left: 6px;
  text-decoration: none;
  color: #333;
}

/* --- Мобильная версия --- */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  color: var(--main-color);
  transition: transform .3s ease;
}

.menu-toggle.open {
  transform: rotate(90deg);
}

@media (max-width: 900px) {
  .main-header .container {
    flex-wrap: wrap;
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    width: 100%;
    overflow: hidden;
    max-height: 0;
    display: flex;
    flex-direction: column;
    text-align: center;
    background: white;
    border-top: 1px solid #eee;
    margin-top: 10px;
    padding: 0;
    transition: max-height 0.4s ease, padding 0.3s ease;
  }

  .main-nav.active {
    max-height: 400px; /* высота под меню */
    padding: 10px 0;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 12px;
  }

  .lang-switch {
    margin-top: 8px;
    width: 100%;
    text-align: center;
  }
}

/* --- Затемнение фона при открытом мобильном меню --- */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 9998; /* ниже меню, выше контента */
}

.menu-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.hero{ min-height:58vh; background-image: linear-gradient(120deg, rgba(0,0,0,0.35), rgba(0,0,0,0.15)), url('../images/hero.jpg'); background-size:cover; background-position:center; display:flex; align-items:center; padding:6rem 0; }
h2{ color:var(--accent); margin-top:0; }
.container{ max-width:1100px; margin:0 auto; padding:0 16px; }

.slider {
  position: relative;
  max-width: 900px;
  width: 100%;
  margin: 24px auto;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.slides {
  display: flex;
  transition: transform 0.6s ease-in-out;
  will-change: transform;
}

.slide {
  flex: 0 0 100%;
  position: relative;
}

.slide img {
  display: block;
  width: 100%;
  height: auto; /* <=== важно! */
  max-width: 100%;
  border-radius: 12px;
  object-fit: contain; /* <=== заменяем cover */
}

/* --- адаптивность --- */
@media (max-width: 768px) {
  .slider {
    max-width: 100%;
    border-radius: 0;
    box-shadow: none;
  }
  .slide img {
    object-fit: contain;
    max-height: 70vh; /* чтобы фото не занимало весь экран */
  }
}

.prev, .next{ position:absolute; top:50%; transform:translateY(-50%); background:rgba(0,0,0,0.45); color:#fff; border:none; padding:10px 12px; cursor:pointer; border-radius:50%; }
.prev{ left:12px; } .next{ right:12px; }

.dots{ text-align:center; padding:12px 0; }
.dots button{ width:10px; height:10px; border-radius:50%; border:none; margin:0 6px; background:#bbb; cursor:pointer; display:inline-block; }
.dots button.active{ background:#333; }

@media (max-width:768px){
  .slide img{ height:240px; }
  .main-nav ul{ gap:10px; }
  .hero{ padding:3rem 0; }
}
