:root {
    /* ===== Colors ===== */
    --primary-color: #fff;
    --gray-color: #EDF0FA;
    --text-color: #030102;
    --text-light-color: #666;

    /* ====== Transition ====== */
    --tran: all 0.3s;
    --filter-default: brightness(90%) grayscale(30%);
    --filter-after: brightness(100%) grayscale(0);

    --radius: 1.5rem;
    --radius-min: 1rem;

    /* ====== font ====== */
    --default-font: ;
    --large-font: Consolas, Liberation Mono, Menlo, Courier, Microsoft Yahei, monospace;


}


.cgbox {
    height: 100vh;
    display: grid;
    grid-template-rows: 1fr 10fr 1fr;
    /* background-color: greenyellow; */
}

.header {
    background-color: var(--primary-color);
    z-index: 11;
}

.cgcon {
    margin: 0;
    padding: 0;
    position: relative;
    display: flex;
    justify-content: start;
    align-items: center;
    background-color: var(--primary-color);
}



.fooder {
    background-color: var(--primary-color);
    z-index: 10;
}

.main {
    display: grid;
    position: absolute;
    height: 100%;
    width: 100%;
    grid-template-columns: 1fr 2fr 1fr;
    z-index: 10;
}

@media (min-width: 2200px) {
    .main {
        grid-template-columns: 1fr 2fr 1fr;
    }
}

@media (min-width: 1701px) and (max-width: 2199.9px) {
    .main {
        grid-template-columns: 1fr 3fr 1fr;
    }
}

@media (min-width: 1367px) and (max-width: 1700.9px) {
    .main {
        grid-template-columns: 1fr 3fr 1fr;
    }
}

@media (min-width: 1100px) and (max-width: 1366.9px) {
    .main {
        grid-template-columns: 0.3fr 1fr 0.3fr;
    }
}

@media (max-width: 1099.9px) {
    .main {
        grid-template-columns: 0fr 1fr 0fr;
    }

}

.cgtext {
    position: absolute;
    margin: 8rem;
    color: #868686;
    opacity: 0.1;
    z-index: 1;
}

.cgtext span {
    display: flex;
    font-size: 12vw;
    font-weight: 600;
    line-height: 10vw;
    font-family: --large-font;
}


.titlebox{
    overflow: hidden; /* 超出容器的内容隐藏 */
    word-wrap: break-word; /* 文字换行 */
    margin: 1.25rem;
}

.mid_part {
    display: grid;
    padding: 8rem;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(7, 1fr);
    gap: 0.75rem;
    overflow: hidden;
}

.cghcard1 {
    grid-area: 1 / 1 / 3 / 2;
}

.cghcard2 {
    grid-area: 1 / 2 / 3 / 4;
}

.cghcard3 {
    grid-area: 1 / 4 / 4 / 5;
}

.cghcard4 {
    grid-area: 3 / 1 / 5 / 3;
}

.cghcard5 {
    grid-area: 5 / 1 / 8 / 3;
}

.cghcard6 {
    grid-area: 3 / 3 / 6 / 4;
}

.cghcard7 {
    grid-area: 4 / 4 / 6 / 5;
}

.cghcard8 {
    grid-area: 6 / 3 / 8 / 5;
}


.cghcard {
    transition: var(--tran);
    border-radius: var(--radius);
    position: relative;
    box-shadow: 0 10px 16px 5px rgba(0, 0, 0, 0);
    filter: var(--filter-default);
}

.cghcard:hover {
    transition: var(--tran);
    box-shadow: 0 10px 16px 5px rgba(0, 0, 0, 0.2);
    transform: translateY(-3px) rotateX(10deg);
    filter: var(--filter-after);
}

.cghcard .imgbox {
    height: 100%;
    width: 100%;
    overflow: hidden;
    display: block;
    border-radius: var(--radius);
    transition: var(--tran);
}


.cghcard .imgbox:after {
    border-radius: var(--radius);
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    opacity: 0.4;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0), black);
}

.cghcard:hover .imgbox:after {
    opacity: 0.2;
}

.cghcard img {
    object-fit: cover;
    width: 100%;
    max-width: 100%;
    height: 100%;
    background-position-x: center;
    overflow: hidden;
    filter: var(--filter-default);
}

.cghcard img:hover {
    object-fit: cover;
    width: 100%;
    height: 100%;
    background-position-x: center;
    overflow: hidden;
    filter: var(--filter-default);
}

.txtcghcard {
    position: absolute;
    display: flex;
    align-items: flex-end;
    width: 100%;
    height: 100%;
    z-index: 10;
}


.txtcghcard .title {
    display: block;
    color: #fff;
    font-size: 1.25rem;
}

.txtcghcard .subtitle {
    display: block;
    color: #bdbdbd;
    font-size: 0.8rem;
}


@media (max-width: 3000px) {
  .mid_part {
    padding: 8rem;
}

.txtcghcard .title {
    font-size: 1.25rem;
}

.txtcghcard .subtitle {
    font-size: 0.8rem;
}

}

@media (max-width: 2000px) {
  .mid_part {
    padding: 4rem 10rem;
}

.txtcghcard .title {
    font-size: 1rem;
}

.txtcghcard .subtitle {
    font-size: 0.7rem;
}

}

@media (max-width: 1099.9px) {
    .mid_part {
        padding: 1rem;
        overflow: hidden;
        display: grid;
        gap: 0.5rem;
        grid-template-columns: repeat(6, 1fr);
        grid-template-rows: repeat(10, 1fr);
    }
    .txtcghcard .title {
    font-size: 0.85rem;
    }
    
    .txtcghcard .subtitle {
        font-size: 0.5rem;
    }
    .cghcard {
    border-radius: var(--radius-min);
    }
    
    .cghcard .imgbox {
        border-radius: var(--radius-min);
    }
    
    .cghcard .imgbox:after {
        border-radius: var(--radius-min);
    }
    
    /* 隐藏滚动条 */
    .mid_part::-webkit-scrollbar {
        display: none;
    }

     /* 切换位置 */
    .cghcard2 {
        grid-area: 1 / 1 / 4 / 7;
    }

    .cghcard1 {
        grid-area: 4 / 1 / 6 / 4;
    }

    .cghcard3 {
        grid-area: 4 / 4 / 6 / 7;
    }

    .cghcard4 {
        grid-area: 6 / 1 / 8 / 4;
    }

    .cghcard5 {
        grid-area: 6 / 4 / 8 / 7;
    }

    .cghcard6 {
        grid-area: 8 / 1 / 11 / 3;
    }

    .cghcard7 {
        grid-area: 8 / 3 / 11 / 5;
    }

    .cghcard8 {
        grid-area: 8 / 5 / 11 / 7;
    }
}