/* 佑贝本草 - 全局样式 - 基于参考文件优化 */
:root {
    --primary: #7CB342;
    --primary-dark: #558B2F;
    --primary-light: #AED581;
    --primary-pale: #F1F8E9;
    --primary-soft: #DCEDC8;
    --accent: #FF6B35;
    --text-dark: #1A1A1A;
    --text-gray: #666666;
    --text-light: #999999;
    --bg-white: #FFFFFF;
    --bg-gray: #F8F9FA;
    --footer-bg: linear-gradient(135deg, #558B2F 0%, #7CB342 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Microsoft YaHei Light', '微软雅黑 Light', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-weight: 300;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-white);
    overflow-x: hidden;
}

/* 字体优化 */
.font-ultra-light { font-weight: 100; }
.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-bold { font-weight: 700; }

/* 滚动条 */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--primary-pale); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

/* ========== 动画关键帧 ========== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

@keyframes floatRotate {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(2deg); }
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(124, 179, 66, 0.3); }
    50% { box-shadow: 0 0 40px rgba(124, 179, 66, 0.6); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes scaleIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

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

/* ========== 动画类 ========== */
.animate-fade-in-up { animation: fadeInUp 0.8s ease-out forwards; }
.animate-fade-in-down { animation: fadeInDown 0.8s ease-out forwards; }
.animate-fade-in-left { animation: fadeInLeft 0.8s ease-out forwards; }
.animate-fade-in-right { animation: fadeInRight 0.8s ease-out forwards; }
.animate-float { animation: float 3s ease-in-out infinite; }
.animate-float-rotate { animation: floatRotate 4s ease-in-out infinite; }
.animate-pulse-glow { animation: pulse-glow 2s ease-in-out infinite; }
.animate-shimmer { 
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}
.animate-rotate { animation: rotate 20s linear infinite; }
.animate-bounce { animation: bounce 2s ease-in-out infinite; }
.animate-scale-in { animation: scaleIn 0.5s ease-out forwards; }

/* 延迟动画 */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }
.delay-700 { animation-delay: 0.7s; }
.delay-800 { animation-delay: 0.8s; }

/* 初始隐藏动画元素 */
[data-animate] { opacity: 0; }
[data-animate].animated { opacity: 1; }

/* ========== 导航栏样式 ========== */
.nav-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 15px 30px;
    transition: all 0.4s ease;
}

.nav-container.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    padding: 10px 30px;
}

.nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.nav-logo:hover {
    transform: scale(1.05);
}

.nav-logo img {
    height: 45px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.nav-logo-text {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--primary-dark);
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    position: relative;
    padding: 10px 20px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 400;
    border-radius: 25px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::before,
.nav-link.active::before {
    width: 60%;
}

.nav-link:hover {
    color: var(--primary);
    background: rgba(124, 179, 66, 0.1);
}

.nav-link.active {
    color: var(--primary);
    font-weight: 500;
}

.nav-cta {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white !important;
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(124, 179, 66, 0.3);
    transition: all 0.3s ease;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(124, 179, 66, 0.4);
}

.nav-cta::before {
    display: none;
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    color: var(--primary-dark);
    transition: transform 0.3s ease;
}

.mobile-menu-btn:hover {
    transform: rotate(90deg);
}

/* 移动端菜单 */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 350px;
    height: 100vh;
    background: white;
    box-shadow: -10px 0 40px rgba(0,0,0,0.1);
    z-index: 1001;
    padding: 100px 30px 30px;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

.mobile-nav-link {
    display: block;
    padding: 18px 0;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 400;
    border-bottom: 1px solid rgba(124, 179, 66, 0.1);
    transition: all 0.3s ease;
    position: relative;
    padding-left: 20px;
}

.mobile-nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 0;
    background: var(--primary);
    border-radius: 2px;
    transition: height 0.3s ease;
}

.mobile-nav-link:hover::before,
.mobile-nav-link.active::before {
    height: 60%;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--primary);
    padding-left: 30px;
}

.mobile-nav-cta {
    margin-top: 30px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 16px;
    border-radius: 30px;
    text-align: center;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(124, 179, 66, 0.3);
}

/* ========== 页脚样式 ========== */
.footer {
    background: linear-gradient(180deg, #ffffff 0%, #7CB342 30%, #558B2F 100%);
    color: white;
    padding: 80px 20px 30px;
    position: relative;
    overflow: hidden;
}

.footer::before {
    display: none;
}

.footer-wave {
    display: none;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 50px;
    position: relative;
    z-index: 1;
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.footer-logo img {
    height: 50px;
    filter: brightness(0) invert(1);
}

.footer-logo-text {
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: 2px;
}

.footer-desc {
    font-size: 0.95rem;
    line-height: 1.8;
    opacity: 0.9;
    margin-bottom: 25px;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social-link {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.footer-social-link:hover {
    background: white;
    color: var(--primary);
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.footer-title {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: rgba(255,255,255,0.5);
    border-radius: 2px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
    padding-left: 0;
}

.footer-links a::before {
    content: '→';
    position: absolute;
    left: -20px;
    opacity: 0;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: white;
    padding-left: 20px;
}

.footer-links a:hover::before {
    opacity: 1;
    left: 0;
}

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
    font-size: 0.95rem;
    color: rgba(255,255,255,0.85);
}

.footer-contact-item i {
    margin-top: 3px;
    flex-shrink: 0;
}

.footer-bottom {
    max-width: 1200px;
    margin: 60px auto 0;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    position: relative;
    z-index: 1;
}

.footer-copyright {
    font-size: 0.9rem;
    opacity: 0.8;
}

.footer-legal {
    display: flex;
    gap: 30px;
}

.footer-legal a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-legal a:hover {
    color: white;
}

/* ========== 通用按钮样式 ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    outline: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(124, 179, 66, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(124, 179, 66, 0.4);
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::after {
    left: 100%;
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

.btn-white {
    background: white;
    color: var(--primary-dark);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.btn-white:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* ========== 卡片样式 ========== */
.card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(124, 179, 66, 0.15);
}

.card-image {
    overflow: hidden;
    position: relative;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card:hover .card-image img {
    transform: scale(1.1);
}

.card-content {
    padding: 25px;
}

/* ========== 图片样式 ========== */
.img-rounded {
    border-radius: 20px;
}

.img-circle {
    border-radius: 50%;
}

.img-shadow {
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.img-hover-zoom {
    overflow: hidden;
}

.img-hover-zoom img {
    transition: transform 0.5s ease;
}

.img-hover-zoom:hover img {
    transform: scale(1.1);
}

/* ========== 文字渐变效果 ========== */
.text-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-animated {
    background: linear-gradient(90deg, var(--primary), var(--primary-light), var(--primary));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s linear infinite;
}

/* ========== 徽章样式 ========== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: white;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--primary);
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.badge-icon {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

/* ========== 分隔线 ========== */
.divider {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 2px;
    margin: 20px 0;
}

.divider-center {
    margin-left: auto;
    margin-right: auto;
}

/* ========== 浮动元素 ========== */
.floating-element {
    position: absolute;
    pointer-events: none;
}

.floating-dot {
    width: 10px;
    height: 10px;
    background: var(--primary-light);
    border-radius: 50%;
    opacity: 0.5;
}

.floating-ring {
    width: 50px;
    height: 50px;
    border: 2px solid var(--primary-light);
    border-radius: 50%;
    opacity: 0.3;
}

/* ========== 响应式设计 ========== */
@media (max-width: 1024px) {
    .footer-container {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .mobile-menu {
        display: block;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .footer-brand {
        max-width: 100%;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .footer-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-legal {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 12px 20px;
    }
    
    .nav-logo img {
        height: 38px;
    }
    
    .nav-logo-text {
        font-size: 1.2rem;
    }
    
    .footer {
        padding: 60px 20px 20px;
    }
}

/* ========== 滚动显示动画 ========== */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.scroll-reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.scroll-reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

.scroll-reveal-scale {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal-scale.revealed {
    opacity: 1;
    transform: scale(1);
}

/* ========== 二维码弹窗样式 ========== */
.qr-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.qr-modal.active {
    display: flex;
}

.qr-modal-content {
    background: white;
    border-radius: 24px;
    padding: 40px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    position: relative;
    animation: scaleIn 0.3s ease-out;
}

.qr-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--primary-pale);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    transition: all 0.3s ease;
}

.qr-modal-close:hover {
    background: var(--primary);
    color: white;
}

.qr-modal-content h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.qr-modal-content p {
    color: var(--text-gray);
    margin-bottom: 25px;
}

.qr-modal-image {
    width: 220px;
    height: 220px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(124, 179, 66, 0.2);
}

.qr-modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 移动端二维码弹窗适配 */
@media (max-width: 768px) {
    .qr-modal-content {
        max-width: 320px;
        padding: 30px 20px;
    }
    
    .qr-modal-image {
        width: 180px;
        height: 180px;
    }
}
