/* ============================================================
   LUX BLOG GRID — lux-blog-grid.css
   ============================================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700&family=DM+Sans:wght@400;500;600&display=swap');

/* ---------- Variables ---------- */
.lux-blog-wrap {
  --lux-green:      #00ff41;
  --lux-green-dark: #00cc33;
  --lux-bg:         #0a0a0a;
  --lux-card:       #111111;
  --lux-border:     #1e1e1e;
  --lux-text:       #ffffff;
  --lux-muted:      #888888;
  --lux-img-bg:     #1c1c1c;

  box-sizing: border-box;
  background: var(--lux-bg);
  color: var(--lux-text);
  font-family: 'DM Sans', sans-serif;
  padding: 32px 20px 48px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 30px;
  align-items: start;
  position: relative;
}

.lux-blog-wrap *, .lux-blog-wrap *::before, .lux-blog-wrap *::after {
  box-sizing: border-box;
}

/* ============================================================
   OVERLAY (mobile)
   ============================================================ */
.lux-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.78);
  z-index: 1200;
  opacity: 0;
  transition: opacity .3s ease;
}
.lux-overlay.lux-active {
  display: block;
  opacity: 1;
}

/* ============================================================
   MOBILE FILTER BUTTON
   ============================================================ */
.lux-mobile-filter-btn {
  display: none;
  align-items: center;
  gap: 8px;
  background: #1a1a1a;
  border: 1px solid var(--lux-border);
  color: var(--lux-text);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 18px;
  transition: border-color .2s, background .2s;
}
.lux-mobile-filter-btn:hover {
  border-color: var(--lux-green);
  background: #222;
}
.lux-mobile-filter-btn svg {
  width: 16px; height: 16px; flex-shrink: 0;
}

/* ============================================================
   FILTER TABS
   ============================================================ */
.lux-filter-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.lux-tab {
  padding: 7px 18px;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  background: transparent;
  color: var(--lux-muted);
  transition: color .2s, background .2s;
}
.lux-tab:hover { color: var(--lux-text); }
.lux-tab.active {
  background: var(--lux-green);
  color: #000;
  font-weight: 700;
}

/* ============================================================
   BLOG GRID
   ============================================================ */
.lux-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  min-height: 200px;
  position: relative;
}

/* Loading state */
.lux-grid.lux-loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10,10,10,.65);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}
.lux-grid.lux-loading::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  width: 36px;
  height: 36px;
  border: 3px solid #222;
  border-top-color: var(--lux-green);
  border-radius: 50%;
  animation: luxSpin .7s linear infinite;
  z-index: 6;
}
@keyframes luxSpin { to { transform: translate(-50%,-50%) rotate(360deg); } }

/* ============================================================
   BLOG CARD
   ============================================================ */
.lux-card {
  background: var(--lux-card);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--lux-border);
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.lux-card:hover {
  border-color: #333;
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0,0,0,.45);
}

/* Card image */
.lux-card-img-link { display: block; text-decoration: none; }
.lux-card-img {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--lux-img-bg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lux-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.lux-card:hover .lux-card-img img { transform: scale(1.04); }
.lux-img-placeholder svg {
  width: 40px; height: 40px; opacity: .2; color: #888;
}

/* Category badge */
.lux-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--lux-green);
  color: #000;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  font-family: 'DM Sans', sans-serif;
  letter-spacing: .3px;
  z-index: 2;
}

/* Card body */
.lux-card-body { padding: 16px 18px 20px; }
.lux-card-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 10px;
}
.lux-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--lux-muted);
  font-size: 12.5px;
}
.lux-meta-item svg { width: 13px; height: 13px; flex-shrink: 0; }

.lux-card-title {
  font-family: 'Syne', sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 8px;
}
.lux-card-title a {
  color: var(--lux-text);
  text-decoration: none;
  transition: color .2s;
}
.lux-card-title a:hover { color: var(--lux-green); }

.lux-card-desc {
  font-size: 13px;
  color: var(--lux-muted);
  line-height: 1.6;
  margin: 0 0 14px;
}

.lux-read-more {
  color: var(--lux-green);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap .2s;
}
.lux-read-more:hover { gap: 8px; color: var(--lux-green); }

/* No posts */
.lux-no-posts {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--lux-muted);
  padding: 48px 0;
  font-size: 15px;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.lux-pagination { margin-top: 28px; }
.lux-pagination .page-numbers {
  display: inline-flex;
  list-style: none;
  gap: 6px;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}
.lux-pagination .page-numbers li a,
.lux-pagination .page-numbers li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  background: #1a1a1a;
  border: 1px solid var(--lux-border);
  color: var(--lux-muted);
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
  text-decoration: none;
  transition: all .2s;
  cursor: pointer;
}
.lux-pagination .page-numbers li a:hover {
  background: #222;
  color: var(--lux-text);
  border-color: #333;
}
.lux-pagination .page-numbers li .current,
.lux-pagination .page-numbers li span.current {
  background: var(--lux-green);
  color: #000;
  border-color: var(--lux-green);
  font-weight: 700;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.lux-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 20px;
}

/* Sidebar close (mobile only) */
.lux-sidebar-close {
  display: none;
  width: 100%;
  background: #1a1a1a;
  border: 1px solid var(--lux-border);
  color: var(--lux-muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  padding: 9px;
  border-radius: 8px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: color .2s;
  margin-bottom: 4px;
}
.lux-sidebar-close svg { width: 14px; height: 14px; }
.lux-sidebar-close:hover { color: var(--lux-text); }

/* Sidebar box */
.lux-sidebar-box {
  background: #111;
  border: 1px solid var(--lux-border);
  border-radius: 12px;
  padding: 20px;
}
.lux-sidebar-title {
  font-family: 'Syne', sans-serif;
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 14px;
  color: var(--lux-text);
}

/* Search */
.lux-search-wrap { position: relative; }
.lux-search-wrap svg {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--lux-muted);
  pointer-events: none;
}
.lux-search-input {
  width: 100%;
  background: #1a1a1a;
  border: 1px solid var(--lux-border);
  border-radius: 8px;
  padding: 10px 14px 10px 36px;
  color: var(--lux-text);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  outline: none;
  transition: border-color .2s;
}
.lux-search-input:focus { border-color: var(--lux-green); }
.lux-search-input::placeholder { color: var(--lux-muted); }

/* Categories list */
.lux-cat-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.lux-cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 7px;
  color: var(--lux-muted);
  font-size: 14px;
  cursor: pointer;
  transition: all .15s;
  border: 1px solid transparent;
}
.lux-cat-item:hover {
  background: #1a1a1a;
  color: var(--lux-text);
  border-color: var(--lux-border);
}
.lux-cat-item.active {
  background: rgba(0,255,65,.08);
  color: var(--lux-green);
  border-color: rgba(0,255,65,.2);
}
.lux-cat-count {
  font-size: 11px;
  background: #1e1e1e;
  color: var(--lux-muted);
  padding: 2px 7px;
  border-radius: 20px;
}

/* Recent posts */
.lux-recent-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.lux-recent-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.lux-recent-thumb {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  background: var(--lux-img-bg);
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lux-recent-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.lux-recent-thumb svg { width: 18px; height: 18px; opacity: .2; color: #888; }
.lux-recent-info { flex: 1; min-width: 0; }
.lux-recent-title {
  display: block;
  font-family: 'Syne', sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--lux-text);
  line-height: 1.35;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .2s;
}
.lux-recent-link:hover .lux-recent-title { color: var(--lux-green); }
.lux-recent-time { font-size: 11.5px; color: var(--lux-muted); }

/* CTA box */
.lux-cta-box {
  background: #111;
  border: 1px solid var(--lux-border);
  border-radius: 12px;
  padding: 22px 20px;
  text-align: center;
}
.lux-cta-title {
  font-family: 'Syne', sans-serif;
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--lux-text);
}
.lux-cta-text {
  font-size: 13px;
  color: var(--lux-muted);
  margin: 0 0 16px;
}
.lux-cta-btn {
  display: block;
  width: 100%;
  padding: 12px;
  background: var(--lux-green);
  color: #000;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s, transform .1s;
}
.lux-cta-btn:hover {
  background: var(--lux-green-dark);
  color: #000;
  transform: scale(1.02);
}

/* ============================================================
   RESPONSIVE — tablet / mobile
   ============================================================ */
@media (max-width: 960px) {
  .lux-blog-wrap {
    grid-template-columns: 1fr;
  }

  .lux-mobile-filter-btn {
    display: flex;
  }

  .lux-sidebar-close {
    display: flex;
  }

  /* Sidebar becomes fixed drawer from the right */
  .lux-sidebar {
    position: fixed;
    top: 0;
    right: -340px;
    width: 300px;
    height: 100dvh;
    overflow-y: auto;
    background: #0f0f0f;
    z-index: 1300;
    padding: 20px 16px;
    transition: right .35s cubic-bezier(.4,0,.2,1);
    border-left: 1px solid var(--lux-border);
    border-radius: 0;
    /* custom scrollbar */
    scrollbar-width: thin;
    scrollbar-color: #222 transparent;
  }
  .lux-sidebar.lux-open {
    right: 0;
  }
  .lux-sidebar::-webkit-scrollbar { width: 4px; }
  .lux-sidebar::-webkit-scrollbar-thumb { background: #222; border-radius: 4px; }
}

@media (max-width: 600px) {
  .lux-grid {
    grid-template-columns: 1fr;
  }
  .lux-tab {
    font-size: 13px;
    padding: 6px 14px;
  }
}
