/* 
 * contact.css
 * SOMEGO联系我们页面样式
 * 作者：SOMEGO Team
 * 最后更新：2024-03-20
 */

/* 联系我们头部 */
.contact-header {
  margin-top: 70px;
}

.contact-title {
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.contact-subtitle {
  font-size: 1.5rem;
  color: var(--text-secondary);
}

/* 联系信息卡片 */
.contact-info {
  padding: 60px 0;
}

.info-card {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  height: 100%;
  transition: transform 0.3s ease;
}

.info-card:hover {
  transform: translateY(-5px);
}

.info-icon {
  width: 80px;
  height: 80px;
  background: var(--background-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.info-icon img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.info-card h3 {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.info-card p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.info-link {
  color: var(--primary-color);
  font-size: 1.2rem;
  font-weight: 500;
  text-decoration: none;
  display: block;
}

a.info-link:hover {
  text-decoration: underline;
}

/* 留言表单 */
.contact-form {
  padding: 60px 0;
  background: var(--background-light);
}

.form-wrapper {
  background: white;
  padding: 3rem;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

.form-title {
  font-size: 2rem;
  color: var(--text-primary);
  margin-bottom: 2rem;
  text-align: center;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  font-weight: 500;
}

.form-control {
  border: 2px solid #eee;
  border-radius: 10px;
  padding: 0.8rem 1rem;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(255, 167, 38, 0.25);
}

/* 表单验证样式 */
.form-control.is-invalid {
  border-color: #dc3545;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-valid {
  border-color: #198754;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* 消息提示样式 */
.message-alert {
  margin-bottom: 1.5rem;
  border: none;
  border-radius: 10px;
  padding: 1rem 1.25rem;
}

.alert-success {
  background-color: #d1e7dd;
  color: #0f5132;
}

.alert-danger {
  background-color: #f8d7da;
  color: #842029;
}

.btn-close {
  padding: 1.25rem;
}

/* 表单提交按钮加载状态 */
.btn-primary:disabled {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  opacity: 0.65;
}

.spinner-border {
  margin-right: 0.5rem;
}

/* 必填项标记 */
.text-danger {
  color: #dc3545;
}

/* 表单占位符文本 */
.form-control::placeholder {
  color: #6c757d;
  opacity: 0.5;
}

/* 地图区域 */
.contact-map {
  padding: 60px 0;
}

.map-wrapper {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

.map-placeholder {
  background: #f8f9fa;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.map-overlay {
  text-align: center;
  color: var(--primary-color);
}

.map-overlay i {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.map-overlay p {
  font-size: 1.2rem;
  margin: 0;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .contact-header {
    padding: 100px 0 40px;
  }

  .contact-title {
    font-size: 2.5rem;
  }

  .contact-subtitle {
    font-size: 1.2rem;
  }

  .form-wrapper {
    padding: 2rem;
  }

  .form-title {
    font-size: 1.8rem;
  }
}
