/**
 * 山西诚又诚律师事务所 - 首页专用样式表
 * ===========================================
 * 作用：首页特有组件和布局样式
 * 引用：仅 index.php 引用
 * 依赖：需要先引用 style.css
 */

/* ===========================================
   0. 滚动动画效果
   =========================================== */

/* 动画基础类 */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

/* 从下方淡入 */
.animate-on-scroll.fade-up {
  transform: translateY(30px);
}

/* 从左侧淡入 */
.animate-on-scroll.fade-left {
  transform: translateX(-30px);
}

/* 从右侧淡入 */
.animate-on-scroll.fade-right {
  transform: translateX(30px);
}

/* 缩放淡入 */
.animate-on-scroll.fade-scale {
  transform: scale(0.9);
}

/* 显示状态 */
.animate-on-scroll.show {
  opacity: 1;
  transform: translateY(0) translateX(0) scale(1);
}

/* 延迟类 */
.animate-delay-1 { transition-delay: 0.1s; }
.animate-delay-2 { transition-delay: 0.2s; }
.animate-delay-3 { transition-delay: 0.3s; }
.animate-delay-4 { transition-delay: 0.4s; }
.animate-delay-5 { transition-delay: 0.5s; }

/* ===========================================
   1. 首页基础
   =========================================== */
.home {
  padding-top: 0;
}

/* ===========================================
   2. 首页 Banner（全屏视频背景）
   =========================================== */
.banner {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  overflow: hidden;
}

.banner-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.banner-video video,
.banner-video img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-fallback {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.video-fallback img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.banner-content {
  position: relative;
  z-index: 2;
  padding: 0 20px;
}

.banner-content h1 {
  font-size: 80px;
  margin-bottom: 20px;
  font-weight: 400;
  letter-spacing: 8px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.banner-content p {
  font-size: 24px;
  margin-bottom: 40px;
  color: rgba(255,255,255,0.95);
  line-height: 1.8;
}

/* 首页搜索框 */
.search-box {
  display: flex;
  max-width: 500px;
  margin: 0 auto;
  background: rgba(255,255,255,0.2);
  border-radius: 50px;
  padding: 5px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.3);
}

.search-box input {
  flex: 1;
  padding: 15px 25px;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 16px;
  outline: none;
}

.search-box input::placeholder {
  color: rgba(255,255,255,0.7);
}

.search-box button {
  width: 50px;
  height: 50px;
  border: none;
  background: rgba(255,255,255,0.3);
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 18px;
}

.search-box button:hover {
  background: rgba(255,255,255,0.5);
}

/* ===========================================
   3. 视野观察区域 (Insights) - 模仿安杰世泽
   =========================================== */
.insights-section {
  background-color: #fdfdfd;
  padding: 60px 0;
}

.insights-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 40px;
}

.insight-card {
  background-color: #ffffff;
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.insight-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.insight-link {
  display: flex;
  text-decoration: none;
  color: inherit;
}

.insight-image {
  flex: 0 0 auto;
  width: 360px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.insight-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
}



.insight-content {
  flex: 1;
  padding: 24px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.insight-title {
  font-size: 20px;
  font-weight: 600;
  color: #333333;
  margin-bottom: 12px;
  line-height: 1.5;
  transition: color 0.3s;
  font-family: var(--font-sans);
}

.insight-card:hover .insight-title {
  color: #AC1E64;
}

.insight-summary {
  font-size: 16px;
  font-weight: 400;
  color: #666666;
  line-height: 1.8;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-family: var(--font-sans);
}

.insight-meta-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.insight-meta {
  font-size: 14px;
  font-weight: 400;
  color: #999999;
  font-family: var(--font-sans);
}

.insight-arrow {
  color: #AC1E64;
  font-size: 16px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===========================================
   4. 最新动态区域 (Newest)
   =========================================== */
.newest-section {
  background-color: #ffffff;
  padding: 60px 0;
}

.newest-grid-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
}

.newest-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  flex: 1;
}

.newest-card {
  background-color: #f9f9f9;
  transition: background-color 0.3s ease;
}

.newest-card:hover {
  background-color: #e2e2e2;
}

.newest-link {
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
}

.newest-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.newest-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}



.newest-content {
  padding: 24px;
}

.newest-title {
  font-size: 18px;
  font-weight: 500;
  color: #000000;
  margin-bottom: 20px;
  line-height: 24px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.newest-date {
  font-size: 14px;
  color: #999999;
}

/* ===========================================
   5. 孟子引言区域
   =========================================== */
.excellence-section {
  padding-top: 140px;
  padding-bottom: 100px;
  background: #fdfdfd;
  display: flex;
  justify-content: center;
  align-items: center;
}

.mencius-quote {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", serif;
  color: #1a1a1a;
}

.quote-row {
  display: flex;
  gap: 30px;
  font-size: 56px;
  font-weight: 700;
  letter-spacing: 4px;
  line-height: 1.2;
}

.row-1 {
  align-self: flex-start;
}

.row-2 {
  align-self: flex-start;
  margin-left: 120px;
}

.row-3 {
  align-self: flex-end;
  font-size: 32px;
  font-weight: 500;
  margin-top: 20px;
  margin-right: 0;
}

/* ===========================================
   6. 加入我们 & 办公机构
   =========================================== */
.blocks-section {
  padding-bottom: 80px;
  background-color: #fdfdfd;
}

.blocks-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

.block-card {
  display: flex;
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* 装饰圆弧线 */
.bg-decoration {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100%;
  pointer-events: none;
  background-image: radial-gradient(circle at 50% 120%, transparent 65%, rgba(0, 0, 0, 0.015) 66%, rgba(0, 0, 0, 0.015) 68%, transparent 69%),
                    radial-gradient(circle at 50% 120%, transparent 70%, rgba(0, 0, 0, 0.015) 71%, rgba(0, 0, 0, 0.015) 73%, transparent 74%),
                    radial-gradient(circle at 50% 120%, transparent 75%, rgba(0, 0, 0, 0.015) 76%, rgba(0, 0, 0, 0.015) 78%, transparent 79%);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  z-index: 0;
}

.join-us-card .bg-decoration {
  left: 0;
  right: 50%;
}

.offices-card .bg-decoration {
  left: 50%;
  right: 0;
}

.block-content {
  flex: 0 0 50%;
  padding: 80px 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 1;
  align-items: flex-start;
  background: #fff;
}

.block-image {
  flex: 0 0 50%;
  position: relative;
}

.block-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}



.block-desc {
  font-size: 16px;
  color: #666666;
  margin-bottom: 40px;
}

/* ===========================================
   7. 响应式适配
   =========================================== */
@media (max-width: 1024px) {
  /* Banner */
  .banner-content h1 {
    font-size: 42px;
    letter-spacing: 5px;
  }

  /* Insights */
  .insight-link {
    flex-direction: column;
  }
  .insight-image {
    flex: none;
    width: 100%;
    height: 200px;
  }
  .insight-content {
    padding: 20px 24px;
  }
  .insight-title {
    font-size: 16px;
  }
  .insight-summary {
    font-size: 13px;
    -webkit-line-clamp: 2;
  }

  /* Newest */
  .newest-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .newest-card:nth-child(3) {
    display: none;
  }

  /* Blocks */
  .block-card {
    flex-direction: column;
  }
  .offices-card {
    flex-direction: column-reverse;
  }

  /* Quote */
  .quote-row {
    font-size: 42px;
    gap: 20px;
  }
  .row-2 {
    margin-left: 60px;
  }
  .row-3 {
    font-size: 28px;
  }
}

@media (max-width: 768px) {
  .animate-on-scroll.fade-left,
  .animate-on-scroll.fade-right {
    transform: translateY(24px);
  }

  /* Banner */
  .banner {
    height: 88svh;
    min-height: 560px;
    max-height: 700px;
    align-items: center;
  }
  .banner-overlay {
    background: rgba(0, 0, 0, 0.42);
  }
  .banner-content {
    width: min(100%, 360px);
    padding: 70px 20px 0;
  }
  .banner-content h1 {
    font-size: 34px;
    line-height: 1.28;
    letter-spacing: 3px;
    margin-bottom: 16px;
  }
  .banner-content p {
    font-size: 15px;
    line-height: 1.75;
    margin-bottom: 28px;
  }
  .search-box {
    max-width: 100%;
    min-height: 50px;
    border-radius: 26px;
  }
  .search-box input {
    min-width: 0;
  }

  .insights-section,
  .newest-section {
    padding: 48px 0;
  }

  .insights-list {
    gap: 18px;
    margin-top: 28px;
  }

  .insight-card {
    border-radius: 6px;
  }

  .insight-image {
    height: auto;
    aspect-ratio: 16 / 10;
  }

  .insight-content {
    padding: 18px 18px 20px;
  }

  .insight-title {
    font-size: 17px;
    line-height: 1.5;
    margin-bottom: 10px;
  }

  .insight-summary {
    font-size: 14px;
    line-height: 1.7;
    -webkit-line-clamp: 3;
  }

  .insight-meta-wrap {
    align-items: flex-end;
    gap: 12px;
  }

  .insight-meta {
    line-height: 1.5;
  }

  /* Newest */
  .newest-grid-wrap {
    display: block;
  }
  .newest-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .newest-card:nth-child(3),
  .newest-card:nth-child(2) {
    display: block;
  }
  .newest-card {
    border-radius: 6px;
    overflow: hidden;
  }
  .newest-content {
    padding: 18px;
  }
  .newest-title {
    font-size: 17px;
    line-height: 1.5;
    margin-bottom: 14px;
  }

  /* Quote */
  .excellence-section {
    padding: 70px 0 64px;
  }
  .mencius-quote {
    max-width: 320px;
    gap: 12px;
  }
  .quote-row {
    justify-content: center;
    font-size: 30px;
    gap: 10px;
    letter-spacing: 2px;
  }
  .row-1,
  .row-2,
  .row-3 {
    align-self: center;
  }
  .row-2 {
    margin-left: 0;
  }
  .row-3 {
    font-size: 18px;
    margin-top: 10px;
  }

  /* Blocks */
  .blocks-section {
    padding-bottom: 48px;
  }
  .blocks-grid {
    gap: 22px;
  }
  .block-card {
    border-radius: 6px;
    overflow: hidden;
  }
  .bg-decoration {
    display: none;
  }
  .block-content {
    flex: none;
    padding: 32px 22px;
    min-height: auto;
  }
  .block-content .section-title-wrap {
    margin-bottom: 18px;
  }
  .block-title {
    font-size: 28px;
  }
  .block-desc {
    margin-bottom: 24px;
  }
  .block-image {
    flex: none;
    width: 100%;
    aspect-ratio: 16 / 10;
    min-height: 220px;
  }
}

@media (max-width: 480px) {
  .banner-content h1 {
    font-size: 30px;
    letter-spacing: 2px;
  }
  .search-box input {
    padding: 12px 20px;
    font-size: 14px;
  }
  .search-box button {
    width: 44px;
    height: 44px;
  }
}
