/* 
 * 南京润丰建站 - 门窗框简约风样式
 * 深灰 + 纯白 + 原木色配色方案
 */

/* ========== CSS Reset & 基础设置 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.8;
    color: #3a3a3a;
    background-color: #f9f8f6;
    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;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

/* ========== 色彩变量 ========== */
:root {
    --deep-gray: #2c2c2c;
    --medium-gray: #5a5a5a;
    --light-gray: #8c8c8c;
    --pure-white: #ffffff;
    --off-white: #f9f8f6;
    --wood-light: #d4b896;
    --wood-medium: #b8956b;
    --wood-dark: #8b6f47;
    --gradient-start: #2c2c2c;
    --gradient-end: #5a5a5a;
}

/* ========== 顶部导航栏 ========== */
.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(44, 44, 44, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
    padding: 15px 0;
}

.header-inner {
    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: 24px;
    font-weight: 700;
    color: var(--pure-white);
    letter-spacing: 2px;
}

.nav-menu {
    display: flex;
    gap: 40px;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    color: var(--pure-white);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 1px;
    padding: 8px 0;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--wood-light), var(--wood-medium));
    transition: width 0.3s ease;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.nav-menu a:hover {
    color: var(--wood-light);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--pure-white);
    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, var(--gradient-start), var(--gradient-end));
    color: var(--pure-white);
    padding: 80px 0 40px;
    margin-top: 100px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 60px;
    margin-bottom: 60px;
}

.footer-section h4 {
    font-size: 18px;
    margin-bottom: 25px;
    color: var(--wood-light);
    position: relative;
    padding-bottom: 12px;
}

.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--wood-medium);
}

.footer-section p,
.footer-section li {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.8;
}

.footer-section a:hover {
    color: var(--wood-light);
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 30px;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

/* ========== 通用动画 ========== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========== 响应式设计 ========== */
@media (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--deep-gray);
        flex-direction: column;
        padding: 100px 40px;
        gap: 25px;
        transition: right 0.4s ease;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .container {
        padding: 0 20px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* ========== 按钮样式 ========== */
.btn {
    display: inline-block;
    padding: 14px 35px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 1px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--wood-medium), var(--wood-dark));
    color: var(--pure-white);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--wood-dark), var(--wood-medium));
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(184, 149, 107, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--pure-white);
    border: 2px solid var(--pure-white);
}

.btn-outline:hover {
    background: var(--pure-white);
    color: var(--deep-gray);
}

/* ========== 卡片样式 ========== */
.card {
    background: var(--pure-white);
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.card-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.card-content {
    padding: 25px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--deep-gray);
}

.card-desc {
    font-size: 14px;
    color: var(--light-gray);
    line-height: 1.7;
    margin-bottom: 15px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--medium-gray);
}

/* ========== 页面标题区域 ========== */
.page-header {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    padding: 180px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/bg-pattern.png') repeat;
    opacity: 0.05;
}

.page-header h1 {
    font-size: 48px;
    color: var(--pure-white);
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.page-header p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* ========== 内容区块 ========== */
.section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 36px;
    color: var(--deep-gray);
    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: 3px;
    background: linear-gradient(90deg, var(--wood-light), var(--wood-medium));
}

.section-title p {
    font-size: 16px;
    color: var(--medium-gray);
    max-width: 600px;
    margin: 20px auto 0;
}

/* ========== 网格布局 ========== */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 35px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

@media (max-width: 992px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .page-header h1 {
        font-size: 32px;
    }
    
    .section-title h2 {
        font-size: 28px;
    }
}
