#page-container{
    width: min(1220px, calc(100% - 32px));
}

#select-list{
    padding: 4px;
    margin: 0 0 18px;
    display: inline-flex;
    gap: 4px;
    background: var(--color-muted-bg);
    border: 1px solid var(--color-border);
    border-radius: 999px;
}

#select-list div{
    min-width: 104px;
    padding: 9px 18px;
    background: transparent;
    text-align: center;
    color: var(--color-ink-soft);
    border-radius: 999px;
    transition: all 0.25s;
    cursor: pointer;
}

#select-list div.active{
    background: linear-gradient(135deg, var(--color-ink), #284d6c);
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(21, 48, 71, 0.16);
}

.project-list,
.project-list-nd{
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 18px;
    text-align: left;
    padding: 0;
    margin: 0;
}

.project-numbered-list {
    counter-reset: project-item;
    gap: 16px;
}

.project-numbered-list > div {
    display: none;
}

.project-link{
    display: flex;
    align-items: center;
    gap: 28px;
}

.project-box{
    width: 100%;
    list-style-type: none;
    transition: transform 0.28s, box-shadow 0.28s, border-color 0.28s;
    border-radius: 22px;
    margin: 0;
    padding: 24px 28px;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246,249,252,0.98));
    border: 1px solid rgba(21, 48, 71, 0.08);
    box-shadow: 0 12px 28px rgba(16, 32, 47, 0.06);
}

.project-numbered-list .project-box {
    position: relative;
    padding-left: 96px;
}

.project-numbered-list .project-box::before {
    counter-increment: project-item;
    content: counter(project-item);
    position: absolute;
    left: 28px;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-family: "Source Serif 4", var(--font-serif);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-accent-deep);
    background: rgba(184, 138, 68, 0.1);
    border: 1px solid rgba(184, 138, 68, 0.24);
    box-shadow: 0 10px 20px rgba(184, 138, 68, 0.12);
}

.project-box:hover{
    transform: translateY(-3px);
    border-color: rgba(184, 138, 68, 0.34);
    box-shadow: 0 18px 40px rgba(16, 32, 47, 0.12);
}

.project-devide-line{
    display: none;
}

/*.project-preview-photo-box{*/
/*    width: 40%;*/
/*    margin: 0;*/
/*    margin-right: 30px;*/
/*    overflow: hidden;*/
/*    flex-shrink: 0;*/
/*}*/

/* 设置图片容器的宽度为100%，然后用padding控制两侧留白 */
.project-preview-photo-box {
    width: min(42%, 420px);
    min-width: 260px;
    box-sizing: border-box;
    height: 220px;
    margin: 0;
    padding: 0;
    border-radius: 18px;
    overflow: hidden;
    background: linear-gradient(180deg, #f7fafc, #ebf1f6);
    border: 1px solid rgba(21, 48, 71, 0.08);
}

.project-preview-photo{
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    margin: 0;
    padding: 0;
    height: 100%;
    top: 0;
    bottom: 0;
    transition: transform 0.4s ease;
}
#overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* 半透明黑色作为背景 */
    z-index: 999;
    cursor: pointer;
}

.project-box.clickable:hover .project-preview-photo{
    transform: scale(1.1);
}


.project-name{
    color: var(--color-ink);
    width: 100%;
    text-decoration: none;
    transition: color 0.25s, text-shadow 0.25s;
    font-size: 1.3rem;
    line-height: 1.45;
    font-family: var(--font-serif);
    font-weight: 700;
    text-align: left;
}

.project-box.clickable .project-name:hover{
    text-decoration: underline;
    text-shadow: 0 1px 3px #00000080;
}

.project-name:hover{
    text-decoration: black;
}

.project-detail{
    flex: 1;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    max-width: 78ch;
}

.project-intro{
    width:100%;
    padding-top: 12px;
    line-height: 1.8;
    text-align: left;
    color: var(--color-ink-soft);
    font-size: 1rem;
    max-width: 72ch;
}

.project-list-nd .project-detail {
    width: 100%;
    max-width: none;
}

.project-list-nd .project-name,
.project-list-nd .project-intro {
    max-width: none;
}

.lang-en .project-name {
    max-width: 100%;
    line-height: 1.45;
    font-size: 1.3rem;
    letter-spacing: normal;
}

.lang-en .project-intro {
    max-width: 72ch;
    line-height: 1.8;
    letter-spacing: normal;
}

.lang-en .project-detail {
    max-width: 78ch;
}

.lang-en #select-list div {
    min-width: 118px;
    padding-left: 20px;
    padding-right: 20px;
}

.project-list-nd .project-detail,
.lang-en .project-list-nd .project-detail {
    width: 100%;
    max-width: none;
}

.project-list-nd .project-name,
.project-list-nd .project-intro,
.lang-en .project-list-nd .project-name,
.lang-en .project-list-nd .project-intro {
    width: 100%;
    max-width: none;
}

.text-only-list .project-detail,
.lang-en .text-only-list .project-detail {
    width: 100%;
    max-width: none !important;
}

.text-only-list .project-name,
.text-only-list .project-intro,
.lang-en .text-only-list .project-name,
.lang-en .text-only-list .project-intro {
    width: 100%;
    max-width: none !important;
}

.text-only-list .project-intro,
.lang-en .text-only-list .project-intro {
    display: none;
}

.text-only-list .project-link {
    display: block;
}

.project-links{
    flex-wrap: wrap;
    margin-top: 14px;
}

.project-links a{
    color: var(--color-accent-deep);
    text-decoration: none;
    padding: 6px 12px;
    border: 1px solid rgba(184, 138, 68, 0.28);
    border-radius: 999px;
    background: rgba(184, 138, 68, 0.08);
    transition: all 0.25s;
}

.project-links a:hover{
    background: rgba(184, 138, 68, 0.16);
    color: var(--color-ink);
}

.slide-container{
    text-align:left;
}

.slide-down{
    background: url("../images/slide-down.png");
    transition: all 0.25s;
    height: 30px;
    width: 30px;
    right: 0;
    float: right;
    border: solid rgba(21, 48, 71, 0.08) 1px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.9);
}

.slide-down:hover{
    border: solid rgba(184, 138, 68, 0.42) 1px;
    box-shadow: 0 8px 16px rgba(16, 32, 47, 0.12);
}

.slide-down.active{
    transform: rotate(180deg);
}

.project-other-information{
    max-height: 0;
    height:auto;
    overflow: hidden;
    transition: all 0.2s ease-out;
    text-align: left;
    padding-left: 20px;
    padding-right: 20px;
}

.project-other-information.active{
    margin-top: 20px;
    margin-bottom: 0;
    padding-top: 16px;
    max-height: 6000px;
    border-top: solid rgba(184, 138, 68, 0.36) 1px;
    transition: all 0.2s ease-in;
}

.listpage{
    display: none;
}

.listpage.active{
    display: block;
}

.map-container {
    margin-top: 40px;
    position: relative;
    width: min(100%, 400px);
    height: auto;
    overflow: hidden;
    margin: 40px auto 0;
    border-radius: 18px;
    border: 0;
    box-shadow: none;
}

.map-container a[id^="clustrmaps-widget"] {
    display: block;
    height: auto !important;
    line-height: 0;
}

.map-container iframe,
.map-container img,
.map-container canvas,
.map-container div {
    border-radius: inherit !important;
}

@media (max-width: 900px) {
    .project-box {
        padding: 20px;
    }

    .project-numbered-list .project-box {
        padding-left: 84px;
    }

    .project-numbered-list .project-box::before {
        left: 22px;
        top: 50%;
        transform: translateY(-50%);
    }

    .project-link {
        flex-direction: column;
        gap: 18px;
        align-items: stretch;
    }

    .project-preview-photo-box {
        width: 100%;
        min-width: 0;
        height: 240px;
    }
}

@media (max-width: 640px) {
    #page-container {
        width: calc(100% - 24px);
    }

    #select-list {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        border-radius: 18px;
    }

    #select-list div {
        min-width: 0;
        padding: 9px 8px;
        font-size: 0.92rem;
    }

    .project-box {
        border-radius: 18px;
        padding: 18px 16px;
    }

    .project-numbered-list .project-box {
        padding-left: 68px;
    }

    .project-numbered-list .project-box::before {
        left: 16px;
        top: 18px;
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }

    .project-name {
        font-size: 1.12rem;
    }
}