/* ====== Общие стили ====== */
body {
  margin: 0;
  font-family: Montserrat, sans-serif;
  background: url('images/industrial-bg.jpg') no-repeat center/cover;
  min-height: 100vh;
  position: relative;
}

body::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 0;
}

/* ====== Шапка ====== */
.site-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 10px 5%;
  background: rgba(0,0,0,0.6);
  border-bottom: 2px solid #cc0000;
  box-sizing: border-box;
  gap: 10px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.logo img {
  max-width: 210px;
  width: 20vw;
  height: auto;
}

.logo span {
  font-size: clamp(1rem, 4vw, 1.5rem);
  font-weight: bold;
  color: #fff;
  white-space: normal;       /* разрешаем перенос */
  word-break: break-word;    /* переносим длинные слова */
}

/* ====== Контент ====== */
.overlay {
  position: relative;
  z-index: 1;
  padding: 40px 5%;
  text-align: center;
  color: #fff;
}

h1 {
  margin-bottom: 40px;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  color: #fff;
}

/* ====== Сетка карточек ====== */
.countries {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}

/* ====== Карточка страны ====== */
.country {
  flex: 1 1 calc(33.333% - 2rem);
  max-width: 400px;
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  background: rgba(255,0,0,0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,0,0,0.4);
  border-radius: 20px;
  text-decoration: none;
  color: #fff;

  transform: translateY(30px);
  opacity: 0;
  animation: fadeUp 0.8s ease forwards;
}

.country img {
  width: 80%;
  height: auto;
  max-height: 60%;
  object-fit: contain;
}

.country span {
  margin-top: 20px;
  font-weight: bold;
  font-size: clamp(1rem, 2vw, 1.5rem);
}

/* ====== Hover ====== */
.country:hover {
  transform: scale(1.05);
  background: rgba(255,0,0,0.25);
  border-color: #ff0000;
}

/* ====== Анимации ====== */
@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Поочерёдная задержка */
.country:nth-child(1) { animation-delay: 0.3s; }
.country:nth-child(2) { animation-delay: 0.6s; }
.country:nth-child(3) { animation-delay: 0.9s; }

/* ====== Адаптивность ====== */
@media (max-width: 1024px) {
  .country {
    flex: 1 1 calc(45% - 2rem);
  }
}

@media (max-width: 600px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }
  .logo {
    flex-direction: column;
    align-items: flex-start;
  }
  .logo img {
    width: 150px;
  }
  .logo span {
    font-size: clamp(1rem, 5vw, 1.2rem);
    text-align: left;
  }
  .country {
    flex: 1 1 100%;
    max-width: 90%;
  }
}
