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

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

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

a:hover {
    text-decoration: underline;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
    transition: background-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: #6c757d;
    color: white;
    border: 1px solid #6c757d;
}

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

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

.header-top-bar {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 10px 0;
    font-size: 0.9em;
}

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

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

.header-top-bar .contact-info i,
.header-top-bar .social-links i {
    margin-right: 5px;
}

.header-top-bar .social-links a {
    color: #ecf0f1;
    margin-left: 15px;
    transition: color 0.3s ease;
}

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

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

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

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

.logo-img {
    height: 40px;
    margin-right: 10px;
}

.site-title {
    font-size: 1.8em;
    font-weight: bold;
    color: #333;
    text-decoration: none;
}

.main-navigation {
    position: relative;
}

.menu-toggle {
    display: none;
}

.menu-icon {
    display: none; /* Hidden by default, shown on smaller screens */
    cursor: pointer;
    padding: 10px;
    position: relative;
    z-index: 1001;
}

.nav-icon {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    position: relative;
    transition: background-color 0.3s ease;
}

.nav-icon::before,
.nav-icon::after {
    content: '';
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    position: absolute;
    transition: transform 0.3s ease, top 0.3s ease;
}

.nav-icon::before {
    top: -8px;
}

.nav-icon::after {
    top: 8px;
}

.menu-toggle:checked ~ .menu-icon .nav-icon {
    background-color: transparent;
}

.menu-toggle:checked ~ .menu-icon .nav-icon::before {
    transform: rotate(45deg);
    top: 0;
}

.menu-toggle:checked ~ .menu-icon .nav-icon::after {
    transform: rotate(-45deg);
    top: 0;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

.nav-item {
    margin-left: 30px;
    position: relative;
}

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

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

.has-submenu {
    position: relative;
}

.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    list-style: none;
    padding: 10px 0;
    min-width: 200px;
    z-index: 10;
    border-radius: 5px;
}

.nav-item.has-submenu:hover > .submenu {
    display: block;
}

.submenu li a {
    padding: 10px 20px;
    display: block;
    color: #333;
    white-space: nowrap;
}

.submenu li a:hover {
    background-color: #f8f9fa;
    color: #007bff;
    text-decoration: none;
}

.cta-button {
    background-color: #28a745;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    margin-left: 20px;
}

.cta-button:hover {
    background-color: #218838;
    color: white;
    text-decoration: none;
}

.search-item {
    margin-left: 20px;
}

.search-toggle {
    background: none;
    border: none;
    font-size: 1.2em;
    cursor: pointer;
    color: #333;
    transition: color 0.3s ease;
}

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

.search-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    z-index: 1002;
    align-items: center;
    justify-content: center;
}

.search-overlay.active {
    display: flex;
}

.search-form {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    display: flex;
    max-width: 600px;
    width: 90%;
    position: relative;
}

.search-form input[type="search"] {
    flex-grow: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px 0 0 5px;
    font-size: 1.1em;
    outline: none;
}

.search-form button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    font-size: 1.1em;
    transition: background-color 0.3s ease;
}

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

.search-form .close-search {
    position: absolute;
    top: -15px;
    right: -15px;
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1em;
    cursor: pointer;
    border: none;
}

/* Hero Section */
.hero-section {
    background: url('/assets/images/hero-bg.jpg') no-repeat center center/cover;
    color: white;
    text-align: center;
    padding: 100px 0;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Dark overlay */
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    font-size: 3.5em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-section p {
    font-size: 1.3em;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Footer Styles */
.main-footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 50px 0 20px;
    font-size: 0.95em;
}

.footer-widgets {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 30px;
}

.footer-widget {
    flex: 1;
    min-width: 250px;
    margin-right: 20px;
    margin-bottom: 30px;
}

.footer-widget:last-child {
    margin-right: 0;
}

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

.footer-widget h3::after {
    content: '';
    display: block;
    width: 50px;
    height: 2px;
    background-color: #3498db;
    margin-top: 10px;
}

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

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

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

.footer-widget ul li a {
    color: #ecf0f1;
    transition: color 0.3s ease;
}

.footer-widget ul li a:hover {
    color: #3498db;
    text-decoration: none;
}

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

.contact-details i {
    margin-right: 10px;
    color: #3498db;
}

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

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

.newsletter-form button {
    border-radius: 0 5px 5px 0;
    padding: 10px 15px;
    cursor: pointer;
    border: none;
}

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

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

.social-media a:hover {
    color: #3498db;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 20px;
    text-align: center;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer-bottom p {
    margin: 0;
}

.legal-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
}

.legal-links li {
    margin-left: 20px;
}

.legal-links li a {
    color: #ecf0f1;
    transition: color 0.3s ease;
}

.legal-links li a:hover {
    color: #3498db;
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #007bff;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 999;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.back-to-top:hover {
    background-color: #0056b3;
    transform: translateY(-3px);
}

/* Responsive Design */
@media (max-width: 992px) {
    .header-main-nav .container {
        flex-wrap: wrap;
    }

    .main-navigation {
        width: 100%;
        margin-top: 15px;
    }

    .nav-list {
        flex-direction: column;
        width: 100%;
        background-color: #fff;
        position: absolute;
        top: 100%;
        left: 0;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        display: none; /* Hidden by default for mobile */
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
    }

    .menu-icon {
        display: block; /* Show menu icon on smaller screens */
    }

    .menu-toggle:checked ~ .nav-list {
        display: flex;
        max-height: 500px; /* Adjust as needed */
    }

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

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

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

    .submenu {
        position: static;
        box-shadow: none;
        background-color: #f8f9fa;
        border-radius: 0;
        width: 100%;
        padding-left: 20px;
    }

    .nav-item.has-submenu:hover > .submenu {
        display: none; /* Submenu controlled by JS on mobile or click */
    }

    .footer-widgets {
        flex-direction: column;
    }

    .footer-widget {
        min-width: unset;
        margin-right: 0;
        text-align: center;
    }

    .footer-widget h3::after {
        margin-left: auto;
        margin-right: auto;
    }

    .contact-details p {
        justify-content: center;
    }

    .newsletter-form {
        justify-content: center;
    }

    .social-media {
        text-align: center;
    }

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

    .legal-links {
        margin-top: 15px;
        justify-content: center;
    }

    .legal-links li {
        margin: 0 10px;
    }
}

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

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

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

    .hero-section h1 {
        font-size: 2.5em;
    }

    .hero-section p {
        font-size: 1.1em;
    }
}

@media (max-width: 480px) {
    .logo-img {
        height: 35px;
    }

    .site-title {
        font-size: 1.5em;
    }

    .hero-section {
        padding: 60px 0;
        min-height: 300px;
    }

    .hero-section h1 {
        font-size: 2em;
    }

    .hero-section p {
        font-size: 1em;
    }

    .footer-widget {
        margin-bottom: 20px;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
