/* Basic Resets & Global Styles */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --accent-color: #28a745;
    --text-color: #343a40;
    --light-bg: #f8f9fa;
    --dark-bg: #343a40;
    --white: #ffffff;
    --border-radius: 0.25rem;
    --font-family-sans: 'Arial', sans-serif;
    --font-family-serif: 'Georgia', serif;
}

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

body {
    font-family: var(--font-family-sans);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

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

ul {
    list-style: none;
}

/* Header Styles */
.main-header {
    background-color: var(--dark-bg);
    color: var(--white);
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: 20px;
}

.logo-link {
    display: flex;
    align-items: center;
    color: var(--white);
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
}

.logo-img {
    height: 40px; /* Adjust as needed */
    width: auto;
    margin-right: 10px;
}

.site-name {
    display: none; /* Hide on small screens, show on larger */
}

.tagline {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin-left: 15px;
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    padding-left: 15px;
}

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

.nav-link {
    color: var(--white);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

.nav-link.active,
.nav-link:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.nav-item.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    background-color: var(--dark-bg);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    min-width: 160px;
    z-index: 1;
    border-radius: var(--border-radius);
    padding: 0.5rem 0;
    top: 100%;
    left: 0;
}

.dropdown-item {
    color: var(--white);
    padding: 10px 15px;
    display: block;
    text-decoration: none;
    white-space: nowrap;
}

.dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--primary-color);
}

.nav-item.dropdown:hover .dropdown-menu {
    display: block;
}

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

.search-form {
    display: flex;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.search-input {
    border: none;
    padding: 8px 12px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    outline: none;
    width: 150px;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-button {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

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

.btn {
    display: inline-block;
    padding: 8px 15px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease, color 0.3s ease;
    white-space: nowrap;
}

.btn-login {
    background-color: transparent;
    color: var(--white);
    border: 1px solid var(--white);
}

.btn-login:hover {
    background-color: var(--white);
    color: var(--dark-bg);
}

.btn-signup {
    background-color: var(--accent-color);
    color: var(--white);
    border: 1px solid var(--accent-color);
}

.btn-signup:hover {
    background-color: #218838;
    border-color: #218838;
}

.menu-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.8rem;
    cursor: pointer;
    padding: 5px 10px;
}

.announcement-bar {
    background-color: #ffc107; /* A warning yellow */
    color: #333;
    text-align: center;
    padding: 0.5rem 0;
    font-size: 0.9rem;
}

.announcement-bar .promo-link {
    color: #007bff;
    font-weight: bold;
}

/* Footer Styles */
.main-footer {
    background-color: var(--dark-bg);
    color: rgba(255, 255, 255, 0.8);
    padding: 3rem 0 1rem;
    margin-top: 50px;
    font-size: 0.9rem;
}

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

.footer-heading {
    color: var(--white);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    position: relative;
}

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

.footer-section p {
    margin-bottom: 0.8rem;
}

.footer-list {
    padding: 0;
}

.footer-list li {
    margin-bottom: 0.5rem;
}

.footer-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

address p {
    margin-bottom: 0.5rem;
}

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

.social-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 35px;
    height: 35px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-radius: 50%;
    font-size: 1.1rem;
    transition: background-color 0.3s ease;
}

.social-icon:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.newsletter-form {
    display: flex;
    margin-top: 1rem;
}

.newsletter-input {
    flex-grow: 1;
    padding: 10px 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    outline: none;
}

.newsletter-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.btn-subscribe {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 10px 15px;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-subscribe:hover {
    background-color: #0056b3;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.copyright {
    margin: 0;
}

.legal-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.legal-links .separator {
    color: rgba(255, 255, 255, 0.5);
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .main-nav {
        display: none; /* Hide nav by default on smaller screens */
        width: 100%;
        order: 3; /* Push nav below logo/actions */
        margin-top: 1rem;
    }

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

    .main-nav .nav-list {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        background-color: rgba(0, 0, 0, 0.8);
        padding: 1rem 0;
        border-radius: var(--border-radius);
    }

    .nav-item.dropdown:hover .dropdown-menu {
        position: static; /* Make dropdown inline */
        box-shadow: none;
        background-color: rgba(0, 0, 0, 0.5);
        border-radius: 0;
        padding: 0;
        width: 100%;
    }

    .dropdown-item {
        padding-left: 30px; /* Indent dropdown items */
    }

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

    .header-actions {
        order: 2; /* Keep actions next to logo */
    }

    .logo-area {
        order: 1;
        width: auto;
    }

    .header-container {
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .search-form {
        flex-grow: 1;
        margin-top: 1rem;
    }

    .site-name {
        display: inline; /* Show site name on smaller screens if logo is small */
    }

    .tagline {
        display: none;
    }
}

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

    .footer-heading::after {
        margin-left: auto;
        margin-right: auto;
    }

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

    .newsletter-form {
        flex-direction: column;
        gap: 10px;
    }

    .newsletter-input, .btn-subscribe {
        border-radius: var(--border-radius);
        width: 100%;
    }
}

/* Additional utility classes for future use */
.text-center { text-align: center; }
.mt-3 { margin-top: 1rem; }
.mb-3 { margin-bottom: 1rem; }
.p-4 { padding: 1.5rem; }
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
