/* index.css - Custom Styles for Demei Chemical Technology Co., Ltd. */

/* ------------------ Reset & Base ------------------ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

a {
    text-decoration: none;
    color: #2c3e50;
    transition: color 0.3s;
}

a:hover {
    color: #e74c3c;
}

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

.text-center {
    text-align: center;
}

.btn-more {
    display: block;
    width: fit-content; /* 或 inline-block + text-align */
    margin: 0 auto;
    text-align: center;
    margin-top: 15px;
    padding: 8px 20px;
    background-color: #e74c3c;
    color: white;
    border-radius: 4px;
    font-weight: bold;
}

.btn-more:hover {
    background-color: #c0392b;
    color: white;
}

/* ------------------ Top Header ------------------ */
.top-header {
    background-color: #2c3e50;
    color: #ecf0f1;
    font-size: 14px;
    padding: 8px 0;
}

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

.welcome-text {
    font-weight: bold;
}

.contact-info span {
    margin-right: 15px;
}

.language-switcher {
    display: flex;
    align-items: center;
}

.language-switcher a {
    color: #bdc3c7;
    margin: 0 4px;
}

.language-switcher a.active,
.language-switcher a:hover {
    color: #f1c40f;
}

/* ------------------ Main Navigation ------------------ */
.main-nav {
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1000;
}

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

.logo a {
    font-size: 24px;
    font-weight: bold;
    color: #e74c3c;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links > li {
    position: relative;
    margin-left: 25px;
}

.nav-links > li > a {
    font-weight: 600;
    font-size: 16px;
    color: #2c3e50;
    padding: 5px 0;
    display: block;
}

.nav-links > li > a:hover {
    color: #e74c3c;
}

/* Dropdown Menu */
.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 220px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    padding: 10px 0;
    display: none;
    z-index: 1001;
    border-radius: 4px;
}

.nav-links > li:hover .dropdown {
    display: block;
}

.dropdown li {
    list-style: none;
}

.dropdown li a {
    display: block;
    padding: 8px 20px;
    color: #34495e;
    font-size: 14px;
}

.dropdown li a:hover {
    background-color: #f8f9fa;
    color: #e74c3c;
}

/* ------------------ Hero Banner ------------------ */
.hero-banner {
    background: linear-gradient(135deg, #2c3e50 0%, #1a1a2e 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.hero-banner h1 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero-banner p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.9;
}

/* ------------------ Section Common ------------------ */
section {
    padding: 60px 0;
}

section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
    color: #2c3e50;
    position: relative;
}

section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: #e74c3c;
    margin: 10px auto;
}

/* ------------------ About Us ------------------ */
.about-us {
    background-color: white;
}

.about-us p {
    margin-bottom: 15px;
    font-size: 16px;
    color: #555;
}

/* ------------------ Hot Products ------------------ */
.hot-products {
    background-color: #f5f7fa;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
}

.product-item {
    background: white;
    padding: 20px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.product-item a {
    font-weight: 600;
    font-size: 16px;
    color: #2c3e50;
    display: block;
    margin-bottom: 8px;
}

.product-item p {
    color: #7f8c8d;
    font-size: 14px;
}

/* ------------------ Contact Us ------------------ */
.contact-us {
    background-color: white;
}

.contact-details p {
    margin-bottom: 10px;
    font-size: 16px;
}

.map-link {
    color: #e74c3c;
    font-weight: bold;
}

/* ------------------ Footer ------------------ */
.site-footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 40px 0 20px;
    font-size: 14px;
}

.footer-links {
    text-align: center;
    margin-bottom: 20px;
}

.footer-links a {
    color: #bdc3c7;
    margin: 0 10px;
}

.footer-links a:hover {
    color: #f1c40f;
}

.copyright {
    text-align: center;
    margin-bottom: 15px;
    line-height: 1.6;
}

.copyright a {
    color: #f1c40f;
}

.social-links {
    text-align: center;
}

.social-links a {
    display: inline-block;
    margin: 0 8px;
    font-size: 20px;
    color: #ecf0f1;
}

/* ------------------ Responsive ------------------ */
@media (max-width: 992px) {
    .hero-banner h1 {
        font-size: 2.2rem;
    }

    .nav-links {
        display: none; /* For simplicity; in real site you'd use mobile menu */
    }

    .top-header .container {
        flex-direction: column;
        align-items: flex-start;
    }

    .contact-info {
        margin-top: 8px;
        display: flex;
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .hero-banner {
        padding: 50px 0;
    }

    .hero-banner h1 {
        font-size: 1.8rem;
    }

    .hero-banner p {
        font-size: 1rem;
    }

    section {
        padding: 40px 0;
    }

    section h2 {
        font-size: 1.6rem;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}