/* ============ 合作院校与机构页面 ============ */

/* Hero 区 */
.pi-hero {
    background: linear-gradient(135deg, #0d2b55 0%, #0060bd 60%, #2089dc 100%);
    padding: 4rem 0 3.5rem;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.pi-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 85% 20%, rgba(255,255,255,0.12) 0%, transparent 55%),
                radial-gradient(circle at 15% 80%, rgba(255,255,255,0.08) 0%, transparent 45%);
    pointer-events: none;
}

.pi-hero .container {
    position: relative;
    z-index: 2;
}

.pi-hero-title {
    font-size: 2.4rem;
    font-weight: 700;
    margin: 0 0 0.75rem;
    letter-spacing: 0.02em;
}

.pi-hero-sub {
    font-size: 1.05rem;
    opacity: 0.9;
    margin: 0;
    line-height: 1.7;
    max-width: 720px;
}

/* 大类切换：国外院校 / 国内机构 */
.pi-category-wrap {
    background: #f8f9fa;
    border-bottom: 1px solid #e0e6ed;
    padding: 1.25rem 0;
}

.pi-category-bar {
    display: flex;
    gap: 0;
    justify-content: center;
}

.pi-cat-btn {
    padding: 0.65rem 2.5rem;
    border: 2px solid #0d6efd;
    background: #fff;
    color: #0d6efd;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    border-radius: 0;
}

.pi-cat-btn:first-child {
    border-radius: 8px 0 0 8px;
}

.pi-cat-btn:last-child {
    border-radius: 0 8px 8px 0;
    border-left: none;
}

.pi-cat-btn.active {
    background: #0d6efd;
    color: #fff;
}

.pi-cat-btn:hover:not(.active) {
    background: #e7f0ff;
}

/* 机构 tab 内部子切换 */
.pi-subtabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
}

.pi-subtab-btn {
    padding: 0.5rem 1.75rem;
    border: 1.5px solid #0d6efd;
    background: #fff;
    color: #0d6efd;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 0;
}

.pi-subtab-btn:first-child {
    border-radius: 6px 0 0 6px;
}

.pi-subtab-btn:last-child {
    border-radius: 0 6px 6px 0;
    border-left: none;
}

.pi-subtab-btn.active {
    background: #0d6efd;
    color: #fff;
}

.pi-subtab-btn:hover:not(.active) {
    background: #e7f0ff;
}

.pi-hero-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.pi-hero-stat {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    min-width: 160px;
}

.pi-hero-stat .num {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
}

.pi-hero-stat .lbl {
    font-size: 0.85rem;
    opacity: 0.85;
    margin-top: 0.2rem;
}

/* 国家选项卡 */
.pi-tabs-wrap {
    background: #fff;
    border-bottom: 1px solid var(--border, #e5e7eb);
    position: sticky;
    top: 60px;
    z-index: 20;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

.pi-tabs-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.pi-tabs-scroll::-webkit-scrollbar {
    display: none;
}

.pi-tabs {
    display: flex;
    gap: 0.15rem;
    padding: 0.75rem 0;
    min-width: max-content;
}

.pi-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.7rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 9999px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--muted-foreground, #64748b);
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    font-family: inherit;
    line-height: 1;
}

.pi-tab-btn .pi-flag {
    font-size: 1.1rem;
    line-height: 1;
}

.pi-tab-btn .pi-count {
    display: inline-block;
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    line-height: 1.2;
    margin-left: 0.15rem;
}

.pi-tab-btn:hover {
    color: var(--primary, #0060bd);
    background: #f0f7ff;
}

.pi-tab-btn.active {
    background: var(--primary, #0060bd);
    color: #fff;
    border-color: var(--primary, #0060bd);
    box-shadow: 0 4px 14px rgba(0,96,189,0.28);
}

.pi-tab-btn.active .pi-count {
    background: rgba(255,255,255,0.25);
    color: #fff;
}

/* 内容区 */
.pi-content {
    padding: 2.5rem 0 4rem;
    background: #fff;
    min-height: 400px;
}

.pi-country-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
    padding-left: 0.75rem;
    border-left: 4px solid var(--primary, #0060bd);
}

.pi-country-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: var(--foreground, #1a1a1a);
}

.pi-country-badge {
    background: linear-gradient(135deg, #e8f0fe 0%, #d0e2ff 100%);
    color: var(--primary, #0060bd);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.3rem 0.85rem;
    border-radius: 9999px;
    margin-left: auto;
}

/* 机构分组标签（国外机构 / 国内机构） */
.pi-section-label {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary, #0060bd);
    margin: 1.5rem 0 1rem;
    padding-left: 0.75rem;
    border-left: 4px solid var(--primary, #0060bd);
    line-height: 1.4;
}

.pi-section-label:first-of-type {
    margin-top: 0;
}

/* 院校卡片网格 */
.pi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.pi-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    position: relative;
    background: #fff;
    border: 1px solid #e8edf3;
    border-radius: 10px;
    padding: 1.5rem 0.75rem 1rem;
    min-height: 130px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.pi-card-watermark {
    position: absolute;
    top: 50%;
    right: 0.25rem;
    transform: translateY(-50%);
    font-size: 4.5rem;
    font-weight: 800;
    color: rgba(0, 96, 189, 0.06);
    pointer-events: none;
    line-height: 1;
    font-family: 'Microsoft YaHei', '微软雅黑', sans-serif;
    z-index: 0;
}

.pi-card-name-en {
    position: relative;
    z-index: 1;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #2c5aa0;
    line-height: 1.35;
    min-height: 2.7rem;
    display: flex;
    align-items: center;
    text-align: left;
    margin-bottom: 0.4rem;
    word-break: keep-all;
    overflow-wrap: break-word;
}

.pi-card-divider {
    position: relative;
    z-index: 1;
    width: 24px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary, #0060bd), var(--primary-light, #3b9eff));
    border-radius: 1px;
    margin: 0 0 0.4rem 0;
}

.pi-card-name-cn {
    position: relative;
    z-index: 1;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #1a1a1a;
    line-height: 1.35;
    margin-top: auto;
}

.pi-card:hover {
    border-color: var(--primary, #0060bd);
    box-shadow: 0 4px 16px rgba(0, 96, 189, 0.12);
    transform: translateY(-2px);
}

a.pi-card {
    text-decoration: none;
    color: inherit;
}

/* ============ 响应式 ============ */
@media (max-width: 1024px) {
    .pi-hero { padding: 3rem 0 2.75rem; }
    .pi-hero-title { font-size: 2rem; }
    .pi-grid { grid-template-columns: repeat(4, 1fr); gap: 0.9rem; }
}

@media (max-width: 768px) {
    .pi-hero { padding: 2.5rem 0 2rem; }
    .pi-hero-title { font-size: 1.65rem; }
    .pi-hero-sub { font-size: 0.95rem; }
    .pi-hero-stats { gap: 1rem; }
    .pi-hero-stat { padding: 0.85rem 1.1rem; min-width: 130px; }
    .pi-hero-stat .num { font-size: 1.5rem; }
    .pi-country-title { font-size: 1.25rem; }
    .pi-content { padding: 1.75rem 0 3rem; }
    .pi-tabs-wrap { top: 52px; }
    .pi-tab-btn { font-size: 0.85rem; padding: 0.5rem 0.8rem; }
    .pi-grid { grid-template-columns: repeat(3, 1fr); gap: 0.8rem; }
    .pi-card { padding: 1.25rem 0.5rem 1rem; min-height: 100px; }
    .pi-card-watermark { font-size: 3.5rem; }
    .pi-card-name-en { font-size: 0.85rem; }
    .pi-card-name-cn { font-size: 0.75rem; }
    .pi-section-label { font-size: 0.9rem; margin: 1.1rem 0 0.8rem; }
}

@media (max-width: 480px) {
    .pi-hero-title { font-size: 1.4rem; }
    .pi-grid { grid-template-columns: repeat(2, 1fr); gap: 0.65rem; }
    .pi-card { padding: 1rem 0.5rem; min-height: 90px; }
    .pi-card-watermark { font-size: 3rem; }
    .pi-card-name-en { font-size: 0.78rem; }
    .pi-card-name-cn { font-size: 0.7rem; }
    .pi-country-badge { font-size: 0.75rem; padding: 0.25rem 0.65rem; }
}
