/* ===============================
   山东众旭律师事务所 官网样式
   配色：藏蓝 + 金色，庄重专业
   =============================== */

:root {
  --navy: #14213d;
  --navy-light: #1e3a5f;
  --gold: #b8923c;
  --gold-light: #d4af5e;
  --gold-pale: #f3e9d2;
  --ink: #2b2b2b;
  --text: #4a4a4a;
  --text-light: #7a7a7a;
  --bg: #faf9f6;
  --white: #ffffff;
  --border: #e8e4da;
  --shadow: 0 4px 24px rgba(20, 33, 61, 0.08);
  --shadow-hover: 0 8px 32px rgba(20, 33, 61, 0.14);
  --serif: "Source Han Serif SC", "Noto Serif SC", "STSong", "SimSun", Georgia, serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.8;
}

img { max-width: 100%; display: block; }

a { text-decoration: none; color: inherit; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ============ 导航栏 ============ */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(20, 33, 61, 0.95);
  backdrop-filter: blur(10px);
  transition: box-shadow 0.3s;
}

.header.scrolled { box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3); }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-mark {
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--white);
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  border-radius: 6px;
  letter-spacing: 1px;
  flex-shrink: 0;
}

.logo-text {
  color: var(--white);
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 2px;
  line-height: 1.3;
  display: flex;
  flex-direction: column;
}

.logo-text small {
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
}

.nav-menu {
  display: flex;
  gap: 8px;
  list-style: none;
}

.nav-link {
  color: rgba(255, 255, 255, 0.8);
  padding: 8px 18px;
  font-size: 15px;
  border-radius: 4px;
  transition: all 0.3s;
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 2px;
  width: 0; height: 2px;
  background: var(--gold-light);
  transition: all 0.3s;
  transform: translateX(-50%);
}

.nav-link:hover, .nav-link.active { color: var(--white); }

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

.nav-phone {
  color: var(--gold-light);
  font-size: 15px;
  font-weight: 600;
  padding: 8px 0 8px 18px;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--white);
  transition: all 0.3s;
}

/* ============ 轮播 Hero ============ */
.hero { margin-top: 72px; }

.carousel {
  position: relative;
  height: 72vh;
  min-height: 480px;
  max-height: 760px;
  overflow: hidden;
  background: var(--navy);
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.slide.active { opacity: 1; }

.slide img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: none;
}

.slide img.loaded { display: block; }

.slide-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 30% 40%, rgba(212, 175, 94, 0.15), transparent 50%),
    linear-gradient(135deg, #1a2a4a 0%, #14213d 55%, #0d1628 100%);
  color: rgba(255, 255, 255, 0.35);
  font-family: var(--serif);
  font-size: 26px;
  text-align: center;
  letter-spacing: 4px;
}

.slide-placeholder small {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 1px;
  opacity: 0.7;
}

.slide-placeholder[hidden] { display: none; }

.carousel-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(13, 22, 40, 0.45) 0%,
    rgba(13, 22, 40, 0.25) 40%,
    rgba(13, 22, 40, 0.65) 100%
  );
  z-index: 2;
  pointer-events: none;
}

.carousel-caption {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
  padding: 24px;
}

.hero-title {
  font-family: var(--serif);
  color: var(--white);
  font-size: clamp(32px, 6vw, 60px);
  font-weight: 700;
  letter-spacing: 8px;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
  animation: fadeUp 1s ease both;
}

.hero-sub {
  margin-top: 18px;
  color: var(--gold-pale);
  font-size: clamp(15px, 2.4vw, 21px);
  letter-spacing: 10px;
  text-indent: 10px;
  animation: fadeUp 1s 0.2s ease both;
}

.hero-divider {
  width: 64px; height: 2px;
  margin: 22px auto;
  background: linear-gradient(90deg, transparent, var(--gold-light), transparent);
  animation: fadeUp 1s 0.35s ease both;
}

.hero-desc {
  color: rgba(255, 255, 255, 0.85);
  font-size: clamp(13px, 2vw, 16px);
  letter-spacing: 3px;
  animation: fadeUp 1s 0.5s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 48px; height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.3s;
  backdrop-filter: blur(4px);
}

.carousel-btn:hover {
  background: var(--gold);
  color: var(--white);
}

.carousel-btn.prev { left: 20px; }
.carousel-btn.next { right: 20px; }

.carousel-dots {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  gap: 12px;
}

.dot {
  width: 36px; height: 3px;
  border: none;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: all 0.3s;
  padding: 0;
}

.dot.active { background: var(--gold-light); }

/* ============ 通用 Section ============ */
.section { padding: 88px 0; }

.section-header { text-align: center; margin-bottom: 56px; }

.section-tag {
  display: inline-block;
  color: var(--gold);
  font-size: 13px;
  letter-spacing: 6px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--serif);
  color: var(--navy);
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 700;
  letter-spacing: 3px;
}

.title-divider {
  width: 56px; height: 3px;
  margin: 18px auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* ============ 律所介绍 ============ */
.about { background: var(--white); }

.about-content {
  max-width: 820px;
  margin: 0 auto 56px;
  font-size: 16px;
  color: var(--text);
  text-align: justify;
}

.about-content p { margin-bottom: 18px; text-indent: 2em; }

/* ---- 发展历程时间线 ---- */
.timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 960px;
  margin: 0 auto 64px;
  padding: 36px 12px 0;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 42px; left: 4%; right: 4%;
  height: 2px;
  background: linear-gradient(90deg, var(--gold-light), var(--border) 15%, var(--border) 85%, var(--gold-light));
}

.timeline-item {
  position: relative;
  text-align: center;
  padding-top: 28px;
}

.timeline-dot {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--gold);
  border: 3px solid var(--white);
  box-shadow: 0 0 0 2px var(--gold-light);
}

.timeline-year {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.timeline-text {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.7;
  padding: 0 4px;
}

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

.value-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 32px 20px;
  text-align: center;
  transition: all 0.3s;
}

.value-item:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: var(--gold-light);
}

.value-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px; height: 56px;
  font-size: 26px;
  background: var(--gold-pale);
  border-radius: 50%;
  margin-bottom: 16px;
}

.value-item h3 {
  font-family: var(--serif);
  color: var(--navy);
  font-size: 19px;
  letter-spacing: 4px;
  margin-bottom: 8px;
}

.value-item p { font-size: 13.5px; color: var(--text-light); }

/* ============ 业务领域 ============ */
.section-lead {
  max-width: 760px;
  margin: 20px auto 0;
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.9;
  text-align: center;
}

.practice { background: var(--white); }

.practice-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.practice-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px 22px;
  transition: all 0.3s;
}

.practice-item:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: var(--gold-light);
  background: var(--white);
}

.practice-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  font-size: 24px;
  background: var(--gold-pale);
  border-radius: 12px;
  margin-bottom: 14px;
}

.practice-item h3 {
  font-family: var(--serif);
  color: var(--navy);
  font-size: 18px;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.practice-item p { font-size: 13px; color: var(--text-light); line-height: 1.8; }

/* ============ 常见问题 ============ */
.faq { background: var(--bg); }

.faq-list {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.faq-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.3s;
}

.faq-item[open] { border-color: var(--gold-light); box-shadow: var(--shadow); }

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 24px;
  font-family: var(--serif);
  font-size: 16.5px;
  font-weight: 700;
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  user-select: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  flex-shrink: 0;
  width: 28px; height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--gold-pale);
  color: var(--gold);
  font-size: 18px;
  font-weight: 400;
  transition: transform 0.3s;
}

.faq-item[open] summary::after { transform: rotate(45deg); }

.faq-answer { padding: 0 24px 20px; }

.faq-answer p { font-size: 14.5px; color: var(--text); line-height: 1.9; }

/* ============ 联系我们 ============ */
.contact { background: var(--bg); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 32px;
  align-items: stretch;
}

.contact-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px 24px;
  flex: 1;
  transition: all 0.3s;
}

.contact-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--gold-light);
  transform: translateX(4px);
}

.contact-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  font-size: 22px;
  background: var(--gold-pale);
  border-radius: 10px;
}

.contact-label {
  font-size: 13px;
  color: var(--text-light);
  letter-spacing: 2px;
  margin-bottom: 4px;
}

.contact-value {
  font-size: 16.5px;
  color: var(--navy);
  font-weight: 600;
}

.contact-value a { color: var(--navy); transition: color 0.3s; }

.contact-value a:hover { color: var(--gold); }

.contact-note { font-size: 12.5px; color: var(--text-light); margin-top: 4px; }

/* ---- 地图卡片 ---- */
.map-card {
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: all 0.3s;
  min-height: 320px;
}

.map-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
  border-color: var(--gold-light);
}

.map-visual {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: linear-gradient(150deg, #eaf0f6 0%, #dde7f0 50%, #e8eef4 100%);
}

.map-pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(20, 33, 61, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 33, 61, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
}

.map-roads { position: absolute; inset: 0; }

.road {
  position: absolute;
  background: var(--white);
  box-shadow: 0 1px 3px rgba(20, 33, 61, 0.1);
}

.road-h {
  top: 58%; left: -10%;
  width: 120%; height: 10px;
  transform: rotate(-4deg);
}

.road-v {
  top: -10%; left: 38%;
  width: 8px; height: 120%;
  transform: rotate(6deg);
}

.road-d {
  top: 20%; left: 55%;
  width: 130%; height: 7px;
  transform: rotate(32deg);
  opacity: 0.6;
}

.map-pin {
  position: absolute;
  top: 46%; left: 44%;
  transform: translate(-50%, -100%);
  z-index: 2;
  animation: bounce 2.4s ease-in-out infinite;
}

.pin-icon { font-size: 42px; filter: drop-shadow(0 4px 8px rgba(184, 146, 60, 0.5)); }

@keyframes bounce {
  0%, 100% { transform: translate(-50%, -100%); }
  50% { transform: translate(-50%, -118%); }
}

.map-info {
  padding: 24px 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.map-title {
  font-family: var(--serif);
  color: var(--navy);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.map-addr { font-size: 14px; color: var(--text); margin-bottom: 10px; }

.map-hint {
  font-size: 13px;
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 1px;
}

/* ---- 备用地图链接 ---- */
.map-links {
  margin-top: 28px;
  text-align: center;
  font-size: 13.5px;
  color: var(--text-light);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.map-links a {
  color: var(--navy);
  padding: 5px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--white);
  transition: all 0.3s;
}

.map-links a:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ============ 页脚 ============ */
.footer { background: var(--navy); color: rgba(255, 255, 255, 0.75); }

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  padding: 48px 24px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-brand .logo-mark { width: 48px; height: 48px; font-size: 18px; }

.footer-brand p {
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.7;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.9);
}

.footer-contact { font-size: 14px; line-height: 2.1; text-align: right; }

.footer-contact .footer-services { font-size: 12.5px; color: rgba(255, 255, 255, 0.55); }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  padding: 18px 24px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 1px;
}

.footer-bottom a { color: rgba(255, 255, 255, 0.45); transition: color 0.3s; }
.footer-bottom a:hover { color: var(--gold-light); }

/* ============ 返回顶部 ============ */
.back-to-top {
  position: fixed;
  right: 28px; bottom: 28px;
  width: 46px; height: 46px;
  border: none;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-size: 18px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all 0.3s;
  box-shadow: 0 4px 16px rgba(20, 33, 61, 0.3);
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover { background: var(--gold); }

/* ============ 滚动进入动画 ============ */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible { opacity: 1; transform: translateY(0); }

/* ============ 响应式 ============ */
@media (max-width: 900px) {
  .about-values { grid-template-columns: repeat(2, 1fr); }
  .practice-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-contact { text-align: left; }

  .timeline { grid-template-columns: 1fr; gap: 28px; padding: 8px 0 0 20px; }
  .timeline::before {
    top: 14px; bottom: 14px; left: 6px; right: auto;
    width: 2px; height: auto;
    background: linear-gradient(180deg, var(--gold-light), var(--border) 30%, var(--border) 85%, var(--gold-light));
  }
  .timeline-item { text-align: left; padding-top: 0; padding-left: 28px; }
  .timeline-dot { top: 6px; left: 0; transform: none; }
  .timeline-year { margin-bottom: 4px; }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 72px; left: 0; right: 0;
    flex-direction: column;
    background: rgba(13, 22, 40, 0.98);
    padding: 12px 24px 20px;
    gap: 4px;
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
  }

  .nav-menu.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-link { padding: 12px 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }

  .nav-toggle { display: flex; }
  .nav-phone { display: none; }

  .carousel { height: 62vh; min-height: 420px; }
  .hero-title { letter-spacing: 4px; }
  .hero-sub { letter-spacing: 5px; }

  .carousel-btn { width: 38px; height: 38px; font-size: 20px; }
  .carousel-btn.prev { left: 10px; }
  .carousel-btn.next { right: 10px; }

  .section { padding: 64px 0; }
}

@media (max-width: 520px) {
  .about-values { grid-template-columns: 1fr; }
  .practice-grid { grid-template-columns: 1fr; }
  .logo-text { font-size: 16px; }
  .logo-mark { width: 38px; height: 38px; font-size: 14px; }
}
