/* Basic CSS Reset and Global Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', 'Helvetica Neue', Helvetica, 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;
}

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

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

ul {
    list-style: none;
}

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

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

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

.top-nav ul {
    display: flex;
    gap: 15px;
}

.top-nav .dropdown {
    position: relative;
}

.top-nav .dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 120px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 4px;
    overflow: hidden;
    top: 100%;
    left: 0;
}

.top-nav .dropdown-content a {
    color: black;
    padding: 10px 15px;
    text-decoration: none;
    display: block;
    white-space: nowrap;
}

.top-nav .dropdown-content a:hover {
    background-color: #ddd;
}

.top-nav .dropdown:hover .dropdown-content {
    display: block;
}

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

.branding {
    display: flex;
    align-items: center;
}

.branding .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
}

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

.main-navigation ul {
    display: flex;
    gap: 25px;
}

.main-navigation a {
    font-weight: 500;
    color: #333;
    padding: 5px 0;
    position: relative;
}

.main-navigation a:hover {
    color: #007bff;
}

.main-navigation .has-submenu {
    position: relative;
}

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

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

.main-navigation .submenu li a:hover {
    background-color: #f2f2f2;
}

.main-navigation .has-submenu:hover .submenu {
    display: block;
}

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

.search-box {
    display: flex;
    border: 1px solid #ccc;
    border-radius: 20px;
    overflow: hidden;
}

.search-box input {
    border: none;
    padding: 8px 15px;
    outline: none;
    font-size: 0.9em;
    min-width: 150px;
}

.search-box button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-box button:hover {
    background-color: #0056b3;
}

.user-profile {
    position: relative;
    display: flex;
    align-items: center;
}

.user-profile .profile-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333;
    font-weight: 500;
}

.user-profile .avatar {
    border-radius: 50%;
    border: 2px solid #eee;
}

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

.user-profile .user-menu a {
    padding: 8px 15px;
    display: block;
    color: #555;
    white-space: nowrap;
}

.user-profile .user-menu a:hover {
    background-color: #f2f2f2;
}

.user-profile:hover .user-menu {
    display: block;
}

.mobile-menu-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #333;
}

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

.announcement-bar a {
    color: #0056b3;
    font-weight: bold;
}

/* Footer Styles */
.site-footer {
    background-color: #212529;
    color: #ffffff;
    padding-top: 40px;
    font-size: 0.9em;
}

.footer-widgets-area {
    padding-bottom: 30px;
    border-bottom: 1px solid #343a40;
}

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

.footer-widget h3 {
    font-size: 1.1em;
    margin-bottom: 15px;
    color: #ffffff;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
}

.footer-widget p {
    margin-bottom: 10px;
    color: #ccc;
}

.footer-widget ul {
    list-style: none;
}

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

.footer-widget ul li a {
    color: #ccc;
    transition: color 0.3s ease;
}

.footer-widget ul li a:hover {
    color: #007bff;
    text-decoration: underline;
}

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

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

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

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

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

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

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

.contact-info {
    margin-top: 20px;
    color: #ccc;
}

.contact-info a {
    color: #007bff;
}

.footer-bottom-bar {
    background-color: #1a1d20;
    padding: 20px 0;
    margin-top: 20px;
}

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

.copyright {
    color: #ccc;
    flex-basis: 100%;
    margin-bottom: 10px;
}

.footer-legal-nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.footer-legal-nav a {
    color: #ccc;
    font-size: 0.85em;
}

.footer-legal-nav a:hover {
    color: #007bff;
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .main-navigation {
        display: none; /* Hide main nav on smaller screens */
    }
    .header-main-area .container {
        justify-content: space-between;
    }
    .header-actions {
        gap: 15px;
    }
    .mobile-menu-toggle {
        display: block; /* Show mobile toggle */
    }
    .search-box {
        display: none; /* Hide search box by default on mobile */
    }
    .user-profile .user-menu {
        right: auto;
        left: 0;
    }
    .footer-widget-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .social-links {
        justify-content: center;
        display: flex;
    }
    .newsletter-form {
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }
    .footer-bottom-bar .container {
        flex-direction: column;
    }
    .copyright {
        margin-bottom: 15px;
    }
}

@media (max-width: 768px) {
    .header-top-bar {
        display: none; /* Hide top bar on very small screens */
    }
    .branding .logo h1 {
        font-size: 1.2em;
    }
    .header-actions {
        gap: 10px;
    }
    .user-profile span {
        display: none; /* Hide username on very small screens */
    }
}

/* Font Awesome for icons (assuming it's loaded elsewhere) */
/* .fa-caret-down, .fa-chevron-down, .fa-search, .fa-bars, .fab */
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
