/* =========================================
   POPUP OVERLAY
========================================= */
#popupOverlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  z-index: -1200;
  transition: opacity 0.4s ease;
}

#popupOverlay.active {
  display: block;
  opacity: 1;
  z-index: 1200 !important;
}

/* =========================================
   POPUP BOX MAIN WRAPPER
========================================= */
#popupBox {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.9);

  width: 800px;
  max-width: 95%;
  background: transparent;
  border-radius: 16px;

  display: flex;
  overflow: hidden;

  opacity: 0;
  transition: all 0.45s ease;
  z-index: -1201;
}

#popupBox.active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  z-index: 1500 !important;
}

/* =========================================
   LEFT IMAGE SECTION
========================================= */
.popup-img {
  flex: 1;
  background: url('images/contact.png') center/cover no-repeat;
  position: relative;
  min-height: 350px;
}

.popup-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.25);
}

/* =========================================
   RIGHT FORM SECTION
========================================= */
.popup-form {
  flex: 1;
  padding: 40px 35px;
  display: flex;
  flex-direction: column;
  justify-content: center;

  background: #75757529;
  backdrop-filter: blur(12px);
  position: relative;
}

.popup-form h2 {
  margin-bottom: 16px;
  color: #fff;
  font-size: 26px;
  font-weight: 700;
}

.popup-form input,
.popup-form textarea {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 14px;

  border: 1px solid rgb(0, 103, 167);
  border-radius: 0;
  background: #00313d7d;
  color: white;
  font-size: 15px;
  outline: none;
  transition: 0.3s ease;
}

.popup-form input:focus,
.popup-form textarea:focus {
  border-color: rgb(0, 103, 167);
  box-shadow: 0 0 6px rgba(0,123,255,0.3);
}

.popup-form button {
  width: 100%;
  background: rgb(0,103,167);
  color: #fff;
  border: none;

  padding: 12px;
  border-radius: 0;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;

  transition: 0.3s ease;
  box-shadow: 0 5px 15px rgba(0,123,255,0.25);
}

.popup-form button:hover {
  transform: translateY(-2px);
}

/* =========================================
   CLOSE BUTTON
========================================= */
#closePopup {
  position: absolute;
  top: 12px;
  right: 16px;

  font-size: 26px;
  font-weight: bold;
  color: #fff;

  cursor: pointer;
  transition: 0.3s ease;

  background: rgb(0, 103, 167);
  border-radius: 50%;
  width: 34px;
  height: 34px;

  display: flex;
  align-items: center;
  justify-content: center;

  z-index: 5;
}

#closePopup:hover {
  transform: rotate(90deg);
}

/* =========================================
   TABLET RESPONSIVE (768–1024px)
========================================= */
@media(max-width: 1024px) {
  #popupBox {
    width: 90%;
    max-width: 700px;
  }

  .popup-form {
    padding: 32px 28px;
  }

  .popup-img {
    min-height: 300px;
  }
}

/* =========================================
   MOBILE RESPONSIVE (≤768px)
========================================= */
@media(max-width: 768px) {

  #popupBox {
    flex-direction: column;
    width: 92%;
    max-height: 92vh;
    overflow-y: auto;
  }

  .popup-img {
    height: 180px;
    flex: none;
  }

  .popup-form {
    padding: 25px 20px 30px;
  }

  .popup-form h2,
  .popup-form p {
    text-align: center;
  }

  #closePopup {
    top: 10px;
    right: 10px;
  }
}

/* =========================================
   SMALL MOBILE & TIGHT SCREENS (≤480px)
========================================= */
@media(max-width: 480px) {

  #popupBox {
    width: 94%;
    border-radius: 12px;
  }

  .popup-img {
    height: 150px;
  }

  .popup-form {
    padding: 20px 16px 25px;
  }

  .popup-form input,
  .popup-form textarea {
    font-size: 14px;
    padding: 11px;
  }

  .popup-form button {
    padding: 12px;
    font-size: 15px;
  }

  #closePopup {
    width: 30px;
    height: 30px;
    font-size: 22px;
  }
}
