/* Basic Reset & Typography */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --accent-color: #28a745;
    --text-color: #333;
    --bg-light: #f8f9fa;
    --border-color: #dee2e6;
    --font-family-base: 'Arial', sans-serif;
    --header-height: 70px;
    --footer-height: auto;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-family-base);
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: 'Georgia', serif;
    margin-top: 0;
    margin-bottom: 0.5em;
    color: #222;
}

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

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

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

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

.branding .logo img {
    height: 40px;
    width: auto;
}

.branding .tagline {
    margin-left: 15px;
    font-style: italic;
    color: var(--secondary-color);
    font-size: 0.9em;
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.main-navigation li {
    position: relative;
    margin-left: 25px;
}

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

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

.main-navigation .sub-menu {
    display: none;
    position: absolute;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    min-width: 180px;
    z-index: 10;
    padding: 10px 0;
    border-radius: 4px;
    top: 100%; /* Position below parent */
    left: 0;
}

.main-navigation li:hover > .sub-menu {
    display: block;
}

.main-navigation .sub-menu li {
    margin: 0;
}

.main-navigation .sub-menu a {
    padding: 8px 20px;
    white-space: nowrap;
}

.menu-toggle {
    display: none; /* Hidden by default on desktop */
}

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

.search-form {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
}

.search-form input {
    border: none;
    padding: 8px 15px;
    outline: none;
    font-size: 0.9em;
}

.search-form button {
    background-color: var(--primary-color);
    border: none;
    color: #fff;
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-form button:hover {
    background-color: #0056b3;
}

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

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

.button-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    text-decoration: none;
}

.announcement-bar {
    background-color: #e9ecef;
    color: #495057;
    padding: 10px 0;
    text-align: center;
    font-size: 0.9em;
    border-bottom: 1px solid #dee2e6;
}

/* Footer Styles */
.site-footer {
    background-color: #212529;
    color: #f8f9fa;
    padding: 50px 0 20px;
    font-size: 0.9em;
}

.footer-container {
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

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

.footer-col h3 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 1.1em;
    position: relative;
}

.footer-col h3::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
    margin-top: 8px;
}

.footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

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

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

.footer-col ul li a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-col p {
    color: #adb5bd;
    margin-bottom: 15px;
}

.footer-logo img {
    margin-bottom: 20px;
}

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

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.1);
    color: #fff;
    transition: background-color 0.3s ease;
}

.social-links a:hover {
    background-color: var(--primary-color);
    text-decoration: none;
}

.contact-info p i {
    margin-right: 10px;
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    margin-top: 30px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    margin: 0;
    color: #adb5bd;
}

.footer-bottom .legal-links a {
    color: #adb5bd;
    margin: 0 10px;
}

.footer-bottom .legal-links .separator {
    color: #adb5bd;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .main-navigation ul {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: #fff;
        position: absolute;
        top: var(--header-height);
        left: 0;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        padding: 10px 0;
    }

    .main-navigation ul.active {
        display: flex;
    }

    .main-navigation li {
        margin: 0;
        border-bottom: 1px solid var(--border-color);
    }

    .main-navigation li:last-child {
        border-bottom: none;
    }

    .main-navigation a {
        padding: 12px 20px;
    }

    .main-navigation .sub-menu {
        position: static;
        box-shadow: none;
        border-radius: 0;
        padding-left: 20px;
        background-color: var(--bg-light);
    }

    .menu-toggle {
        display: block;
        background: none;
        border: none;
        font-size: 24px;
        cursor: pointer;
        padding: 0;
        color: var(--text-color);
        order: 1; /* Place before branding for mobile */
    }

    .menu-toggle .icon-bar {
        display: block;
        width: 25px;
        height: 3px;
        background-color: var(--text-color);
        margin: 5px 0;
        transition: all 0.3s ease;
    }

    .header-actions {
        order: 2; /* Place after branding for mobile */
        margin-left: auto;
    }

    .branding {
        order: 3; /* Place branding in center for mobile */
        flex-grow: 1;
        text-align: center;
    }

    .header-container {
        flex-wrap: nowrap;
    }
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-col h3::after {
        margin: 8px auto 0;
    }

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

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

    .footer-bottom {
        flex-direction: column;
        gap: 15px;
    }
}

/* Screen reader only text */
.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;
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
