/* ============================================================
   明至睿科技 · 企业官网（多页面版）
   设计语言：蓝金科技风升级版 —— 留白更大、层次更丰富、微交互
   ============================================================ */

/* ===== 基础变量与重置 ===== */
:root {
  --primary: #0a4f8a;
  --primary-dark: #073b68;
  --primary-light: #2a6fb0;
  --accent: #c9a227;
  --accent-light: #e3c14e;
  --text: #1f2937;
  --text-light: #5b6573;
  --text-white: #ffffff;
  --bg: #ffffff;
  --bg-light: #f4f8fc;
  --bg-dark: #08253f;
  --border: #e6ebf1;
  --shadow: 0 6px 24px rgba(13, 58, 102, 0.08);
  --shadow-lg: 0 24px 60px rgba(13, 58, 102, 0.16);
  --radius: 10px;
  --radius-lg: 18px;
  --max-width: 1180px;
  --header-height: 76px;
  --section-padding: 110px;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  color: var(--text);
  line-height: 1.8;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

p {
  text-indent: 2em;
}

/* 不需要首行缩进的元素 */
.section-header p,
.stat-label,
.feature p,
.contact-item p,
.qual-item h4,
.footer-links a,
.footer-bottom p,
.form-group label,
.hero-subtitle,
.nav-link,
.logo-text,
.btn,
.business-card h3,
.business-card li,
.project-card h3,
.project-date,
.project-tag,
.about-card h3,
.contact-form h3,
.contact-form input,
.contact-form textarea,
.page-hero p,
.breadcrumb,
.tag-line,
.copyright {
  text-indent: 0;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 34px;
  font-size: 15px;
  font-weight: 500;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  letter-spacing: 1px;
}

.btn-primary {
  background: var(--accent);
  color: #1a1a1a;
}

.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-outline {
  border-color: rgba(255, 255, 255, 0.6);
  color: var(--text-white);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--text-white);
}

.btn-block {
  width: 100%;
}

/* ===== 顶部导航 ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(10, 79, 138, 0.08);
  transition: var(--transition);
}

.header.scrolled {
  box-shadow: 0 4px 20px rgba(13, 58, 102, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 20px;
  color: var(--primary);
  letter-spacing: 1px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.nav {
  display: flex;
  align-items: center;
  gap: 38px;
}

.nav-link {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  position: relative;
  padding: 8px 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: var(--transition);
}

/* ===== 通用区块 ===== */
.section {
  padding: var(--section-padding) 0;
}

.section:nth-child(even) {
  background: var(--bg-light);
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 64px;
}

.section-tag {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 3px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 14px;
}

.section-title {
  font-size: 36px;
  font-weight: 700;
  color: var(--primary);
  position: relative;
  padding-bottom: 18px;
  margin-bottom: 16px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.section-subtitle {
  font-size: 16px;
  color: var(--text-light);
}

/* ===== 内页 Banner（page-hero）===== */
.page-hero {
  position: relative;
  padding: calc(var(--header-height) + 80px) 0 70px;
  background: linear-gradient(135deg, var(--bg-dark) 0%, #0d3a66 55%, var(--primary) 100%);
  color: var(--text-white);
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.5;
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  font-size: 42px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 14px;
}

.page-hero p {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.82);
  max-width: 640px;
}

.breadcrumb {
  display: flex;
  gap: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 18px;
}

.breadcrumb a:hover {
  color: var(--accent-light);
}

.breadcrumb span {
  opacity: 0.5;
}

/* ===== 首页 Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-dark) 0%, #0d3a66 50%, var(--primary-dark) 100%);
  color: var(--text-white);
  overflow: hidden;
  padding-top: var(--header-height);
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.6;
}

.pulse-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 620px;
  height: 620px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  animation: pulse 4s ease-out infinite;
}

.pulse-ring::before,
.pulse-ring::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.pulse-ring::before {
  inset: 90px;
  animation: pulse 4s ease-out infinite 1s;
}

.pulse-ring::after {
  inset: 180px;
  animation: pulse 4s ease-out infinite 2s;
}

@keyframes pulse {
  0% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.8; }
  100% { transform: translate(-50%, -50%) scale(1.15); opacity: 0; }
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero-subtitle {
  font-size: 15px;
  letter-spacing: 4px;
  color: var(--accent-light);
  margin-bottom: 22px;
  font-weight: 500;
}

.hero-title {
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 26px;
  letter-spacing: 2px;
}

.hero-desc {
  font-size: clamp(16px, 2vw, 18px);
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 40px;
  line-height: 1.9;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 64px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding-top: 44px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.stat-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
}

.stat-num {
  font-size: 44px;
  font-weight: 700;
  color: var(--text-white);
  line-height: 1;
}

.stat-unit {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-light);
}

.stat-label {
  width: 100%;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 8px;
}

.scroll-down {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 14px;
  display: flex;
  justify-content: center;
  z-index: 1;
}

.scroll-down span {
  width: 4px;
  height: 8px;
  background: var(--accent-light);
  border-radius: 2px;
  margin-top: 7px;
  animation: scrollDown 1.6s infinite;
}

@keyframes scrollDown {
  0% { opacity: 0; transform: translateY(0); }
  50% { opacity: 1; }
  100% { opacity: 0; transform: translateY(14px); }
}

/* ===== 关于我们 ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 64px;
  align-items: start;
}

.about-text .lead {
  font-size: 21px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 26px;
  line-height: 1.7;
}

.about-text p {
  margin-bottom: 20px;
  color: var(--text-light);
  text-align: justify;
}

.about-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 44px;
}

.feature {
  text-align: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 20px;
  transition: var(--transition);
}

.feature:hover {
  box-shadow: var(--shadow);
  transform: translateY(-4px);
  border-color: transparent;
}

.feature-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: var(--text-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-icon svg {
  width: 28px;
  height: 28px;
}

.feature-content {
  display: inline-block;
  text-align: center;
}

.feature h4 {
  font-size: 17px;
  margin-bottom: 8px;
  color: var(--text);
}

.feature p {
  font-size: 13px;
  color: var(--text-light);
  margin: 0;
  text-align: center;
}

.about-visual {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.about-card {
  background: var(--bg);
  padding: 36px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  border-left: 4px solid var(--accent);
}

.about-card .card-line {
  display: none;
}

.about-card h3 {
  font-size: 19px;
  margin-bottom: 12px;
  color: var(--primary);
}

.about-card p {
  color: var(--text-light);
  margin: 0;
  text-align: justify;
}

/* ===== 业务领域 ===== */
.business-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.business-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.business-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: var(--transition);
}

.business-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-6px);
  border-color: transparent;
}

.business-card:hover::after {
  transform: scaleX(1);
}

.business-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 22px;
  color: var(--primary);
}

.business-icon svg {
  width: 100%;
  height: 100%;
}

.business-card h3 {
  font-size: 21px;
  margin-bottom: 10px;
  color: var(--text);
}

.business-card > p {
  font-size: 14px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 22px;
}

.business-card ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.business-card li {
  font-size: 14px;
  color: var(--text-light);
  padding-left: 20px;
  position: relative;
  line-height: 1.7;
}

.business-card li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 11px;
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
}

/* ===== 资质荣誉 ===== */
.qual-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 22px;
}

.qual-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 16px;
  text-align: center;
  transition: var(--transition);
}

.qual-item:hover {
  box-shadow: var(--shadow);
  transform: translateY(-4px);
  border-color: transparent;
}

.qual-icon {
  font-size: 34px;
  margin-bottom: 14px;
}

.qual-item h4 {
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
  font-weight: 600;
}

/* ===== 项目案例 ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.project-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 34px 32px;
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-6px);
  border-color: transparent;
}

.project-date {
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.project-card h3 {
  font-size: 19px;
  margin-bottom: 14px;
  color: var(--primary);
  line-height: 1.5;
}

.project-card p {
  color: var(--text-light);
  font-size: 14.5px;
  margin-bottom: 22px;
  text-align: justify;
  flex-grow: 1;
}

.project-tag {
  align-self: flex-start;
  font-size: 12px;
  padding: 6px 14px;
  background: var(--bg-light);
  color: var(--primary);
  border-radius: 20px;
  border: 1px solid var(--border);
}

.project-detail-link {
  margin-top: 18px;
  align-self: flex-start;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  transition: color 0.2s;
}

.project-detail-link:hover {
  color: var(--accent);
}

/* ===== 联系我们 ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 56px;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.contact-item {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.contact-icon {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: var(--text-white);
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-icon svg {
  width: 24px;
  height: 24px;
}

.contact-item h4 {
  font-size: 16px;
  margin-bottom: 4px;
  color: var(--text);
}

.contact-item p {
  font-size: 15px;
  color: var(--text-light);
  margin: 0;
}

.contact-form {
  background: var(--bg);
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.contact-form h3 {
  font-size: 22px;
  margin-bottom: 26px;
  color: var(--primary);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 8px;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  transition: var(--transition);
  background: var(--bg-light);
  color: var(--text);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--bg);
  box-shadow: 0 0 0 3px rgba(10, 79, 138, 0.1);
}

.form-group textarea {
  resize: vertical;
}

.form-success {
  background: #eaf7ee;
  border: 1px solid #b6e0c2;
  color: #1f7a3d;
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 18px;
}

/* ===== 首页 CTA 引导条 ===== */
.cta-band {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--text-white);
  text-align: center;
  padding: 70px 0;
}

.cta-band h2 {
  font-size: 30px;
  margin-bottom: 14px;
}

.cta-band p {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 30px;
  text-indent: 0;
}

/* ===== 页脚 ===== */
.footer {
  background: var(--bg-dark);
  color: var(--text-white);
  padding: 64px 0 28px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 24px;
  gap: 24px;
}

.footer-brand h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
}

.footer-links {
  display: flex;
  gap: 32px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
}

.footer-links a:hover {
  color: var(--accent-light);
}

.footer-bottom {
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  padding-top: 16px;
}

.footer-bottom .footer-line {
  display: inline;
  line-height: 1.8;
}

.footer-bottom .footer-divider {
  margin: 0 24px;
  color: rgba(255, 255, 255, 0.35);
}

.footer-bottom a {
  color: #d4b876;
  text-decoration: none;
  border-bottom: 1px solid rgba(212, 184, 118, 0.5);
}

.footer-bottom a:hover {
  color: #ecd49f;
  border-bottom-color: #ecd49f;
}

/* ===== 滚动渐入动画 ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== 响应式设计 ===== */
@media (max-width: 1024px) {
  :root {
    --section-padding: 90px;
  }

  .business-grid,
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .qual-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 64px;
    --section-padding: 70px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: var(--bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
    gap: 4px;
    box-shadow: var(--shadow);
    transform: translateY(-120%);
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
  }

  .nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-link {
    width: 100%;
    padding: 13px 0;
    border-bottom: 1px solid var(--border);
  }

  .nav-link::after {
    display: none;
  }

  .section-title {
    font-size: 28px;
  }

  .page-hero h1 {
    font-size: 30px;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px 16px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 220px;
  }

  .about-features {
    grid-template-columns: 1fr;
  }

  .business-grid,
  .projects-grid,
  .qual-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-top,
  .footer-bottom {
    text-align: center;
    gap: 16px;
  }

  .footer-bottom .footer-divider {
    margin: 0 18px;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .project-meta-bar {
    flex-direction: column;
    gap: 12px;
  }
}

/* ===== 项目案例详情页 ===== */
.project-detail-meta {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 28px 0;
}

.project-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.project-meta-list {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

.project-meta-list span {
  font-size: 14px;
  color: var(--text-light);
}

.project-meta-list strong {
  color: var(--text);
  font-weight: 600;
  margin-right: 6px;
}

.project-meta-bar .btn {
  padding: 10px 22px;
  font-size: 14px;
}

.project-detail-content {
  padding: 64px 0 40px;
}

.project-detail-section {
  margin-bottom: 40px;
}

.project-detail-section h2 {
  font-size: 22px;
  margin-bottom: 18px;
  color: var(--primary-dark);
}

.project-detail-section p {
  line-height: 1.9;
  color: var(--text);
  margin-bottom: 16px;
}

.project-detail-section ul {
  list-style: disc;
  padding-left: 1.6em;
  margin-bottom: 16px;
}

.project-detail-section ul li {
  margin-bottom: 10px;
  line-height: 1.8;
}

.project-detail-section strong {
  color: var(--primary-dark);
}

.project-gallery-heading {
  font-size: 22px;
  margin-bottom: 24px;
  color: var(--primary-dark);
}

.project-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 60px;
}

/* 4 张图片时强制 2×2 布局 */
.project-gallery-grid.gallery-4 {
  grid-template-columns: repeat(2, 1fr);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.gallery-item {
  background: var(--bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.gallery-item:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.gallery-item img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
}

.project-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 32px 0 64px;
  border-top: 1px solid var(--border);
  gap: 16px;
}

.project-nav a {
  color: var(--primary);
  font-weight: 500;
  transition: color 0.2s;
}

.project-nav a:hover {
  color: var(--accent);
}

/* 图片灯箱 */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(6, 28, 51, 0.94);
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 100%;
  max-height: 88vh;
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  border-radius: 50%;
  color: var(--text-white);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  border-radius: 50%;
  color: var(--text-white);
  font-size: 22px;
  cursor: pointer;
  transition: background 0.2s;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lightbox-prev {
  left: 24px;
}

.lightbox-next {
  right: 24px;
}

/* ===== 响应式收尾：图集移动端单列 ===== */
@media (max-width: 768px) {
  .project-gallery-grid {
    grid-template-columns: 1fr;
  }

  .project-gallery-grid.gallery-4 {
    grid-template-columns: 1fr;
  }
}

/* ===== 联系页地图卡片 ===== */
.map-card {
  background: var(--bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.amap-container {
  width: 100%;
  height: 420px;
  border-radius: 12px 12px 0 0;
  background: #e6eef5;
}

.map-info {
  padding: 22px 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.map-address {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.6;
  text-indent: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.map-address svg {
  color: var(--accent);
  flex-shrink: 0;
}

.map-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.map-actions .btn {
  min-width: 152px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.map-actions .btn-secondary {
  background: #fff;
  color: var(--primary);
  border: 1px solid var(--border);
}

.map-actions .btn-secondary:hover {
  background: var(--bg-light);
}

@media (max-width: 768px) {
  .amap-container {
    height: 300px;
  }

  .map-info {
    padding: 20px;
    gap: 12px;
  }

  .map-address {
    font-size: 15px;
  }

  .map-actions {
    flex-direction: column;
    width: 100%;
  }

  .map-actions .btn {
    width: 100%;
  }
}

.map-placeholder {
  position: relative;
  min-height: 280px;
  background: linear-gradient(135deg, #eef4f9 0%, #f7f9fb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 18px;
  text-align: center;
  padding: 40px 32px;
}

/* 模拟地图网格背景 */
.map-placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(12, 58, 99, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(12, 58, 99, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.map-pin {
  position: relative;
  width: 48px;
  height: 48px;
  color: var(--primary);
  display: block;
  flex-shrink: 0;
  z-index: 1;
}

.map-address {
  position: relative;
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
  max-width: 520px;
  line-height: 1.6;
  z-index: 1;
  text-indent: 0;
  margin: 0;
}

.map-actions {
  position: relative;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  z-index: 1;
  margin-top: 4px;
}

.map-actions .btn {
  min-width: 152px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.map-actions .btn-secondary {
  background: #fff;
  color: var(--primary);
  border: 1px solid var(--border);
}

.map-actions .btn-secondary:hover {
  background: var(--bg-light);
}

.map-hint {
  position: relative;
  font-size: 12px;
  color: var(--text-light);
  z-index: 1;
  text-indent: 0;
  margin: 0;
}

@media (max-width: 768px) {
  .map-placeholder {
    min-height: auto;
    padding: 32px 20px;
    gap: 16px;
  }

  .map-address {
    font-size: 15px;
  }

  .map-actions {
    flex-direction: column;
    width: 100%;
    margin-top: 0;
  }

  .map-actions .btn {
    width: 100%;
  }
}
