/* Basic Resets and Typography */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --text-color: #333;
    --bg-color-light: #f8f9fa;
    --border-color: #dee2e6;
    --font-family-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

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

*, *::before, *::after {
    box-sizing: border-box;
}

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

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

h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-weight: 600;
    line-height: 1.2;
}

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

ul, ol {
    margin-top: 0;
    margin-bottom: 1rem;
    padding-left: 20px;
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}

/* Buttons */
.btn {
    display: inline-block;
    font-weight: 400;
    color: #212529;
    text-align: center;
    vertical-align: middle;
    user-select: none;
    background-color: transparent;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    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: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

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

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

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

.btn-hero {
    padding: 0.75rem 1.5rem;
    font-size: 1.25rem;
    border-radius: 0.3rem;
    background-color: #28a745;
    border-color: #28a745;
    color: #fff;
}

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

.btn-subscribe {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border-radius: 0.25rem;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

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

/* Forms */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
select,
textarea {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

input[type="search"] {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.header-search button {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    margin-left: -1px; /* Overlap border */
}

/* Header Specific Styles (example, will be defined more fully in actual header CSS) */
.main-header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,.08);
}

.header-top-bar {
    background-color: var(--bg-color-light);
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.top-nav-menu, .main-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.top-nav-menu li a, .main-nav-menu li a {
    padding: 10px 15px;
    display: block;
    color: var(--text-color);
    font-size: 0.9rem;
}

.main-nav-menu li a {
    font-size: 1rem;
    font-weight: 500;
}

.logo img {
    height: 40px;
    width: auto;
}

.header-search {
    display: flex;
}

.header-search form {
    display: flex;
}

.header-search input {
    flex-grow: 1;
    min-width: 150px;
}

.header-banner {
    background: linear-gradient(to right, #007bff, #0056b3);
    color: #fff;
    padding: 60px 0;
    text-align: center;
}

/* Footer Specific Styles */
.main-footer {
    background-color: #212529;
    color: #f8f9fa;
    padding: 40px 0 20px;
}

.footer-widgets {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 30px;
}

.footer-widget {
    flex: 1;
    min-width: 200px;
}

.footer-widget h3 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.footer-widget p {
    font-size: 0.9rem;
    line-height: 1.8;
}

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

.footer-widget ul li a {
    color: #adb5bd;
    padding: 5px 0;
    display: block;
    font-size: 0.9rem;
}

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

.social-links a {
    display: inline-block;
    color: #adb5bd;
    font-size: 1.5rem;
    margin-right: 10px;
}

.social-links a:hover {
    color: #fff;
}

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

.newsletter-form input {
    border-radius: 0.25rem 0 0 0.25rem;
    border-right: none;
}

.newsletter-form button {
    border-radius: 0 0.25rem 0.25rem 0;
}

.footer-bottom-bar {
    border-top: 1px solid #495057;
    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 p {
    margin-bottom: 0;
    font-size: 0.85rem;
    color: #adb5bd;
}

.footer-legal-nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 15px;
}

.footer-legal-nav ul li a {
    color: #adb5bd;
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .header-top-bar .container, .header-main-section .container, .footer-bottom-bar .container {
        flex-direction: column;
        text-align: center;
    }
    .top-nav, .user-actions, .main-nav, .header-search {
        margin-top: 10px;
        width: 100%;
        justify-content: center;
    }
    .main-nav-menu {
        flex-direction: column;
    }
    .main-nav-menu li {
        width: 100%;
    }
    .main-nav-menu li a {
        padding: 10px 0;
        border-bottom: 1px solid var(--border-color);
    }
    .header-banner {
        padding: 40px 0;
    }
    .footer-widgets {
        flex-direction: column;
    }
    .footer-bottom-bar p, .footer-legal-nav {
        margin-top: 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;
  }
}
