/* General Body Styling */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: #333;
    background-color: #f4f7f6;
}

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

/* Header Styling */
.main-header {
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-top-bar {
    background-color: #007bff;
    color: #ffffff;
    padding: 8px 0;
    font-size: 0.9em;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-links a {
    color: #ffffff;
    text-decoration: none;
    margin-left: 20px;
}

.top-bar-links a:hover {
    text-decoration: underline;
}

.header-main-nav {
    padding: 15px 0;
}

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

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
}

.logo {
    height: 40px;
    margin-right: 10px;
}

.site-name {
    font-size: 1.8em;
    font-weight: bold;
    color: #007bff;
}

.primary-navigation .nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.primary-navigation .nav-item {
    margin-left: 25px;
    position: relative;
}

.primary-navigation .nav-link {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    padding: 10px 0;
    display: block;
    transition: color 0.3s ease;
}

.primary-navigation .nav-link:hover,
.primary-navigation .nav-link.active {
    color: #007bff;
}

.primary-navigation .dropdown-menu {
    display: none;
    position: absolute;
    background-color: #ffffff;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    min-width: 160px;
    z-index: 1;
    border-top: 3px solid #007bff;
}

.primary-navigation .dropdown-item {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.primary-navigation .dropdown-item:hover {
    background-color: #f1f1f1;
    color: #007bff;
}

.primary-navigation .dropdown:hover .dropdown-menu {
    display: block;
}

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

.search-box {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    margin-right: 15px;
}

.search-input {
    border: none;
    padding: 8px 12px;
    outline: none;
}

.search-button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

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

.btn {
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease, color 0.3s ease;
    margin-left: 10px;
    white-space: nowrap;
}

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

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

.btn-secondary {
    background-color: #f8f9fa;
    color: #007bff;
    border: 1px solid #007bff;
}

.btn-secondary:hover {
    background-color: #e2e6ea;
    color: #0056b3;
    border-color: #0056b3;
}

/* Footer Styling */
.main-footer {
    background-color: #343a40;
    color: #f8f9fa;
    padding: 50px 0 20px;
    font-size: 0.9em;
}

.footer-container {
    display: flex;
    flex-direction: column;
}

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

.footer-heading {
    color: #ffffff;
    font-size: 1.2em;
    margin-bottom: 20px;
    position: relative;
}

.footer-heading::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background-color: #007bff;
    margin-top: 10px;
}

.footer-col p {
    margin-bottom: 10px;
    color: #ced4da;
}

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

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

.footer-col ul li a {
    color: #ced4da;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.social-links {
    margin-top: 20px;
}

.social-links a {
    color: #ced4da;
    font-size: 1.5em;
    margin-right: 15px;
    transition: color 0.3s ease;
}

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

.newsletter-form {
    display: flex;
    margin-top: 20px;
}

.newsletter-form input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #555;
    border-radius: 5px 0 0 5px;
    background-color: #495057;
    color: #f8f9fa;
    outline: none;
}

.newsletter-form input::placeholder {
    color: #adb5bd;
}

.btn-subscribe {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

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

.footer-bottom {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #495057;
    color: #adb5bd;
}

.heart-icon {
    color: #dc3545;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .primary-navigation .nav-list {
        display: none; /* Hide desktop nav */
        flex-direction: column;
        width: 100%;
        background-color: #ffffff;
        position: absolute;
        top: 100%;
        left: 0;
        box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    }

    .primary-navigation .nav-list.active {
        display: flex; /* Show mobile nav */
    }

    .primary-navigation .nav-item {
        margin: 0;
        border-bottom: 1px solid #eee;
    }

    .primary-navigation .nav-link {
        padding: 15px 20px;
    }

    .primary-navigation .dropdown-menu {
        position: static;
        box-shadow: none;
        border-top: none;
        background-color: #f8f9fa;
    }

    .primary-navigation .dropdown-item {
        padding-left: 40px;
    }

    .menu-toggle {
        display: block;
        background: none;
        border: none;
        font-size: 1.5em;
        cursor: pointer;
        color: #333;
        margin-left: auto; /* Push toggle to the right */
    }

    .header-actions {
        width: 100%;
        justify-content: center;
        margin-top: 15px;
    }

    .search-box {
        margin-right: 0;
        margin-bottom: 10px;
    }

    .btn {
        margin-left: 5px;
        margin-right: 5px;
    }
}

@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;
        display: flex;
    }

    .newsletter-form {
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Utility classes for screen readers */
.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;
  }
}
