/* 武穴市微磁电子有限公司 - 企业门户样式 */
:root {
  --color-primary: #123d6b;
  --color-primary-light: #1f5b96;
  --color-accent: #0066cc;
  --color-accent-hover: #0052a3;
  --color-text: #2c3e50;
  --color-text-muted: #5a6c7d;
  --color-bg: #ffffff;
  --color-bg-alt: #f5f7fa;
  --color-border: #e2e8f0;
  --font-sans: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  --font-mono: "Consolas", "Monaco", monospace;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --radius: 6px;
  --header-height: 72px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  line-height: 1.6;
  background: var(--color-bg);
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--color-accent-hover);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ========== 头部导航 ========== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--color-primary);
  color: #fff;
  z-index: 1000;
  box-shadow: var(--shadow-md);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}
.site-logo:hover {
  color: #fff;
  opacity: 0.9;
}

.site-logo img {
  height: 32px;
  width: auto;
}

.site-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.site-logo-text-main {
  font-size: 1.05rem;
  font-weight: 700;
}

.site-logo-text-sub {
  font-size: 0.8rem;
  opacity: 0.9;
}

nav {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 8px;
}

.nav-list a {
  color: rgba(255,255,255,0.9);
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: 0.95rem;
}
.nav-list a:hover,
.nav-list a.active {
  color: #fff;
  background: rgba(255,255,255,0.12);
}

/* 中英语言切换 - 分段式按钮 */
.lang-switch {
  display: inline-flex;
  align-items: stretch;
  margin-left: 12px;
  padding-left: 16px;
  border-left: 1px solid rgba(255,255,255,0.25);
  flex-shrink: 0;
  font-size: 0.875rem;
  font-weight: 500;
  background: rgba(0,0,0,0.2);
  border-radius: 20px;
  padding: 3px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.15);
}
.lang-switch span,
.lang-switch a {
  color: rgba(255,255,255,0.85);
  padding: 6px 14px;
  border-radius: 18px;
  transition: color 0.2s, background 0.2s;
}
.lang-switch a:hover {
  color: #fff;
  background: rgba(255,255,255,0.15);
}
.lang-switch .active {
  color: var(--color-primary);
  background: #fff;
  font-weight: 600;
  cursor: default;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

/* 移动端菜单按钮 */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-list {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-primary-light);
    flex-direction: column;
    padding: 16px;
    gap: 4px;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s, opacity 0.3s, visibility 0.3s;
    box-shadow: var(--shadow-md);
  }
  .nav-list.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  .nav-list a {
    padding: 12px 16px;
    display: block;
  }
  .lang-switch {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    padding-top: 12px;
    margin-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding: 12px 0 0;
    background: none;
    box-shadow: none;
    border-radius: 0;
  }
  .lang-switch .active {
    color: #fff;
    background: rgba(255,255,255,0.2);
    box-shadow: none;
  }
}

/* ========== 主内容区 ========== */
.main-content {
  min-height: calc(100vh - var(--header-height));
  padding-top: var(--header-height);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 64px 0;
}

.section-title {
  font-size: 1.75rem;
  color: var(--color-primary);
  margin-bottom: 12px;
  font-weight: 700;
}

.section-subtitle {
  color: var(--color-text-muted);
  font-size: 1rem;
  margin-bottom: 40px;
}

/* ========== 首页 Hero ========== */
.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: #fff;
  padding: 80px 24px 100px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.3;
}

.hero .tagline {
  font-size: 1.1rem;
  opacity: 0.95;
  max-width: 560px;
  margin: 0 auto 32px;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  background: var(--color-accent);
  color: #fff !important;
  border-radius: var(--radius);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}
.btn:hover {
  background: var(--color-accent-hover);
  color: #fff;
}
.btn-outline {
  background: transparent;
  border: 2px solid rgba(255,255,255,0.8);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.15);
  border-color: #fff;
}

/* ========== 首页 简介/优势 卡片 ========== */
.intro-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--color-accent), var(--color-primary-light));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.card h3 {
  font-size: 1.1rem;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.card p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* ========== 首页 产品线入口（参考 PCA/Coilcraft）========== */
.product-lines {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.product-line-block {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.product-line-block:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
}

.product-line-block h3 {
  font-size: 1.1rem;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.product-line-block p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.product-line-block .link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-accent);
}
.product-line-block .link:hover {
  text-decoration: underline;
}

/* ========== 首页 新品/重点产品推荐 ========== */
.new-products {
  margin-top: 32px;
}

.new-products .product-list {
  list-style: none;
}

.new-products .product-list li {
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: baseline;
}
.new-products .product-list li:last-child {
  border-bottom: none;
}

.new-products .product-list .date {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  min-width: 90px;
}

.new-products .product-list a {
  font-weight: 600;
  color: var(--color-primary);
}
.new-products .product-list a:hover {
  color: var(--color-accent);
}

.new-products .product-list .desc {
  width: 100%;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

/* ========== 首页 应用领域聚焦（参考 PCA Marketplace）========== */
.spotlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.spotlight-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  transition: box-shadow 0.2s, transform 0.2s;
}
.spotlight-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.spotlight-card h3 {
  font-size: 1.05rem;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.spotlight-card p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* ========== 产品页 分类锚点导航 ========== */
.product-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
  padding: 20px;
  background: var(--color-bg-alt);
  border-radius: var(--radius);
}

.product-nav a {
  padding: 8px 16px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text);
  font-size: 0.95rem;
}
.product-nav a:hover,
.product-nav a.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

/* ========== 页脚 资质 ========== */
.footer-cert {
  font-size: 0.85rem;
  opacity: 0.9;
  margin-top: 8px;
}

/* ========== 内页通用 ========== */
.page-header {
  background: var(--color-bg-alt);
  padding: 48px 24px;
  border-bottom: 1px solid var(--color-border);
}

.page-header h1 {
  font-size: 1.75rem;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.page-header .breadcrumb {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}
.page-header .breadcrumb a {
  color: var(--color-text-muted);
}
.page-header .breadcrumb a:hover {
  color: var(--color-accent);
}

/* ========== 产品网格 ========== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.product-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.product-card:hover {
  box-shadow: var(--shadow-md);
}

.product-card .thumb {
  height: 180px;
  background: var(--color-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 3rem;
}

.product-card .body {
  padding: 20px;
}

.product-card h3 {
  font-size: 1.1rem;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.product-card p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* ========== 新闻列表 ========== */
.news-list {
  list-style: none;
}

.news-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.news-item:last-child {
  border-bottom: none;
}

.news-date {
  flex-shrink: 0;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  min-width: 100px;
}

.news-item h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}
.news-item h3 a {
  color: var(--color-text);
}
.news-item h3 a:hover {
  color: var(--color-accent);
}

.news-item p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* ========== 联系页 ========== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

.contact-info h3 {
  font-size: 1.1rem;
  color: var(--color-primary);
  margin-bottom: 16px;
}

.contact-info p {
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.contact-info a {
  color: var(--color-accent);
}

.map-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-bg-alt);
  min-height: 220px;
  display: flex;
  align-items: stretch;
  justify-content: center;
  color: var(--color-text-muted);
}

.map-image-link {
  display: block;
  width: 100%;
}

.map-image-link img {
  display: block;
  width: 80%;
  max-width: 480px;
  margin: 0 auto;
  height: auto;
}

/* ========== 首页 荣誉与认证 ========== */
.honors-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: start;
  margin-top: 28px;
}

.honors-content {
  /* 让整块内容更宽一些，减少文本换行 */
  max-width: 1100px;
}

.honors-lead {
  color: var(--color-text);
  margin-bottom: 18px;
  /* 让文案在更宽的行内显示，减少过早换行 */
  max-width: 1000px;
  margin-right: auto;
  font-size: 0.95rem;
  line-height: 1.7;
}

.honors-badges {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  /* 行间距保持紧凑，列间距略放大一点 */
  row-gap: 12px;
  column-gap: 32px;
}

@media (max-width: 520px) {
  .honors-badges {
    grid-template-columns: 1fr;
  }
}

.honor-badge {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.85);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.honor-year {
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: 0.5px;
  flex: 0 0 auto;
}

.honor-name {
  color: var(--color-text);
  font-weight: 600;
  line-height: 1.35;
}

.honors-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 900px) {
  .honors-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .honors-gallery {
    grid-template-columns: 1fr;
  }
}

.honor-card {
  display: block;
  width: 100%;
  padding: 0;
  text-align: left;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.honor-card:focus-visible {
  outline: 3px solid rgba(0,102,204,0.35);
  outline-offset: 2px;
}

.honor-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.honor-card img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  background: #f8fafc;
  display: block;
}

@media (max-width: 900px) {
  .honor-card img {
    height: 220px;
  }
}

.honor-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 3000;
}

.honor-modal.is-open {
  display: block;
}

.honor-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(2px);
}

.honor-modal-dialog {
  position: absolute;
  inset: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.honor-modal-toolbar {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.35);
}

.honor-tool {
  min-width: 44px;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.honor-tool:hover {
  background: rgba(255,255,255,0.16);
}

.honor-tool:focus-visible {
  outline: 3px solid rgba(255,255,255,0.25);
  outline-offset: 2px;
}

.honor-modal-stage {
  max-width: min(980px, 100%);
  max-height: 100%;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: grab;
}

.honor-modal-stage.is-dragging {
  cursor: grabbing;
}

@media (max-width: 520px) {
  .honor-modal-dialog {
    inset: 16px;
  }
}

.honor-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(0,0,0,0.35);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.honor-modal-close:hover {
  background: rgba(0,0,0,0.5);
}

.honor-modal-img {
  max-width: none;
  max-height: none;
  width: auto;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 18px 60px rgba(0,0,0,0.45);
  background: #fff;
  transform-origin: center center;
  will-change: transform;
}

/* ========== 页脚 ========== */
.site-footer {
  background: var(--color-primary);
  color: rgba(255,255,255,0.85);
  padding: 48px 24px 24px;
  margin-top: 64px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .product-nav {
    flex-direction: column;
  }
}

.footer-brand {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}

.footer-brand:hover {
  color: #fff;
  opacity: 0.9;
}

.footer-desc {
  font-size: 0.9rem;
  line-height: 1.7;
  opacity: 0.9;
}

.footer-col h4 {
  font-size: 0.95rem;
  color: #fff;
  margin-bottom: 12px;
  font-weight: 600;
}

.footer-col ul {
  list-style: none;
}
.footer-col a {
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  display: block;
  padding: 4px 0;
}
.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 0.85rem;
  opacity: 0.8;
  text-align: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
  line-height: 1.6;
}

.footer-bottom a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
}

.footer-bottom a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-bottom .sep {
  opacity: 0.7;
  padding: 0 4px;
}

.footer-bottom .police-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.footer-bottom .police-link:hover {
  text-decoration: none;
}

.footer-bottom .police-link span {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.85);
}

.footer-bottom .police-link img {
  width: 16px;
  height: 16px;
  vertical-align: middle;
}
