/* 
 * 上海农业品牌发展有限公司 - 全局样式
 * 家装潮流风：亮黄 + 浅灰 + 原木色
 */

:root {
    --primary-yellow: #FFD700;
    --secondary-yellow: #F4C430;
    --light-gray: #F5F5F5;
    --medium-gray: #E0E0E0;
    --dark-gray: #333333;
    --wood-light: #D2B48C;
    --wood-medium: #C19A6B;
    --wood-dark: #8B4513;
    --white: #FFFFFF;
    --text-primary: #2C2C2C;
    --text-secondary: #666666;
    --accent-green: #4CAF50;
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--light-gray);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-speed) ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    position: relative;
    color: var(--wood-dark);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-yellow), var(--wood-medium));
    border-radius: 2px;
}

/* 顶部导航栏 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: transparent;
    transition: background var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    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;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    height: 50px;
    width: auto;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--wood-dark);
}

.nav-menu {
    display: flex;
    gap: 35px;
}

.nav-link {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    position: relative;
    padding: 8px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-yellow);
    transition: width var(--transition-speed) ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--wood-medium);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--wood-dark);
    transition: all var(--transition-speed) 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(--wood-dark), var(--wood-medium));
    color: var(--white);
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--primary-yellow);
}

.footer-section p,
.footer-section li {
    font-size: 0.95rem;
    line-height: 2;
    color: rgba(255, 255, 255, 0.9);
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a:hover {
    color: var(--primary-yellow);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* 响应式 */
@media (max-width: 992px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--white);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 50px;
        gap: 30px;
        transition: left var(--transition-speed) ease;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 2rem;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-animate.show {
    opacity: 1;
    transform: translateY(0);
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-yellow), var(--secondary-yellow));
    color: var(--text-primary);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 215, 0, 0.4);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--primary-yellow);
    color: var(--primary-yellow);
}

.btn-secondary:hover {
    background: var(--primary-yellow);
    color: var(--text-primary);
}

/* 卡片样式 */
.card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all var(--transition-speed) ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.card-content {
    padding: 25px;
}

.card-title {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: var(--wood-dark);
}

.card-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* 时间轴布局 */
.timeline {
    position: relative;
    padding: 50px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-yellow), var(--wood-medium), var(--accent-green));
    border-radius: 2px;
}

.timeline-item {
    display: flex;
    justify-content: flex-end;
    padding-right: 50px;
    position: relative;
    margin-bottom: 60px;
    width: 50%;
}

.timeline-item:nth-child(even) {
    justify-content: flex-start;
    padding-right: 0;
    padding-left: 50px;
    margin-left: 50%;
}

.timeline-dot {
    position: absolute;
    right: -10px;
    top: 0;
    width: 24px;
    height: 24px;
    background: var(--primary-yellow);
    border: 4px solid var(--white);
    border-radius: 50%;
    box-shadow: 0 0 0 4px var(--light-gray);
}

.timeline-item:nth-child(even) .timeline-dot {
    right: auto;
    left: -10px;
}

.timeline-content {
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    max-width: 450px;
    position: relative;
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 20px;
    right: -10px;
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 10px solid var(--white);
}

.timeline-item:nth-child(even) .timeline-content::before {
    right: auto;
    left: -10px;
    border-left: none;
    border-right: 10px solid var(--white);
}

.timeline-title {
    font-size: 1.4rem;
    color: var(--wood-dark);
    margin-bottom: 15px;
}

.timeline-text {
    color: var(--text-secondary);
    line-height: 1.8;
}

@media (max-width: 768px) {
    .timeline::before {
        left: 20px;
    }

    .timeline-item,
    .timeline-item:nth-child(even) {
        width: 100%;
        margin-left: 0;
        padding-left: 50px;
        padding-right: 0;
        justify-content: flex-start;
    }

    .timeline-dot,
    .timeline-item:nth-child(even) .timeline-dot {
        right: auto;
        left: 8px;
    }

    .timeline-content,
    .timeline-item:nth-child(even) .timeline-content::before {
        max-width: 100%;
    }

    .timeline-content::before,
    .timeline-item:nth-child(even) .timeline-content::before {
        left: -10px;
        border-left: none;
        border-right: 10px solid var(--white);
    }
}
