body { 
  margin: 0;
  font-family: Bahnschrift, sans-serif;
  background: url(resources/pesok-volnami-melkiy-priroda2.png) no-repeat center center fixed;
  background-size: cover;
  color: white;
}

/* Навбар */
.navbar {
  position: sticky;
  top: 0px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 2rem;
  background: rgba(156, 130, 75, 0.95);
  box-shadow: 0 4px 6px rgba(0,0,0,0.25);
  z-index: 1000;
}

.logo img {
  height: 70px;
  transition: transform 0.3s ease;
}
.logo img:hover {
  transform: scale(1.3);
}

.menu a {
  margin-left: 2rem;
  font-weight: 600;
  font-size: 22px;
  text-decoration: none;
  color: white;
  line-height: 80px;
}
.menu a:hover {
  color: #222;
}

/* Анимация подчеркивания */
.hover-underline-animation {
  position: relative;
}
.hover-underline-animation::after {
  content: '';
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 2px;
  bottom: -3px;
  left: 0;
  background-color: #000;
  transform-origin: bottom right;
  transition: transform 0.25s ease-out;
}
.hover-underline-animation:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

/* Увеличим текст в меню */
.menu a {
  font-size: 42px;   /* было calc(3vw), поставим фиксированный размер */
  line-height: 80px; /* выровняем по высоте хедера */
}

.parts p {
  font-size: clamp(16px, 2.5vw, 28px); /* минимально 16px, растёт с шириной, но не больше 28px */
  line-height: 1.4;
}



/* Контент */
.projects {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.category {
  margin-bottom: 3rem;
}

.category h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid rgba(255,255,255,0.3);
  padding-bottom: 0.5rem;
}

/* Сетка проектов */
.grid {
  display: grid;
  gap: 1.5rem;
  justify-content: center;
  grid-template-columns: repeat(3, minmax(280px, 1fr)); /* максимум 3 */
}

@media (max-width: 992px) {
  .grid {
    grid-template-columns: repeat(2, minmax(280px, 1fr)); /* планшет */
  }
}

@media (max-width: 600px) {
  .grid {
    grid-template-columns: repeat(1, minmax(260px, 1fr)); /* мобилка */
  }
}

/* Карточка проекта */
.project {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 12px;
  aspect-ratio: 16 / 9; /* фиксированное соотношение 16:9 */
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  max-width: 350px; /* ограничение, чтобы не растягивалось */
}

.project img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 12px;
}

.project:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

.project.special {
  position: relative;
}

/* маленькая EN-версия */
.project.special .subproject {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 35%;       /* ширина относительно родительской карточки */
  aspect-ratio: 16/9;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  transition: transform 0.3s ease;
}

.project.special .subproject img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project.special .subproject:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.4);
}
