/* General Body Styles */
body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    color: #333;
    background-color: #f8f9fa;
}

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

/* Header Styles */
.main-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.brand-logo img {
    height: 40px;
    width: auto;
}

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

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

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

.dropdown {
    position: relative;
}

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

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

.dropdown-item {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    transition: background-color 0.3s ease;
}

.dropdown-item:hover {
    background-color: #f1f1f1;
}

.user-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.btn {
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

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

.btn-secondary:hover {
    background-color: #5a6268;
    border-color: #5a6268;
}

.search-button {
    background: none;
    border: none;
    font-size: 1.2em;
    color: #555;
    cursor: pointer;
    padding: 5px;
}

.search-button:hover {
    color: #007bff;
}

.announcement-bar {
    background-color: #007bff;
    color: #fff;
    padding: 10px 0;
    text-align: center;
    font-size: 0.9em;
}

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

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none; /* Hidden by default, shown on smaller screens */
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 24px;
    position: relative;
    z-index: 1001;
}

.mobile-menu-toggle .icon-bar {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #333;
    margin-bottom: 5px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle .icon-bar:last-child {
    margin-bottom: 0;
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 999;
    padding-top: 80px; /* Adjust based on header height */
    overflow-y: auto;
}

.mobile-menu-overlay.active {
    display: block;
}

.mobile-navigation .mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
}

.mobile-navigation .mobile-nav-list li {
    margin-bottom: 20px;
}

.mobile-navigation .mobile-nav-list a {
    color: #fff;
    font-size: 1.5em;
    text-decoration: none;
    display: block;
    padding: 10px 0;
    transition: color 0.3s ease;
}

.mobile-navigation .mobile-nav-list a:hover {
    color: #007bff;
}

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

.footer-container .row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -15px;
    margin-right: -15px;
}

.footer-container .col-md-4,
.footer-container .col-md-3,
.footer-container .col-md-2 {
    padding-left: 15px;
    padding-right: 15px;
    margin-bottom: 30px;
}

@media (min-width: 768px) {
    .footer-container .col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .footer-container .col-md-3 { flex: 0 0 25%; max-width: 25%; }
    .footer-container .col-md-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
}

.footer-section h4 {
    color: #fff;
    font-size: 1.1em;
    margin-bottom: 20px;
    position: relative;
}

.footer-section h4::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background-color: #007bff;
    margin-top: 10px;
}

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

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

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

.footer-section .list-unstyled a,
.footer-section address a {
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section .list-unstyled a:hover,
.footer-section address a:hover {
    color: #007bff;
}

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

.social-links a:hover {
    color: #fff;
}

.newsletter-form .input-group {
    display: flex;
}

.newsletter-form .form-control {
    border-radius: 5px 0 0 5px;
    border: 1px solid #495057;
    background-color: #343a40;
    color: #fff;
    padding: 10px 15px;
    flex-grow: 1;
}

.newsletter-form .form-control::placeholder {
    color: #ced4da;
}

.newsletter-form .btn-primary {
    border-radius: 0 5px 5px 0;
    padding: 10px 20px;
    white-space: nowrap;
}

.footer-divider {
    border-color: #495057;
    margin-top: 30px;
    margin-bottom: 30px;
}

.copyright-row {
    text-align: center;
}

.copyright-row p {
    margin-bottom: 0;
    color: #adb5bd;
}

.copyright-row a {
    color: #adb5bd;
    text-decoration: underline;
}

.copyright-row a:hover {
    color: #007bff;
}

/* Utility Classes (e.g., from Bootstrap) */
.bg-dark { background-color: #212529 !important; }
.bg-info { background-color: #17a2b8 !important; }
.text-white { color: #fff !important; }
.text-white-50 { color: rgba(255, 255, 255, 0.5) !important; }
.py-2 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
.py-5 { padding-top: 3rem !important; padding-bottom: 3rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-3 { margin-bottom: 1rem !important; }
.me-2 { margin-right: 0.5rem !important; }
.fw-bold { font-weight: 700 !important; }
.text-center { text-align: center !important; }

/* Responsive adjustments */
@media (max-width: 992px) {
    .main-navigation {
        display: none;
    }
    .user-actions .btn {
        display: none; /* Hide login/signup buttons on smaller screens for mobile menu */
    }
    .mobile-menu-toggle {
        display: block;
    }
    .header-container {
        justify-content: space-between;
    }
    .user-actions {
        order: 3; /* Move actions to the right */
    }
    .brand-logo {
        order: 1; /* Keep logo on the left */
    }
    .mobile-menu-toggle {
        order: 2; /* Toggle button between logo and actions */
        margin-left: auto; /* Push toggle to the right if actions are also present */
    }
    .footer-container .col-md-4,
    .footer-container .col-md-3,
    .footer-container .col-md-2 {
        flex: 0 0 100%;
        max-width: 100%;
        text-align: center;
    }
    .footer-section h4::after {
        margin-left: auto;
        margin-right: auto;
    }
    .social-links {
        text-align: center;
    }
    .newsletter-form .input-group {
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
