.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.6);
  overflow: auto;
}

.modal-content {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #fff;
  padding: 30px;
  width: 90%;
  max-width: 500px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  animation: modalFadeIn 0.3s ease-out;
}


/* Close button */
.close {
  position: absolute;
  right: 15px;
  top: 15px;
  width: 24px;
  height: 24px;
  opacity: 0.5;
  cursor: pointer;
  transition: opacity 0.2s;
}

.close:hover {
  opacity: 1;
}

.close:before,
.close:after {
  content: '';
  position: absolute;
  left: 11px;
  height: 24px;
  width: 2px;
  background-color: #333;
}

.close:before {
  transform: rotate(45deg);
}

.close:after {
  transform: rotate(-45deg);
}

/* Animation */
@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile optimization */
@media screen and (max-width: 576px) {
  .modal {
    padding: 10px;
  }
  
  .modal-content {
    margin: 10px auto;
    padding: 20px;
  }
}

/* Form inside modal */
.modal-content .webform-submission-form {
  margin: 0;
}

.modal-content .form-item {
  margin-bottom: 20px;
}

.modal-content .form-text,
.modal-content .form-tel,
.modal-content .form-email {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  transition: border-color 0.2s;
}

.modal-content .form-text:focus,
.modal-content .form-tel:focus,
.modal-content .form-email:focus {
  border-color: #0071b8;
  outline: none;
}

.modal-content .form-submit {
  width: 100%;
  padding: 12px;
  background-color: #0071b8;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.modal-content .form-submit:hover {
  background-color: #005b95;
}

#callback-modal {
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
}

#callback-modal .modal-content {
  background-color: #0d0d0e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  border-radius: 16px;
  animation: callbackModalAppear 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

#callback-modal .close:before,
#callback-modal .close:after {
  background-color: #fff;
}

#callback-modal h2,
#callback-modal h3,
#callback-modal .webform-title,
#callback-modal .page-title {
  color: #fff;
}

#callback-modal label {
  color: rgba(255, 255, 255, 0.7);    
  line-height: 2rem;
}

#callback-modal .form-text,
#callback-modal .form-tel,
#callback-modal .form-email,
#callback-modal textarea {
  border-radius: 0;
}

#callback-modal .form-submit {
  background-color: #fff;
  color: #000;
  border-radius: 30px;
}

#callback-modal .form-submit:hover {
  background-color: #e5e5e5;
}

#callback-modal input, #callback-modal select, textarea {
  width: 100%;
  display: block;
  box-sizing: border-box;
}

 #callback-modal select {
  padding: 8px;
 }

@keyframes callbackModalAppear {
  0% { opacity: 0; transform: translate(-50%, -46%) scale(0.95); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes callbackModalAppearMobile {
  0% { opacity: 0; transform: translateY(30px); }
  100% { opacity: 1; transform: translateY(0); }
}

@media screen and (max-width: 576px) {
  #callback-modal {
    background-color: #0d0d0e;
  }

  #callback-modal .modal-content {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%; height: 100%; max-width: 100%;
    border-radius: 0; border: none;
    padding: 80px 24px 40px;
    transform: none;
    overflow-y: auto;
    animation: callbackModalAppearMobile 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }
}