/* Basic Reset and Global Styles */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --accent-color: #28a745;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --dark-bg: #343a40;
    --border-color: #dee2e6;
    --font-family-sans: '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;
}

body {
    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;
}

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

a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

ul {
    list-style: none;
}

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

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

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

.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;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: bold;
    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;
}

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

.btn-primary:hover {
    background-color: #0056b3; /* Darken primary color */
    border-color: #0056b3;
}

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

.btn-secondary:hover {
    background-color: #545b62; /* Darken secondary color */
    border-color: #545b62;
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="password"],
textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: var(--font-family-sans);
    font-size: 1rem;
}

input[type="submit"] {
    cursor: pointer;
}

/* Header Specific (minimal, as header_html has its own classes) */
.main-header {
    background-color: var(--dark-bg);
    color: #fff;
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.main-header .logo img {
    height: 40px;
    width: auto;
}
.main-header .top-nav ul, .main-header .primary-nav ul {
    display: flex;
    gap: 20px;
}
.main-header .top-nav a, .main-header .primary-nav a {
    color: #fff;
    padding: 5px 0;
    display: block;
}
.main-header .top-nav a:hover, .main-header .primary-nav a:hover {
    color: var(--primary-color);
}

/* Footer Specific (minimal, as footer_html has its own classes) */
.main-footer {
    background-color: var(--dark-bg);
    color: #bbb;
    padding: 40px 0 20px;
    font-size: 0.9rem;
}
.main-footer a {
    color: #fff;
}
.main-footer a:hover {
    color: var(--primary-color);
}
.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}
.footer-column h3 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 1.1rem;
}
.footer-column ul {
    padding: 0;
}
.footer-column ul li {
    margin-bottom: 8px;
}
.footer-column p {
    margin-bottom: 10px;
}
.social-media a {
    display: inline-block;
    margin-right: 10px;
    font-size: 1.2rem;
}
.footer-bottom-bar {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
}
.footer-bottom-bar .legal-links a {
    margin: 0 10px;
}
.footer-bottom-bar .legal-links span {
    color: #666;
}

/* Mobile Menu Specifics (example for shared JS toggle) */
.mobile-menu-toggle {
    display: none; /* Hidden by default on desktop */
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    .primary-nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--dark-bg);
        z-index: 1000;
        padding-bottom: 15px;
    }
    .primary-nav.active {
        display: flex;
    }
    .primary-nav ul {
        flex-direction: column;
        gap: 0;
    }
    .primary-nav ul li a {
        padding: 10px 15px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    .primary-nav ul li:last-child a {
        border-bottom: none;
    }
    .has-submenu .submenu {
        display: none;
        background-color: rgba(0,0,0,0.2);
        padding-left: 20px;
    }
    .has-submenu.submenu-open .submenu {
        display: block;
    }
    .main-header .top-nav {
        display: none; /* Hide top nav on mobile to simplify header */
    }
    .header-top-bar .container {
        justify-content: space-between;
    }
    .header-actions {
        display: none; /* Hide action buttons on mobile */
    }
}

/* Scroll to Top Button */
.scroll-to-top {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: background-color 0.3s ease, transform 0.3s ease;
    z-index: 999;
}

.scroll-to-top:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
