.serve {
    position: relative;
    width: 100%;
    min-height: 100vh;
    padding: 80px 60px;
    box-sizing: border-box;
    overflow: hidden;
    border-bottom: 1px solid #e2b969;
}

/* 背景圖片和遮罩 */
.serve::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url(../img/serve-bg.webp);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(3px);
    z-index: 0;
}

.serve::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #881b04;
    opacity: 0.78;
    z-index: 1;
}

.serve>* {
    position: relative;
    z-index: 2;
}

/* 角落裝飾 */
.serve-corner {
    position: absolute;
    z-index: 3;
}

.serve-corner img {
    width: auto;
    height: auto;
    max-width: 120px;
    max-height: 120px;
    object-fit: contain;
}

.serve-corner-tl {
    top: -2px;
    left: -3px;
}

.serve-corner-tl img {
    transform: scaleX(-1);
    max-width: 71px;
    max-height: 71px;
}

.serve-corner-tr {
    top: -2px;
    right: -3px;
}

.serve-corner-tr img {
    max-width: 71px;
    max-height: 71px;
}

.serve-corner-bl {
    bottom: 0;
    left: 0;
}

.serve-corner-bl img {
    transform: scaleX(-1);
    max-width: 71px;
    max-height: 71px;
}

.serve-corner-br {
    bottom: 0;
    right: 0;
}

.serve-corner-br img {
    max-width: 71px;
    max-height: 71px;
}

/* 標題區塊 */
.serve-title-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 200px;
    z-index: 4;
}

.serve-title {
    color: #e2b969;
    font-size: 2.5rem;
    font-weight: bold;
    margin: 0;
    letter-spacing: 0.25em;
    line-height: 1.5;
    font-family: "MingLiU", "PMingLiU", "新細明體", "細明體", serif;
    white-space: nowrap;
}

.serve-title-decoration {
    width: 50px;
    height: auto;
    display: flex;
    align-items: center;
}

.serve-title-decoration img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.serve-title-decoration-left img {
    transform: rotate(-90deg);
}

.serve-title-decoration-right img {
    transform: rotate(90deg);
}

/* 列表區塊 */
.serve-list-wrapper {
    position: relative;
    margin-top: 40px;
    z-index: 4;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
}

.serve-list-container {
    flex: 1;
    overflow: hidden;
    position: relative;
    min-width: 0;
    order: 2;
}

.serve-list {
    position: relative;
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(226, 185, 105, 0.5) transparent;
    scroll-behavior: smooth;
}

.serve-list::-webkit-scrollbar {
    height: 8px;
}

.serve-list::-webkit-scrollbar-track {
    background: transparent;
}

.serve-list::-webkit-scrollbar-thumb {
    background-color: rgba(226, 185, 105, 0.5);
    border-radius: 4px;
}

.serve-list::-webkit-scrollbar-thumb:hover {
    background-color: rgba(226, 185, 105, 0.7);
}

/* 左右箭頭 */
.serve-list-arrow {
    width: 50px;
    height: 50px;
    background-color: #881b04;
    border: 2px solid #e2b969;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: all 0.3s ease;
    opacity: 1;
    pointer-events: auto;
    flex-shrink: 0;
    align-self: center;
}

.serve-list-arrow:hover {
    background-color: #6a1503;
    transform: scale(1.1);
}

.serve-list-arrow:active {
    transform: scale(0.95);
}

.serve-list-arrow-left {
    order: 1;
}

.serve-list-arrow-right {
    order: 3;
}



.serve-list-arrow svg {
    width: 24px;
    height: 24px;
}

.serve-item {
    position: relative;
    background-image: url(../img/vertical-plaque.webp);
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    min-width: 100px;
    height: 400px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 34px;
    margin: 20px 0 40px;
    box-sizing: border-box;
    filter: drop-shadow(0 -4px 8px rgba(0, 0, 0, 0.7));
    cursor: pointer;
    transition: transform 0.3s ease;
}

.serve-item:hover {
    transform: translateY(-5px);
}

.serve-item-text {
    writing-mode: vertical-rl;
    text-orientation: upright;
    color: #42210b;
    font-size: 1.8rem;
    font-weight: bold;
    letter-spacing: 0.25em;
    line-height: 1.8;
    font-family: "MingLiU", "PMingLiU", "新細明體", "細明體", serif;
    text-align: center;
    white-space: nowrap;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

/* hover時文字變成淺黃色並添加陰影 */
.serve-item:hover .serve-item-text {
    color: #fff9c4;
    /* 淺黃色 */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3),
        0 0 8px rgba(255, 249, 196, 0.5);
    /* 文字陰影效果 */
}

.serve-item-long .serve-item-text {
    font-size: 1.3rem;
}

/* 響應式設計 */
@media (max-width: 1240px) {
    .serve-item {
        min-width: 80px;
    }
}

@media (max-width: 1024px) {
    .serve {
        padding: 60px 40px;
    }

    .serve-title {
        font-size: 2.2rem;
    }

    .serve-list-wrapper {
        padding: 0 40px;
    }

    .serve-list-arrow {
        width: 40px;
        height: 40px;
    }

    .serve-list-arrow svg {
        width: 20px;
        height: 20px;
    }

    .serve-item {
        min-width: 70px;
        height: 360px;
    }

    .serve-item-text {
        font-size: 1.6rem;
    }

    .serve-item-long .serve-item-text {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .serve {
        padding: 40px 20px;
        min-height: auto;
    }

    .serve-corner img {
        max-width: 50px;
        max-height: 50px;
    }

    .serve-title-section {
        margin-top: 40px;
        gap: 8px;
    }

    .serve-title {
        font-size: 1.8rem;
    }

    .serve-title-decoration {
        width: 35px;
    }

    .serve-list-wrapper {
        margin-top: 20px;
        padding: 0 20px;
        gap: 10px;
    }

    .serve-list {
        gap: 15px;
        margin-bottom: 20px;
        ;
    }

    .serve-list-arrow {
        width: 35px;
        height: 35px;
        opacity: 0.8;
    }

    .serve-list-arrow svg {
        width: 18px;
        height: 18px;
    }

    .serve-item {
        height: 320px;
    }

    .serve-item-text {
        font-size: 1.4rem;
    }

    .serve-item-long .serve-item-text {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .serve {
        padding: 30px 15px;
    }

    .serve-title {
        font-size: 1.5rem;
        letter-spacing: 0.15em;
    }

    .serve-title-decoration {
        width: 30px;
    }

    .serve-list-wrapper {
        padding: 0;
    }

    .serve-list {
        gap: 10px;
    }

    .serve-list-arrow {
        width: 30px;
        height: 30px;
    }

    .serve-list-arrow svg {
        width: 16px;
        height: 16px;
    }

    .serve-item {}

    .serve-item-text {
        font-size: 1.1rem;
    }

    .serve-item-long .serve-item-text {
        font-size: 1rem;
    }
}

/* 彈窗樣式 */
.serve-modal {
    display: flex;
    opacity: 0;
    visibility: hidden;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.serve-modal.active {
    opacity: 1;
    visibility: visible;
}

.serve-modal-content {
    position: relative;
    background-image: url(../img/footer-bg.webp);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #881b04;
    border: 1px solid #e2b969;
    color: #e2b969;
    padding: 40px 50px;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    font-family: "MingLiU", "PMingLiU", "新細明體", "細明體", serif;
}

.serve-modal-close {
    display: block;
    margin: 28px auto 0;
    position: static;
    background: transparent;
    border: none;
    color: #e2b969;
    font-size: 1.3rem;
    letter-spacing: 0;
    font-family: "MingLiU", "PMingLiU", "新細明體", "細明體", serif;
    cursor: pointer;
    line-height: 1.6;
    padding: 0;
    width: auto;
    border-bottom: 1px solid #e2b969;
    transition: opacity 0.3s ease;
}

.serve-modal-close:hover {
    opacity: 0.7;
}

.serve-modal-title {
    color: #e2b969;
    font-size: 1.8rem;
    font-weight: bold;
    margin: 0 0 20px 0;
    letter-spacing: 0.1em;
    line-height: 1.6;
}

.serve-modal-date {
    color: #e2b969;
    font-size: 1.4rem;
    margin: 0 0 20px 0;
    letter-spacing: 0.1em;
    line-height: 1.8;
}

.serve-modal-description {
    color: #e2b969;
    font-size: 1.4rem;
    margin: 0;
    letter-spacing: 0.1em;
    line-height: 1.8;
}

.serve-modal .culture-title-decoration img {
    width: 60px;
    height: 60px;
}

.serve-modal .culture-title-decoration-tl {
    top: 0;
    left: 0;
}

.serve-modal .culture-title-decoration-tr {
    top: 0;
    right: 0;
}

.serve-modal .culture-title-decoration-bl {
    bottom: 0;
    left: 0;
}

.serve-modal .culture-title-decoration-br {
    bottom: 0;
    right: 0;
}


@media (max-width: 768px) {
    .serve-modal-content {
        padding: 30px 35px;
        margin: 20px;
    }

    .serve-modal-title {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }

    .serve-modal-date,
    .serve-modal-description {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }

    .serve-modal-close {
        font-size: 1.2rem;
        margin-top: 22px;
    }
}

@media (max-width: 480px) {
    .serve-modal-content {
        padding: 25px 25px;
    }

    .serve-modal-title {
        font-size: 1.3rem;
    }

    .serve-modal-date,
    .serve-modal-description {
        font-size: 1.1rem;
    }
}