/**
 * 拾光主题 · 全站卡片样式
 */

/* ============================================================
   1. 瀑布流卡片 .sg-card
   ============================================================ */

.sg-card{
  break-inside: avoid;
  display: inline-block;
  width: 100%;
  background: var(--sg-glass-bg);
  -webkit-backdrop-filter: blur(26px);
  backdrop-filter: blur(26px);
  border: 1px solid var(--sg-glass-border);
  border-radius: var(--sg-r-md);
  overflow: hidden;
  box-shadow: var(--sg-shadow-sm);
  transition:
    transform var(--sg-dur-slow) var(--sg-ease),
    box-shadow var(--sg-dur-slow) var(--sg-ease),
    border-color var(--sg-dur-slow) var(--sg-ease);
  position: relative;
  cursor: pointer;
}

.sg-card::before{
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--sg-glass-highlight);
  pointer-events: none;
  z-index: 1;
}

.sg-card:hover{
  transform: translateY(-5px);
  box-shadow: var(--sg-shadow-lg);
  border-color: rgba(10, 132, 255, .22);
}

.sg-card-link{
  display: block;
  text-decoration: none;
  color: inherit;
}

.sg-card-thumb{
  width: 100%;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #eceef1, #dfe2e7);
}

.sg-card-thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .6s var(--sg-ease);
}

.sg-card:hover .sg-card-thumb img{
  transform: scale(1.05);
}

.sg-card-thumb-placeholder{
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e8eaf0, #d8dce4);
}

.sg-card-body{ padding: 14px 15px 15px; }

.sg-card-title{
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -.012em;
  line-height: 1.42;
  color: var(--sg-text);
  margin-bottom: 9px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sg-card-tags{
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.sg-card-tag{
  font-size: 10.5px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 5px;
  color: var(--sg-text-2);
  background: rgba(0, 0, 0, .04);
  text-decoration: none;
}

.sg-card-tag-accent{
  color: var(--sg-accent);
  background: var(--sg-accent-soft);
}

/* ============================================================
   2. 文章列表卡片 .sg-article-card
   ============================================================ */

.sg-article-card{
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 16px 20px;
  background: var(--sg-glass-bg);
  -webkit-backdrop-filter: blur(26px);
  backdrop-filter: blur(26px);
  border: 1px solid var(--sg-glass-border);
  border-radius: var(--sg-r-md);
  box-shadow: var(--sg-shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: all var(--sg-dur-slow) var(--sg-ease);
  cursor: pointer;
}

.sg-article-card:hover{
  transform: translateY(-2px);
  box-shadow: var(--sg-shadow-md);
  border-color: rgba(10, 132, 255, .18);
}

.sg-article-thumb{
  width: 112px;
  aspect-ratio: 4 / 3;
  flex-shrink: 0;
  border-radius: var(--sg-r-sm);
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, #d4d8de, #bfc5cf);
}

.sg-article-thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sg-article-thumb-placeholder{
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e8eaf0, #d8dce4);
}

.sg-article-body{ flex: 1; min-width: 0; }

.sg-article-meta{
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  color: var(--sg-text-3);
  font-weight: 500;
  margin-bottom: 7px;
}

.sg-article-cat{ color: var(--sg-accent); font-weight: 600; }

.sg-article-dot{
  width: 2.5px;
  height: 2.5px;
  border-radius: 50%;
  background: currentColor;
  opacity: .45;
}

.sg-article-title{
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -.014em;
  color: var(--sg-text);
  margin-bottom: 6px;
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.sg-article-excerpt{
  font-size: 13px;
  color: var(--sg-text-2);
  line-height: 1.55;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sg-article-arrow{
  flex-shrink: 0;
  color: var(--sg-text-3);
  transition: all var(--sg-dur-base) var(--sg-ease);
}

.sg-article-card:hover .sg-article-arrow{
  color: var(--sg-accent);
  transform: translateX(5px);
}

/* ============================================================
   3. 相关推荐卡片 .sg-single-related-card
   ============================================================ */

.sg-single-related-card{
  display: flex;
  flex-direction: column;
  background: var(--sg-glass-bg);
  -webkit-backdrop-filter: blur(26px);
  backdrop-filter: blur(26px);
  border: 1px solid var(--sg-glass-border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--sg-shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: all var(--sg-dur-slow) var(--sg-ease);
  cursor: pointer;
}

.sg-single-related-card:hover{
  transform: translateY(-5px);
  box-shadow: var(--sg-shadow-lg);
  border-color: rgba(10, 132, 255, .22);
}

.sg-single-related-thumb{
  width: 100%;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #d4d8de, #bfc5cf);
  overflow: hidden;
}

.sg-single-related-thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sg-single-related-thumb-placeholder{
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e8eaf0, #d8dce4);
}

.sg-single-related-body{ padding: 16px 18px 18px; }

.sg-single-related-cat{
  font-size: 11px;
  font-weight: 700;
  color: var(--sg-accent);
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.sg-single-related-card-title{
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -.012em;
  line-height: 1.4;
  color: var(--sg-text);
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sg-single-related-date{
  font-size: 12px;
  font-weight: 500;
  color: var(--sg-text-3);
}

/* ============================================================
   4. 卡片容器（统一瀑布流 / 列表的间距）
   ============================================================ */

.sg-cat-masonry,
.sg-rs-masonry,
.sg-blog-masonry{
  column-gap: 18px;
  padding-bottom: 20px;
}

.sg-cat-masonry > .sg-card,
.sg-rs-masonry > .sg-card,
.sg-blog-masonry > .sg-card{
  margin-bottom: 18px;
}

.sg-cat-list,
.sg-rs-list,
.sg-article-list{
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 20px;
}

/* ============================================================
   5. 响应式
   ============================================================ */

@media (max-width: 768px){

  .sg-card{ border-radius: 14px; }

  .sg-card-body{ padding: 11px 12px 12px; }

  .sg-card-title{ font-size: 12.5px; margin-bottom: 7px; }

  .sg-card-tag{ font-size: 10px; padding: 2px 7px; }

  .sg-article-card{
    gap: 14px;
    padding: 14px 16px;
    border-radius: 16px;
  }

  .sg-article-thumb{ width: 76px; border-radius: 11px; }

  .sg-article-meta{ font-size: 11px; margin-bottom: 5px; }

  .sg-article-title{ font-size: 14px; margin-bottom: 4px; }

  .sg-article-excerpt{ display: none; }

  .sg-cat-masonry,
  .sg-rs-masonry,
  .sg-blog-masonry{
    column-gap: 10px;
  }

  .sg-cat-masonry > .sg-card,
  .sg-rs-masonry > .sg-card,
  .sg-blog-masonry > .sg-card{
    margin-bottom: 10px;
  }

  .sg-cat-list,
  .sg-rs-list,
  .sg-article-list{
    gap: 10px;
  }
}