/* Universal Box Sizing */
*, *::before, *::after {
    box-sizing: border-box;
}

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

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

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

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

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

.primary-navigation {
    flex-grow: 1;
    text-align: right;
}

.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: flex-end;
}

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

.nav-item > a {
    display: block;
    padding: 10px 0;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-item > a:hover, .nav-item > a:focus {
    color: #007bff;
}

.submenu {
    list-style: none;
    margin: 0;
    padding: 10px 0;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    border: 1px solid #eee;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    min-width: 200px;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.nav-item.has-submenu:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.submenu li a {
    display: block;
    padding: 8px 15px;
    text-decoration: none;
    color: #555;
    white-space: nowrap;
}

.submenu li a:hover, .submenu li a:focus {
    background-color: #f5f5f5;
    color: #007bff;
}

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

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

.btn {
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    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: #f8f9fa;
    color: #007bff;
    border: 1px solid #007bff;
}

.btn-secondary:hover {
    background-color: #e2e6ea;
    color: #0056b3;
}

.announcement-bar {
    background-color: #e9f7ef; /* Light green */
    color: #28a745; /* Dark green */
    padding: 10px 0;
    text-align: center;
    margin-top: 15px;
    border-radius: 5px;
}

.announcement-bar p {
    margin: 0;
    font-size: 0.9em;
}

.announcement-bar a {
    color: #28a745;
    font-weight: 600;
    text-decoration: underline;
}

.announcement-bar a:hover {
    color: #1e7e34;
}

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

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

.footer-column h3 {
    color: #fff;
    font-size: 1.1em;
    margin-bottom: 15px;
}

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

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

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

.footer-column ul li a:hover {
    color: #fff;
}

.footer-logo img {
    height: 32px;
    width: auto;
    margin-bottom: 15px;
}

.footer-column.about-us p {
    font-size: 0.9em;
    line-height: 1.8;
    color: #ced4da;
    margin-bottom: 20px;
}

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

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

.footer-bottom {
    border-top: 1px solid #343a40;
    padding-top: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.legal-links a {
    color: #adb5bd;
    text-decoration: none;
    margin: 0 10px;
    font-size: 0.85em;
    transition: color 0.3s ease;
}

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

.copyright {
    margin-top: 15px;
    font-size: 0.85em;
    color: #adb5bd;
}

/* Utility classes */
.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;
}

/* Search Overlay Styles */
.search-container {
    position: relative;
}

.search-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: #333;
    padding: 0;
    margin-right: 10px;
}

.search-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 999;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.search-overlay.active {
    display: flex;
    opacity: 1;
}

.search-form {
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    display: flex;
    width: 90%;
    max-width: 600px;
    position: relative;
}

.search-form input[type="search"] {
    flex-grow: 1;
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 3px;
    font-size: 1em;
    outline: none;
}

.search-form button {
    background: #007bff;
    border: none;
    color: #fff;
    padding: 10px 15px;
    border-radius: 3px;
    cursor: pointer;
    margin-left: 10px;
}

.search-form button svg {
    vertical-align: middle;
}

.search-form .close-search {
    position: absolute;
    top: -15px;
    right: -15px;
    background: #dc3545;
    color: #fff;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    cursor: pointer;
    border: none;
}

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

    .primary-navigation {
        width: 100%;
        text-align: left;
        order: 3; /* Push navigation below logo and actions */
    }

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

    .nav-menu.active {
        display: flex;
    }

    .nav-item {
        margin: 0;
        border-bottom: 1px solid #eee;
        width: 100%;
    }

    .nav-item > a {
        padding: 15px;
    }

    .submenu {
        position: static;
        box-shadow: none;
        border: none;
        background-color: #f8f8f8;
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
        padding-left: 20px;
        display: none; /* Hidden by default for mobile */
    }

    .nav-item.has-submenu.active .submenu {
        display: block;
    }

    .menu-toggle {
        display: block; /* Show on mobile */
        position: absolute;
        top: 20px;
        right: 15px;
        z-index: 10;
    }

    .header-actions {
        position: absolute;
        top: 20px;
        right: 60px; /* Adjust based on menu toggle */
        order: 2;
    }

    .announcement-bar {
        width: calc(100% - 30px); /* Account for padding */
        margin-left: auto;
        margin-right: auto;
    }

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

    .legal-links {
        flex-direction: column;
        gap: 5px;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
