/**
 * Blog category / archive pages
 * /category/{slug}/, tags, author, date archives
 */

.blog-cat-page {
  background: #f6f7f8;
  min-height: 60vh;
  padding-bottom: 48px;
}

/* ---- Hero ---- */
.blog-cat-hero {
  background: linear-gradient(145deg, #0f1111 0%, #1a2332 48%, #243044 100%);
  color: #fff;
  padding: 28px 0 32px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}

.blog-cat-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 90% 20%, rgba(255, 153, 0, 0.18), transparent 55%),
    radial-gradient(ellipse 40% 50% at 10% 90%, rgba(59, 130, 246, 0.12), transparent 50%);
  pointer-events: none;
}

.blog-cat-hero-inner {
  position: relative;
  z-index: 1;
}

.blog-cat-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 18px;
}

.blog-cat-breadcrumb a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}

.blog-cat-breadcrumb a:hover {
  color: #ff9900;
}

.blog-cat-breadcrumb .sep {
  opacity: 0.45;
}

.blog-cat-breadcrumb .current {
  color: #fff;
  font-weight: 600;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.blog-cat-hero-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.blog-cat-kicker {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ff9900;
}

.blog-cat-title {
  margin: 0 0 10px;
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #fff;
}

.blog-cat-desc {
  margin: 0;
  max-width: 560px;
  font-size: 15px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
}

.blog-cat-stats {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.blog-cat-stat {
  min-width: 88px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  text-align: center;
  backdrop-filter: blur(6px);
}

.blog-cat-stat-num {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: #ff9900;
  line-height: 1.2;
}

.blog-cat-stat-label {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

/* ---- Category chips ---- */
.blog-cat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 4px;
}

.blog-cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.blog-cat-chip:hover {
  background: rgba(255, 153, 0, 0.2);
  border-color: rgba(255, 153, 0, 0.45);
  color: #fff;
}

.blog-cat-chip.is-active {
  background: #ff9900;
  border-color: #ff9900;
  color: #0f1111;
}

.blog-cat-chip .count {
  font-size: 11px;
  font-weight: 700;
  opacity: 0.75;
  background: rgba(0, 0, 0, 0.12);
  padding: 1px 6px;
  border-radius: 999px;
}

.blog-cat-chip.is-active .count {
  background: rgba(0, 0, 0, 0.15);
  color: #0f1111;
}

/* ---- Body ---- */
.blog-cat-body {
  padding-top: 4px;
}

.blog-cat-meta {
  margin: 0 0 16px;
  font-size: 14px;
  color: #565959;
}

/* ---- Grid: featured first row + 3-col cards ---- */
.blog-cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.blog-cat-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e3e6e6;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15, 17, 17, 0.04);
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.blog-cat-card:hover {
  border-color: #d5d9d9;
  box-shadow: 0 10px 28px rgba(15, 17, 17, 0.1);
  transform: translateY(-3px);
}

.blog-cat-card--featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  min-height: 280px;
}

.blog-cat-card-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  background: #eef0f2;
  overflow: hidden;
}

.blog-cat-card--featured .blog-cat-card-thumb {
  aspect-ratio: auto;
  min-height: 280px;
  height: 100%;
}

.blog-cat-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.blog-cat-card:hover .blog-cat-card-thumb img {
  transform: scale(1.05);
}

.blog-cat-card-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 160px;
  font-size: 42px;
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
}

.blog-cat-card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #0f1111;
  background: #ff9900;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  max-width: 70%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.blog-cat-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
  padding: 16px 18px 20px;
}

.blog-cat-card--featured .blog-cat-card-body {
  justify-content: center;
  padding: 28px 32px;
  gap: 12px;
}

.blog-cat-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  font-size: 12px;
  color: #565959;
}

.blog-cat-card-meta .sep {
  color: #adb0b0;
}

.blog-cat-card-title {
  margin: 0;
  font-size: 17px;
  font-weight: 750;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.blog-cat-card--featured .blog-cat-card-title {
  font-size: clamp(22px, 2.5vw, 28px);
  line-height: 1.25;
}

.blog-cat-card-title a {
  color: #0f1111;
  text-decoration: none;
}

.blog-cat-card-title a:hover {
  color: #c45500;
}

.blog-cat-card-excerpt {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: #565959;
  flex: 1;
}

.blog-cat-card--featured .blog-cat-card-excerpt {
  font-size: 15px;
  line-height: 1.6;
  color: #3a3c3c;
}

.blog-cat-card-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 13px;
  font-weight: 700;
  color: #c45500;
  text-decoration: none;
}

.blog-cat-card-more:hover {
  color: #a04100;
  text-decoration: underline;
}

.blog-cat-card-more svg {
  transition: transform 0.15s ease;
}

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

/* ---- Pagination ---- */
.blog-cat-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 8px 0 16px;
}

.blog-cat-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #0f1111;
  background: #fff;
  border: 1px solid #d5d9d9;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.blog-cat-pagination .page-numbers:hover {
  border-color: #ff9900;
  color: #c45500;
}

.blog-cat-pagination .page-numbers.current {
  background: #ff9900;
  border-color: #ff9900;
  color: #0f1111;
}

.blog-cat-pagination .page-numbers.dots {
  border: none;
  background: transparent;
  min-width: auto;
}

/* ---- Empty ---- */
.blog-cat-empty {
  text-align: center;
  padding: 64px 24px;
  background: #fff;
  border: 1px solid #e3e6e6;
  border-radius: 14px;
}

.blog-cat-empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.blog-cat-empty h2 {
  margin: 0 0 8px;
  font-size: 22px;
  color: #0f1111;
}

.blog-cat-empty p {
  margin: 0 0 20px;
  color: #565959;
}

.blog-cat-empty .btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 22px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  background: #ff9900;
  color: #0f1111;
  border: none;
}

.blog-cat-empty .btn:hover {
  background: #e88b00;
}

/* ---- Responsive ---- */
@media (max-width: 992px) {
  .blog-cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .blog-cat-card--featured {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .blog-cat-card--featured .blog-cat-card-thumb {
    min-height: 200px;
    aspect-ratio: 16 / 9;
    height: auto;
  }

  .blog-cat-card--featured .blog-cat-card-body {
    padding: 20px;
  }
}

@media (max-width: 640px) {
  .blog-cat-hero {
    padding: 20px 0 24px;
    margin-bottom: 20px;
  }

  .blog-cat-hero-row {
    margin-bottom: 16px;
  }

  .blog-cat-stats {
    width: 100%;
  }

  .blog-cat-stat {
    flex: 1;
  }

  .blog-cat-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .blog-cat-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    margin: 0 -4px;
    padding-left: 4px;
    padding-right: 4px;
  }

  .blog-cat-chip {
    flex-shrink: 0;
  }
}

/* Kill legacy index.php layout leftovers if any */
body.category .page-wrapper.content-layout,
body.category .content-layout {
  display: block;
}

body.category .sidebar,
body.category aside.widget-area {
  display: none;
}
