/* ===== 晶澳储能 JA ESS 官网样式 ===== */
:root {
  --primary: #0a5cd8;
  --primary-dark: #06409b;
  --accent: #00b4d8;
  --dark: #0b1f3a;
  --dark-2: #10284a;
  --text: #333;
  --text-light: #6b7a90;
  --bg: #fff;
  --bg-gray: #f5f7fa;
  --border: #e5e9f0;
  --radius: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  line-height: 1.7;
  background: var(--bg);
  font-size: 15px;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ===== 编辑器上传图片容器兜底（防止裸 img 溢出/无容器） ===== */
.rich-img-wrap {
  max-width: 1280px;
  width: 90%;
  margin: 24px auto;
  background: #fff;
  padding: 16px;
  border-radius: 4px;
}
.rich-img-wrap img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.article-content img[src^="/uploads/"],
.section img[src^="/uploads/"] {
  max-width: 100%;
  height: auto;
}

/* ===== 按钮 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 28px; border-radius: 50px; font-size: 15px; font-weight: 600;
  transition: all .3s; cursor: pointer; border: none; gap: 8px;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(10,92,216,.3); }
.btn-outline { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.5); }
.btn-outline:hover { background: rgba(255,255,255,.15); border-color: #fff; }
.btn-sm { padding: 9px 20px; font-size: 14px; }
.btn-light { background: #fff; color: var(--primary); }
.btn-light:hover { background: #eef4ff; }

/* ===== 页头 ===== */
.site-header {
  position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.96);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 10px; background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; font-weight: 800; font-size: 14px; letter-spacing: -.5px;
}
.logo-mark span { font-weight: 300; font-size: 11px; opacity: .9; margin-left: 2px; }
.logo-text { font-size: 19px; font-weight: 700; color: var(--dark); line-height: 1.1; }
.logo-text small { display: block; font-size: 11px; color: var(--text-light); font-weight: 500; letter-spacing: 1px; }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav > a, .nav-drop > a { padding: 8px 14px; font-size: 15px; color: var(--text); font-weight: 500; border-radius: 6px; transition: all .2s; }
.main-nav > a:hover, .main-nav > a.active, .nav-drop > a.active { color: var(--primary); background: #eef4ff; }
.nav-drop { position: relative; }
.drop-menu {
  position: absolute; top: 100%; left: 0; min-width: 210px; background: #fff;
  border-radius: 10px; box-shadow: 0 12px 32px rgba(0,0,0,.12); padding: 8px;
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: all .25s;
}
.nav-drop:hover .drop-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.drop-menu a { display: block; padding: 10px 14px; font-size: 14px; color: var(--text); border-radius: 6px; }
.drop-menu a:hover { background: #f0f6ff; color: var(--primary); }
.header-right { display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--dark); border-radius: 2px; transition: all .3s; }

/* ===== 页脚 ===== */
.site-footer { background: var(--dark); color: #c6d2e2; margin-top: 60px; }
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 40px; padding: 56px 24px 40px; }
.footer-col h4 { color: #fff; font-size: 16px; margin-bottom: 18px; position: relative; padding-bottom: 10px; }
.footer-col h4::after { content: ''; position: absolute; left: 0; bottom: 0; width: 28px; height: 3px; background: var(--accent); border-radius: 2px; }
.footer-col a { display: block; color: #c6d2e2; font-size: 14px; margin-bottom: 10px; transition: color .2s; }
.footer-col a:hover { color: #fff; }
.footer-col p { font-size: 14px; margin-bottom: 10px; }
.footer-about p { font-size: 13.5px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 20px 24px; }
.footer-bottom .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.footer-bottom p { font-size: 13px; color: #8ba0ba; }

/* ===== 侧浮 ===== */
.side-float { position: fixed; right: 20px; bottom: 120px; z-index: 90; display: flex; flex-direction: column; gap: 10px; }
.float-item {
  width: 52px; height: 52px; border-radius: 50%; background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 0;
  box-shadow: 0 6px 18px rgba(10,92,216,.35); transition: all .3s; font-size: 11px;
}
.float-item:hover { background: var(--primary-dark); transform: translateY(-3px); }

/* ===== Hero 轮播 ===== */
.hero { position: relative; height: 620px; overflow: hidden; }
.hero .swiper, .hero .swiper-slide { height: 100%; }
.hero-slide {
  height: 100%; display: flex; align-items: center; position: relative;
  background: linear-gradient(135deg, #06203f 0%, #0a3d6b 50%, #0a5cd8 100%);
}
.hero-bg { position: absolute; inset: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-content { position: relative; z-index: 2; max-width: 640px; }
.hero-kicker { color: var(--accent); font-size: 15px; letter-spacing: 3px; font-weight: 600; margin-bottom: 14px; text-transform: uppercase; }
.hero-title { color: #fff; font-size: 48px; font-weight: 800; line-height: 1.2; margin-bottom: 20px; }
.hero-title em { color: var(--accent); font-style: normal; }
.hero-sub { color: rgba(255,255,255,.85); font-size: 18px; margin-bottom: 34px; }
.hero-actions { display: flex; gap: 14px; }
.swiper-pagination-bullet { background: rgba(255,255,255,.5); opacity: 1; width: 26px; height: 4px; border-radius: 3px; }
.swiper-pagination-bullet-active { background: #fff; }

/* ===== 通用区块 ===== */
.section { padding: 80px 0; }
.section-gray { background: var(--bg-gray); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 50px; }
.section-kicker { color: var(--primary); font-size: 14px; letter-spacing: 4px; font-weight: 700; text-transform: uppercase; margin-bottom: 12px; }
.section-title { font-size: 34px; font-weight: 800; color: var(--dark); margin-bottom: 16px; }
.section-desc { color: var(--text-light); font-size: 16px; }

/* ===== 解决方案卡片 ===== */
.solution-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.solution-card {
  background: #fff; border-radius: var(--radius); padding: 36px 30px; border: 1px solid var(--border);
  transition: all .3s; position: relative; overflow: hidden;
}
.solution-card:hover { transform: translateY(-6px); box-shadow: 0 16px 40px rgba(10,40,90,.1); border-color: var(--primary); }
.solution-card .icon {
  width: 60px; height: 60px; border-radius: 14px; background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center; color: #fff; margin-bottom: 22px; font-size: 26px;
}
.solution-card h3 { font-size: 20px; color: var(--dark); margin-bottom: 12px; }
.solution-card p { color: var(--text-light); font-size: 14.5px; margin-bottom: 16px; }
.solution-card ul { list-style: none; }
.solution-card ul li { padding: 6px 0; font-size: 14px; color: var(--text); position: relative; padding-left: 20px; }
.solution-card ul li::before { content: ''; position: absolute; left: 0; top: 13px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.solution-card .link { color: var(--primary); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; }

/* ===== 产品展示 ===== */
.product-tabs { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 40px; }
.product-tab { padding: 10px 24px; border-radius: 50px; background: #fff; border: 1px solid var(--border); cursor: pointer; font-size: 15px; font-weight: 500; transition: all .3s; }
.product-tab.active, .product-tab:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.product-panel { display: none; }
.product-panel.active { display: block; }
.product-showcase {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
  background: #fff; border-radius: 16px; padding: 48px; border: 1px solid var(--border);
}
.product-visual { border-radius: 12px; overflow: hidden; background: var(--bg-gray); min-height: 320px; display: flex; align-items: center; justify-content: center; }
.product-visual img { width: 100%; height: 100%; object-fit: contain; }
.product-visual .placeholder { color: #b0bdcc; font-size: 15px; }
.product-info h3 { font-size: 26px; color: var(--dark); margin-bottom: 8px; }
.product-tagline { color: var(--primary); font-weight: 600; font-size: 15px; margin-bottom: 16px; }
.product-info .desc { color: var(--text-light); margin-bottom: 20px; }
.feature-list { list-style: none; margin-bottom: 24px; }
.feature-list li { padding: 5px 0; font-size: 14.5px; position: relative; padding-left: 24px; }
.feature-list li::before { content: '✓'; position: absolute; left: 0; color: var(--primary); font-weight: 700; }

/* ===== 技术优势 ===== */
.adv-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.adv-card {
  background: #fff; border-radius: var(--radius); padding: 30px 24px; text-align: center;
  border: 1px solid var(--border); transition: all .3s;
}
.adv-card:hover { transform: translateY(-5px); box-shadow: 0 12px 30px rgba(10,40,90,.08); }
.adv-card .icon { width: 64px; height: 64px; border-radius: 50%; background: #eef4ff; display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; color: var(--primary); font-size: 28px; }
.adv-card h4 { font-size: 17px; color: var(--dark); margin-bottom: 8px; }
.adv-card p { font-size: 13.5px; color: var(--text-light); }

/* ===== 全球服务 ===== */
.region-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.region-card { background: #fff; border-radius: var(--radius); padding: 28px; border: 1px solid var(--border); }
.region-card h4 { font-size: 17px; color: var(--dark); margin-bottom: 14px; }
.region-card .countries { display: flex; flex-wrap: wrap; gap: 8px; }
.region-card .country { background: var(--bg-gray); padding: 5px 14px; border-radius: 20px; font-size: 13px; color: var(--text); }

/* ===== 服务中心 ===== */
.service-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.service-card { background: #fff; border-radius: var(--radius); padding: 28px; border: 1px solid var(--border); text-align: center; }
.service-card .icon { font-size: 32px; margin-bottom: 14px; }
.service-card h4 { font-size: 16px; color: var(--dark); margin-bottom: 8px; }
.service-card p { font-size: 13.5px; color: var(--text-light); }

/* ===== 新闻 ===== */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.news-card { background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); transition: all .3s; }
.news-card:hover { transform: translateY(-5px); box-shadow: 0 14px 34px rgba(10,40,90,.1); }
.news-thumb { height: 180px; background: linear-gradient(135deg, #0a3d6b, #0a5cd8); display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.7); font-size: 14px; }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-body { padding: 22px; }
.news-date { color: var(--text-light); font-size: 13px; margin-bottom: 8px; }
.news-body h3 { font-size: 17px; color: var(--dark); line-height: 1.5; margin-bottom: 8px; }
.news-body p { font-size: 13.5px; color: var(--text-light); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ===== 项目案例 ===== */
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.project-card { border-radius: var(--radius); overflow: hidden; position: relative; background: var(--dark); }
.project-card img, .project-card .project-ph { width: 100%; height: 240px; object-fit: cover; transition: all .4s; }
.project-card .project-ph { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #0a3d6b, #0a5cd8); color: rgba(255,255,255,.6); }
.project-card:hover img { transform: scale(1.06); }
.project-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(4,25,51,.92) 0%, rgba(4,25,51,.2) 60%, transparent 100%); display: flex; flex-direction: column; justify-content: flex-end; padding: 24px; }
.project-overlay h3 { color: #fff; font-size: 18px; margin-bottom: 6px; }
.project-overlay p { color: rgba(255,255,255,.75); font-size: 13px; }

/* ===== 联系表单 ===== */
.contact-wrap { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; }
.contact-info h3 { font-size: 24px; color: var(--dark); margin-bottom: 20px; }
.contact-item { display: flex; gap: 14px; margin-bottom: 20px; }
.contact-item .icon { width: 44px; height: 44px; border-radius: 10px; background: #eef4ff; color: var(--primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.contact-item h4 { font-size: 15px; color: var(--dark); margin-bottom: 2px; }
.contact-item p { font-size: 14px; color: var(--text-light); }
.contact-form { background: #fff; border-radius: 16px; padding: 40px; border: 1px solid var(--border); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; color: var(--dark); margin-bottom: 6px; }
.form-group label .req { color: #e5484d; font-size: 16px; font-weight: 700; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 12px 16px; border: 1.5px solid #94a3b8; border-radius: 8px;
  font-size: 14px; font-family: inherit; transition: border .2s, box-shadow .2s; background: #fff;
}
.form-group input:hover, .form-group textarea:hover, .form-group select:hover { border-color: #64748b; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(10,92,216,.12); }
.form-group textarea { min-height: 120px; resize: vertical; }
.form-msg { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; display: none; }
.form-msg.success { display: block; background: #e8f7ee; color: #1a7f4b; }
.form-msg.error { display: block; background: #fdebec; color: #c0392b; }

/* ===== 页面横幅 ===== */
.page-hero { background: linear-gradient(135deg, #06203f 0%, #0a3d6b 50%, #0a5cd8 100%); padding: 90px 0 70px; position: relative; overflow: hidden; }
.page-hero::after { content: ''; position: absolute; right: -60px; top: -60px; width: 300px; height: 300px; border-radius: 50%; background: rgba(0,180,216,.15); }
.page-hero h1 { color: #fff; font-size: 40px; font-weight: 800; margin-bottom: 14px; position: relative; z-index: 1; }
.page-hero .crumb { color: rgba(255,255,255,.7); font-size: 14px; position: relative; z-index: 1; }
.page-hero .crumb a { color: rgba(255,255,255,.9); }
.page-hero .crumb a:hover { color: #fff; }

/* ===== 详情页 ===== */
.article-body { background: #fff; border-radius: 16px; padding: 48px; border: 1px solid var(--border); }
.article-body h1 { font-size: 30px; color: var(--dark); margin-bottom: 16px; line-height: 1.4; }
.article-meta { color: var(--text-light); font-size: 14px; margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.article-content { font-size: 16px; color: var(--text); line-height: 1.9; }
.article-content p { margin-bottom: 18px; }
.article-content h2 { font-size: 22px; color: var(--dark); margin: 30px 0 14px; }

/* ===== 产品参数表 ===== */
.param-table { width: 100%; border-collapse: collapse; margin: 24px 0; }
.param-table th, .param-table td { padding: 12px 16px; border: 1px solid var(--border); font-size: 14px; text-align: left; }
.param-table th { background: #f0f6ff; color: var(--dark); font-weight: 600; width: 200px; }

/* ===== 分页 ===== */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.pagination a, .pagination span { padding: 9px 16px; border-radius: 8px; border: 1px solid var(--border); font-size: 14px; color: var(--text); transition: all .2s; }
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ===== 后台样式 ===== */
.admin-body { background: #f0f2f6; font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif; }
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 240px; background: var(--dark); color: #c6d2e2; display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 100;
}
.admin-brand { padding: 24px 20px; border-bottom: 1px solid rgba(255,255,255,.08); color: #fff; font-size: 18px; font-weight: 700; }
.admin-brand small { display: block; font-size: 11px; color: var(--accent); font-weight: 400; letter-spacing: 1px; }
.admin-nav { flex: 1; padding: 16px 0; overflow-y: auto; }
.admin-nav a {
  display: flex; align-items: center; gap: 10px; padding: 12px 20px; color: #c6d2e2;
  font-size: 14px; transition: all .2s; border-left: 3px solid transparent;
}
.admin-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.admin-nav a.active { background: rgba(10,92,216,.25); color: #fff; border-left-color: var(--accent); }
.admin-main { margin-left: 240px; flex: 1; padding: 30px; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.admin-topbar h1 { font-size: 24px; color: var(--dark); }
.admin-topbar .user { display: flex; align-items: center; gap: 14px; font-size: 14px; color: var(--text-light); }
.admin-card { background: #fff; border-radius: 12px; padding: 26px; box-shadow: 0 2px 10px rgba(0,0,0,.04); margin-bottom: 24px; }
.admin-card h2 { font-size: 18px; color: var(--dark); margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 24px; }
.stat-card { background: #fff; border-radius: 12px; padding: 24px; box-shadow: 0 2px 10px rgba(0,0,0,.04); }
.stat-card .num { font-size: 32px; font-weight: 800; color: var(--primary); margin-bottom: 4px; }
.stat-card .label { font-size: 14px; color: var(--text-light); }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: 12px 14px; text-align: left; font-size: 14px; border-bottom: 1px solid var(--border); }
.admin-table th { background: #f8fafc; color: var(--dark); font-weight: 600; white-space: nowrap; }
.admin-table tr:hover td { background: #fafcff; }
.admin-table .thumb { width: 50px; height: 38px; object-fit: cover; border-radius: 4px; }
.btn-mini { padding: 5px 12px; border-radius: 6px; font-size: 13px; border: none; cursor: pointer; transition: all .2s; }
.btn-edit { background: #eef4ff; color: var(--primary); }
.btn-edit:hover { background: var(--primary); color: #fff; }
.btn-del { background: #fdebec; color: #e5484d; }
.btn-del:hover { background: #e5484d; color: #fff; }
.admin-form .form-group { margin-bottom: 18px; }
.admin-form input[type=text], .admin-form input[type=password], .admin-form input[type=date], .admin-form input[type=number], .admin-form textarea, .admin-form select {
  width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; font-family: inherit;
}
.admin-form textarea { min-height: 100px; }
.admin-form input:focus, .admin-form textarea:focus, .admin-form select:focus { outline: none; border-color: var(--primary); }
.upload-preview { margin-top: 10px; max-width: 200px; border-radius: 8px; border: 1px solid var(--border); }
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #06203f, #0a3d6b, #0a5cd8); }
.login-box { background: #fff; border-radius: 16px; padding: 44px; width: 400px; max-width: 92%; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.login-box h1 { font-size: 24px; color: var(--dark); text-align: center; margin-bottom: 6px; }
.login-box .sub { text-align: center; color: var(--text-light); font-size: 14px; margin-bottom: 28px; }
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.alert-success { background: #e8f7ee; color: #1a7f4b; }
.alert-error { background: #fdebec; color: #c0392b; }

/* ===== 响应式 ===== */
@media (max-width: 992px) {
  .solution-grid, .region-grid, .service-grid, .news-grid, .project-grid { grid-template-columns: repeat(2, 1fr); }
  .adv-grid { grid-template-columns: repeat(2, 1fr); }
  .product-showcase { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .contact-wrap { grid-template-columns: 1fr; }
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .main-nav.open { display: flex; flex-direction: column; position: absolute; top: 76px; left: 0; right: 0; background: #fff; padding: 16px 24px; box-shadow: 0 16px 30px rgba(0,0,0,.1); align-items: stretch; }
  .drop-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; padding-left: 16px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .solution-grid, .region-grid, .service-grid, .news-grid, .project-grid, .adv-grid, .footer-top { grid-template-columns: 1fr; }
  .hero-title { font-size: 32px; }
  .hero { height: 480px; }
  .section { padding: 52px 0; }
  .section-title { font-size: 26px; }
  .form-row { grid-template-columns: 1fr; }
  .admin-sidebar { width: 200px; }
  .admin-main { margin-left: 200px; padding: 16px; }
}
