/* ========================================
   智库百科 - 全局样式表
   甜品复古风格：浅棕 + 浅粉 + 奶白
   ======================================== */

/* CSS Reset & 基础设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Georgia", "Times New Roman", serif;
    background-color: #FFF8F0;
    color: #5D4E37;
    line-height: 1.6;
    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;
}

/* ========================================
   顶部导航栏
   ======================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 248, 240, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(189, 154, 122, 0.15);
    transition: all 0.4s ease;
}

.header.scrolled {
    background: rgba(255, 240, 230, 0.98);
    box-shadow: 0 4px 30px rgba(189, 154, 122, 0.25);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: #C4A484;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #FFE4E1 0%, #FFDAB9 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #8B7355;
}

.nav-menu {
    display: flex;
    gap: 2.5rem;
}

.nav-link {
    font-size: 1rem;
    color: #5D4E37;
    position: relative;
    padding: 0.5rem 0;
    font-weight: 500;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #FFE4E1, #C4A484);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: #C4A484;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #C4A484;
    border-radius: 2px;
    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(7px, -6px);
}

/* ========================================
   页脚
   ======================================== */
.footer {
    background: linear-gradient(135deg, #F5E6D3 0%, #FFE4E1 100%);
    padding: 4rem 2rem 2rem;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}

.footer-section h3 {
    color: #8B7355;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, #C4A484, #FFE4E1);
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #5D4E37;
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: #C4A484;
    padding-left: 5px;
}

.contact-info p {
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 3rem;
    margin-top: 3rem;
    border-top: 1px solid rgba(189, 154, 122, 0.2);
    color: #8B7355;
    font-size: 0.9rem;
}

/* ========================================
   通用组件
   ======================================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    color: #8B7355;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '✦';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    color: #FFE4E1;
    font-size: 1.5rem;
}

.section-title p {
    color: #A09070;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.btn {
    display: inline-block;
    padding: 0.9rem 2rem;
    background: linear-gradient(135deg, #C4A484 0%, #D4B494 100%);
    color: #FFF8F0;
    border-radius: 30px;
    font-weight: 600;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(196, 164, 132, 0.3);
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(196, 164, 132, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid #C4A484;
    color: #C4A484;
}

.btn-outline:hover {
    background: #C4A484;
    color: #FFF8F0;
}

/* ========================================
   动画效果
   ======================================== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: #FFF8F0;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 3rem;
        gap: 2rem;
        transition: right 0.4s ease;
    }

    .nav-menu.active {
        right: 0;
    }

    .hamburger {
        display: flex;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 1rem;
    }

    .logo {
        font-size: 1.5rem;
    }

    .container {
        padding: 0 1rem;
    }
}
