/* 
 * 尧图企业网站定制 - 全局样式
 * 风格：书店简约风 | 配色：墨黑 + 米黄 + 浅灰
 * 布局：折线错位排版，线条串联
 */

:root {
    --ink-black: #1a1a1a;
    --beige: #f5f0e6;
    --light-gray: #e8e8e8;
    --gray-text: #666666;
    --white: #ffffff;
    --accent: #c9a962;
    --line-color: #d4c4a8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    background-color: var(--beige);
    color: var(--ink-black);
    line-height: 1.8;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

/* ========== 顶部导航 ========== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: transparent;
    transition: all 0.4s ease;
    border-bottom: 1px solid rgba(212, 196, 168, 0.3);
}

.header.scrolled {
    background: rgba(245, 240, 230, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    max-width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--ink-black);
}

.nav-menu {
    display: flex;
    gap: 8px;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    display: block;
    padding: 12px 12px;
    font-size: 15px;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.nav-menu a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-menu a:hover::before,
.nav-menu a.active::before {
    width: 80%;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--accent);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
}

.hamburger span {
    width: 25px;
    height: 2px;
    background: var(--ink-black);
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ========== 页脚 ========== */
.footer {
    background: var(--ink-black);
    color: var(--beige);
    padding: 60px 40px 30px;
    margin-top: 100px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.footer-section h4 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--accent);
    letter-spacing: 1px;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section ul li a {
    color: var(--light-gray);
    font-size: 14px;
}

.footer-section ul li a:hover {
    color: var(--accent);
    padding-left: 8px;
}

.footer-section p {
    font-size: 14px;
    color: var(--light-gray);
    line-height: 2;
}

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.footer-bottom {
    border-top: 1px solid rgba(212, 196, 168, 0.3);
    margin-top: 40px;
    padding-top: 30px;
    text-align: center;
    font-size: 14px;
    color: var(--gray-text);
}

/* ========== 通用组件 ========== */
.section-title {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.section-title h2 {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: 4px;
    margin-bottom: 15px;
}

.section-title p {
    color: var(--gray-text);
    font-size: 16px;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--accent);
    margin: 20px auto 0;
}

.btn {
    display: inline-block;
    padding: 14px 35px;
    background: var(--ink-black);
    color: var(--beige);
    font-size: 15px;
    letter-spacing: 2px;
    border: 2px solid var(--ink-black);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover {
    background: transparent;
    color: var(--ink-black);
}

.btn-outline {
    background: transparent;
    color: var(--ink-black);
}

.btn-outline:hover {
    background: var(--ink-black);
    color: var(--beige);
}

/* ========== 动画效果 ========== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========== 响应式 ========== */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .section-title h2 {
        font-size: 30px;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--beige);
        flex-direction: column;
        padding: 40px;
        transition: all 0.4s ease;
        gap: 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu a {
        padding: 20px;
        border-bottom: 1px solid var(--line-color);
    }
    
    .container {
        padding: 0 20px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .header-inner {
        padding: 15px 20px;
    }
}
