/* ==========================================================================
   /student-stories/（列表頁 index.html ＋ 學員心得內頁 student-*.html） 雅思學員心得
   載入順序：site.css → article.css → 本檔
   命名空間：.ss-*（列表頁小卡與分頁）、.sst-*（內頁公版）
   ========================================================================== */

/* ##########################################################################
   A. 列表頁 /student-stories/index.html
   ########################################################################## */

/* ---------- 01｜學員心得小卡 ---------- */
.ielts-article .ss-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.ielts-article .ss-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 26px 26px 22px;
    background: #fff;
    border: 1px solid var(--ip-border);
    border-top: 3px solid #222;
    transition: border-color .2s;
}

.ielts-article .ss-card:hover {
    border-top-color: var(--red);
}

.ielts-article .ss-card-top {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 18px;
    margin-bottom: 20px;
    border-bottom: 1px dashed var(--ip-border);
}

/* 照片：替換成 <img> 後自動裁成正方形 */
.ielts-article .ss-avatar {
    flex: none;
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    overflow: hidden;
    background: var(--ip-cream);
    color: #b5aea6;
}

.ielts-article .ss-avatar svg {
    width: 30px;
    height: 30px;
    stroke-width: 1.4;
}

.ielts-article .ss-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 25%;
}

.ielts-article .ss-person {
    flex: 1;
    min-width: 0;
}

.ielts-article .ip-content .ss-name {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.5;
    color: #222;
}

.ielts-article .ip-content .ss-profile {
    margin: 2px 0 0;
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

/* 身分與目標各自不斷行，換行只發生在「・」之後 */
.ielts-article .ss-profile span {
    display: inline-block;
}

.ielts-article .ip-content .ss-score {
    flex: none;
    margin: 0;
    padding-left: 14px;
    border-left: 1px solid var(--ip-border);
    text-align: right;
    line-height: 1;
}

.ielts-article .ss-score span {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .08em;
    color: #8a8a8a;
    white-space: nowrap;
}

.ielts-article .ss-score strong {
    font: italic 34px/1 Georgia, serif;
    color: var(--red);
}

.ielts-article .ss-card h3 {
    margin: 0 0 10px;
    font-size: clamp(18px, 1.5vw, 20px);
    line-height: 1.55;
    font-weight: 700;
    letter-spacing: 0;
    color: #222;
}

.ielts-article .ip-content .ss-card h3+p {
    margin: 0 0 18px;
    font-size: 15px;
    line-height: 1.9;
}

.ielts-article .ss-card-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--ip-border);
    font-size: 15px;
    font-weight: 700;
    color: #222;
}

.ielts-article .ss-card-link span {
    color: var(--red);
    transition: transform .2s;
}

.ielts-article .ss-card-link:hover {
    color: var(--red);
}

.ielts-article .ss-card-link:hover span {
    transform: translateX(4px);
}

/* ---------- 數字分頁（超過 10 位學員時自動出現） ---------- */
.ielts-article .ss-pager {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 36px;
}

.ielts-article .ss-page,
.ielts-article .ss-page-gap {
    display: grid;
    place-items: center;
    min-width: 44px;
    height: 44px;
    padding: 0 10px;
    font: 16px/1 Georgia, serif;
}

.ielts-article .ss-page {
    border: 1px solid #222;
    background: #fff;
    color: #222;
    transition: background .15s, color .15s;
}

.ielts-article .ss-page:hover {
    background: #f8edef;
    color: var(--red);
}

.ielts-article .ss-page[aria-current="page"] {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
}

.ielts-article .ss-page-step {
    font-size: 22px;
}

.ielts-article .ss-page-gap {
    color: #999;
}

/* ---------- RWD ---------- */
@media (max-width: 1100px) {
    .ielts-article .ss-grid {
        gap: 18px;
    }

    .ielts-article .ss-card {
        padding: 22px 20px 18px;
    }

    .ielts-article .ss-avatar {
        width: 56px;
        height: 56px;
    }
}

@media (max-width: 760px) {
    .ielts-article .ss-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
        margin-top: 24px;
    }

    .ielts-article .ss-pager {
        gap: 6px;
        margin-top: 28px;
    }

    .ielts-article .ss-page,
    .ielts-article .ss-page-gap {
        min-width: 40px;
        height: 40px;
        padding: 0 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ielts-article .ss-card-link:hover span {
        transform: none;
    }
}

/* ##########################################################################
   B. 學員心得內頁【公版】/student-stories/student-*.html
   ########################################################################## */

/* ---------- 側欄：學員資料卡＋目錄一起固定 ---------- */
.ielts-article .sst-side {
    position: sticky;
    top: var(--ip-scroll);
}

.ielts-article .sst-side .ip-toc {
    position: static;
}

.ielts-article .sst-profile {
    margin-bottom: 28px;
    padding: 22px 20px 20px;
    background: var(--ip-cream);
    border-top: 3px solid var(--red);
}

.ielts-article .sst-profile-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ielts-article .sst-avatar {
    flex: none;
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    overflow: hidden;
    background: #fff;
    color: #b5aea6;
}

.ielts-article .sst-avatar svg {
    width: 28px;
    height: 28px;
    stroke-width: 1.4;
}

.ielts-article .sst-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 25%;
}

.ielts-article .sst-name {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    color: #222;
}

.ielts-article .sst-role {
    margin: 12px 0 0;
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

/* 身分放在照片下方、使用整張卡片寬度；換行只發生在「・」之後 */
.ielts-article .sst-role span {
    display: inline-block;
    white-space: nowrap;
}

.ielts-article .sst-overall {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin: 18px 0 12px;
    padding-top: 14px;
    border-top: 1px solid var(--ip-border);
    color: #222;
}

.ielts-article .sst-overall span {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .08em;
    color: #8a8a8a;
}

.ielts-article .sst-overall strong {
    font: italic 42px/1 Georgia, serif;
    color: var(--red);
}

/* 沒有四科分數時，總分即為資料卡最後一列 */
.ielts-article .sst-overall:last-child {
    margin-bottom: 0;
}

.ielts-article .sst-bands {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    margin: 0;
    background: var(--ip-border);
    border: 1px solid var(--ip-border);
}

.ielts-article .sst-bands>div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px;
    padding: 8px 10px;
    background: #fff;
}

.ielts-article .sst-bands dt {
    font-size: 14px;
    color: #666;
}

.ielts-article .sst-bands dd {
    margin: 0;
    font: 19px/1.2 Georgia, serif;
    color: #222;
}

/* ---------- 內文：控制行長，提升閱讀舒適度 ---------- */
.ielts-article .sst-article {
    max-width: 800px;
    font-size: 17px;
    line-height: 2;
}

.ielts-article .sst-article .ip-intro {
    font-size: 18px;
}

/* ---------- 成績單圖片 ---------- */
.ielts-article .sst-report {
    margin: 8px 0 4px;
}

/* 成績單：完整顯示，不裁切 */
.ielts-article .sst-report img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    background: var(--ip-cream);
    border: 1px solid var(--ip-border);
}

/* ---------- 重點引言 ---------- */
.ielts-article .ip-content .sst-quote {
    position: relative;
    margin: 30px 0;
    padding: 24px 28px 24px 66px;
    background: var(--ip-cream);
    border-left: 3px solid var(--red);
    font-size: 18px;
    line-height: 1.9;
    color: #222;
}

.ielts-article .sst-quote::before {
    content: "“";
    position: absolute;
    top: 16px;
    left: 20px;
    font: 60px/1 Georgia, serif;
    color: var(--red);
}

/* ---------- 四科成績與準備方法 ---------- */
.ielts-article .sst-skills {
    border-top: 2px solid #222;
}

.ielts-article .sst-skill {
    position: relative;
    padding: 28px 0 28px 140px;
    border-bottom: 1px solid var(--ip-border);
}

.ielts-article .sst-skill:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.ielts-article .sst-skill h3 {
    margin: 0 0 10px;
    font-size: clamp(18px, 1.6vw, 21px);
    line-height: 1.55;
    letter-spacing: 0;
    color: #222;
}

/* 科目與分數放在左欄 */
.ielts-article .sst-skill-label {
    position: absolute;
    top: 30px;
    left: 0;
    width: 110px;
    padding-right: 20px;
    border-right: 1px solid var(--ip-border);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    color: #222;
}

.ielts-article .sst-skill-label strong {
    display: block;
    margin-top: 6px;
    font: italic 46px/1 Georgia, serif;
    color: var(--red);
}

.ielts-article .ip-content .sst-skill p {
    margin: 0;
}

/* 標題沒有分數時（例如只有「閱讀」）：科目放大顯示 */
.ielts-article .sst-skills--plain .sst-skill-label {
    font-size: 22px;
    color: var(--red);
}

/* ---------- 提醒框 ---------- */
.ielts-article .ip-content .sst-tip {
    display: flex;
    gap: 14px;
    margin: 26px 0 0;
    padding: 20px 24px;
    background: #fff;
    border: 1px solid var(--ip-border);
    border-left: 3px solid var(--red);
    font-size: 16px;
    line-height: 1.9;
}

.ielts-article .sst-tip svg {
    flex: none;
    width: 22px;
    height: 22px;
    margin-top: 5px;
    color: var(--red);
}

/* ---------- 結尾建議區塊 ---------- */
.ielts-article .ip-section.sst-closing {
    margin-top: 44px;
    padding: 36px 36px 32px;
    background: var(--ip-cream);
    border-top: 3px solid #222;
    border-bottom: 0;
}

.ielts-article .sst-closing p:last-child {
    margin-bottom: 0;
}

/* ---------- RWD ---------- */
@media (max-width: 1050px) {
    .ielts-article .sst-profile {
        padding: 18px 14px 16px;
    }

    .ielts-article .sst-avatar {
        width: 48px;
        height: 48px;
    }

    .ielts-article .sst-bands>div {
        padding: 7px 8px;
    }

    .ielts-article .sst-skill {
        padding-left: 120px;
    }

    .ielts-article .sst-skill-label {
        width: 96px;
    }
}

@media (max-width: 760px) {
    .ielts-article .sst-side {
        position: static;
    }

    .ielts-article .sst-profile {
        padding: 20px 18px 18px;
    }

    .ielts-article .sst-bands {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .ielts-article .sst-bands>div {
        flex-direction: column;
        align-items: center;
        gap: 2px;
        padding: 8px 4px;
    }

    .ielts-article .sst-article {
        font-size: 16px;
        line-height: 1.95;
    }

    .ielts-article .sst-article .ip-intro {
        font-size: 16px;
    }

    .ielts-article .ip-content .sst-quote {
        padding: 20px 18px 20px 50px;
        font-size: 17px;
    }

    .ielts-article .sst-quote::before {
        top: 14px;
        left: 14px;
        font-size: 48px;
    }

    .ielts-article .sst-skill {
        padding: 24px 0;
    }

    .ielts-article .sst-skill-label {
        position: static;
        display: flex;
        align-items: baseline;
        gap: 10px;
        width: auto;
        margin-bottom: 6px;
        padding: 0;
        border: 0;
    }

    .ielts-article .sst-skill-label strong {
        margin: 0;
        font-size: 36px;
    }

    .ielts-article .sst-skills--plain .sst-skill-label {
        font-size: 19px;
    }

    .ielts-article .sst-skill-title {
        display: block;
    }

    .ielts-article .ip-content .sst-tip {
        padding: 16px 18px;
        font-size: 15px;
    }

    .ielts-article .ip-section.sst-closing {
        margin-top: 32px;
        padding: 26px 20px 24px;
    }
}
