/* style.css - 山东巴夫巴夫食品科技有限公司 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f8f9fa;
    color: #2d3436;
    line-height: 1.7;
    transition: background 0.3s, color 0.3s;
}

a {
    color: #1a73e8;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航 */
.header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: box-shadow 0.3s;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a3c5e;
}

.logo span {
    color: #e17055;
}

.nav {
    display: flex;
    gap: 20px;
}

.nav a {
    color: #2d3436;
    font-size: 0.95rem;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s, color 0.2s;
}

.nav a:hover {
    border-bottom-color: #e17055;
    text-decoration: none;
    color: #1a3c5e;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #1a3c5e;
}

@media (max-width: 768px) {
    .nav {
        display: none;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        padding: 20px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    }

    .nav.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }
}

/* 面包屑 */
.breadcrumb {
    background: #fff;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    font-size: 0.85rem;
}

.breadcrumb a {
    color: #636e72;
}

.breadcrumb span {
    color: #2d3436;
}

/* 首屏Banner */
.banner {
    position: relative;
    overflow: hidden;
    height: 500px;
    background: linear-gradient(135deg, #1a3c5e 0%, #2c5f7a 50%, #e17055 100%);
    background-size: 200% 200%;
    animation: gradientShift 10s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.banner-slide {
    display: none;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    padding: 0 20px;
    animation: fadeIn 0.8s ease;
}

.banner-slide.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.banner h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.banner p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.9;
}

.banner .btn {
    display: inline-block;
    margin-top: 30px;
    padding: 12px 36px;
    background: #e17055;
    color: #fff;
    border-radius: 50px;
    font-weight: 600;
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
}

.banner .btn:hover {
    background: #d35400;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(225, 112, 85, 0.4);
    text-decoration: none;
}

.banner-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.banner-controls button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}

.banner-controls button.active {
    background: #fff;
    transform: scale(1.2);
}

/* 通用section */
.section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: #1a3c5e;
    margin-bottom: 40px;
}

.section-title span {
    color: #e17055;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

@media (max-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

@media (max-width: 768px) {
    .grid-3 {
        grid-template-columns: 1fr;
    }
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 768px) {
    .grid-4 {
        grid-template-columns: 1fr 1fr;
    }
}

.card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.card h3 {
    color: #1a3c5e;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.card h4 {
    color: #636e72;
    font-weight: 600;
    margin-bottom: 10px;
}

.card p {
    color: #636e72;
    font-size: 0.95rem;
}

.icon-svg {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
    transition: transform 0.3s;
}

.card:hover .icon-svg {
    transform: scale(1.1);
}

/* FAQ */
.faq-item {
    border-bottom: 1px solid #e9ecef;
    padding: 18px 0;
    cursor: pointer;
}

.faq-question {
    font-weight: 600;
    font-size: 1.05rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #1a3c5e;
}

.faq-question::after {
    content: "+";
    font-size: 1.5rem;
    color: #e17055;
    transition: transform 0.3s;
}

.faq-item.open .faq-question::after {
    content: "−";
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding-top 0.4s ease;
    padding-top: 0;
    color: #636e72;
}

.faq-item.open .faq-answer {
    max-height: 500px;
    padding-top: 15px;
}

/* HowTo */
.howto-step {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-left: 4px solid #e17055;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 0 12px 12px 0;
    transition: transform 0.3s, box-shadow 0.3s;
}

.howto-step:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.howto-step h4 {
    color: #1a3c5e;
}

/* 文章列表 */
.article-item {
    padding: 20px 0;
    border-bottom: 1px solid #eee;
    transition: padding-left 0.3s;
}

.article-item:hover {
    padding-left: 10px;
}

.article-item h3 {
    font-size: 1.1rem;
    color: #1a3c5e;
}

.article-item .meta {
    font-size: 0.85rem;
    color: #b2bec3;
    margin: 5px 0;
}

.article-item p {
    color: #636e72;
}

.read-more {
    color: #e17055;
    font-weight: 600;
    transition: color 0.3s;
}

.read-more:hover {
    color: #d35400;
}

/* 客户评价 */
.testimonial {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 30px;
    border-radius: 12px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
}

.testimonial:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.testimonial p {
    font-style: italic;
}

.testimonial .author {
    margin-top: 15px;
    font-weight: 600;
    color: #1a3c5e;
}

/* 友情链接 */
.friend-links {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.friend-links a {
    color: #636e72;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.friend-links a:hover {
    color: #e17055;
}

/* 页脚 */
.footer {
    background: #1a3c5e;
    color: #dfe6e9;
    padding: 40px 0 20px;
}

.footer .grid-4 {
    color: #dfe6e9;
}

.footer h4 {
    color: #fff;
    margin-bottom: 15px;
}

.footer a {
    color: #b2bec3;
    transition: color 0.3s;
}

.footer a:hover {
    color: #e17055;
}

.footer .copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 30px;
    font-size: 0.9rem;
}

/* 数字动画 */
.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #e17055;
}

/* 返回顶部 */
.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background: #1a3c5e;
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    border: none;
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(26, 60, 94, 0.4);
}

/* 暗黑模式 */
.dark-mode-toggle {
    position: fixed;
    bottom: 100px;
    right: 40px;
    background: #2d3436;
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    font-size: 1.2rem;
    z-index: 999;
    transition: background 0.3s, transform 0.3s;
}

.dark-mode-toggle:hover {
    transform: scale(1.1);
}

body.dark {
    background: #1e272e;
    color: #dfe6e9;
}

body.dark .header {
    background: rgba(30, 39, 46, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

body.dark .header .nav a {
    color: #dfe6e9;
}

body.dark .header .logo {
    color: #dfe6e9;
}

body.dark .card,
body.dark .testimonial,
body.dark .howto-step,
body.dark .breadcrumb {
    background: rgba(45, 52, 54, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #dfe6e9;
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark .card h3,
body.dark .card h4,
body.dark .faq-question,
body.dark .section-title {
    color: #dfe6e9;
}

body.dark .footer {
    background: #0f1a2e;
}

body.dark .article-item {
    border-bottom-color: #2d3436;
}

body.dark .faq-item {
    border-bottom-color: #2d3436;
}

body.dark .breadcrumb a {
    color: #b2bec3;
}

body.dark .breadcrumb span {
    color: #dfe6e9;
}

body.dark .friend-links a {
    color: #b2bec3;
}

body.dark .friend-links a:hover {
    color: #e17055;
}

/* 搜索 */
.search-box {
    display: flex;
    gap: 10px;
    max-width: 500px;
    margin: 20px auto;
}

.search-box input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #dfe6e9;
    border-radius: 50px;
    outline: none;
    transition: border-color 0.3s;
}

.search-box input:focus {
    border-color: #e17055;
}

.search-box button {
    padding: 12px 24px;
    background: #e17055;
    color: #fff;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}

.search-box button:hover {
    background: #d35400;
    transform: translateY(-2px);
}

/* 图片懒加载占位 */
.lazy-placeholder {
    background: #eee;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b2bec3;
}

/* 滚动动画 */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 表单样式补充 */
textarea {
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s;
}

textarea:focus {
    border-color: #e17055 !important;
}

/* 响应式微调 */
@media (max-width: 480px) {
    .banner h1 {
        font-size: 1.8rem;
    }
    .banner p {
        font-size: 1rem;
    }
    .section-title {
        font-size: 1.5rem;
    }
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    .dark-mode-toggle {
        bottom: 70px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}