:root {
    --brand: #2B6CB0;
    --brand2: #5b4cdb;
    --bg: #f5f7fb;
    --card: #fff;
    --text: #1f2733;
    --muted: #6b7280;
    --line: #e5e8ef;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
}

a { text-decoration: none; color: inherit; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* 顶部 */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 50;
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
}
.logo img { height: 40px; }
.site-header nav a { margin-left: 18px; color: var(--muted); font-weight: 600; }
.site-header nav a.active { color: var(--brand); }
.lang-switch {
    margin-left: 18px;
    padding: 4px 12px;
    border: 1px solid var(--line);
    border-radius: 20px;
    color: var(--brand) !important;
    font-weight: 700;
}
.lang-switch:hover { background: #eef1f7; }

.rec-star { color: #e02424; }

/* 卡片推荐星标 */
.school-card { position: relative; }
.school-card .rec-star {
    position: absolute;
    top: 12px;
    right: 14px;
    font-size: 18px;
    line-height: 1;
    text-shadow: 0 1px 2px rgba(0,0,0,.15);
}

/* 详情页学历横向 pills */
.detail-head .meta.deg-pills {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.detail-head .meta.deg-pills .badge {
    background: rgba(255,255,255,.18);
    color: #fff;
}

/* 面包屑 banner 内的副标题（与其他二级页保持一致并补充说明） */
.breadcrumb_part .breadcrumb_iner .breadcrumb_sub {
    color: rgba(255,255,255,.9);
    font-size: 16px;
    line-height: 1.6;
    margin: 14px auto 0;
    max-width: 760px;
}

/* 筛选 */
.filters {
    background: rgba(255,255,255,.98);
    border: 1px solid rgba(226,232,240,.8);
    border-radius: 20px;
    padding: 24px;
    margin: 50px auto 0;
    max-width: 1200px;
    position: relative;
    box-shadow: 0 18px 45px rgba(15, 35, 90, .12);
    backdrop-filter: blur(8px);
}
.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
}
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 8px; font-weight: 600; }
.field input, .field select {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    font-size: 14px;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus {
    outline: none;
    border-color: var(--brand2);
    box-shadow: 0 0 0 3px rgba(91,76,219,.12);
}
.checks { display: flex; flex-direction: row; flex-wrap: wrap; gap: 12px 20px; align-items: center; }
.checks label { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; white-space: nowrap; color: var(--text); cursor: pointer; }
.checks input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--brand); }
.check-row { grid-column: 1 / -1; }
.filter-actions { display: flex; gap: 12px; margin-top: 22px; align-items: center; }
.btn {
    padding: 12px 24px;
    border-radius: 12px;
    border: 0;
    font-weight: 700;
    cursor: pointer;
    font-size: 14px;
    transition: transform .2s, box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand2) 100%);
    color: #fff;
    box-shadow: 0 6px 18px rgba(43,108,176,.3);
}
.btn-primary:hover { box-shadow: 0 8px 22px rgba(43,108,176,.4); }
.btn-ghost { background: #eef1f7; color: var(--brand); }
.btn-ghost:hover { background: #e2e8f0; }

.result-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 22px auto 14px;
    max-width: 1200px;
    padding: 0 20px;
}
.result-bar .count b { color: var(--brand); }
.view-toggle { display: flex; gap: 6px; }
.view-toggle a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
    font-weight: 600;
    line-height: 1;
}
.view-toggle a.active {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}
.bar-tools { display: flex; gap: 12px; align-items: center; }
.rec-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 13px;
    color: var(--muted);
    font-weight: 600;
    line-height: 1;
}
.rec-toggle.active {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}

/* 学校卡片 */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px;
}
.school-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: .18s;
    box-shadow: 0 4px 14px rgba(20, 40, 80, .04);
}
.school-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(20, 40, 80, .12);
    border-color: var(--brand2);
}
.sc-top h3 { margin: 0; font-size: 18px; }
.sc-tags { margin-top: 6px; display: flex; gap: 6px; }
.tag-region, .tag-city { font-size: 12px; padding: 2px 8px; border-radius: 20px; background: #eef1f7; color: var(--brand); }
.tag-city { background: #e8f0ff; color: #2f6fed; }
.sc-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { font-size: 12px; padding: 3px 9px; border-radius: 20px; font-weight: 600; background: #eef1f7; color: #444; }
.badge[data-deg="本科"] { background: #e6f4ea; color: #1e7e34; }
.badge[data-deg="硕研"] { background: #e8f0ff; color: #2f6fed; }
.badge[data-deg="博研"] { background: #f3e8ff; color: #7c3aed; }
.badge[data-deg="非学历"] { background: #fff4e5; color: #b45309; }
.badge[data-deg="专科"] { background: #fde8ee; color: #be185d; }
.sc-intro {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.sc-foot { margin-top: auto; font-size: 13px; color: var(--brand); font-weight: 600; }

/* 列表视图 */
.list-view {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.school-row {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: .18s;
    position: relative;
}
.school-row:hover {
    border-color: var(--brand2);
    box-shadow: 0 4px 14px rgba(20, 40, 80, .06);
}
.school-row .rec-star {
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 16px;
}
.school-row .sr-main { flex: 1; min-width: 0; }
.school-row h3 { margin: 0 0 6px; font-size: 17px; }
.school-row .sc-tags { margin-bottom: 8px; }
.school-row .sc-badges { margin-bottom: 8px; }
.school-row .sc-intro {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.school-row .sr-stats {
    text-align: right;
    white-space: nowrap;
    font-size: 13px;
    color: var(--brand);
    font-weight: 600;
}
@media (max-width: 760px) {
    .school-row { flex-direction: column; align-items: flex-start; }
    .school-row .sr-stats { text-align: left; }
}

/* 分页 */
.pagination { display: flex; gap: 6px; justify-content: center; padding: 0 20px 50px; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 8px 13px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
.pagination a { color: var(--brand); }
.pagination .current { background: var(--brand); color: #fff; border-color: var(--brand); }
.pagination .disabled { color: #bbb; }

.empty { padding: 60px 20px; text-align: center; color: var(--muted); }

/* 筛选区 + 右侧热门专业 */
.filters-inner { display: flex; gap: 24px; align-items: flex-start; }
.filters-main { flex: 1; min-width: 0; }

/* 筛选区下半部分：左边学历/语言，右边热门专业（填充原空白区域） */
.filters-lower { display: flex; gap: 28px; margin-top: 18px; align-items: stretch; }
.filters-lower .check-col { flex: 0 0 46%; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.filters-lower .check-row { margin: 0; }
.filters-lower .check-row .checks { flex-wrap: wrap; gap: 10px 18px; }
.major-quick { flex: 1; min-width: 0; background: #f8fafc; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; justify-content: center; }
.major-quick h3 { margin: 0 0 4px; font-size: 16px; color: var(--text); }
.major-quick .side-sub { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.major-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.mtag { display: inline-block; padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; color: #374151; background: #fff; transition: .18s; cursor: pointer; }
.mtag:hover { border-color: var(--brand2); color: var(--brand2); background: #eef2ff; }
.mtag.active { background: var(--brand); color: #fff; border-color: var(--brand); }
@media (max-width: 900px) {
  .filters-lower { flex-direction: column; gap: 18px; }
  .filters-lower .check-col { flex: none; width: 100%; }
  .major-quick { width: 100%; }
}

/* 详情页学校介绍：10 行折叠 */
.intro-clamp { max-height: 270px; overflow: hidden; position: relative; transition: max-height .3s ease; }
.intro-clamp.expanded { max-height: none; }
.intro-clamp:not(.expanded)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 56px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff); pointer-events: none;
}
.intro-toggle {
  margin-top: 14px; background: #fff; border: 1px solid #d7dcea; border-radius: 999px;
  padding: 9px 20px; color: #4f46e5; font-weight: 600; cursor: pointer; font-size: 14px; transition: .18s;
}
.intro-toggle:hover { background: #eef2ff; border-color: #c7cdf5; }

/* 详情 */
.detail-head {
    background: linear-gradient(135deg, #1e3a8a 0%, #2b6cb0 50%, #5b4cdb 100%);
    color: #fff;
    padding: 48px 20px 40px;
    position: relative;
    overflow: hidden;
}
.detail-head::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 10%, rgba(255,255,255,.18) 0%, transparent 45%),
                radial-gradient(circle at 10% 90%, rgba(0,0,0,.15) 0%, transparent 40%);
    pointer-events: none;
}
.detail-head .container { position: relative; z-index: 1; }
.detail-head h1 {
    margin: 0;
    font-size: 34px;
    font-weight: 800;
    color: #fff;
    line-height: 1.25;
    letter-spacing: -0.3px;
    text-shadow: 0 2px 6px rgba(0,0,0,.35), 0 1px 2px rgba(0,0,0,.25);
}
.detail-head h1 .rec-star {
    color: #ffd15c;
    margin-left: 8px;
    text-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.detail-head .meta { margin-top: 16px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.detail-head .meta span {
    background: rgba(255,255,255,.92);
    color: #1e3a8a;
    padding: 5px 13px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(0,0,0,.12);
    backdrop-filter: blur(2px);
}
.detail-head .meta.deg-pills { margin-top: 14px; }
.detail-head .meta.deg-pills .badge {
    background: rgba(255,255,255,.92);
    color: #1f2937;
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(0,0,0,.12);
}
.detail-head .meta.deg-pills .badge[data-deg="本科"] { background: #dcfce7; color: #166534; }
.detail-head .meta.deg-pills .badge[data-deg="硕研"] { background: #dbeafe; color: #1e40af; }
.detail-head .meta.deg-pills .badge[data-deg="博研"] { background: #f3e8ff; color: #6b21a8; }
.detail-head .meta.deg-pills .badge[data-deg="非学历"] { background: #ffedd5; color: #9a3412; }
.detail-head .meta.deg-pills .badge[data-deg="专科"] { background: #fce7f3; color: #9d174d; }
@media (max-width: 760px) {
    .detail-head { padding: 36px 16px 30px; }
    .detail-head h1 { font-size: 26px; }
}
.detail-body { max-width: 1200px; margin: 24px auto; padding: 0 20px; display: grid; gap: 20px; }
.intro-card, .major-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.intro-card h2, .major-card h2 { margin-top: 0; font-size: 20px; }
.intro-card p { line-height: 1.8; color: #374151; word-break: break-word; }
.intro-card a { color: var(--brand2); }
.major-search-wrap { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; }
.major-search { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; }
.major-showall { flex: none; white-space: nowrap; padding: 10px 16px; border: 1px solid var(--brand); background: var(--brand); color: #fff; border-radius: 10px; font-weight: 600; cursor: pointer; font-size: 14px; transition: .18s; }
.major-showall:hover { background: #255a96; border-color: #255a96; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.tab-btn { padding: 8px 16px; border: 1px solid var(--line); background: #fff; border-radius: 20px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--muted); }
.tab-btn.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.tab-btn em { font-style: normal; opacity: .8; font-weight: 700; margin-left: 4px; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.mp-pager {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin: 14px 0 4px;
}
.mp-pager a, .mp-pager span {
    min-width: 30px;
    text-align: center;
    padding: 5px 9px;
    border: 1px solid var(--line);
    border-radius: 7px;
    font-size: 13px;
    color: var(--brand);
}
.mp-pager a:hover { border-color: var(--brand2); }
.mp-pager .current { background: var(--brand); color: #fff; border-color: var(--brand); }
.mp-pager .disabled { color: #b9c0cc; border-color: var(--line); }
.major-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.major-table th, .major-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.major-table th { background: #f7f9fc; color: var(--muted); font-weight: 700; }
.major-table tbody tr:hover { background: #f7faff; }
.major-row.mp-found { background: #fff7d6 !important; box-shadow: inset 3px 0 0 #f59e0b; }
.major-row.mp-flash { animation: mpFlash 0.9s ease 3; }
@keyframes mpFlash {
    0%, 100% { background: #fff7d6; }
    50% { background: #ffe7a0; }
}
.back-link { display: inline-block; margin: 18px 0 0; color: var(--brand); font-weight: 600; }

@media (max-width: 760px) {
    .filters-grid { grid-template-columns: 1fr; }
    .grid { grid-template-columns: 1fr; }
}

/* 学校名称自动补全下拉 */
.school-ac-wrap { position: relative; }
.school-ac {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: #fff;
    border: 1px solid #e5e8ef;
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(15, 35, 90, .16);
    z-index: 999;
    max-height: 320px;
    overflow-y: auto;
}
.school-ac-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f2f7;
}
.school-ac-item:last-child { border-bottom: 0; }
.school-ac-item:hover, .school-ac-item.active { background: #eef2ff; }
.school-ac-item b {
    font-size: 14px;
    color: #1f2733;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.school-ac-item i {
    font-size: 12px;
    color: #6b7280;
    font-style: normal;
    margin-left: auto;
    white-space: nowrap;
    flex: none;
}
