* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background: #f8fafc;
  color: #0f172a;
  line-height: 1.6;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 0 48px;
}

/* ========== HEADER ========== */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 16px;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #0f3b4a, #1a6b85);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.logo-text {
  font-weight: 800;
  font-size: 1.5rem;
  background: linear-gradient(135deg, #0f3b4a, #1e7a96);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  letter-spacing: -0.3px;
}

nav {
  display: flex;
  gap: 28px;
}

nav a {
  text-decoration: none;
  color: #475569;
  font-weight: 500;
  font-size: 0.95rem;
  transition: 0.2s;
}

nav a:hover {
  color: #1a6b85;
}

/* ========== TIÊU ĐỀ TRANG ========== */
.page-header {
  margin-bottom: 40px;
  text-align: center;
}

.page-header h1 {
  font-size: 2.2rem;
  font-weight: 800;
  background: linear-gradient(120deg, #0f3b4a, #1e7a96);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  margin-bottom: 12px;
}

.page-header p {
  color: #64748b;
  font-size: 1rem;
}

/* ========== GRID BLOG ========== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
  margin-bottom: 60px;
}

.post-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
  border: 1px solid #e9f0f3;
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 35px -12px rgba(0,0,0,0.12);
  border-color: #cbd5e1;
}

/* ẢNH BÀI VIẾT */
.post-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: #d1dbe6;
  transition: transform 0.4s ease;
}

.post-card:hover .post-image {
  transform: scale(1.02);
}

.image-wrapper {
  overflow: hidden;
  position: relative;
}

.image-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 70%, rgba(0,0,0,0.1));
  pointer-events: none;
}

.card-content {
  padding: 20px 18px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.4;
}

.post-title a {
  text-decoration: none;
  color: #0f3b4a;
  transition: color 0.2s;
}

.post-title a:hover {
  color: #1e7a96;
  text-decoration: underline;
}

.post-meta {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.post-excerpt {
  font-size: 0.88rem;
  color: #334155;
  line-height: 1.55;
  margin-bottom: 18px;
  flex: 1;
}

/* NÚT LIKE */
.like-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  border-top: 1px solid #eef2f8;
  padding-top: 14px;
}

.like-btn {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #94a3b8;
  transition: all 0.2s;
  padding: 6px 12px;
  border-radius: 40px;
  font-weight: 500;
}

.like-btn:hover {
  background: #fff0f0;
  color: #e85d5d;
}

.like-btn.liked {
  color: #e34234;
}

.like-count {
  font-size: 0.85rem;
  font-weight: 600;
}

.read-more {
  font-size: 0.8rem;
  color: #1e7a96;
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.read-more:hover {
  text-decoration: underline;
}

/* ========== PHÂN TRANG ========== */
.pagination {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pagination button {
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  border-radius: 44px;
  border: 1px solid #e2e8f0;
  background: white;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
  color: #334155;
}

.pagination button:hover {
  background: #f1f5f9;
  border-color: #1e7a96;
  color: #1e7a96;
}

.pagination button.active {
  background: #1a6b85;
  color: white;
  border-color: #1a6b85;
}

.pagination span {
  padding: 0 8px;
  color: #94a3b8;
  font-weight: 500;
}

/* ========== FOOTER ========== */
footer {
  margin-top: 60px;
  padding-top: 30px;
  border-top: 1px solid #e2e8f0;
  text-align: center;
  font-size: 0.8rem;
  color: #94a3b8;
}

/* ========== MOBILE TỐI ƯU ========== */
@media (max-width: 768px) {
  .container {
    width: 92%;
    padding: 16px 0 32px;
  }
  
  .page-header h1 {
    font-size: 1.6rem;
  }
  
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  nav {
    gap: 24px;
  }
  
  .post-title {
    font-size: 1.1rem;
  }
  
  .post-image {
    height: 170px;
  }
  
  .pagination button {
    min-width: 38px;
    height: 38px;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .post-meta {
    font-size: 0.7rem;
  }
  
  .post-excerpt {
    font-size: 0.82rem;
  }
  
  .like-btn {
    padding: 4px 10px;
  }
}