/**
 * IDEEDA Tech — Round 12 详情页增强
 * 1) 详情元信息条（标签 / 日期·时长 / 分享）
 * 2) 案例图集（大图 + 缩略图 + 左右滑动 + 移动端手势）
 * 3) 分类列表页视频卡片
 */

/* ── 1. Detail meta bar ── */
.ideeda-detail-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin: 0 0 clamp(18px, 2.4vw, 30px);
  padding: clamp(12px, 1.6vw, 18px) clamp(14px, 1.8vw, 22px);
  background: #F6F9FC;
  border: 1px solid #E4EBF2;
  border-radius: 14px;
}
.ideeda-detail-meta__info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  min-width: 0;
}
.ideeda-detail-meta__tags { display: flex; flex-wrap: wrap; gap: 7px; }
.ideeda-detail-meta__tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px clamp(10px, 1vw, 15px);
  border-radius: 999px;
  background: #E7F1FB;
  color: #0A66C2;
  font-size: clamp(11px, .85vw, 13px);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s, color .2s;
}
.ideeda-detail-meta__tag:hover { background: #0A66C2; color: #fff; }

.ideeda-detail-meta__dates {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 16px;
  color: #64748B;
  font-size: clamp(11px, .85vw, 13px);
}
.ideeda-detail-meta__date,
.ideeda-detail-meta__dur { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.ideeda-detail-meta__dates svg { width: 14px; height: 14px; flex: none; }

.ideeda-share.is-meta { margin: 0; padding: 0; border: 0; background: transparent; gap: 8px; }
.ideeda-share.is-meta .ideeda-share__label { display: none; }
.ideeda-share.is-meta .ideeda-share__btns { gap: 6px; }
.ideeda-share.is-meta .ideeda-share__btn {
  width: clamp(32px, 2.4vw, 40px);
  height: clamp(32px, 2.4vw, 40px);
  border-radius: 9px;
}
@media (max-width: 640px) {
  .ideeda-detail-meta { align-items: flex-start; }
  .ideeda-detail-meta__info { width: 100%; }
  .ideeda-share.is-meta { width: 100%; }
  .ideeda-share.is-meta .ideeda-share__btns { width: 100%; }
  .ideeda-share.is-meta .ideeda-share__btn { flex: 1 1 0; }
}

/* ── 2. Case gallery ── */
.cg { position: relative; margin: 0 0 clamp(22px, 3vw, 36px); }
.cg__stage {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 620px;
  overflow: hidden;
  border-radius: 14px;
  background: #0F2440;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: pan-y;
}
.cg__stage img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}
.cg__stage.is-swiping img { transition: none; }
.cg__stage img.is-entering-left  { animation: cgInLeft .26s ease-out; }
.cg__stage img.is-entering-right { animation: cgInRight .26s ease-out; }
@keyframes cgInLeft  { from { opacity:.25; transform:translateX(26px);} to {opacity:1;transform:none;} }
@keyframes cgInRight { from { opacity:.25; transform:translateX(-26px);} to {opacity:1;transform:none;} }

.cg__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: clamp(36px, 4vw, 48px);
  height: clamp(36px, 4vw, 48px);
  border: 0;
  border-radius: 50%;
  background: rgba(8, 26, 48, .62);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: background .2s, transform .2s;
}
.cg__nav:hover { background: rgba(8, 26, 48, .88); }
.cg__nav--prev { left: 12px; }
.cg__nav--next { right: 12px; }
.cg__count {
  position: absolute;
  top: 12px; right: 12px;
  z-index: 2;
  background: rgba(8, 26, 48, .76);
  color: #fff;
  font-size: 12px;
  letter-spacing: .04em;
  padding: 5px 11px;
  border-radius: 999px;
}
.cg__thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
  padding: 3px 2px 8px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.cg__thumb {
  flex: 0 0 clamp(58px, 6vw, 84px);
  height: clamp(48px, 5vw, 68px);
  padding: 2px;
  border: 2px solid transparent;
  border-radius: 8px;
  background: #EDF2F7;
  cursor: pointer;
  overflow: hidden;
  transition: border-color .2s, opacity .2s;
}
.cg__thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 5px; display: block; }
.cg__thumb.is-active { border-color: #E89A49; }
.cg__thumb:not(.is-active) { opacity: .62; }
@media (max-width: 640px) {
  .cg__stage { aspect-ratio: 1 / 1; }
  .cg__nav { opacity: .9; }
}

/* ── 3. Category cards (video / case taxonomy) ── */
.tax-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: clamp(14px, 2vw, 24px);
  margin: clamp(22px, 3vw, 34px) 0;
}
.tax-media-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #E4EBF2;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.tax-media-card:hover { transform: translateY(-3px); border-color: #C3D6E8; box-shadow: 0 10px 28px rgba(15,44,76,.10); }
.tax-media-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0F2440 center/cover no-repeat;
  overflow: hidden;
}
.tax-media-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tax-media-card__play {
  position: absolute; inset: 0; margin: auto;
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255,255,255,.92);
  display: flex; align-items: center; justify-content: center;
}
.tax-media-card__play svg { width: 18px; height: 18px; fill: #E89A49; }
.tax-media-card__dur {
  position: absolute; right: 10px; bottom: 10px;
  background: rgba(8,26,48,.78); color: #fff;
  font-size: 11px; padding: 3px 8px; border-radius: 999px;
}
.tax-media-card__body { padding: 14px 16px 18px; }
.tax-media-card__tag {
  display: inline-block; font-size: 11px; font-weight: 600;
  color: #0A66C2; background: #E7F1FB;
  padding: 3px 10px; border-radius: 999px; margin-bottom: 8px;
}
.tax-media-card__title { font-size: clamp(14px, 1.2vw, 16px); line-height: 1.4; color: #0F2C4C; margin: 0 0 6px; }
.tax-media-card__excerpt { font-size: 12px; color: #64748B; margin: 0; }
.tax-media-empty { text-align: center; padding: 60px 20px; color: #7A8794; }
