/* General Body Styles */
body {
    font-family: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
    line-height: 1.6;
    background-color: #f8f9fa;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container for responsive layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header Styles */
.main-header {
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

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

.header-top-bar .top-bar-links a {
    color: #f8f9fa;
    text-decoration: none;
    margin-left: 20px;
    transition: color 0.3s ease;
}

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

.language-selector select {
    background-color: #495057;
    color: #f8f9fa;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
}

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

.navbar-brand {
    display: flex;
    align-items: center;
}

.navbar-brand .logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
}

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

.navbar-brand .site-name {
    font-size: 1.8em;
    font-weight: bold;
    color: #007bff;
}

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

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

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

.main-navigation .nav-link:hover,
.main-navigation .nav-link.active {
    color: #007bff;
}

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

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

.main-navigation .dropdown-item {
    color: #333;
    padding: 8px 15px;
    text-decoration: none;
    display: block;
    transition: background-color 0.2s ease;
}

.main-navigation .dropdown-item:hover {
    background-color: #f2f2f2;
    color: #007bff;
}

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

.search-box {
    position: relative;
    margin-right: 20px;
}

.search-box input {
    border: 1px solid #ddd;
    padding: 8px 12px;
    border-radius: 20px;
    width: 200px;
    transition: width 0.3s ease;
}

.search-box input:focus {
    width: 250px;
    border-color: #007bff;
    outline: none;
}

.search-button {
    background: none;
    border: none;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #777;
}

.user-area .btn {
    padding: 8px 15px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    margin-left: 10px;
}

.user-area .btn-primary {
    background-color: #007bff;
    color: #fff;
    border: 1px solid #007bff;
}

.user-area .btn-secondary {
    background-color: #6c757d;
    color: #fff;
    border: 1px solid #6c757d;
}

.header-bottom-promo {
    background-color: #e9f7ff;
    padding: 10px 0;
    text-align: center;
    font-size: 0.9em;
    color: #0056b3;
}

.header-bottom-promo .promo-link {
    color: #0056b3;
    font-weight: bold;
    text-decoration: underline;
}

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

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

.footer-col {
    flex: 1;
    min-width: 220px;
    margin: 15px;
}

.footer-col .widget-title {
    color: #ffffff;
    font-size: 1.1em;
    margin-bottom: 20px;
    position: relative;
}

.footer-col .widget-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background-color: #007bff;
    margin-top: 8px;
}

.footer-col p {
    margin-bottom: 10px;
}

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

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

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

.footer-col ul li a:hover,
.footer-col address a:hover {
    color: #007bff;
}

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

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

.contact-info i {
    margin-right: 8px;
    color: #007bff;
}

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

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

.newsletter-form input[type="email"]::placeholder {
    color: #ced4da;
}

.newsletter-form .subscribe-btn {
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

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

.privacy-note {
    font-size: 0.8em;
    margin-top: 10px;
}

.privacy-note a {
    color: #007bff;
    text-decoration: underline;
}

.footer-bottom-bar {
    border-top: 1px solid #343a40;
    padding-top: 20px;
    margin-top: 30px;
    text-align: center;
}

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

.footer-legal-links {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-legal-links li {
    margin-left: 20px;
}

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

.footer-legal-links li a:hover {
    color: #007bff;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .header-main-nav .container {
        flex-wrap: wrap;
    }
    .main-navigation .nav-list {
        display: none; /* Hidden by default for mobile */
        flex-direction: column;
        width: 100%;
        background-color: #fff;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 999;
    }
    .main-navigation .nav-list.active {
        display: flex;
    }
    .main-navigation .nav-item {
        margin: 0;
        border-bottom: 1px solid #eee;
    }
    .main-navigation .nav-link {
        padding: 12px 15px;
    }
    .main-navigation .dropdown-menu {
        position: static;
        box-shadow: none;
        padding: 0;
        border-radius: 0;
        background-color: #f8f9fa;
    }
    .menu-toggle {
        display: block; /* Show hamburger menu */
        background: none;
        border: none;
        font-size: 1.5em;
        cursor: pointer;
        color: #333;
        order: 2; /* Position after logo */
    }
    .header-actions {
        order: 3;
        width: 100%;
        justify-content: flex-end;
        margin-top: 10px;
    }
    .search-box {
        flex-grow: 1;
        margin-right: 10px;
    }
    .search-box input {
        width: 100%;
    }
    .footer-widgets .footer-row {
        flex-direction: column;
        align-items: center;
    }
    .footer-col {
        width: 100%;
        text-align: center;
        margin: 15px 0;
    }
    .footer-col .widget-title::after {
        margin: 8px auto 0;
    }
    .social-media {
        display: flex;
        justify-content: center;
    }
    .newsletter-form {
        justify-content: center;
    }
    .footer-bottom-bar .bottom-bar-content {
        flex-direction: column;
    }
    .footer-legal-links {
        margin-top: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }
    .footer-legal-links li {
        margin: 0 10px;
    }
}

@media (max-width: 768px) {
    .header-top-bar .top-bar-content {
        flex-direction: column;
        text-align: center;
    }
    .header-top-bar .top-bar-links {
        margin-top: 10px;
    }
    .header-top-bar .top-bar-links a {
        margin: 0 10px;
    }
    .navbar-brand {
        justify-content: center;
        width: 100%;
        margin-bottom: 10px;
    }
    .header-actions {
        justify-content: center;
    }
    .user-area .btn {
        margin: 0 5px;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 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;
  }
}
