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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    line-height: 1.6;
    color: #333;
    background-color: #f8f8f8;
    -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;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    border: 1px solid transparent;
}

.btn-primary {
    background-color: #007bff;
    color: #fff;
}

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

.btn-secondary {
    background-color: #6c757d;
    color: #fff;
}

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

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

.header-topbar {
    background-color: #f2f2f2;
    padding: 8px 0;
    font-size: 0.85rem;
    color: #666;
    border-bottom: 1px solid #eee;
}

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

.top-nav ul, .user-actions {
    display: flex;
    align-items: center;
}

.top-nav li:not(:last-child), .user-actions a:not(:last-child) {
    margin-right: 20px;
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
}

.header-main {
    padding: 15px 0;
}

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

.logo img {
    height: 50px; /* Adjust as needed */
    width: auto;
}

.main-nav ul {
    display: flex;
    gap: 30px;
}

.main-nav li {
    position: relative;
}

.main-nav a {
    color: #333;
    font-weight: 500;
    padding: 5px 0;
    display: block;
}

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

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

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

.main-nav .dropdown-menu li {
    margin: 0;
}

.main-nav .dropdown-menu a {
    padding: 8px 20px;
    white-space: nowrap;
}

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

.search-box input {
    border: none;
    padding: 8px 12px;
    outline: none;
    font-size: 0.9rem;
}

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

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

.mobile-menu-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 22px;
    position: relative;
    z-index: 1010;
}

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

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

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1005;
    display: none;
    justify-content: flex-end;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.is-active {
    display: flex;
    opacity: 1;
}

.mobile-menu-content {
    width: 300px;
    max-width: 80%;
    background-color: #fff;
    padding: 30px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: -2px 0 10px rgba(0,0,0,0.2);
    position: relative;
}

.mobile-menu-overlay.is-active .mobile-menu-content {
    transform: translateX(0);
}

.close-mobile-menu {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #333;
}

.mobile-nav ul li {
    margin-bottom: 15px;
}

.mobile-nav ul li a {
    color: #333;
    font-size: 1.1rem;
    font-weight: 500;
    display: block;
    padding: 5px 0;
}

.mobile-user-actions {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Footer Styles */
.site-footer {
    background-color: #222;
    color: #ccc;
    padding: 40px 0 20px;
    font-size: 0.9rem;
}

.site-footer a {
    color: #ccc;
}

.site-footer a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #333;
}

.footer-widget h3 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 15px;
    position: relative;
}

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

.footer-widget ul {
    margin-top: 10px;
}

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

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

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-links img {
    filter: brightness(0) invert(1); /* Makes icons white */
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.social-links img:hover {
    opacity: 1;
}

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

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

.footer-widget.newsletter input[type="email"] {
    flex-grow: 1;
    padding: 10px;
    border: none;
    border-radius: 5px 0 0 5px;
    outline: none;
}

.footer-widget.newsletter button {
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 10px 15px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.copyright {
    flex-basis: 100%;
    text-align: center;
    margin-bottom: 10px;
}

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

.icp-info {
    flex-basis: 100%;
    text-align: center;
    margin-top: 10px;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .main-nav, .search-box, .user-actions {
        display: none;
    }
    .mobile-menu-toggle {
        display: block;
    }
    .header-main .container {
        justify-content: space-between;
    }
}

@media (max-width: 768px) {
    .footer-widgets {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-widget h3::after {
        margin-left: auto;
        margin-right: auto;
    }
    .social-links {
        justify-content: center;
    }
    .footer-bottom {
        flex-direction: column;
    }
    .footer-legal-nav ul {
        margin-top: 15px;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
