/* General Body Styles */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    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;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Helvetica Neue', sans-serif;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 0.5em;
    color: #212529;
}

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

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

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

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

.header-top-bar {
    background-color: #007bff;
    color: #fff;
    padding: 8px 0;
    font-size: 0.9em;
}

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

.header-top-bar .contact-info span {
    margin-right: 20px;
    white-space: nowrap;
}

.header-top-bar .social-links a {
    color: #fff;
    margin-left: 15px;
    font-size: 1.1em;
    transition: color 0.3s ease;
}

.header-top-bar .social-links a:hover {
    color: #e9ecef;
}

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

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

.navbar-brand {
    display: flex;
    align-items: center;
}

.navbar-brand .logo-link {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.navbar-brand .logo-img {
    height: 40px; /* Adjust as needed */
    margin-right: 10px;
    max-width: 100%;
}

.navbar-brand .site-name {
    font-size: 1.8em;
    font-weight: bold;
    color: #333;
    white-space: nowrap;
}

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

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: flex-end;
}

.main-navigation ul li {
    position: relative;
    margin-left: 25px;
}

.main-navigation ul li a {
    text-decoration: none;
    color: #555;
    font-weight: 600;
    padding: 10px 0;
    display: block;
    transition: color 0.3s ease;
}

.main-navigation ul li a:hover,
.main-navigation ul li.current-menu-item > a {
    color: #007bff;
}

.main-navigation ul li.menu-item-has-children > a::after {
    content: '\f0d7'; /* FontAwesome caret-down icon */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-left: 5px;
    font-size: 0.8em;
}

.main-navigation ul .sub-menu {
    display: none;
    position: absolute;
    background-color: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    min-width: 200px;
    z-index: 100;
    top: 100%;
    left: 0;
    padding: 10px 0;
    border-top: 3px solid #007bff;
    list-style: none;
    text-align: left;
}

.main-navigation ul li:hover > .sub-menu {
    display: block;
}

.main-navigation ul .sub-menu li {
    margin: 0;
}

.main-navigation ul .sub-menu li a {
    padding: 10px 20px;
    color: #444;
    white-space: nowrap;
}

.main-navigation ul .sub-menu li a:hover {
    background-color: #f1f1f1;
    color: #007bff;
}

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

.header-actions {
    display: flex;
    align-items: center;
    margin-left: 20px; /* Space from navigation */
}

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

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

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    white-space: nowrap;
}

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

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

.btn-secondary {
    background-color: #6c757d;
    color: #fff;
    border: 1px solid #6c757d;
    margin-left: 10px;
}

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

.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-form {
    display: flex;
    width: 80%;
    max-width: 600px;
    position: relative;
}

.search-form input[type="search"] {
    flex-grow: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 5px 0 0 5px;
    font-size: 1.2em;
    outline: none;
    background-color: #fff;
    color: #333;
}

.search-form input[type="search"]::placeholder {
    color: #999;
}

.search-form .search-submit {
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 15px 20px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    font-size: 1.2em;
    margin-left: -1px; /* Overlap border */
    transition: background-color 0.3s ease;
}

.search-form .search-submit:hover {
    background-color: #0056b3;
}

.search-form .search-close {
    position: absolute;
    top: -40px; /* Position above the input */
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 2em;
    cursor: pointer;
    padding: 5px;
}

/* Footer Styles */
.main-footer {
    background-color: #212529;
    color: #e9ecef;
    padding: 50px 0 20px;
    font-size: 0.95em;
    margin-top: 40px; /* Provide some space from main content */
}

.footer-widgets {
    padding-bottom: 30px;
}

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

.footer-widget {
    margin-bottom: 20px;
}

.footer-widget .widget-title {
    color: #fff;
    font-size: 1.3em;
    margin-bottom: 20px;
    position: relative;
}

.footer-widget .widget-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background-color: #007bff;
    margin-top: 10px;
}

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

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

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

.footer-widget ul li a {
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.footer-widget .contact-details p {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
}

.footer-widget .contact-details i {
    margin-right: 10px;
    color: #007bff;
    font-size: 1.1em;
    padding-top: 2px; /* Align icon with text */
}

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

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

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

.newsletter-form .btn-primary {
    border-radius: 0 5px 5px 0;
    padding: 10px 18px;
    white-space: nowrap;
}

.social-media-footer {
    margin-top: 20px;
}

.social-media-footer a {
    color: #fff;
    font-size: 1.3em;
    margin-right: 15px;
    transition: color 0.3s ease;
}

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

.footer-bottom-bar {
    border-top: 1px solid #343a40;
    padding-top: 20px;
    text-align: center;
}

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

.footer-bottom-bar .copyright {
    margin: 0;
    color: #adb5bd;
}

.footer-legal-links a {
    color: #adb5bd;
    text-decoration: none;
    margin-left: 15px;
    transition: color 0.3s ease;
}

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

/* Responsive adjustments */
@media (max-width: 992px) {
    .main-navigation {
        order: 3; /* Move navigation below brand and toggle */
        flex-basis: 100%;
        text-align: left;
    }

    .main-navigation ul {
        display: none; /* Hide desktop menu */
        flex-direction: column;
        width: 100%;
        position: static;
        box-shadow: none;
        border-top: none;
        background-color: #fff;
        padding: 0;
        justify-content: flex-start;
    }

    .main-navigation ul.active {
        display: flex;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        border-top: 3px solid #007bff;
        padding: 10px 0;
    }

    .main-navigation ul li {
        margin: 0;
        border-bottom: 1px solid #eee;
    }

    .main-navigation ul li:last-child {
        border-bottom: none;
    }

    .main-navigation ul li a {
        padding: 15px 20px;
    }

    .main-navigation ul .sub-menu {
        position: static;
        box-shadow: none;
        border-top: none;
        background-color: #f8f9fa;
        padding-left: 20px;
        display: block; /* Always visible on mobile when parent is active */
    }

    .main-navigation ul .sub-menu li a {
        padding: 10px 20px;
    }

    .menu-toggle {
        display: block; /* Show hamburger menu */
        margin-left: auto; /* Push to right */
        margin-right: 15px;
    }

    .header-main-nav .container {
        flex-wrap: wrap;
    }

    .navbar-brand {
        flex-grow: 1;
    }

    .header-actions {
        order: 2; /* Keep actions next to toggle */
        margin-left: 0;
    }

    .search-toggle {
        margin-right: 0;
        margin-left: 15px;
    }
}

@media (max-width: 768px) {
    .header-top-bar .top-bar-content {
        flex-direction: column;
        text-align: center;
    }

    .header-top-bar .contact-info span {
        margin: 5px 0;
    }

    .header-top-bar .social-links {
        margin-top: 10px;
    }

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

    .footer-widget .widget-title::after {
        margin: 10px auto 0; /* Center the underline */
    }

    .newsletter-form {
        max-width: 350px;
        margin-left: auto;
        margin-right: auto;
    }

    .footer-bottom-bar .container {
        flex-direction: column;
    }

    .footer-bottom-bar .copyright {
        margin-bottom: 10px;
    }

    .footer-legal-links a {
        margin: 0 8px;
    }
}

@media (max-width: 480px) {
    .navbar-brand .site-name {
        font-size: 1.5em;
    }
    .btn {
        padding: 8px 15px;
        font-size: 0.9em;
    }
    .search-form input[type="search"],
    .search-form .search-submit {
        padding: 12px 15px;
        font-size: 1em;
    }
    .header-top-bar .contact-info {
        font-size: 0.8em;
    }
    .header-top-bar .social-links a {
        font-size: 1em;
    }
    .footer-widget p {
        font-size: 0.9em;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
