/* =========================================================
   CRAITRIX BLOG ARCHIVE — LIGHT THEME
   Matches craitrix.com visual identity
   ========================================================= */

/* ── Hero — matches site banner style + node animation ───── */
.ba-hero {
  position: relative;
  width: 100%;
  min-height: 60vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0057d9 0%, #0041a8 50%, #002d7a 100%);
  padding: 100px 24px 60px;
}

/* Subtle dot-grid overlay — professional tech feel */
.ba-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.12) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 1;
}

/* Soft radial light in the center */
.ba-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 50%, rgba(0,114,255,0.35) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

.ba-hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0.50;
  z-index: 2;
}

.ba-hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 640px;
}

.ba-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.12);
  border-radius: 999px;
  padding: 6px 18px;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 22px;
}

.ba-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  animation: baDotPulse 2s infinite;
  flex-shrink: 0;
}

.ba-hero-title {
  font-size: clamp(32px, 5vw, 58px) !important;
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
  margin-bottom: 16px;
}

.ba-hero-sub {
  font-size: 16px !important;
  color: rgba(255,255,255,0.82);
  line-height: 1.7;
  max-width: 480px;
  margin: 0 auto 28px;
}

.ba-hero-cta {
  display: inline-block;
  padding: 12px 34px;
  background: #fff;
  color: #0072FF;
  font-size: 15px;
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.ba-hero-cta:hover {
  background: #f0f6ff;
  transform: translateY(-2px);
  color: #004499;
  text-decoration: none;
}

@keyframes baDotPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.25; }
}

@media (max-width: 768px) {
  .ba-hero { min-height: 50vh; padding: 90px 20px 50px; }
  .ba-hero-sub { font-size: 14px !important; }
}

@media (max-width: 480px) {
  .ba-hero { min-height: 44vh; }
  .ba-hero-cta { padding: 11px 26px; font-size: 14px; }
}


/* ── Blog wrapper ────────────────────────────────────────── */
.ba-blog {
  max-width: 1200px;
  margin: 0 auto;
  padding: 50px 24px 60px;
}

/* ── Section title ───────────────────────────────────────── */
.ba-section-title {
  font-size: 26px;
  font-weight: 700;
  color: #000;
  margin-bottom: 6px;
  position: relative;
  display: inline-block;
  padding-left: 18px;
  padding-bottom: 4px;
}

.ba-section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 5px;
  height: 100%;
  background: #0072FF;
  border-radius: 4px;
}

/* ── Filter chips ────────────────────────────────────────── */
.ba-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 36px;
}

.ba-chip {
  padding: 7px 18px;
  border-radius: 999px;
  border: 1px solid #d0d8e8;
  background: #fff;
  color: #444;
  font-size: 13px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.ba-chip:hover {
  border-color: #0072FF;
  color: #0072FF;
  background: #f0f6ff;
}

.ba-chip.active {
  background: #0072FF;
  border-color: #0072FF;
  color: #fff;
}

/* ── Featured article ────────────────────────────────────── */
.ba-featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.10);
  margin-bottom: 48px;
  border: 1px solid #e8edf5;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
  background: #fff;
  text-decoration: none;
  color: inherit;
}

.ba-featured:hover {
  box-shadow: 0 8px 30px rgba(0,114,255,0.14);
  transform: translateY(-3px);
}

.ba-featured-img {
  width: 100%;
  height: 100%;
  min-height: 300px;
  object-fit: cover;
  display: block;
}

.ba-featured-img-placeholder {
  width: 100%;
  min-height: 300px;
  background: linear-gradient(135deg, rgba(0,114,255,0.12), rgba(0,68,153,0.18));
  display: flex;
  align-items: center;
  justify-content: center;
}

.ba-featured-img-placeholder i {
  font-size: 60px;
  color: rgba(0,114,255,0.25);
}

.ba-featured-body {
  padding: 36px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}

.ba-feat-badge {
  display: inline-block;
  padding: 4px 12px;
  background: #eef4ff;
  color: #0072FF;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  width: fit-content;
}

.ba-featured-body h2 {
  font-size: 22px !important;
  font-weight: 700 !important;
  color: #111;
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ba-featured-body p {
  font-size: 14px !important;
  color: #555;
  line-height: 1.7;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ba-feat-meta {
  font-size: 13px;
  color: #888;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ba-feat-meta span { color: #aaa; }

.ba-feat-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #0072FF;
  text-decoration: none;
  width: fit-content;
  transition: gap 0.2s ease;
}

.ba-feat-link:hover {
  color: #004499;
  gap: 10px;
  text-decoration: none;
}

/* ── Blog grid ───────────────────────────────────────────── */
.ba-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-bottom: 40px;
}

/* ── Blog card ───────────────────────────────────────────── */
.ba-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e8edf5;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.ba-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 28px rgba(0,114,255,0.13);
  border-color: #0072FF;
  text-decoration: none;
  color: inherit;
}

/* Card image */
.ba-card-img-wrap {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: linear-gradient(135deg, #e8f0ff, #d0e2ff);
  position: relative;
  flex-shrink: 0;
}

.ba-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.ba-card:hover .ba-card-img {
  transform: scale(1.04);
}

.ba-card-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(0,114,255,0.08), rgba(0,68,153,0.14));
}

.ba-card-img-placeholder i {
  font-size: 42px;
  color: rgba(0,114,255,0.22);
}

/* Card accent bottom line on hover */
.ba-card-img-wrap::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(to right, #0072FF, #004499);
  transition: width 0.3s ease;
}

.ba-card:hover .ba-card-img-wrap::after {
  width: 100%;
}

/* Card body */
.ba-card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.ba-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  width: fit-content;
  background: #eef4ff;
  color: #0072FF;
  border: 1px solid rgba(0,114,255,0.2);
}

.ba-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #111;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 2px 0 0;
}

.ba-card-excerpt {
  font-size: 13px;
  color: #666;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
  margin: 0;
}

/* Card footer */
.ba-card-footer {
  display: flex;
  align-items: center;
  padding-top: 12px;
  margin-top: auto;
  border-top: 1px solid #f0f3f8;
}

.ba-card-meta {
  font-size: 12px;
  color: #999;
}

.ba-read-more {
  font-size: 13px;
  font-weight: 600;
  color: #0072FF;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.2s ease, color 0.2s ease;
}

.ba-card:hover .ba-read-more {
  gap: 8px;
  color: #004499;
}

/* ── No posts message ────────────────────────────────────── */
.ba-no-posts {
  text-align: center;
  padding: 60px 20px;
  color: #888;
  font-size: 16px;
}

/* ── Load More ───────────────────────────────────────────── */
.ba-loadmore-wrap {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

.ba-loadmore-btn {
  padding: 11px 32px;
  border-radius: 8px;
  border: 1.5px solid #0072FF;
  background: #fff;
  color: #0072FF;
  font-size: 14px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ba-loadmore-btn:hover {
  background: #0072FF;
  color: #fff;
}

.ba-loadmore-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

/* ── Pagination ──────────────────────────────────────────── */
.ba-pagination {
  display: flex;
  justify-content: center;
  margin-top: 36px;
}

.ba-pagination .page-numbers {
  display: inline-flex;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}

.ba-pagination .page-numbers li { display: inline; }

.ba-pagination a.page-numbers,
.ba-pagination span.page-numbers {
  display: inline-block;
  padding: 7px 13px;
  border: 1px solid #ddd;
  color: #0072FF;
  text-decoration: none;
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.2s ease;
}

.ba-pagination .page-numbers.current,
.ba-pagination a.page-numbers:hover {
  background: #0072FF;
  border-color: #0072FF;
  color: #fff;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1024px) {
  .ba-grid { grid-template-columns: repeat(2, 1fr); }
  .ba-blog { padding: 40px 20px 50px; }
}

@media (max-width: 768px) {
  .ba-featured {
    grid-template-columns: 1fr;
  }
  .ba-featured-img,
  .ba-featured-img-placeholder {
    min-height: 220px;
    max-height: 240px;
  }
  .ba-featured-body {
    padding: 24px 20px;
  }
  .ba-featured-body h2 {
    font-size: 18px !important;
  }
}

@media (max-width: 640px) {
  .ba-grid { grid-template-columns: 1fr; }
  .ba-filter-row { gap: 8px; }
  .ba-chip { font-size: 12px; padding: 6px 14px; }
  .ba-card-img-wrap { height: 180px; }
  .ba-blog { padding: 30px 16px 50px; }
}
