/* ============================================
   consult.css  咨询与维权 / 在线留言 页面样式
   ============================================ */

/* ----- 页面标题区 ----- */
.consult-header {
  text-align: center;
  margin-bottom: 40px;
}

.consult-header h2 {
  color: #0036A2;
  font-size: 32px;
  font-weight: bold;
  border-bottom: 3px solid #e63838;
  display: inline-block;
  padding-bottom: 10px;
  letter-spacing: 2px;
}

.consult-header p {
  color: #666;
  font-size: 14px;
  margin-top: 12px;
}

/* ----- 表单标题栏 ----- */
.form-title-bar {
  font-size: 22px;
  font-weight: 700;
  color: #333;
  margin: 0 0 12px;
}

.form-title-bar::after {
  content: "";
  display: block;
  width: 78px;
  height: 3px;
  background: #6985BE;
  margin-top: 12px;
}

.form-intro {
  font-size: 13px;
  color: #999;
  line-height: 1.8;
}

.form-intro a {
  color: #0038A4;
  text-decoration: none;
}

.form-intro a:hover {
  text-decoration: underline;
}

.form-intro-tip {
  color: #DE132C;
  margin-top: -16px;
}

.form-intro-tip a {
  color: #DE132C;
  text-decoration: underline;
}

/* ----- 主内容区：左侧介绍 + 右侧表单 ----- */
.consult-wrapper {
  display: flex;
  gap: 24px;
  margin-bottom: 20px;
}

/* 左侧介绍区 */
.consult-info {
  flex: 0 0 36%;
  background: #F7FBFF;
  border: 1px solid #ECF3F9;
  border-radius: 16px;
  padding: 32px 24px 0 24px;
  display: flex;
  flex-direction: column;
}

.consult-info-title {
  font-size: 22px;
  font-weight: 700;
  color: #333;
  margin-bottom: 12px;
}

.consult-info-divider {
  width: 78px;
  height: 3px;
  background: #6985BE;
  margin-bottom: 18px;
}

.consult-info-text {
  /*margin-bottom: 16px;*/
}

.consult-info-text p {
  font-size: 13px;
  color: #666;
  line-height: 1.8;
  margin-bottom: 10px;
  text-align: justify;
}

.consult-info-img {
  width: 100%;
  border-radius: 12px;
  object-fit: cover;
  margin-bottom: 16px;
}

/* 右侧表单包装 */
.consult-form-wrap {
  flex: 1;
  min-width: 0;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 24px;
  padding: 28px 36px 36px;
}

/* 表单卡片 */
.form-card {
  background: #fff;
}

/* 表单行 */
.form-row {
  margin-bottom: 12px;
}

.form-row-group {
  display: flex;
  gap: 20px;
}

.form-row-group .form-row {
  flex: 1;
  min-width: 0;
}

.form-row label {
  display: block;
  font-weight: 500;
  /*margin-bottom: 8px;*/
  font-size: 14px;
  color: #333;
}

.form-row label .required {
  color: #e63838;
  margin-left: 2px;
}

/* 输入框 */
.form-input,
.form-select {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid #d4e2f1;
  border-radius: 6px;
  font-size: 14px;
  background: #fff;
  color: #333;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: #0036A2;
  box-shadow: 0 0 0 2px rgba(0, 54, 162, 0.1);
}

/* 文本域 */
.form-textarea {
  width: 100%;
  height: 100px;
  padding: 12px 14px;
  border: 1px solid #d4e2f1;
  border-radius: 6px;
  font-size: 14px;
  background: #fff;
  color: #333;
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-textarea:focus {
  outline: none;
  border-color: #0036A2;
  box-shadow: 0 0 0 2px rgba(0, 54, 162, 0.1);
}

/* 提示文本 */
.hint-text {
  font-size: 12px;
  color: #999;
  margin-top: 6px;
}

/* 验证码区域 */
.captcha-section {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap; /* 防止换行 */
}

.captcha-input {
  flex: 1 1 auto; /* 允许伸缩 */
  min-width: 0;
  width: 0; /* 强制由 flex 控制宽度，避免 attribute 变化导致布局偏移 */
}

.captcha-image {
  width: 140px;
  height: 46px;
  background: linear-gradient(135deg, #f0f4f8, #e0e8f2);
  border: 1px solid #d4e2f1;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: bold;
  color: #0036A2;
  letter-spacing: 4px;
  cursor: pointer;
  flex-shrink: 0;
  user-select: none;
}

.captcha-image:hover {
  border-color: #0036A2;
}

.captcha-refresh {
  font-size: 12px;
  color: #0036A2;
  text-decoration: none;
  cursor: pointer;
  flex-shrink: 0;
}

.captcha-refresh:hover {
  color: #002d8a;
  text-decoration: underline;
}

/* 按钮区域 */
.form-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid #e0e8f2;
}

/* jQuery Validate 错误样式 */
.form-input.error,
.form-select.error,
.form-textarea.error {
  border-color: #e63838 !important;
}

.form-input.error:focus,
.form-select.error:focus,
.form-textarea.error:focus {
  border-color: #e63838 !important;
  box-shadow: 0 0 0 2px rgba(230, 56, 56, 0.1) !important;
}

div.error,
label.error {
  color: #e63838 !important;
  font-size: 12px !important;
  margin-top: 4px !important;
  font-weight: normal !important;
}

.btn {
  width: 140px;
  height: 46px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
  letter-spacing: 1px;
}

.btn-primary {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: white;
  border-color: transparent;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #172554 0%, #1d4ed8 100%);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-secondary {
  background: #fff;
  color: #555;
  border-color: #d4e2f1;
}

.btn-secondary:hover {
  background: #f8fafc;
  border-color: #0036A2;
  color: #0036A2;
}

/* 成功提示 */
.success-message {
  display: none;
  text-align: center;
  padding: 40px 20px;
}

.success-message .success-icon {
  width: 64px;
  height: 64px;
  background: #52c41a;
  border-radius: 50%;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 32px;
}

.success-message h3 {
  color: #333;
  font-size: 20px;
  margin-bottom: 8px;
}

.success-message p {
  color: #666;
  font-size: 14px;
}

/* ----- 律师介绍区 ----- */
.lawyer-section {
  margin-top: 20px;
}

.lawyer-section-title {
  text-align: center;
  font-size: 32px;
  font-weight: 700;
  color: #333;
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.lawyer-section-subtitle {
  text-align: center;
  font-size: 14px;
  color: #666;
  margin-bottom: 12px;
}

.lawyer-section-deco {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.lawyer-section-deco::before,
.lawyer-section-deco::after {
  content: "";
  width: 171px;
  height: 2px;
  background: #DE132C;
}

.lawyer-section-deco::before {
  background: linear-gradient(to right, transparent, #DE132C);
}

.lawyer-section-deco::after {
  background: linear-gradient(to left, transparent, #DE132C);
}

.lawyer-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.lawyer-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.lawyer-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
}

.lawyer-avatar {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
}

.lawyer-card-info {
  padding: 12px 16px;
  text-align: center;
}

.lawyer-name {
  font-size: 15px;
  font-weight: 600;
  color: #333;
  margin: 0;
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .consult-header h2 {
    font-size: 24px;
  }

  .consult-info {
    flex: 0 0 42%;
    padding: 28px 22px;
  }

  .consult-form-wrap {
    padding: 24px;
  }

  .lawyer-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .consult-header h2 {
    font-size: 20px;
    letter-spacing: 1px;
  }

  .consult-wrapper {
    flex-direction: column;
    border-radius: 10px;
  }

  .consult-info {
    flex: 1 1 100%;
    padding: 24px 20px;
  }

  .consult-form-wrap {
    padding: 24px;
  }

  .captcha-section {
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
  }

  .captcha-input {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
  }

  .captcha-image {
    width: 100px;
    height: 36px;
    flex-shrink: 0;
  }

  .captcha-refresh {
    flex-shrink: 0;
    font-size: 11px;
  }

  .form-buttons {
    flex-direction: row;
    gap: 10px;
  }

  .btn {
    flex: 1;
    width: auto;
    padding: 0 16px;
  }

  .form-row-group {
    flex-direction: column;
    gap: 0;
  }

  .lawyer-section-title {
    font-size: 24px;
  }

  .lawyer-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}

@media (max-width: 480px) {
  .consult-info {
    padding: 20px 16px;
  }

  .consult-info-title {
    font-size: 18px;
  }

  .consult-form-wrap {
    padding: 20px;
  }

  .form-title-bar {
    font-size: 18px;
  }

  .lawyer-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}
