/* shared_styles.css */
/* Global Reset & Box Sizing */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Base Body Styles */
body {
    font-family: 'Noto Sans SC', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9fbfd;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    margin-bottom: 0.8em;
    color: #2c3e50;
}
h1 { font-size: 2.5em; }
h2 { font-size: 2em; }
h3 { font-size: 1.75em; }
h4 { font-size: 1.5em; }
h5 { font-size: 1.25em; }
h6 { font-size: 1em; }

/* Paragraphs and Text */
p {
    margin-bottom: 1em;
    color: #555;
}
a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease, text-decoration 0.3s ease;
}
a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Buttons */
button, .button {
    display: inline-block;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    border: 1px solid transparent;
}
.button-primary {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
}
.button-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}
.button-secondary {
    background-color: #6c757d;
    color: #fff;
    border-color: #6c757d;
}
.button-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
}
.button-outline {
    background-color: transparent;
    color: #007bff;
    border-color: #007bff;
}
.button-outline:hover {
    background-color: #e9f5ff;
    color: #0056b3;
    border-color: #0056b3;
}

/* Layout & Containers */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.section-padding {
    padding: 60px 0;
}
@media (max-width: 768px) {
    .section-padding {
        padding: 40px 0;
    }
    h1 { font-size: 2em; }
    h2 { font-size: 1.75em; }
}
@media (max-width: 480px) {
    .section-padding {
        padding: 30px 0;
    }
    h1 { font-size: 1.75em; }
    h2 { font-size: 1.5em; }
}

/* Header & Footer Specific Styles (to ensure distinctness from header_html/footer_html embedded styles) */
/* Header styles */
.header-container {
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    padding: 15px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 25px;
}
.logo {
    font-size: 1.8em;
    font-weight: 700;
    color: #0a4f9b;
    text-decoration: none;
    display: flex;
    align-items: center;
}
.logo img {
    height: 35px;
    margin-right: 10px;
}
.nav-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}
.nav-menu ul li {
    margin-left: 35px;
}
.nav-menu ul li a {
    color: #444;
    font-weight: 500;
    font-size: 1.05em;
    padding: 5px 0;
    position: relative;
}
.nav-menu ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #007bff;
    transition: width 0.3s ease-out;
}
.nav-menu ul li a:hover::after {
    width: 100%;
}
.nav-menu ul li a:hover {
    color: #007bff;
}
.mobile-menu-toggle {
    display: none;
    font-size: 28px;
    cursor: pointer;
    color: #333;
}
@media (max-width: 992px) {
    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 70px; /* Adjust based on header height */
        left: 0;
        background-color: #ffffff;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        z-index: 999;
    }
    .nav-menu.active {
        display: flex;
    }
    .nav-menu ul {
        flex-direction: column;
        width: 100%;
        padding: 10px 0;
    }
    .nav-menu ul li {
        margin: 0;
        border-bottom: 1px solid #f0f0f0;
    }
    .nav-menu ul li:last-child {
        border-bottom: none;
    }
    .nav-menu ul li a {
        display: block;
        padding: 15px 25px;
        color: #333;
    }
    .nav-menu ul li a:hover {
        background-color: #f5f5f5;
        color: #007bff;
    }
    .nav-menu ul li a::after {
        display: none;
    }
    .mobile-menu-toggle {
        display: block;
    }
    .header-content {
        padding: 0 20px;
    }
}

/* Footer styles */
.footer-container {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 60px 0 20px;
    font-size: 0.95em;
}
.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 25px;
}
.footer-section {
    flex: 1;
    min-width: 250px;
    margin-bottom: 30px;
    padding-right: 20px;
}
.footer-section:last-child {
    padding-right: 0;
}
.footer-section h3 {
    color: #ffffff;
    font-size: 1.3em;
    margin-bottom: 20px;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
    display: inline-block;
}
.footer-section p {
    color: #bdc3c7;
    line-height: 1.8;
}
.footer-section ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.footer-section ul li {
    margin-bottom: 10px;
}
.footer-section ul li a {
    color: #bdc3c7;
    transition: color 0.3s ease;
}
.footer-section ul li a:hover {
    color: #007bff;
    text-decoration: underline;
}
.social-links {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}
.social-links img {
    width: 30px;
    height: 30px;
    filter: invert(0.8); /* Make icons light for dark background */
    transition: filter 0.3s ease;
}
.social-links img:hover {
    filter: invert(1) drop-shadow(0 0 5px #007bff); /* Brighter on hover */
}
.newsletter form {
    display: flex;
    margin-top: 15px;
}
.newsletter input[type="email"] {
    flex-grow: 1;
    padding: 12px 15px;
    border: 1px solid #555;
    border-radius: 5px 0 0 5px;
    background-color: #3a506b;
    color: #ecf0f1;
    font-size: 1em;
}
.newsletter input[type="email"]::placeholder {
    color: #95a5a6;
}
.newsletter button {
    padding: 12px 20px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.newsletter button:hover {
    background-color: #0056b3;
}
.footer-bottom {
    border-top: 1px solid #3a506b;
    margin-top: 40px;
    padding-top: 25px;
    text-align: center;
    color: #bdc3c7;
}
.footer-bottom .legal-links a {
    color: #bdc3c7;
    margin: 0 10px;
}
.footer-bottom .legal-links a:hover {
    color: #007bff;
    text-decoration: underline;
}
.footer-bottom .legal-links span {
    color: #bdc3c7;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        padding: 0 20px;
    }
    .footer-section {
        min-width: unset;
        width: 100%;
        padding-right: 0;
        text-align: center;
    }
    .footer-section h3 {
        margin: 0 auto 20px;
        display: table; /* To center the border-bottom */
    }
    .social-links {
        justify-content: center;
    }
    .newsletter form {
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }
    .footer-bottom {
        padding: 20px 20px 0;
    }
    .footer-bottom .legal-links {
        margin-top: 15px;
    }
    .footer-bottom .legal-links a, .footer-bottom .legal-links span {
        display: block;
        margin: 5px 0;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
