/* =========================================================
   RIGMASTER — 钻机出口独立站 样式基座
   修改配色只需改 :root 变量
   ========================================================= */

:root {
  --ink: #0c1522;
  --ink-2: #16233a;
  --ink-3: #1f3350;
  --amber: #e8a33d;
  --amber-dark: #c8862a;
  --steel: #7d8b9e;
  --line: #e3e8ef;
  --bg: #ffffff;
  --bg-soft: #f5f7fa;
  --bg-dark: #0c1522;
  --ok: #1fa971;
  --radius: 4px;
  --shadow: 0 18px 40px -24px rgba(12, 21, 34, .45);
  --font: 'Inter', 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

body[dir="rtl"],
html[dir="rtl"] body {
  font-family: 'Cairo', 'Inter', 'Segoe UI', 'Microsoft YaHei', sans-serif;
  line-height: 1.9;
}

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

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

p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0 0 .6em; line-height: 1.22; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.4vw, 3.4rem); }
h2 { font-size: clamp(1.55rem, 2.8vw, 2.3rem); }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.4rem); }
h4 { font-size: 1.05rem; }
ul { margin: 0 0 1em; padding-inline-start: 1.1em; }
li { margin-bottom: .4em; }

.container { width: min(1180px, 92%); margin-inline: auto; }
.section { padding-block: clamp(52px, 7vw, 88px); }
.section--soft { background: var(--bg-soft); }
.section--dark { background: var(--bg-dark); color: #e9eef5; }
.section--dark h2, .section--dark h3 { color: #fff; }

.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 14px;
}

.lead { font-size: 1.08rem; color: #45566d; max-width: 62ch; }
.section--dark .lead { color: #b9c6d6; }
.muted { color: var(--steel); }
.center { text-align: center; }
.center .lead { margin-inline: auto; }

/* ---------- 顶部信息条 ---------- */
.topbar {
  background: var(--ink);
  color: #c3cedd;
  font-size: .82rem;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 38px;
  flex-wrap: wrap;
}
.topbar a { color: #fff; }
.topbar .topbar-items { display: flex; gap: 20px; flex-wrap: wrap; }
.topbar span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- 导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .02em; font-size: 1.18rem; }
.brand-mark {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  background: var(--amber);
  color: #1a1206;
  font-weight: 800;
  border-radius: 3px;
  font-size: 1rem;
}
.brand small { display: block; font-size: .66rem; font-weight: 600; letter-spacing: .18em; color: var(--steel); text-transform: uppercase; }

.nav-links { display: flex; align-items: center; gap: 26px; font-size: .95rem; font-weight: 500; }
.nav-links a { padding-block: 6px; border-bottom: 2px solid transparent; }
.nav-links a:hover, .nav-links a[aria-current="page"] { border-bottom-color: var(--amber); }
.nav-actions { display: flex; align-items: center; gap: 14px; }
.lang { font-size: .85rem; font-weight: 600; color: var(--steel); border: 1px solid var(--line); padding: 5px 10px; border-radius: var(--radius); }
.lang:hover { border-color: var(--amber); color: var(--ink); }
.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--line); border-radius: var(--radius);
  width: 42px; height: 38px; cursor: pointer; padding: 0;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 18px; height: 2px; background: var(--ink); margin-inline: auto; content: '';
  position: relative;
}
.nav-toggle span::before { position: absolute; top: -6px; inset-inline-start: 0; }
.nav-toggle span::after { position: absolute; top: 6px; inset-inline-start: 0; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius);
  font-weight: 600; font-size: .95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--amber); color: #1a1206; }
.btn-primary:hover { background: var(--amber-dark); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--ink-3); }
.btn-ghost { border-color: rgba(255, 255, 255, .38); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .1); }
.btn-outline { border-color: var(--line); color: var(--ink); }
.btn-outline:hover { border-color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: #fff;
  background: var(--ink);
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(9, 16, 26, .93) 0%, rgba(9, 16, 26, .74) 46%, rgba(9, 16, 26, .38) 100%);
}
[dir="rtl"] .hero::after {
  background: linear-gradient(260deg, rgba(9, 16, 26, .93) 0%, rgba(9, 16, 26, .74) 46%, rgba(9, 16, 26, .38) 100%);
}
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-inner { position: relative; z-index: 2; padding-block: clamp(64px, 9vw, 118px); max-width: 720px; }
.hero h1 { color: #fff; }
.hero p { font-size: 1.12rem; color: #d5dfeb; max-width: 54ch; }
.hero-facts {
  display: flex; flex-wrap: wrap; gap: 14px 34px;
  margin-top: 30px; padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, .16);
  font-size: .92rem; color: #c3cedd;
}
.hero-facts strong { color: #fff; display: block; font-size: 1.25rem; }

/* ---------- 数据条 ---------- */
.stats { background: var(--ink-2); color: #fff; }
.stats .container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding-block: 30px; }
.stat strong { display: block; font-size: 1.7rem; color: var(--amber); line-height: 1.1; }
.stat span { font-size: .86rem; color: #b9c6d6; }

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

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s ease, transform .2s ease;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-soft); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-media img { transform: scale(1.04); }
.card-body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-body h3 { margin: 0; }
.card-body p { margin: 0; color: #55677e; font-size: .95rem; }
.card-link { margin-top: auto; font-weight: 600; color: var(--ink); font-size: .92rem; display: inline-flex; align-items: center; gap: 6px; }
.card-link::after { content: '→'; color: var(--amber); transition: transform .2s ease; }
[dir="rtl"] .card-link::after { content: '←'; }
.card:hover .card-link::after { transform: translateX(4px); }

.tag {
  display: inline-block;
  font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--amber-dark); background: rgba(232, 163, 61, .12);
  padding: 4px 9px; border-radius: 2px; margin-bottom: 4px;
}

/* 规格速览 */
.spec-mini { list-style: none; padding: 0; margin: 0; font-size: .88rem; color: #45566d; border-top: 1px dashed var(--line); padding-top: 12px; }
.spec-mini li { display: flex; justify-content: space-between; gap: 10px; margin: 0; padding-block: 3px; }
.spec-mini li span { color: var(--steel); }

/* ---------- 应用场景 ---------- */
.app-item { padding: 26px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.app-item h3 { font-size: 1.05rem; }
.app-item p { font-size: .92rem; color: #55677e; margin: 0; }
.app-num { font-size: .8rem; font-weight: 700; color: var(--amber); letter-spacing: .1em; display: block; margin-bottom: 10px; }

/* ---------- 优势 / 流程 ---------- */
.advantage { display: flex; gap: 16px; }
.adv-ico {
  flex: none; width: 42px; height: 42px; border-radius: 3px;
  background: rgba(232, 163, 61, .14); color: var(--amber-dark);
  display: grid; place-items: center; font-weight: 800;
}
.advantage h3 { font-size: 1.05rem; margin-bottom: 6px; }
.advantage p { font-size: .93rem; color: #55677e; margin: 0; }
.section--dark .advantage p { color: #b9c6d6; }
.section--dark .adv-ico { background: rgba(232, 163, 61, .18); color: var(--amber); }

.steps { counter-reset: step; display: grid; gap: 20px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.step { position: relative; padding: 26px 24px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.step::before {
  counter-increment: step; content: '0' counter(step);
  display: block; font-size: .8rem; font-weight: 800; color: var(--amber); letter-spacing: .12em; margin-bottom: 12px;
}
.step h3 { font-size: 1rem; }
.step p { font-size: .9rem; color: #55677e; margin: 0; }

/* ---------- 询盘 CTA ---------- */
.cta-band { background: var(--ink); color: #fff; padding-block: clamp(46px, 6vw, 72px); }
.cta-band .container { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin-bottom: 8px; }
.cta-band p { margin: 0; color: #b9c6d6; }

/* ---------- 表单 ---------- */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: .85rem; font-weight: 600; color: #34435a; }
.field input, .field select, .field textarea {
  font: inherit; font-size: .95rem;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px rgba(232, 163, 61, .16);
}
.field textarea { resize: vertical; min-height: 110px; }
.form-note { font-size: .82rem; color: var(--steel); margin: 12px 0 0; }

/* ---------- 详情页 ---------- */
.page-hero { background: var(--ink-2); color: #fff; padding-block: clamp(40px, 5vw, 64px); }
.page-hero h1 { color: #fff; margin-bottom: 10px; }
.page-hero p { color: #b9c6d6; margin: 0; max-width: 70ch; }

.breadcrumb { font-size: .82rem; color: #93a3b7; margin-bottom: 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.breadcrumb a:hover { color: #fff; }

.product-layout { display: grid; grid-template-columns: 1.05fr .95fr; gap: 42px; align-items: start; }
.product-gallery img { border-radius: var(--radius); border: 1px solid var(--line); }
.product-summary h2 { font-size: 1.5rem; }
.key-points { list-style: none; padding: 0; margin: 0 0 22px; }
.key-points li { position: relative; padding-inline-start: 24px; font-size: .95rem; color: #3c4c63; }
.key-points li::before {
  content: ''; position: absolute; inset-inline-start: 0; top: .55em;
  width: 9px; height: 9px; background: var(--amber); border-radius: 1px;
}

.spec-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.spec-table caption { text-align: start; font-weight: 700; padding-bottom: 10px; font-size: 1rem; }
.spec-table th, .spec-table td { text-align: start; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec-table th { width: 45%; color: #34435a; font-weight: 600; background: var(--bg-soft); }
.spec-table tr:hover td { background: #fafbfd; }

/* ---------- 富文本 ---------- */
.prose { max-width: 74ch; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.3em; }
.prose ul, .prose ol { padding-inline-start: 1.2em; }
.prose table { margin-block: 22px; }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding-block: 16px; }
.faq summary {
  cursor: pointer; font-weight: 600; font-size: 1rem; list-style: none;
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--amber); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: '−'; }
.faq p { margin: 12px 0 0; color: #4a5c73; font-size: .95rem; }

/* ---------- 页脚 ---------- */
.site-footer { background: #09111c; color: #93a3b7; font-size: .9rem; padding-block: 56px 26px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 36px; }
.site-footer h4 { color: #fff; font-size: .95rem; margin-bottom: 14px; }
.site-footer a:hover { color: var(--amber); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.footer-brand p { color: #93a3b7; margin-top: 14px; max-width: 32ch; }
.footer-bottom {
  margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .1);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .82rem;
}
.seo-line { color: #5f7086; font-size: .78rem; margin-top: 14px; line-height: 1.9; }

/* ---------- 浮动询盘 ---------- */
.float-wa {
  position: fixed; inset-block-end: 22px; inset-inline-end: 22px; z-index: 80;
  display: inline-flex; align-items: center; gap: 8px;
  background: #1fa971; color: #fff; font-weight: 600; font-size: .9rem;
  padding: 12px 18px; border-radius: 999px;
  box-shadow: 0 12px 28px -12px rgba(31, 169, 113, .8);
}
.float-wa:hover { background: #178a5c; }

/* ---------- 产品实拍图（白底，等比显示） ---------- */
.card-media--shot { background: #fff; border-bottom: 1px solid var(--line); aspect-ratio: 4 / 3; }
.card-media--shot img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.card:hover .card-media--shot img { transform: scale(1.03); }

/* ---------- 首屏（图文分栏） ---------- */
.hero-split { background: var(--ink); color: #fff; }
.hero-split .container {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center;
  padding-block: clamp(44px, 6vw, 76px);
}
.hero-split h1 { color: #fff; }
.hero-split p { color: #c7d3e1; font-size: 1.08rem; }
.hero-shot { background: #fff; border-radius: 4px; padding: 12px; display: flex; align-items: center; justify-content: center; }
.hero-shot img { max-height: 460px; width: auto; object-fit: contain; }

/* ---------- 参数总表 ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.table-wrap .spec-table { min-width: 760px; }
.spec-table--models th, .spec-table--models td { white-space: nowrap; }
.spec-table--models thead th {
  background: var(--ink); color: #fff; font-weight: 600; font-size: .82rem;
  letter-spacing: .04em; border-bottom: none;
}
.spec-table--models td:first-child { font-weight: 700; color: var(--ink); }
.spec-table--models tbody tr:nth-child(even) td { background: #fafbfd; }

/* ---------- 机型卡片小标签 ---------- */
.model-specs { list-style: none; padding: 0; margin: 0; font-size: .85rem; color: #45566d; border-top: 1px dashed var(--line); padding-top: 10px; }
.model-specs li { display: flex; justify-content: space-between; gap: 8px; margin: 0; padding-block: 2px; }
.model-specs li span { color: var(--steel); }

/* ---------- 响应式 ---------- */
@media (max-width: 1000px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats .container { grid-template-columns: repeat(2, 1fr); row-gap: 22px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-layout { grid-template-columns: 1fr; gap: 30px; }
  .hero-split .container { grid-template-columns: 1fr; gap: 30px; }
  .hero-shot { order: -1; }
  .hero-shot img { max-height: 320px; }
}

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; inset-inline: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 8px 4%; display: none;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 13px 0; border-bottom: 1px solid var(--line); }
  .nav-actions .btn { display: none; }
  .grid-3, .grid-2, .steps { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .grid-4 { grid-template-columns: 1fr; }
  .stats .container { grid-template-columns: 1fr 1fr; }
  .topbar .topbar-items { gap: 12px; font-size: .78rem; }
  .float-wa { inset-inline: 14px; justify-content: center; }
  .footer-grid { grid-template-columns: 1fr; }
}
/* ---------- RTL (Arabic) ---------- */
[dir="rtl"] body,
[dir="rtl"] { font-family: "Cairo", "Inter", system-ui, sans-serif; }
[dir="rtl"] .nav-links { margin-inline-start: auto; margin-inline-end: 0; }
[dir="rtl"] .topbar-items { direction: rtl; }
[dir="rtl"] .brand { direction: rtl; }
[dir="rtl"] .breadcrumb span,
[dir="rtl"] .breadcrumb a { direction: rtl; }
[dir="rtl"] .card-link::after { content: "←"; }
[dir="rtl"] .spec-table th { text-align: right; }
[dir="rtl"] .spec-table td { text-align: left; }
[dir="rtl"] .key-points li { padding-left: 0; padding-right: 26px; }
[dir="rtl"] .key-points li::before { left: auto; right: 0; }
[dir="rtl"] .prose ul li::before { left: auto; right: 0; }
[dir="rtl"] .prose ul li { padding-left: 0; padding-right: 22px; }
[dir="rtl"] .footer-brand p,
[dir="rtl"] .site-footer li,
[dir="rtl"] .site-footer h4 { text-align: right; }
[dir="rtl"] .float-wa { right: auto; left: 22px; }
[dir="rtl"] .page-hero p,
[dir="rtl"] .lead { text-align: right; }
[dir="rtl"] .advantage { text-align: right; }
[dir="rtl"] .app-item { text-align: right; }
[dir="rtl"] .field label { text-align: right; }
[dir="rtl"] .table-wrap { direction: rtl; }

/* ---------- hero split media ---------- */
.hero-split .hero-media {
  background: #fff; border-radius: 4px; padding: 14px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 18px 40px rgba(6, 12, 22, .28);
}
.hero-split .hero-media img { width: 100%; height: auto; max-height: 480px; object-fit: contain; }
.hero-split .hero-facts { border-top-color: rgba(255,255,255,.18); }
@media (max-width: 1000px) {
  .hero-split .container { grid-template-columns: 1fr; gap: 28px; }
  .hero-split .hero-media img { max-height: 340px; }
}
