/* Basic Reset & Global Styles */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    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;
}

a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease, text-decoration 0.3s ease;
}

a:hover {
    text-decoration: underline;
    color: #0056b3;
}

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

/* Header Specific 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);
}

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

.logo img {
    height: 40px;
    width: auto;
    vertical-align: middle;
}

.main-nav {
    flex-grow: 1;
    text-align: right;
}

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

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

.main-nav .nav-link {
    display: block;
    padding: 10px 0;
    color: #333;
    font-weight: bold;
    white-space: nowrap;
}

.main-nav .nav-link:hover {
    color: #0056b3;
    text-decoration: none;
}

.dropdown-menu {
    display: none;
    position: absolute;
    background-color: #fff;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    min-width: 180px;
    z-index: 1000;
    border-radius: 4px;
    padding: 10px 0;
    top: 100%;
    left: 0;
    margin-top: 5px; /* Space between toggle and menu */
}

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

.dropdown-item {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    white-space: nowrap;
}

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

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

.search-form {
    display: flex;
    border: 1px solid #ccc;
    border-radius: 20px;
    overflow: hidden;
    background-color: #f9f9f9;
}

.search-form input {
    border: none;
    padding: 8px 15px;
    outline: none;
    width: 150px;
    background-color: transparent;
}

.search-form button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 0 20px 20px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-form button i {
    font-size: 1em;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    text-align: center;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

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

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

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

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

.menu-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    margin-left: 15px;
}

.icon-bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* Footer Specific Styles */
.main-footer {
    background-color: #343a40;
    color: #ffffff;
    padding: 40px 0;
    font-size: 0.9em;
}

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

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

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

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

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

.footer-col ul li a {
    color: #cccccc;
    text-decoration: none;
}

.footer-col ul li a:hover {
    color: #ffffff;
    text-decoration: underline;
}

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

.footer-col p a {
    color: #007bff;
}

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

.social-links a:hover {
    color: #007bff;
    text-decoration: none;
}

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

.newsletter input[type="email"] {
    border: 1px solid #555;
    padding: 10px;
    border-radius: 5px 0 0 5px;
    flex-grow: 1;
    background-color: #495057;
    color: #ffffff;
    outline: none;
}

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

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

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

.footer-bottom {
    border-top: 1px solid #444;
    padding-top: 20px;
    margin-top: 20px;
    text-align: center;
    color: #cccccc;
}

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

.footer-bottom a {
    color: #007bff;
    margin: 0 5px;
}

.footer-bottom a:hover {
    color: #ffffff;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .main-nav {
        order: 3; /* Move navigation below logo and actions on smaller screens */
        width: 100%;
        text-align: left;
        margin-top: 15px;
    }
    .main-nav .nav-list {
        display: none; /* Hidden by default for mobile */
        flex-direction: column;
        width: 100%;
        background-color: #fff;
        position: absolute;
        top: 100%; /* Position below header-top */
        left: 0;
        border-top: 1px solid #eee;
        padding: 10px 0;
        box-shadow: 0 4px 8px rgba(0,0,0,0.05);
        z-index: 999;
    }
    .main-nav .nav-list.active { /* Class added by JS to show menu */
        display: flex;
    }
    .main-nav .nav-item {
        margin: 0;
        border-bottom: 1px solid #eee;
    }
    .main-nav .nav-item:last-child {
        border-bottom: none;
    }
    .main-nav .nav-link {
        padding: 15px 20px;
    }
    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 20px;
        margin-top: 0;
    }
    .dropdown:hover .dropdown-menu { /* Keep hover for larger tablets */
        display: block;
    }
    .menu-toggle {
        display: block;
        order: 2; /* Position toggle button */
    }
    .header-top {
        flex-wrap: wrap;
        justify-content: space-between;
    }
    .logo {
        order: 1;
    }
    .header-actions {
        order: 4;
        width: 100%;
        justify-content: center;
        margin-top: 15px;
        margin-left: 0;
    }
    .search-form {
        flex-grow: 1;
        max-width: 300px;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-col h4::after {
        margin: 10px auto 0;
    }
    .social-links {
        text-align: center;
    }
    .newsletter form {
        max-width: 350px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 768px) {
    .header-top {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    .logo {
        margin-bottom: 0;
    }
    .header-actions {
        order: 2; /* Move actions next to logo on smaller mobiles */
        width: auto;
        margin-top: 0;
        justify-content: flex-end;
    }
    .search-form {
        display: none; /* Hide search bar on very small screens */
    }
    .btn-secondary {
        margin-left: 5px;
    }
    .main-nav {
        margin-top: 10px;
        position: relative;
        width: 100%;
    }
    .menu-toggle {
        margin: 0;
    }
    .announcement-bar {
        padding: 10px;
        font-size: 0.9em;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
