/* ======== org_list.css — 机构列表，风格参考 trainings ======== */
:root {
  --ol-accent: #f97316;
  --ol-accent-deep: #ea580c;
  --ol-text: #111827;
  --ol-muted: #6b7280;
  --ol-line: #e5e7eb;
  --ol-bg: #f9fafb;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  background: var(--ol-bg);
  color: var(--ol-text);
}

.ol-page--zh {
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}
.ol-page--en {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
}

.ol-page {
  max-width: 100%;
  min-height: 100vh;
  margin: 0 auto;
  background: #fff;
  padding-bottom: 80px;
}

/* ====== 头部 ====== */
.ol-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  position: sticky;
  top: 0;
  z-index: 5;
  background: #fff;
  border-bottom: 1px solid var(--ol-line);
}
.ol-back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.ol-back img {
  width: 18px;
  height: 18px;
  display: block;
}

/* 返回按钮（紧跟返回 icon，靠左） */
.ol-return {
  font-size: 13px;
  font-weight: 600;
  color: var(--ol-text);
  text-decoration: none;
  white-space: nowrap;
}
.ol-return:active {
  color: var(--ol-accent);
}

/* 右侧工具组：推到最右 */
.ol-header__right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}
.ol-brand {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.ol-brand__badge {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ol-accent);
  flex-shrink: 0;
}
.ol-brand__badge img {
  width: 16px;
  height: 16px;
  display: block;
}
.ol-brand strong {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.ol-brand strong span {
  color: var(--ol-accent);
}
.ol-suggest {
  padding: 4px 10px;
  border-radius: 99px;
  border: 1px solid #fdba74;
  background: #fef3e2;
  color: #c2410c;
  font-size: 10px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.ol-bell {
  padding: 2px;
}
.ol-bell img {
  width: 22px;
  height: 22px;
  display: block;
}

/* ====== 主体 ====== */
.ol-main {
  padding: 0 14px 90px;
  background: var(--ol-bg);
}

/* ====== 统计 ====== */
.ol-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 14px 0;
}
.ol-stats article {
  background: #fff;
  border: 1px solid #f1f5f9;
  border-radius: 14px;
  padding: 14px 8px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.ol-stats strong {
  display: block;
  font-size: 20px;
  font-weight: 900;
  color: var(--ol-accent);
}
.ol-stats span {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  font-weight: 500;
  color: var(--ol-muted);
}

/* ====== 结果文字 ====== */
.ol-results {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--ol-muted);
}
.ol-results strong {
  color: var(--ol-text);
  font-weight: 700;
}

/* ====== 卡片列表 ====== */
.ol-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ====== 单张卡片 ====== */
.ol-card {
  background: #fff;
  border: 1px solid var(--ol-line);
  border-radius: 16px;
  padding: 15px;
}

/* 头部 */
.ol-card__head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.ol-card__logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  background: #f1f5f9;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ol-card__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 4px;
}
.ol-card__badge {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff7ed;
  color: var(--ol-accent);
  font-size: 1.2rem;
  font-weight: 700;
  flex-shrink: 0;
}
.ol-card__body {
  min-width: 0;
  flex: 1;
}
.ol-card__body h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 机构类型 tag */
.ol-card__tag {
  display: inline-block;
  margin-top: 5px;
  padding: 2px 9px;
  border-radius: 99px;
  background: #fff1e5;
  border: 1px solid #ffd8b0;
  color: #c2410c;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.5;
}

/* 元信息行（每个 icon + 内容独立一行，纵向排列） */
.ol-card__meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
  margin-left: 54px;
  font-size: 12px;
  color: var(--ol-muted);
}
.ol-card__meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* 描述 */
.ol-card__desc {
  margin: 10px 0 0 54px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ol-muted);
}

/* 操作按钮 */
.ol-card__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}
/* 只有一个按钮时（无网站地址）靠右显示，左边留空 */
.ol-card__actions .ol-btn:only-child {
  grid-column: 2;
}
.ol-btn {
  padding: 9px 0;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  transition: all 0.15s;
}
.ol-btn--web {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}
.ol-btn--go {
  background: var(--ol-accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(249,115,22,0.25);
}
.ol-btn--go:active {
  background: var(--ol-accent-deep);
}

/* ====== 空状态 ====== */
.ol-empty {
  padding: 40px 20px;
  background: #fff;
  border: 1px solid var(--ol-line);
  border-radius: 16px;
  text-align: center;
}
.ol-empty img {
  width: 44px;
  height: 44px;
  margin: 0 auto 12px;
  opacity: 0.35;
}
.ol-empty strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
}
.ol-empty p {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--ol-muted);
}

/* ====== 通知红点 ====== */
.has-unread-notifications .ol-bell {
  position: relative;
}
.has-unread-notifications .ol-bell::after {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
}

/* ====== 底部导航 ====== */
.tp-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  bottom: env(safe-area-inset-bottom, 0px);
  width: 100%;
  max-width: none;
  margin: 0 auto;
  height: 66px;
  height: calc(66px + env(safe-area-inset-bottom));
  min-height: 66px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center;
  padding: 0 6px;
  padding-bottom: env(safe-area-inset-bottom);
  background: #ffffff;
  border-top: 1px solid var(--ol-line);
  z-index: 999;
}

.tp-bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #9ca3af;
  text-decoration: none;
  font-size: 10px;
  line-height: 1.2;
}

.tp-bottom-nav a span {
  display: flex;
  align-items: center;
  justify-content: center;
}

.tp-bottom-nav a img {
  width: 20px;
  height: 20px;
  display: block;
}

.tp-bottom-nav a.is-active {
  color: var(--ol-accent);
  font-weight: 700;
}

.tp-bottom-nav__plus span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--ol-accent);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(249, 115, 22, 0.24);
}

.tp-bottom-nav__plus img {
  width: 22px;
  height: 22px;
}

@media (min-width: 768px) {
  .ol-page {
    width: 100%;
    max-width: none;
  }
}
