/* Basic CSS Reset & Global Styles */
html {
    box-sizing: border-box;
    font-size: 16px;
    line-height: 1.5;
    scroll-behavior: smooth;
}
*, *::before, *::after {
    box-sizing: inherit;
}
body {
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif;
    color: #333;
    background-color: #f8f8f8;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease, text-decoration 0.3s ease;
}
a:hover, a:focus {
    color: #0056b3;
    text-decoration: underline;
}
p {
    margin-bottom: 1em;
}
h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 0.5em;
    font-weight: bold;
    line-height: 1.2;
}
h1 { font-size: 2.5em; }
h2 { font-size: 2em; }
h3 { font-size: 1.75em; }
h4 { font-size: 1.5em; }
h5 { font-size: 1.25em; }
h6 { font-size: 1em; }

/* Container for responsive layouts */
.container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}

/* Buttons */
.btn {
    display: inline-block;
    font-weight: 400;
    color: #fff;
    text-align: center;
    vertical-align: middle;
    user-select: none;
    background-color: #007bff;
    border: 1px solid #007bff;
    padding: 0.625rem 1.25rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    cursor: pointer;
}
.btn:hover {
    color: #fff;
    background-color: #0056b3;
    border-color: #004085;
}
.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}
.btn-primary:hover {
    background-color: #0056b3;
    border-color: #004085;
}
.btn-secondary {
    color: #333;
    background-color: #e2e6ea;
    border-color: #dae0e5;
}
.btn-secondary:hover {
    color: #333;
    background-color: #d3d9df;
    border-color: #c6cdd3;
}
.btn-subscribe {
    background-color: #28a745;
    border-color: #28a745;
}
.btn-subscribe:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
textarea {
    display: block;
    width: 100%;
    padding: 0.625rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
input:focus, textarea:focus {
    outline: 0;
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Header Specific Styles (placeholders) */
.site-header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 10px 0;
}
.header-top-bar {
    background-color: #f2f2f2;
    padding: 5px 0;
    font-size: 0.9em;
    border-bottom: 1px solid #eee;
}
.header-top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.top-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
}
.top-nav li {
    display: inline-block;
    margin-right: 15px;
}
.top-nav a {
    color: #666;
    text-decoration: none;
}
.top-nav a:hover {
    color: #007bff;
}
.social-media a {
    color: #666;
    margin-left: 10px;
}
.social-media a:hover {
    color: #007bff;
}
.header-main-area .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    padding-bottom: 15px;
}
.site-branding .site-logo img {
    display: block;
    max-height: 40px;
}
.main-navigation ul {
    margin: 0;
    padding: 0;
    list-style: none;
}
.main-navigation > ul > li {
    display: inline-block;
    position: relative;
    margin-left: 25px;
}
.main-navigation a {
    display: block;
    padding: 10px 0;
    color: #333;
    font-weight: 500;
}
.main-navigation a:hover {
    color: #007bff;
}
.main-navigation .sub-menu {
    display: none;
    position: absolute;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    min-width: 200px;
    z-index: 99;
    list-style: none;
    padding: 10px 0;
    margin: 0;
    border-radius: 4px;
}
.main-navigation li:hover > .sub-menu {
    display: block;
}
.main-navigation .sub-menu li {
    display: block;
}
.main-navigation .sub-menu a {
    padding: 8px 20px;
    white-space: nowrap;
}
.menu-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}
.search-form {
    display: flex;
    border: 1px solid #ccc;
    border-radius: 20px;
    overflow: hidden;
}
.search-field {
    border: none;
    padding: 8px 15px;
    width: 180px;
    background: transparent;
}
.search-field:focus {
    box-shadow: none;
}
.search-submit {
    background-color: #007bff;
    border: none;
    color: #fff;
    padding: 8px 15px;
    cursor: pointer;
    border-radius: 0 20px 20px 0;
}
.search-submit:hover {
    background-color: #0056b3;
}
.user-auth .btn {
    margin-left: 10px;
}

/* Footer Specific Styles (placeholders) */
.site-footer {
    background-color: #222;
    color: #eee;
    padding: 40px 0;
    font-size: 0.9em;
}
.footer-widgets .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding-bottom: 30px;
    border-bottom: 1px solid #444;
    margin-bottom: 30px;
}
.footer-column {
    flex: 1;
    min-width: 250px;
    margin-bottom: 20px;
    padding-right: 20px;
}
.footer-column:last-child {
    padding-right: 0;
}
.footer-column h3 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 1.2em;
}
.footer-column p, .footer-column address {
    color: #bbb;
}
.footer-column ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.footer-column ul li {
    margin-bottom: 8px;
}
.footer-column a {
    color: #bbb;
    text-decoration: none;
}
.footer-column a:hover {
    color: #007bff;
    text-decoration: underline;
}
.newsletter-form {
    display: flex;
    margin-top: 15px;
}
.newsletter-form input[type="email"] {
    flex-grow: 1;
    border-radius: 4px 0 0 4px;
    border: 1px solid #555;
    background-color: #333;
    color: #fff;
    padding: 10px;
}
.newsletter-form button {
    border-radius: 0 4px 4px 0;
    padding: 10px 15px;
    border: none;
    cursor: pointer;
}
.social-media-footer {
    margin-top: 20px;
}
.social-media-footer a {
    display: inline-block;
    background-color: #555;
    color: #fff;
    width: 35px;
    height: 35px;
    line-height: 35px;
    text-align: center;
    border-radius: 50%;
    margin-right: 10px;
    transition: background-color 0.3s ease;
}
.social-media-footer a:hover {
    background-color: #007bff;
}
.footer-bottom-bar {
    text-align: center;
}
.footer-bottom-bar .copyright,
.footer-bottom-bar .developed-by {
    color: #888;
    margin-bottom: 5px;
}
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    word-wrap: normal !important;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .main-navigation {
        order: 3; /* Move navigation below logo on smaller screens */
        flex-basis: 100%;
    }
    .main-navigation .nav-menu {
        display: none; /* Hide desktop menu */
        flex-direction: column;
        width: 100%;
        background-color: #fff;
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        z-index: 90;
    }
    .main-navigation.active .nav-menu {
        display: flex; /* Show menu when active */
    }
    .main-navigation > ul > li {
        display: block;
        margin: 0;
        border-bottom: 1px solid #eee;
    }
    .main-navigation .sub-menu {
        position: static;
        box-shadow: none;
        background-color: #f9f9f9;
        border-left: 3px solid #007bff;
        padding-left: 20px;
    }
    .main-navigation li:hover > .sub-menu {
        display: block; /* Keep sub-menu visible on hover, or use JS toggle */
    }
    .menu-toggle {
        display: block; /* Show hamburger icon */
    }
    .header-main-area .container {
        flex-wrap: wrap;
    }
    .site-branding, .header-actions {
        flex-basis: auto;
    }
    .site-branding {
        flex-grow: 1;
    }
    .header-actions {
        order: 2;
    }
    .footer-widgets .container {
        flex-direction: column;
    }
    .footer-column {
        min-width: unset;
        width: 100%;
        padding-right: 0;
        text-align: center;
    }
    .footer-column ul {
        text-align: center;
        padding-left: 0;
    }
    .newsletter-form {
        justify-content: center;
    }
    .social-media-footer {
        text-align: center;
    }
}
@media (max-width: 768px) {
    .header-top-bar {
        display: none; /* Hide top bar on very small screens */
    }
    .header-actions {
        flex-direction: column;
        gap: 10px;
    }
    .search-box, .user-auth {
        width: 100%;
        text-align: center;
    }
    .search-form {
        width: 100%;
        justify-content: center;
    }
    .search-field {
        width: calc(100% - 70px); /* Adjust for button width */
    }
    .user-auth .btn {
        margin: 0 5px;
    }
}
/* Font Awesome icons (placeholder for usage, not actual FA library) */
.fab::before, .fas::before {
    font-family: "Font Awesome 5 Brands", "Font Awesome 5 Free"; /* Placeholder */
    font-weight: 900;
    content: " "; /* Placeholder content */
}
.fab.fa-facebook-f::before { content: "\f39e"; }
.fab.fa-twitter::before { content: "\f099"; }
.fab.fa-instagram::before { content: "\f16d"; }
.fab.fa-linkedin-in::before { content: "\f0e1"; }
.fab.fa-youtube::before { content: "\f167"; }
.fas.fa-search::before { content: "\f002"; }
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
