/* ===================================================================
   SHILAN CHEMICAL — Global Stylesheet
   对标大明消毒 (sddaming.com) 的工业B2B独立站
   核心产品: SDIC (二氯异氰尿酸钠) & TCCA (三氯异氰尿酸)
   =================================================================== */

:root {
  --primary: #0B4C8C;        /* 工业可靠蓝 */
  --primary-dark: #083D72;   /* 深蓝 */
  --primary-darker: #05264A; /* 极深蓝 (页脚渐变) */
  --accent: #00A896;         /* 洁净净水绿 */
  --accent-dark: #008f7f;    /* 深绿 hover */
  --dark: #1E252B;           /* 页脚专业底色 */
  --light-bg: #F4F7FA;       /* 区块交替浅灰 */
  --text-main: #2B303A;      /* 正文主色 */
  --text-muted: #6C757D;     /* 次要文字 */
  --border: #E9ECEF;         /* 边框线 */
  --font: 'Segoe UI', 'Helvetica Neue', Tahoma, Geneva, Verdana, sans-serif;
  --shadow-sm: 0 4px 10px rgba(0,0,0,0.05);
  --shadow-md: 0 8px 25px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 30px rgba(11,76,140,0.12);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text-main);
  line-height: 1.65;
  background: #fff;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: all 0.3s ease; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ---------- Top Info Bar ---------- */
.top-bar {
  background: var(--primary);
  color: #fff;
  font-size: 13.5px;
  padding: 8px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.top-bar a { color: #fff; opacity: 0.9; }
.top-bar a:hover { opacity: 1; color: var(--accent); }

/* ---------- Header / Nav ---------- */
.header {
  background: #fff;
  box-shadow: var(--shadow-sm);
  padding: 14px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
}
.logo {
  font-size: 23px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 0.5px;
}
.logo span { color: var(--accent); }
.logo small {
  display: block;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.nav-menu {
  display: flex;
  gap: 28px;
  align-items: center;
  font-weight: 600;
  font-size: 15px;
}
.nav-menu a { position: relative; padding: 6px 0; }
.nav-menu a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}
.nav-menu a:hover::after,
.nav-menu a.active::after { width: 100%; }
.nav-menu a:hover, .nav-menu a.active { color: var(--accent); }

.nav-toggle {
  display: none;
  font-size: 26px;
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 12px 30px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,168,150,0.3);
}
.btn:hover { background: var(--accent-dark); transform: translateY(-2px); color: #fff; }
.btn-outline {
  background: transparent;
  border: 2px solid #fff;
  box-shadow: none;
}
.btn-outline:hover { background: #fff; color: var(--primary); }
.btn-primary { background: var(--primary); box-shadow: 0 4px 12px rgba(11,76,140,0.3); }
.btn-primary:hover { background: var(--primary-dark); }

/* ---------- Page Banner (内页头图) ---------- */
.page-banner {
  background: linear-gradient(rgba(11,76,140,0.88), rgba(30,37,43,0.82)),
    url('https://images.unsplash.com/photo-1581093588401-fbb62a02f120?auto=format&fit=crop&q=80&w=1600') center/cover;
  color: #fff;
  text-align: center;
  padding: 90px 5%;
}
.page-banner h1 { font-size: 40px; font-weight: 700; margin-bottom: 12px; }
.page-banner .crumb { font-size: 14px; opacity: 0.85; }
.page-banner .crumb a:hover { color: var(--accent); }

/* ---------- Sections ---------- */
.section { padding: 80px 5%; }
.section-grey { background: var(--light-bg); }
.container { max-width: 1200px; margin: 0 auto; }

.section-head { text-align: center; margin-bottom: 50px; }
.section-head .eyebrow {
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 13px;
  margin-bottom: 8px;
}
.section-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
  position: relative;
  display: inline-block;
}
.section-title::after {
  content: '';
  display: block;
  width: 60px; height: 3px;
  background: var(--accent);
  margin: 14px auto 0;
}
.section-subtitle {
  color: var(--text-muted);
  max-width: 720px;
  margin: 18px auto 0;
  font-size: 16px;
}

/* ---------- Hero (首页, 3-slide carousel) ---------- */
.hero {
  position: relative;
  color: #fff;
  padding: 150px 5%;
  text-align: center;
  overflow: hidden;
  min-height: 520px;
}
/* Each background slide is absolutely positioned, fades in/out */
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
  z-index: 1;
}
.hero-slide.active { opacity: 1; }

.hero-content { position: relative; z-index: 3; max-width: 920px; margin: 0 auto; }
.hero h1 { font-size: 48px; font-weight: 800; margin-bottom: 22px; line-height: 1.25; }
.hero p { font-size: 20px; opacity: 0.92; margin-bottom: 35px; }
.hero .btn-group { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* Carousel dot navigation */
.hero-dots {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 4;
}
.hero-dots .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.7);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s ease;
}
.hero-dots .dot:hover { background: rgba(255,255,255,0.5); transform: scale(1.15); }
.hero-dots .dot.active {
  background: var(--accent);
  border-color: var(--accent);
  width: 30px;
  border-radius: 6px;
}

/* ---------- Stats / Counter ---------- */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}
.stat-item .num { font-size: 40px; font-weight: 800; color: var(--accent); }
.stat-item .label { color: var(--text-muted); font-size: 15px; margin-top: 4px; }

/* ---------- About split ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}
.split h3 { font-size: 26px; color: var(--primary); margin-bottom: 16px; }
.split p { color: #4A5056; margin-bottom: 18px; text-align: justify; }
.split img { border-radius: 8px; box-shadow: var(--shadow-md); }

.feature-list li {
  padding-left: 28px;
  position: relative;
  margin-bottom: 12px;
  color: #4A5056;
}
.feature-list li::before {
  content: '✓';
  position: absolute; left: 0;
  width: 20px; height: 20px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-size: 12px;
  text-align: center;
  line-height: 20px;
  font-weight: 700;
}

/* ---------- Product Grid ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 32px;
}
.product-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.product-card .ph {
  height: 210px;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  font-weight: 700;
  text-align: center;
  padding: 0 20px;
  position: relative;
}
.product-card .ph .badge {
  position: absolute;
  bottom: 14px; right: 14px;
  background: var(--accent);
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
}
.product-card .body { padding: 24px; }
.product-card .body h3 { color: var(--primary); font-size: 20px; margin-bottom: 10px; }
.product-card .body p { color: var(--text-muted); font-size: 14px; margin-bottom: 16px; }
.product-card .body .spec { font-size: 13.5px; color: #555; margin-bottom: 6px; }
.product-card .body .spec b { color: var(--primary); }
.product-card .more { color: var(--accent); font-weight: 700; font-size: 14px; }
.product-card .more:hover { letter-spacing: 0.5px; }

/* ---------- Spec Table ---------- */
.spec-table-wrap { overflow-x: auto; margin-top: 20px; }
.spec-table { width: 100%; border-collapse: collapse; min-width: 600px; }
.spec-table th, .spec-table td {
  padding: 14px 18px;
  border: 1px solid var(--border);
  text-align: left;
  font-size: 14.5px;
}
.spec-table th { background: var(--primary); color: #fff; font-weight: 600; }
.spec-table tr:nth-child(even) { background: var(--light-bg); }

/* ---------- Application / Solution cards ---------- */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 26px;
}
.app-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 34px 24px;
  text-align: center;
  transition: all 0.3s ease;
}
.app-card:hover { background: var(--primary); color: #fff; transform: translateY(-5px); border-color: var(--primary); }
.app-card .icon { font-size: 44px; margin-bottom: 16px; }
.app-card h4 { font-size: 19px; margin-bottom: 10px; }
.app-card p { font-size: 14px; color: var(--text-muted); }
.app-card:hover p { color: rgba(255,255,255,0.88); }

/* ---------- Solution row (大块图文) ---------- */
.sol-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 45px;
  align-items: center;
  margin-bottom: 60px;
}
.sol-row:last-child { margin-bottom: 0; }
.sol-row.reverse .sol-text { order: 2; }
.sol-text h3 { font-size: 25px; color: var(--primary); margin-bottom: 14px; }
.sol-text p { color: #4A5056; margin-bottom: 14px; }
.sol-row img { border-radius: 8px; box-shadow: var(--shadow-md); height: 100%; object-fit: cover; }

/* ---------- Trust / CTA banner ---------- */
.cta-banner {
  background: linear-gradient(135deg, var(--primary), var(--primary-darker));
  color: #fff;
  text-align: center;
  padding: 70px 5%;
}
.cta-banner h2 { font-size: 30px; margin-bottom: 14px; }
.cta-banner p { max-width: 760px; margin: 0 auto 28px; opacity: 0.88; }

/* ---------- Download / Tech cards ---------- */
.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.doc-card {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 26px;
  transition: all 0.3s ease;
}
.doc-card:hover { box-shadow: var(--shadow-md); transform: translateX(4px); }
.doc-card .doc-type { font-size: 12px; color: var(--accent); font-weight: 700; letter-spacing: 1px; }
.doc-card h4 { color: var(--primary); margin: 8px 0 12px; font-size: 18px; }
.doc-card p { font-size: 14px; color: var(--text-muted); margin-bottom: 16px; }

/* ---------- FAQ ---------- */
.faq-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 14px;
  overflow: hidden;
}
.faq-q {
  padding: 18px 24px;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-q::after { content: '+'; font-size: 22px; color: var(--accent); }
.faq-item.open .faq-q::after { content: '−'; }
.faq-a { padding: 0 24px; max-height: 0; overflow: hidden; transition: all 0.3s ease; color: #4A5056; }
.faq-item.open .faq-a { padding: 0 24px 20px; max-height: 300px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 45px; }
.contact-info-card { display: flex; gap: 16px; margin-bottom: 24px; }
.contact-info-card .ci-icon {
  width: 48px; height: 48px;
  background: var(--light-bg);
  color: var(--accent);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.contact-info-card h4 { color: var(--primary); font-size: 16px; margin-bottom: 2px; }
.contact-info-card p { color: var(--text-muted); font-size: 14.5px; }

.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: var(--font);
  font-size: 15px;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none; border-color: var(--accent);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--dark);
  color: #A9B1B9;
  padding: 60px 5% 22px;
  font-size: 15px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 2fr;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto 40px;
}
.footer-col h4 { color: #fff; font-size: 18px; margin-bottom: 20px; }
.footer-col p { font-size: 14px; text-align: justify; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a:hover { color: var(--accent); padding-left: 5px; }
.footer-col .ci { display: flex; gap: 10px; margin-bottom: 12px; font-size: 14px; }
.footer-bottom {
  border-top: 1px solid #2D3741;
  padding-top: 20px;
  text-align: center;
  font-size: 13px;
}
.footer-bottom a:hover { color: var(--accent); }

/* ---------- News Grid (WP-synced) ---------- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 28px;
}
.news-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  color: inherit;
  text-decoration: none;
}
.news-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}
.news-img {
  height: 180px;
  background-size: cover;
  background-position: center;
  background-color: var(--light-bg);
}
.news-img-placeholder {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  color: rgba(255,255,255,0.85);
}
.news-body {
  padding: 22px 24px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.news-date {
  font-size: 12.5px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.news-title {
  color: var(--primary);
  font-size: 17px;
  line-height: 1.4;
  margin-bottom: 10px;
  font-weight: 700;
}
.news-excerpt {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 14px;
  flex: 1;
}
.news-more {
  color: var(--accent);
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: 0.3px;
}
.news-card:hover .news-more { letter-spacing: 1px; }
.news-loading, .news-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-muted);
  padding: 40px 20px;
  font-style: italic;
}

/* ---------- Floating Social Sidebar (right column) ---------- */
.float-social {
  position: fixed;
  right: 18px;
  bottom: 22px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}
.float-social a {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}
.float-social a svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}
.float-social a:hover {
  transform: translateX(-4px) scale(1.08);
  box-shadow: 0 8px 22px rgba(0,0,0,0.28);
}
/* Tooltip on hover */
.float-social a::before {
  content: attr(data-label);
  position: absolute;
  right: 58px;
  top: 50%;
  transform: translateY(-50%) translateX(8px);
  background: var(--dark);
  color: #fff;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}
.float-social a:hover::before {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}
/* Brand colors */
.float-social .sm-facebook  { background: #1877F2; }
.float-social .sm-linkedin  { background: #0A66C2; }
.float-social .sm-youtube   { background: #FF0000; }
.float-social .sm-instagram { background: linear-gradient(45deg, #F58529 0%, #DD2A7B 50%, #8134AF 100%); }
.float-social .sm-x         { background: #000000; }
.float-social .sm-whatsapp  {
  background: #25D366;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin-top: 6px;
  animation: pulse 2.2s infinite;
}
.float-social .sm-whatsapp svg { width: 26px; height: 26px; }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(37,211,102,0.5); }
  70% { box-shadow: 0 0 0 14px rgba(37,211,102,0); }
  100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); }
}

/* Hide tooltips on mobile to avoid overlap */
@media (max-width: 768px) {
  .float-social a::before { display: none; }
  .float-social { right: 12px; bottom: 12px; gap: 8px; }
  .float-social a { width: 40px; height: 40px; }
  .float-social .sm-whatsapp { width: 48px; height: 48px; }
}

/* Legacy .float-wa kept for backward compatibility but hidden if .float-social exists */
.float-social ~ .float-wa,
.float-wa + .float-social { display: none; }
/* Original standalone WhatsApp (when no social sidebar present) */
.float-wa {
  position: fixed;
  right: 22px; bottom: 22px;
  width: 56px; height: 56px;
  background: #25D366;
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  z-index: 999;
  animation: pulse 2s infinite;
  text-decoration: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats-bar { grid-template-columns: 1fr 1fr; gap: 36px 20px; }
}
@media (max-width: 768px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    gap: 0;
    padding: 10px 0;
    box-shadow: var(--shadow-md);
  }
  .nav-menu.show { display: flex; }
  .nav-menu a { padding: 12px 24px; width: 100%; }
  .nav-toggle { display: block; }
  .hero h1 { font-size: 32px; }
  .hero p { font-size: 17px; }
  .page-banner h1 { font-size: 30px; }
  .split, .sol-row, .sol-row.reverse .sol-text, .contact-grid { grid-template-columns: 1fr; }
  .sol-row.reverse .sol-text { order: 0; }
  .section-title { font-size: 26px; }
  .section { padding: 56px 5%; }
}
@media (max-width: 480px) {
  .stats-bar { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
