/* ==========================================================================
 * 相册集首页样式（独立文件，仅作用于 .gallery-home-*，不影响全局）
 * 布局：左侧主题色玻璃拟态分类栏 + 右侧固定 3 列的相册卡片网格
 * ========================================================================== */

.article-container .gallery-home {
  /* 自定义标题字号变量（主题无此变量，集中于此便于统一调整） */
  --font-cale2: 1.75rem;
  display: flex;
  align-items: center;       /* 高度居中：左栏与卡片区垂直居中对齐 */
  gap: 34px;                 /* 左侧导航与卡片网格之间的水平距离 */
  margin-top: 26px;          /* 与上方导航栏之间的距离 */
}

/* ---------- 左侧分类栏：按用户提供的最终样式固化 ---------- */
.article-container .gallery-home-side {
  position: sticky;
  top: 24px;
  align-self: center;
  flex: 0 0 260px;
  width: 260px;
  /* box-sizing: border-box; */
  padding: 24px 20px;
  text-align: left;
  border-radius: 18px;
  /* background: linear-gradient(150deg, var(--efu-theme-op, rgba(66, 90, 239, .14)) 0%, var(--efu-theme-op-deep, rgba(66, 90, 239, .5)) 100%); */
  /* border: 1px solid var(--efu-theme-op, rgba(66, 90, 239, .14)); */
  /* box-shadow: 0 2px 0px rgba(0, 0, 0, 0.08); */
  /* backdrop-filter: blur(14px) saturate(1.4); */
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
}

/* 品牌行：左对齐；subtitle 定位到标题右上角 */
.gallery-home-brand {
  position: relative;
  display: inline-flex;
  align-items: flex-start;
  margin: 0 0 6px;
}
.gallery-home-title {
  color: var(--efu-theme, #425aef);
  font-size: var(--font-cale2);
  font-weight: 800;
  letter-spacing: 1px;
  line-height: 1.1;
}
.gallery-home-subtitle {
  position: absolute;
  top: -2px;
  left: 100%;
  margin-left: 3px;
  color: var(--efu-theme, #425aef);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  line-height: 1;
  white-space: nowrap;
  opacity: .75;
}

/* description：强制单行 */
.gallery-home-desc {
  margin: 0 0 22px;
  color: var(--efu-fontcolor, #363636);
  /* px + !important 覆盖主题 .article-container p 的字号与颜色 */
  font-size: 11px !important;
  line-height: 1.6;
  white-space: nowrap;
  opacity: .8;
}

/* ---------- 分类列表：普通列表（无玻璃卡片），竖虚线连接 + hover 下划线 ---------- */
.gallery-home-cats {
  list-style: none;
  margin: 0;
  padding: 0 0 0 4px;
}
/* 去掉主题 .article-container ul>li:before 画的空心圆 */
.article-container .gallery-home-cats > li:before {
  display: none !important;
  content: none !important;
  background: none !important;
  border: 0 !important;
}
.gallery-home-cat {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start; /* 列表左对齐 */
  gap: 10px;
  padding: 9px 4px;
  margin-bottom: 10px;         /* 序列之间上下间距 */
  background: none;            /* li 不要玻璃拟态 */
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: var(--efu-fontcolor, #363636);
  font-size: .86rem;
  cursor: pointer;
  user-select: none;
  opacity: .78;
  transition: opacity .2s ease, color .2s ease;
}
.gallery-home-cat:hover {
  opacity: 1;
}
.gallery-home-cat.is-active {
  color: var(--efu-theme, #425aef);
  font-weight: 700;
  opacity: 1;
}

/* 左侧圆点 + 序列之间的上下虚线连接线 */
.gallery-home-cat-dot {
  position: relative;
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--efu-theme, #425aef);
  opacity: .5;
}
.gallery-home-cat.is-active .gallery-home-cat-dot {
  opacity: 1;
  box-shadow: 0 0 0 3px var(--efu-theme-op, rgba(66, 90, 239, .14));
}
/* 虚线：从当前圆点向下延伸到下一个圆点（最后一项不画） */
.gallery-home-cat:not(:last-child) .gallery-home-cat-dot::after {
  content: "";
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  height: 30px;                /* 覆盖 padding+margin 形成的间隔 */
  border-left: 1px dashed var(--efu-theme, #425aef);
  opacity: .45;
}

.gallery-home-cat-name {
  position: relative;
  flex: 0 1 auto;
  white-space: nowrap;
  padding-bottom: 3px;
}
/* hover：文字下边框从左到右移动展开 */
.gallery-home-cat-name::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--efu-theme, #425aef);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .3s ease;
}
.gallery-home-cat:hover .gallery-home-cat-name::after,
.gallery-home-cat.is-active .gallery-home-cat-name::after {
  transform: scaleX(1);
}

.gallery-home-cat-count {
  flex: 0 0 auto;
  margin-left: auto;
  font-style: normal;
  font-size: .74rem;
  opacity: .7;
}

/* ---------- 右侧网格：固定一行 3 个，卡片间距保持 ---------- */
.article-container .gallery-home-main {
  flex: 1 1 auto;
  min-width: 0;
}
.gallery-home-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;                   /* 卡片与卡片之间保持间距 */
}

/* 卡片固定 480 x 450（宽高比锁定，随列宽缩放） */
.article-container .gallery-home-card {
  margin: 0;
  width: 100%;
  max-width: 480px;
}
.gallery-home-card.is-hidden {
  display: none;
}

.article-container .gallery-home-card-link {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  width: 100%;
  height: 450px;
  border: 0 !important;
  border-radius: 16px !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
  text-decoration: none !important;
  background: #1c1c1e;
  transition: transform .3s ease, box-shadow .3s ease;
}
.article-container .gallery-home-card-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
}

.gallery-home-card-media {
  position: relative;
  display: block;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow: hidden;
}
.article-container .gallery-home-card-link .gallery-home-card-img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  object-fit: cover;
  border: 0;
  border-radius: 0 !important;
  opacity: 1;
  transition: transform .5s ease;
}
.article-container .gallery-home-card-link:hover .gallery-home-card-img {
  transform: scale(1.06);
}
.gallery-home-card-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, .18) 100%);
  pointer-events: none;
}

.gallery-home-card-date {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 3px 9px;
  font-size: .68rem;
  line-height: 1.5;
  color: #fff;
  letter-spacing: .3px;
  background: rgba(0, 0, 0, .38);
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 999px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.gallery-home-card-badges {
  position: absolute;
  top: 9px;
  right: 9px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
}
.article-container .gallery-home-card-link .gallery-home-card-avatar {
  width: 24px !important;
  height: 24px !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  object-fit: cover;
  border: 1.5px solid rgba(255, 255, 255, .9);
  border-radius: 50% !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
}
.gallery-home-card-star {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: #fff;
  font-size: .85rem;
  line-height: 1;
  background: rgba(0, 0, 0, .34);
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 50%;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.gallery-home-card-info {
  display: flex;
  flex: 0 0 58px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 12px;
  background: #1c1c1e;
  text-align: center;
}
.gallery-home-card-title {
  color: #fff;
  font-size: .92rem;
  font-weight: 700;
  letter-spacing: .5px;
  line-height: 1.3;
}
.gallery-home-card-tags {
  color: rgba(255, 255, 255, .5);
  font-size: .68rem;
  line-height: 1.3;
}

.gallery-home-card .img-alt {
  display: none !important;
}

.gallery-home-config-error {
  padding: 12px 16px;
  color: #c0392b;
  background: rgba(192, 57, 43, .08);
  border: 1px solid rgba(192, 57, 43, .3);
  border-radius: 8px;
  font-size: .9rem;
}

/* ---------- 响应式 ---------- */
@media screen and (max-width: 1100px) {
  .article-container .gallery-home { gap: 24px; }
  .article-container .gallery-home-side { flex-basis: 220px; width: 220px; }
  .gallery-home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media screen and (max-width: 640px) {
  .article-container .gallery-home {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
  }
  .article-container .gallery-home-side {
    position: static;
    flex: none;
    width: 100%;
    box-sizing: border-box;
  }
  .article-container .gallery-home-main { width: 100%; }
  .gallery-home-grid { grid-template-columns: 1fr; width: 100%; }
  .article-container .gallery-home-card { width: 100%; max-width: none; }
  .article-container .gallery-home-card-link { height: auto; }
  .gallery-home-card-media { aspect-ratio: 480 / 392; flex: none; }
}

@media (prefers-reduced-motion: reduce) {
  .article-container .gallery-home-card-link,
  .article-container .gallery-home-card-link .gallery-home-card-img,
  .gallery-home-cat-name::after {
    transition: none;
  }
}
