/* ========================================
   德州锦业照明工程有限公司 - 主样式表
   style.css
   ======================================== */

/* ---------- 1. CSS变量 & 重置 ---------- */
:root {
  --primary:        #0a3d6b;
  --primary-light:  #1565a8;
  --accent:         #f5a800;
  --accent-light:   #ffc02e;
  --bg-dark:        #071d2e;
  --bg-section:     #f4f7fb;
  --text-main:      #1a2533;
  --text-muted:     #5a6a7e;
  --text-light:     #ffffff;
  --border:         #d0dae8;
  --radius-sm:      4px;
  --radius-md:      8px;
  --radius-lg:      14px;
  --shadow-sm:      0 2px 8px rgba(10,61,107,.08);
  --shadow-md:      0 6px 24px rgba(10,61,107,.13);
  --transition:     .25s ease;
  --nav-height:     68px;
  --container:      1240px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  color: var(--text-main);
  background: #fff;
  line-height: 1.7;
}

img { max-width: 100%; display: block; }
a  { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
button, input, textarea, select { font-family: inherit; font-size: inherit; }

/* ---------- 2. 布局工具 ---------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.section { padding: 72px 0; }
.section--gray { background: var(--bg-section); }

.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
}
.section-header p { color: var(--text-muted); font-size: .95rem; }
.section-header .divider {
  width: 56px; height: 3px;
  background: var(--accent);
  margin: 14px auto 0;
  border-radius: 2px;
}

/* ---------- 3. 顶部公告栏 ---------- */
.top-bar {
  background: var(--bg-dark);
  color: rgba(255,255,255,.75);
  font-size: .82rem;
  padding: 6px 0;
}
.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.top-bar a { color: var(--accent); }

/* ---------- 4. 导航 ---------- */
#navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--primary);
  height: var(--nav-height);
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
  transition: background var(--transition);
}
#navbar.scrolled { background: var(--bg-dark); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: .5px;
  flex-shrink: 0;
}
.logo-icon {
  width: 40px; height: 40px;
  background: var(--accent);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
}
.logo-sub { font-size: .7rem; font-weight: 400; opacity: .75; display: block; letter-spacing: 1px; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-menu > li { position: relative; }
.nav-menu > li > a {
  display: flex; align-items: center; gap: 4px;
  color: rgba(255,255,255,.88);
  padding: 0 16px;
  height: var(--nav-height);
  font-size: .93rem;
  transition: color var(--transition), background var(--transition);
}
.nav-menu > li > a:hover,
.nav-menu > li > a.active {
  color: var(--accent);
  background: rgba(255,255,255,.07);
}
.nav-menu > li > a .arrow { font-size: .65rem; opacity: .7; }

/* 下拉菜单 */
.dropdown {
  position: absolute;
  top: calc(var(--nav-height) + 2px);
  left: 0;
  min-width: 180px;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  overflow: hidden;
}
.nav-menu > li:hover .dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.dropdown a {
  display: block;
  padding: 10px 18px;
  font-size: .88rem;
  color: var(--text-main);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), color var(--transition);
}
.dropdown a:last-child { border-bottom: none; }
.dropdown a:hover { background: var(--bg-section); color: var(--primary); }

/* 汉堡按钮 */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px; height: 36px;
  cursor: pointer;
  background: none; border: none; padding: 4px;
}
.hamburger span {
  display: block;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 5. Hero 轮播 ---------- */
#hero {
  position: relative;
  height: 580px;
  overflow: hidden;
  background: var(--bg-dark);
}

.slides { height: 100%; }
.slide {
  position: absolute; inset: 0;
  display: flex; align-items: center;
  background-size: cover; background-position: center;
  opacity: 0;
  transition: opacity .8s ease;
}
.slide.active { opacity: 1; z-index: 1; }

.slide-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(7,29,46,.82) 40%, rgba(7,29,46,.3) 100%);
}

.slide-content {
  position: relative; z-index: 2;
  max-width: 600px;
  color: #fff;
  padding-left: 40px;
}
.slide-content .tag {
  display: inline-block;
  background: var(--accent);
  color: var(--bg-dark);
  font-size: .75rem; font-weight: 700;
  padding: 3px 12px; border-radius: 3px;
  letter-spacing: 1px; margin-bottom: 16px;
  text-transform: uppercase;
}
.slide-content h1 {
  font-size: 2.6rem; font-weight: 800; line-height: 1.2;
  margin-bottom: 16px; text-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.slide-content p { font-size: 1.05rem; opacity: .85; margin-bottom: 28px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 28px; border-radius: var(--radius-md);
  font-size: .93rem; font-weight: 600;
  cursor: pointer; border: none;
  transition: background var(--transition), transform var(--transition);
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: var(--bg-dark); }
.btn-primary:hover { background: var(--accent-light); }
.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,.6);
  margin-left: 10px;
}
.btn-outline:hover { border-color: #fff; background: rgba(255,255,255,.1); }

.slide-dots {
  position: absolute; bottom: 22px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 8px; z-index: 10;
}
.dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255,255,255,.4);
  cursor: pointer; border: none;
  transition: background var(--transition), transform var(--transition);
}
.dot.active { background: var(--accent); transform: scale(1.3); }

.slide-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 10; background: rgba(255,255,255,.15);
  border: 1.5px solid rgba(255,255,255,.3);
  color: #fff; width: 44px; height: 44px;
  border-radius: 50%; font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background var(--transition);
}
.slide-arrow:hover { background: var(--accent); border-color: var(--accent); color: var(--bg-dark); }
.slide-arrow.prev { left: 20px; }
.slide-arrow.next { right: 20px; }

/* ---------- 6. 数字统计 ---------- */
#stats {
  background: var(--primary);
  padding: 36px 0;
  color: #fff;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.stat-item {
  text-align: center;
  padding: 16px;
  border-right: 1px solid rgba(255,255,255,.15);
}
.stat-item:last-child { border-right: none; }
.stat-item .num {
  font-size: 2.4rem; font-weight: 800;
  color: var(--accent); line-height: 1;
}
.stat-item .unit { font-size: .85rem; font-weight: 400; margin-left: 2px; }
.stat-item .label { font-size: .82rem; opacity: .75; margin-top: 6px; }

/* ---------- 7. 产品分类快捷导航 ---------- */
.cat-nav {
  display: flex; flex-wrap: wrap;
  justify-content: center; gap: 12px;
  margin-bottom: 40px;
}
.cat-btn {
  padding: 8px 22px; border-radius: 30px;
  border: 1.5px solid var(--primary);
  background: transparent; color: var(--primary);
  font-size: .88rem; cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.cat-btn:hover, .cat-btn.active {
  background: var(--primary); color: #fff;
}

/* ---------- 8. 产品卡片 ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}

.product-card {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
}
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}
.product-card .thumb {
  width: 100%; height: 200px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 3.5rem;
}
.product-card .card-body { padding: 18px; }
.product-card .badge {
  display: inline-block;
  background: #e8f0fb; color: var(--primary);
  font-size: .72rem; font-weight: 600;
  padding: 2px 10px; border-radius: 3px;
  margin-bottom: 8px;
}
.product-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.product-card p  { font-size: .83rem; color: var(--text-muted); line-height: 1.5; }
.product-card .card-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--border);
}
.product-card .card-footer .price { color: var(--primary); font-weight: 700; font-size: .9rem; }
.product-card .card-footer .more-btn {
  font-size: .8rem; color: var(--primary-light);
  border: 1px solid var(--primary-light);
  padding: 4px 12px; border-radius: 4px;
  transition: background var(--transition), color var(--transition);
}
.product-card .card-footer .more-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- 9. 新闻卡片 ---------- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.news-card {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.news-card .news-img {
  height: 180px;
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  display: flex; align-items: center; justify-content: center; font-size: 2.8rem;
}
.news-card .news-body { padding: 20px; }
.news-card .news-meta {
  display: flex; gap: 12px; margin-bottom: 10px;
  font-size: .78rem; color: var(--text-muted);
}
.news-card .news-meta .tag { color: var(--primary-light); font-weight: 600; }
.news-card h3 { font-size: .97rem; font-weight: 700; margin-bottom: 8px; line-height: 1.45; }
.news-card p  { font-size: .83rem; color: var(--text-muted); }
.news-card .read-more {
  display: inline-block; margin-top: 14px;
  font-size: .83rem; color: var(--primary);
  font-weight: 600;
}
.news-card .read-more:hover { text-decoration: underline; }

/* ---------- 10. 案例展示 ---------- */
.case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.case-card {
  position: relative; border-radius: var(--radius-lg);
  overflow: hidden; height: 220px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--bg-dark) 100%);
  display: flex; align-items: flex-end;
  cursor: pointer;
  transition: transform var(--transition);
}
.case-card:hover { transform: scale(1.02); }
.case-card .case-icon {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 4rem; opacity: .3;
}
.case-card .case-label {
  position: relative; z-index: 2;
  width: 100%; padding: 16px 20px;
  background: linear-gradient(0deg, rgba(7,29,46,.9) 0%, transparent 100%);
  color: #fff;
}
.case-card .case-label h3 { font-size: .93rem; font-weight: 700; margin-bottom: 4px; }
.case-card .case-label p  { font-size: .78rem; opacity: .75; }

/* ---------- 11. 关于我们 ---------- */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.about-img-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 400px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 60%, var(--accent) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 8rem; opacity: .7;
}
.about-text h2 { font-size: 2rem; font-weight: 800; color: var(--primary); margin-bottom: 18px; }
.about-text p  { color: var(--text-muted); margin-bottom: 14px; line-height: 1.8; }
.about-text ul { margin: 16px 0 24px; }
.about-text ul li {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 0; font-size: .9rem;
}
.about-text ul li::before {
  content: "✓"; width: 20px; height: 20px;
  background: var(--accent); color: var(--bg-dark);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 800; flex-shrink: 0;
}

/* ---------- 12. 荣誉资质 ---------- */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}
.cert-card {
  background: #fff; border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 24px 16px; text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition);
}
.cert-card:hover { transform: translateY(-3px); }
.cert-card .cert-icon { font-size: 2.4rem; margin-bottom: 10px; }
.cert-card h4 { font-size: .85rem; font-weight: 700; color: var(--primary); margin-bottom: 4px; }
.cert-card p  { font-size: .76rem; color: var(--text-muted); }

/* ---------- 13. 联系我们 ---------- */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 48px;
  align-items: start;
}
.contact-info h2 { font-size: 1.7rem; font-weight: 800; color: var(--primary); margin-bottom: 20px; }
.contact-info p  { color: var(--text-muted); margin-bottom: 28px; }
.info-list li {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 0; border-bottom: 1px solid var(--border);
  font-size: .9rem;
}
.info-list li:first-child { border-top: 1px solid var(--border); }
.info-list .icon {
  width: 36px; height: 36px; flex-shrink: 0;
  background: var(--bg-section); border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: var(--primary);
}
.info-list .icon svg { width: 18px; height: 18px; stroke: var(--primary); fill: none; }
.info-list dt { font-weight: 700; color: var(--text-main); margin-bottom: 2px; }
.info-list dd { color: var(--text-muted); }

/* 表单 */
.contact-form {
  background: #fff; padding: 36px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}
.contact-form h3 { font-size: 1.2rem; font-weight: 700; color: var(--primary); margin-bottom: 24px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: .84rem; font-weight: 600; color: var(--text-main); margin-bottom: 6px; }
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--border); border-radius: var(--radius-md);
  font-size: .9rem; color: var(--text-main);
  transition: border-color var(--transition);
  background: #fff;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(10,61,107,.09);
}
.form-group textarea { min-height: 120px; resize: vertical; }
.form-submit {
  width: 100%; padding: 13px;
  background: var(--primary); color: #fff;
  border: none; border-radius: var(--radius-md);
  font-size: .95rem; font-weight: 700; cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
.form-submit:hover { background: var(--primary-light); transform: translateY(-2px); }

/* ---------- 14. 页脚 ---------- */
footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,.7);
  padding: 56px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px; margin-bottom: 40px;
}
.footer-col h4 { color: #fff; font-size: .95rem; font-weight: 700; margin-bottom: 16px; }
.footer-col p  { font-size: .83rem; line-height: 1.8; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a {
  font-size: .83rem; color: rgba(255,255,255,.6);
  transition: color var(--transition);
}
.footer-col ul li a:hover { color: var(--accent); }
.footer-logo {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px; color: #fff;
  font-size: 1.1rem; font-weight: 700;
}
.footer-logo .logo-icon { width: 34px; height: 34px; font-size: 1.1rem; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 18px 0; text-align: center;
  font-size: .8rem; color: rgba(255,255,255,.4);
}
.footer-bottom a { color: rgba(255,255,255,.55); }
.footer-bottom a:hover { color: var(--accent); }

/* ---------- 15. 页面切换动画 ---------- */
.page { display: none; }
.page.active { display: block; animation: fadeInPage .35s ease; }

@keyframes fadeInPage {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- 16. 分页 ---------- */
.pagination {
  display: flex; justify-content: center;
  gap: 6px; margin-top: 40px;
}
.pagination button {
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: #fff; color: var(--text-muted);
  font-size: .88rem; cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.pagination button.active,
.pagination button:hover {
  background: var(--primary); color: #fff; border-color: var(--primary);
}

/* ---------- 17. 面包屑 ---------- */
.breadcrumb {
  background: var(--bg-section);
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: .83rem; color: var(--text-muted);
}
.breadcrumb a { color: var(--primary); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { margin: 0 6px; opacity: .5; }

/* ---------- 18. 加载动画（进入页面） ---------- */
.loader {
  position: fixed; inset: 0;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  transition: opacity .5s ease;
}
.loader .spin {
  width: 48px; height: 48px;
  border: 4px solid rgba(255,255,255,.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 19. 回到顶部 ---------- */
#back-top {
  position: fixed; right: 24px; bottom: 80px;
  width: 44px; height: 44px;
  background: var(--primary); color: #fff;
  border-radius: 50%; border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden;
  transition: opacity var(--transition), transform var(--transition), background var(--transition);
  z-index: 900;
}
#back-top.show { opacity: 1; visibility: visible; }
#back-top:hover { background: var(--accent); color: var(--bg-dark); transform: translateY(-3px); }

/* ---------- 20. 响应式 ---------- */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .about-layout { gap: 36px; }
  .contact-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --nav-height: 60px; }

  .hamburger { display: flex; }

  .nav-menu {
    position: fixed;
    top: var(--nav-height); left: 0; right: 0;
    bottom: 0; overflow-y: auto;
    background: var(--primary);
    flex-direction: column;
    align-items: stretch; gap: 0;
    transform: translateX(-100%);
    transition: transform var(--transition);
    z-index: 999;
  }
  .nav-menu.open { transform: translateX(0); }
  .nav-menu > li > a { height: 52px; padding: 0 20px; border-bottom: 1px solid rgba(255,255,255,.08); }
  .dropdown {
    position: static;
    transform: none; opacity: 1; visibility: visible;
    border-radius: 0; box-shadow: none;
    display: none;
    background: rgba(255,255,255,.06);
  }
  .nav-menu > li.sub-open .dropdown { display: block; }
  .dropdown a { color: rgba(255,255,255,.8); padding: 10px 36px; border-color: rgba(255,255,255,.08); }

  #hero { height: 380px; }
  .slide-content { padding-left: 20px; }
  .slide-content h1 { font-size: 1.7rem; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2) { border-right: none; }

  .about-layout { grid-template-columns: 1fr; }
  .about-img-wrap { height: 240px; }

  .section-header h2 { font-size: 1.5rem; }
  .section { padding: 48px 0; }

  .form-row { grid-template-columns: 1fr; }
  .contact-form { padding: 24px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 480px) {
  .slide-content .tag, .btn-outline { display: none; }
  .product-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .product-card .thumb { height: 140px; }
}
