/* ============ 基础与设计变量 ============ */
:root {
  --color-primary: #14538f;      /* 港口蓝（主品牌色） */
  --color-primary-dark: #0c3560; /* 深海军蓝 */
  --color-accent: #e8632a;       /* 门机橙（点缀色） */
  --color-bg: #ffffff;
  --color-bg-alt: #f2f6fa;
  --color-text: #1e2a36;
  --color-text-muted: #5c6b7a;
  --radius: 8px;
  --shadow: 0 8px 30px rgba(12, 53, 96, 0.1);
  --container: 1180px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

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

html { scroll-behavior: smooth; background: var(--color-bg); }

body {
  font-family: var(--font);
  color: var(--color-text);
  line-height: 1.6;
  font-size: 16px;
  background: var(--color-bg);
}

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

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

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* ============ 顶部信息栏 ============ */
.topbar {
  background: var(--color-primary-dark);
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  padding: 7px 0;
}
.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
@media (max-width: 640px) {
  .topbar-right { display: none; }
}

/* ============ 导航栏 ============ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(12, 53, 96, 0.08);
  transition: box-shadow 0.3s;
}
.header.scrolled { box-shadow: 0 4px 20px rgba(12, 53, 96, 0.12); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 16px;
}

.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-logo { width: 44px; height: 44px; object-fit: contain; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.brand-text strong { font-size: 17px; color: var(--color-primary-dark); white-space: nowrap; }
.brand-text small { font-size: 10px; letter-spacing: 2px; color: var(--color-text-muted); }

.nav { display: flex; gap: 4px; }
.nav-link {
  padding: 8px 14px;
  font-size: 15px;
  color: var(--color-text);
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  position: relative;
}
.nav-link:hover { color: var(--color-primary); background: var(--color-bg-alt); }
.nav-link.active { color: var(--color-primary); font-weight: 600; }
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 2px;
  background: var(--color-accent);
  border-radius: 2px;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  border: none;
  background: none;
  cursor: pointer;
  padding: 8px;
}
.menu-toggle span {
  display: block;
  height: 2px;
  background: var(--color-primary-dark);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
  .menu-toggle { display: flex; }
  .brand-text strong { font-size: 15px; }
  .nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 12px 20px 20px;
    border-bottom: 1px solid rgba(12, 53, 96, 0.08);
    box-shadow: 0 16px 30px rgba(12, 53, 96, 0.12);
    display: none;
  }
  .nav.open { display: flex; }
  .nav-link { padding: 12px 8px; }
}

/* ============ 首页轮播 ============ */
.hero {
  position: relative;
  height: min(78vh, 680px);
  min-height: 460px;
  overflow: hidden;
  background: var(--color-primary-dark);
}
.hero-slides, .hero-slide { position: absolute; inset: 0; }
.hero-slide {
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.9s ease;
  display: flex;
  align-items: center;
}
.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8, 32, 58, 0.78) 0%, rgba(8, 32, 58, 0.45) 55%, rgba(8, 32, 58, 0.15) 100%);
}
.hero-slide.active { opacity: 1; z-index: 1; }

.hero-content { position: relative; z-index: 2; width: 100%; color: #fff; }
.hero-tag {
  display: inline-block;
  background: var(--color-accent);
  color: #fff;
  font-size: 14px;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
  letter-spacing: 1px;
}
.hero-title {
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.25;
  font-weight: 700;
  text-wrap: balance;
  margin-bottom: 16px;
}
.hero-desc {
  font-size: clamp(15px, 2vw, 18px);
  color: rgba(255, 255, 255, 0.88);
  max-width: 560px;
  margin-bottom: 28px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s, color 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--color-accent); color: #fff; }
.btn-primary:hover { background: #d1531d; }
.btn-ghost {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.14); }
.btn-block { width: 100%; }

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.2s;
}
.hero-arrow:hover { background: rgba(255, 255, 255, 0.32); }
.hero-arrow.prev { left: 18px; }
.hero-arrow.next { right: 18px; }
@media (max-width: 640px) { .hero-arrow { display: none; } }

.hero-dots {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  gap: 10px;
}
.hero-dots button {
  width: 34px;
  height: 4px;
  border: none;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: background 0.25s;
}
.hero-dots button.active { background: var(--color-accent); }

/* ============ 数据统计 ============ */
.stats {
  background: var(--color-primary);
  color: #fff;
  padding: 44px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  text-align: center;
}
.stat-num {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.1;
}
.stat-num em {
  font-style: normal;
  font-size: 15px;
  font-weight: 500;
  margin-left: 4px;
  color: rgba(255, 255, 255, 0.8);
}
.stat p { margin-top: 6px; font-size: 14px; color: rgba(255, 255, 255, 0.78); }
@media (max-width: 900px) { .stats-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }

/* ============ 通用区块 ============ */
.section { padding: 84px 0; }
.section-alt { background: var(--color-bg-alt); }

.section-head { text-align: center; margin-bottom: 52px; }
.section-tag {
  color: var(--color-accent);
  font-size: 13px;
  letter-spacing: 4px;
  font-weight: 700;
  margin-bottom: 8px;
}
.section-title {
  font-size: clamp(26px, 3.4vw, 36px);
  color: var(--color-primary-dark);
  font-weight: 700;
  position: relative;
  display: inline-block;
  padding-bottom: 14px;
}
.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 52px;
  height: 3px;
  border-radius: 2px;
  background: var(--color-accent);
}
.section-sub {
  color: var(--color-text-muted);
  margin-top: 14px;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
  text-wrap: pretty;
}

/* ============ 关于我们 ============ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 48px;
  align-items: center;
}
.about-media { position: relative; }
.about-media img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  height: 420px;
  object-fit: cover;
}
.about-badge {
  position: absolute;
  left: -18px;
  bottom: -22px;
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius);
  padding: 18px 22px;
  box-shadow: var(--shadow);
  max-width: 230px;
}
.about-badge strong { display: block; font-size: 32px; line-height: 1; }
.about-badge span { font-size: 13px; color: rgba(255, 255, 255, 0.82); }

.about-body h3 {
  font-size: 22px;
  color: var(--color-primary-dark);
  margin-bottom: 16px;
  text-wrap: balance;
}
.about-body p { color: var(--color-text-muted); margin-bottom: 14px; }
.about-points { list-style: none; margin: 6px 0 26px; }
.about-points li {
  padding-left: 26px;
  position: relative;
  margin-bottom: 10px;
  color: var(--color-text);
}
.about-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--color-accent);
}
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-badge { left: 14px; bottom: -18px; }
  .about-body { margin-top: 36px; }
}

/* ============ 码头设施 ============ */
.facility-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.facility-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s;
}
.facility-card:hover { transform: translateY(-6px); }
.facility-card img { height: 210px; width: 100%; object-fit: cover; }
.facility-body { padding: 22px 22px 26px; }
.facility-body h3 { color: var(--color-primary-dark); font-size: 19px; margin-bottom: 10px; }
.facility-body p { color: var(--color-text-muted); font-size: 14.5px; }
@media (max-width: 900px) { .facility-grid { grid-template-columns: 1fr; } }

.facility-specs {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
.spec {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid rgba(12, 53, 96, 0.08);
  text-align: center;
  padding: 20px 10px;
}
.spec strong { display: block; font-size: 20px; color: var(--color-primary); }
.spec span { font-size: 13px; color: var(--color-text-muted); }
@media (max-width: 900px) { .facility-specs { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .facility-specs { grid-template-columns: repeat(2, 1fr); } }

/* ============ 业务服务 ============ */
.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.service-card {
  background: #fff;
  border: 1px solid rgba(12, 53, 96, 0.08);
  border-top: 3px solid var(--color-primary);
  border-radius: var(--radius);
  padding: 30px 24px;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-top-color: var(--color-accent);
}
.service-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: var(--color-bg-alt);
  color: var(--color-primary);
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}
.service-icon svg { width: 30px; height: 30px; }
.service-card h3 { font-size: 18px; color: var(--color-primary-dark); margin-bottom: 10px; }
.service-card p { font-size: 14px; color: var(--color-text-muted); }
@media (max-width: 1000px) { .service-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .service-grid { grid-template-columns: 1fr; } }

/* ============ 港区风貌 ============ */
.gallery-section { background: linear-gradient(180deg, var(--color-bg-alt) 0%, #fff 100%); }

.gallery-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 28px;
  align-items: stretch;
}

.gallery-feature,
.gallery-card {
  margin: 0;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.gallery-feature {
  position: relative;
  min-height: 520px;
}

.gallery-feature img,
.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-feature img {
  position: absolute;
  inset: 0;
}

.gallery-feature::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 32, 58, 0.08) 0%, rgba(8, 32, 58, 0.74) 100%);
}

.gallery-feature figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  color: #fff;
  padding: 34px;
}

.gallery-feature span {
  display: inline-block;
  margin-bottom: 10px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--color-accent);
  font-size: 13px;
  font-weight: 700;
}

.gallery-feature h3 {
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.35;
  margin-bottom: 10px;
  text-wrap: balance;
}

.gallery-feature p {
  color: rgba(255, 255, 255, 0.86);
  max-width: 520px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.gallery-card {
  min-height: 245px;
  position: relative;
  transition: transform 0.25s, box-shadow 0.25s;
}

.gallery-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 34px rgba(12, 53, 96, 0.16);
}

.gallery-card img {
  height: 100%;
  min-height: 245px;
  transition: transform 0.35s;
}

.gallery-card:hover img { transform: scale(1.04); }

.gallery-card figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 34px 16px 16px;
  color: #fff;
  background: linear-gradient(180deg, rgba(8, 32, 58, 0) 0%, rgba(8, 32, 58, 0.78) 100%);
}

.gallery-card strong {
  display: block;
  font-size: 16px;
  line-height: 1.25;
}

.gallery-card span {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.82);
}

@media (max-width: 1000px) {
  .gallery-layout { grid-template-columns: 1fr; }
  .gallery-feature { min-height: 430px; }
  .gallery-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .gallery-card,
  .gallery-card img { min-height: 210px; }
}

@media (max-width: 760px) {
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .gallery-feature { min-height: 360px; }
  .gallery-feature figcaption { padding: 24px; }
  .gallery-grid { grid-template-columns: 1fr; }
}

/* ============ 企业精神横幅 ============ */
.banner {
  background:
    linear-gradient(rgba(8, 32, 58, 0.82), rgba(8, 32, 58, 0.82)),
    url("../img/spirit-banner-yard.jpg") center/cover fixed;
  color: #fff;
  padding: 78px 0;
  text-align: center;
}
.banner h2 { font-size: clamp(24px, 3.4vw, 34px); margin-bottom: 14px; letter-spacing: 2px; }
.banner p {
  max-width: 660px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.85);
  text-wrap: pretty;
}

/* ============ 区位优势 ============ */
.location-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.location-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.location-card img { height: 260px; width: 100%; object-fit: cover; object-position: center; }
.location-card figcaption { padding: 20px 22px 24px; }
.location-card h3 { font-size: 17px; color: var(--color-primary-dark); margin-bottom: 8px; }
.location-card p { font-size: 14px; color: var(--color-text-muted); }
@media (max-width: 900px) { .location-grid { grid-template-columns: 1fr; } }

/* ============ 新闻中心 ============ */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.news-card {
  background: #fff;
  border: 1px solid rgba(12, 53, 96, 0.08);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
}
.news-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.news-card img { height: 190px; width: 100%; object-fit: cover; }
.news-body { padding: 20px 22px 24px; }
.news-body time { font-size: 13px; color: var(--color-accent); font-weight: 600; }
.news-body h3 { font-size: 17px; color: var(--color-primary-dark); margin: 8px 0 10px; line-height: 1.45; }
.news-body p { font-size: 14px; color: var(--color-text-muted); margin-bottom: 14px; }
.news-more { font-size: 14px; color: var(--color-primary); font-weight: 600; }
.news-more:hover { color: var(--color-accent); }
@media (max-width: 900px) { .news-grid { grid-template-columns: 1fr; } }

/* ============ 联系我们 ============ */
.section-contact { background: var(--color-primary-dark); color: #fff; }
.section-contact .section-tag { color: var(--color-accent); }
.section-contact .section-title { color: #fff; padding-bottom: 14px; }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
.contact-list { list-style: none; margin-top: 28px; }
.contact-list li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.contact-list strong { font-size: 14px; color: var(--color-accent); }
.contact-list span { color: rgba(255, 255, 255, 0.9); }

.contact-form {
  background: #fff;
  color: var(--color-text);
  border-radius: var(--radius);
  padding: 32px 30px;
  box-shadow: var(--shadow);
}
.contact-form h3 { color: var(--color-primary-dark); font-size: 20px; margin-bottom: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form label { display: block; margin-bottom: 16px; }
.contact-form label span {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--color-primary-dark);
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid rgba(12, 53, 96, 0.2);
  border-radius: 6px;
  font-family: inherit;
  font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(20, 83, 143, 0.14);
}
.form-hint { margin-top: 12px; font-size: 14px; text-align: center; color: var(--color-primary); min-height: 20px; }
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .form-row { grid-template-columns: 1fr; }
}

/* ============ 页脚 ============ */
.footer {
  background: #081f38;
  color: rgba(255, 255, 255, 0.75);
  padding: 40px 0;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
}
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand img { width: 46px; height: 46px; object-fit: contain; background: #fff; border-radius: 8px; padding: 4px; }
.footer-brand strong { color: #fff; font-size: 17px; display: block; }
.footer-brand p { font-size: 11px; letter-spacing: 3px; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; font-size: 14px; }
.footer-nav a:hover { color: #fff; }
.footer-copy { font-size: 13px; color: rgba(255, 255, 255, 0.45); }

/* ============ 返回顶部 ============ */
.back-top {
  position: fixed;
  right: 24px;
  bottom: 28px;
  z-index: 90;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--color-primary);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.3s, transform 0.3s, background 0.2s;
}
.back-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-top:hover { background: var(--color-accent); }

/* ============ 滚动显现动画 ============ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-slide { transition: none; }
}
