/* 
 * 优益达建站 - 全局样式
 * 风格：软装复古配色（酒红 + 墨绿 + 米黄）
 * 布局：细线条轻奢点缀，几何线条装饰
 */

:root {
    --color-wine: #722F37;
    --color-wine-dark: #5a252b;
    --color-green: #2D5016;
    --color-green-dark: #1e380f;
    --color-cream: #F5E6D3;
    --color-cream-light: #fff9f0;
    --color-gold: #C9A959;
    --color-text: #2c2c2c;
    --color-text-light: #666;
    --color-white: #ffffff;
    --shadow-soft: 0 4px 20px rgba(114, 47, 55, 0.1);
    --shadow-medium: 0 8px 30px rgba(45, 80, 22, 0.15);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 8px;
}

* {
    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(--color-cream-light);
    color: var(--color-text);
    line-height: 1.8;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== 顶部导航栏 ========== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: transparent;
    transition: var(--transition-smooth);
}

.header.scrolled {
    background: rgba(114, 47, 55, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    transition: var(--transition-smooth);
}

.header.scrolled .header-inner {
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    height: 45px;
    width: auto;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-wine);
    letter-spacing: 2px;
}

.header.scrolled .logo-text {
    color: var(--color-cream);
}

.nav-menu {
    display: flex;
    gap: 40px;
}

.nav-link {
    font-size: 16px;
    font-weight: 500;
    color: var(--color-text);
    position: relative;
    padding: 8px 0;
}

.header.scrolled .nav-link {
    color: var(--color-cream);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--color-wine), var(--color-gold));
    transition: var(--transition-smooth);
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--color-wine);
    transition: var(--transition-smooth);
}

.header.scrolled .hamburger span {
    background: var(--color-cream);
}

/* ========== 页脚 ========== */
.footer {
    background: linear-gradient(135deg, var(--color-wine-dark) 0%, var(--color-green-dark) 100%);
    color: var(--color-cream);
    padding: 60px 0 30px;
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--color-gold);
    position: relative;
    padding-bottom: 10px;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--color-gold);
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--color-cream);
    opacity: 0.8;
}

.footer-links a:hover {
    opacity: 1;
    padding-left: 5px;
}

.contact-info li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    opacity: 0.8;
}

.footer-bottom {
    border-top: 1px solid rgba(245, 230, 211, 0.2);
    padding-top: 30px;
    text-align: center;
    opacity: 0.7;
    font-size: 14px;
}

/* ========== 通用动画 ========== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========== 按钮样式 ========== */
.btn {
    display: inline-block;
    padding: 14px 35px;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-wine) 0%, var(--color-wine-dark) 100%);
    color: var(--color-white);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(114, 47, 55, 0.3);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--color-wine);
    color: var(--color-wine);
}

.btn-secondary:hover {
    background: var(--color-wine);
    color: var(--color-white);
}

/* ========== 卡片样式 ========== */
.card {
    background: var(--color-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-smooth);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-medium);
}

.card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.card-content {
    padding: 25px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--color-wine);
}

.card-text {
    color: var(--color-text-light);
    font-size: 14px;
    line-height: 1.7;
}

/* ========== 响应式设计 ========== */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .nav-menu {
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--color-wine);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 30px;
        transition: var(--transition-smooth);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-link {
        color: var(--color-cream);
        font-size: 20px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 0 15px;
    }
}

/* ========== 几何装饰线条 ========== */
.geo-line {
    position: absolute;
    background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
    height: 1px;
    opacity: 0.3;
}

.geo-line-vertical {
    position: absolute;
    background: linear-gradient(180deg, transparent, var(--color-gold), transparent);
    width: 1px;
    opacity: 0.3;
}

/* ========== 页面过渡 ========== */
.page-transition {
    animation: pageFadeIn 0.5s ease-out;
}

@keyframes pageFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
