/* Shared CSS for the entire site */

:root {
  --primary-color: #007bff;
  --secondary-color: #6c757d;
  --text-color: #333;
  --background-color: #f8f9fa;
  --border-color: #dee2e6;
}

body {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
  margin: 0;
  padding: 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

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

a:hover {
  text-decoration: underline;
}

.btn {
  display: inline-block;
  font-weight: 400;
  color: #fff;
  text-align: center;
  vertical-align: middle;
  user-select: none;
  background-color: var(--primary-color);
  border: 1px solid var(--primary-color);
  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 {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-secondary {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
}

/* Header Styles */
.site-header {
  background-color: #fff;
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 2px 4px rgba(0,0,0,.05);
}

.header-top-bar {
  background-color: #333;
  color: #fff;
  padding: 8px 0;
  font-size: 0.85em;
}

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

.top-nav ul,
.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.top-nav ul li,
.main-nav ul li {
  display: inline-block;
  margin-left: 20px;
}

.top-nav a,
.main-nav a {
  color: #fff;
  padding: 5px 0;
  display: block;
}

.main-nav a {
  color: var(--text-color);
  font-weight: 500;
}

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

.logo img {
  height: 50px;
  width: auto;
}

.search-box {
  display: flex;
}

.search-box input {
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  border-radius: 4px 0 0 4px;
  outline: none;
}

.search-box button {
  background-color: var(--primary-color);
  color: #fff;
  border: 1px solid var(--primary-color);
  border-left: none;
  padding: 8px 12px;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
}

.header-actions .btn {
  margin-left: 10px;
}

.has-dropdown {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  background-color: #fff;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 1;
  list-style: none;
  padding: 10px 0;
  margin-top: 5px;
  border-radius: 4px;
}

.has-dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown-menu li {
  display: block;
  margin: 0;
}

.dropdown-menu li a {
  color: var(--text-color);
  padding: 10px 15px;
  text-decoration: none;
  display: block;
  white-space: nowrap;
}

.dropdown-menu li a:hover {
  background-color: var(--background-color);
}

.header-bottom-promo {
  background-color: #ffc107;
  color: #333;
  text-align: center;
  padding: 10px 0;
  font-weight: bold;
}

.promo-link {
  color: #000;
  margin-left: 10px;
  text-decoration: underline;
}

/* Footer Styles */
.site-footer {
  background-color: #212529;
  color: #f8f9fa;
  padding: 40px 0;
  font-size: 0.9em;
}

.footer-widgets {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-bottom: 30px;
}

.footer-widget {
  flex: 1;
  min-width: 250px;
  margin-right: 20px;
}

.footer-widget:last-child {
  margin-right: 0;
}

.footer-widget h3 {
  color: #fff;
  font-size: 1.2em;
  margin-bottom: 20px;
}

.footer-widget p {
  color: #ced4da;
  line-height: 1.8;
}

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

.footer-widget ul li {
  margin-bottom: 10px;
}

.footer-widget ul li a {
  color: #ced4da;
}

.footer-widget ul li a:hover {
  color: #fff;
  text-decoration: underline;
}

.social-links a {
  display: inline-block;
  margin-right: 15px;
}

.social-links img {
  width: 24px;
  height: 24px;
  vertical-align: middle;
}

.newsletter form {
  display: flex;
  margin-top: 15px;
}

.newsletter input[type="email"] {
  border: 1px solid #495057;
  padding: 10px;
  border-radius: 4px 0 0 4px;
  background-color: #343a40;
  color: #fff;
  flex-grow: 1;
  outline: none;
}

.newsletter button {
  background-color: var(--primary-color);
  border: 1px solid var(--primary-color);
  color: #fff;
  padding: 10px 15px;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid #495057;
  padding-top: 20px;
  margin-top: 30px;
  color: #adb5bd;
}

.footer-bottom p {
  margin-bottom: 5px;
}

.footer-bottom a {
  color: #adb5bd;
}

.footer-bottom a:hover {
  color: #fff;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .header-main .container {
    flex-direction: column;
    align-items: flex-start;
  }

  .main-nav {
    margin-top: 15px;
    width: 100%;
  }

  .main-nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }

  .main-nav ul li {
    margin: 0 10px 10px 0;
  }

  .header-actions {
    margin-top: 15px;
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .search-box {
    flex-grow: 1;
    margin-right: 10px;
  }

  .footer-widgets {
    flex-direction: column;
  }

  .footer-widget {
    margin-right: 0;
    margin-bottom: 30px;
    width: 100%;
  }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
