/* ==========================================
   91LAB AUTHOR CARD - 91lab-author.css
   ========================================== */

/* ---- Outer wrapper — cho phép quote lấn ra ngoài card ---- */
.author-card-outer {
  position: relative;
  margin-bottom: 40px;
}

/* Dấu ngoặc kép: nằm lấn ra ngoài card, góc trên cùng bên phải */
.author-card-quote-icon {
  position: absolute;
  top: -33px;
  right: -8px;
  font-size: 72px;
  font-weight: 900;
  color: #ff1f8f;
  line-height: 1;
  font-family: Georgia, serif;
  z-index: 2;
  user-select: none;
  pointer-events: none;
  width: 50px;
}

/* ---- Card thực sự ---- */
.author-card {
  display: flex;
  align-items: flex-start;
  background: #000;
  border-radius: 16px;
  padding: 28px 32px;
  overflow: hidden;
}

/* ---- Cột trái: 40% ---- */
.author-card-left {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding-right: 28px;
}

/* Avatar với viền hồng */
.author-card-avatar-wrap {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  border: 4px solid #ff1f8f;
  overflow: hidden;
  flex-shrink: 0;
}

.author-card-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/*
    Tags: flex-wrap + justify-content: center
    - white-space: nowrap trên mỗi tag → không gãy chữ bên trong tag
    - flex-wrap trên container → tag tự xuống hàng khi không đủ chỗ
    - Kết quả: 1 tag dài → chiếm 1 hàng riêng
               2 tag ngắn vừa khít → ở chung 1 hàng, không xuống dòng
*/
.author-card-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.author-card-tag {
  display: inline-block;
  background: #ff1f8f;
  color: #000;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 999px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

/* ---- Cột phải: 60% ---- */
.author-card-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 4px;
}

.author-card-name {
  font-size: 42px;
  font-weight: 900;
  color: #ffffff;
  margin: 0 0 14px 0;
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.author-card-bio {
  font-size: 14px;
  color: #cccccc;
  line-height: 1.75;
  margin: 0;
}

/* ==========================================
   AUTHOR POSTS GRID — 2 cột, 4 card/trang
   ========================================== */

.author-posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* ---- Card (thẻ <a> bọc toàn bộ) ---- */
.author-post-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 14px;
  overflow: hidden;
  border: 1.5px solid #ececec;
  transition:
    box-shadow 0.25s,
    transform 0.25s;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.author-post-card:hover {
  box-shadow: 0 8px 32px rgba(255, 31, 143, 0.12);
  transform: translateY(-3px);
}

/* Thumb */
.author-post-card__thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f0f0f0;
  flex-shrink: 0;
}

.author-post-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
  transition: transform 0.4s ease;
}

.author-post-card:hover .author-post-card__thumb img {
  transform: scale(1.05);
}

/* Placeholder khi không có ảnh */
.author-post-card__thumb-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a1a1a 0%, #333 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.author-post-card__thumb-placeholder span {
  color: #ff1f8f;
  font-weight: 900;
  font-size: 22px;
  letter-spacing: 0.1em;
  opacity: 0.6;
}

/* Category badge nổi trên ảnh */
.author-post-card__cat {
  position: absolute;
  bottom: 10px;
  left: 12px;
  background: #ff1f8f;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 999px;
  pointer-events: none;
}

/* Body */
.author-post-card__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 20px 20px;
  flex: 1;
}

/* Date */
.author-post-card__date {
  font-size: 11px;
  color: #aaa;
  letter-spacing: 0.04em;
}

/* Title */
.author-post-card__title {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.4;
  margin: 0;
  color: #1a1a1a;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Title color on card hover */
.author-post-card:hover .author-post-card__title {
  color: #ff1f8f;
  transition: color 0.2s;
}

/* Excerpt */
.author-post-card__excerpt {
  font-size: 13px;
  color: #666;
  line-height: 1.65;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

/* Read more */
.author-post-card__readmore {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: #ff1f8f;
  margin-top: 4px;
  transition: gap 0.2s;
}

.author-post-card:hover .author-post-card__readmore {
  gap: 8px;
}

/* No posts */
.author-no-posts {
  grid-column: 1 / -1;
  padding: 60px 40px;
  text-align: center;
  color: #999;
  font-size: 15px;
}

/* ---- Pagination ---- */
.author-pagination {
  grid-column: 1 / -1;
  margin: 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.author-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  color: #1a1a1a;
  text-decoration: none;
  transition: all 0.2s;
  background: #fff;
}

.author-pagination .page-numbers.current,
.author-pagination .page-numbers:hover {
  background: #ff1f8f;
  border-color: #ff1f8f;
  color: #fff;
}

.author-pagination .page-numbers.dots {
  border: none;
  background: transparent;
  color: #aaa;
  pointer-events: none;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
  .author-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px 20px;
  }

  .author-card-left,
  .author-card-right {
    width: 100%;
    padding-right: 0;
  }

  .author-card-name {
    font-size: 28px;
  }

  .author-card-bio {
    font-size: 13px;
  }

  .author-card-quote-icon {
    font-size: 52px;
    top: -14px;
    right: -4px;
  }

  .author-card-tags {
    justify-content: center;
  }
}

/* Posts grid: 1 cột trên mobile */
@media (max-width: 768px) {
  .author-posts-grid {
    grid-template-columns: 1fr;
  }
}

h2.author-post-list-title {
  margin-bottom: 40px;
  background: #ff1f8f;
  display: inline-block;
  padding: 10px 20px;
  border-radius: 50px;
  font-weight: 800;
  color: #000;
}
