/* ==========================================================================
   /ielts-course/teachers.html 雅思師資介紹
   載入順序：site.css → article.css → 本檔（另載入 js/tabs.js）
   命名空間：.ip-tabs、.ip-teacher-*（從 article.css 移出）
   ========================================================================== */

.ielts-article .ip-tabs {
    margin-top: 30px;
}

.ielts-article .ip-tab-list {
    display: inline-flex;
    gap: 0;
    margin-bottom: 30px;
    border: 1px solid #222;
}

.ielts-article .ip-tabs:not(.is-ready) .ip-tab-list {
    display: none;
}

.ielts-article .ip-tab {
    min-width: 150px;
    min-height: 48px;
    padding: 10px 26px;
    background: #fff;
    color: #222;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .08em;
    transition: background .15s, color .15s;
}

.ielts-article .ip-tab+.ip-tab {
    border-left: 1px solid #222;
}

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

.ielts-article .ip-tab[aria-selected="true"] {
    background: var(--red);
    color: #fff;
}

.ielts-article .ip-tab:focus-visible {
    outline: 2px solid #222;
    outline-offset: 3px;
}

.ielts-article .ip-tab-panel+.ip-tab-panel {
    margin-top: 44px;
}

.ielts-article .ip-tabs.is-ready .ip-tab-panel+.ip-tab-panel {
    margin-top: 0;
}

.ielts-article .ip-tab-title {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 22px;
    font-size: 19px;
    font-weight: 700;
    color: #222;
}

.ielts-article .ip-tab-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--ip-border);
}

.ielts-article .ip-teacher-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px 20px;
}

.ielts-article .ip-teacher-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #fff;
    border: 1px solid var(--ip-border);
    border-bottom: 3px solid #222;
    transition: transform .2s, box-shadow .2s, border-color .2s;
}

.ielts-article .ip-teacher-card:hover {
    transform: translateY(-4px);
    border-bottom-color: var(--red);
    box-shadow: 0 14px 28px #00000014;
}

.ielts-article .ip-teacher-photo {
    position: relative;
    margin: 0;
    overflow: hidden;
    background: #eef1f4;
}

.ielts-article .ip-teacher-photo img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 5 / 5.4;
    object-fit: cover;
    object-position: center 20%;
    transition: transform .35s;
}

.ielts-article .ip-teacher-card:hover .ip-teacher-photo img {
    transform: scale(1.04);
}

.ielts-article .ip-teacher-origin {
    position: absolute;
    left: 12px;
    bottom: 12px;
    padding: 4px 10px 4px 8px;
    background: #fffffff2;
    color: #222;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    box-shadow: 0 2px 8px #0000001a;
}

.ielts-article .ip-teacher-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 18px 18px 16px;
}

.ielts-article .ip-teacher-name {
    margin: 0 0 10px;
    font-size: 20px;
    line-height: 1.35;
    letter-spacing: -.01em;
    color: var(--red);
}

.ielts-article .ip-teacher-name span {
    display: block;
    margin-top: 2px;
    font-size: 18px;
    font-weight: 600;
    color: #222;
}

.ielts-article .ip-content .ip-teacher-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.5;
}

.ielts-article .ip-teacher-badge {
    display: inline-block;
    padding: 3px 8px;
    background: #222;
    color: #fff;
    font-weight: 600;
    letter-spacing: .02em;
}

.ielts-article .ip-teacher-badge--ielts {
    background: var(--red);
}

.ielts-article .ip-teacher-badge--toeic {
    background: #1d5fb8;
}

.ielts-article .ip-teacher-badge--toefl {
    background: #6b3fa8;
}

.ielts-article .ip-teacher-sep {
    display: none;
}

.ielts-article .ip-teacher-info {
    margin: 0;
    line-height: 1.7;
}

.ielts-article .ip-teacher-info>div {
    padding: 10px 0 0;
    margin-top: 10px;
    border-top: 1px dashed var(--ip-border);
}

.ielts-article .ip-teacher-info dt {
    margin-bottom: 2px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .1em;
    color: var(--red);
}

.ielts-article .ip-teacher-info dd {
    margin: 0;
    color: #333;
}

.ielts-article .ip-teacher-info ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* 一列 4 位 → 3 位（≤1150）→ 2 位（≤900）→ 1 位（≤380） */
@media (max-width: 1150px) {

    .ielts-article .ip-teacher-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {

    .ielts-article .ip-teacher-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {

    .ielts-article .ip-tab-list {
        display: flex;
        width: 100%;
    }

    .ielts-article .ip-tab {
        flex: 1;
        min-width: 0;
        padding: 10px 12px;
    }

    .ielts-article .ip-teacher-grid {
        gap: 14px 12px;
    }

    .ielts-article .ip-teacher-body {
        padding: 14px 12px 12px;
    }

    .ielts-article .ip-teacher-name {
        font-size: 16px;
    }

    .ielts-article .ip-teacher-name span {
        font-size: 14px;
    }

    .ielts-article .ip-teacher-origin {
        left: 8px;
        bottom: 8px;
        font-size: 14px;
        padding: 2px 7px 2px 5px;
    }

    .ielts-article .ip-content .ip-teacher-badges {
        font-size: 14px;
        gap: 4px;
    }

    .ielts-article .ip-teacher-badge {
        padding: 2px 6px;
    }

    .ielts-article .ip-teacher-info {
        font-size: 14px;
        line-height: 1.65;
    }
}

@media (max-width: 380px) {

    .ielts-article .ip-teacher-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {

    .ielts-article .ip-teacher-card:hover,
    .ielts-article .ip-teacher-card:hover .ip-teacher-photo img {
        transform: none;
    }
}

