/* 强制覆盖样式 - 2025-05-20 */
@media (min-width: 1024px) {
  .article-main-container {
    width: 78% !important;
  }
  .article-sidebar {
    width: 20% !important;
  }
  .flex-col.lg\:flex-row {
    gap: 2.5rem !important;
  }
  .article-main-content {
    padding: 1.5rem !important;
  }
  .article-main-header {
    padding: 1.25rem 1.5rem !important;
    margin-bottom: 0.75rem !important;
    border-bottom: 1px solid #f0f0f0 !important;
  }
  .article-main-footer {
    padding: 1rem 1.5rem !important;
  }
  .sidebar-title {
    padding: 1rem 0 !important;
    border-bottom: 1px solid #f0f0f0 !important;
  }
  .sidebar-title h3 {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    letter-spacing: 0.01em !important;
  }
  .sidebar-item {
    padding: 1rem 0 !important;
    border-bottom: 1px solid #f0f0f0 !important;
  }
  .sidebar-item:last-child {
    border-bottom: none !important;
  }
  .sidebar-item h4 {
    font-size: 1.05rem !important;
    line-height: 1.5 !important;
    margin-bottom: 0.35rem !important;
    font-weight: 500 !important;
  }
}

/* 优化排版 */
.prose h2, .prose h3, .prose h4 {
  margin-top: 2rem !important;
  margin-bottom: 1rem !important;
}

.prose p {
  margin-bottom: 1.25rem !important;
  line-height: 1.7 !important;
}

.prose img {
  margin-top: 1.5rem !important;
  margin-bottom: 1.5rem !important;
}

.prose ul, .prose ol {
  margin-top: 1.25rem !important;
  margin-bottom: 1.25rem !important;
  padding-left: 1.5rem !important;
}

.prose li {
  margin-bottom: 0.5rem !important;
}

.prose blockquote {
  padding-left: 1rem !important;
  margin-top: 1.5rem !important;
  margin-bottom: 1.5rem !important;
}

/* 语言切换菜单样式优化 */
.lang-switcher {
  position: relative;
  display: inline-block;
  z-index: 100;
}

#langButton {
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 20px;
  padding: 4px 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  font-size: 12px;
}

#langMenu {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 5px;
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  min-width: 100px;
}

.lang-option {
  display: block;
  padding: 6px 10px;
  text-decoration: none;
  color: #333;
  border-bottom: 1px solid #eee;
  font-size: 12px;
}

.lang-option:last-child {
  border-bottom: none;
}

.lang-option:hover {
  background-color: #f5f5f5;
}

.lang-option.active {
  font-weight: bold;
  color: #3b82f6;
}

/* 辅助工具类 */
.line-clamp-1 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.line-clamp-2 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.line-clamp-3 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

/* 文章列表页(/posts/)样式优化 */
/* 文章列表页标题样式 */
.post-header h1 {
  position: relative;
  display: inline-block;
  margin-bottom: 2rem;
  color: #1a1a1a;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.post-header h1::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -0.75rem;
  width: 60px;
  height: 3px;
  background-color: #047857;
  border-radius: 2px;
}

.post-header {
  text-align: left;
  margin-bottom: 3rem;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 1rem;
}

.post-header .description {
  font-size: 1.1rem;
  color: #4b5563;
  max-width: 700px;
  margin-top: 0.5rem;
  line-height: 1.6;
}

/* 文章列表容器 */
.post-list {
  width: 100% !important;
  max-width: 100% !important;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  box-sizing: border-box;
  gap: 1.5rem;
}

/* 文章列表网格布局 */
@media (min-width: 768px) {
  .post-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}

/* 移除列表项之间的顶部间距 */
.post-list > article {
  margin-top: 0 !important;
}

.post-list > :not([hidden]) ~ :not([hidden]) {
  margin-top: 0 !important;
  --tw-space-y-reverse: 0 !important;
  margin-top: calc(0px * calc(1 - var(--tw-space-y-reverse))) !important;
  margin-bottom: calc(0px * var(--tw-space-y-reverse)) !important;
}

/* 文章卡片样式 */
.post-card {
  transition: all 0.25s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  background-color: white;
  width: 100%;
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.post-card-image-container {
  height: 180px;
  overflow: hidden;
  border-bottom: 1px solid #f3f4f6;
}

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

.post-card:hover .post-card-image {
  transform: scale(1.05);
}

.post-card-content {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  gap: 0.75rem;
}

.post-card-content h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.4;
}

.post-card-content h2 a {
  color: #1a1a1a;
  text-decoration: none;
  transition: color 0.2s ease;
}

.post-card-content h2 a:hover {
  color: #047857;
}

/* 文章分类样式 */
.post-card .categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.post-card .category {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background-color: #ecfdf5;
  color: #047857;
  transition: all 0.2s ease;
}

.post-card .category:hover {
  background-color: #d1fae5;
}

/* 文章元数据 */
.post-card .meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8125rem;
  color: #6b7280;
  margin-bottom: 0.75rem;
}

.post-card .meta time,
.post-card .meta .reading-time {
  display: flex;
  align-items: center;
}

.post-card .meta svg {
  width: 1rem;
  height: 1rem;
  margin-right: 0.375rem;
  color: #9ca3af;
}

/* 文章摘要 */
.post-card .summary {
  color: #4b5563;
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  flex-grow: 1;
}

/* 阅读更多链接 */
.post-card .read-more {
  display: inline-flex;
  align-items: center;
  font-size: 0.875rem;
  font-weight: 500;
  color: #047857;
  transition: all 0.2s ease;
  margin-top: auto;
}

.post-card .read-more:hover {
  color: #065f46;
}

.post-card .read-more svg {
  width: 1rem;
  height: 1rem;
  margin-left: 0.25rem;
  transition: transform 0.2s ease;
}

.post-card .read-more:hover svg {
  transform: translateX(3px);
}

/* 分页控件样式 */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #f0f0f0;
}

.pagination a,
.pagination .current-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.pagination a {
  background-color: white;
  border: 1px solid #e5e7eb;
  color: #047857;
}

.pagination a:hover {
  background-color: #f0fdf4;
  border-color: #a7f3d0;
}

.pagination .current-page {
  background-color: #047857;
  color: white;
  border: 1px solid #047857;
}

/* 响应式样式调整 */
@media (max-width: 768px) {
  .post-header h1 {
    font-size: 1.75rem;
  }
  
  .post-card-image-container {
    height: 200px;
  }
  
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* 更新网格布局的响应式设置 */
@media (max-width: 640px) {
  .post-list {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 641px) and (max-width: 768px) {
  .post-list {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .post-list {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
  
  .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1025px) and (max-width: 1280px) {
  .post-list {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

@media (min-width: 1281px) {
  .post-list {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
  
  .container {
    padding-left: 2rem;
    padding-right: 2rem;
    max-width: 100%;
  }
}

/* 确保列表项在所有状态下对齐和撑满 */
.container.max-w-screen-xl {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
}

/* 媒体查询调整 */
@media (max-width: 1340px) {
  .container.max-w-screen-xl {
    max-width: 95%;
  }
}

@media (min-width: 1341px) {
  .container.max-w-screen-xl {
    max-width: 1280px;
  }
} 