body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f4f4f4;
}

.section {
  padding: 30px 0;
}

.container {
  margin: 0px auto;
  padding-right: 20px;
  padding-left: 20px;
  max-width: 100%;
}

@media screen and (min-width: 375px) {
  .container {
    max-width: 335px;
  }
}

@media screen and (min-width: 768px) {
  .container {
    max-width: 728px;
  }
}

@media screen and (min-width: 1440px) {
  .container {
    max-width: 1440px;
  }
}

.form-container {
  margin: auto;
  max-width: 600px;
  background-image: linear-gradient(
      rgba(0, 0, 255, 0.3),
      rgba(255, 255, 0, 0.3)
    ),
    linear-gradient(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.4)),
    url("../images/logo_privat.png");
  background-position: 0%;
  background-repeat: no-repeat;
  background-size: 100%;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.blog-form {
  display: flex;
  flex-direction: column;
}

label {
  margin-bottom: 8px;
}

input,
textarea {
  padding: 10px;
  margin-bottom: 16px;
  border: 1px solid #080808;
  backdrop-filter: blur(1px);
  border-radius: 4px;
  background-color: transparent;
}

textarea {
  resize: vertical;
  height: 100px;
}

button {
  display: block;
  padding: 10px;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.form-button {
  padding: 10px;
  background-color: #4caf50;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.form-button:hover {
  background-color: #45a049;
}

/* Пости */

.post-list {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  list-style: none;
}

.post-item {
  background-image: linear-gradient(
      rgba(0, 0, 255, 0.3),
      rgba(255, 255, 0, 0.3)
    ),
    linear-gradient(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.4));
  width: calc((100% - 2 * 30px));
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 16px;
  box-sizing: border-box;
  margin-bottom: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

@media screen and (min-width: 768px) {
  .post-item {
    width: calc((100% - 2 * 30px) / 2);
  }
}

@media screen and (min-width: 1200px) {
  .post-item {
    width: calc((100% - 2 * 30px) / 3);
  }
}

.post-title {
  font-weight: 700;
  font-size: 20px;
  line-height: 1.2;
}

.post-text {
  font-weight: 500;
  font-size: 15px;
  line-height: 1.15;
}

.button-wrapper {
  display: flex;
  justify-content: space-between;
}

.delete-button {
  background-color: rgb(245, 5, 5);
  transition: background-color 0.3s ease;
}

.delete-button:hover {
  background-color: rgb(200, 0, 0);
}

.open-button {
  background-color: blue;
  transition: background-color 0.3s ease;
}

.open-button:hover {
  background-color: rgb(0, 0, 200);
}
.edit-button {
  background-color: gray;
  transition: background-color 0.3s ease;
}

.edit-button:hover {
  background-color: rgb(100, 100, 100);
}

/* Модалка для оновлення */

.backdrop {
  z-index: 2;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(46, 47, 66, 0.4);
  transition: visibility 0.3s ease, opacity 0.3s ease;
}

.update-modal {
  position: absolute;
  top: 50%;
  left: 50%;
  padding: 72px 24px 24px 24px;
  border: 1px solid rgb(204, 204, 204);
  background: rgb(255, 255, 255);
  overflow: auto;
  border-radius: 4px;
  outline: none;
  transform: translate(-50%, -50%);
}

.modal-close-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  width: 24px;
  height: 24px;
  background: var(--cornflower-color);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s ease, fill 0.3s ease;
}

.update-form {
  display: flex;
  flex-direction: column;
}

/* Card modal */

.card-modal {
  position: absolute;
  top: 50%;
  left: 50%;
  padding: 40px 24px 24px 24px;
  border: 1px solid rgb(204, 204, 204);
  background: rgb(255, 255, 255);
  overflow: auto;
  border-radius: 4px;
  outline: none;
  transform: translate(-50%, -50%);
}
