/* Basic Resets & Global Styles */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --accent-color: #28a745;
    --text-color: #343a40;
    --bg-light: #f8f9fa;
    --bg-dark: #343a40;
    --border-color: #dee2e6;
    --font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

body {
    margin: 0;
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

h1, h2, h3, h4, h5, h6 {
    color: var(--bg-dark);
    margin-top: 1em;
    margin-bottom: 0.5em;
}

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

/* Header Styles */
.site-header {
    background-color: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 40px;
    margin-right: 10px;
}

.site-title {
    font-size: 1.8em;
    font-weight: bold;
    color: var(--bg-dark);
}

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

.main-navigation .nav-item {
    position: relative;
    margin-left: 25px;
}

.main-navigation .nav-link {
    display: block;
    padding: 10px 0;
    color: var(--text-color);
    font-weight: 500;
}

.main-navigation .nav-link:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.dropdown-menu {
    display: none;
    position: absolute;
    background-color: #fff;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    min-width: 180px;
    z-index: 1;
    border-top: 3px solid var(--primary-color);
    padding: 10px 0;
}

.nav-item.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-item {
    color: var(--text-color);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
}

.dropdown-item:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

.primary-button {
    background-color: var(--primary-color);
    color: #fff !important;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.primary-button:hover {
    background-color: #0056b3;
    text-decoration: none;
}

.search-form {
    display: flex;
    margin-left: 20px;
}

.search-form input[type="search"] {
    border: 1px solid var(--border-color);
    padding: 8px 10px;
    border-radius: 5px 0 0 5px;
    outline: none;
}

.search-form button {
    background-color: var(--primary-color);
    color: #fff;
    border: 1px solid var(--primary-color);
    padding: 8px 12px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-form button:hover {
    background-color: #0056b3;
}

.mobile-menu-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
}

.promo-banner {
    background-color: var(--accent-color);
    color: #fff;
    text-align: center;
    padding: 10px 0;
    font-size: 0.9em;
}

.promo-banner a {
    color: #fff;
    font-weight: bold;
    text-decoration: underline;
}

/* Footer Styles */
.site-footer {
    background-color: var(--bg-dark);
    color: #f8f9fa;
    padding: 40px 0 20px;
    font-size: 0.9em;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.footer-section {
    flex: 1;
    min-width: 250px;
    margin-bottom: 30px;
    padding-right: 20px;
}

.footer-section:last-child {
    padding-right: 0;
}

.footer-section h3 {
    color: #fff;
    font-size: 1.2em;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
}

.footer-section p {
    margin-bottom: 10px;
    color: rgba(255,255,255,0.8);
}

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

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    color: rgba(255,255,255,0.8);
    transition: color 0.3s ease;
}

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

.social-links {
    display: flex;
    margin-top: 15px;
}

.social-links li {
    margin-right: 15px;
}

.social-links li a {
    font-size: 1.5em;
    color: #fff;
    background-color: rgba(255,255,255,0.1);
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.social-links li a:hover {
    background-color: var(--primary-color);
    color: #fff;
}

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

.newsletter-form input[type="email"] {
    border: 1px solid rgba(255,255,255,0.3);
    background-color: rgba(255,255,255,0.1);
    padding: 10px;
    border-radius: 5px 0 0 5px;
    color: #fff;
    outline: none;
    flex-grow: 1;
}

.newsletter-form input[type="email"]::placeholder {
    color: rgba(255,255,255,0.6);
}

.newsletter-form button {
    background-color: var(--primary-color);
    color: #fff;
    border: 1px solid var(--primary-color);
    padding: 10px 15px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.newsletter-form button:hover {
    background-color: #0056b3;
}

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

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

.footer-bottom a {
    color: rgba(255,255,255,0.9);
    text-decoration: underline;
}

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

/* Responsive Adjustments */
@media (max-width: 992px) {
    .main-navigation {
        display: none; /* Hide main nav on smaller screens */
    }
    .header-controls {
        display: flex;
        align-items: center;
    }
    .mobile-menu-toggle {
        display: block; /* Show toggle button */
        margin-left: 15px;
    }
    .header-container {
        justify-content: space-between;
    }
    .search-form {
        margin-left: auto; /* Push search to the right */
    }
}

@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        align-items: center;
    }
    .footer-section {
        width: 100%;
        max-width: 400px; /* Constrain width for better readability */
        text-align: center;
        padding-right: 0;
    }
    .social-links {
        justify-content: center;
    }
    .newsletter-form {
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }
    .search-form {
        width: 100%;
        max-width: 300px;
        margin: 10px auto;
    }
    .site-header .header-container {
        flex-wrap: wrap;
    }
    .site-header .logo {
        width: 100%;
        justify-content: center;
        margin-bottom: 10px;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
