/* shared.css - Global Styles for [Your Company Name] */

/* Basic Reset & Typography */
:root {
    --primary-color: #0056b3; /* Darker blue */
    --secondary-color: #6c757d; /* Gray */
    --accent-color: #28a745; /* Green */
    --text-color: #333;
    --light-text-color: #666;
    --background-color: #f8f9fa;
    --white-color: #fff;
    --border-color: #dee2e6;
    --font-family-base: 'Noto Sans SC', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --font-size-base: 16px;
    --line-height-base: 1.6;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--text-color);
    background-color: var(--background-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a:hover {
    color: #003f8c; /* Even darker blue */
    text-decoration: underline;
}

ul {
    list-style: none;
}

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

h1, h2, h3, h4, h5, h6 {
    margin-bottom: 0.5em;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-color);
}

p {
    margin-bottom: 1em;
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: var(--font-size-base);
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

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

.btn-primary:hover {
    background-color: #003f8c;
    border-color: #003f8c;
    color: var(--white-color);
    text-decoration: none;
}

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

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--white-color);
    text-decoration: none;
}

/* Header */
.main-header {
    background-color: var(--white-color);
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.main-header .logo img {
    height: 40px; /* Adjust as needed */
    width: auto;
}

.main-nav ul {
    display: flex;
    gap: 25px;
}

.main-nav ul li {
    position: relative;
}

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

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

/* Submenu */
.main-nav .submenu {
    display: none;
    position: absolute;
    background-color: var(--white-color);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    min-width: 180px;
    z-index: 100;
    padding: 10px 0;
    border-radius: 5px;
    top: calc(100% + 5px);
    left: 0;
    flex-direction: column; /* Ensure submenu items stack */
    gap: 0; /* Reset gap for submenu */
}

.main-nav ul li.hover > .submenu {
    display: flex;
}

.main-nav .submenu li a {
    padding: 8px 20px;
    white-space: nowrap;
    color: var(--text-color);
}

.main-nav .submenu li a:hover {
    background-color: var(--background-color);
    color: var(--primary-color);
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.menu-toggle {
    display: none; /* Hidden on desktop */
    width: 30px;
    height: 20px;
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1100;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-color);
    position: absolute;
    left: 0;
    transition: all 0.3s ease;
}

.menu-toggle span:nth-child(1) { top: 0; }
.menu-toggle span:nth-child(2) { top: 9px; }
.menu-toggle span:nth-child(3) { top: 18px; }

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg);
    top: 9px;
}
.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg);
    top: 9px;
}

/* Main Content Area */
main {
    padding: 40px 0;
    min-height: calc(100vh - 200px); /* Adjust based on header/footer height */
}

/* Footer */
.main-footer {
    background-color: #212529; /* Dark background */
    color: #e9ecef; /* Light text */
    padding: 50px 0 20px;
    font-size: 0.9em;
}

.main-footer h3 {
    color: var(--white-color);
    margin-bottom: 20px;
    font-size: 1.1em;
}

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

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

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

.footer-columns {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 30px;
}

.footer-col {
    flex: 1;
    min-width: 200px;
    margin-bottom: 30px;
    padding-right: 20px;
}

.footer-col:last-child {
    padding-right: 0;
}

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

.social-links {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}

.social-links a {
    font-size: 1.5em;
    color: #adb5bd;
    transition: color 0.3s ease;
}

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

.footer-bottom {
    border-top: 1px solid #343a40;
    padding-top: 20px;
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.footer-bottom .copyright,
.footer-bottom .beian {
    color: #adb5bd;
    margin: 0 10px;
}

/* Font Awesome (example for social icons) */
@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css");

/* Responsive Adjustments */
@media (max-width: 992px) {
    .main-nav {
        display: none; /* Hide on smaller screens by default */
        flex-direction: column;
        position: absolute;
        top: 70px; /* Adjust based on header height */
        left: 0;
        width: 100%;
        background-color: var(--white-color);
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        padding: 20px 0;
        z-index: 999;
    }

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

    .main-nav ul {
        flex-direction: column;
        gap: 0;
    }

    .main-nav ul li a {
        padding: 12px 20px;
        border-bottom: 1px solid var(--background-color);
    }

    .main-nav ul li:last-child a {
        border-bottom: none;
    }

    .main-nav .submenu {
        position: static;
        box-shadow: none;
        padding: 0;
        margin-left: 20px;
        border-radius: 0;
        background-color: var(--background-color);
        border-left: 2px solid var(--primary-color);
        margin-top: 5px;
        margin-bottom: 10px;
    }

    .main-nav ul li.hover > .submenu {
        display: none; /* Hide hover effect on mobile, use click/tap */
    }

    .main-nav ul li.active-mobile .submenu {
        display: flex; /* For mobile menu, might need JS to toggle this class */
    }

    .menu-toggle {
        display: block; /* Show hamburger icon */
    }

    .header-actions .btn {
        padding: 8px 15px;
        font-size: 0.9em;
    }

    .footer-columns {
        flex-direction: column;
    }

    .footer-col {
        min-width: unset;
        padding-right: 0;
        text-align: center;
    }

    .footer-col h3 {
        text-align: center;
    }

    .footer-col ul {
        padding: 0;
    }

    .footer-col ul li {
        display: inline-block;
        margin: 0 8px 8px 8px;
    }

    .footer-col.about-us p {
        text-align: left;
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }

    .social-links {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .main-header .logo img {
        height: 35px;
    }
    .header-actions {
        gap: 5px;
    }
    .header-actions .btn {
        display: none; /* Hide buttons on very small screens to save space for toggle */
    }
    .header-actions .btn.btn-primary {
        display: inline-block;
    }
    body.no-scroll {
        overflow: hidden;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
