/* Basic Reset & Body Styles */
body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

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

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

.header-top-bar {
    background-color: #343a40;
    color: #f8f9fa;
    padding: 8px 0;
    font-size: 0.9em;
}

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

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

.top-bar-nav li {
    margin-left: 20px;
}

.top-bar-nav a {
    color: #f8f9fa;
    text-decoration: none;
    transition: color 0.3s ease;
}

.top-bar-nav a:hover {
    color: #007bff;
}

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

.site-branding {
    display: flex;
    align-items: center;
}

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

.site-title {
    font-size: 1.8em;
    font-weight: bold;
    color: #333;
}

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

.main-navigation li {
    position: relative;
    margin-left: 30px;
}

.main-navigation a {
    color: #555;
    text-decoration: none;
    font-weight: 500;
    padding: 10px 0;
    display: block;
    transition: color 0.3s ease;
}

.main-navigation a:hover,
.main-navigation .current-menu-item a {
    color: #007bff;
}

.main-navigation .sub-menu {
    display: none;
    position: absolute;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    min-width: 180px;
    z-index: 100;
    padding: 10px 0;
    list-style: none;
    left: 0;
    top: 100%;
}

.main-navigation li:hover > .sub-menu {
    display: block;
}

.main-navigation .sub-menu li {
    margin: 0;
}

.main-navigation .sub-menu a {
    padding: 8px 20px;
    white-space: nowrap;
    color: #333;
}

.main-navigation .sub-menu a:hover {
    background-color: #f0f0f0;
    color: #007bff;
}

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

.search-box {
    display: flex;
    margin-right: 20px;
}

.search-input {
    border: 1px solid #ccc;
    padding: 8px 12px;
    border-radius: 4px 0 0 4px;
    outline: none;
    font-size: 0.9em;
}

.search-button {
    background-color: #007bff;
    color: #fff;
    border: 1px solid #007bff;
    padding: 8px 15px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

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

.user-area a {
    margin-left: 10px;
    text-decoration: none;
    color: #007bff;
    padding: 8px 12px;
    border: 1px solid #007bff;
    border-radius: 4px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.user-area a:hover {
    background-color: #007bff;
    color: #fff;
}

.header-bottom-bar {
    background-color: #e9ecef;
    padding: 10px 0;
    text-align: center;
    font-size: 0.9em;
    color: #666;
}

/* Footer Styles */
.site-footer {
    background-color: #212529;
    color: #dee2e6;
    padding: 40px 0 20px;
    margin-top: 50px;
}

.footer-widgets-area {
    padding-bottom: 30px;
    border-bottom: 1px solid #444;
    margin-bottom: 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

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

.footer-widget p {
    font-size: 0.9em;
    line-height: 1.8;
    margin-bottom: 10px;
}

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

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

.footer-widget ul li a {
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-widget ul li a:hover {
    color: #007bff;
}

.social-icons a {
    color: #dee2e6;
    font-size: 1.5em;
    margin-right: 15px;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: #007bff;
}

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

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

.newsletter-form button {
    background-color: #007bff;
    color: #fff;
    border: 1px solid #007bff;
    padding: 10px 15px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

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

.footer-bottom-bar {
    text-align: center;
    font-size: 0.85em;
}

.copyright {
    margin-bottom: 10px;
}

.footer-secondary-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
}

.footer-secondary-nav li {
    margin: 0 15px;
}

.footer-secondary-nav a {
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-secondary-nav a:hover {
    color: #007bff;
}

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

    .main-navigation ul {
        flex-direction: column;
        width: 100%;
        display: none; /* Hidden by default for mobile */
    }

    .main-navigation ul.active {
        display: flex; /* Shown when active */
    }

    .main-navigation li {
        margin: 0;
        width: 100%;
        border-bottom: 1px solid #eee;
    }

    .main-navigation .sub-menu {
        position: static;
        box-shadow: none;
        border-top: 1px solid #eee;
        padding-left: 20px;
    }

    .menu-toggle {
        display: block; /* Show toggle button */
        background: none;
        border: none;
        color: #333;
        font-size: 1.5em;
        cursor: pointer;
        margin-left: auto;
    }

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

    .search-box {
        margin-right: 0;
        margin-bottom: 10px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-secondary-nav ul {
        flex-direction: column;
    }

    .footer-secondary-nav li {
        margin: 5px 0;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
