/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(220, 201, 201, 0.8);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Modal Container */
.modal-container {
  width: 100%;
  max-width: 500px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  transform: translateY(20px);
  transition: transform 0.3s ease;
  animation: fadeIn 0.3s ease forwards;
}

.modal-overlay.active .modal-container {
  transform: translateY(0);
}

/* Modal Header */
.modal-header {
  background: #b72110;
  color: white;
  padding: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  padding: 20px;
  color: white;
  font-size: 1.5rem;
  font-weight: 600;
}

.close-modal {
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  transition: transform 0.2s;
  padding-right: 1.5rem;
}

.close-modal:hover {
  transform: rotate(90deg);
}

/* Modal Body */
.modal-body {
  padding: 25px;
}

.form-group {
  position: relative;
  margin-bottom: 20px;
}

.form-group i {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #7f8c8d;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 90%;
  padding: 12px 15px 12px 45px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s;
  margin: 10px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #e74c3c;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2);
  outline: none;
}

.form-group textarea {
  min-height: 50px;
  resize: vertical;
}

/* Form Row */
.form-row {
  display: flex;
  gap: 15px;
}

.half-width {
  flex: 1;
}

select {
  appearance: none;
  background: white;
  height: 90px;
  width: 100%;
  border: 1px solid black;
}

/* Submit Button */
.submit-btn {
  background: #e74c3c;
  color: white;
  border: none;
  padding: 10px 25px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 90%;
  transition: all 0.3s;
  margin-left: 20px;
}

.submit-btn:hover {
  background: #c0392b;
  transform: translateY(-2px);
}

/* Modal Footer */
.modal-footer {
  padding: 10px 21px;
  background: #f9f9f9;
  text-align: center;
  border-top: 1px solid #eee;
}

.modal-footer p {
  margin: 0;
  color: #7f8c8d;
  font-size: 0.9rem;
}

.modal-footer a {
  color: #e74c3c;
  font-weight: 600;
  text-decoration: none;
}

/* Animation */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Get Quote Button */
.get-quote-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #e74c3c;
  color: white;
  border: none;
  border-radius: 50px;
  padding: 15px 25px;
  font-size: 1rem;
  font-weight: bold;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  z-index: 10000;
  cursor: pointer;
  display: block;
  transition: background 0.3s ease, transform 0.3s ease;
}

.get-quote-btn:hover {
  background-color: #c0392b;
  transform: translateY(-2px);
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .modal-container {
    width: 90%;
    margin: 0 auto;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    width: 100%;
    margin: 10px 0;
  }

  .submit-btn {
    width: 100%;
    margin: 10px 0;
  }

  .modal-header h3 {
    font-size: 1.2rem;
    padding: 10px;
  }

  .close-modal {
    padding-right: 1rem;
    font-size: 1.5rem;
  }

  /* Ensure the Get Quote button shows on mobile */
  .get-quote-btn {
    display: block;
  }
}
