:root {
    --primary-color: #e04040; /* Red accent */
    --secondary-color: #f7b32b; /* Gold accent */
    --text-color: #333;
    --text-color-light: #f4f4f4;
    --bg-color: #ffffff;
    --bg-color-dark: #222;
    --header-bg: #333;
    --header-text: #f4f4f4;
    --footer-bg: #222;
    --footer-text: #f4f4f4;
    --border-color: #eee;
    --link-color: var(--primary-color);
    --link-hover-color: #c03030;
    --button-primary-bg: var(--primary-color);
    --button-primary-text: #fff;
    --button-secondary-bg: var(--secondary-color);
    --button-secondary-text: #333;
    --marquee-bg: #f8f8f8;
    --marquee-text: #555;
    --dropdown-bg: #fff;
    --dropdown-border: #ddd;
    --dropdown-item-hover-bg: #f5f5f5;
}

[data-theme="dark"] {
    --primary-color: #e04040;
    --secondary-color: #f7b32b;
    --text-color: #f4f4f4;
    --text-color-light: #333;
    --bg-color: #1a1a1a;
    --bg-color-dark: #333;
    --header-bg: #111;
    --header-text: #f4f4f4;
    --footer-bg: #111;
    --footer-text: #f4f4f4;
    --border-color: #444;
    --link-color: var(--secondary-color);
    --link-hover-color: #d7930b;
    --button-primary-bg: var(--primary-color);
    --button-primary-text: #fff;
    --button-secondary-bg: var(--secondary-color);
    --button-secondary-text: #333;
    --marquee-bg: #2a2a2a;
    --marquee-text: #ccc;
    --dropdown-bg: #333;
    --dropdown-border: #555;
    --dropdown-item-hover-bg: #444;
}

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--link-hover-color);
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.btn-primary {
    background-color: var(--button-primary-bg);
    color: var(--button-primary-text);
}

.btn-primary:hover {
    background-color: var(--link-hover-color);
}

.btn-secondary {
    background-color: var(--button-secondary-bg);
    color: var(--button-secondary-text);
}

.btn-secondary:hover {
    background-color: #d7930b; /* Slightly darker gold */
}

.btn-icon {
    background: none;
    border: none;
    color: var(--header-text);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.3s ease;
}
.btn-icon:hover {
    color: var(--secondary-color);
}


/* Header */
.main-header {
    background-color: var(--header-bg);
    color: var(--header-text);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top-bar {
    background-color: rgba(0,0,0,0.1);
    padding: 0.5rem 0;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

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

.header-top-actions .top-bar-link {
    color: var(--header-text);
    margin-left: 1.5rem;
    opacity: 0.8;
}
.header-top-actions .top-bar-link:hover {
    opacity: 1;
    color: var(--secondary-color);
}
.header-top-actions .top-bar-link i {
    margin-right: 0.3rem;
}

.main-nav {
    padding: 1rem 0;
}

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

.logo-link {
    display: flex;
    align-items: center;
}

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

.menu-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--header-text);
    font-size: 1.5rem;
}

.icon-bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--header-text);
    margin: 5px 0;
    transition: all 0.3s ease;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin-left: auto; /* Push nav to center-right */
}

.nav-link {
    color: var(--header-text);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
}

.dropdown-toggle i {
    margin-left: 0.5rem;
    font-size: 0.8em;
    transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-toggle i,
.dropdown.active .dropdown-toggle i {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--dropdown-bg);
    border: 1px solid var(--dropdown-border);
    border-radius: 5px;
    min-width: 200px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    z-index: 10;
}

.dropdown:hover .dropdown-menu,
.dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    border-bottom: 1px solid var(--dropdown-border);
}

.dropdown-menu li:last-child {
    border-bottom: none;
}

.dropdown-item {
    display: block;
    padding: 0.8rem 1.2rem;
    color: var(--text-color);
    white-space: nowrap;
}

.dropdown-item:hover {
    background-color: var(--dropdown-item-hover-bg);
    color: var(--link-hover-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: 2rem; /* Separate from nav links */
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box input {
    padding: 0.6rem 1rem;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 20px;
    background-color: rgba(255,255,255,0.1);
    color: var(--header-text);
    outline: none;
    width: 180px;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.search-box input::placeholder {
    color: rgba(255,255,255,0.7);
}

.search-box input:focus {
    width: 220px;
    background-color: rgba(255,255,255,0.2);
}

.search-box button {
    background: none;
    border: none;
    color: var(--header-text);
    position: absolute;
    right: 10px;
    cursor: pointer;
    font-size: 1rem;
}
.search-box button:hover {
    color: var(--secondary-color);
}

/* Marquee Section */
.marquee-section {
    background-color: var(--marquee-bg);
    color: var(--marquee-text);
    padding: 0.7rem 0;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

.marquee-container {
    display: flex;
    align-items: center;
    white-space: nowrap;
    overflow: hidden; /* Ensure content doesn't wrap */
    position: relative;
}

.marquee-icon {
    font-size: 1.2rem;
    margin-right: 1rem;
    color: var(--primary-color);
    flex-shrink: 0; /* Prevent icon from shrinking */
}

.marquee-wrapper {
    overflow: hidden;
    flex-grow: 1; /* Allow wrapper to take available space */
}

.marquee-content {
    display: inline-block; /* Make content scrollable horizontally */
    padding-left: 100%; /* Start content off-screen to the right */
    animation: marquee-scroll 30s linear infinite;
    animation-delay: 0s; /* Start immediately */
}

.marquee-content p {
    margin: 0;
    display: inline;
    padding-right: 3rem; /* Space between repeated content */
}

.marquee-link {
    color: var(--primary-color);
    font-weight: 500;
}

@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* Pause marquee on hover */
.marquee-container:hover .marquee-content {
    animation-play-state: paused;
}


/* Footer */
.main-footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 3rem 0 1.5rem;
    font-size: 0.95rem;
}

.main-footer a {
    color: var(--footer-text);
    opacity: 0.8;
}

.main-footer a:hover {
    color: var(--secondary-color);
    opacity: 1;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-col h3 {
    font-size: 1.2rem;
    margin-bottom: 1.2rem;
    color: var(--secondary-color);
}

.footer-col ul {
    margin-bottom: 1rem;
}

.footer-col ul li {
    margin-bottom: 0.7rem;
}

.footer-logo-img {
    height: 40px;
    margin-bottom: 1rem;
}

.company-description {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    opacity: 0.9;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    font-size: 1.2rem;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.social-links a:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

address p {
    margin-bottom: 0.7rem;
    display: flex;
    align-items: flex-start;
    opacity: 0.9;
}

address p i {
    margin-right: 0.7rem;
    margin-top: 0.2rem;
    color: var(--secondary-color);
}

.newsletter-signup {
    margin-top: 1.5rem;
}

.newsletter-signup h4 {
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
    color: var(--secondary-color);
}

.newsletter-signup form {
    display: flex;
    gap: 0.5rem;
}

.newsletter-signup input {
    flex-grow: 1;
    padding: 0.7rem 1rem;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 5px;
    background-color: rgba(255,255,255,0.1);
    color: var(--footer-text);
    outline: none;
}

.newsletter-signup input::placeholder {
    color: rgba(255,255,255,0.7);
}

.btn-newsletter {
    background-color: var(--primary-color);
    color: #fff;
    padding: 0.7rem 1.2rem;
    border-radius: 5px;
    white-space: nowrap;
}
.btn-newsletter:hover {
    background-color: var(--link-hover-color);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    opacity: 0.8;
}

.footer-bottom .legal-links a {
    margin-left: 1.5rem;
}

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


/* Responsive Design */
@media (max-width: 992px) {
    .nav-links {
        display: none; /* Hide on smaller screens by default */
        flex-direction: column;
        width: 100%;
        background-color: var(--header-bg);
        position: absolute;
        top: 100%;
        left: 0;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        padding: 1rem 0;
    }

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

    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .nav-link {
        padding: 0.8rem 1rem;
        display: block;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    .nav-link::after {
        display: none; /* Remove underline on mobile */
    }

    .dropdown-menu {
        position: static; /* Stack dropdown items below parent on mobile */
        width: 100%;
        border: none;
        box-shadow: none;
        background-color: rgba(0,0,0,0.1);
        transform: none;
        opacity: 1;
        visibility: visible;
        padding-left: 1rem;
    }

    .dropdown-item {
        padding-left: 2rem;
    }

    .menu-toggle {
        display: block; /* Show hamburger menu */
        order: 2; /* Position after logo */
    }

    .header-actions {
        order: 3; /* Position after toggle */
        margin-left: 0;
        width: 100%;
        justify-content: center;
        padding-top: 1rem;
        border-top: 1px solid rgba(255,255,255,0.1);
        margin-top: 1rem;
    }
    
    .main-nav .container {
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .search-box {
        width: 100%;
        margin-bottom: 1rem;
    }
    .search-box input {
        width: 100%;
    }

    .header-top-bar .container {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    .header-top-actions {
        margin-top: 0.5rem;
    }
    .header-top-actions .top-bar-link {
        margin: 0 0.5rem;
    }

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

    .footer-col.about-col .social-links {
        justify-content: center;
    }

    address p {
        justify-content: center;
    }

    .newsletter-signup form {
        flex-direction: column;
        gap: 0.7rem;
    }
    .newsletter-signup input, .btn-newsletter {
        width: 100%;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    .footer-bottom .legal-links a {
        margin: 0 0.5rem;
    }
}

@media (max-width: 768px) {
    .header-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .header-actions .btn {
        width: 100%;
    }
}

/* Marquee responsiveness */
@media (max-width: 600px) {
    .marquee-content p {
        font-size: 0.9em;
    }
    .marquee-icon {
        font-size: 1em;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
