/* ============================================
   wwwroot/assets/css/modules/home-index.css
   首页样式 - 云禾 YunHeLink
   ============================================ */

/* ===== 主横幅 ===== */
.home-page .hero-section {
    padding: 4rem 0 3rem;
    background: linear-gradient(135deg, rgba(0, 30, 15, 0.02) 0%, rgba(25, 135, 84, 0.06) 100%);
}

.home-page .hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(25, 135, 84, 0.1);
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    color: #198754;
}

.home-page .hero-title {
    font-weight: 800;
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.2;
    color: #222;
}

.home-page .hero-title span {
    color: #198754;
}

.home-page .hero-desc {
    max-width: 600px;
    margin: 1rem auto 0;
    color: #666;
    font-size: 1rem;
}

.home-page .hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.home-page .hero-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 0.8rem 2.2rem; font-size: 1rem;
    border-radius: 30px; text-decoration: none; font-weight: 600;
    transition: all 0.3s ease;
}

.home-page .hero-btn-primary {
    background: #198754; color: #fff;
    box-shadow: 0 4px 15px rgba(25, 135, 84, 0.3);
}

.home-page .hero-btn-primary:hover {
    background: #146c43; transform: translateY(-1px);
}

.home-page .hero-btn-outline {
    background: #fff; color: #198754; border: 2px solid #198754;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.home-page .hero-btn-outline:hover {
    background: #f0fdf4; transform: translateY(-1px);
}

/* ===== 通用 ===== */
.home-page .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.home-page .section-header h2 {
    font-weight: 700;
    font-size: 1.4rem;
    margin: 0;
}

.home-page .more-link {
    color: #198754;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
}

.home-page .more-link:hover {
    text-decoration: underline;
}

.home-page .section-desc {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.home-page .empty-state {
    text-align: center;
    color: #aaa;
    padding: 2rem;
    font-size: 0.9rem;
}

/* ===== 产品区 ===== */
.section-products {
    padding: 2rem 0;
}

.product-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.product-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

/* ===== 产品区 ===== */
.home-page .section-products {
    padding: 2rem 0;
}

.home-page .product-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.home-page .product-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
}

.home-page .product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.home-page .hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

/* ===== 移动端适配 ===== */
@media (max-width: 768px) {
    .home-page .product-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .home-page .farm-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .home-page .iot-features {
        grid-template-columns: 1fr;
    }

    .home-page .stats-row {
        gap: 1rem;
        padding: 1rem;
    }

    .home-page .stat-number {
        font-size: 1.5rem;
    }

    .home-page .hero-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .home-page .product-cards {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .home-page .farm-cards {
        grid-template-columns: 1fr;
    }
}


/* ===== 物联设备区 ===== */
.home-page .section-iot {
    padding: 2.5rem 0;
    background: linear-gradient(135deg, rgba(25,135,84,0.03) 0%, rgba(0,30,15,0.02) 100%);
    text-align: center;
}

.home-page .section-iot h2 {
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.home-page .stats-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    padding: 1.5rem;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    margin-bottom: 1.5rem;
}

.home-page .stat-item {
    text-align: center;
}

.home-page .stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: #198754;
}

.home-page .stat-label {
    font-size: 0.8rem;
    color: #888;
    margin-top: 2px;
}

.home-page .stat-divider {
    width: 1px;
    height: 36px;
    background: #eee;
}

.home-page .iot-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.home-page .iot-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    transition: transform 0.2s;
}

.home-page .iot-card:hover {
    transform: translateY(-2px);
}

.home-page .iot-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.home-page .iot-card h5 {
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.home-page .iot-card p {
    font-size: 0.85rem;
    color: #888;
    margin: 0;
}

.home-page .trace-search {
    display: flex;
    margin-top: 0.8rem;
    gap: 0;
}

.home-page .trace-search input {
    flex: 1;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 8px 0 0 8px;
    padding: 8px 12px;
    font-size: 0.85rem;
}

.home-page .trace-search button {
    border: none;
    background: #198754;
    color: #fff;
    border-radius: 0 8px 8px 0;
    padding: 0 16px;
    cursor: pointer;
}

/* ===== 农场区 ===== */
.home-page .section-farms {
    padding: 2.5rem 0;
}

.home-page .section-farms h2 {
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.home-page .farm-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.home-page .farm-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s;
}

.home-page .farm-card:hover {
    transform: translateY(-3px);
}

.home-page .farm-img {
    position: relative;
    width: 100%;
    padding-top: 66%;
    overflow: hidden;
    background: #f0f0f0;
}

.home-page .farm-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-page .farm-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(25,135,84,0.85);
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 8px;
}

.home-page .farm-info {
    padding: 12px;
}

.home-page .farm-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.home-page .farm-meta {
    display: flex;
    gap: 12px;
    margin-top: 6px;
    font-size: 0.75rem;
    color: #999;
}

.home-page .farm-meta i {
    margin-right: 2px;
}

/* ===== 移动端适配 ===== */
@media (max-width: 768px) {
    .home-page .product-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .home-page .farm-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .home-page .iot-features {
        grid-template-columns: 1fr;
    }

    .home-page .stats-row {
        gap: 1rem;
        padding: 1rem;
    }

    .home-page .stat-number {
        font-size: 1.5rem;
    }

    .home-page .hero-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .home-page .product-cards {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .home-page .farm-cards {
        grid-template-columns: 1fr;
    }
}