/* ===============================
   Blog Explorer Layout
============================== */
.blog-explorer {
  display: flex;
  gap: 2rem;
  width: 100%;
  padding: 0 1rem 1rem 1rem;
  box-sizing: border-box;
}


/* ==============================
   Left panel / Sidebar
============================= */
.blog-sidebar {
  width: 28%;
  border: 1px solid var(--border);
  padding: 1.5rem;
  border-radius: 12px 0px 12px 12px;
  background: var(--bg-alt);
  box-sizing: border-box;
}

/* Category blocks */
.category-block {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);

  &:last-child {
    border-bottom: none;
  }
}

.category-title {
  font-size: var(--category-title-size, 0.65rem);
  font-weight: var(--category-title-weight, 600);
  color: var(--fg-light);
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  text-transform: lowercase;
}

.subcategory {
  font-size: var(--subcategory-size, 0.85rem);
  font-weight: 500;
  color: var(--fg);
  margin: 0.25rem 0;
  cursor: pointer;
  transition: all 0.2s ease;

  &:hover {
    text-decoration: underline;
    color: var(--subcategory-hover-color, #b11419);
  }

  &.active {
    font-weight: 600;
    color: var(--subcategory-active-color, #e31e23);
  }
}


/* ==============================
   Right panel / Content
============================= */
.content-panel {
  width: 72%;
  border: 1px solid var(--border);
  padding: 2rem 2rem 2rem 2rem;
  border-radius: 0px 12px 12px 12px;
  min-height: 300px;
  background: var(--bg-alt);
  box-sizing: border-box;
}

.content-panel ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.content-panel li {
  margin-bottom: 1rem;
}

.content-panel a {
  font-weight: 600;
  font-size: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;

  &:hover {
    text-decoration: underline;
    color: var(--highlight);
  }
}

.no-posts {
  font-size: 0.85rem;
  color: #ff0000b7;
  font-weight: 400;
  margin: 0.5rem 0;
}

.placeholder-text {
  font-size: 0.85rem;
  opacity: 0.6;
}


/* ==============================
   Post Items
============================= */
.post-item {
  padding: 0;
  margin: 0;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}

.post-date {
  font-size: 0.85rem;
  color: var(--fg-light);
  margin-bottom: 0.3rem;
  display: block;
}

.post-title {
  margin: 0 0 0.3rem 0;
  line-height: 1.25;

  a {
    font-size: 1.5rem;
    color: inherit;
    text-decoration: none;

    &:hover {
      text-decoration: underline;
      color: var(--highlight);
    }
  }
}

.post-desc {
  font-size: 1rem;
  color: var(--fg-light);
  line-height: 1.6;
  margin: 0.25rem 0 0 0;
}


/* ===============================
   Post Separators (Right Panel)
================================ */

.blog-post {
  position: relative;
  padding-bottom: .4rem;
  margin-bottom: 2.2rem;
}

/* The separator line */
.blog-post::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--border),
    transparent
  );
}

/* Remove separator from last post */
.blog-post:last-child::after {
  display: none;
}


/* ==============================
   Pagination
============================= */
.pagination {
    display: flex;
    justify-content: flex-start;
    gap: 0.7rem; /* ← this is the space between buttons */
    flex-wrap: wrap;
}


/* Ultra-specific selector to override all existing rules */
.content-panel #pagination-container button,
.content-panel .pagination button,
.content-panel .pagination .page-btn {
    border: none; /* remove any thick border */
    border-radius: 8px;
    background: rgba(95, 95, 95, 0.123);
    color: var(--text);
    padding: 0.5rem 0.9rem;
    font-size: 0.65rem;
    min-width: 36px;
    text-align: center;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transition: all 0.25s ease-in-out;
}

/* Active button */
.content-panel #pagination-container button.active,
.content-panel .pagination button.active {
    background: var(--highlight-dark);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.171);
    transform: scale(1.05);
}

/* Hover effect */
.content-panel #pagination-container button:hover:not(.active),
.content-panel .pagination button:hover:not(.active) {
    background: var(--highlight);
    color: #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.12);
    transform: translateY(-1px);
}

/* Focus */
.content-panel #pagination-container button:focus,
.content-panel .pagination button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(250, 44, 44, 0.35);
}


/* ==============================
   Responsive
============================= */
@media (max-width: 980px) {
  .blog-explorer {
    flex-direction: column;
    gap: 1rem;
  }

  .blog-sidebar,
  .content-panel {
    width: 100%;
  }
}
