.modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal-window {
  background-color: black; /* новый фон */
  color: #ffffff;
  font-family: inherit;
  padding: 20px;
  max-width: 90%;
  max-height: 90%;
  overflow-y: auto;
  position: relative;
  box-sizing: border-box;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  cursor: pointer;
  font-size: 1.5rem;
  background: transparent;
  border: none;
  color: #ffffff;
}

/* Обёртка контента */
.modal-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* Картинка */
.modal-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* Текст */
.modal-text {
  font-size: 1rem;
  line-height: 1.5;
  text-align: left;
}
.modal-text p {
    font-size: inherit;
    line-height: inherit;
    font-family: inherit;
}
/* Desktop layout */
@media (min-width: 768px) {
  .modal-content {
    flex-direction: row;
    align-items: flex-start;
  }

  .modal-image {
    max-width: 200px;
    flex-shrink: 0;
  }

  .modal-text {
    flex: 1;
    padding-left: 20px;
  }

  .modal-window {
    width: 600px;
  }
}
