/* Общие стили */
body {
  font-family: 'DM Serif Display', serif;
  color: #f5f5f5;
  background: #2f2f2f;
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

/* Навигация */
header {
  background-color: #fff; /* белый фон для меню */
  padding: 30px 0;
  position: sticky;
  top: 0;
  z-index: 10;
  
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header.hidden {
  transform: translateY(-100%);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: 'Times New Roman', serif;
  font-weight: 500;
  font-size: 24px;
  color: #333;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin: 0;
}

/* Новые стили меню */
nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 40px;
}

nav ul li a {
  font-family: 'Times New Roman', serif;
  font-weight: 500;
  font-size: 14px;
  color: #333;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.3s ease;
}

nav ul li a:hover,
nav ul li a:focus {
  color: #555;
  outline: none;
}

/* Hero (Home) */
#home {
  position: relative;
  height: 100vh;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

#home .fullscreen-bg {
  position: absolute;
  top: 0; 
  left: 0; 
  right: 0; 
  bottom: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  width: 100%;
  height: 100%;
  z-index: 0;
}

#home .hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  text-align: center;
  padding: 0 20px;
}

.hero-content h2 {
  color: #fff;
  font-size: 70px;
  font-weight: 200;
  margin-bottom: 15px;
  text-shadow: 0 0 10px rgba(0,0,0,0.7);
  text-align: left;      /* ← выравниваем текст влево */
  width: 100%;           /* ← чтобы выравнивание сработало */
  padding-left: 400px;    /* ← немного отступа слева */
}

.hero-content p {
  color: #ddd;
  font-size: 24px;
  text-shadow: 0 0 8px rgba(0,0,0,0.6);
  margin: 0;
  text-align: left;      /* ← выравниваем текст влево */
  width: 100%;           /* ← чтобы выравнивание сработало */
  padding-left: 400px;    /* ← немного отступа слева */
}

/* Секции с разными оттенками серого */
.section {
  padding: 60px 20px 80px;
  max-width: 1100px;
  margin: 0 auto 60px;
  border-radius: 12px;
}

/* Оттенки для секций */
.section-bg1 { background-color: #2f2f2f; }
.section-bg2 { background-color: #393939; }
.section-bg3 { background-color: #444444; }
.section-bg4 { background-color: #505050; }
.section-bg5 { background-color: #5a5a5a; }

/* Заголовки */
h2 {
  font-size: 42px;
  margin-bottom: 30px;
  text-align: center;
  color: #e3e3e3;
}

/* Сетка карточек */
.cards-grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  
}

/* Карточки */
.card {
  background-color: #3a3a3a;
  padding: 25px 30px;
  border-radius: 10px;
  
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
  transition: background-color 0.3s ease;
}

.services {
  text-align: center;
}

.card:hover {
  background-color: #505050;
}

.card h3 {
  font-size: 28px;
  margin-bottom: 15px;
  color: #fff;
}

.card p, 
.card ul {
  font-size: 18px;
  color: #ccc;
  line-height: 1.5;
  margin: 0 0 15px 0;
}

.card ul li {
  margin-bottom: 8px;
}

/* Факты */
.fact {
  border-left: 4px solid #666;
  padding-left: 20px;
}

/* Абзац под фактами */
.about-text {
  max-width: 700px;
  margin: 30px auto 0 auto;
  font-size: 20px;
  color: #ddd;
  text-align: center;
  line-height: 1.5;
}

/* Проекты — галерея */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 40px;
  align-items: center;
}

.projects-grid figure {
  margin: 0;
  background-color: #3a3a3a;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.6);
  transition: transform 0.3s ease;
  cursor: pointer;
}

.projects-grid figure:hover {
  transform: scale(1.05);
}

.projects-grid img {
  width: 100%;
  display: block;
  height: auto;
}

.projects-grid figcaption {
  padding: 15px;
  font-size: 20px;
  color: #eee;
  text-align: center;
}

/* Ссылки */
a {
  color: #5ab9ea;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #88cfff;
}

/* Футер */
footer {
  background-color: #1a1a1a;
  padding: 15px 20px;
  text-align: center;
  color: #999;
  font-size: 14px;
}

/* Фоновые картинки между секциями */
.fullscreen-bg {
  height: 100vh;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  position: relative;
}

/* Затемнение для фоновых изображений */
.fullscreen-bg::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(0,0,0,0.5);
  z-index: 1;
}

/* Чтобы контент был поверх затемнения, в случае если понадобится */
.fullscreen-bg > * {
  position: relative;
  z-index: 2;
}

/* Анимация */
@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- Стили для компьютеров ---- */
/* Твои существующие стили остаются без изменений */

/* ---- Адаптация для планшетов и телефонов ---- */
@media (max-width: 768px) {
  /* Меню становится вертикальным */
  nav ul {
    flex-direction: column;
    gap: 15px;
    background: #fff;
    padding: 10px 0;
  }

  header {
  background-color: #fff; /* белый фон для меню */
  padding: 30px 0;
  position: sticky;
  top: 0;
  z-index: 10;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
  body:has(:is(main) ~ *) header {
    transform: translateY(-100%);
  }

  /* Hero-секция — текст меньше и чуть меньше отступ */
  .hero-content h2 {
    font-size: 28px;
    padding-left: 20px;
  }
  .hero-content p {
    font-size: 16px;
    padding-left: 20px;
  }

  /* Карточки — 1 колонка */
  .cards-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Галерея проектов — 1 колонка */
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Контакты и футер меньше */
  #contact p {
    font-size: 16px;
    text-align: center;
  }
  footer {
    font-size: 12px;
  }
}

  

