/* style.css - 预制猪大肠产品网站 */
/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 颜色定义 */
:root {
    --primary-color: #1a472a; /* 墨绿色 */
    --secondary-color: #c62828; /* 红色 - 公司logo色 */
    --light-color: #f1f8e9;
    --dark-color: #0d2818;
    --gray-color: #6c757d;
    --white-color: #ffffff;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: var(--dark-color);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

/* 顶部导航栏 */
.header {
    background-color: var(--white-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Logo图片样式 - 长方形比例 (300:120 ≈ 2.5:1) */
.logo-icon {
    height: 50px; /* 固定高度 */
    width: auto; /* 宽度自适应，保持图片原始比例 */
    display: block;
    background-color: white; /* Logo底色为白色 */
}

.logo-text {
    font-size: 16px;
    color: var(--primary-color);
    font-weight: 500;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-list a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    font-size: 16px;
    transition: color 0.3s;
    padding: 5px 0;
    position: relative;
}

.nav-list a:hover,
.nav-list a.active {
    color: var(--primary-color);
}

.nav-list a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

.mobile-menu-btn {
    display: none;
    font-size: 24px;
    color: var(--primary-color);
    cursor: pointer;
}

/* 主要区域 */
.main-content {
    padding-top: 20px;
}

/* 标语区域 */
.hero-section {
    background: linear-gradient(rgba(26, 71, 42, 0.85), rgba(13, 40, 24, 0.9));
    background-size: cover;
    background-position: center;
    color: white;
    padding: 100px 0;
    text-align: center;
    margin-bottom: 60px;
}

.hero-title {
    font-size: 2.8rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* 产品展示 */
.section-title {
    text-align: center;
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 700;
}

.section-subtitle {
    text-align: center;
    color: var(--gray-color);
    margin-bottom: 50px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    margin-bottom: 80px;
}

.product-card {
    background-color: var(--white-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-10px);
}

.product-img {
    position: relative;
    height: 550px;
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-label {
    position: absolute;
    top: 20px;
    right: 0;
    background-color: var(--secondary-color);
    color: white;
    padding: 8px 15px;
    font-weight: 500;
    border-radius: 4px 0 0 4px;
}

.product-content {
    padding: 25px;
}

.product-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.product-spec {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.spec-label {
    font-weight: 600;
    color: var(--dark-color);
}

.spec-value {
    color: var(--gray-color);
    margin-left: 5px;
}

.product-features h4,
.product-process h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.product-features ul {
    list-style-type: none;
    margin-bottom: 20px;
}

.product-features li {
    padding: 5px 0;
    color: var(--gray-color);
    position: relative;
    padding-left: 20px;
}

.product-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.product-process p {
    color: var(--gray-color);
    margin-bottom: 20px;
}

.product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    background-color: var(--light-color);
    color: var(--primary-color);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 14px;
}

/* 公司介绍 */
.about-section {
    background-color: var(--light-color);
    padding: 80px 0;
    margin-bottom: 60px;
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-text p {
    margin-bottom: 20px;
    color: var(--dark-color);
    font-size: 1.05rem;
    line-height: 1.8;
}

.about-image {
    display: flex;
    justify-content: center;
}

.about-logo {
    text-align: center;
}

/* Logo长方形容器样式 */
.logo-rectangle {
    width: 200px; /* 调整宽度以匹配300:120比例 */
    height: 80px; /* 高度按比例计算：200*(120/300)=80 */
    margin: 0 auto 15px;
    display: block;
    background-color: light; /* Logo底色为白色 */
    padding: 10px; /* 添加内边距使Logo不贴边 */
}

.logo-rectangle img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* 保持Logo完整显示，不拉伸 */
}

.logo-description {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 500;
}

/* 烹调指导 */
.cooking-section {
    padding: 80px 0;
    margin-bottom: 60px;
}

.cooking-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.cooking-card {
    background-color: var(--white-color);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.cooking-icon {
    width: 70px;
    height: 70px;
    background-color: var(--light-color);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 30px;
}

.cooking-card h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.4rem;
}

.cooking-steps,
.cooking-tips {
    text-align: left;
    list-style-position: inside;
    color: var(--gray-color);
}

.cooking-steps li,
.cooking-tips li {
    margin-bottom: 10px;
    padding-left: 10px;
}

/* 联系方式 */
.contact-section {
    padding: 80px 0;
    background-color: var(--light-color);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.contact-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.contact-details h4 {
    color: var(--primary-color);
    margin-bottom: 5px;
}

.contact-details p {
    color: var(--gray-color);
}

.contact-form {
    background-color: var(--white-color);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.contact-form h3 {
    color: var(--primary-color);
    margin-bottom: 25px;
    font-size: 1.5rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 16px;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* 页脚 */
.footer {
    background-color: var(--dark-color);
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo .logo-rectangle {
    width: 150px; /* 页脚Logo稍小 */
    height: 60px; /* 按比例计算：150*(120/300)=60 */
    margin-bottom: 15px;
}

.footer-logo .logo-description {
    color: white;
    opacity: 0.8;
    text-align: center; /* 添加这一行，让文字居中显示 */
    margin-top: 10px; /* 可选的，添加一些上边距让布局更美观 */
}

.footer-links h4,
.footer-social h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: white;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    font-size: 18px;
    transition: all 0.3s;
}

.social-icons a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.footer-bottom p {
    margin-bottom: 10px;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .hero-title {
        font-size: 2.2rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .nav-list {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--white-color);
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        gap: 15px;
    }
    
    .nav-list.active {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .cooking-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-icons {
        justify-content: center;
    }
    
    /* 移动端Logo调整 */
    .logo-icon {
        height: 40px;
    }
    
    .logo-rectangle {
        width: 160px;
        height: 64px; /* 160*(120/300)=64 */
    }
    
    .footer-logo .logo-rectangle {
        width: 120px;
        height: 48px; /* 120*(120/300)=48 */
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 70px 0;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .product-card {
        margin: 0 10px;
    }
    
    /* 小屏幕Logo调整 */
    .logo-icon {
        height: 35px;
    }
    
    .logo-rectangle {
        width: 120px;
        height: 48px;
    }
}