/* 联系表单样式 - 克制留白设计风格 + 网站容器风格 */

.contact-form-wrapper {
  max-width: 1200px;
  margin: 24px auto 48px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(4px);
  padding: 36px 40px;
}

.contact-form-header {
  text-align: center;
  margin-bottom: 32px;
  border-bottom: 1px solid rgba(118, 99, 76, 0.2);
  padding-bottom: 20px;
}

.contact-form-header h3 {
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 8px;
  color: rgb(189 151 105);
}

.contact-form-header .form-description {
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 0;
  font-size: 16px;
}

/* 横向布局 */
.contact-form.horizontal-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: start;
}

@media (max-width: 968px) {
  .contact-form.horizontal-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .contact-form-wrapper {
    margin: 20px 16px;
    padding: 24px;
  }
}

.form-left, .form-right {
  background: rgba(255, 255, 255, 0.05);
  padding: 24px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.contact-form {
  width: 100%;
}

.form-section {
  margin-bottom: 32px;
}

.form-section h4 {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 20px;
  color: rgb(189 151 105);
  border-bottom: 1px solid rgba(118, 99, 76, 0.2);
  padding-bottom: 8px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.3s, box-shadow 0.3s;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.95);
}
.form-group select option { color:#000; background:#fff; }
.form-group select { appearance:none; -webkit-appearance:none; -moz-appearance:none; background-image: linear-gradient(45deg, transparent 50%, rgba(255,255,255,.8) 50%), linear-gradient(135deg, rgba(255,255,255,.8) 50%, transparent 50%); background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 12px) calc(50% - 3px); background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; padding-right: 34px; }
.form-group select:focus { outline:none; }
.

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: rgba(189, 151, 105, 0.8);
  box-shadow: 0 0 0 2px rgba(189, 151, 105, 0.24);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
}

/* 允许 textarea 占位符中的换行显示为多行 */
.form-group textarea::placeholder {
  white-space: pre-line;
}

.form-row {
  display: flex;
  gap: 16px;
}

.form-col {
  flex: 1;
}

.radio-group {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.radio-option {
  display: flex;
  align-items: center;
  cursor: pointer;
  margin-bottom: 8px;
}

.radio-option input[type="radio"],
.radio-option input[type="checkbox"] {
  width: auto;
  margin-right: 6px;
  margin-bottom: 0;
}

.radio-option span {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.82);
}

.inquiry-types {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}

.inquiry-types .radio-option {
  background: rgba(255, 255, 255, 0.06);
  padding: 10px 12px;
  border-radius: 6px;
  margin-bottom: 0;
  transition: background 0.3s;
}

.inquiry-types .radio-option:hover {
  background: rgba(255, 255, 255, 0.10);
}

.inquiry-types .radio-option input:checked + span {
  color: rgba(255, 255, 255, 0.95);
  font-weight: 600;
}

.char-count {
  text-align: right;
  font-size: 12px;
  color: #999;
  margin-top: 4px;
}

.char-count .over-limit {
  color: #dc3545;
}

.form-submit { text-align: center; margin-top: 32px; display: flex; flex-direction: column; align-items: center; }

.submit-btn {
  background: rgb(189 151 105);
  color: white;
  border: none;
  padding: 14px 32px;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
  min-width: 120px;
}

.submit-btn:hover:not(:disabled) {
  background: rgb(169 131 85);
  transform: translateY(-1px);
}

.submit-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

.submit-btn.loading {
  background: #666;
  cursor: wait;
}

.submit-status { margin-top: 12px; padding: 12px; border-radius: 4px; font-size: 14px; display: none; max-width: 640px; width: 100%; }

.submit-status.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  display: block;
}

.submit-status.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  display: block;
}

.submit-status.loading {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
  display: block;
}

/* reCAPTCHA容器优化 */
#recaptcha-container {
  margin-bottom: 16px;
}

/* 优化reCAPTCHA样式和位置 */
.grecaptcha-badge {
  visibility: hidden !important;
}

/* 通用的reCAPTCHA徽章隐藏规则 */
.rc-anchor-normal-footer,
.rc-anchor-logo-text,
.rc-anchor-pt {
  display: none !important;
}

/* 如果需要显示但移到页面底部 */
.recaptcha-footer-notice {
  position: fixed;
  bottom: 10px;
  right: 10px;
  z-index: 999;
  font-size: 10px;
  color: rgba(118, 99, 76, 0.5);
  background: rgba(255, 255, 255, 0.9);
  padding: 4px 8px;
  border-radius: 4px;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(118, 99, 76, 0.1);
}

.recaptcha-footer-notice a {
  color: rgba(118, 99, 76, 0.7);
  text-decoration: none;
  font-size: 9px;
}

.recaptcha-footer-notice a:hover {
  text-decoration: underline;
}

/* 隐藏所有reCAPTCHA相关的底部元素 */
iframe[src*="recaptcha"] {
  position: relative;
}

iframe[title="reCAPTCHA"] {
  position: relative;
}

/* 针对具体的reCAPTCHA元素进行隐藏 */
div[style*="position: fixed"][style*="bottom"][style*="right"] {
  display: none !important;
}

/* reCAPTCHA 说明样式 */
.recaptcha-notice {
  text-align: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(118, 99, 76, 0.1);
}

.recaptcha-notice small {
  color: rgba(118, 99, 76, 0.6);
  font-size: 11px;
  line-height: 1.4;
}

.recaptcha-notice a {
  color: rgba(118, 99, 76, 0.8);
  text-decoration: none;
}

.recaptcha-notice a:hover {
  text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
  /* 移动端收紧整体外边距与层级，内层容器 95vw */
  .contact-form-wrapper {
    width: 95vw;
    max-width: 95vw;
    margin: 12px auto 20px;
    padding: 16px;
    border-radius: 10px;
  }
  .contact-form.horizontal-layout { grid-template-columns: 1fr; gap: 14px; }
  .form-left, .form-right { background: transparent; border: 0; padding: 0; }
  .form-section { margin-bottom: 18px; }
  .form-group { margin-bottom: 14px; }
  .contact-form-header { margin-bottom: 16px; padding-bottom: 12px; }
  
  /* 年龄段 + 性别 一行显示 */
  .form-row { flex-direction: row; gap: 12px; }
  .form-col { flex: 1 1 0; }
  /* 联系方式与咨询类型：同一行可并排多项，减少垂直占用 */
  .radio-group { flex-direction: row; flex-wrap: wrap; gap: 10px 14px; }
  .radio-option { white-space: nowrap; display:inline-flex; align-items:center; }
  /* 咨询类型容器改为横向可换行 */
  .inquiry-types { display:flex; flex-wrap:wrap; gap: 10px 14px; }
  
  .submit-btn {
    width: 100%;
    padding: 16px;
  }
}

/* 表单动画效果 */
.form-group {
  animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 输入框错误状态 */
.form-group input.error,
.form-group select.error,
.form-group textarea.error {
  border-color: #dc3545;
  box-shadow: 0 0 0 2px rgba(220,53,69,0.1);
}

.form-group .error-message {
  color: #dc3545;
  font-size: 12px;
  margin-top: 4px;
  display: none;
}

.form-group .error-message.show {
  display: block;
}

/* 成功提交后的样式 */
.contact-form.submitted {
  opacity: 0.6;
  pointer-events: none;
}

.contact-form.submitted .submit-btn {
  background: #28a745;
}

/* 加载动画 */
.loading-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #fff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
  margin-right: 8px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
