:root {
  --red: #c4161c;
  --red-dark: #9e1015;
  --navy: #0b1f3a;
  --navy-deep: #061527;
  --gold: #c9a227;
  --gold-light: #e8d48b;
  --ink: #1a1a1a;
  --muted: #666;
  --line: #e5e5e5;
  --footer: #3a3a3a;
  --bg: #ffffff;
  --soft: #f7f7f8;
  --max: 1180px;
  --font-sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-serif: "Noto Serif SC", "Songti SC", "SimSun", serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  font-size: 15px;
}

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

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

.container {
  width: min(100% - 32px, var(--max));
  margin-inline: auto;
}

/* Top utility bar — like jiafupaimai */
.topbar {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
}

.topbar .container {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  padding: 8px 0;
}

.topbar a:hover {
  color: var(--gold-light);
}

/* Header */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-logo {
  width: 84px;
  height: 84px;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-text h1 {
  margin: 0;
  font-size: clamp(18px, 2.2vw, 26px);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.25;
}

.brand-text p {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.brand-slogan {
  color: var(--red);
  font-weight: 700;
  font-size: clamp(15px, 1.7vw, 18px);
  letter-spacing: 0.22em;
  white-space: nowrap;
  align-self: flex-end;
  line-height: 1.2;
  padding-bottom: 6px;
}

/* Nav */
.nav-wrap {
  border-block: 1px solid var(--line);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  position: relative;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}

.nav-list > li {
  position: relative;
  flex: 1 1 auto;
  text-align: center;
  max-width: 200px;
}

.nav-list > li > a {
  display: block;
  padding: 14px 12px;
  font-size: 24px;
  font-weight: 500;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-list > li > a:hover,
.nav-list > li > a.active,
.nav-list > li:hover > a {
  color: var(--red);
}

.nav-list > li > a.active {
  font-weight: 700;
}

.submenu {
  display: none;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 100%;
  min-width: 160px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
  padding: 6px 0;
  z-index: 60;
}

.nav-list > li:hover .submenu,
.nav-list > li:focus-within .submenu {
  display: block;
}

.submenu a {
  display: block;
  padding: 10px 18px;
  font-size: 16px;
  color: var(--ink);
  text-align: left;
  white-space: nowrap;
}

.submenu a:hover,
.submenu a.active {
  color: var(--red);
  background: #fff5f5;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: #fff;
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--navy);
}

.hero-slide {
  display: none;
  position: relative;
  min-height: clamp(280px, 36vw, 420px);
}

.hero-slide.is-active {
  display: block;
  animation: heroIn 0.7s ease;
}

@keyframes heroIn {
  from { opacity: 0.4; transform: scale(1.02); }
  to { opacity: 1; transform: scale(1); }
}

.hero-slide img {
  width: 100%;
  height: clamp(280px, 36vw, 420px);
  object-fit: cover;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}

.hero-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  padding: 0;
}

.hero-dots button.is-active {
  background: var(--gold);
  transform: scale(1.15);
}

.page-banner {
  width: 100%;
  overflow: hidden;
  background: var(--navy);
}

.page-banner img {
  width: 100%;
  height: clamp(220px, 28vw, 360px);
  object-fit: cover;
}

/* Breadcrumb / side links */
.page-body {
  padding: 36px 0 64px;
}

.crumb {
  margin-bottom: 24px;
  font-size: 14px;
}

.crumb a {
  color: #1a5fb4;
}

.crumb a:hover {
  text-decoration: underline;
}

.content-layout {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 36px;
  align-items: start;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 4px;
}

.side-nav a {
  color: var(--ink);
  font-size: 14px;
}

.side-nav a.active,
.side-nav a:hover {
  color: #1a5fb4;
}

.main-panel {
  min-width: 0;
}

.section-title {
  text-align: center;
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 700;
  margin: 0 0 28px;
  letter-spacing: 0.06em;
}

.prose {
  max-width: 860px;
  margin: 0 auto;
  color: #333;
  font-size: 15px;
  text-align: justify;
  text-indent: 2em;
  line-height: 1.95;
}

.prose.no-indent {
  text-indent: 0;
}

.prose p {
  margin: 0 0 1.1em;
}

.home-intro {
  padding: 48px 0 56px;
}

.home-intro .prose {
  max-width: 920px;
}

/* Feature cards under home — inspired by jiafupaimai sections */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}

.feature {
  background: var(--soft);
  padding: 28px 22px;
  border-top: 3px solid var(--red);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.feature:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.06);
}

.feature h3 {
  margin: 0 0 10px;
  font-size: 17px;
  color: var(--navy);
}

.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.feature a {
  display: inline-block;
  margin-top: 14px;
  color: var(--red);
  font-size: 13px;
  font-weight: 600;
}

/* Certificates */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin-top: 32px;
  max-width: 820px;
  margin-inline: auto;
}

.cert-card {
  background: #fff;
  border: 1px solid var(--line);
  padding: 12px;
  transition: box-shadow 0.25s ease;
}

.cert-card:hover {
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.cert-card img {
  width: 100%;
  height: auto;
  cursor: zoom-in;
}

.cert-card figcaption {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-top: 10px;
}

/* Announcement empty */
.empty-notice {
  text-align: center;
  padding: 80px 20px 100px;
  color: #999;
  font-size: 22px;
  letter-spacing: 0.2em;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: stretch;
  margin-top: 8px;
}

.contact-photo {
  overflow: hidden;
  background: #111;
}

.contact-photo img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
}

.contact-card {
  background: #f3f3f3;
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
}

.contact-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  font-size: 15px;
  line-height: 1.6;
}

.contact-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 13px;
  margin-top: 2px;
}

/* Legal docs */
.legal-doc {
  max-width: 900px;
  margin: 0 auto;
}

.legal-preface {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  margin-bottom: 28px !important;
  text-indent: 0 !important;
}

.legal-chapter {
  font-size: 18px;
  margin: 32px 0 16px;
  text-align: center;
  color: var(--navy);
}

.legal-section {
  font-size: 16px;
  margin: 22px 0 12px;
  color: var(--navy);
}

.legal-article {
  margin: 0 0 12px;
  text-align: justify;
  line-height: 1.9;
  color: #333;
}

.legal-note {
  color: var(--red);
  text-align: center;
  margin-top: 28px;
  font-size: 14px;
}

/* Footer */
.site-footer {
  background: var(--footer);
  color: #fff;
  padding: 28px 0;
}

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  color: #111;
  padding: 10px 16px;
  border-radius: 2px;
}

.footer-brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.footer-brand strong {
  display: block;
  font-size: 14px;
  line-height: 1.3;
}

.footer-brand span {
  display: block;
  font-size: 11px;
  color: #666;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  flex: 1;
  min-width: 220px;
}

.footer-contact a {
  color: rgba(255, 255, 255, 0.9);
}

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

.footer-contact span {
  color: rgba(255, 255, 255, 0.55);
  margin-right: 6px;
}

.footer-meta {
  text-align: right;
  font-size: 13px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.9);
}

.footer-meta a {
  color: rgba(255, 255, 255, 0.9);
}

.footer-meta a:hover {
  color: var(--gold-light);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
}

.lightbox.is-open {
  display: flex;
}

.lightbox img {
  max-width: min(920px, 100%);
  max-height: 90vh;
  object-fit: contain;
  background: #fff;
  padding: 8px;
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  color: #fff;
  font-size: 28px;
  background: none;
  border: 0;
  cursor: pointer;
}

/* Motion */
@media (prefers-reduced-motion: reduce) {
  .hero-slide.is-active,
  .feature {
    animation: none;
    transition: none;
  }
}

/* Responsive */
@media (max-width: 900px) {
  .brand-slogan {
    display: none;
  }

  .content-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .side-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
  }

  .feature-grid,
  .cert-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .footer-contact,
  .footer-meta {
    text-align: left;
  }
}

@media (max-width: 720px) {
  .site-header .container {
    padding: 14px 0;
  }

  .brand-logo {
    width: 48px;
    height: 48px;
  }

  .nav-toggle {
    display: inline-flex;
    margin: 8px 16px 8px auto;
  }

  .nav-wrap .container {
    display: flex;
    flex-direction: column;
    width: min(100% - 0px, var(--max));
  }

  .nav-list {
    display: none;
    flex-direction: column;
    width: 100%;
    border-top: 1px solid var(--line);
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-list > li {
    max-width: none;
    text-align: left;
    border-bottom: 1px solid var(--line);
  }

  .nav-list > li > a {
    padding: 12px 16px;
  }

  .submenu {
    position: static;
    transform: none;
    display: block;
    border: 0;
    box-shadow: none;
    background: var(--soft);
    padding: 0;
  }

  .submenu a {
    padding-left: 28px;
  }

  .topbar .container {
    justify-content: center;
  }
}
