/* ══════════════════════════════════════════════════════════════════════════
   Shanghai Customs — Homepage redesign (scoped to body.home)
   Customs-official BRIGHT blue theme (#1e63c8 primary + golden-yellow hover
   accents; brightened from the earlier dark navy per user request). Layout:
   split hero, numbered service index, blue coverage band + marquee, cargo
   chips, editorial news list, blue CTA band. Clicking services/chips/photos
   scrolls to #contact. Accent locked: BLUE; gold reserved for highlights.
   ══════════════════════════════════════════════════════════════════════════ */

.home {
  /* Customs navy theme (ref: beijing-custom.com). Variable NAMES kept from the
     earlier red theme for stability — --hx-red* now hold the navy palette. */
  --hx-red: #1e63c8;
  --hx-red-deep: #14498f;
  --hx-red-ink: #0d3a75;
  --hx-paper: #f7f9fc;
  --hx-paper-2: #eef2f7;
  --hx-ink: #1f2933;
  --hx-ink-2: #52606d;
  --hx-line: #d9e2ec;
  --hx-gold: #f0b429;
  --hx-r: 8px;
  background: var(--hx-paper);
}

/* Home uses a left-aligned, architectural rhythm instead of centered sections */
.home .hx-section { padding: 92px 0; }
.home .hx-shead { max-width: 760px; margin: 0 0 44px; }
.home .hx-kicker {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 12px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase;
  color: var(--hx-red);
}
.home .hx-kicker::before { content: ""; width: 26px; height: 2px; background: var(--hx-red); display: inline-block; }
.home .hx-title {
  font-size: clamp(28px, 3.8vw, 44px); line-height: 1.06; letter-spacing: -1px;
  font-weight: 850; color: var(--hx-ink); margin: 16px 0 0; max-width: 18ch;
}
.home .hx-sub { color: var(--hx-ink-2); font-size: 17px; margin: 14px 0 0; max-width: 60ch; }

/* ── Header tweak for home: red underline nav, seal brand ── */
.home .site-header { background: rgba(247, 249, 252, .92); }
.home .nav a:hover { background: transparent; color: var(--hx-red); }
.home .nav a { position: relative; }
.home .nav a::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px;
  background: var(--hx-red); transform: scaleX(0); transform-origin: left; transition: transform .22s ease;
}
.home .nav a:hover::after { transform: scaleX(1); }

/* ══ HERO — asymmetric split, real photo, light/paper (not dark orbs) ══ */
.home .hx-hero { position: relative; overflow: hidden; background: var(--hx-paper); border-bottom: 1px solid var(--hx-line); }
/* faint logo watermark for "official" texture — multiply drops the logo's white
   background against the paper, leaving a soft red emblem */
.home .hx-hero-seal {
  position: absolute; top: 26px; right: 3%; width: 300px; height: 300px; object-fit: contain;
  opacity: .1; mix-blend-mode: multiply; pointer-events: none; z-index: 0;
}
.home .hx-hero-inner {
  position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr;
  gap: 54px; align-items: center; padding: 64px 0 0;
}
.home .hx-eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 22px;
  font-size: 12.5px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--hx-red-deep); background: #fff; border: 1px solid var(--hx-line);
  border-left: 3px solid var(--hx-red); padding: 8px 14px; border-radius: 4px;
}
.home .hx-h1 {
  font-size: clamp(34px, 5.2vw, 62px); line-height: 1.03; letter-spacing: -1.6px;
  font-weight: 880; color: var(--hx-ink); margin: 0 0 20px; max-width: 15ch;
}
.home .hx-h1 .em { color: var(--hx-red); }
.home .hx-lead { font-size: 18.5px; line-height: 1.6; color: var(--hx-ink-2); max-width: 46ch; margin: 0 0 30px; }
.home .hx-cta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.home .hx-btn {
  display: inline-flex; align-items: center; gap: 9px; padding: 15px 26px; border-radius: 6px;
  font-weight: 800; font-size: 15.5px; cursor: pointer; border: none; letter-spacing: .2px;
  transition: transform .12s ease, box-shadow .25s ease, background .2s ease, color .2s ease;
}
.home .hx-btn:active { transform: translateY(1px); }
.home .hx-btn-primary { background: var(--hx-red); color: #fff; box-shadow: 0 10px 26px rgba(26,54,93,.28); }
.home .hx-btn-primary:hover { background: var(--hx-red-deep); color: #fff; transform: translateY(-2px); box-shadow: 0 16px 34px rgba(26,54,93,.38); }
.home .hx-btn-ghost { background: transparent; color: var(--hx-ink); border: 1.5px solid var(--hx-ink); }
.home .hx-btn-ghost:hover { background: var(--hx-ink); color: #fff; }

/* Inline credibility stats merged into hero (no separate 4-card band) */
.home .hx-stats { display: flex; gap: 34px; margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--hx-line); flex-wrap: wrap; }
.home .hx-stat .n { font-size: 30px; font-weight: 850; color: var(--hx-ink); letter-spacing: -1px; line-height: 1; }
.home .hx-stat .n .u { color: var(--hx-red); }
.home .hx-stat .l { font-size: 12.5px; color: var(--hx-ink-2); margin-top: 7px; font-weight: 600; }

/* Hero media: real port photo with red duotone; solid red panel fallback */
.home .hx-media {
  position: relative; align-self: stretch; min-height: 460px; border-radius: var(--hx-r); overflow: hidden;
  background: linear-gradient(150deg, var(--hx-red) 0%, var(--hx-red-deep) 70%, var(--hx-red-ink) 100%);
  box-shadow: 0 30px 60px rgba(18,38,63,.25); border: 1px solid rgba(0,0,0,.05);
}
.home .hx-media > img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.home .hx-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(30,99,200,.08), rgba(13,58,117,.28) 85%);
}
.home .hx-badge {
  position: absolute; z-index: 2; left: 22px; bottom: 22px; right: 22px;
  background: rgba(255,255,255,.94); backdrop-filter: blur(6px);
  border-radius: 8px; padding: 16px 18px; display: flex; align-items: center; gap: 14px;
  box-shadow: 0 12px 30px rgba(0,0,0,.18);
}
.home .hx-badge .seal {
  width: 48px; height: 48px; flex-shrink: 0; border-radius: 8px; background: #fff;
  display: grid; place-items: center; overflow: hidden;
}
.home .hx-badge .seal img { width: 100%; height: 100%; object-fit: contain; }
.home .hx-badge .bt { font-weight: 800; font-size: 14.5px; color: var(--hx-ink); }
.home .hx-badge .bs { font-size: 12.5px; color: var(--hx-ink-2); margin-top: 2px; }

/* ══ SERVICES — numbered editorial index (not equal cards) ══ */
.home #services { background: #fff; border-bottom: 1px solid var(--hx-line); }
.home .hx-services { display: grid; grid-template-columns: 1fr 1fr; gap: 0 56px; }
.home .hx-srow {
  display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: start;
  padding: 26px 8px 26px 0; border-top: 1px solid var(--hx-line);
  transition: padding-left .2s ease;
}
.home .hx-srow:hover { padding-left: 10px; }
.home .hx-snum { font-size: 15px; font-weight: 800; color: var(--hx-red); font-variant-numeric: tabular-nums; padding-top: 4px; }
.home .hx-srow:hover .hx-snum { color: var(--hx-red-deep); }
.home .hx-sbody h3 { margin: 0 0 6px; font-size: 20px; font-weight: 800; color: var(--hx-ink); letter-spacing: -.3px; }
.home .hx-srow:hover .hx-sbody h3 { color: var(--hx-red); }
.home .hx-sbody p { margin: 0; font-size: 14.5px; color: var(--hx-ink-2); line-height: 1.55; }

/* ══ OPERATIONS — China customs field photos (navy caption bars, ref beijing site) ══ */
.home .hx-ops-section { background: var(--hx-paper); padding-top: 0; }
.home .hx-ops { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.home .hx-op {
  margin: 0; border-radius: var(--hx-r); overflow: hidden; background: #fff;
  border: 1px solid var(--hx-line); box-shadow: 0 6px 18px rgba(18,38,63,.07);
  transition: transform .18s ease, box-shadow .25s ease;
  display: flex; flex-direction: column;
}
.home .hx-op:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(18,38,63,.16); }
.home .hx-op img { width: 100%; aspect-ratio: 292 / 163; object-fit: cover; display: block; }
.home .hx-op figcaption {
  background: var(--hx-red); color: #fff; font-size: 13.5px; font-weight: 700;
  padding: 10px 14px; letter-spacing: .2px;
  flex: 1; display: flex; align-items: center;
}
.home .hx-op:hover figcaption { color: var(--hx-gold); }
@media (max-width: 960px) { .home .hx-ops { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .home .hx-ops { grid-template-columns: 1fr; } }

/* ══ COVERAGE — full-width deep red band with ports chips + trade-lane marquee ══ */
.home .hx-band { background: linear-gradient(135deg, var(--hx-red-deep) 0%, var(--hx-red-ink) 100%); color: #fff; padding: 72px 0 0; overflow: hidden; }
.home .hx-band-inner { display: grid; grid-template-columns: .8fr 1.2fr; gap: 44px; align-items: center; }
.home .hx-band h2 { font-size: clamp(26px, 3.4vw, 40px); line-height: 1.08; letter-spacing: -1px; font-weight: 850; margin: 0 0 14px; }
.home .hx-band p { color: rgba(255,255,255,.78); font-size: 16px; margin: 0; max-width: 42ch; }
.home .hx-ports { display: flex; flex-wrap: wrap; gap: 10px; }
.home .hx-port {
  border: 1px solid rgba(255,255,255,.28); border-radius: 999px; padding: 9px 16px;
  font-size: 13.5px; font-weight: 700; color: #fff; background: rgba(255,255,255,.06);
}
.home .hx-port .d { color: var(--hx-gold); margin-right: 7px; }
.home .hx-marquee { margin-top: 46px; border-top: 1px solid rgba(255,255,255,.14); padding: 18px 0 26px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.home .hx-marquee-track { display: inline-flex; gap: 40px; white-space: nowrap; animation: hxmarq 40s linear infinite; }
.home .hx-marquee-track span { color: rgba(255,255,255,.85); font-weight: 800; font-size: 17px; display: inline-flex; align-items: center; gap: 40px; letter-spacing: .3px; }
.home .hx-marquee-track span::after { content: "⇄"; color: var(--hx-gold); font-weight: 400; }
@keyframes hxmarq { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ══ VIDEO — framed on paper (functional carousel kept) ══ */
.home #videos { background: var(--hx-paper-2); border-bottom: 1px solid var(--hx-line); }
.home #videos .section-head { text-align: left; max-width: 760px; margin: 0 0 40px; }
.home #videos .section-head h2 { color: var(--hx-ink); font-size: clamp(28px,3.8vw,44px); letter-spacing: -1px; }
.home #videos .section-head p { color: var(--hx-ink-2); }
.home #videos .section-head .eyebrow { display: none; } /* eyebrow budget */
.home .video-carousel { margin: 0; max-width: 100%; }
.home .vc-player { border-radius: var(--hx-r); border: 1px solid var(--hx-line); }
.home .vc-arrow { border-color: var(--hx-line); background: #fff; color: var(--hx-ink); }
.home .vc-arrow:hover { background: var(--hx-red); color: #fff; border-color: var(--hx-red); }
.home .vc-caption { color: var(--hx-ink); }
.home .vc-thumb { border-color: var(--hx-line); background: #fff; color: var(--hx-ink-2); }
.home .vc-thumb.active { background: var(--hx-red); color: #fff; border-color: var(--hx-red); }

/* ══ CARGO — dense chip grid (no image cards, no sidebar) ══ */
.home #products { background: #fff; border-bottom: 1px solid var(--hx-line); }
.home .hx-cargo { display: flex; flex-wrap: wrap; gap: 10px; }
.home .hx-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 16px; border-radius: 6px;
  border: 1px solid var(--hx-line); background: var(--hx-paper); color: var(--hx-ink);
  font-size: 14.5px; font-weight: 700; cursor: default; transition: all .16s ease;
}
.home .hx-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--hx-red); flex-shrink: 0; }
.home .hx-chip:hover { border-color: var(--hx-red); background: #fff; color: var(--hx-red); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(26,54,93,.12); }
.home .hx-chip .sub { color: var(--hx-ink-2); font-weight: 500; font-size: 12.5px; }
.home .hx-chip:hover .sub { color: var(--hx-red-deep); }

/* ══ NEWS — editorial hairline list (not 3 cards) ══ */
.home #news { background: var(--hx-paper); }
.home .hx-news { border-top: 1px solid var(--hx-line); }
.home .hx-nrow {
  display: grid; grid-template-columns: 150px 1fr auto; gap: 22px; align-items: center;
  padding: 22px 6px; border-bottom: 1px solid var(--hx-line); text-decoration: none;
  transition: background .16s ease, padding-left .2s ease;
}
.home .hx-nrow:hover { background: #fff; padding-left: 14px; }
.home .hx-ndate { font-size: 13px; color: var(--hx-ink-2); font-weight: 700; font-variant-numeric: tabular-nums; }
.home .hx-nsrc { display: block; color: var(--hx-red); font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; margin-top: 4px; }
.home .hx-ntitle { font-size: 18px; font-weight: 800; color: var(--hx-ink); line-height: 1.35; }
.home .hx-nrow:hover .hx-ntitle { color: var(--hx-red); }
.home .hx-narrow { color: var(--hx-red); font-size: 20px; font-weight: 700; opacity: .5; transition: opacity .16s, transform .16s; }
.home .hx-nrow:hover .hx-narrow { opacity: 1; transform: translateX(4px); }
.home .hx-news-more { margin-top: 32px; }

/* ══ FAQ — native <details> accordion (crawlable, zero-JS) ══ */
.home .hx-faq-section { background: #fff; border-top: 1px solid var(--hx-line); }
.home .hx-faq { max-width: 860px; }
.home .hx-qa { border-bottom: 1px solid var(--hx-line); }
.home .hx-qa summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 20px 4px; font-size: 17px; font-weight: 800; color: var(--hx-ink);
  transition: color .15s ease;
}
.home .hx-qa summary::-webkit-details-marker { display: none; }
.home .hx-qa summary::after {
  content: "+"; flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
  border: 1.5px solid var(--hx-line); display: grid; place-items: center;
  font-size: 18px; font-weight: 600; color: var(--hx-red); transition: all .2s ease;
}
.home .hx-qa[open] summary { color: var(--hx-red); }
.home .hx-qa[open] summary::after { content: "–"; background: var(--hx-red); border-color: var(--hx-red); color: #fff; }
.home .hx-qa summary:hover { color: var(--hx-red); }
.home .hx-qa p { margin: 0; padding: 0 40px 20px 4px; color: var(--hx-ink-2); font-size: 15px; line-height: 1.7; max-width: 72ch; }
[dir="rtl"] .home .hx-qa p { padding: 0 4px 20px 40px; }

/* ══ CTA — bold red band with inline contact channels ══ */
.home .hx-ctaband { background: var(--hx-red); color: #fff; padding: 76px 0; position: relative; overflow: hidden; }
/* Logo emblem as a subtle tonal watermark. multiply drops the logo's white
   background against the red band, leaving only the ship-ring in a darker red. */
.home .hx-cta-seal {
  position: absolute; right: -40px; top: 50%; transform: translateY(-50%); z-index: 0;
  width: 380px; height: 380px; object-fit: contain; pointer-events: none;
  mix-blend-mode: multiply; opacity: .55;
}
.home .hx-ctaband-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr .9fr; gap: 44px; align-items: center; }
.home .hx-ctaband h2 { font-size: clamp(28px, 4vw, 46px); line-height: 1.05; letter-spacing: -1.2px; font-weight: 870; margin: 0 0 16px; }
.home .hx-ctaband p { color: rgba(255,255,255,.85); font-size: 17px; margin: 0 0 26px; max-width: 44ch; }
.home .hx-ctaband .hx-btn-primary { background: #fff; color: var(--hx-red); box-shadow: 0 12px 30px rgba(0,0,0,.2); }
.home .hx-ctaband .hx-btn-primary:hover { background: var(--hx-ink); color: #fff; }
.home .hx-channels { display: grid; gap: 12px; }
.home .hx-channel {
  display: flex; align-items: center; gap: 14px; background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.18); border-radius: 8px; padding: 15px 18px; text-decoration: none;
  transition: background .16s ease, transform .16s ease;
}
.home .hx-channel:hover { background: rgba(255,255,255,.18); color: #fff; transform: translateX(4px); }
.home .hx-channel .ci { width: 40px; height: 40px; flex-shrink: 0; border-radius: 8px; background: rgba(255,255,255,.15); display: grid; place-items: center; color: #fff; }
.home .hx-channel .ci svg { width: 20px; height: 20px; }
.home .hx-channel .ctxt { display: flex; flex-direction: column; gap: 3px; line-height: 1.2; }
.home .hx-channel .ck { font-size: 11.5px; text-transform: uppercase; letter-spacing: .6px; color: rgba(255,255,255,.7); font-weight: 700; }
.home .hx-channel .cv { font-size: 15px; font-weight: 700; color: #fff; word-break: break-word; }

/* Footer brand logo — seated on a white chip so the emblem reads on the dark footer */
.home .footer-logo {
  width: 58px; height: 58px; border-radius: 12px; background: #fff; padding: 7px;
  display: grid; place-items: center; margin-bottom: 16px; box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.home .footer-logo img { width: 100%; height: 100%; object-fit: contain; }

/* Clickable display elements that scroll to the contact band */
.home .hx-srow, .home .hx-chip, .home .hx-op { cursor: pointer; }

/* ══ INQUIRY form ══ */
.home .hx-inquiry { background: var(--hx-paper-2); padding: 88px 0; border-top: 1px solid var(--hx-line); }
.home .hx-inq-head { max-width: 760px; margin: 0 0 34px; }
.home .hx-inq-form {
  background: #fff; border: 1px solid var(--hx-line); border-radius: 14px;
  box-shadow: 0 18px 44px rgba(28,21,18,.08); padding: 30px; max-width: 860px;
  border-top: 4px solid var(--hx-red);
}
.home .hx-inq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.home .hx-field { display: flex; flex-direction: column; }
.home .hx-field-wide { grid-column: 1 / -1; }
.home .hx-field label { font-size: 13px; font-weight: 700; color: var(--hx-ink); margin-bottom: 7px; }
.home .hx-field input, .home .hx-field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--hx-line); border-radius: 7px;
  font-size: 15px; font-family: inherit; color: var(--hx-ink); background: var(--hx-paper);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.home .hx-field textarea { resize: vertical; min-height: 96px; }
.home .hx-field input:focus, .home .hx-field textarea:focus {
  outline: none; border-color: var(--hx-red); background: #fff; box-shadow: 0 0 0 3px rgba(26,54,93,.12);
}
.home .hx-inq-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.home .hx-inq-msg { font-size: 14px; font-weight: 700; }
.home .hx-inq-msg.ok { color: #1a7f37; }
.home .hx-inq-msg.err { color: var(--hx-red); }
/* honeypot — visually hidden, off-screen (bots fill it, humans never see it) */
.home .hx-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ══ WeChat QR modal ══ */
.home .wx-modal {
  position: fixed; inset: 0; z-index: 200; background: rgba(20,10,10,.62);
  display: grid; place-items: center; padding: 20px;
}
.home .wx-modal[hidden] { display: none; }
.home .wx-modal-card {
  position: relative; background: #fff; border-radius: 16px; padding: 30px 30px 26px;
  text-align: center; max-width: 340px; width: 100%; box-shadow: 0 30px 80px rgba(0,0,0,.4);
  border-top: 4px solid var(--hx-red);
}
.home .wx-modal-card h3 { margin: 0 0 18px; font-size: 18px; color: var(--hx-ink); font-weight: 800; }
.home .wx-modal-card img { width: 100%; max-width: 264px; border-radius: 10px; border: 1px solid var(--hx-line); }
.home .wx-modal-close {
  position: absolute; top: 10px; right: 12px; width: 34px; height: 34px; border: none;
  background: none; font-size: 26px; line-height: 1; color: var(--hx-ink-2); cursor: pointer; border-radius: 8px;
}
.home .wx-modal-close:hover { background: var(--hx-paper-2); color: var(--hx-red); }
@media (max-width: 640px) { .home .hx-inq-grid { grid-template-columns: 1fr; } .home .hx-inquiry { padding: 60px 0; } }

/* ══ Responsive ══ */
@media (max-width: 960px) {
  .home .hx-hero-inner { grid-template-columns: 1fr; gap: 34px; padding-top: 44px; }
  .home .hx-hero::before { font-size: 200px; opacity: .03; }
  .home .hx-media { min-height: 300px; }
  .home .hx-services { grid-template-columns: 1fr; gap: 0; }
  .home .hx-band-inner { grid-template-columns: 1fr; gap: 26px; }
  .home .hx-ctaband-inner { grid-template-columns: 1fr; gap: 30px; }
  .home .hx-section { padding: 64px 0; }
}
@media (max-width: 560px) {
  .home .hx-nrow { grid-template-columns: 1fr auto; }
  .home .hx-ndate { grid-column: 1 / -1; }
  .home .hx-stats { gap: 22px; }
}

/* ══ RTL (Arabic) ══ */
[dir="rtl"] .home .hx-hero-inner,
[dir="rtl"] .home .hx-band-inner,
[dir="rtl"] .home .hx-ctaband-inner { direction: rtl; }
[dir="rtl"] .home .hx-eyebrow { border-left: none; border-right: 3px solid var(--hx-red); }
[dir="rtl"] .home .hx-kicker::before { }
[dir="rtl"] .home .hx-srow { grid-template-columns: auto 1fr; }
[dir="rtl"] .home .hx-nrow:hover { padding-left: 6px; padding-right: 14px; }
[dir="rtl"] .home .hx-marquee-track { animation-name: hxmarq-rtl; }
@keyframes hxmarq-rtl { from { transform: translateX(0); } to { transform: translateX(50%); } }
[dir="rtl"] .home .hx-hero-seal { right: auto; left: 3%; transform: scaleX(-1); }
[dir="rtl"] .home .hx-cta-seal { right: auto; left: -40px; transform: translateY(-50%) scaleX(-1); }
