/* ===== 西安西科阳光电子有限公司 - 官网样式 ===== */
:root {
  --navy: #0a1f44;
  --navy-2: #123063;
  --navy-3: #0d2750;
  --gold: #c9a24b;
  --gold-2: #e0bc6e;
  --cyan: #35c4f0;
  --red: #e8503a;
  --text: #22303f;
  --muted: #64748b;
  --light: #f4f7fb;
  --line: #e6ecf3;
  --radius: 14px;
  --shadow: 0 14px 40px rgba(10, 31, 68, .10);
  --shadow-sm: 0 6px 20px rgba(10, 31, 68, .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.75;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
.container { width: min(1180px, 92%); margin: 0 auto; }
h1, h2, h3, h4 { line-height: 1.3; font-weight: 700; }

/* ===== 顶栏 ===== */
.header {
  background: rgba(10, 31, 68, .92);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.logo { display: flex; align-items: center; gap: 13px; }
.logo img { height: 52px; width: auto; }
.logo .brand-text { color: #fff; font-size: 18px; font-weight: 700; letter-spacing: 1px; }
.logo .brand-text small { display: block; font-size: 10.5px; font-weight: 400; color: #8fa3c0; letter-spacing: .5px; }
.nav { display: flex; align-items: center; gap: 2px; }
.nav a {
  color: #c7d3e6; padding: 9px 16px; border-radius: 8px;
  font-size: 15px; position: relative; transition: .2s; white-space: nowrap;
}
.nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav a.active { color: #fff; }
.nav a.active::after {
  content: ""; position: absolute; left: 16px; right: 16px; bottom: 3px; height: 2px;
  background: var(--gold); border-radius: 2px;
}
.nav-toggle { display: none; background: none; border: 0; color: #fff; font-size: 26px; cursor: pointer; }

/* ===== 按钮 ===== */
.btn {
  display: inline-block; padding: 13px 30px; border-radius: 30px;
  background: linear-gradient(135deg, #e8503a, #f0833a); color: #fff;
  font-size: 15px; font-weight: 600; letter-spacing: .5px; transition: .22s;
  box-shadow: 0 10px 24px rgba(232, 80, 58, .32);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(232, 80, 58, .42); }
.btn-ghost { background: transparent; box-shadow: none; border: 1px solid rgba(255,255,255,.5); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
.btn-gold { background: linear-gradient(135deg, #c9a24b, #e0bc6e); box-shadow: 0 10px 24px rgba(201,162,75,.32); }
.btn-gold:hover { box-shadow: 0 14px 30px rgba(201,162,75,.42); }

/* ===== 首页 Hero ===== */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background: var(--navy);
}
.hero-bg {
  position: absolute; inset: 0;
  background: url("images/25502329.jpg") center/cover no-repeat;
  opacity: .5;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,31,68,.72) 0%, rgba(10,31,68,.55) 55%, rgba(10,31,68,.92) 100%);
}
.hero-inner { position: relative; z-index: 1; padding: 88px 0 40px; }
.hero .kicker {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--gold-2); font-size: 14px; font-weight: 600; letter-spacing: 4px;
  padding: 8px 18px; border: 1px solid rgba(224,188,110,.45); border-radius: 30px;
  background: rgba(255,255,255,.06); margin-bottom: 28px;
}
.hero h1 { font-size: 50px; letter-spacing: 2px; line-height: 1.22; }
.hero h1 .accent { color: var(--gold-2); }
.hero .sub { color: #d7e1ef; font-size: 20px; margin-top: 20px; max-width: 720px; }
.hero .sub-en { color: #8fa3c0; font-size: 14px; margin-top: 10px; letter-spacing: .5px; }
.hero .actions { margin-top: 34px; display: flex; gap: 16px; flex-wrap: wrap; }

/* 首页数据栏 */
.hero-stats {
  margin-top: 56px; display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(255,255,255,.14); padding-top: 30px;
}
.hero-stats .stat { text-align: center; }
.hero-stats .stat .num { font-size: 34px; font-weight: 700; color: #fff; letter-spacing: 1px; }
.hero-stats .stat .num em { font-style: normal; color: var(--gold-2); }
.hero-stats .stat .label { color: #9db0c9; font-size: 13px; margin-top: 4px; letter-spacing: 1px; }

/* ===== 页头横幅（子页面） ===== */
.page-banner {
  position: relative; color: #fff; text-align: center; padding: 76px 0 66px;
  background: var(--navy); overflow: hidden;
}
.page-banner::before {
  content: ""; position: absolute; inset: 0;
  background: url("images/25502329.jpg") center/cover no-repeat; opacity: .32;
}
.page-banner::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,31,68,.82), rgba(10,31,68,.92));
}
.page-banner .container { position: relative; z-index: 1; }
.page-banner h1 { font-size: 36px; letter-spacing: 3px; }
.page-banner .crumb { color: #9db0c9; margin-top: 12px; font-size: 14px; }
.page-banner .crumb a:hover { color: var(--gold-2); }

/* ===== 区块通用 ===== */
.section { padding: 84px 0; }
.section.alt { background: var(--light); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 52px; }
.section-head .kicker {
  display: inline-block; color: var(--gold); font-weight: 700; letter-spacing: 4px; font-size: 13px;
  position: relative; padding: 0 26px;
}
.section-head .kicker::before, .section-head .kicker::after {
  content: ""; position: absolute; top: 50%; width: 18px; height: 1px; background: var(--gold); opacity: .6;
}
.section-head .kicker::before { left: 0; }
.section-head .kicker::after { right: 0; }
.section-head h2 { font-size: 32px; margin: 14px 0 16px; color: var(--navy); }
.section-head p { color: var(--muted); }

/* ===== 关于我们（首页） ===== */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.about-grid h3 { font-size: 26px; color: var(--navy); }
.about-grid .lead { color: var(--muted); margin: 16px 0 20px; }
.about-grid .points { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 24px; }
.about-grid .point {
  display: flex; align-items: center; gap: 12px; background: #fff;
  border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px;
  font-weight: 600; color: var(--navy); box-shadow: var(--shadow-sm);
}
.about-grid .point .ico { color: var(--gold); font-size: 20px; }
.about-img { position: relative; }
.about-img img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }
.about-img .badge-float {
  position: absolute; right: -14px; bottom: 26px; background: var(--navy); color: #fff;
  padding: 16px 22px; border-radius: 12px; text-align: center; box-shadow: var(--shadow);
  border-left: 4px solid var(--gold);
}
.about-img .badge-float .n { font-size: 28px; font-weight: 700; color: var(--gold-2); }
.about-img .badge-float .t { font-size: 12px; color: #b7c6dc; }

/* ===== 产品卡片 ===== */
.products-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.product {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: .25s;
}
.product:hover { transform: translateY(-6px); box-shadow: 0 22px 50px rgba(10,31,68,.16); }
.product .p-img { background: #0b1d3a; padding: 30px; display: grid; place-items: center; position: relative; }
.product .p-img img { max-height: 300px; width: auto; border-radius: 8px; }
.product .p-img .tag {
  position: absolute; top: 18px; left: 18px; background: var(--gold); color: #3a2c08;
  font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 20px;
}
.product .p-body { padding: 28px 28px 30px; flex: 1; display: flex; flex-direction: column; }
.product .p-body h3 { font-size: 20px; color: var(--navy); }
.product .p-body .badges { margin: 12px 0; display: flex; gap: 8px; flex-wrap: wrap; }
.product .p-body .badges span {
  font-size: 12px; color: var(--red); border: 1px solid var(--red); border-radius: 20px; padding: 3px 11px;
}
.product .p-body p { color: var(--muted); font-size: 14.5px; flex: 1; }
.product .p-body .btn { margin-top: 20px; align-self: flex-start; }

/* ===== 优势特性 ===== */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.feature {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px 26px; box-shadow: var(--shadow-sm); transition: .22s; text-align: center;
}
.feature:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.feature .icon { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; font-size: 28px; background: #eef3fb; }
.feature h3 { margin-bottom: 10px; font-size: 17px; color: var(--navy); }
.feature p { color: var(--muted); font-size: 14px; }

/* ===== 案例画廊 ===== */
.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; box-shadow: var(--shadow-sm); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: .4s; }
.gallery figure:hover img { transform: scale(1.07); }
.gallery figure figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 18px 14px;
  color: #fff; font-size: 14px; font-weight: 600;
  background: linear-gradient(180deg, transparent, rgba(10,31,68,.85));
}

/* ===== 新闻 ===== */
.news-item {
  display: grid; grid-template-columns: 300px 1fr; gap: 28px; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow-sm);
}
.news-item img { border-radius: 10px; width: 300px; height: 190px; object-fit: cover; }
.news-item h3 { font-size: 20px; color: var(--navy); }
.news-item .date { color: var(--muted); font-size: 13px; margin-top: 8px; }
.news-item.news-link { cursor: pointer; transition: .22s; }
.news-item.news-link:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.news-item.news-link:hover h3 { color: var(--red); }
.news-back { display: inline-block; margin-bottom: 18px; color: var(--navy); font-size: 14px; }
.news-back:hover { color: var(--red); }
.news-content { color: var(--text); margin-top: 14px; font-size: 15px; line-height: 1.9; }
.news-single { align-items: start; }

/* ===== 详情页（产品/新闻/案例通用） ===== */
.back-link { display: inline-block; margin-bottom: 20px; color: var(--navy); font-size: 14px; }
.back-link:hover { color: var(--red); }
.detail-head { display: grid; grid-template-columns: 420px 1fr; gap: 36px; align-items: start; margin-bottom: 28px; }
.detail-img { background: #0b1d3a; border-radius: var(--radius); padding: 20px; display: grid; place-items: center; }
.detail-img img { max-height: 340px; width: auto; border-radius: 8px; }
.detail-info h2 { font-size: 26px; color: var(--navy); margin-bottom: 14px; }
.detail-info .date { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.detail-info .btn { margin-top: 18px; }
.detail-content { color: var(--text); font-size: 15.5px; line-height: 1.9; }
.detail-content h1, .detail-content h2, .detail-content h3 { color: var(--navy); margin: 18px 0 10px; font-size: 19px; }
.detail-content p { margin-bottom: 12px; }
.detail-content ul, .detail-content ol { margin: 10px 0 10px 22px; }
.detail-content li { list-style: disc; margin-bottom: 6px; }
.detail-content ol li { list-style: decimal; }
.detail-content strong { color: var(--navy); }
.detail-content img { max-width: 100%; border-radius: 8px; margin: 10px 0; }
.g-detail { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 30px; }
.g-detail figure { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; box-shadow: var(--shadow-sm); }
.g-detail img { width: 100%; height: 100%; object-fit: cover; }

/* ===== 案例卡片 ===== */
.case-card {
  display: grid; grid-template-columns: 300px 1fr; gap: 24px; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); transition: .22s;
}
.case-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.case-card img { width: 300px; height: 200px; object-fit: cover; }
.case-card-body { padding: 22px 26px; }
.case-card-body h3 { font-size: 20px; color: var(--navy); margin-bottom: 8px; }
.case-card-body p { color: var(--muted); font-size: 14px; }

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

/* ===== 页脚 ===== */
.footer { background: var(--navy); color: #a9bcd4; padding: 60px 0 0; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 40px; padding-bottom: 44px; }
.footer .f-brand h3 { color: #fff; font-size: 19px; letter-spacing: 1px; }
.footer .f-brand .en { color: #8fa3c0; font-size: 12px; margin-top: 6px; }
.footer .f-brand p { font-size: 13.5px; margin-top: 16px; color: #9db0c9; max-width: 300px; }
.footer .f-col h4 { color: #fff; font-size: 15px; margin-bottom: 18px; letter-spacing: 1px; }
.footer .f-col a, .footer .f-col p { display: block; font-size: 14px; margin-bottom: 10px; color: #a9bcd4; }
.footer .f-col a:hover { color: var(--gold-2); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08); padding: 20px 0; text-align: center;
  font-size: 13px; color: #7c90ac;
}

/* ===== 响应式 ===== */
@media (max-width: 960px) {
  .hero h1 { font-size: 34px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 24px 0; }
  .about-grid { grid-template-columns: 1fr; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .products-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .contact-wrap { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .news-item { grid-template-columns: 1fr; }
  .news-item img { width: 100%; height: auto; }
}
@media (max-width: 640px) {
  .hero-inner { padding: 60px 0 30px; }
  .hero h1 { font-size: 27px; }
  .hero .sub { font-size: 16px; }
  .gallery { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .hero .actions { flex-direction: column; }
  .btn { text-align: center; }
  .nav {
    display: none; position: absolute; top: 76px; left: 0; right: 0;
    background: var(--navy-2); flex-direction: column; padding: 10px 16px 18px;
  }
  .nav.open { display: flex; }
  .nav a.active::after { display: none; }
  .nav-toggle { display: block; }
}

@media (max-width: 960px) {
  .detail-head { grid-template-columns: 1fr; }
  .g-detail { grid-template-columns: repeat(2, 1fr); }
  .case-card { grid-template-columns: 1fr; }
  .case-card img { width: 100%; height: auto; }
}
@media (max-width: 640px) {
  .g-detail { grid-template-columns: 1fr; }
}
