/* General Styles & Resets */
:root {
    --primary-color: #005aab;
    --secondary-color: #e8491d;
    --text-color: #333;
    --light-gray: #f4f4f4;
    --dark-gray: #555;
    --border-color: #ddd;
}

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

body {
    font-family: 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
}

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

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

a:hover {
    color: var(--secondary-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    color: var(--primary-color);
    font-weight: 600;
}

.section-title p {
    font-size: 1rem;
    color: var(--dark-gray);
    max-width: 800px;
    margin: 0 auto;
}

/* Top Bar */
.top-bar {
    background-color: #f8f8f8;
    padding: 8px 0;
    font-size: 0.9rem;
    color: var(--dark-gray);
    border-bottom: 1px solid var(--border-color);
}

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

.top-bar a {
    color: var(--primary-color);
    font-weight: bold;
}

/* Header */
.header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-main .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
}

.logo-area {
    display: flex;
    align-items: center;
}

.logo-area img {
    height: 60px;
    margin-right: 20px;
}

.slogan h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin: 0;
}

.slogan h4 {
    color: var(--dark-gray);
    font-size: 0.9rem;
    margin: 0;
    font-weight: normal;
}

.header-contact p {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--secondary-color);
}
.header-contact a {
    color: var(--secondary-color);
}
.header-contact .contact-text {
    color: var(--dark-gray);
    font-weight: normal;
    font-size: 1rem;
}

.header-contact .wechat-tip {
    font-size: 0.8rem;
    color: var(--dark-gray);
    font-weight: normal;
}

/* Main Navigation */
.main-nav {
    background-color: var(--primary-color);
}

.main-nav ul {
    list-style: none;
    display: flex;
    justify-content: flex-start;
}

.main-nav li a {
    display: block;
    color: #fff;
    padding: 15px 25px;
    font-size: 1.1rem;
    transition: background-color 0.3s ease;
}

.main-nav li a:hover, .main-nav li a.active {
    background-color: var(--secondary-color);
}

.mobile-nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border-color);
    color: var(--primary-color);
    font-size: 1.5rem;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 4px;
}

/* Banner Slider */
.banner-slider {
    position: relative;
    width: 100%;
    height: 450px;
    overflow: hidden;
}

.banner-slider .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.banner-slider .slide.active {
    opacity: 1;
}

.banner-slider img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
}

.slider-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    margin: 0 5px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.slider-dots .dot.active {
    background-color: var(--secondary-color);
    border-color: #fff;
}

/* Products Section */
.products-section {
    padding: 60px 0;
}

.products-section .container {
    display: flex;
    gap: 30px;
}

.sidebar {
    flex: 0 0 250px;
    border: 1px solid var(--border-color);
    padding: 20px;
    background-color: #f9f9f9;
}

.sidebar h3 {
    background-color: var(--primary-color);
    color: #fff;
    padding: 12px;
    margin: -20px -20px 20px -20px;
    font-size: 1.2rem;
}

.sidebar ul {
    list-style: none;
}

.sidebar ul li a {
    display: block;
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.sidebar ul li a:hover {
    background-color: var(--secondary-color);
    color: #fff;
    padding-left: 20px;
}

.product-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.product-item {
    border: 1px solid var(--border-color);
    text-align: center;
    transition: box-shadow 0.3s ease;
}

.product-item:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.product-item .product-image {
    position: relative;
    overflow: hidden;
}
.product-item .product-image img {
    transition: transform 0.3s ease;
}
.product-item:hover .product-image img {
    transform: scale(1.1);
}

.product-icon {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 90, 171, 0.7);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-item:hover .product-icon {
    opacity: 1;
}

.product-item h4 {
    padding: 15px;
    margin: 0;
    font-weight: 600;
}

/* About Section */
.about-section {
    padding: 60px 0;
    background-color: var(--light-gray);
}

.about-content {
    display: flex;
    gap: 40px;
    align-items: center;
}

.about-image {
    flex: 1;
}
.about-image img {
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.about-text {
    flex: 1.2;
}
.about-text p {
    margin-bottom: 15px;
}

/* Services Section */
.services-section {
    padding: 60px 0;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.service-item {
    text-align: center;
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.service-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.service-item img {
    height: 80px;
    width: auto;
    margin: 0 auto 15px;
}
.service-item h4 {
    font-size: 1.2rem;
    color: var(--primary-color);
}

/* News Section */
.news-section {
    padding: 60px 0;
    background-color: var(--light-gray);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.news-item {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.news-image-wrapper {
    position: relative;
    height: 200px;
}
.news-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-date {
    position: absolute;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    color: #fff;
    padding: 8px 12px;
    text-align: center;
}
.news-date span {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
}
.news-content {
    padding: 20px;
}
.news-content h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.news-content p {
    font-size: 0.9rem;
    color: var(--dark-gray);
}

/* Footer */
.footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 2fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer a {
    color: #bdc3c7;
}
.footer a:hover {
    color: #fff;
}

.footer-logo {
    height: 50px;
    margin-bottom: 15px;
}
.footer-about p {
    font-size: 0.9rem;
    color: #bdc3c7;
}

.footer-contact h4, .footer-qr h4 {
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 20px;
}
.footer-contact p {
    margin-bottom: 10px;
    font-size: 0.95rem;
}
.footer-contact p i {
    margin-right: 10px;
    color: var(--secondary-color);
}
.footer-qr {
    text-align: center;
}
.footer-qr img {
    max-width: 150px;
    margin: 0 auto 10px;
    border: 3px solid #fff;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: #95a5a6;
}
.footer-bottom p { margin: 5px 0; }

/* Fixed Navigation */
.fixed-nav {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1001;
}

.fixed-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: #fff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-bottom: 10px;
    cursor: pointer;
    transition: background-color 0.3s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.fixed-nav-item:hover {
    background-color: var(--secondary-color);
    color: #fff;
}

.fixed-nav-item i {
    font-size: 1.5rem;
}
.fixed-nav-item span {
    font-size: 0.7rem;
    margin-top: 2px;
}

.go-top-btn {
    display: none; /* Initially hidden */
}

/* Responsive Styles */
@media (max-width: 992px) {
    .header-contact, .slogan { display: none; }
    .logo-area img { height: 50px; }
    .main-nav { display: none; }
    .mobile-nav-toggle { display: block; }
    
    .main-nav.active {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--primary-color);
    }
    .main-nav ul { flex-direction: column; }
    .main-nav li a { text-align: center; border-bottom: 1px solid #4a90e2; }

    .products-section .container { flex-direction: column; }
    .sidebar { flex: 0 0 auto; width: 100%; }
    .product-grid { grid-template-columns: repeat(2, 1fr); }
    .service-grid, .news-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-content { grid-template-columns: 1fr; text-align: center; }
    .footer-about, .footer-contact { text-align: center; }
    .footer-contact p { justify-content: center; }
    .footer-qr img { margin: 0 auto 10px; }
}

@media (max-width: 768px) {
    .about-content { flex-direction: column; }
}

@media (max-width: 576px) {
    .top-bar { font-size: 0.8rem; }
    .top-bar .container { flex-direction: column; gap: 5px; }
    .product-grid, .service-grid, .news-grid { grid-template-columns: 1fr; }
    .section-title h2 { font-size: 1.8rem; }
    .banner-slider { height: 300px; }
}