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

/* Main 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 {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

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

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

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

.main-nav .nav-item .nav-link:hover,
.main-nav .nav-item .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: 220px;
    z-index: 1;
    list-style: none;
    padding: 10px 0;
    margin-top: 10px;
    border-radius: 4px;
    left: 0; /* Align dropdown to the left of the parent link */
}

.dropdown:hover .dropdown-menu,
.dropdown-toggle[aria-expanded="true"] + .dropdown-menu {
    display: block;
}

.dropdown-menu li a {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    white-space: nowrap;
    transition: background-color 0.2s ease;
}

.dropdown-menu li a:hover {
    background-color: #f1f1f1;
}

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

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

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

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

.search-box input {
    border: none;
    padding: 8px 15px;
    outline: none;
    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;
}

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

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

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

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

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

.language-selector select {
    border: 1px solid #ddd;
    padding: 8px 10px;
    border-radius: 20px;
    background-color: white;
    cursor: pointer;
    appearance: none; /* Remove default arrow */
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007bff%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-6.5%200-12.3%203.2-16.1%208.1-3.8%204.9-4.7%2011.5-2.6%2017.6l139.3%20199.1c3.2%204.6%208.1%207.1%2013.3%207.1s10.1-2.6%2013.3-7.1L290.7%2090c2.1-6.1%201.2-12.7-2.7-17.6z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 10px;
    padding-right: 30px; /* Make space for custom arrow */
}

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

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
    padding: 0 20px;
}

.footer-section {
    flex: 1;
    min-width: 200px;
    margin-bottom: 20px;
}

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

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

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

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

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

.footer-section a {
    color: #bbb;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #007bff;
}

.social-links a {
    display: inline-block;
    color: #fff;
    background-color: #444;
    width: 35px;
    height: 35px;
    line-height: 35px;
    text-align: center;
    border-radius: 50%;
    margin-right: 10px;
    transition: background-color 0.3s ease;
}

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

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

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

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

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

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

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

.footer-bottom {
    border-top: 1px solid #333;
    margin-top: 40px;
    padding-top: 20px;
    text-align: center;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 20px; /* Add padding for small screens */
}

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

.footer-legal-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-legal-nav a {
    color: #bbb;
    text-decoration: none;
}

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

/* Responsive adjustments */
@media (max-width: 992px) {
    .main-nav .nav-list {
        gap: 15px;
    }
    .header-actions {
        gap: 10px;
    }
    .search-box input {
        width: 120px;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    .logo {
        flex-basis: 100%;
        text-align: center;
        margin-bottom: 10px;
    }
    .main-nav {
        order: 2; /* Move nav below logo/actions */
        flex-basis: 100%;
        text-align: center;
    }
    .main-nav .nav-list {
        display: none; /* Hide by default for mobile */
        flex-direction: column;
        width: 100%;
        background-color: #fff;
        border-top: 1px solid #eee;
        padding-top: 10px;
        position: absolute;
        left: 0;
        right: 0;
        top: 100%; /* Position below header */
        box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    }
    .main-nav .nav-list.active {
        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-item .nav-link {
        padding: 15px 0;
        display: block;
    }
    .dropdown-menu {
        position: static;
        box-shadow: none;
        border-top: 1px solid #eee;
        padding-left: 20px;
        margin-top: 0;
        border-radius: 0;
    }
    .dropdown:hover .dropdown-menu, .dropdown-toggle[aria-expanded="true"] + .dropdown-menu {
        display: none; /* JS will handle this for mobile */
    }
    .menu-toggle {
        display: block; /* Show on mobile */
        position: absolute;
        right: 20px;
        top: 25px;
        z-index: 1001; /* Ensure it's above other elements */
    }
    .header-actions {
        order: 1; /* Keep actions next to logo */
        flex-basis: auto;
        justify-content: center;
        width: 100%;
    }
    .search-box {
        width: 100%;
        max-width: 300px;
    }
    .search-box input {
        width: auto;
        flex-grow: 1;
    }
    .btn {
        padding: 6px 12px;
        font-size: 0.9em;
    }
    .language-selector {
        display: none; /* Hide language selector on small screens */
    }

    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .footer-section {
        min-width: unset;
        width: 100%;
    }
    .footer-section h3::after {
        margin-left: auto;
        margin-right: auto;
    }
    .social-links {
        margin-top: 20px;
    }
    .newsletter form {
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }
    .footer-legal-nav ul {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .header-actions {
        flex-wrap: wrap;
        justify-content: center;
    }
    .header-actions > *:not(.search-box) {
        flex-basis: 45%; /* Distribute buttons */
        margin-bottom: 10px;
    }
    .search-box {
        margin-bottom: 10px;
    }
    .announcement-bar {
        padding: 8px 10px;
        font-size: 0.8em;
    }
    .main-header {
        padding-bottom: 0; /* Remove extra padding when announcement bar is present */
    }
}
/* Font Awesome for icons (assuming it's loaded externally or via CDN, e.g.: <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css"> ) */
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
