/* popup */

.popup {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 11;
}

.popup_bg {
  position: absolute;
  inset: 0;
  background: rgba(34, 34, 34, 0.8);
  opacity: 0;
  transition: opacity 0.4s ease;
  backdrop-filter: blur(0px);
}

/* ❗ головний фікс тут */
.popup_body {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, calc(-50% + 30px)); /* замість scale */
  opacity: 0;

  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  padding: 75px 20px 12px 0;
  border-radius: 40px;
  width: calc(100% - 32px);
  max-width: 1084px;

  transition:
    opacity 0.25s ease,
    transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);

  display: flex;
  align-items: center;
  gap: 0;
}

.popup.first .popup_body {
  background-image: none !important;
}

.popup_close {
  display: block;
  position: absolute;
  right: 24px;
  top: 24px;
}

.popup_close::after,
.popup_close::before {
  background-color: var(--White);
}

.popup_close:hover::after,
.popup_close:hover::before {
  background-color: var(--Red);
}

.popup_content {
  width: 100%;
  padding: 74px 45px 74px 100px;
  background-color: var(--Dark-blue);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.popup_title {
  color: var(--White);
  font-size: 36px;
  font-weight: 600;
  line-height: 120%;
}

.popup_desc {
  color: var(--White);
  font-size: 22px;
  font-weight: 500;
}

/* ACTIVE STATE */

#popup:target {
  pointer-events: auto;
}

#popup:target .popup_bg {
  opacity: 1;
  backdrop-filter: blur(6px);
}

#popup:target .popup_body {
  opacity: 1;
  transform: translate(-50%, -50%);
}

/* popup */

@media (max-width: 1100px) {
  .popup_body {
    padding: 65px 7px 60px 8px;
    border-radius: 30px;
  }

  .popup_content {
    padding: 60px 16px;
  }
}

@media (max-width: 992px) {
  .popup_title {
    font-size: 22px;
  }

  .popup_desc {
    font-size: 18px;
  }
}
@media (max-width: 768px) {
  .popup_body {
    flex-direction: column;
    background-position: 94% top;
  }

  .popup_close {
    right: 20px;
    top: 20px;
  }

  .popup_content {
    padding: 60px 16px 75px 16px;
    border-radius: 20px 20px 0 0;
    position: relative;
    top: 15px;
  }

  .popup .block_form {
    max-width: 400px;
  }

  @media (max-height: 800px) {
    .popup_body {
      padding: 50px 7px 30px 8px;
      border-radius: 30px;
    }

    .popup_content {
      padding: 20px 16px 35px 16px;
    }
  }

  @media (max-height: 660px) {
    .popup_body {
      padding: 50px 7px 20px 8px;
      border-radius: 20px;
    }

    .popup_title {
      font-size: 18px;
    }

    .popup_desc {
      font-size: 16px;
    }
  }

  @media (max-height: 610px) {
    .popup_desc {
      display: none;
    }
  }

  @media (max-height: 550px) {
    .popup_content {
      display: none;
    }

    .popup .block_form_title {
      font-size: 15px;
    }

    .popup .block_form_messangers a {
      font-size: 9px;
    }

    .popup .main_btn {
      font-size: 12px;
    }
  }
}
