/* =====================================================
   汇合家具网站样式文件
   如需修改样式，可在此文件调整
   ===================================================== */

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

:root {
    /* ------------------- 颜色配置 ------------------- */
    --primary: #1a1a1a;       /* 主色：深黑 */
    --secondary: #333333;     /* 辅助色：深灰 */
    --accent: #c9a96e;        /* 强调色：金色 */
    --accent-dark: #b8956a;  /* 强调色深色版 */
    --white: #ffffff;
    --light-bg: #f8f8f8;
    --text: #333333;
    --text-light: #666666;
    --border: #e0e0e0;

    /* ------------------- 阴影效果 ------------------- */
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 30px rgba(0,0,0,0.12);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Lato", "Noto Sans SC", sans-serif;
    color: var(--text);
    line-height: 1.6;
    background-color: var(--white);
}

h1, h2, h3, h4 {
    font-family: "Playfair Display", "Noto Sans SC", serif;
    font-weight: 600;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

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

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

/* ==================== 导航栏 ==================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(255,255,255,0.98);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo img {
    height: 50px;
}

.nav-logo span {
    font-family: "Playfair Display", serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 30px;
    list-style: none;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 0;
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
}

.nav-link:hover {
    color: var(--accent);
}

.nav-link::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid var(--text);
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.nav-item:hover .nav-link::after {
    transform: rotate(180deg);
}

/* 下拉菜单 */
.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--white);
    box-shadow: var(--shadow-hover);
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.nav-item:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu {
    list-style: none;
    padding: 10px 0;
}

.dropdown-item a {
    display: block;
    padding: 10px 20px;
    font-size: 14px;
    color: var(--text);
}

.dropdown-item a:hover {
    background: var(--light-bg);
    color: var(--accent);
}

/* 移动端菜单按钮 */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--text);
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ==================== 英雄区 ==================== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.5)), url('../images/hero-bg.jpg') center/cover no-repeat;
    color: var(--white);
    margin-top: 80px;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    padding: 0 20px;
}

.hero-title {
    font-size: 56px;
    font-weight: 700;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    font-size: 20px;
    font-weight: 300;
    margin-bottom: 40px;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-btn {
    display: inline-block;
    padding: 16px 40px;
    background: var(--accent);
    color: var(--white);
    font-size: 16px;
    font-weight: 600;
    border-radius: 4px;
    animation: fadeInUp 1s ease 0.4s both;
    transition: all 0.3s ease;
}

.hero-btn:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== 通用区块 ==================== */
section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 40px;
    color: var(--primary);
    margin-bottom: 15px;
}

.section-subtitle {
    font-size: 16px;
    color: var(--text-light);
}

/* ==================== 统计区域 ==================== */
.stats {
    background: var(--primary);
    color: var(--white);
    padding: 60px 0;
}

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

.stat-item {
    padding: 20px;
}

.stat-number {
    font-family: "Playfair Display", serif;
    font-size: 48px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 10px;
}

.stat-label {
    font-size: 16px;
    opacity: 0.9;
}

/* ==================== 关于我们 ==================== */
.about {
    background: var(--white);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-image {
    position: relative;
}

.about-image img {
    width: 100%;
    border-radius: 4px;
    box-shadow: var(--shadow-hover);
}

.about-image::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: 20px;
    bottom: 20px;
    border: 3px solid var(--accent);
    border-radius: 4px;
    z-index: -1;
}

.about-text h3 {
    font-size: 32px;
    margin-bottom: 20px;
    color: var(--primary);
}

.about-text p {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.8;
}

.about-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 30px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.feature-icon {
    width: 40px;
    height: 40px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
}

/* ==================== 产品中心 ==================== */
.products {
    background: var(--light-bg);
}

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

.product-card {
    background: var(--white);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.product-image {
    height: 250px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-info {
    padding: 25px;
}

.product-title {
    font-size: 22px;
    margin-bottom: 10px;
    color: var(--primary);
}

.product-desc {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 15px;
}

.product-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--accent);
    font-weight: 600;
    font-size: 14px;
}

.product-link:hover {
    gap: 10px;
}

/* ==================== 服务优势 ==================== */
.services {
    background: var(--white);
}

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

.service-card {
    text-align: center;
    padding: 40px 20px;
    border-radius: 4px;
    background: var(--white);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.service-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow);
}

.service-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: var(--light-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--accent);
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    background: var(--accent);
    color: var(--white);
}

.service-title {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--primary);
}

.service-desc {
    font-size: 14px;
    color: var(--text-light);
}

/* ==================== 工程案例 ==================== */
.projects {
    background: var(--light-bg);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 250px);
    gap: 20px;
}

.project-card {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
}

.project-card:nth-child(1) {
    grid-column: span 2;
}

.project-card:nth-child(4) {
    grid-column: span 2;
}

.project-image {
    width: 100%;
    height: 100%;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: var(--white);
    transform: translateY(100%);
    transition: all 0.3s ease;
}

.project-card:hover .project-overlay {
    transform: translateY(0);
}

.project-title {
    font-size: 20px;
    margin-bottom: 5px;
}

.project-category {
    font-size: 14px;
    opacity: 0.8;
}

/* ==================== 合作伙伴 ==================== */
.clients {
    background: var(--white);
    padding: 60px 0;
}

.clients-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 40px;
    align-items: center;
}

.client-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.3s ease;
}

.client-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
}

.client-logo img {
    max-width: 120px;
    height: auto;
}

/* ==================== 新闻动态 ==================== */
.news {
    background: var(--light-bg);
}

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

.news-card {
    background: var(--white);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.news-image {
    height: 200px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-content {
    padding: 25px;
}

.news-date {
    font-size: 13px;
    color: var(--accent);
    margin-bottom: 10px;
}

.news-title {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--primary);
    line-height: 1.4;
}

.news-excerpt {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
}

/* ==================== CTA区域 ==================== */
.cta {
    background: linear-gradient(rgba(26,26,26,0.9), rgba(26,26,26,0.9)), url('../images/cta-bg.jpg') center/cover no-repeat;
    color: var(--white);
    text-align: center;
    padding: 100px 0;
}

.cta-title {
    font-size: 42px;
    margin-bottom: 20px;
}

.cta-subtitle {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 30px;
}

.cta-btn {
    display: inline-block;
    padding: 18px 50px;
    background: var(--accent);
    color: var(--white);
    font-size: 16px;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.cta-btn:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
}

/* ==================== 页脚 ==================== */
.footer {
    background: var(--primary);
    color: var(--white);
    padding: 80px 0 30px;
}

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

.footer-brand {
    padding-right: 40px;
}

.footer-logo {
    font-family: "Playfair Display", serif;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--white);
}

.footer-desc {
    font-size: 14px;
    line-height: 1.8;
    opacity: 0.8;
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.footer-title {
    font-size: 18px;
    margin-bottom: 25px;
    color: var(--white);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    font-size: 14px;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--accent);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 30px;
    text-align: center;
    font-size: 14px;
    opacity: 0.7;
}

/* ==================== 响应式 ==================== */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .clients-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    .nav-menu.active {
        transform: translateX(0);
    }
    .menu-toggle {
        display: flex;
    }
    .hero-title {
        font-size: 36px;
    }
    .hero-subtitle {
        font-size: 16px;
    }
    .section-title {
        font-size: 32px;
    }
    .about-content {
        grid-template-columns: 1fr;
    }
    .about-image::before {
        display: none;
    }
    .products-grid,
    .news-grid {
        grid-template-columns: 1fr;
    }
    .services-grid {
        grid-template-columns: 1fr;
    }
    .projects-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    .project-card:nth-child(1),
    .project-card:nth-child(4) {
        grid-column: span 1;
    }
    .clients-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    section {
        padding: 50px 0;
    }
    .cta-title {
        font-size: 28px;
    }
}
