/* Basic Reset & Typography */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --accent-color: #28a745;
    --light-bg: #f8f9fa;
    --dark-bg: #343a40;
    --text-color: #333;
    --light-text-color: #f0f0f0;
    --font-family-sans-serif: 'Arial', sans-serif;
    --font-family-serif: 'Georgia', serif;
}

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

body {
    font-family: var(--font-family-sans-serif);
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

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

.flex-wrap {
    flex-wrap: wrap;
}

.justify-content-between {
    justify-content: space-between;
}

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

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    text-align: center;
    border: none;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: #fff;
}

.btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
}

.btn-cta {
    background-color: var(--accent-color);
    color: #fff;
    font-weight: bold;
}

.btn-cta:hover {
    background-color: #218838;
    transform: translateY(-2px);
}

/* Header Styles */
.main-header {
    background-color: #fff;
    border-bottom: 1px solid #eee;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.header-top-bar {
    background-color: var(--dark-bg);
    color: var(--light-text-color);
    padding: 8px 0;
    font-size: 0.85rem;
}

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

.header-top-bar .social-links a {
    color: var(--light-text-color);
    margin-left: 15px;
    font-size: 1rem;
}

.header-top-bar .social-links a:hover {
    color: var(--primary-color);
}

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

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-color);
}

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

.navbar-toggler {
    display: none; /* Hidden by default, shown on mobile */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    position: relative;
    z-index: 100;
}

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

.navbar-collapse {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: flex-end;
}

.navbar-nav {
    display: flex;
    margin: 0;
    padding: 0;
}

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

.nav-link {
    display: block;
    padding: 10px 0;
    color: var(--text-color);
    font-weight: 500;
}

.nav-link:hover, .nav-item.active .nav-link {
    color: var(--primary-color);
    text-decoration: none;
}

.dropdown-menu {
    display: none;
    position: absolute;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    min-width: 200px;
    z-index: 10;
    border-radius: 5px;
    padding: 10px 0;
    margin-top: 5px;
}

.nav-item.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 8px 20px;
    color: var(--text-color);
}

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

.dropdown-divider {
    height: 1px;
    margin: 0.5rem 0;
    overflow: hidden;
    background-color: #e9ecef;
}

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

.search-form {
    display: flex;
    border: 1px solid #ccc;
    border-radius: 5px;
    overflow: hidden;
}

.search-form input {
    border: none;
    padding: 8px 12px;
    outline: none;
    width: 150px;
}

.search-form button {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
}

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

.header-banner {
    background-color: var(--primary-color);
    color: #fff;
    padding: 40px 0;
    text-align: center;
}

.header-banner .banner-text {
    font-size: 1.8rem;
    margin-bottom: 20px;
    font-weight: 300;
}

/* Footer Styles */
.main-footer {
    background-color: var(--dark-bg);
    color: var(--light-text-color);
    padding: 50px 0 20px;
    font-size: 0.9rem;
}

.footer-widgets {
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
}

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

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

.footer-col h3::after {
    content: '';
    display: block;
    width: 50px;
    height: 2px;
    background-color: var(--primary-color);
    margin-top: 10px;
}

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

.footer-col ul {
    margin: 0;
    padding: 0;
}

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

.footer-col ul li a {
    color: var(--light-text-color);
    transition: color 0.3s ease;
}

.footer-col ul li a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.footer-social-links a {
    color: var(--light-text-color);
    font-size: 1.2rem;
    margin-right: 15px;
    transition: color 0.3s ease;
}

.footer-social-links a:hover {
    color: var(--primary-color);
}

address p {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

address p i {
    margin-right: 10px;
    color: var(--primary-color);
}

.newsletter-signup {
    margin-top: 25px;
}

.newsletter-signup h4 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.newsletter-form {
    display: flex;
}

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

.newsletter-form .btn-subscribe {
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 0 5px 5px 0;
    padding: 10px 20px;
}

.newsletter-form .btn-subscribe:hover {
    background-color: #0056b3;
}

.footer-bottom {
    padding-top: 20px;
    text-align: center;
    font-size: 0.8rem;
}

.footer-bottom .copyright-text {
    margin: 0;
}

.footer-bottom .copyright-text a {
    color: var(--light-text-color);
    margin: 0 5px;
}

.footer-bottom .copyright-text a:hover {
    color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 992px) {
    .navbar-collapse {
        flex-direction: column;
        align-items: flex-start;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #fff;
        border-top: 1px solid #eee;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        padding: 15px;
        display: none; /* Hidden by default */
    }

    .navbar-collapse.show {
        display: flex; /* Shown when toggler is clicked */
    }

    .navbar-toggler {
        display: block;
    }

    .navbar-nav {
        flex-direction: column;
        width: 100%;
        margin-bottom: 15px;
    }

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

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

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

    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 20px;
        margin-top: 0;
    }

    .header-actions {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        margin-left: 0;
        gap: 10px;
    }

    .search-form {
        width: 100%;
    }

    .search-form input {
        width: calc(100% - 40px); /* Adjust based on button width */
    }

    .header-banner .banner-text {
        font-size: 1.5rem;
    }

    .footer-row {
        flex-direction: column;
        align-items: center;
    }

    .footer-col {
        min-width: unset;
        width: 100%;
        text-align: center;
    }

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

    .footer-social-links {
        text-align: center;
        margin-top: 15px;
    }

    address p {
        justify-content: center;
    }

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

@media (max-width: 576px) {
    .header-top-bar .top-bar-content {
        flex-direction: column;
        text-align: center;
    }
    .header-top-bar .social-links {
        margin-top: 10px;
    }
    .header-banner {
        padding: 30px 0;
    }
    .header-banner .banner-text {
        font-size: 1.2rem;
    }
    .btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    .footer-widgets {
        padding-left: 15px;
        padding-right: 15px;
    }
    .newsletter-form input[type="email"] {
        padding: 8px 10px;
    }
    .newsletter-form .btn-subscribe {
        padding: 8px 15px;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
