/* Basic Reset & Box-Sizing */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Body & Typography */
body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* Links */
a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease, text-decoration 0.3s ease;
}
a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 4px;
    transition: all 0.3s ease;
}
.btn-primary {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}
.btn-primary:hover {
    background-color: #0056b3;
    border-color: #004085;
}
.btn-secondary {
    color: #333;
    background-color: #e2e6ea;
    border-color: #dae0e5;
}
.btn-secondary:hover {
    color: #fff;
    background-color: #5a6268;
    border-color: #545b62;
}

/* Header Specifics */
.main-header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.header-top-bar {
    background-color: #f0f0f0;
    padding: 8px 0;
    font-size: 0.85rem;
    color: #555;
}
.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.top-bar-links a {
    margin-left: 15px;
    color: #555;
}
.navbar-brand {
    display: flex;
    align-items: center;
}
.logo-img {
    height: 40px;
    margin-right: 10px;
}
.site-name {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}
.main-navigation ul {
    list-style: none;
}
.nav-menu {
    display: flex;
    gap: 20px;
}
.nav-menu > li > a {
    padding: 15px 0;
    display: block;
    font-weight: 600;
    color: #333;
}
.nav-menu > li > a:hover {
    color: #007bff;
}
.menu-item-has-children {
    position: relative;
}
.sub-menu {
    display: none;
    position: absolute;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,.1);
    min-width: 180px;
    z-index: 10;
    list-style: none;
    padding: 10px 0;
    border-radius: 4px;
}
.menu-item-has-children:hover > .sub-menu {
    display: block;
}
.sub-menu li a {
    padding: 10px 20px;
    display: block;
    color: #333;
}
.sub-menu li a:hover {
    background-color: #f8f9fa;
    color: #007bff;
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}
.search-box {
    display: flex;
    border: 1px solid #ced4da;
    border-radius: 4px;
    overflow: hidden;
}
.search-box input {
    border: none;
    padding: 8px 12px;
    outline: none;
}
.search-box button {
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
}
.search-box button:hover {
    background-color: #0056b3;
}
.menu-toggle {
    display: none; /* Hidden on desktop */
}

/* Footer Specifics */
.main-footer {
    background-color: #212529;
    color: #f8f9fa;
    padding: 40px 0 20px;
    font-size: 0.9rem;
}
.main-footer a {
    color: #adb5bd;
}
.main-footer a:hover {
    color: #fff;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}
.footer-section .section-title {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 15px;
}
.footer-section ul {
    list-style: none;
}
.footer-section ul li {
    margin-bottom: 8px;
}
.newsletter-form {
    display: flex;
    margin-top: 15px;
}
.newsletter-form input {
    flex-grow: 1;
    padding: 8px 12px;
    border: 1px solid #495057;
    border-radius: 4px 0 0 4px;
    background-color: #343a40;
    color: #fff;
}
.newsletter-form input::placeholder {
    color: #adb5bd;
}
.newsletter-form button {
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}
.newsletter-form button:hover {
    background-color: #0056b3;
}
.social-media {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}
.social-media a {
    font-size: 1.5rem;
    color: #adb5bd;
    transition: color 0.3s ease;
}
.social-media a:hover {
    color: #fff;
}
.footer-bottom {
    border-top: 1px solid #343a40;
    padding-top: 20px;
    text-align: center;
    color: #adb5bd;
}
.powered-by {
    font-style: italic;
}

/* Responsive Adjustments (Example for smaller screens) */
@media (max-width: 992px) {
    .header-main-nav .container {
        flex-wrap: wrap;
        justify-content: space-between;
    }
    .main-navigation {
        order: 3; /* Move nav below brand and actions */
        width: 100%;
    }
    .nav-menu {
        flex-direction: column;
        display: none; /* Hide by default on mobile */
        width: 100%;
        background-color: #fff;
        position: absolute;
        left: 0;
        top: 100%; /* Position below header */
        box-shadow: 0 4px 8px rgba(0,0,0,.1);
    }
    .nav-menu.active {
        display: flex; /* Show when active */
    }
    .nav-menu > li {
        border-bottom: 1px solid #eee;
    }
    .nav-menu > li:last-child {
        border-bottom: none;
    }
    .nav-menu > li > a {
        padding: 12px 15px;
    }
    .menu-item-has-children .sub-menu {
        position: static;
        box-shadow: none;
        border-radius: 0;
        padding-left: 20px;
        background-color: #f9f9f9;
    }
    .menu-toggle {
        display: block; /* Show on mobile */
        background: none;
        border: none;
        font-size: 1.5rem;
        cursor: pointer;
        color: #333;
        padding: 10px;
        order: 2;
    }
    .icon-bar {
        display: block;
        width: 25px;
        height: 3px;
        background-color: #333;
        margin: 5px 0;
    }
    .header-actions {
        order: 1; /* Keep actions visible */
    }
    .search-box {
        width: 100%;
        margin-top: 10px;
    }
    .login-btn, .signup-btn {
        display: none; /* Hide on small screens, can be moved to menu */
    }
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-section ul {
        padding: 0;
    }
    .newsletter-form {
        justify-content: center;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
