/* ========================================
   宏瑞峰数字建站有限公司 - 全局样式
   家装潮流风：亮黄 + 浅灰 + 原木色
   ======================================== */

/* CSS Reset & 基础设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #3d3d3d;
    background-color: #f5f5f0;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 颜色变量 */
:root {
    --primary-yellow: #f4c542;
    --light-gray: #e8e8e8;
    --wood-brown: #c4a574;
    --dark-wood: #8b6f47;
    --text-dark: #3d3d3d;
    --text-light: #666666;
    --white: #ffffff;
    --bg-cream: #faf9f6;
}

/* ========================================
   顶部导航栏
   ======================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: transparent;
    transition: all 0.4s ease;
    padding: 20px 0;
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: 1px;
}

.nav-menu {
    display: flex;
    gap: 35px;
}

.nav-link {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-dark);
    position: relative;
    padding: 8px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-yellow);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--primary-yellow);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 28px;
    height: 3px;
    background: var(--text-dark);
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ========================================
   页脚
   ======================================== */
.footer {
    background: linear-gradient(135deg, var(--dark-wood) 0%, var(--wood-brown) 100%);
    color: var(--white);
    padding: 60px 0 30px;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--primary-yellow);
    position: relative;
    padding-bottom: 10px;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--white);
}

.footer-section p,
.footer-section li {
    font-size: 0.95rem;
    line-height: 2;
    color: rgba(255, 255, 255, 0.9);
}

.footer-section ul li a:hover {
    color: var(--primary-yellow);
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 30px;
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

/* ========================================
   通用组件
   ======================================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary-yellow);
}

.section-title p {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 20px auto 0;
}

.btn {
    display: inline-block;
    padding: 14px 35px;
    background: var(--primary-yellow);
    color: var(--text-dark);
    font-weight: 600;
    border-radius: 30px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn:hover {
    background: transparent;
    border-color: var(--primary-yellow);
    transform: translateY(-3px);
}

.btn-outline {
    background: transparent;
    border-color: var(--white);
    color: var(--white);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--text-dark);
}

/* ========================================
   动画效果
   ======================================== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .header-container {
        padding: 0 25px;
    }
    
    .container {
        padding: 0 25px;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--white);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 40px;
        gap: 25px;
        transition: left 0.4s ease;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    .logo-text {
        font-size: 1.2rem;
    }
    
    .header-container {
        padding: 0 15px;
    }
    
    .container {
        padding: 0 15px;
    }
}
