/* home.css —— 从 photography.css 拆出（原第 25-301 行）
   首页网格 + 徽章 + 标签筛选
   拆分日期：2026-10-30 */

/* ---------- 首页网格布局 ---------- */
.photography-home {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 2rem;
  background: transparent;
  min-height: 100vh;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid rgba(139, 69, 19, 0.2);
}

.section-title h2 {
  font-size: 1.6rem;
  color: #8B4513;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-weight: 600;
}

.view-all-link {
  font-size: 0.95rem;
  color: #8B4513;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 500;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  background: rgba(139, 69, 19, 0.08);
  transition: all 0.3s ease;
}

.view-all-link:hover {
  background: rgba(139, 69, 19, 0.15);
  transform: translateY(-1px);
}

.latest-works {
  margin-bottom: 3.5rem;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.work-item {
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: none;
  border-radius: 12px;
  padding: 0; /* 去除相框留白，让图片贴合 */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden; /* 裁剪图片圆角 */
}

.work-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.work-image {
  aspect-ratio: 4 / 3; /* 核心：3:4 黄金比例 */
  overflow: hidden;
  position: relative;
}

.work-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.work-item:hover .work-image img {
  transform: scale(1.05);
}

/* ---------- 移动端响应式修复 ---------- */
@media (max-width: 768px) {
  .photography-home {
    /* 将原来 1.5rem (24px) 的 padding 缩减为 0.5rem (8px)，释放 32px 宽度 */
    padding: 1rem 0.5rem 1.5rem;
  }
}

.work-content {
  padding: 1.2rem;
}

.work-title {
  min-height: 2.6em;
  font-size: 1rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.5rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.work-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #888;
  font-size: 0.85rem;
  margin-top: 0.8rem;
}

.work-link {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* 作品徽章 */
.video-count {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(220, 53, 69, 0.9);
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  font-weight: bold;
  font-size: 0.9rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.image-count {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-size: 0.75rem;
  z-index: 2;
  backdrop-filter: blur(4px);
}

.view-count-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(139, 69, 19, 0.85);
  color: white;
  padding: 0.3rem 0.7rem;
  border-radius: 15px;
  font-size: 0.8rem;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 5px;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ---------- 标签筛选区 ---------- */
.photography-tags {
  margin-bottom: 3.5rem;
  padding: 1.8rem;
  background: var(--tag-card-bg);
  /* 毛玻璃已移除，统一使用纯色彩叠加 */
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(139, 69, 19, 0.08);
  border: var(--tag-card-border);
}

.tags-section-header {
  text-align: center;
  margin-bottom: 2rem;
}

.tags-section-header h2 {
  font-size: 1.6rem;
  color: #8B4513;
  margin-bottom: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.tags-section-header p {
  color: #666;
  font-size: 0.95rem;
  margin: 0;
}

.tags-cloud-photo {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  padding: 0.5rem;
}

.photo-tag-item {
  padding: 0.7rem 1.4rem;
  background: rgba(139, 69, 19, 0.04);
  color: #8B4513;
  text-decoration: none;
  border-radius: 25px;
  font-size: 0.95rem;
  font-weight: 500;
  border: 2px solid rgba(139, 69, 19, 0.25);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 3px 8px rgba(139, 69, 19, 0.1);
  position: relative;
  overflow: hidden;
}

.photo-tag-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.6s ease;
}

.photo-tag-item:hover {
  background: linear-gradient(135deg, #8B4513, #D2691E);
  color: white;
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 6px 20px rgba(139, 69, 19, 0.25);
  border-color: #8B4513;
}

.photo-tag-item:hover::before {
  left: 100%;
}

.photo-tag-item .tag-count {
  margin-left: 6px;
  font-size: 0.85em;
  opacity: 0.9;
  background: rgba(139, 69, 19, 0.15);
  padding: 0.1rem 0.5rem;
  border-radius: 10px;
  transition: all 0.3s ease;
  font-weight: 400;
}

.photo-tag-item:hover .tag-count {
  background: rgba(255, 255, 255, 0.3);
  color: white;
  opacity: 1;
}

.tag-count-large {
  font-weight: 600;
  background: rgba(139, 69, 19, 0.2);
}


/* 深色模式适配 */
body.dark-theme .work-item {
  background: rgba(30, 34, 41, 0.4);
  border-color: rgba(255, 255, 255, 0.1);
}
/* 暗色模式已上提至 base.css 统一管理 */

.work-tags {
  margin-top: auto;
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  padding-top: 0.8rem;
}
a.tag-warm {
  display: inline-block;
  position: relative;
  z-index: 2; /* 解决被 work-link 遮挡，导致无法点击的问题 */
  background: rgba(139, 69, 19, 0.1);
  color: #8B4513;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 0.75rem;
  text-decoration: none;
  border: none;
  transition: all 0.2s ease;
  line-height: 1.2;
}
a.tag-warm:hover {
  background: rgba(139, 69, 19, 0.2);
  color: #6b320d;
}
