/* ==========================================================================
   广西利好科技有限公司 官网样式表
   Guangxi Lifehope Technology Co., Ltd.

   修改颜色：改下面 :root 里的色值即可，全站自动生效。
   ========================================================================== */

:root {
  /* 品牌色 —— 取自公司 logo 的蓝 */
  --ink:        #0A2540;   /* 主文字 / 深底色 */
  --brand:      #1573C4;   /* 品牌蓝，按钮和链接 */
  --brand-dark: #10598F;   /* 悬停时的深蓝 */
  --accent:     #00A6D6;   /* 点缀青，少量使用 */
  --paper:      #FFFFFF;
  --ground:     #F2F5F8;   /* 浅灰底，分隔区块 */
  --line:       #DCE3EA;   /* 分隔线 */
  --muted:      #5A6B7C;   /* 次要文字 */

  --wrap: 1180px;          /* 内容最大宽度 */
  --radius: 3px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--paper);
}

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

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); text-decoration: underline; }

h1, h2, h3, h4 { margin: 0 0 .6em; line-height: 1.25; font-weight: 700; }
h1 { font-size: 2.6rem; letter-spacing: -.02em; }
h2 { font-size: 1.9rem; letter-spacing: -.01em; }
h3 { font-size: 1.15rem; }
p  { margin: 0 0 1.1em; }

/* 键盘可见的焦点框（无障碍） */
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, .tab:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

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

/* --------------------------------------------------------- 顶部导航 */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.nav {
  max-width: var(--wrap); margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  min-height: 72px;
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand img { height: 44px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-cn { font-size: 1.05rem; font-weight: 700; color: var(--ink); letter-spacing: .04em; }
.brand-en { font-size: .68rem; color: var(--muted); letter-spacing: .16em; }

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: 10px 15px;
  color: var(--ink); font-size: .93rem; font-weight: 500;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover { color: var(--brand); text-decoration: none; }
.nav-links a.active { color: var(--brand); border-bottom-color: var(--brand); }

/* 中文 / EN 切换按钮 —— 做成描边小按钮，和导航项区分开 */
.nav-links a.lang-switch {
  margin-left: 10px; padding: 5px 13px;
  border: 1px solid var(--line); border-radius: 20px;
  font-size: .82rem; font-weight: 600; color: var(--muted);
  letter-spacing: .04em;
}
.nav-links a.lang-switch:hover {
  border-color: var(--brand); color: var(--brand); background: rgba(21,115,196,.05);
}

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 8px 11px; cursor: pointer;
  font-size: 1.2rem; line-height: 1; color: var(--ink);
}

/* --------------------------------------------------------- 页面头图 */
.hero {
  position: relative;
  background: var(--ink);
  color: #fff;
  overflow: hidden;
}
.hero-media {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: .38;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, rgba(10,37,64,.92) 0%, rgba(10,37,64,.62) 55%, rgba(10,37,64,.35) 100%);
}
.hero-inner {
  position: relative; z-index: 2;
  max-width: var(--wrap); margin: 0 auto; padding: 104px 24px 96px;
}
.hero h1 { color: #fff; max-width: 17ch; margin-bottom: .35em; }
.hero-lede {
  max-width: 60ch; font-size: 1.06rem; color: rgba(255,255,255,.88);
  margin-bottom: 2rem;
}
.hero-kicker {
  font-size: .82rem; letter-spacing: .18em; color: var(--accent);
  margin: 0 0 1.1rem; font-weight: 600;
}

/* 内页头图（矮一些） */
.hero.slim .hero-inner { padding: 68px 24px 60px; }
.hero.slim h1 { font-size: 2.1rem; margin-bottom: .25em; }
.hero.slim .hero-lede { margin-bottom: 0; font-size: 1rem; }

/* --------------------------------------------------------- 按钮 */
.btn {
  display: inline-block; padding: 13px 30px;
  border-radius: var(--radius); font-size: .95rem; font-weight: 600;
  border: 2px solid transparent; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn-ghost:hover { background: #fff; color: var(--ink); border-color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* --------------------------------------------------------- 区块 */
.section { padding: 76px 0; }
.section.tint { background: var(--ground); }
.section.dark { background: var(--ink); color: #fff; }
.section.dark h2 { color: #fff; }

.section-head { margin-bottom: 44px; max-width: 62ch; }
.section-head h2 { display: flex; align-items: center; gap: 14px; }
.section-head h2::before {
  content: ""; width: 5px; height: 1.05em; background: var(--brand); flex: none;
}
.section-head p { color: var(--muted); margin: 0; }
.section.dark .section-head p { color: rgba(255,255,255,.72); }

/* --------------------------------------------------------- 能力四栏 */
.pillars {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border-top: 1px solid var(--line);
}
.pillar { padding: 34px 30px 30px; border-right: 1px solid var(--line); }
.pillar:last-child { border-right: 0; }
.pillar h3 { color: var(--brand); font-size: 1.05rem; margin-bottom: .5em; }
.pillar p { color: var(--muted); font-size: .93rem; margin: 0; line-height: 1.7; }

/* --------------------------------------------------------- 事实条 */
.facts {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.14);
}
.fact { background: var(--ink); padding: 30px 26px; }
.fact-num { font-size: 2.3rem; font-weight: 700; color: #fff; line-height: 1.1; }
.fact-label { font-size: .88rem; color: rgba(255,255,255,.7); margin-top: 6px; }

/* --------------------------------------------------------- 卡片网格 */
.grid { display: grid; gap: 26px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
}
.card-media { aspect-ratio: 16 / 10; background: var(--ground); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 20px 22px 24px; flex: 1; }
.card-body h3 { margin-bottom: .35em; font-size: 1.05rem; }
.card-body p { color: var(--muted); font-size: .92rem; margin: 0; }
.card-tag {
  display: inline-block; font-size: .75rem; font-weight: 600;
  color: var(--brand); background: rgba(21,115,196,.09);
  padding: 3px 9px; border-radius: var(--radius); margin-bottom: 10px;
}

/* --------------------------------------------------------- 资质证书 */
.cert {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
}
.cert-media {
  aspect-ratio: 3 / 4; background: var(--ground);
  display: flex; align-items: center; justify-content: center; padding: 10px;
}
.cert-media img { max-width: 100%; max-height: 100%; width: auto; object-fit: contain; }
.cert-name {
  padding: 14px 16px; font-size: .88rem; font-weight: 600;
  border-top: 1px solid var(--line); line-height: 1.5;
}
.cert-issuer { display: block; font-weight: 400; color: var(--muted); font-size: .8rem; margin-top: 3px; }

/* --------------------------------------------------------- 选项卡 */
.tabs { display: flex; border-bottom: 2px solid var(--line); margin-bottom: 38px; }
.tab {
  appearance: none; background: none; border: 0; cursor: pointer;
  padding: 14px 28px; margin-bottom: -2px;
  font-family: inherit; font-size: 1rem; font-weight: 600; color: var(--muted);
  border-bottom: 2px solid transparent;
}
.tab:hover { color: var(--brand); }
.tab[aria-selected="true"] { color: var(--brand); border-bottom-color: var(--brand); }
.tabpanel[hidden] { display: none; }

/* --------------------------------------------------------- 图文并排 */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 52px; align-items: center; }
.split-text p:last-child { margin-bottom: 0; }
.split-media img { width: 100%; border-radius: var(--radius); }

.photo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.photo-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }

/* --------------------------------------------------------- 联系页 */
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }

.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { padding: 18px 0; border-bottom: 1px solid var(--line); }
.contact-list li:first-child { padding-top: 0; }
.contact-label { font-size: .8rem; color: var(--muted); letter-spacing: .1em; margin-bottom: 4px; }
.contact-value { font-size: 1.05rem; font-weight: 500; }

.field { margin-bottom: 18px; }
.field label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--radius);
  font-family: inherit; font-size: .95rem; color: var(--ink); background: var(--paper);
}
.field textarea { min-height: 150px; resize: vertical; }
.form-note { font-size: .85rem; color: var(--muted); margin-top: 14px; }

/* --------------------------------------------------------- 页脚 */
.footer { background: var(--ink); color: rgba(255,255,255,.72); padding: 52px 0 26px; font-size: .9rem; }
.footer a { color: rgba(255,255,255,.72); }
.footer a:hover { color: #fff; }
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding-bottom: 34px; }
.footer h4 { color: #fff; font-size: .95rem; margin-bottom: 1em; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 8px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.16); padding-top: 22px;
  display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: space-between;
  font-size: .84rem;
}

/* --------------------------------------------------------- 图片缺失占位 */
/* 图片文件还没放进 images/ 时，显示提示方块，告诉你缺哪个文件 */
.img-missing {
  display: flex !important; align-items: center; justify-content: center;
  text-align: center; padding: 16px;
  background: repeating-linear-gradient(45deg, #EDF1F5, #EDF1F5 10px, #E4EAF0 10px, #E4EAF0 20px);
  color: var(--muted); font-size: .78rem; line-height: 1.5; word-break: break-all;
  width: 100%; height: 100%; min-height: 130px;
}

/* --------------------------------------------------------- 404 */
.notfound { text-align: center; padding: 130px 24px; }
.notfound .code { font-size: 4.5rem; font-weight: 700; color: var(--brand); line-height: 1; }

/* --------------------------------------------------------- 响应式 */
@media (max-width: 980px) {
  .pillars { grid-template-columns: repeat(2, 1fr); }
  .pillar:nth-child(2n) { border-right: 0; }
  .pillar:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
  .split, .contact-layout { grid-template-columns: 1fr; gap: 34px; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.55rem; }
  .hero-inner { padding: 68px 24px 60px; }
  .hero.slim .hero-inner { padding: 48px 24px 44px; }

  .nav { flex-wrap: wrap; min-height: 64px; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none; flex-direction: column; align-items: stretch;
    width: 100%; padding: 8px 0 14px; gap: 0;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 4px; border-bottom: 1px solid var(--line); }
  .nav-links a.active { border-bottom-color: var(--brand); }

  .section { padding: 52px 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .photo-grid { grid-template-columns: 1fr; }
  .tabs { margin-bottom: 28px; }
  .tab { padding: 12px 16px; font-size: .93rem; }
  .footer-top { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 420px) {
  .pillars { grid-template-columns: 1fr; }
  .pillar { border-right: 0; border-bottom: 1px solid var(--line); }
  .facts { grid-template-columns: 1fr; }
  .brand-cn { font-size: .95rem; }
}

/* 尊重系统的"减少动态效果"设置 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

@media (max-width: 760px) {
  .nav-links a.lang-switch {
    margin: 10px 0 0; text-align: center; border-radius: var(--radius);
    border-bottom: 1px solid var(--line);
  }
}
