/* ===========================================================
   安徽天诚乐丰集成房屋有限公司 — 企业官网样式
   设计理念：简约大气 · 工业品质感 · 响应式 · 高性能
   配色：深海军蓝(信任/专业) + 暖金(品质/钢构) + 浅灰底
   =========================================================== */

:root {
  --primary: #16365c;
  --primary-dark: #0f2742;
  --primary-light: #1f4a7d;
  --accent: #e8a13a;
  --accent-dark: #cf8826;
  --bg: #ffffff;
  --bg-alt: #f4f6f9;
  --bg-dark: #0f2742;
  --text: #2a2f36;
  --text-muted: #6b7280;
  --border: #e2e8f0;
  --radius: 10px;
  --shadow-sm: 0 1px 3px rgba(15, 39, 66, .08);
  --shadow-md: 0 8px 24px rgba(15, 39, 66, .10);
  --maxw: 1180px;
  --header-h: 68px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
          "Source Han Sans CN", "Noto Sans SC", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-dark); }

h1, h2, h3, h4 { line-height: 1.3; color: var(--primary-dark); font-weight: 700; margin: 0 0 .6em; }
h1 { font-size: clamp(28px, 4.5vw, 44px); }
h2 { font-size: clamp(24px, 3.5vw, 34px); }
h3 { font-size: 20px; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

.section { padding: 72px 0; }
.section-alt { background: var(--bg-alt); }
.section-dark { background: var(--bg-dark); color: #e8eef6; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark p { color: #c4d2e4; }

.eyebrow {
  display: inline-block; font-size: 14px; letter-spacing: 2px;
  color: var(--accent-dark); font-weight: 700; text-transform: uppercase;
  margin-bottom: 12px;
}
.section-head { text-align: center; max-width: 760px; margin: 0 auto 48px; }
.section-head p { color: var(--text-muted); font-size: 17px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 13px 28px; border-radius: 6px;
  font-weight: 600; font-size: 15px; border: 2px solid transparent;
  cursor: pointer; transition: all .2s; text-align: center;
}
.btn-primary { background: var(--accent); color: #1a1a1a; }
.btn-primary:hover { background: var(--accent-dark); color: #1a1a1a; }
.btn-outline { border-color: var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-light { background: #fff; color: var(--primary); }
.btn-light:hover { background: var(--accent); color: #1a1a1a; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.96);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border); height: var(--header-h);
  display: flex; align-items: center;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.brand { display: flex; align-items: center; gap: 14px; color: var(--primary-dark); }
.brand-logo { height: 44px; width: auto; display: block; }
.brand-name { font-weight: 700; font-size: 16px; color: var(--primary-dark); line-height: 1.2; }
.brand-name small { display: block; font-size: 11px; color: var(--text-muted); font-weight: 500; letter-spacing: 1px; }
@media (max-width: 640px) {
  .brand-logo { height: 38px; }
  .brand-name { display: none; }
}

.main-nav { display: flex; align-items: center; }
.nav-menu { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; }
.nav-menu a {
  display: block; padding: 10px 16px; border-radius: 6px; color: var(--text);
  font-weight: 500; font-size: 15px;
}
.nav-menu a:hover { background: var(--bg-alt); color: var(--primary); }
.nav-menu a.active { color: var(--primary); background: var(--bg-alt); font-weight: 700; }
.nav-toggle {
  display: none; background: var(--primary); color: #fff; border: none;
  padding: 9px 14px; border-radius: 6px; font-size: 14px; font-family: var(--font); cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff; padding: 110px 0 96px; overflow: hidden;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(232,161,58,.20), transparent 60%),
    linear-gradient(135deg, var(--primary-dark), var(--primary) 70%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; opacity: .12;
  background-image:
    linear-gradient(rgba(255,255,255,.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.5) 1px, transparent 1px);
  background-size: 46px 46px; -webkit-mask-image: linear-gradient(180deg, #000, transparent 75%);
  mask-image: linear-gradient(180deg, #000, transparent 75%);
}
.hero-inner { position: relative; z-index: 1; max-width: 760px; }
.hero h1 { color: #fff; margin-bottom: 18px; }
.hero .lead { font-size: 19px; color: #d8e3f2; margin-bottom: 30px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-badges { display: flex; gap: 26px; margin-top: 44px; flex-wrap: wrap; }
.hero-badges div { border-left: 3px solid var(--accent); padding-left: 14px; }
.hero-badges strong { display: block; font-size: 24px; color: #fff; }
.hero-badges span { font-size: 13px; color: #b9cbe2; }

/* ---------- Cards / Grid ---------- */
.grid { display: grid; gap: 24px; }
.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: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s;
  height: 100%;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card .icon {
  width: 52px; height: 52px; border-radius: 12px; background: var(--bg-alt);
  color: var(--primary); display: grid; place-items: center; margin-bottom: 16px;
}
.card h3 { margin-bottom: 10px; }
.card p { color: var(--text-muted); margin: 0; font-size: 15px; }
.card .more { display: inline-block; margin-top: 14px; font-weight: 600; color: var(--accent-dark); }

/* Service card with image placeholder */
.service-card { padding: 0; overflow: hidden; }
.service-thumb {
  height: 180px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  position: relative;
}
.service-thumb svg { width: 64px; height: 64px; opacity: .92; }
.service-thumb .tag {
  position: absolute; top: 14px; left: 14px; background: rgba(255,255,255,.9);
  color: var(--primary-dark); font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 20px;
}
.service-body { padding: 22px 24px 26px; }
.service-body h3 { font-size: 18px; }
.service-body p { font-size: 14px; color: var(--text-muted); margin-bottom: 14px; }
.service-body ul { margin: 0 0 16px; padding-left: 18px; color: var(--text-muted); font-size: 14px; }
.service-body ul li { margin-bottom: 5px; }

/* ---------- Feature / Why ---------- */
.feature { display: flex; gap: 16px; align-items: flex-start; }
.feature .num {
  flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent); color: #1a1a1a; display: grid; place-items: center;
  font-weight: 800; font-size: 18px;
}
.feature h3 { font-size: 17px; margin-bottom: 6px; }
.feature p { font-size: 14px; color: var(--text-muted); margin: 0; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stat strong { display: block; font-size: 38px; color: var(--accent); font-weight: 800; }
.stat span { color: #c4d2e4; font-size: 14px; }

/* ---------- Timeline ---------- */
.timeline { border-left: 3px solid var(--border); margin-left: 8px; padding-left: 28px; }
.timeline li { position: relative; list-style: none; margin-bottom: 26px; }
.timeline li::before {
  content: ""; position: absolute; left: -37px; top: 4px; width: 14px; height: 14px;
  border-radius: 50%; background: var(--accent); border: 3px solid #fff; box-shadow: 0 0 0 3px var(--border);
}
.timeline .year { font-weight: 800; color: var(--primary); }
.timeline p { margin: 4px 0 0; color: var(--text-muted); }

/* ---------- Cert grid (image gallery) ---------- */
.cert-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.cert-card {
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #fff;
  box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; cursor: pointer;
}
.cert-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.cert-img {
  aspect-ratio: 4 / 3; background: var(--bg-alt); display: flex; align-items: center; justify-content: center;
  overflow: hidden; border-bottom: 1px solid var(--border);
}
.cert-img img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.cert-caption { padding: 18px 20px 22px; text-align: center; }
.cert-caption h3 { font-size: 16px; margin-bottom: 6px; }
.cert-caption p { font-size: 13px; color: var(--text-muted); margin: 0; }

/* Lightbox */
.lightbox {
  display: none; position: fixed; inset: 0; z-index: 1000;
  background: rgba(15, 39, 66, .94); justify-content: center; align-items: center; padding: 40px;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 90%; max-height: 90%; object-fit: contain; border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35); background: #fff;
}
.lightbox-close {
  position: absolute; top: 20px; right: 24px; color: #fff; font-size: 36px; line-height: 1; cursor: pointer;
}

/* ---------- Product pages ---------- */
.product-showcase {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 44px; align-items: center;
}
.product-showcase.reverse { grid-template-columns: 1fr 1.2fr; }
.product-showcase .photo {
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md);
  border: 1px solid var(--border); height: 320px;
}
.product-showcase .photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-gallery {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 36px;
}
.product-gallery img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px;
  cursor: pointer; border: 1px solid var(--border); transition: transform .2s, box-shadow .2s;
}
.product-gallery img:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

/* Home service card with real photos */
.service-thumb.has-photo { display: block; position: relative; overflow: hidden; }
.service-thumb-img { width: 100%; height: 100%; object-fit: cover; }
.service-thumb.has-photo .tag { position: absolute; top: 14px; left: 14px; z-index: 2; }

@media (max-width: 900px) {
  .product-showcase, .product-showcase.reverse { grid-template-columns: 1fr; }
  .product-gallery { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .product-gallery { grid-template-columns: 1fr; }
  .product-showcase .photo { height: 220px; }
}

.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: start; }
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.info-list .ic { flex: 0 0 42px; width: 42px; height: 42px; border-radius: 10px; background: var(--bg-alt); color: var(--primary); display: grid; place-items: center; }
.info-list strong { display: block; color: var(--primary-dark); font-size: 14px; }
.info-list span, .info-list a { color: var(--text-muted); font-size: 15px; }

.form { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); }
.form .field { margin-bottom: 16px; }
.form label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--primary-dark); }
.form input, .form textarea, .form select {
  width: 100%; padding: 11px 13px; border: 1px solid var(--border); border-radius: 6px;
  font-family: var(--font); font-size: 15px; color: var(--text); background: #fff;
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(22,54,92,.12); }
.form textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: 13px; color: var(--text-muted); margin-top: 6px; }

.map-wrap {
  position: relative; height: 360px; border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--border); margin-top: 20px; background: var(--bg-alt);
}
.amap-frame { width: 100%; height: 100%; border: 0; display: block; }
.map-open-btn {
  position: absolute; right: 14px; bottom: 14px; z-index: 2;
  background: var(--primary); color: #fff; text-decoration: none;
  padding: 10px 16px; border-radius: 8px; font-size: 13px; font-weight: 600; box-shadow: var(--shadow-md);
}
.map-open-btn:hover { background: var(--primary-dark); }
@media (max-width: 640px) { .map-wrap { height: 300px; } }

/* ---------- CTA ---------- */
.cta-band { text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #c4d2e4; max-width: 620px; margin: 0 auto 26px; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { background: var(--bg-alt); padding: 16px 0; font-size: 14px; color: var(--text-muted); }
.breadcrumb a { color: var(--primary); }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff; padding: 64px 0;
}
.page-hero h1 { color: #fff; margin-bottom: 8px; }
.page-hero p { color: #c8d6ea; margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-dark); color: #b9cbe2; padding: 56px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 36px; }
.footer-grid h3 { color: #fff; font-size: 18px; margin-bottom: 14px; }
.footer-grid h4 { color: #fff; font-size: 15px; margin-bottom: 14px; letter-spacing: 1px; }
.footer-grid p { font-size: 14px; color: #9fb3cd; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid ul li { padding: 5px 0; }
.footer-grid ul a { color: #b9cbe2; font-size: 14px; }
.footer-grid ul a:hover { color: var(--accent); }
.footer-grid a { color: #b9cbe2; }
.footer-grid a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 40px; padding: 18px 0; text-align: center; font-size: 13px; color: #7d93b3; }
.beian { margin: 8px 0 0; }
.beian a { color: #7d93b3; display: inline-flex; align-items: center; gap: 6px; }
.beian a:hover { color: var(--accent); }
.beian-icon { height: 18px; width: auto; display: inline-block; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-3, .grid-4, .cert-grid { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
}
@media (max-width: 640px) {
  .section { padding: 52px 0; }
  .grid-2, .grid-3, .grid-4, .cert-grid { grid-template-columns: 1fr; }
  .nav-toggle { display: block; }
  .nav-menu {
    display: none; position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; background: #fff; padding: 12px; gap: 2px;
    box-shadow: var(--shadow-md); border-top: 1px solid var(--border);
  }
  .nav-menu.open { display: flex; }
  .nav-menu a { padding: 12px 14px; }
  .brand-name { font-size: 14px; }
  .hero { padding: 80px 0 64px; }
  .hero-badges { gap: 18px; }
}

/* Utility */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.lead-lg { font-size: 18px; color: var(--text-muted); }
.placeholder-note {
  font-size: 12px; color: var(--accent-dark); background: #fff7e9;
  border: 1px dashed var(--accent); border-radius: 6px; padding: 8px 12px; margin-top: 14px;
}
