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

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

a {
    text-decoration: none;
    color: #007bff;
}

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

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

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

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

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

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

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

.btn-subscribe {
    background-color: #28a745;
    color: #fff;
    border: 1px solid #28a745;
    padding: 8px 15px;
    font-size: 0.9em;
}

.btn-subscribe:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

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

.header-top-bar {
    background-color: #f0f0f0;
    padding: 8px 0;
    font-size: 0.9em;
    color: #555;
    border-bottom: 1px solid #eee;
}

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

.top-bar-links a {
    margin-left: 15px;
    color: #555;
}

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

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

.header-main-nav-area .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Allow wrapping for responsiveness */
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
}

.logo img {
    height: 60px; /* Adjust as needed */
    width: auto;
    margin-right: 10px;
}

.main-navigation {
    flex-grow: 1;
    text-align: center;
}

.nav-list {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px; /* Spacing between main nav items */
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    padding: 10px 0;
    font-weight: bold;
    color: #333;
    transition: color 0.3s ease;
}

.nav-link:hover, .nav-link.current {
    color: #007bff;
    text-decoration: none;
}

.nav-item.dropdown > .nav-link i {
    margin-left: 5px;
    font-size: 0.8em;
    transition: transform 0.3s ease;
}

.nav-item.dropdown:hover > .nav-link i {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    border-radius: 5px;
    min-width: 200px;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

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

.dropdown-menu li a {
    padding: 10px 20px;
    display: block;
    color: #555;
    white-space: nowrap;
}

.dropdown-menu li a:hover {
    background-color: #f5f5f5;
    color: #007bff;
    text-decoration: none;
}

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

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

.search-toggle {
    background: none;
    border: none;
    font-size: 1.2em;
    cursor: pointer;
    color: #555;
    padding: 5px;
}

.search-toggle:hover {
    color: #007bff;
}

.search-input-wrapper {
    display: none; /* Hidden by default, shown with JS */
    position: absolute;
    right: 0;
    top: 100%;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    padding: 10px;
    border-radius: 5px;
    white-space: nowrap;
    z-index: 1000;
}

.search-input-wrapper input {
    border: 1px solid #ddd;
    padding: 8px 10px;
    border-radius: 3px;
    margin-right: 5px;
    width: 200px;
}

.search-input-wrapper button {
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 3px;
    cursor: pointer;
}

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

.menu-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    position: relative;
    width: 30px;
    height: 25px;
    flex-direction: column;
    justify-content: space-between;
}

.menu-toggle .bar {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #333;
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
}

/* Mobile Navigation */
@media (max-width: 992px) {
    .main-navigation {
        display: none; /* Hide main nav by default on mobile */
        width: 100%;
        order: 3; /* Push to new line */
        background-color: #fff;
        box-shadow: 0 5px 10px rgba(0,0,0,0.05);
        padding: 15px 0;
    }

    .main-navigation.active {
        display: block;
    }

    .nav-list {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }

    .nav-item {
        width: 100%;
        border-bottom: 1px solid #eee;
    }

    .nav-item:last-child {
        border-bottom: none;
    }

    .nav-link {
        padding: 12px 20px;
    }

    .nav-item.dropdown > .nav-link {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        border-radius: 0;
        background-color: #f9f9f9;
        min-width: unset;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
    }

    .nav-item.dropdown.active .dropdown-menu {
        max-height: 300px; /* Adjust based on content */
    }

    .dropdown-menu li a {
        padding-left: 40px;
    }

    .menu-toggle {
        display: flex; /* Show hamburger on mobile */
    }

    .header-main-nav-area .container {
        justify-content: space-between;
    }

    .header-actions {
        order: 2; /* Keep actions next to logo on mobile */
    }

    .search-input-wrapper {
        width: calc(100% - 30px); /* Full width on mobile */
        left: 15px;
        right: 15px;
        top: 60px; /* Below header */
        display: flex;
        justify-content: space-between;
    }
    .search-input-wrapper input {
        flex-grow: 1;
    }
}

/* Footer Styles */
.main-footer {
    background-color: #222;
    color: #f0f0f0;
    padding: 60px 0 30px;
    font-size: 0.9em;
}

.main-footer a {
    color: #f0f0f0;
}

.main-footer a:hover {
    color: #007bff;
    text-decoration: none;
}

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

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

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

.footer-col p {
    margin-bottom: 15px;
}

.footer-logo img {
    max-width: 180px;
    margin-bottom: 20px;
}

.social-links {
    margin-top: 20px;
}

.social-links a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: #444;
    color: #fff;
    font-size: 1.1em;
    margin-right: 10px;
    transition: background-color 0.3s ease;
}

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

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

.footer-col address p {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
}

.footer-col address p i {
    margin-right: 10px;
    color: #007bff;
    font-size: 1.1em;
    line-height: 1.6;
}

.newsletter-signup h4 {
    color: #fff;
    margin-top: 20px;
    margin-bottom: 15px;
}

.newsletter-signup form {
    display: flex;
    gap: 10px;
}

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

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

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #333;
}

.footer-bottom p {
    margin: 0;
    color: #aaa;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-col h3::after {
        margin: 8px auto 0;
    }

    .footer-logo {
        text-align: center;
    }
    .footer-logo img {
        margin-left: auto;
        margin-right: auto;
    }

    .social-links {
        justify-content: center;
        display: flex;
    }

    .newsletter-signup form {
        flex-direction: column;
        align-items: stretch;
    }
    .newsletter-signup input[type="email"] {
        margin-bottom: 10px;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
