/* ================================
   PROJECTS SECTION
================================ */

/* HEADER */
/* ===== Hero Section ===== */
.hero1 {
    width: 100%;
    height: 70vh;
    background-image: url("img/project_bg.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;

    position: relative;
    margin-top: 8rem;
    overflow: hidden;   /* 避免遮罩溢出 */
}

/* 加透明遮罩 */
.hero1::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.138); /* 透明度在这里调，0.35=35%黑色遮罩 */
    z-index: 1;
}

/* 让文字在遮罩上方 */
.hero1 * {
    position: relative;
    z-index: 2;
}

.hero1-content h2 {
    color: #292623;  /* 白色文字 */
    font-size: 4.5rem;
    line-height: 0.4;
    font-family: "MiSans VF Regular", system-ui, sans-serif;
    font-weight: 700;
}

/* GRID */
.projects-grid {
    margin: 5rem auto;
    width: 80%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}

/* ================================
   PROJECT CARD — 最新优化版
================================ */

.project-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;

    aspect-ratio: 4 / 3;

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    box-shadow: 0 6px 25px rgba(0,0,0,0.15);
    transition: box-shadow 0.25s ease;
}

/* Hover 阴影加强 */
.project-card:hover {
    box-shadow: 0 12px 35px rgba(0,0,0,0.25);
}

/* 背景图层（放大动画 + 黑色滤镜） */
.project-card::before {
    content: "";
    position: absolute;
    inset: 0;

    background-size: inherit;
    background-position: inherit;
    background-repeat: inherit;
    background-image: inherit;

    /* 黑色滤镜（你可以改 0.15 → 深一点） */
    filter: brightness(0.85);

    transform: scale(1);
    transition: transform 0.45s ease, filter 0.3s ease;

    z-index: 1;
}

/* Hover 时背景轻微放大，滤镜稍微加深 */
.project-card:hover::before {
    transform: scale(1.06);
    filter: brightness(0.75); /* 稍暗一点，让字更清晰 */
}

/* 标签 */
.project-label {
    position: absolute;
    top: 1rem;
    left: 1rem;

    padding: 0.35rem 0.8rem;
    background: rgba(215,210,97,0.9);
    color: #333;

    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 5;
}

/* 文本区 */
.project-info {
    position: absolute;
    bottom: 1.2rem;
    left: 1.2rem;

    color: white;
    z-index: 5;

    transition: transform 0.35s ease; /* ★ 文本动画 */
}

.project-info h3 {
    margin: 0 0 0.3rem 0;
    font-size: 1.25rem;
    font-weight: 700;
}

.project-info p {
    margin: 0;
    opacity: 0.9;
}

.project-card:hover .project-info {
    transform: translateY(-6px);
}

/* Mobile */
@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

/* 整体背景 */
.split-hero {
    width: 100%;
    background: #292623;
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.split-hero h1 {
    color: #D7D261;
    font-size: 3rem;
}

.split-hero p {
    color: #e5e4c8;
    font-size: 1.5rem;
    line-height: 0.4;
}

/* 80% 居中容器 */
.split-wrapper {
    width: 80%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 左侧文字 */
.split-left {
    flex: 1;
}

/* 按钮组 */
.btn-group {
    margin-top: 3rem;
    display: flex;
    gap: 1rem;
}

.cta-btn {
    padding: 0.6rem 1.4rem;
    border-radius: 15px;
    background: transparent;
    color: #D7D261;
    border: 2px solid #DFDACB;
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.25s;
}

.cta-btn:hover {
    background: #D7D261;
    border-color: #D7D261;
    color: #292623;
}

/* 右侧图片 */
.split-right {
    flex: 1;
    display: flex;
    justify-content:end;
}

/* 让图片按比例缩小不裁切 */
.img-box {
    height: 80%;
    width: 80%;
    border-radius: 15px;
    overflow: hidden;
    background: rgba(255,255,255,0.03);
}

.img-box img {
    object-fit: cover;
    display: block;
    width: 100%;
    height: 100%;
}

/* 让手机更美观 */
@media (max-width: 768px) {
    .split-wrapper {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .img-box {
        max-width: 100%;
    }
}


