/* ===========================
   HAKUSO - News / Blog List Page Styles
   =========================== */

/* --- Category Description --- */
.nl-category-header {
  margin-bottom: 48px;
}
.nl-category-lead {
  font-size: 16px;
  line-height: 2;
  color: #555;
  max-width: 700px;
}
.nl-category-meta {
  display: flex;
  gap: 24px;
  margin-top: 16px;
  font-size: 13px;
  color: #888;
}
.nl-category-meta i { color: var(--primary); margin-right: 4px; }

/* --- Article List --- */
.nl-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0 0 48px;
}

/* --- Article Card (horizontal) --- */
.nl-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  transition: all 0.4s var(--ease-out-expo);
  text-decoration: none;
  color: inherit;
}
.nl-card:first-child {
  padding-top: 0;
}
.nl-card:hover {
  opacity: 1;
}
.nl-card:hover .nl-card-title {
  color: var(--primary);
}

/* Thumbnail */
.nl-card-thumb {
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(108,60,225,0.04), rgba(0,201,167,0.04));
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.nl-card-thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid rgba(108,60,225,0.06);
  border-radius: 12px;
}
.nl-card-thumb-icon {
  font-size: 28px;
  color: var(--primary);
  opacity: 0.12;
}
.nl-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out-expo);
}
.nl-card:hover .nl-card-thumb img,
.nl-featured:hover .nl-card-thumb img {
  transform: scale(1.06);
}

/* --- Lead + Stats + Tabs Hero Card --- */
.nl-hero-card {
  background: linear-gradient(135deg, rgba(108,60,225,0.04), rgba(0,201,167,0.03));
  border: 1px solid rgba(108,60,225,0.08);
  border-radius: 20px;
  padding: 36px 40px 28px;
  margin-bottom: 40px;
}
.nl-lead {
  font-size: 16px;
  line-height: 2;
  color: #555;
  margin-bottom: 0;
  font-weight: 400;
}

/* --- Stats banner --- inside hero card */
.nl-hero-card .nl-stats {
  border-top: 1px solid rgba(108,60,225,0.08);
  border-bottom: 1px solid rgba(108,60,225,0.08);
  margin: 20px 0;
  padding: 20px 0;
}

/* --- Category filter tabs --- */
.nl-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 0;
}
.nl-tab {
  font-size: 13px;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: 20px;
  border: 1px solid rgba(108,60,225,0.12);
  background: #fff;
  color: #666;
  cursor: pointer;
  transition: all 0.3s;
}
.nl-tab:hover {
  background: rgba(108,60,225,0.06);
  color: var(--primary);
  border-color: rgba(108,60,225,0.2);
}
.nl-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
@media (max-width: 768px) {
  .nl-hero-card { padding: 24px 20px 20px; border-radius: 16px; }
}

/* --- Grid layout --- */
.nl-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}
.nl-grid .nl-card {
  grid-template-columns: 1fr;
  padding: 0;
  border-bottom: none;
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,0.06);
  overflow: hidden;
  transition: all 0.4s var(--ease-out-expo);
}
.nl-grid .nl-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  transform: translateY(-4px);
}
.nl-grid .nl-card .nl-card-thumb {
  aspect-ratio: 16 / 9;
  border-radius: 0;
}
.nl-grid .nl-card .nl-card-thumb::before {
  display: none;
}
.nl-grid .nl-card .nl-card-body {
  padding: 20px 20px 24px;
}
.nl-grid .nl-card .nl-card-excerpt {
  -webkit-line-clamp: 2;
}

/* --- Stats banner --- */
.nl-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  padding: 24px 0;
  margin-bottom: 36px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.nl-stat {
  text-align: center;
}
.nl-stat-num {
  font-family: var(--font-en);
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
}
.nl-stat-label {
  font-size: 12px;
  color: #999;
  margin-top: 2px;
}

@media (max-width: 768px) {
  .nl-grid {
    grid-template-columns: 1fr;
  }
  .nl-stats {
    gap: 24px;
  }
  .nl-stat-num {
    font-size: 22px;
  }
}

/* Card body */
.nl-card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.nl-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.nl-card-date {
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 600;
  color: #999;
  letter-spacing: 0.05em;
}
.nl-card-cat {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  background: rgba(108,60,225,0.08);
  color: var(--primary);
}
.nl-card-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 8px;
  line-height: 1.6;
  transition: color 0.3s;
}
.nl-card-excerpt {
  font-size: 14px;
  line-height: 1.8;
  color: #888;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Tags for news items --- */
.nl-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.nl-card-tag {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid rgba(108,60,225,0.1);
  color: #888;
}

/* --- Featured/pinned article --- */
.nl-featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 48px;
  padding: 32px;
  background: linear-gradient(135deg, rgba(108,60,225,0.02), rgba(0,201,167,0.02));
  border-radius: 20px;
  border: 1px solid rgba(108,60,225,0.06);
}
.nl-featured .nl-card-thumb {
  aspect-ratio: 16 / 10;
  border-radius: 14px;
}
.nl-featured .nl-card-title {
  font-size: 22px;
}
.nl-featured .nl-card-excerpt {
  -webkit-line-clamp: 3;
}

/* --- Pagination --- */
.nl-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 48px 0;
}
.nl-page-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid #eee;
  background: #fff;
  font-family: var(--font-en);
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}
.nl-page-btn:hover,
.nl-page-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* --- CTA at bottom --- */
.nl-cta {
  text-align: center;
  padding: 48px;
  background: var(--dark);
  border-radius: 24px;
  position: relative;
  overflow: hidden;
  margin-top: 48px;
}
.nl-cta::before {
  content: '';
  position: absolute;
  top: -2px; left: -2px; right: -2px; bottom: -2px;
  background: linear-gradient(135deg, var(--primary), var(--secondary), var(--primary));
  background-size: 300% 300%;
  animation: gradient-border 6s ease infinite;
  border-radius: 26px;
  z-index: 0;
}
@keyframes gradient-border {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.nl-cta::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px; right: 2px; bottom: 2px;
  background: var(--dark);
  border-radius: 22px;
  z-index: 0;
}
.nl-cta > * { position: relative; z-index: 1; }
.nl-cta h3 {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}
.nl-cta p {
  font-size: 15px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 24px;
}

/* --- Entrance animations --- */
.nl-card,
.nl-featured {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease-out-expo), transform 0.6s var(--ease-out-expo);
}
.nl-card.is-visible,
.nl-featured.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.nl-card:nth-child(2) { transition-delay: 0.06s; }
.nl-card:nth-child(3) { transition-delay: 0.12s; }
.nl-card:nth-child(4) { transition-delay: 0.18s; }
.nl-card:nth-child(5) { transition-delay: 0.24s; }
.nl-card:nth-child(6) { transition-delay: 0.3s; }

/* --- Responsive --- */
@media (max-width: 768px) {
  .nl-card {
    grid-template-columns: 120px 1fr;
    gap: 16px;
    padding: 20px 0;
  }
  .nl-card-title { font-size: 15px; }
  .nl-card-excerpt { display: none; }
  .nl-featured {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 24px;
  }
  .nl-featured .nl-card-title { font-size: 18px; }
  .nl-cta { padding: 36px 24px; }
}

@media (max-width: 480px) {
  .nl-card {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .nl-card-thumb { aspect-ratio: 16 / 8; }
}
