/* 湖南金瑞律师事务所 — 沿用原站主题色与样式 */

:root {
  --color-primary: #8b6914;
  --color-secondary: #d4af37;
  --color-neutral: #2d2410;
  --color-light: #f8f5f0;
  --color-muted: #6b5d3e;
  --header-h: 5rem;
  --transition: 0.3s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Inter, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #1f2937;
  background-color: #ffffff;
}

/* Logo — 与原站一致 */
.logo-img {
  max-height: 60px;
  width: auto;
  min-height: 40px;
  object-fit: contain;
}

@media (max-width: 767px) {
  .logo-img {
    max-height: 45px;
  }
}

.text-shadow {
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-gradient {
  background: linear-gradient(
    to right,
    rgba(45, 36, 16, 0.85),
    rgba(139, 105, 20, 0.75)
  );
}

/* Nav underline */
.nav-link {
  position: relative;
  padding-bottom: 4px;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #d4af37;
  transition: width var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.navbar-transparent {
  background-color: transparent;
  transition: all var(--transition);
}

.navbar-solid {
  background-color: rgb(93 81 54 / 80%);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transition: all var(--transition);
}

.navbar-solid-always {
  background-color: rgb(93 81 54 / 92%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* 内页顶栏 Hero */
.page-hero {
  position: relative;
  min-height: 42vh;
  display: flex;
  align-items: flex-end;
  padding: calc(var(--header-h) + 3rem) 0 3.5rem;
  overflow: hidden;
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.page-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  background: linear-gradient(
    to right,
    rgba(45, 36, 16, 0.85),
    rgba(139, 105, 20, 0.75)
  );
}

/* 服务卡片 — 原站样式 */
.service-card {
  transition: transform var(--transition), box-shadow var(--transition);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
  will-change: transform;
  backface-visibility: hidden;
}

/* 兼容内页轻量列表（沿用主色） */
.service-item {
  border-top: 2px solid var(--color-secondary);
  padding: 1.75rem 0 1.5rem;
  transition: transform var(--transition), opacity var(--transition);
}

.service-item.will-animate {
  opacity: 0;
  transform: translateY(16px);
}

.service-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.service-item:hover {
  transform: translateY(-4px);
}

.service-item--accent {
  border-top-color: var(--color-neutral);
  background: linear-gradient(160deg, var(--color-primary) 0%, var(--color-neutral) 100%);
  color: #fff;
  padding: 1.75rem 1.5rem;
}

.service-item--accent .service-link {
  color: var(--color-secondary);
}

.service-link {
  color: var(--color-primary);
  font-weight: 500;
  transition: color 0.2s ease;
}

.service-link:hover {
  color: rgba(139, 105, 20, 0.8);
}

/* 律师团队轮播 — 原站样式 */
.image-carousel {
  position: relative;
  width: 100%;
  height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin: 0 auto;
}

.image-item {
  position: absolute;
  width: 180px;
  height: 300px;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.5s ease;
  cursor: pointer;
  opacity: 0.7;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 1;
}

.image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.3s ease;
}

.image-item.active {
  width: 280px;
  height: 420px;
  opacity: 1;
  z-index: 10;
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.image-item:nth-child(1) {
  /* 半宽内移，避免 overflow 裁切首张图 */
  left: 90px;
  transform: translateX(-50%);
}
.image-item:nth-child(2) {
  left: 20%;
  transform: translateX(-50%);
}
.image-item:nth-child(3) {
  left: 35%;
  transform: translateX(-50%);
}
.image-item:nth-child(4) {
  left: 50%;
  transform: translateX(-50%);
}
.image-item:nth-child(5) {
  left: 65%;
  transform: translateX(-50%);
}
.image-item:nth-child(6) {
  left: 80%;
  transform: translateX(-50%);
}
.image-item:nth-child(7) {
  /* 半宽内移，避免 overflow 裁切末张图 */
  left: calc(100% - 90px);
  transform: translateX(-50%);
}

.image-item.active:nth-child(1),
.image-item.active:nth-child(2),
.image-item.active:nth-child(3),
.image-item.active:nth-child(4),
.image-item.active:nth-child(5),
.image-item.active:nth-child(6),
.image-item.active:nth-child(7) {
  transform: translateX(-50%) scale(1.05);
}

.image-item.active:nth-child(1) {
  left: 140px;
}

.image-item.active:nth-child(7) {
  left: calc(100% - 140px);
}

.teamIntro_div {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  padding: 20px 10px 15px;
  text-align: center;
}

.teamIntro {
  color: white;
  text-decoration: none;
  display: block;
}

.teamIntro p {
  margin: 0;
  padding: 2px 0;
  font-size: 14px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.teamIntro p:first-child {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 5px;
}

.teamIntro .divider {
  border-bottom: 1px solid #ccc;
  width: 35%;
  margin: 6px auto;
}

@media (max-width: 768px) {
  .image-carousel {
    height: 400px;
  }
  .image-item {
    width: 100px;
    height: 200px;
    opacity: 0.6;
  }
  .image-item.active {
    width: 180px;
    height: 300px;
  }
  .image-item:nth-child(1) {
    left: 50px;
  }
  .image-item:nth-child(7) {
    left: calc(100% - 50px);
  }
  .image-item.active:nth-child(1) {
    left: 90px;
  }
  .image-item.active:nth-child(7) {
    left: calc(100% - 90px);
  }
  .image-item:nth-child(1),
  .image-item:nth-child(7) {
    opacity: 0.6;
    pointer-events: auto;
  }
  .image-item:nth-child(2) {
    left: 15%;
  }
  .image-item:nth-child(3) {
    left: 35%;
  }
  .image-item:nth-child(4) {
    left: 50%;
  }
  .image-item:nth-child(5) {
    left: 65%;
  }
  .image-item:nth-child(6) {
    left: 85%;
  }
}

@media (max-width: 480px) {
  .image-carousel {
    height: 350px;
  }
  .image-item {
    width: 80px;
    height: 160px;
  }
  .image-item.active {
    width: 140px;
    height: 240px;
  }
  .image-item:nth-child(1) {
    left: 40px;
  }
  .image-item:nth-child(7) {
    left: calc(100% - 40px);
  }
  .image-item.active:nth-child(1) {
    left: 70px;
  }
  .image-item.active:nth-child(7) {
    left: calc(100% - 70px);
  }
  .image-item:nth-child(2),
  .image-item:nth-child(6) {
    opacity: 0.4;
  }
}

/* 律师网格 */
.lawyer-card {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform var(--transition), margin-top 0.3s ease, box-shadow 0.3s ease;
}

.lawyer-card:hover {
  transform: translateY(-6px);
}

.lawyer-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top center;
  display: block;
  border-radius: 0;
}

.lawyer-card .meta {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(45, 36, 16, 0.12);
}

/* 桌面 5 列：瞿颖居中，两侧阶梯下沉 20px */
@media (min-width: 1024px) {
  .team-grid {
    padding-bottom: 40px;
  }

  .team-grid .team-step-0 {
    margin-top: 0;
    z-index: 2;
  }

  .team-grid .team-step-1 {
    margin-top: 20px;
  }

  .team-grid .team-step-2 {
    margin-top: 40px;
  }

  .team-grid .team-featured {
    box-shadow: 0 12px 28px rgba(139, 105, 20, 0.18);
  }
}

/* 平板及以下：主任优先展示，取消阶梯避免错位 */
@media (max-width: 1023px) {
  .team-grid .team-featured {
    order: -1;
  }

  .team-grid .team-step-1,
  .team-grid .team-step-2 {
    margin-top: 0;
  }
}

/* 平板 3 列时仍保留轻微阶梯（中间最高） */
@media (min-width: 768px) and (max-width: 1023px) {
  .team-grid .team-featured {
    order: 0;
  }

  /* 顺序：秦亚夫 周湘伟 瞿颖 | 刘蓉 蒋静 — 让第3位略抬高需用负 margin 不合适，改用前两位下沉 */
  .team-grid .lawyer-card:nth-child(1),
  .team-grid .lawyer-card:nth-child(5) {
    margin-top: 20px;
  }

  .team-grid .lawyer-card:nth-child(2),
  .team-grid .lawyer-card:nth-child(4) {
    margin-top: 10px;
  }

  .team-grid .lawyer-card:nth-child(3) {
    margin-top: 0;
  }
}

.recog-item {
  border-left: 3px solid var(--color-secondary);
  padding: 1.25rem 0 1.25rem 1.5rem;
}

.contact-input {
  width: 100%;
  border: 1px solid rgba(45, 36, 16, 0.2);
  background: #fff;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  transition: border-color 0.2s ease;
}

.contact-input:focus {
  outline: none;
  border-color: var(--color-secondary);
}

.practice-points li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.75rem;
  color: #4b5563;
}

.practice-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  background: var(--color-secondary);
  border-radius: 50%;
}

.section-pad {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

@media (max-width: 768px) {
  .section-pad {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }
}

.lazy-load {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.lazy-load.loaded {
  opacity: 1;
}

/* 客户好评：一行横向滚动 */
.review-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 105, 20, 0.35) transparent;
}

.review-scroll::-webkit-scrollbar {
  height: 6px;
}

.review-scroll::-webkit-scrollbar-thumb {
  background: rgba(139, 105, 20, 0.35);
  border-radius: 999px;
}

.review-row {
  width: max-content;
  min-width: 100%;
}

.review-card {
  flex: 0 0 auto;
  width: min(20rem, 78vw);
  scroll-snap-align: start;
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
  padding: 1rem 1.125rem;
  display: flex;
  flex-direction: column;
}

.review-card > p {
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.review-stars {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin-top: 0.2rem;
  color: #d4af37;
  font-size: 0.7rem;
}

.review-tag {
  margin-left: 0.35rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: #c48a1a;
  background: rgba(212, 175, 55, 0.15);
  padding: 0.05rem 0.35rem;
  border-radius: 0.25rem;
}

@media (min-width: 1280px) {
  .review-card {
    width: 18.5rem;
  }
}

