/* ============================================================
   马蒂斯美术教育 — 站点自定义样式
   这个文件是我方维护的（原站主题样式不动，都在 wp-content 里）
   想改哪里直接改这里，改完跑一次 node _build/build.js 就生效
   ============================================================ */

/* ---------- 教学团队：横向长条卡片，一行 2 个（方案 A）---------- */
.teacher-section {
  padding: 48px 0 64px;
  background: #fff;
}

.teacher-section__head {
  text-align: center;
  margin-bottom: 34px;
}

.teacher-section__head .en {
  display: block;
  font-size: 13px;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: #b9a06a;
  margin-bottom: 8px;
}

.teacher-section__head h2 {
  font-size: 30px;
  margin: 0 0 10px;
  font-weight: 600;
}

.teacher-section__head p {
  margin: 0;
  color: #777;
  font-size: 14px;
}

.teacher-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));   /* 电脑 3 列，平板 2 列，手机 1 列 */
  gap: 20px;
  /* 卡片网格被放在原站那个装师资拼图的容器里，而那个容器是 flex 布局。
     flex 里的子元素默认「按内容撑多大就多大」，不会自己铺满，
     结果整行只有 700 像素宽、比别的页面窄一大截。
     这里显式给宽度，并和站内其他页面正文对齐（正文容器实测就是 1140 像素）。 */
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
}

.teacher-card {
  display: flex;
  gap: 16px;
  padding: 14px;
  border: 1px solid #e8e9ec;
  border-radius: 12px;
  background: #fff;
  transition: box-shadow .2s ease, transform .2s ease;
}

.teacher-card:hover {
  box-shadow: 0 10px 26px rgba(0, 0, 0, .08);
  transform: translateY(-2px);
}

.teacher-card__photo {
  flex: 0 0 120px;
  width: 120px;
  height: 120px;
  border-radius: 8px;
  object-fit: cover;
  object-position: center top;
  background: #f0f1f3;
}

.teacher-card__name {
  font-size: 16.5px;
  font-weight: 600;
  margin-bottom: 6px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.teacher-card__role {
  font-size: 11.5px;
  font-weight: 400;
  color: #b9a06a;
  border: 1px solid #e2d3ad;
  border-radius: 999px;
  padding: 1px 8px;
  white-space: nowrap;
}

.teacher-card__list {
  margin: 0;
  padding-left: 15px;
  color: #666;
  font-size: 13px;
  line-height: 1.75;
}

/* 平板：改一行 2 个（768～1024 这个区间放 3 个会把文字挤到折行） */
@media (max-width: 1024px) {
  .teacher-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}

/* 小屏平板：卡片整体缩小一点 */
@media (max-width: 860px) {
  .teacher-grid { gap: 14px; }
  .teacher-card { gap: 13px; padding: 12px; }
  .teacher-card__photo { flex-basis: 96px; width: 96px; height: 96px; }
  .teacher-card__name { font-size: 15.5px; }
  .teacher-card__list { font-size: 12.5px; }
}

/* 手机：改一行 1 个，照片放大回 110 */
@media (max-width: 640px) {
  .teacher-section { padding: 34px 0 46px; }
  .teacher-section__head h2 { font-size: 24px; }
  .teacher-grid { grid-template-columns: 1fr; }
  .teacher-card__photo { flex-basis: 110px; width: 110px; height: 110px; }
}

@media (max-width: 380px) {
  .teacher-card__photo { flex-basis: 88px; width: 88px; height: 88px; }
  .teacher-card__list { font-size: 12px; }
}

/* ---------- 顶部主菜单：鼠标点击时不再出现那圈橙色细线 ----------
   原站主题里有一条 a:focus{outline:solid 1px !important}，
   而菜单文字移上去会变橙（a:hover{color:#f3982c}），描边颜色是跟着文字颜色走的，
   所以点下去的瞬间，菜单项左右两边就会冒出两条橙色竖线。
   这里只掐掉「鼠标点出来的」那种；键盘 Tab 切过去的仍然保留提示边框，
   键盘用户不会失去当前位置的提示。 */
#site-navigation-wrap .dropdown-menu > li > a:focus:not(:focus-visible),
#mobile-dropdown ul li a:focus:not(:focus-visible) {
  outline: 0 !important;
}

/* ---------- 站内搜索弹层 ---------- */
.site-search { position: fixed; inset: 0; z-index: 99999; display: none; }
.site-search.is-open { display: block; }
.site-search__mask { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); }
.site-search__panel {
  position: relative; max-width: 720px; margin: 8vh auto 0; background: #fff;
  border-radius: 12px; box-shadow: 0 20px 60px rgba(0, 0, 0, .28);
  max-height: 78vh; display: flex; flex-direction: column; overflow: hidden;
}
.site-search__bar { display: flex; align-items: center; border-bottom: 1px solid #eceef1; }
.site-search__input {
  flex: 1; border: 0; outline: 0; padding: 16px 18px; font-size: 16px; background: transparent;
}
.site-search__close {
  border: 0; background: transparent; font-size: 26px; line-height: 1; color: #999;
  padding: 8px 18px; cursor: pointer;
}
.site-search__close:hover { color: #333; }
.site-search__body { overflow-y: auto; padding: 8px 0; }
.site-search__hint { color: #888; font-size: 14px; padding: 18px; margin: 0; }
.site-search__list { list-style: none; margin: 0; padding: 0; }
.site-search__list li { border-bottom: 1px solid #f2f3f5; }
.site-search__list li:last-child { border-bottom: 0; }
.site-search__list a { display: block; padding: 12px 18px; text-decoration: none; color: inherit; }
.site-search__list a:hover { background: #f7f8fa; }
.site-search__title { display: block; font-size: 15.5px; font-weight: 600; color: #1a1a1a; }
.site-search__label {
  display: inline-block; font-size: 11.5px; color: #b9a06a; background: #faf7ef;
  border-radius: 4px; padding: 1px 7px; margin: 4px 0;
}
.site-search__snippet { display: block; font-size: 13px; color: #6b7280; line-height: 1.65; margin-top: 3px; }
.site-search mark { background: #fff2a8; color: inherit; padding: 0 1px; border-radius: 2px; }

@media (max-width: 760px) {
  .site-search__panel { margin: 0; max-height: 100vh; height: 100vh; border-radius: 0; }
}

/* ---------- 公众号搬运文章的正文排版 ----------
   抓取时公众号的 <section align="center"> 会被转成 <p class="wx-center">。
   这条居中规则之前误加到了 src/_layout/base.css（那个文件前台根本不加载），
   导致前台段落是左对齐、后台编辑器里却是居中，两边看着不一样。
   放到这里（前台真正加载的样式文件）之后，两边效果就一致了。
   注意选择器不带 p：抓取时 align="center" 可能落在 div / h2 等任何标签上，
   只写 p 的话那几种就居中不了（后台也是同样的写法）。 */
.entry-content .wx-center {
  text-align: center;
}

/* 段落间距和行高，与后台编辑器里看到的一致 */
.entry-content p {
  margin: 0 0 1em;
  line-height: 1.85;
}

/* 正文插图：居中、限宽、圆角，同样与后台编辑器一致 */
.entry-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.2em auto;
  border-radius: 6px;
}
