/* shared.css - 全局共享样式表 */

/* CSS Reset/Normalize */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: 'Noto Sans SC', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Global Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Noto Sans SC', sans-serif;
    color: #212529;
    margin-bottom: 0.5em;
    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: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

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

ul, ol {
    list-style: none;
    margin-bottom: 1em;
}

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

.flex-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

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

.button {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.primary-button {
    background-color: #007bff;
    color: #fff;
    border: 1px solid #007bff;
}

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

.secondary-button {
    background-color: #6c757d;
    color: #fff;
    border: 1px solid #6c757d;
}

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

/* Header Styles */
.main-header {
    background-color: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

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

.main-header .logo img {
    height: 40px;
}

.main-nav .nav-list {
    display: flex;
    gap: 25px;
    align-items: center;
}

.main-nav .nav-link {
    color: #333;
    font-weight: 500;
    padding: 5px 0;
    position: relative;
}

.main-nav .nav-link:hover {
    color: #007bff;
    text-decoration: none;
}

.main-nav .nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 0;
    height: 2px;
    background-color: #007bff;
    transition: width 0.3s ease;
}

.main-nav .nav-link:hover::after {
    width: 100%;
}

.main-nav .menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
}

.main-nav .menu-toggle .icon-bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 5px 0;
    transition: all 0.3s ease;
}

.language-switcher select {
    border: 1px solid #ccc;
    padding: 8px 10px;
    border-radius: 5px;
    background-color: #f9f9f9;
    cursor: pointer;
}

/* Footer Styles */
.main-footer {
    background-color: #212529;
    color: #e9ecef;
    padding: 40px 0 20px;
    font-size: 0.9rem;
}

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

.main-footer .footer-col h3 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.main-footer .footer-col ul {
    list-style: none;
}

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

.main-footer .footer-col a {
    color: #adb5bd;
    transition: color 0.3s ease;
}

.main-footer .footer-col a:hover {
    color: #007bff;
    text-decoration: underline;
}

.main-footer .footer-logo {
    height: 35px;
    margin-bottom: 15px;
}

.main-footer .company-info p {
    margin-bottom: 15px;
}

.main-footer .social-links a {
    color: #e9ecef;
    font-size: 1.2rem;
    margin-right: 15px;
}

.main-footer .social-links a:hover {
    color: #007bff;
}

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

.main-footer .contact-info i {
    margin-right: 10px;
    color: #adb5bd;
}

.main-footer .footer-bottom {
    border-top: 1px solid #343a40;
    padding-top: 20px;
    text-align: center;
    color: #adb5bd;
}

.main-footer .beian-info a {
    color: #adb5bd;
}

/* Utility Classes */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: background-color 0.3s ease, transform 0.3s ease;
    display: none; /* Hidden by default */
    z-index: 999;
}

.back-to-top:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 992px) {
    .main-nav .nav-list {
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .main-header .container {
        flex-wrap: wrap;
    }

    .main-nav {
        width: 100%;
        order: 3; /* Push nav below logo and toggle */
    }

    .main-nav .menu-toggle {
        display: block;
        margin-left: auto;
    }

    .main-nav .nav-list {
        flex-direction: column;
        width: 100%;
        display: none;
        padding-top: 15px;
        border-top: 1px solid #eee;
        margin-top: 15px;
    }

    .main-nav .nav-list.active {
        display: flex;
    }

    .main-nav .nav-item {
        width: 100%;
        text-align: center;
    }

    .main-nav .nav-link {
        display: block;
        padding: 10px 0;
    }

    .main-nav .nav-link::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .language-switcher {
        margin-top: 10px;
    }

    .main-footer .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .main-footer .company-info, .main-footer .quick-links, .main-footer .legal-links, .main-footer .contact-info {
        margin-bottom: 20px;
    }

    .main-footer .social-links {
        justify-content: center;
        display: flex;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    .main-header .logo img {
        height: 35px;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
