.accordion-container {
    margin-block: 40px;margin-inline: auto;
    background: #ffffff;
    border-radius: 1.5rem;
    border: 1px solid #ddd;
    padding: 1rem;
    max-width: 900px;
    box-sizing: border-box;
}

.accordion-title{height: 100px;margin: 0 !important;position: relative !important;}
.accordion-title>div{
    position: relative;font-size: 3rem;
    word-break: keep-all;
    font-weight: 700;
    line-height: 1.6;
    text-align: center;
    z-index: 1;
}
.accordion-title h2{
    font-size: 1em;
    color: #7c4f24 !important;
    top: 15%;
    left: 0%;
    right: 0%;
    position: absolute;
}
.accordion-title h2::before {
    color: #000;
    text-stroke: 12px #ffdd5a;
    -webkit-text-stroke: 12px #ffdd5a;
    position: absolute;
    z-index: -1;
    content: attr(data-storke);
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}
.accordion-title h2::after {
    color: #000;
    text-stroke: 8px #fff;
    -webkit-text-stroke: 8px #fff;
    position: absolute;
    z-index: -1;
    content: attr(data-storke);
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

/* ----- 手風琴項目 ----- */
.accordion-item {
    border: 1px solid #ddd;
    border-radius: 1rem;
    margin-bottom: 0.8rem;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #ffffff;
}

.accordion-item:last-child {
    margin-bottom: 0;
}

.accordion-item:hover {
    border-color: #cbd5e1;
}

/* 標題按鈕 — 整個點擊區域 */
.accordion-header {
    width: 100%;
    background: none;
    border: none;
    padding: 1rem 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1rem;
    font-weight: 600;
    color: #9b6935;
    /* cursor: pointer; */
    transition: background 0.15s, color 0.15s;
    text-align: left;
    gap: 1rem;
    background: #fee9c0;
    /* border-radius: 1rem 1rem 0 0; */
}

.accordion-header:hover {
    background: #9b6935;
    color: #fff;
}
.accordion-header:hover .accordion-icon{color: #fff;}

/* .accordion-header:focus-visible {
    outline: 3px solid #7aa9e6;
    outline-offset: -2px;
    background: #edf4fe;
} */

/* 展開狀態的標題樣式 (僅視覺點綴) */
.accordion-item.active .accordion-header {
    background: #9b6935;
    color: #fff;
}

/* 箭頭圖示 — 用純 CSS 製作 */
.accordion-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    color: #000;
    display: none;
}

.accordion-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke 0.2s;
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
    color: #fff;
}

/* 內容面板 — 高度過渡 */
.accordion-panel {
    /* max-height: 0; */
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), padding 0.2s ease;
    padding: 0 1.2rem;
    background: #ffffff;
    border-radius: 0 0 1rem 1rem;
}

.accordion-panel-inner {
    padding: 0.2rem 0 1.2rem 0;
    color: #1e2a3a;
    line-height: 1.6;
    font-size: 0.95rem;
}

.accordion-panel-inner p {
    margin-bottom: 0.75rem;
}

.accordion-panel-inner p:last-child {
    margin-bottom: 0;text-indent: 1.2em;
}

.accordion-panel-inner ul, 
.accordion-panel-inner ol {
    margin: 0.4rem 0 0.6rem 1.2rem;
}

.accordion-panel-inner li {
    margin-bottom: 0.2rem;
}

/* 當項目 active 時，panel 展開 (由 JS 控制 max-height) */
.accordion-item.active .accordion-panel {
    max-height: 500px; /* 足夠容納內容；若內容更多可調整 */
    padding: 0 1.2rem 0.2rem 1.2rem;
}



/* 響應式 */
@media (max-width: 480px) {
    .accordion-container {
        padding: 0.75rem;
    }
    .accordion-header {
        /* font-size: 1rem; */
        padding: 0.8rem 0.8rem;
    }
    /* .accordion-panel-inner {
        font-size: 0.9rem;
    } */
    .accordion-title{height: 65px;}
    .accordion-title>div{
        position: relative;font-size: 2rem;
    } 
}

