/* ========================================
   四维网建站 - 全局样式表
   风格：手套温暖风（米杏 + 浅棕 + 奶白）
   布局：线条点阵装饰布局，科技简约兼具
   ======================================== */

/* CSS Reset & 基础设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    background-color: #FDFBF7; /* 奶白色背景 */
    color: #5D4E37; /* 浅棕色文字 */
    line-height: 1.8;
    overflow-x: hidden;
    position: relative;
}

/* 背景点阵装饰 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(189, 159, 114, 0.08) 1px, transparent 1px),
        radial-gradient(circle at 80% 70%, rgba(189, 159, 114, 0.08) 1px, transparent 1px),
        radial-gradient(circle at 40% 80%, rgba(189, 159, 114, 0.06) 1px, transparent 1px),
        radial-gradient(circle at 60% 20%, rgba(189, 159, 114, 0.06) 1px, transparent 1px);
    background-size: 80px 80px, 100px 100px, 60px 60px, 90px 90px;
    pointer-events: none;
    z-index: -1;
}

/* 线条装饰元素 */
body::after {
    content: '';
    position: fixed;
    top: 15%;
    right: 5%;
    width: 200px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #BD9F72, transparent);
    transform: rotate(45deg);
    pointer-events: none;
    z-index: -1;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 容器 */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* ========================================
   顶部导航栏
   ======================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(253, 251, 247, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(189, 159, 114, 0.2);
    transition: all 0.4s ease;
}

.header.scrolled {
    background: rgba(253, 251, 247, 0.98);
    box-shadow: 0 2px 20px rgba(93, 78, 55, 0.1);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    height: 45px;
    width: auto;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: #8B7355;
    letter-spacing: 2px;
}

.nav-menu {
    display: flex;
    gap: 8px;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    padding: 10px 18px;
    font-size: 0.95rem;
    color: #5D4E37;
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #BD9F72;
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #8B7355;
    background: rgba(189, 159, 114, 0.1);
}

.nav-link:hover::before,
.nav-link.active::before {
    width: 80%;
}

/* 汉堡菜单 */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
}

.hamburger span {
    width: 25px;
    height: 2px;
    background: #5D4E37;
    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);
}

/* 移动端菜单 */
@media (max-width: 992px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: #FDFBF7;
        flex-direction: column;
        padding: 30px;
        gap: 15px;
        transition: left 0.4s ease;
        overflow-y: auto;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-link {
        padding: 15px 20px;
        font-size: 1.1rem;
        text-align: center;
    }
}

/* ========================================
   通用区块样式
   ======================================== */
.section {
    padding: 80px 0;
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.section-title h2 {
    font-size: 2.5rem;
    color: #8B7355;
    margin-bottom: 15px;
    display: inline-block;
    position: relative;
    padding: 0 30px;
}

.section-title h2::before,
.section-title h2::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #BD9F72);
}

.section-title h2::before {
    right: 100%;
}

.section-title h2::after {
    left: 100%;
}

.section-title p {
    color: #A89070;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ========================================
   按钮样式
   ======================================== */
.btn {
    display: inline-block;
    padding: 14px 35px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background: linear-gradient(135deg, #BD9F72 0%, #A89070 100%);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(189, 159, 114, 0.4);
}

.btn-outline {
    background: transparent;
    border-color: #BD9F72;
    color: #BD9F72;
}

.btn-outline:hover {
    background: #BD9F72;
    color: #fff;
}

/* ========================================
   卡片样式
   ======================================== */
.card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(93, 78, 55, 0.08);
    transition: all 0.4s ease;
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #BD9F72, #A89070);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(93, 78, 55, 0.15);
}

.card:hover::before {
    transform: scaleX(1);
}

.card-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.card-body {
    padding: 25px;
}

.card-title {
    font-size: 1.3rem;
    color: #8B7355;
    margin-bottom: 12px;
}

.card-text {
    color: #A89070;
    font-size: 0.95rem;
    line-height: 1.7;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(189, 159, 114, 0.2);
    font-size: 0.85rem;
    color: #C4B59A;
}

/* ========================================
   页脚样式
   ======================================== */
.footer {
    background: linear-gradient(135deg, #F5EFE6 0%, #EBE5DC 100%);
    padding: 60px 0 30px;
    position: relative;
    border-top: 2px solid rgba(189, 159, 114, 0.3);
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 30% 60%, rgba(189, 159, 114, 0.05) 1px, transparent 1px),
        radial-gradient(circle at 70% 40%, rgba(189, 159, 114, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}

.footer-inner {
    position: relative;
    z-index: 1;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    margin-bottom: 20px;
}

.footer-logo img {
    height: 50px;
    margin-bottom: 15px;
}

.footer-logo h3 {
    color: #8B7355;
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.footer-desc {
    color: #A89070;
    line-height: 1.8;
}

.footer-title {
    color: #8B7355;
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: #BD9F72;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #A89070;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: #8B7355;
    padding-left: 8px;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
    color: #A89070;
}

.footer-contact i {
    color: #BD9F72;
    margin-top: 3px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(189, 159, 114, 0.2);
    color: #C4B59A;
    font-size: 0.9rem;
}

/* ========================================
   动画效果
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeInUp 0.8s ease forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* 滚动渐入动画类 */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.scroll-animate.show {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   响应式适配
   ======================================== */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    .section {
        padding: 50px 0;
    }

    .section-title h2 {
        font-size: 1.8rem;
    }

    .container {
        padding: 0 15px;
    }
}

@media (max-width: 576px) {
    .section-title h2::before,
    .section-title h2::after {
        display: none;
    }

    .btn {
        padding: 12px 25px;
        font-size: 0.9rem;
    }
}
