/*
Theme Name: Shilan Unified
Theme URI: https://sdic-tcca.hbkaixuan.cn/
Author: Shilan Chemical
Description: Custom theme that visually matches the Shilan Chemical static site (industrial blue + clean teal). Used to render WordPress posts/pages with the same look and feel as the marketing site at https://sdic-tcca.hbkaixuan.cn/.
Version: 1.0
Text Domain: shilan-unified
*/

:root {
  --primary: #0B4C8C;
  --primary-dark: #083D72;
  --primary-darker: #05264A;
  --accent: #00A896;
  --accent-dark: #008f7f;
  --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.7; background: #fff; overflow-x: hidden; }
a { text-decoration: none; color: var(--accent); transition: all 0.3s ease; }
a:hover { color: var(--primary); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { padding-left: 1.5em; }

/* ---------- Top 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; text-decoration: none; }
.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;
  text-decoration: none;
}
.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;
  list-style: none;
  padding: 0;
}
.nav-menu a { position: relative; padding: 6px 0; color: var(--text-main); text-decoration: none; }
.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 { width: 100%; }
.nav-menu a:hover { color: var(--accent); }
.nav-toggle {
  display: none;
  font-size: 26px;
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
}

/* ---------- 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: 80px 5%;
}
.page-banner h1 { font-size: 36px; font-weight: 700; margin-bottom: 12px; color: #fff; }
.page-banner .crumb { font-size: 14px; opacity: 0.85; }
.page-banner .crumb a { color: #fff; }
.page-banner .crumb a:hover { color: var(--accent); }

/* ---------- Main content ---------- */
.site-main { padding: 60px 5%; min-height: 50vh; }
.container { max-width: 900px; margin: 0 auto; }
.container-wide { max-width: 1200px; margin: 0 auto; }

/* ---------- Posts ---------- */
.post-meta {
  font-size: 13px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.post-meta a { color: var(--accent); }

.entry-title {
  font-size: 32px;
  color: var(--primary);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 24px;
}

.entry-content {
  font-size: 16.5px;
  color: var(--text-main);
}
.entry-content p { margin-bottom: 18px; }
.entry-content h2 {
  font-size: 26px;
  color: var(--primary);
  margin: 38px 0 18px;
  font-weight: 700;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 8px;
}
.entry-content h3 {
  font-size: 21px;
  color: var(--primary);
  margin: 30px 0 14px;
  font-weight: 700;
}
.entry-content h4 {
  font-size: 18px;
  color: var(--primary-dark);
  margin: 24px 0 12px;
  font-weight: 700;
}
.entry-content ul, .entry-content ol {
  margin: 0 0 22px 0;
  padding-left: 1.6em;
}
.entry-content li {
  margin-bottom: 8px;
  line-height: 1.7;
}
.entry-content blockquote {
  border-left: 4px solid var(--accent);
  padding: 14px 22px;
  margin: 22px 0;
  background: var(--light-bg);
  font-style: italic;
  color: var(--text-muted);
}
.entry-content strong { color: var(--primary); }
.entry-content em { color: var(--text-muted); }
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 22px 0;
  font-size: 14.5px;
}
.entry-content table th {
  background: var(--primary);
  color: #fff;
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
}
.entry-content table td {
  padding: 11px 16px;
  border: 1px solid var(--border);
}
.entry-content table tr:nth-child(even) td { background: var(--light-bg); }
.entry-content img { border-radius: 8px; margin: 18px 0; }

/* ---------- Archive / Index Loop ---------- */
.post-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px 30px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}
.post-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.post-card .entry-title { font-size: 22px; margin-bottom: 12px; }
.post-card .entry-title a { color: var(--primary); text-decoration: none; }
.post-card .entry-title a:hover { color: var(--accent); }
.post-card .entry-excerpt {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 14px;
}
.post-card .read-more {
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.post-card .read-more:hover { letter-spacing: 1.5px; }

/* ---------- Pagination ---------- */
.pagination {
  text-align: center;
  margin: 40px 0 0;
}
.pagination a, .pagination span {
  display: inline-block;
  padding: 8px 14px;
  margin: 0 3px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-main);
  text-decoration: none;
  font-weight: 600;
}
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination a:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---------- Buttons / CTA ---------- */
.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;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0,168,150,0.3);
  transition: all 0.3s ease;
}
.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); }

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

/* ---------- Comments ---------- */
.comments-area {
  margin-top: 50px;
  padding-top: 30px;
  border-top: 2px solid var(--border);
}
.comments-area h3 {
  color: var(--primary);
  font-size: 22px;
  margin-bottom: 22px;
}

/* ---------- 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; }
.footer-col ul { list-style: none; padding: 0; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: #A9B1B9; text-decoration: none; }
.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 { color: var(--accent); text-decoration: none; }

/* ---------- Floating WhatsApp ---------- */
.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;
  text-decoration: none;
  animation: pulse 2s infinite;
}
@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); }
}

/* ---------- Back to site button ---------- */
.back-to-site {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 30px;
  font-size: 14px;
  text-decoration: none;
}
.back-to-site:hover { color: var(--primary); transform: translateX(-3px); }

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@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; }
  .page-banner h1 { font-size: 28px; }
  .entry-title { font-size: 24px; }
  .entry-content { font-size: 15.5px; }
  .entry-content h2 { font-size: 22px; }
  .entry-content h3 { font-size: 18px; }
  .site-main { padding: 40px 5%; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .top-bar { font-size: 12px; }
}


/* ============= News page polish (kx patch, 2026-07-13) ============= */
.page-banner {
  padding: 60px 5% 50px !important;
  position: relative;
}
.page-banner h1 { font-size: 34px; margin-bottom: 12px; font-weight: 700; }
.page-banner .crumb { margin-top: 8px; }
.page-banner .crumb a { color: #fff; opacity: 0.9; }
.page-banner .crumb a:hover { opacity: 1; }

.site-main {
  padding: 40px 5% 60px !important;
  min-height: auto !important;
  background: #F4F7FA;
}
.site-main .container {
  max-width: 1080px;
  margin: 0 auto;
}
.back-to-site {
  display: inline-block;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 24px;
  font-size: 14px;
}
.back-to-site:hover { color: var(--primary); }

.post-card {
  background: #fff;
  border-radius: 10px;
  padding: 24px 28px;
  margin-bottom: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  transition: all 0.25s ease;
  border: 1px solid var(--border);
}
.post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  border-color: var(--accent);
}
.post-card .post-meta {
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  text-transform: uppercase;
}
.post-card .entry-title {
  font-size: 20px;
  line-height: 1.4;
  margin-bottom: 12px;
  color: var(--primary);
  font-weight: 700;
}
.post-card .entry-title a { color: var(--primary); }
.post-card .entry-title a:hover { color: var(--accent); }
.post-card .entry-excerpt {
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.7;
  margin-bottom: 14px;
}
.post-card .read-more {
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
}

/* Single post page */
.single .entry-title, .entry-header .entry-title {
  font-size: 32px;
  color: var(--primary);
  margin-bottom: 16px;
}
.entry-content {
  background: #fff;
  padding: 32px 40px;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  font-size: 15.5px;
  line-height: 1.85;
}
.entry-content h2, .entry-content h3 { color: var(--primary); margin: 24px 0 12px; }
.entry-content p { margin-bottom: 14px; }
.entry-content img { border-radius: 6px; margin: 16px 0; }

.pagination {
  margin-top: 32px;
  text-align: center;
}
.pagination .page-numbers {
  display: inline-block;
  padding: 8px 14px;
  margin: 0 4px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-main);
  font-size: 14px;
}
.pagination .page-numbers.current,
.pagination .page-numbers:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Fix nav active state also apply to WP News page */
.nav-menu a.active { color: var(--accent); font-weight: 700; position: relative; }
.nav-menu a.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

/* Mobile */
@media (max-width: 768px) {
  .page-banner { padding: 40px 5% 32px !important; }
  .page-banner h1 { font-size: 24px; }
  .post-card { padding: 18px 20px; }
  .post-card .entry-title { font-size: 17px; }
}
/* ============= end kx patch ============= */
