/* ===== 西安西科阳光电子有限公司 - 官网样式 ===== */
:root {
  --dark: #0b1220;
  --dark-2: #111c2e;
  --red: #e8503a;
  --cyan: #2fc1f0;
  --text: #23282f;
  --muted: #6b7480;
  --light: #f5f7fa;
  --line: #e7ebf0;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(15, 23, 42, .08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", "Source Han Sans SC", "Segoe UI", sans-serif;
  color: var(--text);
  background: #fff;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
.container { width: min(1140px, 92%); margin: 0 auto; }

/* ===== 顶栏 ===== */
.header {
  background: var(--dark);
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 2px 16px rgba(0,0,0,.25);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.logo { display: flex; align-items: center; gap: 12px; }
.logo img { height: 44px; width: auto; }
.logo .brand-text { color: #fff; font-size: 17px; font-weight: 700; letter-spacing: .5px; }
.logo .brand-text small { display: block; font-size: 11px; font-weight: 400; color: #9fb0c5; letter-spacing: .3px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: #cdd7e4; padding: 9px 15px; border-radius: 8px;
  font-size: 15px; transition: .18s; white-space: nowrap;
}
.nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav a.active { color: #fff; background: linear-gradient(135deg, var(--red), #f2773d); }
.nav-toggle { display: none; background: none; border: 0; color: #fff; font-size: 26px; cursor: pointer; }

/* ===== 按钮 ===== */
.btn {
  display: inline-block; padding: 12px 26px; border-radius: 30px;
  background: linear-gradient(135deg, var(--red), #f2773d); color: #fff;
  font-size: 15px; font-weight: 600; transition: .2s; box-shadow: 0 8px 20px rgba(232,80,58,.3);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(232,80,58,.4); }
.btn-ghost { background: rgba(255,255,255,.12); box-shadow: none; border: 1px solid rgba(255,255,255,.35); }

/* ===== 页头横幅 ===== */
.page-banner {
  background: linear-gradient(135deg, #0f1a2e 0%, #16263f 55%, #1b3350 100%);
  color: #fff; padding: 64px 0 56px; text-align: center; position: relative; overflow: hidden;
}
.page-banner::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(600px 220px at 20% 0%, rgba(47,193,240,.18), transparent 60%),
              radial-gradient(500px 200px at 85% 100%, rgba(232,80,58,.18), transparent 60%);
}
.page-banner .container { position: relative; z-index: 1; }
.page-banner h1 { font-size: 34px; letter-spacing: 2px; }
.page-banner p { color: #a9bcd2; margin-top: 10px; font-size: 15px; }

/* ===== 首页 Hero ===== */
.hero {
  background: linear-gradient(160deg, #0d1523 0%, #101d33 60%, #0d1626 100%);
  color: #fff; position: relative; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(700px 300px at 75% 20%, rgba(47,193,240,.22), transparent 60%),
              radial-gradient(520px 260px at 15% 85%, rgba(232,80,58,.20), transparent 60%);
}
.hero-inner {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center;
  padding: 72px 0 76px; position: relative; z-index: 1;
}
.hero h1 { font-size: 42px; line-height: 1.25; letter-spacing: 1px; }
.hero h1 .accent { color: var(--cyan); }
.hero .sub { color: #b9c7d9; font-size: 18px; margin-top: 18px; }
.hero .sub-en { color: #7f93ab; font-size: 13px; margin-top: 6px; }
.hero .product-tag {
  display: inline-block; margin-top: 26px; padding: 10px 22px;
  border: 1px solid rgba(47,193,240,.5); color: var(--cyan);
  border-radius: 30px; font-size: 15px; font-weight: 600;
}
.hero .actions { margin-top: 28px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero-visual { position: relative; }
.hero-visual img.main { border-radius: var(--radius); box-shadow: 0 24px 60px rgba(0,0,0,.45); width: 100%; }
.hero-visual .float-card {
  position: absolute; bottom: -18px; left: -18px; background: #fff; color: var(--text);
  padding: 14px 18px; border-radius: var(--radius); box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 12px; font-size: 14px;
}
.hero-visual .float-card .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--red); flex: none; }

/* ===== 区块通用 ===== */
.section { padding: 74px 0; }
.section.alt { background: var(--light); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 46px; }
.section-head .kicker { color: var(--red); font-weight: 700; letter-spacing: 3px; font-size: 13px; }
.section-head h2 { font-size: 30px; margin: 8px 0 14px; }
.section-head p { color: var(--muted); }

/* ===== 首页亮点 ===== */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px; box-shadow: var(--shadow); transition: .2s;
}
.feature:hover { transform: translateY(-4px); }
.feature .icon { font-size: 32px; }
.feature h3 { margin: 14px 0 8px; font-size: 18px; }
.feature p { color: var(--muted); font-size: 14px; }

/* ===== 产品卡片 ===== */
.products-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.product {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.product .p-img { background: #0d1420; padding: 26px; display: grid; place-items: center; }
.product .p-img img { max-height: 300px; width: auto; border-radius: 8px; }
.product .p-body { padding: 24px 26px 28px; flex: 1; display: flex; flex-direction: column; }
.product .p-body h3 { font-size: 20px; }
.product .p-body .badge { display: inline-block; margin-top: 8px; font-size: 12px; color: var(--red); border: 1px solid var(--red); border-radius: 20px; padding: 2px 10px; }
.product .p-body p { color: var(--muted); font-size: 14px; margin-top: 12px; flex: 1; }

/* ===== 案例画廊 ===== */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.gallery figure { border-radius: var(--radius); overflow: hidden; position: relative; aspect-ratio: 4/3; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: .35s; }
.gallery figure:hover img { transform: scale(1.06); }

/* ===== 新闻 ===== */
.news-item {
  display: grid; grid-template-columns: 260px 1fr; gap: 24px; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.news-item img { border-radius: 8px; width: 260px; height: 170px; object-fit: cover; }
.news-item h3 { font-size: 19px; }
.news-item .date { color: var(--muted); font-size: 13px; margin-top: 6px; }

/* ===== 联系页 ===== */
.contact-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.contact-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow);
}
.contact-card h2 { font-size: 22px; margin-bottom: 20px; }
.contact-item { display: flex; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.contact-item:last-child { border-bottom: 0; }
.contact-item .ico { width: 42px; height: 42px; flex: none; border-radius: 10px; background: #eef4ff; color: var(--cyan); display: grid; place-items: center; font-size: 19px; }
.contact-item .label { font-size: 13px; color: var(--muted); }
.contact-item .value { font-size: 16px; font-weight: 600; }
.contact-item .value a:hover { color: var(--red); }

/* ===== 页脚 ===== */
.footer { background: var(--dark); color: #9fb0c5; padding: 46px 0 34px; }
.footer-inner { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.footer .f-brand h3 { color: #fff; font-size: 18px; }
.footer .f-brand p { font-size: 13px; margin-top: 8px; }
.footer .f-col h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.footer .f-col a, .footer .f-col p { display: block; font-size: 14px; margin-bottom: 8px; color: #9fb0c5; }
.footer .f-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 30px; padding-top: 20px; text-align: center; font-size: 13px; color: #77879d; }

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; padding: 48px 0 56px; }
  .hero h1 { font-size: 30px; }
  .hero-visual .float-card { left: 10px; }
  .features, .products-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .contact-wrap { grid-template-columns: 1fr; }
  .news-item { grid-template-columns: 1fr; }
  .news-item img { width: 100%; height: auto; }
  .nav {
    display: none; position: absolute; top: 74px; left: 0; right: 0;
    background: var(--dark-2); flex-direction: column; padding: 10px 16px 16px;
  }
  .nav.open { display: flex; }
  .nav-toggle { display: block; }
  .header-inner { position: relative; }
}
@media (max-width: 560px) {
  .gallery { grid-template-columns: 1fr; }
  .hero .actions { flex-direction: column; }
  .btn { text-align: center; }
}
