/* Basic Reset & Typography */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --accent-color: #28a745;
    --text-color: #343a40;
    --light-bg: #f8f9fa;
    --dark-bg: #343a40;
    --white: #ffffff;
    --border-color: #dee2e6;
    --font-family-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    --font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

body {
    font-family: var(--font-family-sans-serif);
    line-height: 1.6;
    color: var(--text-color);
    margin: 0;
    padding: 0;
    background-color: var(--light-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--dark-bg);
}

p {
    margin-top: 0;
    margin-bottom: 1rem;
}

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

a:hover {
    color: #0056b3; /* Darker primary */
    text-decoration: underline;
}

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

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

.btn {
    display: inline-block;
    font-weight: 400;
    color: var(--white);
    text-align: center;
    vertical-align: middle;
    user-select: none;
    background-color: transparent;
    border: 1px solid transparent;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.btn-primary {
    color: var(--white);
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    color: var(--white);
    background-color: #0056b3;
    border-color: #0056b3;
}

.btn-secondary {
    color: var(--white);
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-secondary:hover {
    color: var(--white);
    background-color: #545b62;
    border-color: #545b62;
}

/* Header Specific Styles (example) */
.main-header {
    background-color: var(--white);
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
    position: relative;
    z-index: 1000;
}

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

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

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

.top-bar-content .social-media a {
    color: var(--white);
    margin-left: 15px;
    font-size: 1rem;
}

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

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

.logo img {
    display: block;
}

.nav-links {
    display: flex;
    margin-left: auto;
}

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

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

.nav-links a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    min-width: 200px;
    z-index: 1;
    border-radius: 0.25rem;
    padding: 10px 0;
}

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

.dropdown-menu li a {
    padding: 8px 20px;
    white-space: nowrap;
}

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

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

.header-actions .btn {
    margin-left: 10px;
}

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

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

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

.search-bar-overlay input[type="search"] {
    flex-grow: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 5px;
    font-size: 1.2rem;
    outline: none;
}

.search-bar-overlay button {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    margin-left: 10px;
}

.search-bar-overlay .close-search {
    position: absolute;
    right: -40px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--white);
    font-size: 2rem;
}

/* Footer Specific Styles (example) */
.main-footer {
    background-color: var(--dark-bg);
    color: rgba(255, 255, 255, 0.7);
    padding: 60px 0 30px;
    font-size: 0.9rem;
}

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

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

.footer-about p {
    margin-bottom: 20px;
}

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

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

.main-footer h4 {
    color: var(--white);
    font-size: 1.1rem;
    margin-bottom: 25px;
    position: relative;
}

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

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

.main-footer ul li a {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease;
}

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

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

.footer-contact p i {
    margin-right: 10px;
    color: var(--primary-color);
    font-size: 1.1rem;
}

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

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

.newsletter .btn-subscribe {
    background-color: var(--primary-color);
    border: 1px solid var(--primary-color);
    color: var(--white);
    padding: 10px 15px;
    border-radius: 0 0.25rem 0.25rem 0;
    cursor: pointer;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    margin-top: 30px;
    text-align: center;
}

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

.footer-bottom p {
    margin-bottom: 0;
}

.legal-links a {
    color: rgba(255, 255, 255, 0.7);
    margin: 0 10px;
}

.legal-links .separator {
    color: rgba(255, 255, 255, 0.3);
}

@media (max-width: 992px) {
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: calc(100% + 1px);
        left: 0;
        background-color: var(--white);
        box-shadow: 0 8px 16px rgba(0,0,0,0.1);
        padding: 10px 0;
    }
    .nav-links.active {
        display: flex;
    }
    .nav-links li {
        margin: 0;
        border-bottom: 1px solid var(--border-color);
    }
    .nav-links li:last-child {
        border-bottom: none;
    }
    .nav-links a {
        padding: 15px 20px;
    }
    .menu-toggle {
        display: block;
    }
    .header-actions {
        margin-left: auto; /* Push actions to the right */
    }
    .header-actions .btn {
        display: none; /* Hide buttons on smaller screens, or put them in menu */
    }
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-about .social-links {
        justify-content: center;
        display: flex;
        margin-top: 20px;
    }
    .main-footer h4::after {
        margin-left: auto;
        margin-right: auto;
    }
    .footer-bottom .container {
        flex-direction: column;
    }
    .footer-bottom p {
        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;
  }
}
