* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

html, body {
    height: 100%; /* Ensure the page takes up at least the full viewport height */
    margin: 0;
}

body {
    line-height: 1.6;
    color: #333;
    min-height: 100vh; /* Ensure body takes up at least the viewport height */
    position: relative; /* For positioning the footer */
    padding-bottom: 120px; /* Reserve space for footer and friendly-links */
}

header {
    background: whitesmoke;
    padding: 1rem;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 50px;
}

nav ul {
    list-style: none;
    display: flex;
}

nav ul li {
    margin: 0 1rem;
}

nav ul li a {
    color: black;
    text-decoration: none;
    padding: 0.5rem 1rem;
}

nav ul li a.active,
nav ul li a:hover {
    background: darkgray;
    border-radius: 5px;
}

main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.banner {
    position: relative;
    overflow: hidden;
    height: 400px;
}

.banner-slides {
    display: flex;
    animation: slide 12s infinite;
}

.banner-slide {
    position: relative;
    flex: 0 0 100%;
}

.banner-slide img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.banner-text {
    position: absolute;
    bottom: 20px;
    left: 20px;
    color: white;
    background: rgba(26, 37, 47, 0.7);
    padding: 1rem;
    border-radius: 5px;
}

@keyframes slide {
    0%, 33.33% { transform: translateX(0); }
    33.33%, 66.66% { transform: translateX(-100%); }
    66.66%, 100% { transform: translateX(-200%); }
}

.hero {
    text-align: center;
    padding: 3rem 0;
    background: #f7fafc;
}

.friendly-links {
    margin: 2rem 0;
    position: absolute;
    height: 200px;
    left: 0;
    right: 0;
    text-align: center;
}

.zhanwei{
    position: absolute;
    height: 300px;
}

.friendly-links h2 {
    margin-bottom: 1rem;
}

.friendly-links ul {
    list-style: none;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.friendly-links ul li a {
    color: #2b6cb0;
    text-decoration: none;
}

.friendly-links ul li a:hover {
    text-decoration: underline;
}

.float-contact {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    background: #fff;
    border: 1px solid #e2e8f0;
    padding: 1rem;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    z-index: 1000;
}

.float-contact h3 {
    color: #1a252f;
}

.float-contact p {
    margin: 0.5rem 0;
}

.float-contact img {
    margin-top: 0.5rem;
}

footer {
    text-align: center;
    padding: 1rem;
    background: #1a252f;
    color: white;
    width: 100%;
    position: fixed;
    bottom: 0;
    left: 0;
}

/* Article-specific styles */
.articles {
    margin-bottom: 2rem;
}

.articles h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: #333;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.article-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.article-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.article-card:hover {
    transform: translateY(-5px);
}

.article-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.article-card h2 {
    font-size: 1.5rem;
    margin: 1rem;
    color: #333;
}

.article-card .excerpt {
    margin: 0 1rem 1rem;
    color: #4a5568;
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card .date {
    margin: 0 1rem 1rem;
    color: #718096;
    font-size: 0.85rem;
}

.pagination {
    text-align: center;
    margin: 2rem 0;
}

.pagination .page-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0 0.5rem;
    background: darkgray;
    color: black;
    text-decoration: none;
    border-radius: 5px;
}

.pagination .page-link:hover {
    background: #a9a9a9;
}

.pagination span {
    margin: 0 1rem;
    color: #333;
}

/* Article detail styles */
.article-detail {
    margin-bottom: 2rem;
}

.article-detail h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #333;
}

.article-detail .date {
    color: #718096;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.article-detail .content {
    line-height: 1.8;
    color: #333;
}

.article-detail .content img {
    max-width: 100%;
    height: auto;
    margin: 1rem 0;
}

.article-detail .back-link {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.5rem 1rem;
    background: darkgray;
    color: black;
    text-decoration: none;
    border-radius: 5px;
}

.article-detail .back-link:hover {
    background: #a9a9a9;
}

/* Product-specific styles */
.products {
    margin-bottom: 2rem;
}

.products h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: #333;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.product-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-card h2 {
    font-size: 1.5rem;
    margin: 1rem;
    color: #333;
}

.product-card .description {
    margin: 0 1rem 1rem;
    color: #4a5568;
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card .date {
    margin: 0 1rem 1rem;
    color: #718096;
    font-size: 0.85rem;
}

/* Product detail styles */
.product-detail {
    margin-bottom: 2rem;
}

.product-detail h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #333;
}

.product-detail .product-image {
    width: 100%;
    max-width: 500px;
    height: auto;
    margin-bottom: 1.5rem;
    border-radius: 8px;
}

.product-detail .date {
    color: #718096;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.product-detail .description {
    line-height: 1.8;
    color: #333;
}

.product-detail .description img {
    max-width: 100%;
    height: auto;
    margin: 1rem 0;
}

.product-detail .back-link {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.5rem 1rem;
    background: darkgray;
    color: black;
    text-decoration: none;
    border-radius: 5px;
}

.product-detail .back-link:hover {
    background: #a9a9a9;
}