/* 
 * 建站者 - 北京网站建设网页设计开发公司
 * 全局样式文件
 * 家装复古风：浅灰 + 原木色 + 深棕
 */

/* CSS Reset & Base */
* {
    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: #f5f3ef;
    color: #4a3728;
    line-height: 1.75;
    font-size: 16px;
    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-wood: #c9a86c;
    --deep-brown: #4a3728;
    --light-gray: #f5f3ef;
    --medium-gray: #e8e4dc;
    --dark-gray: #8b7d6b;
    --accent-gold: #d4af37;
    --text-dark: #2c1e12;
    --text-light: #f5f3ef;
}

/* 顶部导航栏 */
.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(74, 55, 40, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 12px 0;
}

.header-inner {
    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 {
    height: 50px;
    width: auto;
}

.logo-text {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-light);
    letter-spacing: 2px;
}

.nav-menu {
    display: flex;
    gap: 35px;
}

.nav-menu li a {
    color: var(--text-light);
    font-size: 16px;
    font-weight: 500;
    padding: 8px 0;
    position: relative;
    letter-spacing: 1px;
}

.nav-menu li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-wood);
    transition: width 0.3s ease;
}

.nav-menu li a:hover::after,
.nav-menu li a.active::after {
    width: 100%;
}

.nav-menu li a:hover {
    color: var(--primary-wood);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 28px;
    height: 3px;
    background: var(--text-light);
    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);
}

/* 移动端菜单 */
@media (max-width: 992px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--deep-brown);
        flex-direction: column;
        padding: 80px 30px;
        gap: 25px;
        transition: right 0.4s ease;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.2);
    }

    .nav-menu.active {
        right: 0;
    }

    .hamburger {
        display: flex;
        z-index: 1001;
    }

    .header-inner {
        padding: 0 25px;
    }
}

/* 通用容器 */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

/* 悬浮卡片分层错位布局 */
.card-layer-layout {
    position: relative;
    padding: 120px 0 80px;
}

.card-stack {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    position: relative;
}

.card-item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(74, 55, 40, 0.12);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    z-index: 1;
}

.card-item:nth-child(odd) {
    transform: translateY(-20px);
}

.card-item:nth-child(even) {
    transform: translateY(20px);
}

.card-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 60px rgba(74, 55, 40, 0.2);
    z-index: 10;
}

.card-image {
    width: 100%;
    height: 240px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card-item:hover .card-image img {
    transform: scale(1.1);
}

.card-content {
    padding: 30px;
}

.card-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--deep-brown);
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.card-desc {
    font-size: 15px;
    color: var(--dark-gray);
    line-height: 1.8;
    margin-bottom: 20px;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-wood);
    font-weight: 600;
    font-size: 15px;
}

.card-link:hover {
    color: var(--deep-brown);
    gap: 12px;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 14px 35px;
    background: var(--primary-wood);
    color: var(--text-light);
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 1px;
}

.btn:hover {
    background: var(--deep-brown);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(74, 55, 40, 0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-wood);
    color: var(--primary-wood);
}

.btn-outline:hover {
    background: var(--primary-wood);
    color: var(--text-light);
}

/* 页脚 */
.footer {
    background: var(--deep-brown);
    color: var(--text-light);
    padding: 80px 0 40px;
    margin-top: 100px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 50px;
    margin-bottom: 50px;
}

.footer-section h4 {
    font-size: 20px;
    margin-bottom: 25px;
    color: var(--primary-wood);
    letter-spacing: 1px;
}

.footer-section p,
.footer-section li {
    font-size: 15px;
    line-height: 2;
    color: rgba(245, 243, 239, 0.8);
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section ul li a:hover {
    color: var(--primary-wood);
    padding-left: 8px;
}

.footer-bottom {
    border-top: 1px solid rgba(245, 243, 239, 0.15);
    padding-top: 30px;
    text-align: center;
    font-size: 14px;
    color: rgba(245, 243, 239, 0.6);
}

/* 滚动渐入动画 */
.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 页面过渡 */
.page-transition {
    animation: pageFadeIn 0.6s ease;
}

@keyframes pageFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .container {
        padding: 0 25px;
    }

    .card-stack {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .card-item:nth-child(odd),
    .card-item:nth-child(even) {
        transform: translateY(0);
    }

    .logo-text {
        font-size: 22px;
    }

    .footer-content {
        gap: 35px;
    }
}

/* 工具类 */
.text-center {
    text-align: center;
}

.section-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--deep-brown);
    text-align: center;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.section-subtitle {
    font-size: 18px;
    color: var(--dark-gray);
    text-align: center;
    margin-bottom: 60px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.mt-20 {
    margin-top: 20px;
}

.mb-40 {
    margin-bottom: 40px;
}

.py-60 {
    padding: 60px 0;
}
