/* ===========================
   基础重置
=========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* 防止横向滚动条造成空隙 */
    font-family: "Arial", sans-serif;
    color: #333;
    line-height: 1.6;
}

/* ===========================
   文字段落
=========================== */
.text {
    padding: 35px 365px 0px 365px;
    font-size: 15px;
    color: #333;
}

/* Works 标题 */
.works-title {
    font-weight: normal;
    font-size: 18px;
    margin: 15px 0 10px 365px;
    color: #000000;
}

/* 网格布局 */
#works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
    gap: 30px;
    padding: 0 365px 150px 365px;
}

/* 每个项目 */
.project-item {
    display: block;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    color: #666666;
    font-size: 12px;
}

.project-item img {
    width: 175px;
    height: 175px;
    display: block;
    object-fit: cover;
    margin-bottom: 5px;
}

/* ===========================
   Gallery Slider
=========================== */
.gallery-slider {
    position: relative;
    overflow: hidden;
    max-width: calc(100% - 726px); /* 保持左右 margin */
    margin: 25px auto;
    height: 540px;
    background: none !important;
    isolation: isolate;
    transform: translateX(5px); /* 向右微调 */
}

.gallery-slider .slides {
    display: flex;
    transition: all 0.8s ease-in-out;
    width: 100%;
}

.gallery-slider .slides a {
    flex: 0 0 100%;
    width: 100%;
    height: 540px;
    overflow: hidden;
    display: block;
    margin: 0;
    padding: 0;
    border: none;
}

.gallery-slider img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.6s ease;  
}

/* 左右箭头 */
.gallery-slider .arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #262626;
    font-size: 38px;
    cursor: pointer;
    padding: 0 12px;
    transition: opacity 0.3s ease;
    z-index: 2;
    opacity: 0.8;
}

.gallery-slider .arrow:hover {
    opacity: 1;
}

.gallery-slider .arrow.left {
    left: 5px;
}

.gallery-slider .arrow.right {
    right: 5px;
}

/* Gallery Caption */
.gallery-caption {
    width: calc(100% - 730px);
    margin: -20px auto 0 auto;
    text-align: right;
    font-size: 15px;
    color: #333;
    font-weight: normal;
    padding-right: 10px;
    cursor: pointer;
    transition: color 0.3s ease;
    transform: translateX(16px);
}

.gallery-caption:hover {
    color: #000;
}


.disabled-slide {
    pointer-events: none;  /* 禁止点击 */
    cursor: default;       /* 鼠标显示默认箭头 */
    text-decoration: none; /* 去掉下划线 */
}

/* ===========================
   手机端样式
=========================== */
@media (max-width: 768px) {

    /* 全局文字段落 */
    .text {
        padding: 20px 15px;
        font-size: 14px;
    }

    .works-title {
        margin: 20px 15px 10px 15px;
        font-size: 16px;
    }

    #works-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
        padding: 0 15px 50px 15px;
    }

    .project-item img {
        width: 100%;
        height: auto;
    }

    .project-item {
        font-size: 12px;
    }

    /* 手机端 Gallery Slider */
.gallery-slider {
    width: calc(100% - 30px);  /* 15px 左右间距 */
    max-width: 100%;
    height: 300px;
    margin-left: 10px;
    margin-right: 0px;
    padding: 0;
    overflow: hidden;
}

.gallery-slider .slides {
    display: flex;
    width: 100%;
    height: 100%;
}

.gallery-slider .slides a {
    flex: 0 0 100%;   /* 每张图占 slides 宽度 */
    height: 100%;
}

.gallery-slider img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

    .gallery-slider .arrow {
        font-size: 30px;
        padding: 0 8px;
    }

    .gallery-caption {
        width: 100%;
        margin-top: -20px;
        text-align: right;
        padding-right: 30px;
        font-size: 14px;
    }
}
