/* Contact section styling */
.contact-section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.contact-subtitle {
  display: inline-block;
  background-color: rgba(74, 144, 226, 0.1);
  color: #4a90e2;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.contact-text3 {
  max-width: 600px;
  margin: 1rem auto 0;
  color: #666;
}

.contact-form-container {
  margin-top: 2rem;
  margin-bottom: 2rem;
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
  width: 500px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background-color: #f9f9f9;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--dl-color-theme-primary1);
  box-shadow: 0 0 0 3px rgba(101, 131, 82, 0.1);
  background-color: #ffffff;
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

.form-group label {
  font-weight: 500;
  color: #333;
  margin-bottom: 0.25rem;
}

.error {
  color: #e74c3c;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.alert {
  padding: 1rem;
  border-radius: 0.25rem;
  margin-bottom: 1rem;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Message styling */
.messages {
  max-width: 900px;
  margin: 0 auto 1rem auto;
}

.message {
  padding: 1rem 1.5rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  transition: opacity 0.5s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  position: relative;
  padding-right: 2.5rem;
}

.message.success {
  background-color: #d4edda;
  color: #155724;
  border-left: 4px solid #28a745;
}

.message.error {
  background-color: #f8d7da;
  color: #721c24;
  border-left: 4px solid #dc3545;
}

.message.info {
  background-color: #d1ecf1;
  color: #0c5460;
  border-left: 4px solid #17a2b8;
}

.message.warning {
  background-color: #fff3cd;
  color: #856404;
  border-left: 4px solid #ffc107;
}

/* Contact row styling */
.contact-row {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
}

.contact-content2 svg {
  color: #4a90e2;
  min-width: 2rem;
}

.contact-contact-info1 {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-text4 {
  margin-bottom: 0.5rem;
  color: #333;
}

.contact-text5 {
  color: #666;
  font-size: 0.95rem;
  line-height: 1.5;
}

.contact-email {
  color: #4a90e2;
  font-weight: 500;
  font-size: 1.1rem;
}

/* Button styling to match website theme */
.contact-form button[type="submit"] {
  gap: var(--dl-space-space-halfunit);
  fill: var(--dl-color-theme-secondary1);
  color: var(--dl-color-theme-secondary1);
  cursor: pointer;
  display: flex;
  transition: 0.3s;
  align-items: center;
  font-weight: bold;
  padding-top: var(--dl-space-space-halfunit);
  white-space: nowrap;
  border-color: var(--dl-color-theme-primary1);
  border-width: 1px;
  padding-left: var(--dl-space-space-oneandhalfunits);
  border-radius: var(--dl-radius-radius-buttonradius);
  padding-right: var(--dl-space-space-oneandhalfunits);
  padding-bottom: var(--dl-space-space-halfunit);
  justify-content: center;
  background-color: var(--dl-color-theme-primary1);
  margin: 1rem auto 0;
  min-width: 200px;
}

.contact-form button[type="submit"]:hover {
  fill: var(--dl-color-theme-secondary2);
  color: var(--dl-color-theme-secondary2);
  border-color: var(--dl-color-theme-primary2);
  background-color: var(--dl-color-theme-primary2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .contact-form-container {
    margin-left: 1rem;
    margin-right: 1rem;
  }
  
  .contact-form {
    padding: 1.5rem;
  }
  
  .form-group input,
  .form-group textarea {
    padding: 0.875rem;
  }
  
  .contact-form button[type="submit"] {
    width: 100%;
    padding: 0.875rem 1.5rem;
  }
  
  .contact-row {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }
}

/* Form focus effects */
.form-group.focused label {
  color: var(--dl-color-theme-primary1);
}

/* Loading spinner */
.spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
  margin-right: 0.5rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.contact-form button[type="submit"].loading {
  opacity: 0.8;
  cursor: not-allowed;
}

/* Message close button */
.message-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: transparent;
  border: none;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.message-close:hover {
  opacity: 1;
}

/* Form submitting state */
.contact-form.submitting {
  opacity: 0.8;
  pointer-events: none;
}
