* {
  box-sizing: border-box;
}

/* 1. СТИЛИ ДЛЯ НАШЕГО НОВОГО ФОНОВОГО СЛОЯ */
.background-layer {
  /* Прибиваем его к краям окна браузера */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;

  /* Задаем высоту по самому большому размеру экрана, чтобы он не "прыгал" */
  height: 100vh;

  /* Наша картинка */
  background-image: url('https://raw.githubusercontent.com/letomaneteo/myweb/main/image/beckBlue5.avif');
  background-size: cover;
  background-position: center center;

  /* Отправляем его на самый задний план */
  z-index: -1;
}

/* 2. НАСТРАИВАЕМ HTML И BODY */
html {
  /* Задаем только фоновый ЦВЕТ, который будет виден, пока картинка грузится */
  background-color: #f0f0f0;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Exo 2', sans-serif;
  overflow-x: hidden;

  /* Тело страницы должно занимать как минимум всю высоту видимой области */
  min-height: 100dvh;

  /* Ваша flex-верстка для структуры страницы остается, она правильная */
  display: flex;
  flex-direction: column;
}

strong {
  font-weight: 700;
  /* или 900, если хочешь максимально жирно */
}

nav {
  text-align: left;
}

nav a {
  font-size: 20px;
}

/* Контейнер основного контента */
main {
  flex: 1 0 auto;
  padding: 0px 10px 10px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 15px;
  margin-top: 20px;
}

/* Стили для grid-item */
.grid-item {
  background-color: rgba(255, 255, 255, 0.85);
  border-radius: 10px;
  overflow: hidden;
  text-align: left;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: auto;
  grid-column: span 4;
}

.grid-item img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  margin: 0;
}

.grid-item .text-content {
  padding: 15px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.grid-item h3 {
  font-size: 15px;
  margin: 0 0 10px 0;
  color: #111;
}

.grid-item p {
  margin: 0;
  font-size: 14px;
  color: #444;
}

a.grid-item {
  text-decoration: none;
  color: inherit;
}

/* Мобильная адаптация */
@media (max-width: 768px) {
  .grid-container {
    grid-template-columns: 1fr;
  }

  .grid-item {
    grid-column: span 1;
    padding: 0;
  }

  .grid-item img {
    width: 100%;
    height: auto;
    /* важное: сохраняем пропорции */
    object-fit: unset;
    /* отключаем cover */
    max-height: none;
    /* убираем ограничение по высоте */
  }
    nav a {
      font-size: 15px;
    }
}


/* Стабильный футер */
footer {
  background-color: #313a47;
  color: white;
  padding: 10px;
  text-align: center;
  flex-shrink: 0;
}

footer a {
  color: #ffffff;
  /* Tailwind: text-blue-800 */
  text-decoration: underline;
  cursor: pointer;
  font-weight: bold;
}

footer a:hover {
  color: #0056b3;
  /* тёмно-синий при наведении */
}

footer p {
  margin-top: 4px;
  margin-bottom: 4px;
  /* или меньше */
}

.footer-links {
  display: flex;
  justify-content: center;
  /* центрируем по горизонтали */
  gap: 30px;
  /* большой промежуток между ссылками */
  flex-wrap: wrap;
  /* если много элементов, могут переноситься */
  padding-top: 4px;
  padding-bottom: 10px;
}

.footer-links a,
.footer-links .modal-button {
  font-weight: bold;
  color: #ffffff;
  text-decoration: underline;
  cursor: pointer;
  font-size: 1rem;
}

.footer-links a:hover,
.footer-links .modal-button:hover {
  color: #0056b3;
  text-decoration: none;
  /* линия пропадает при наведении */
}

/* Адаптив для мобильных: вертикальный список с отступами */
@media (max-width: 768px) {
  .footer-links {
    flex-direction: column;
    gap: 10px;
    /* меньше отступ между элементами */
    align-items: center;
    /* по центру */
  }
}
