/* ============================================================
   教师团队展示页样式（复刻营销页暖金权威感）
   仅作用于 .teacher-page 作用域，不影响全站其它页面
   ============================================================ */
.teacher-page * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}
.teacher-page {
    --gold: #FFB800;
    --gold-deep: #996600;
    --gold-soft: #AA8844;
    --text-main: #1D2129;
    --text-secondary: #6E7681;
    --text-light: #A0A8B3;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
    --radius-md: 12px;
    --space-sm: 16px;
    --space-md: 24px;
    --space-lg: 32px;
    --space-xl: 48px;
    min-height: 100vh;
    color: var(--text-main);
    background:
        radial-gradient(ellipse at 50% 0%, rgba(255, 184, 0, 0.12) 0%, transparent 50%),
        linear-gradient(180deg, #FFFBF0 0%, #FFF8E8 40%, #FFFDF5 100%);
}

.teacher-page .container {
    width: 1240px;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* ---------- 头部 ---------- */
.teacher-hero {
    padding: var(--space-xl) 0 var(--space-lg);
    text-align: center;
}
.teacher-hero h1 {
    font-size: 34px;
    font-weight: 700;
    color: var(--gold-deep);
    margin-bottom: var(--space-sm);
}
.teacher-hero p {
    font-size: 17px;
    color: var(--gold-soft);
    max-width: 800px;
    margin: 0 auto;
}
.teacher-split {
    width: 60px;
    height: 4px;
    margin: var(--space-md) auto 0;
    border-radius: 4px;
    background: linear-gradient(90deg, #FFB800, #FFD700);
}

/* ---------- 筛选 / 搜索栏 ---------- */
.teacher-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid #f3e9d2;
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: var(--space-lg);
    box-shadow: var(--shadow-sm);
    position: relative;
    z-index: 2;
}
.teacher-filter .tf-search {
    position: relative;
    flex: 1 1 240px;
    min-width: 200px;
}
.teacher-filter .tf-search input {
    width: 100%;
    height: 40px;
    border: 1px solid #e8e0cf;
    border-radius: 8px;
    padding: 0 14px 0 38px;
    font-size: 14px;
    outline: none;
    transition: border-color .2s;
}
.teacher-filter .tf-search input:focus { border-color: var(--gold); }
.teacher-filter .tf-search i {
    position: absolute;
    left: 13px; top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}
.teacher-filter select {
    height: 40px;
    border: 1px solid #e8e0cf;
    border-radius: 8px;
    padding: 0 12px;
    font-size: 14px;
    background: #fff;
    color: var(--text-main);
    outline: none;
    cursor: pointer;
    min-width: 130px;
}
.teacher-filter select:focus { border-color: var(--gold); }
.teacher-filter .tf-count {
    margin-left: auto;
    font-size: 13px;
    color: var(--text-secondary);
}

/* ---------- 卡片栅格（复刻 .card-grid / .card-teacher） ---------- */
.teacher-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-md);
    position: relative;
    z-index: 2;
    padding-bottom: var(--space-xl);
}
.teacher-card {
    background: linear-gradient(145deg, #FFFFFF 0%, #FFFCF5 100%);
    border-top: 3px solid var(--gold);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
    transition: all 0.35s ease;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}
.teacher-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}
.teacher-avatar {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 4px 14px rgba(255, 184, 0, 0.28);
    display: block;
    margin: 0 auto 14px;
    background: #f3ecdc;
}
.teacher-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-deep);
    font-size: 30px;
    font-weight: 700;
    background: linear-gradient(145deg, #FFF3D6, #FFE3A3);
}
.teacher-card .card-title {
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 6px;
    color: var(--text-main);
}
.teacher-card .teacher-pos {
    text-align: center;
    color: var(--gold-deep);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 10px;
}
.teacher-card .teacher-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-bottom: 4px;
}
.teacher-card .teacher-tags span {
    font-size: 12px;
    color: var(--gold-deep);
    background: #FFF6E0;
    border: 1px solid #F3E3B8;
    border-radius: 20px;
    padding: 2px 10px;
}
/* 悬浮遮罩：个人简介 */
.teacher-mask {
    position: absolute;
    left: 0; bottom: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(180deg, rgba(153, 102, 0, 0.92) 0%, rgba(255, 140, 0, 0.95) 100%);
    color: #fff;
    padding: var(--space-lg);
    transition: bottom 0.35s ease;
    overflow-y: auto;
}
.teacher-card:hover .teacher-mask { bottom: 0; }
.teacher-mask h5 { font-size: 16px; margin-bottom: 8px; opacity: .85; }
.teacher-mask p { font-size: 14px; line-height: 1.8; }

/* ---------- 加载 / 空状态 ---------- */
.teacher-state {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-secondary);
    padding: var(--space-xl) 0;
}
.teacher-spinner {
    width: 34px; height: 34px;
    border: 3px solid #f0e6cf;
    border-top-color: var(--gold);
    border-radius: 50%;
    margin: 0 auto 12px;
    animation: tf-spin 0.8s linear infinite;
}
@keyframes tf-spin { to { transform: rotate(360deg); } }

.teacher-loadmore {
    display: block;
    margin: 0 auto var(--space-xl);
    padding: 10px 36px;
    border: 1px solid var(--gold);
    background: #fff;
    color: var(--gold-deep);
    border-radius: 24px;
    font-size: 14px;
    cursor: pointer;
    transition: all .2s;
    position: relative; z-index: 2;
}
.teacher-loadmore:hover { background: var(--gold); color: #fff; }

/* ---------- 详情弹窗 ---------- */
.tm-mask {
    position: fixed; inset: 0;
    background: rgba(20, 14, 0, 0.55);
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 16px;
    z-index: 1000;
    overflow-y: auto;
}
.tm-mask.open { display: flex; }
.tm-dialog {
    width: 760px;
    max-width: 100%;
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: tm-in .25s ease;
}
@keyframes tm-in { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.tm-close {
    position: absolute;
    top: 14px; right: 18px;
    width: 34px; height: 34px;
    border: none; background: rgba(255,255,255,.25);
    color: #fff; border-radius: 50%;
    font-size: 20px; cursor: pointer; line-height: 1;
}
.tm-head {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 28px 28px 22px;
    background: linear-gradient(135deg, rgba(255,184,0,.16), rgba(255,140,0,.10));
    position: relative;
}
.tm-head img, .tm-head .teacher-avatar-fallback {
    width: 92px; height: 92px; border-radius: 50%;
    border: 3px solid #fff; box-shadow: 0 4px 14px rgba(255,184,0,.3);
    flex-shrink: 0;
}
.tm-head .tm-name { font-size: 24px; font-weight: 700; color: var(--gold-deep); }
.tm-head .tm-pos { font-size: 15px; color: var(--gold-soft); margin-top: 4px; }
.tm-head .tm-team {
    display: inline-block; margin-top: 10px;
    font-size: 12px; color: var(--gold-deep);
    background: #FFF6E0; border: 1px solid #F3E3B8;
    border-radius: 20px; padding: 2px 12px;
}
.tm-body { padding: 22px 28px 8px; }
.tm-section-title {
    font-size: 16px; font-weight: 700; color: var(--text-main);
    margin: 18px 0 12px; display: flex; align-items: center; gap: 8px;
}
.tm-section-title::before {
    content: ''; width: 4px; height: 16px; border-radius: 2px;
    background: linear-gradient(180deg, #FFB800, #FFD700);
}
.tm-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tm-tags span {
    font-size: 13px; color: var(--gold-deep);
    background: #FFF6E0; border: 1px solid #F3E3B8;
    border-radius: 20px; padding: 4px 12px;
}
.tm-bio { font-size: 14px; line-height: 1.9; color: var(--text-secondary); }

/* 评价 */
.tm-review-summary {
    display: flex; align-items: center; gap: 14px;
    background: #FFFDF6; border: 1px solid #F3E9D2;
    border-radius: 10px; padding: 12px 16px; margin-bottom: 14px;
}
.tm-score { font-size: 30px; font-weight: 700; color: var(--gold-deep); }
.tm-score small { font-size: 14px; color: var(--text-light); font-weight: 400; }
.tm-stars { color: var(--gold); font-size: 18px; letter-spacing: 2px; }
.tm-reviews { list-style: none; }
.tm-reviews li {
    padding: 12px 0; border-bottom: 1px dashed #f0e6cf;
}
.tm-reviews .rv-top { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.tm-reviews .rv-name { font-weight: 600; font-size: 14px; color: var(--text-main); }
.tm-reviews .rv-stars { color: var(--gold); font-size: 13px; }
.tm-reviews .rv-time { margin-left: auto; font-size: 12px; color: var(--text-light); }
.tm-reviews .rv-text { font-size: 14px; line-height: 1.8; color: var(--text-secondary); }

/* ---------- 响应式 ---------- */
@media (max-width: 1199px) {
    .teacher-page .container { padding: 0 20px; }
}
@media (max-width: 768px) {
    .teacher-hero h1 { font-size: 26px; }
    .teacher-hero p { font-size: 15px; }
    .teacher-filter { gap: 10px; }
    .teacher-filter .tf-search { flex: 1 1 100%; }
    .teacher-filter select { flex: 1 1 calc(50% - 5px); }
    .teacher-filter .tf-count { flex: 1 1 100%; margin-left: 0; text-align: center; }
    .teacher-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
    .tm-head { flex-direction: column; text-align: center; }
}
@media (max-width: 480px) {
    .teacher-grid { grid-template-columns: 1fr; }
}
