/* shared_css: Basic Reset and Global Styles */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --accent-color: #28a745;
    --text-color: #333;
    --background-color: #f8f9fa;
    --border-color: #dee2e6;
    --font-family-sans: 'Helvetica Neue', Arial, sans-serif;
    --font-family-serif: 'Georgia', serif;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px; /* Base font size */
}

body {
    font-family: var(--font-family-sans);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    -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: var(--font-family-sans);
    margin-bottom: 0.5em;
    font-weight: 700;
    line-height: 1.2;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1em;
}

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

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 4px;
    transition: all 0.3s ease;
}

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

.btn-primary:hover {
    background-color: #0069d9;
    border-color: #0062cc;
}

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

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

.btn-subscribe {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
}
.btn-subscribe:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

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

input[type="email"]::placeholder,
input[type="search"]::placeholder {
    color: #6c757d;
    opacity: 1;
}

input[type="email"]:focus,
input[type="search"]:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.hidden { display: none !important; }
.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 Specific Styles */
.main-header {
    background-color: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,.05);
}
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}
.main-header .logo img {
    height: 40px; /* Adjust as needed */
    width: auto;
}
.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 20px;
}
.main-navigation a {
    font-weight: 600;
    padding: 5px 0;
    display: block;
    position: relative;
}
.main-navigation a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}
.main-navigation a:hover::after,
.main-navigation a[aria-current="page"]::after {
    width: 100%;
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}
.search-box {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}
.search-box input {
    border: none;
    padding: 8px 10px;
    width: 180px;
}
.search-box button {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
}
.search-box button:hover {
    background-color: #0069d9;
}
.menu-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 24px;
    position: relative;
    flex-direction: column;
    justify-content: space-between;
}
.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
}
.secondary-navigation {
    background-color: #f2f2f2;
    padding: 10px 0;
    border-top: 1px solid #e9ecef;
}
.secondary-navigation ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
}
.secondary-navigation a {
    color: #555;
    font-size: 0.9rem;
    padding: 5px 0;
    display: block;
}
.secondary-navigation a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Footer Specific Styles */
.main-footer {
    background-color: #343a40;
    color: #f8f9fa;
    padding: 40px 0 20px;
    font-size: 0.9rem;
}
.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    gap: 30px;
}
.footer-section {
    flex: 1;
    min-width: 200px;
    margin-bottom: 20px;
}
.footer-section h3 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 1.1rem;
}
.footer-section p, .footer-section ul {
    margin-bottom: 10px;
}
.footer-section ul {
    list-style: none;
}
.footer-section ul li {
    margin-bottom: 8px;
}
.footer-section a {
    color: #adb5bd;
    text-decoration: none;
}
.footer-section a:hover {
    color: #fff;
    text-decoration: underline;
}
.social-media a {
    display: inline-block;
    color: #adb5bd;
    font-size: 1.5rem;
    margin-right: 15px;
    transition: color 0.3s ease;
}
.social-media a:hover {
    color: var(--primary-color);
}
.newsletter form {
    display: flex;
    margin-top: 15px;
}
.newsletter input[type="email"] {
    flex-grow: 1;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border: 1px solid #495057;
    background-color: #212529;
    color: #f8f9fa;
}
.newsletter input[type="email"]::placeholder {
    color: #adb5bd;
}
.newsletter button {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    padding: 10px 15px;
    font-size: 0.9rem;
}
.footer-bottom {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #495057;
    color: #adb5bd;
}
.footer-bottom p {
    margin-bottom: 5px;
}
.footer-bottom a {
    color: #adb5bd;
    margin: 0 10px;
}
.footer-bottom a:hover {
    color: #fff;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .main-navigation {
        display: none; /* Hide main navigation on smaller screens */
    }
    .header-actions {
        order: 3; /* Move actions to the end */
    }
    .menu-toggle {
        display: flex; /* Show hamburger menu */
        margin-left: 15px;
    }
    .main-header .header-container {
        justify-content: space-between;
    }
    .search-box {
        width: 100%;
        margin-right: 10px;
    }
    .search-box input {
        width: calc(100% - 45px); /* Adjust for button width */
    }
    .secondary-navigation {
        display: none; /* Hide secondary navigation on smaller screens */
    }
    .footer-container {
        flex-direction: column;
        align-items: center;
    }
    .footer-section {
        min-width: unset;
        width: 100%;
        text-align: center;
    }
    .footer-section ul {
        padding-left: 0;
    }
    .social-media {
        display: flex;
        justify-content: center;
        gap: 15px;
    }
    .social-media a {
        margin: 0;
    }
    .newsletter form {
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }
}
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    .header-container {
        flex-wrap: wrap;
        gap: 10px;
    }
    .main-header .logo {
        flex-basis: auto;
        margin-right: auto; /* Push actions to the right */
    }
    .search-box {
        order: 2; /* Search box below logo/nav toggle */
        flex-basis: 100%;
    }
}
/* Placeholder for icon styles (e.g., using Font Awesome) */
/* In a real project, you would link to a font icon library or use SVG icons */
.icon-search::before { content: "\f002"; font-family: 'Font Awesome 5 Free'; font-weight: 900; } /* Example: Font Awesome Search Icon */
.icon-facebook::before { content: "\f09a"; font-family: 'Font Awesome 5 Brands'; } /* Example: Font Awesome Facebook Icon */
.icon-twitter::before { content: "\f099"; font-family: 'Font Awesome 5 Brands'; }
.icon-linkedin::before { content: "\f0e1"; font-family: 'Font Awesome 5 Brands'; }
.icon-wechat::before { content: "\f1d7"; font-family: 'Font Awesome 5 Brands'; }
.icon-youtube::before { content: "\f167"; font-family: 'Font Awesome 5 Brands'; }
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
