/* Shared CSS for the entire site */

:root {
  --primary-color: #007bff;
  --secondary-color: #6c757d;
  --success-color: #28a745;
  --info-color: #17a2b8;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --light-color: #f8f9fa;
  --dark-color: #343a40;
  --text-color: #333;
  --heading-color: #222;
  --border-color: #dee2e6;
  --bg-light: #f4f7f6;
  --font-family-sans-serif: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-family-monospace: 'SFMono-Regular', Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
}

html {
  scroll-behavior: smooth;
  box-sizing: border-box;
}

*, *::before, *::after {
  box-sizing: inherit;
}

body {
  margin: 0;
  font-family: var(--font-family-sans-serif);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-color);
  background-color: #fff;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-family: var(--font-family-sans-serif);
  font-weight: 700;
  line-height: 1.2;
  color: var(--heading-color);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
  margin-top: 0;
  margin-bottom: 1rem;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  background-color: transparent;
}

a:hover {
  color: #0056b3;
  text-decoration: underline;
}

img {
  vertical-align: middle;
  border-style: none;
  max-width: 100%;
  height: auto;
}

ul, ol {
  padding-left: 20px;
  margin-top: 0;
  margin-bottom: 1rem;
}

.container {
  width: 100%;
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
}

@media (min-width: 576px) { .container { max-width: 540px; } }
@media (min-width: 768px) { .container { max-width: 720px; } }
@media (min-width: 992px) { .container { max-width: 960px; } }
@media (min-width: 1200px) { .container { max-width: 1140px; } }

.btn {
  display: inline-block;
  font-weight: 400;
  color: var(--text-color);
  text-align: center;
  vertical-align: middle;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  background-color: transparent;
  border: 1px solid transparent;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 0.25rem;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.btn-primary {
  color: #fff;
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  color: #fff;
  background-color: #0056b3;
  border-color: #0056b3;
}

/* Header Styles */
.site-header {
  background-color: #fff;
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0,0,0,.08);
}

.header-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-logo img {
  height: 40px;
  width: auto;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}

.main-nav ul li {
  position: relative;
  margin-left: 25px;
}

.main-nav ul li a {
  display: block;
  padding: 10px 0;
  color: var(--heading-color);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.3s ease;
}

.main-nav ul li a:hover {
  color: var(--primary-color);
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #fff;
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
  min-width: 400px;
  padding: 15px;
  border-top: 3px solid var(--primary-color);
  z-index: 100;
  border-radius: 0 0 5px 5px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.main-nav ul li:hover .dropdown-menu {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

.dropdown-column {
  flex: 1;
  min-width: 150px;
}

.dropdown-column h3 {
  font-size: 1rem;
  color: var(--primary-color);
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 5px;
}

.dropdown-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.dropdown-column ul li a {
  padding: 5px 0;
  font-weight: 400;
  color: var(--text-color);
  white-space: nowrap;
}

.dropdown-column ul li a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.search-toggle, .mobile-menu-toggle {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--heading-color);
}

.search-bar-container {
  display: none;
  padding: 1rem 0;
  background-color: var(--bg-light);
  border-top: 1px solid var(--border-color);
}

.search-bar-container.active {
  display: block;
}

.search-bar-container .container {
  display: flex;
  gap: 10px;
}

.search-bar-container input[type="search"] {
  flex-grow: 1;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  font-size: 1rem;
}

.search-bar-container button {
  padding: 0.5rem 1rem;
  background-color: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

/* Footer Styles */
.site-footer {
  background-color: var(--dark-color);
  color: var(--light-color);
  padding: 3rem 0;
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin-bottom: 2rem;
}

.footer-col h3 {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col ul li {
  margin-bottom: 0.5rem;
}

.footer-col ul li a {
  color: var(--light-color);
  text-decoration: none;
}

.footer-col ul li a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.footer-col.company-info .footer-logo img {
  height: 32px;
  margin-bottom: 1rem;
}

.footer-col.company-info p {
  margin-bottom: 1rem;
}

.social-links a {
  color: var(--light-color);
  font-size: 1.5rem;
  margin-right: 15px;
  transition: color 0.3s ease;
}

.social-links a:hover {
  color: var(--primary-color);
}

.footer-col.contact-info p {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0.7rem;
}

.footer-col.contact-info p i {
  font-size: 1.1rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  text-align: center;
}

.footer-bottom p {
  margin-bottom: 0.5rem;
  color: rgba(255, 255, 255, 0.7);
}

.footer-bottom a {
  color: var(--light-color);
  text-decoration: underline;
}

.footer-bottom a:hover {
  color: var(--primary-color);
}

/* Placeholder for icon fonts */
[class^="icon-"], [class*=" icon-"] {
  /* Add your icon font styles here, e.g., Font Awesome */
  font-family: 'Font Awesome 5 Free'; /* Example */
  font-weight: 900; /* Example for solid icons */
  display: inline-block;
  speak: none;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.icon-search::before { content: '\f002'; } /* Example Font Awesome Search icon */
.icon-menu::before { content: '\f0c9'; } /* Example Font Awesome Bars icon */
.icon-facebook::before { content: '\f09a'; }
.icon-twitter::before { content: '\f099'; }
.icon-linkedin::before { content: '\f0e1'; }
.icon-wechat::before { content: '\f1d7'; } /* Example, assuming a custom or pro icon */
.icon-location::before { content: '\f3c5'; }
.icon-phone::before { content: '\f095'; }
.icon-mail::before { content: '\f0e0'; }
.icon-time::before { content: '\f017'; }

@media (max-width: 991.98px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,.1);
    border-top: 1px solid var(--border-color);
    padding: 1rem 0;
  }
  .main-nav.active {
    display: block;
  }
  .main-nav ul {
    flex-direction: column;
    align-items: flex-start;
  }
  .main-nav ul li {
    width: 100%;
    margin-left: 0;
    border-bottom: 1px solid var(--border-color);
  }
  .main-nav ul li:last-child {
    border-bottom: none;
  }
  .main-nav ul li a {
    padding: 12px 15px;
  }
  .dropdown-menu {
    position: static;
    box-shadow: none;
    border-top: none;
    padding: 0 15px 15px 30px;
    min-width: unset;
    opacity: 1;
    transform: translateY(0);
    display: none; /* Hidden by default, toggled by JS */
    flex-direction: column;
    gap: 10px;
  }
  .main-nav ul li.has-dropdown.active .dropdown-menu {
    display: flex;
  }
  .dropdown-column h3 {
    margin-top: 10px;
    border-bottom: none;
    padding-bottom: 0;
  }
  .header-actions .btn-primary {
    display: none;
  }
  .mobile-menu-toggle {
    display: block;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer-col.company-info, .footer-col.contact-info {
    text-align: center;
  }
  .footer-col.contact-info p {
    justify-content: center;
  }
}
@media (min-width: 992px) {
  .mobile-menu-toggle {
    display: none;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@media (max-width: 768px) {
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }
}
