/* ═══════════════════════════════════════════
   BLOG PUBLIC STYLES — Datoo IPTV
   ═══════════════════════════════════════════ */

/* ── Blog Hero ───────────────────────────────── */
.blog-hero {
  position: relative; overflow: hidden;
  padding: 7rem 0 4rem;
  text-align: center;
  background: var(--background);
  border-bottom: 1px solid var(--border);
}
.blog-hero-glow {
  position: absolute; top: -20%; left: 50%; transform: translateX(-50%);
  width: 600px; height: 400px;
  background: radial-gradient(ellipse, hsl(196 100% 50% / 0.12) 0%, transparent 70%);
  pointer-events: none;
}
.blog-hero-inner { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; }
.blog-hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800; line-height: 1.15;
  margin: 0.75rem 0 1rem;
}
.blog-hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.125rem);
  color: var(--muted-foreground);
  max-width: 560px; margin: 0 auto 2rem;
  line-height: 1.65;
}

/* Search */
.blog-search-wrap {
  position: relative; max-width: 480px; margin: 0 auto;
}
.blog-search-icon {
  position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
  color: var(--muted-foreground); pointer-events: none;
}
.blog-search-input {
  width: 100%; padding: 0.875rem 1rem 0.875rem 3rem;
  background: hsl(222 35% 8%); border: 1px solid var(--border);
  border-radius: 9999px; color: var(--foreground); font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.blog-search-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px hsl(196 100% 50% / 0.15);
}
.blog-search-input::placeholder { color: var(--muted-foreground); }

/* ── Category filter ─────────────────────────── */
.blog-filter-section {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
  background: var(--background-alt, var(--background));
  position: sticky; top: 72px; z-index: 50;
}
.category-tabs {
  display: flex; gap: 0.5rem; overflow-x: auto;
  scrollbar-width: none; -ms-overflow-style: none;
  padding-bottom: 2px;
}
.category-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
  padding: 0.4375rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem; font-weight: 500;
  color: var(--muted-foreground);
  border: 1px solid transparent;
  white-space: nowrap;
  transition: all 0.2s;
  cursor: pointer;
  background: none;
  font-family: inherit;
}
.cat-tab:hover { color: var(--foreground); border-color: var(--border); }
.cat-tab.active {
  color: hsl(196 100% 50%);
  background: hsl(196 100% 50% / 0.1);
  border-color: hsl(196 100% 50% / 0.25);
}

/* ── Posts grid ──────────────────────────────── */
.blog-main { padding: 3rem 0 5rem; }
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* Featured (first) card spans 2 cols */
.post-card.featured {
  grid-column: span 2;
}
.post-card.featured .post-card-img { height: 280px; }
.post-card.featured .post-card-title { font-size: 1.5rem; }

/* Post card */
.post-card {
  background: hsl(222 35% 8%);
  border: 1px solid var(--border);
  border-radius: 1rem;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.post-card:hover {
  border-color: hsl(196 100% 50% / 0.3);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px hsl(0 0% 0% / 0.3), 0 0 0 1px hsl(196 100% 50% / 0.1);
}
.post-card-link { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; }

.post-card-img {
  height: 200px; overflow: hidden; background: hsl(222 30% 12%);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.post-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.post-card:hover .post-card-img img { transform: scale(1.04); }
.post-card-img-placeholder { color: hsl(222 25% 25%); }

.post-card-body {
  padding: 1.25rem; display: flex; flex-direction: column; gap: 0.625rem; flex: 1;
}
.post-cat-badge {
  display: inline-flex; align-items: center;
  padding: 0.2em 0.7em; border-radius: 99px;
  font-size: 0.75rem; font-weight: 600;
  color: hsl(196 100% 50%);
  background: hsl(196 100% 50% / 0.1);
  border: 1px solid hsl(196 100% 50% / 0.2);
  width: fit-content;
}
.post-card-title {
  font-size: 1.0625rem; font-weight: 700; line-height: 1.4;
  color: var(--foreground);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post-card:hover .post-card-title { color: hsl(196 100% 70%); }
.post-card-excerpt {
  font-size: 0.875rem; color: var(--muted-foreground); line-height: 1.6; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.post-card-meta {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: auto; padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.post-date { font-size: 0.75rem; color: var(--muted-foreground); }
.read-more { font-size: 0.8125rem; font-weight: 600; color: hsl(196 100% 50%); }

/* ── Empty state ─────────────────────────────── */
.blog-empty {
  text-align: center; padding: 5rem 1rem;
  color: var(--muted-foreground);
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
}
.blog-empty h2 { font-size: 1.5rem; font-weight: 700; color: var(--foreground); }
.blog-empty p  { font-size: 1rem; max-width: 400px; }

/* ── Skeletons ───────────────────────────────── */
@keyframes skeleton-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.skeleton-pulse {
  animation: skeleton-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  background-color: hsl(220 30% 16%);
}
.skeleton-card {
  pointer-events: none;
}
.skeleton-card .post-card-img {
  background-color: hsl(220 30% 12%);
}

/* ── Blog CTA ────────────────────────────────── */
.blog-cta {
  background: hsl(222 40% 6%);
  border-top: 1px solid var(--border);
  padding: 3.5rem 0;
}
.blog-cta-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 2rem; flex-wrap: wrap;
}
.blog-cta h2 { font-size: clamp(1.25rem, 3vw, 1.875rem); font-weight: 800; }
.blog-cta p  { color: var(--muted-foreground); margin-top: 0.375rem; font-size: 0.9375rem; }

/* ── Responsive ──────────────────────────────── */
@media (max-width: 1024px) {
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .post-card.featured { grid-column: span 2; }
}
@media (max-width: 640px) {
  .posts-grid { grid-template-columns: 1fr; }
  .post-card.featured { grid-column: span 1; }
  .post-card.featured .post-card-title { font-size: 1.125rem; }
  .blog-cta-inner { flex-direction: column; text-align: center; }
}
