/* 芽觅生态 - 全局样式 */

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --text-primary: #333;
    --text-secondary: #666;
    --text-muted: #999;
    --bg-light: #f5f7fa;
    --border-color: #e0e0e0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
}

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

/* ==================== 按钮样式 ==================== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

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

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

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

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

/* ==================== 卡片通用样式 ==================== */
.card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* ==================== 导航栏 ==================== */
.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

.logo-icon {
    font-size: 32px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 5px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* ==================== Hero Section ==================== */
.hero {
    position: relative;
    height: 600px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
}

.hero-title {
    font-size: 48px;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.95;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 48px;
    font-weight: bold;
}

.stat-unit {
    display: block;
    font-size: 16px;
    opacity: 0.9;
}

.stat-label {
    display: block;
    font-size: 14px;
    opacity: 0.8;
    margin-top: 5px;
}

.hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* ==================== 通用区块样式 ==================== */
section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 36px;
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
}

/* ==================== 数据看板 ==================== */
.dashboard-section {
    background: var(--bg-light);
    margin-top: -60px;
    position: relative;
    z-index: 3;
    padding-bottom: 60px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.dashboard-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.card-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.dashboard-card h3 {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.dashboard-value {
    margin-bottom: 15px;
}

.value-number {
    font-size: 36px;
    font-weight: bold;
    color: var(--primary-color);
}

.value-unit {
    font-size: 16px;
    color: var(--text-muted);
    margin-left: 5px;
}

.card-footer {
    display: flex;
    justify-content: center;
    gap: 15px;
    font-size: 14px;
}

.trend {
    font-weight: 600;
}

.trend.positive {
    color: var(--success-color);
}

.trend.negative {
    color: var(--danger-color);
}

.trend.stable {
    color: var(--text-muted);
}

.time {
    color: var(--text-muted);
}

/* ==================== 天气模块样式 ==================== */
.weather-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 60px 0;
}

.weather-section .section-title {
    color: white;
    -webkit-text-fill-color: white;
    background: none;
}

.weather-section .section-subtitle {
    color: rgba(255, 255, 255, 0.9);
}

#weather-widget-container {
    max-width: 500px;
    margin: 0 auto;
}

.weather-carousel {
    position: relative;
}

.weather-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.5s ease;
}

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

.weather-card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.region-name {
    font-size: 20px;
    font-weight: bold;
}

.update-time {
    font-size: 12px;
    opacity: 0.9;
}

.weather-card-body {
    padding: 30px;
}

.weather-icon-large {
    font-size: 80px;
    text-align: center;
    margin-bottom: 15px;
}

.weather-main {
    text-align: center;
    margin-bottom: 25px;
}

.temperature {
    display: block;
    font-size: 48px;
    font-weight: bold;
    color: var(--primary-color);
    line-height: 1;
}

.weather-text {
    display: block;
    font-size: 18px;
    color: var(--text-secondary);
    margin-top: 8px;
}

.weather-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
    padding: 15px;
    background: var(--bg-light);
    border-radius: 8px;
}

.detail-item {
    text-align: center;
}

.detail-label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.detail-value {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.harvest-suitability {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
}

.harvest-suitability.excellent {
    background: #d1fae5;
    color: #065f46;
}

.harvest-suitability.good {
    background: #dbeafe;
    color: #1e40af;
}

.harvest-suitability.moderate {
    background: #fef3c7;
    color: #92400e;
}

.harvest-suitability.poor {
    background: #fed7aa;
    color: #9a3412;
}

.harvest-suitability.bad {
    background: #fee2e2;
    color: #991b1b;
}

.suitability-icon {
    font-size: 20px;
}

/* 轮播控制点 */
.weather-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.weather-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.weather-dot:hover,
.weather-dot.active {
    background: white;
    transform: scale(1.2);
}

/* 天气错误状态 */
.weather-error {
    background: white;
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.error-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 15px;
}

.weather-error p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.weather-error button {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.weather-error button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

/* ==================== 产品区块 ==================== */
.products-section {
    background: white;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.product-image {
    height: 240px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-placeholder {
    font-size: 100px;
}

.product-info {
    padding: 25px;
}

.product-info h3 {
    font-size: 22px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.product-desc {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
}

.product-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--bg-light);
    border-radius: 6px;
    font-size: 14px;
}

.spec-label {
    color: var(--text-muted);
}

.spec-value {
    font-weight: 600;
    color: var(--text-primary);
}

.product-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tag {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.tag-hot {
    background: #fee2e2;
    color: #dc2626;
}

.tag-quality {
    background: #dbeafe;
    color: #2563eb;
}

.tag-value {
    background: #fef3c7;
    color: #d97706;
}

.tag-premium {
    background: #e0e7ff;
    color: #4f46e5;
}

.tag-organic {
    background: #d1fae5;
    color: #059669;
}

.section-action {
    text-align: center;
    margin-top: 40px;
}

/* ==================== 品质溯源时间轴 ==================== */
.quality-section {
    background: var(--bg-light);
}

.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.timeline-item {
    display: flex;
    margin-bottom: 50px;
    position: relative;
}

.timeline-item:nth-child(odd) {
    flex-direction: row-reverse;
}

.timeline-marker {
    flex: 0 0 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.marker-icon {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 4px solid var(--primary-color);
}

.timeline-content {
    flex: 1;
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin: 0 30px;
}

.timeline-content h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.timeline-content p {
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.check-list {
    list-style: none;
}

.check-list li {
    padding: 5px 0 5px 25px;
    position: relative;
    color: var(--text-primary);
}

.check-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

/* ==================== 合作伙伴 ==================== */
.partners-section {
    background: white;
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.partner-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
}

.partner-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.15);
}

.partner-logo {
    font-size: 64px;
    margin-bottom: 15px;
}

.partner-card h4 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.partner-desc {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 14px;
}

.testimonial {
    font-style: italic;
    color: var(--text-primary);
    margin-bottom: 15px;
    line-height: 1.6;
    padding: 0 20px;
}

.testimonial-author {
    color: var(--text-muted);
    font-size: 14px;
}

.partners-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
}

.stat-box {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 48px;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-text {
    display: block;
    font-size: 16px;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* ==================== 联系我们 ==================== */
.contact-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.contact-section .section-title {
    color: white;
    -webkit-text-fill-color: white;
}

.contact-section .section-subtitle {
    color: rgba(255, 255, 255, 0.9);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.contact-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.contact-card h4 {
    font-size: 20px;
    margin-bottom: 10px;
}

.contact-card p {
    opacity: 0.9;
    line-height: 1.6;
}

/* ==================== 页脚 ==================== */
.footer {
    background: #1a1a2e;
    color: white;
    padding: 40px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h4 {
    font-size: 18px;
    margin-bottom: 15px;
    color: white;
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    line-height: 2;
    text-decoration: none;
    display: block;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        transition: left 0.3s ease;
        gap: 15px;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: block;
    }

    .hero {
        height: 500px;
    }

    .hero-title {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: 20px;
    }

    .stat-value {
        font-size: 36px;
    }

    .hero-actions {
        flex-direction: column;
        gap: 15px;
    }

    section {
        padding: 50px 0;
    }

    .section-title {
        font-size: 28px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .timeline::before {
        left: 30px;
    }

    .timeline-item {
        flex-direction: column !important;
        padding-left: 60px;
    }

    .timeline-marker {
        position: absolute;
        left: 0;
    }

    .timeline-content {
        margin: 0;
    }

    .partners-stats {
        gap: 30px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .weather-card-body {
        padding: 20px;
    }

    .temperature {
        font-size: 36px;
    }

    .weather-icon-large {
        font-size: 60px;
    }
}

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

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==================== 滚动条美化 ==================== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}
