body {
  margin: 0;
  padding: 0;
  background-image: url('../assets/background_main_dark.png');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  background-attachment: fixed;
  min-height: 100%;
  min-width: 100%;
}

#is-service-frame {
  display: none;
}

/* Стили для шапки */
header {
  position: relative;
  background-color: black;
  color: white;
  height: 120px; /* Измените на нужную вам высоту */
  display: flex;
  align-items: center;
  transition: all 0.3s ease; /* Добавляем плавное изменение стилей */
  min-width: 41rem;
  z-index: 3;
}

.red-line-under-header {
  height: 5px; /* Высота линии */
  background-color: #f36366; /* Цвет линии */
  bottom: 0; /* Помещаем линию внизу шапки */
  left: 0; /* Начало линии слева */
  right: 0; /* Конец линии справа */
  min-width: 41rem;
  position: relative;
  z-index: 6;
}

.logo {
  margin-right: 10rem;
  margin-left: 8rem;
}

.logo img {
  max-height: 90px;
}

#header_contacts {
  margin-right: 10rem;
}
nav ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center; /* Чтобы выровнять кнопки по вертикали с логотипом */
  flex-wrap: wrap;
}

nav ul li {
  margin-right: 50px; /* Расстояние между кнопками */
  margin-bottom: 10px; /* Добавляем отступ снизу для кнопок */
}

nav ul li:last-child {
  margin-right: 10px; /* У последней кнопки нет правого отступа */
}

nav ul li a {
  text-decoration: none;
  color: white;
  font-weight: bold;
  font-size: 1.1rem;
  font-family: Arial, Helvetica, sans-serif;
}

/* Стили для ховера */
nav ul li a:hover {
  color: #f36366; /* Изменяем цвет текста на красный при ховере */
}

nav ul li a {
  white-space: nowrap;
}
/* Стили для красной линии */
.red-line {
  height: 5px; /* Высота линии */
  background-color: #d65e5d; /* Цвет линии */
  bottom: 0; /* Помещаем линию внизу шапки */
  left: 0; /* Начало линии слева */
  right: 0; /* Конец линии справа */
  min-width: 41rem;
}

.wrapper {
  background-image: url('../assets/background_main_dark.png');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  background-attachment: fixed;
  position: relative;
  min-width: 41rem;
}
.category {
  display: flex;
  flex-direction: column;
  min-width: 41rem;
  height: 100%;
}

.sidebar {
  border: 2px solid #000000;
  border-radius: 0 0 10px 10px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: center;
  background-color: #d65e5d;
  z-index: 1;
  overflow: hidden;
}

.sidebar h2 {
  font-size: 2rem;
  margin: 0 0 1rem 0;
}

.sidebar ul {
  display: flex;
  flex-wrap: wrap; /* Перенос элементов на следующую строку */
  flex-direction: row;
  justify-content: center;
  color: rgb(30, 30, 30);
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.sidebar ul li {
  display: flex;
  align-items: center;
  justify-items: center;
  border-right: #1a1a1a 1px solid;
  padding: 0 1rem;
}

.sidebar ul li:last-child {
  border-right: none;
  margin-right: 1rem;
}

.sidebar ul li:first-child {
  margin-left: 1rem;
}

.sidebar ul li a {
  text-decoration: none;
  color: rgb(30, 30, 30);
  font-weight: 700;
  font-size: 1.5rem;
}

.sidebar ul li a:hover {
  color: #f0f0f0; /* Изменяем цвет текста на красный при ховере */
  text-shadow: 2px 4px 4px rgba(0, 0, 0, 0.5);
}

.sidebar ul li p {
  text-overflow: ellipsis;
}

.container-products {
  margin: 2rem;
  background-color: rgba(0, 0, 0, 0.7);
  border: 2px solid #d65e5d;
  border-radius: 10px;
  padding: 10px;
  min-height: 75%;
  z-index: 1; /* Помещаем контент над фоном */
}

.container-products h1 {
  color: #d65e5d;
  text-align: center;
  margin-top: 0;
  width: 100%;
}

.products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));

  gap: 20px; /* Расстояние между карточками */
  justify-items: center;
  margin-bottom: 2rem;
  align-content: space-around;
}

.product-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid #d65e5d;
  border-radius: 5px;
  margin-bottom: 1rem;
  cursor: pointer;
  max-width: 22rem;
  height: 100%;
}

.product-card:hover {
  box-shadow: 0px 0px 10px rgba(255, 255, 255, 0.5);
}

.product-card img {
  width: 90%;
  margin: 0.5rem;
  border-radius: 5px;
  margin-bottom: 0.2rem;
}

.product-card h5 {
  color: #d65e5d;
  text-align: center;
  margin: 1rem 5px 0 5px;
  padding: 0;
  flex-grow: 1;
  text-transform: uppercase;
}

.product-card p {
  color: #d65e5d;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none; /* Скрыто по умолчанию */
  justify-content: center;
  align-items: flex-end;
  z-index: 3; /* Отображается поверх других элементов */
  margin: auto;
  overflow: auto; /* Добавить прокрутку, если нужно */
}
.modal-overlay {
  z-index: 2;
  background-color: rgba(0, 0, 0, 0.6); /* Черный с небольшой прозрачностью */
  position: fixed; /* Фиксированное позиционирование относительно вьюпорта */
  left: 0;
  top: 0;
  width: 100%; /* Ширина вьюпорта */
  height: 100%; /* Высота вьюпорта */
}

.modal-content {
  display: flex;
  flex-direction: row;
  height: 20rem;
  margin: auto; /* 15% от верха и по центру */
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  min-width: 25rem;
  min-height: 60%;
  opacity: 100%;
  z-index: 4;
  border: 2px solid #d65e5d;
  border-radius: 10px;
  background: #1a1a1a;
  position: relative;
}

.modal-content img {
  border: 2px solid #d65e5d;
  border-radius: 10px;
  margin-right: 1rem;
}

.textInfo {
  display: flex;
  flex-direction: column;
  color: #d65e5d;
}

.textInfo p,
h3 {
  color: #e4e4e4;
}
.close {
  position: absolute;
  top: 5px;
  right: 10px;
  color: #aaa;
  float: right;
  font-size: 38px;
  font-weight: bold;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

@media (max-width: 1400px) {
  nav ul li {
    margin-right: 3rem; /* Убираем правый отступ между кнопками */
  }

  .logo {
    margin-right: 3rem;
    margin-left: 3rem;
  }

  #header_contacts {
    margin-right: 3rem;
  }

  .modal-content {
    min-width: 40rem;
    min-height: 55%;
  }
}

@media (max-width: 1100px) {
  .product-card h5 {
    font-size: 11px;
  }
  .product-card img {
    max-width: 90%;
    border-radius: 5px;
    margin-bottom: 0.2rem;
  }

  .modal-content {
    min-width: 40rem;
  }

  .modal-content img {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 90%;
    height: 90%;
    border: 2px solid #d65e5d;
    border-radius: 10px;
    margin: auto;
    margin-right: 1rem;
  }
}

@media (max-width: 821px) {
  .logo {
    position: relative;
    margin-right: 2rem;
    margin-left: 2rem;
    z-index: 10;
  }

  #header_contacts {
    margin-right: 2rem;
  }

  nav ul {
    align-items: center; /* Выравниваем кнопки по центру */
  }

  nav ul li {
    margin: 10px 15px;
  }

  nav ul li:last-child {
    margin-left: 30px;
  }

  nav ul li a {
    text-decoration: none;
    font-weight: bold;
    font-size: 0.95rem;
  }

  .sidebar ul li a {
    font-weight: 600;
    font-size: 1.3rem;
  }

  .product-card {
    width: 10rem;
  }

  .products {
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
  }

  .product-card h5 {
    font-size: 10px;
  }
  .product-card img {
    max-width: 90%;

    margin-top: 1rem;
    border-radius: 5px;
    margin-bottom: 0.2rem;
  }

  .modal-content {
    flex-direction: column;
    min-width: 25rem;
    max-width: 30rem;
    min-height: 40rem;
  }

  .modal-content img {
    border: 2px solid #d65e5d;
    border-radius: 10px;
    margin: 0.5rem;
    height: 50%;
    max-width: 30rem;
  }
}

/*
@media (max-width: 430px) {
  nav ul {
    align-items: center; 
    min-width: 204px;
  }
  nav ul li {
    margin-right: 10px; // Убираем правый отступ между кнопками 
    margin-bottom: 0px; // Добавляем отступ снизу для кнопок 
  }

  nav ul li a {
    text-decoration: none;
    color: rgb(0, 0, 0);
    font-weight: 700;
    font-size: 0.6rem;
    font-family: Arial, Helvetica, sans-serif;
  }

  #header {
    left: 0.3rem;
    right: 0.3rem;
  }

  #header1 {
    width: 1.7rem;
  }

  #header2 {
    left: 7.8rem;
  }

  .logo {
    position: relative;
    margin-top: 2rem;
    margin-right: 50px;
    margin-left: 2rem;
    z-index: 10;
  }

  .logo img {
    max-width: 5.5rem; // Уменьшаем размер логотипа на узких экранах 
    min-width: 70px;
  }
}
*/
