/* =================================
   Modal Overlay & Container
   ================================= */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(85, 63, 21, 0.7);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  padding: 20px;
  overflow-y: auto;
}

.modal-overlay.active {
  display: flex;
}

.modal-container {
  position: relative;
  width: 100%;
  max-width: 1145px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalFadeIn 0.3s ease-out;
}

/* =================================
   Desktop Layout
   ================================= */
.modal-desktop {
  display: flex;
}

.modal-mobile {
  display: none;
}

.modal-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  border: 0px !important;
 background: #ffffff;
}

.modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #c79d4d;
    z-index: 9;
    color: #c79d4d;
    opacity: 1;
}
.modal-content
 {
    background: #ffffff;
    padding-right: 15px;
}
.modal-close:hover {
  transform: scale(1.1);
}

/* Header */
.modal-header {
  text-align: center;
}

.modal-header h2 {
  font-size: 28px;
  color: #4f3312;
  margin-bottom: 8px;
}

.modal-header p {
  font-size: 20px;
  color: #846835;
}

/* =================================
   Form Styles
   ================================= */
.modal-form {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px;
}

.form-group {
  margin-bottom: 24px;
  position: relative;
}

.form-group input {
  width: 100%;
  padding: 16px 12px;
  border: none;
  border-bottom: 0.8px solid #dbc08c;
  font-family: "Poppins", sans-serif;
  font-size: 16px;
  color: #4f3312;
  background: transparent;
  outline: none;
  transition: border-color 0.3s ease;
}

.form-group input::placeholder {
  color: #907542;
}

.form-group input:focus {
  border-bottom-color: #c79d4d;
}

.phone-input {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 0.8px solid #dbc08c;
  padding: 16px 0px;
}

.phone-input input {
  border: none;
  flex: 1;
  padding: 0;
}

.phone-prefix {
  color: #907542;
  font-family: "Poppins", sans-serif;
  font-size: 16px;
}

.btn-submit {
  width: 100%;
  background: linear-gradient(180deg, #a17727 0%, #71541c 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.3s ease;
  margin-bottom: 16px;
}

.btn-submit:hover {
  background: linear-gradient(180deg, #8e6922 0%, #4f3312 100%);
}

.security-badge {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  color: #907542;
  font-family: "Poppins", sans-serif;
  font-size: 14px;
}

/* =================================
   Mobile Layout
   ================================= */
@media (max-width: 991px) {
  .modal-overlay {
    padding: 0;
    align-items: flex-start;
  }

  .modal-container {
    max-width: 100%;
    max-height: 100vh;
    margin: 0 auto;
  }

  .modal-desktop {
    display: none;
  }

  .modal-mobile {
    display: flex;
    flex-direction: column;
  }

  .modal-image-mobile {
    width: 100%;
    height: 261px;
    position: relative;
    overflow: hidden;
  }

  .modal-image-mobile img {
    width: 100%;
    height: 123%;
    object-fit: cover;
    object-position: center;
    position: absolute;
    top: -19.64%;
  }

  .modal-close-mobile {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease;
  }

  .modal-close-mobile:hover {
    transform: scale(1.1);
  }

  .modal-content-mobile {
    background: #ebdcc0;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .modal-header-mobile {
    text-align: center;
    margin-bottom: 24px;
  }

  .modal-logo-mobile {
    width: 122px;
    height: 80px;
    margin-bottom: 8px;
  }

  .modal-header-mobile h2 {
    font-family: "DM Serif Display", serif;
    font-size: 22px;
    color: #bd8c2e;
    margin-bottom: 8px;
  }

  .modal-header-mobile p {
    font-family: "Poppins", sans-serif;
    font-size: 16px;
    color: #4f3312;
  }

  .modal-form-mobile {
    background: #ffffff;
    border-radius: 16px;
    padding: 16px 8px;
  }

  .form-group-mobile {
    margin-bottom: 16px;
  }

  .form-group-mobile input {
    width: 100%;
    padding: 16px 12px;
    border: none;
    border-bottom: 0.8px solid #dbc08c;
    font-family: "Poppins", sans-serif;
    font-size: 14px;
    color: #4f3312;
    background: transparent;
    outline: none;
    transition: border-color 0.3s ease;
  }

  .form-group-mobile input::placeholder {
    color: #907542;
  }

  .form-group-mobile input:focus {
    border-bottom-color: #c79d4d;
  }

  .phone-input-mobile {
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 0.8px solid #dbc08c;
    padding: 16px 12px;
  }

  .phone-input-mobile input {
    border: none;
    flex: 1;
    padding: 0;
  }

  .phone-prefix-mobile {
    color: #907542;
    font-family: "Poppins", sans-serif;
    font-size: 14px;
  }

  .btn-submit-mobile {
    width: 100%;
    background: linear-gradient(180deg, #a17727 0%, #71541c 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-family: "Poppins", sans-serif;
    font-weight: 500;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-bottom: 16px;
  }

  .btn-submit-mobile:hover {
    background: linear-gradient(180deg, #8e6922 0%, #4f3312 100%);
  }

  .security-badge-mobile {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    color: #907542;
    font-family: "Poppins", sans-serif;
    font-size: 12px;
  }
  .modal-header h2 {
    font-size: 24px;
}
}

/* =================================
   Animation
   ================================= */
@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Prevent Body Scroll */
body.modal-open {
  overflow: hidden;
}
