/* Reset & Basics */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
    font-size: 16px; /* 基础字体大小，方便 rem 计算 */
}

/* 全局 <p> 居中 */
p {
    text-align: center;
}

/* Header */
.hero {
    background: #f5f5f5;
    color: #333;
    text-align: center;
    padding: 4rem 1rem;
}

.header-content {
    max-width: 90%; /* 改为百分比，适配不同屏幕 */
    margin: 0 auto;
}

.logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(1.8rem, 5vw, 2.5rem); /* 自适应字体大小 */
    font-weight: bold;
    color: #66cc00;
}

.hero p {
    font-size: clamp(1rem, 3vw, 1.2rem);
    opacity: 0.9;
}

/* Sections */
.section {
    padding: 3rem 5%; /* 使用百分比调整边距 */
    max-width: 1400px;
    margin: 0 auto;
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    color: #66cc00;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Target Group */
#target-group {
    text-align: center;
}

#target-group p {
    font-weight: bold;
    font-size: clamp(1.2rem, 3vw, 1.4rem);
}

/* Feature Grid */
.feature-grid {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap; /* 改为 wrap，适配小屏幕 */
    padding: 0 1rem;
}

.feature-card {
    width: clamp(250px, 25%, 300px); /* 自适应宽度 */
    height: 180px;
    position: relative;
    transition: height 0.6s, background 0.6s, box-shadow 0.6s, border-radius 0.6s;
}

/* Hover 状态 */
.feature-card:hover {
    height: clamp(400px, 80vh, 670px); /* 自适应高度 */
    background: transparent;
    box-shadow: none;
    border-radius: 0;
}

/* Card Front */
.card-front {
    position: absolute;
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    z-index: 2;
    transition: opacity 0.3s ease;
}

.feature-card:hover .card-front {
    opacity: 0;
}

/* Card Back */
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    background: transparent;
    border-radius: 0;
    padding: 0;
    left: 0;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover .card-back {
    opacity: 1;
}

/* Feature Image */
.feature-image {
    width: 100%; /* 图片宽度占满容器 */
    height: auto; /* 高度自适应 */
    max-height: clamp(400px, 80vh, 670px); /* 限制最大高度 */
    object-fit: contain;
    position: absolute;
    left: 0; /* 居中调整 */
    pointer-events: none;
}

/* Front Content */
.card-front h3 {
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    color: #66cc00;
    margin-bottom: 0.5rem;
    text-align: center;
    width: 100%;
}

.card-front p {
    font-size: clamp(0.9rem, 2vw, 1rem);
    color: #666;
    text-align: left;
}

/* Mini Sections */
.mini-section {
    background: white;
    padding: 2rem 5%;
}

/* Links */
a {
    color: #66cc00;
    text-decoration: none;
    font-weight: bold;
}

a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 1rem;
    font-size: clamp(0.8rem, 2vw, 0.9rem);
}

/* 动态调整后续内容 */
#features:hover ~ #target-group {
    margin-top: -30px;
    transition: margin-top 0.6s;
}

/* Logo 链接样式 */
.header-content a {
    display: inline-block;
}

/* 媒体查询 */
@media (max-width: 768px) {
    .hero {
        padding: 2rem 1rem;
    }

    .logo {
        width: 80px;
        height: 80px;
    }

    .feature-grid {
        flex-direction: column; /* 小屏幕时垂直排列 */
        align-items: center;
    }

    .feature-card {
        width: 90%; /* 小屏幕占满宽度 */
        margin-bottom: 1rem;
    }

    .feature-card:hover {
        height: 50vh; /* 调整小屏幕 hover 高度 */
    }

    .feature-image {
        max-height: 50vh;
    }

    .section {
        padding: 2rem 3%;
    }

    .mini-section {
        padding: 1.5rem 3%;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.2rem;
    }

    .card-front h3 {
        font-size: 1rem;
    }

    .card-front p {
        font-size: 0.85rem;
    }

    #target-group p {
        font-size: 1rem;
    }
}