/* =====================================================
   BLOG LIST + SINGLE POST
===================================================== */

:root {
  --bl-brand: #b32a65;
  --bl-brand-2: #9a2457;
  --bl-text: #1f1a1e;
  --bl-muted: #7a7080;
  --bl-bg: #ffffff;
  --bl-soft: #faf5f8;
  --bl-border: #eee7ec;
  --bl-radius: 12px;
  --bl-radius-lg: 20px;
}

[data-theme="dark"] {
  --bl-bg: #16131a;
  --bl-text: #f8f4f7;
  --bl-muted: #a89ea8;
  --bl-soft: #1e1b22;
  --bl-border: #2a242f;
}

/* ═══════════════════════════════════════════════════════
   HEADER
═══════════════════════════════════════════════════════ */
.bl-header {
  background: linear-gradient(135deg, #fff2f7 0%, #faf5f8 100%);
  padding: 24px 0 40px;
  border-bottom: 1px solid var(--bl-border);
}

[data-theme="dark"] .bl-header {
  background: linear-gradient(135deg, #241820 0%, #1b1219 100%);
}

.bl-inner {
  width: min(1220px, 94%);
  margin: 0 auto;
  padding: 0 15px;
}

.bl-header .breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  color: var(--bl-muted);
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.bl-header .breadcrumb a {
  color: var(--bl-muted);
  text-decoration: none;
}

.bl-header .breadcrumb a:hover { color: var(--bl-brand); }

.bl-header .breadcrumb .current {
  color: var(--bl-text);
  font-weight: 600;
}

.bl-head-info {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.bl-title {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--bl-text);
  letter-spacing: -.5px;
}

.bl-count {
  font-size: .88rem;
  color: var(--bl-muted);
  font-weight: 500;
}

/* Search */
.bl-search {
  display: flex;
  max-width: 500px;
  background: #fff;
  border: 1.5px solid var(--bl-border);
  border-radius: var(--bl-radius);
  overflow: hidden;
  height: 48px;
}

[data-theme="dark"] .bl-search { background: var(--bl-bg); }

.bl-search input {
  flex: 1;
  border: 0;
  outline: 0;
  padding: 0 18px;
  font-family: inherit;
  font-size: .9rem;
  background: transparent;
  color: var(--bl-text);
}

.bl-search button {
  width: 52px;
  border: 0;
  background: var(--bl-brand);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .2s;
}

.bl-search button:hover { background: var(--bl-brand-2); }

/* ═══════════════════════════════════════════════════════
   PAGE + LAYOUT
═══════════════════════════════════════════════════════ */
.bl-page {
  background: var(--bl-bg);
  padding: 40px 0 60px;
  min-height: 60vh;
}

.bl-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 30px;
  align-items: start;
}

/* ═══════════════════════════════════════════════════════
   SIDEBAR
═══════════════════════════════════════════════════════ */
.bl-sidebar {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bl-box {
  background: var(--bl-soft);
  border: 1px solid var(--bl-border);
  border-radius: var(--bl-radius);
  padding: 18px;
}

.bl-box-title {
  margin: 0 0 14px;
  font-size: .92rem;
  font-weight: 800;
  color: var(--bl-text);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--bl-border);
}

.bl-cats {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bl-cats a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--bl-text);
  text-decoration: none;
  font-size: .85rem;
  font-weight: 500;
  transition: 0.2s ease;
}

.bl-cats a:hover {
  background: var(--bl-bg);
  color: var(--bl-brand);
}

.bl-cats a.active {
  background: var(--bl-brand);
  color: #fff;
  font-weight: 700;
}

.bl-cats a.active .count {
  background: rgba(255, 255, 255, .25);
  color: #fff;
}

.bl-cats .count {
  font-size: .72rem;
  background: var(--bl-border);
  color: var(--bl-muted);
  padding: 2px 8px;
  border-radius: 999px;
  min-width: 28px;
  text-align: center;
  font-feature-settings: "ss02";
}

/* Latest */
.bl-latest {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bl-latest a {
  display: flex;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  transition: 0.2s ease;
}

.bl-latest a:hover { opacity: .75; }

.bl-latest-img {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bl-bg);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 1.4rem;
  opacity: .4;
}

.bl-latest-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bl-latest-info { min-width: 0; flex: 1; }

.bl-latest-title {
  font-size: .82rem;
  font-weight: 700;
  color: var(--bl-text);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}

.bl-latest-date {
  font-size: .7rem;
  color: var(--bl-muted);
}

/* ═══════════════════════════════════════════════════════
   GRID
═══════════════════════════════════════════════════════ */
.bl-main { min-width: 0; }

.bl-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.bl-card {
  background: var(--bl-soft);
  border: 1px solid var(--bl-border);
  border-radius: var(--bl-radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: 0.28s cubic-bezier(.25, .1, .25, 1);
  position: relative;
}

.bl-card:hover {
  transform: translateY(-4px);
  border-color: var(--bl-brand);
  box-shadow: 0 18px 36px -18px rgba(179, 42, 101, .28);
}

.bl-featured-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #f4b942;
  color: #6a4800;
  padding: 3px 10px 4px;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 800;
  z-index: 3;
}

.bl-card-cover {
  display: block;
  width: 100%;
  height: 190px;
  overflow: hidden;
  background: var(--card-accent, #b32a65);
  position: relative;
  text-decoration: none;
}

.bl-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.bl-card:hover .bl-card-cover img { transform: scale(1.06); }

.bl-card-cover-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--card-accent, #b32a65) 0%, #1f1a1e 100%);
  font-size: 3rem;
  opacity: .7;
}

.bl-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, var(--card-accent, #b32a65) 0%, transparent 60%);
  opacity: 0;
  transition: opacity .3s ease;
}

.bl-card:hover .bl-card-overlay { opacity: .15; }

.bl-card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.bl-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: .72rem;
}

.bl-card-cat {
  color: var(--card-accent, #b32a65);
  text-decoration: none;
  font-weight: 700;
}

.bl-card-cat:hover { text-decoration: underline; }

.bl-card-date {
  color: var(--bl-muted);
  font-feature-settings: "ss02";
}

.bl-card-title-link {
  text-decoration: none;
  color: inherit;
}

.bl-card-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: var(--bl-text);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 3em;
  transition: color .2s;
}

.bl-card:hover .bl-card-title { color: var(--card-accent, #b32a65); }

.bl-card-excerpt {
  margin: 0;
  font-size: .82rem;
  line-height: 1.75;
  color: var(--bl-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.bl-card-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--card-accent, #b32a65);
  text-decoration: none;
  font-size: .8rem;
  font-weight: 700;
  margin-top: auto;
  padding-top: 4px;
  transition: gap .2s;
}

.bl-card-more:hover { gap: 8px; }

/* ═══════════════════════════════════════════════════════
   EMPTY
═══════════════════════════════════════════════════════ */
.bl-empty {
  text-align: center;
  padding: 80px 20px;
  background: var(--bl-soft);
  border: 1px dashed var(--bl-border);
  border-radius: var(--bl-radius-lg);
}

.bl-empty-icon {
  font-size: 4rem;
  opacity: .35;
  margin-bottom: 16px;
}

.bl-empty h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--bl-text);
}

.bl-empty p {
  margin: 0 0 20px;
  color: var(--bl-muted);
  font-size: .88rem;
}

.bl-empty-btn {
  display: inline-block;
  padding: 10px 24px;
  background: var(--bl-brand);
  color: #fff;
  text-decoration: none;
  border-radius: 10px;
  font-size: .85rem;
  font-weight: 700;
}

/* ═══════════════════════════════════════════════════════
   PAGINATION
═══════════════════════════════════════════════════════ */
.bl-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 36px;
  flex-wrap: wrap;
}

.pg-btn,
.pg-num {
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--bl-soft);
  border: 1px solid var(--bl-border);
  color: var(--bl-text);
  text-decoration: none;
  font-size: .88rem;
  font-weight: 600;
  transition: 0.2s ease;
  font-feature-settings: "ss02";
}

.pg-btn:hover:not(.disabled),
.pg-num:hover {
  background: var(--bl-brand);
  color: #fff;
  border-color: var(--bl-brand);
}

.pg-num.active {
  background: var(--bl-brand);
  color: #fff;
  border-color: var(--bl-brand);
  font-weight: 800;
}

.pg-btn.disabled {
  opacity: .35;
  cursor: not-allowed;
}

.pg-dots {
  padding: 0 4px;
  color: var(--bl-muted);
}

/* ═══════════════════════════════════════════════════════
   SINGLE POST
═══════════════════════════════════════════════════════ */
.bp-header {
  position: relative;
  padding: 40px 0;
  background: linear-gradient(135deg, #fff2f7 0%, #faf5f8 100%);
  border-bottom: 1px solid var(--bl-border);
}

[data-theme="dark"] .bp-header {
  background: linear-gradient(135deg, #241820 0%, #1b1219 100%);
}

.bp-cover {
  position: relative;
  width: 100%;
  max-height: 420px;
  overflow: hidden;
  margin-bottom: 30px;
}

.bp-cover img {
  width: 100%;
  height: 420px;
  object-fit: cover;
}

.bp-cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, .4) 100%);
}

.bp-inner {
  width: min(860px, 94%);
  margin: 0 auto;
  padding: 0 15px;
}

.bp-header .breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  color: var(--bl-muted);
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.bp-header .breadcrumb a {
  color: var(--bl-muted);
  text-decoration: none;
}

.bp-header .breadcrumb a:hover { color: var(--bl-brand); }

.bp-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  font-size: .82rem;
  color: var(--bl-muted);
}

.bp-cat-badge {
  display: inline-block;
  padding: 4px 14px 5px;
  background: var(--bl-brand);
  color: #fff;
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 700;
  text-decoration: none;
}

.bp-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}

.bp-title {
  margin: 0 0 16px;
  font-size: 2rem;
  font-weight: 900;
  color: var(--bl-text);
  line-height: 1.4;
  letter-spacing: -.4px;
}

.bp-excerpt {
  margin: 0;
  font-size: 1rem;
  line-height: 1.9;
  color: var(--bl-muted);
  padding-right: 14px;
  border-right: 3px solid var(--bl-brand);
}

.bp-page {
  padding: 50px 0;
  background: var(--bl-bg);
}

.bp-content {
  font-size: 1rem;
  line-height: 2;
  color: var(--bl-text);
  max-width: 100%;
}

.bp-content h2 {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 32px 0 14px;
  color: var(--bl-text);
  padding-right: 12px;
  border-right: 4px solid var(--bl-brand);
  padding-bottom: 6px;
}

.bp-content h3 {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 24px 0 10px;
  color: var(--bl-text);
}

.bp-content p {
  margin: 0 0 16px;
}

.bp-content ul,
.bp-content ol {
  padding-right: 24px;
  margin: 0 0 16px;
}

.bp-content li {
  margin-bottom: 8px;
}

.bp-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--bl-radius);
  margin: 16px 0;
}

.bp-content blockquote {
  margin: 20px 0;
  padding: 16px 20px;
  background: var(--bl-soft);
  border-right: 4px solid var(--bl-brand);
  border-radius: 0 10px 10px 0;
  font-style: italic;
  color: var(--bl-muted);
}

.bp-content code {
  background: var(--bl-soft);
  padding: 2px 6px;
  border-radius: 6px;
  font-family: monospace;
  font-size: .9em;
  direction: ltr;
  display: inline-block;
}

/* Share */
.bp-share {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 40px;
  padding: 18px 0;
  border-top: 1px solid var(--bl-border);
  border-bottom: 1px solid var(--bl-border);
  flex-wrap: wrap;
}

.bp-share-label {
  font-size: .86rem;
  font-weight: 700;
  color: var(--bl-muted);
}

.bp-share-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--bl-soft);
  color: var(--bl-text);
  text-decoration: none;
  transition: 0.2s ease;
}

.bp-share-btn:hover {
  background: var(--bl-brand);
  color: #fff;
  transform: translateY(-2px);
}

/* Related */
.bp-related {
  margin-top: 50px;
}

.bp-related-title {
  margin: 0 0 22px;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--bl-text);
}

.bp-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.bp-related-card {
  background: var(--bl-soft);
  border: 1px solid var(--bl-border);
  border-radius: var(--bl-radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: 0.28s ease;
  display: flex;
  flex-direction: column;
}

.bp-related-card:hover {
  transform: translateY(-4px);
  border-color: var(--bl-brand);
  box-shadow: 0 16px 30px -12px rgba(179, 42, 101, .2);
}

.bp-related-cover {
  width: 100%;
  height: 150px;
  overflow: hidden;
  background: var(--bl-bg);
  display: grid;
  place-items: center;
  font-size: 2.4rem;
  opacity: .6;
}

.bp-related-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
}

.bp-related-info {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.bp-related-cat {
  font-size: .68rem;
  color: var(--bl-brand);
  font-weight: 700;
}

.bp-related-name {
  margin: 0;
  font-size: .9rem;
  font-weight: 800;
  color: var(--bl-text);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bp-related-date {
  font-size: .7rem;
  color: var(--bl-muted);
  margin-top: auto;
}

/* Back */
.bp-back {
  margin-top: 40px;
  text-align: center;
}

.bp-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  background: var(--bl-soft);
  border: 1px solid var(--bl-border);
  color: var(--bl-text);
  text-decoration: none;
  border-radius: 10px;
  font-size: .86rem;
  font-weight: 700;
  transition: 0.2s ease;
}

.bp-back-btn:hover {
  background: var(--bl-brand);
  color: #fff;
  border-color: var(--bl-brand);
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════ */
@media (max-width: 991px) {
  .bl-layout {
    grid-template-columns: 1fr;
  }

  .bl-sidebar {
    position: static;
    order: 2;
  }

  .bl-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .bp-related-grid {
    grid-template-columns: 1fr;
  }

  .bp-title {
    font-size: 1.5rem;
  }
}

@media (max-width: 640px) {
  .bl-header {
    padding: 16px 0 28px;
  }

  .bl-title { font-size: 1.35rem; }
  .bl-count { font-size: .78rem; }

  .bl-page { padding: 24px 0 40px; }

  .bl-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .bl-card-cover { height: 200px; }

  .bp-header { padding: 24px 0; }
  .bp-cover img { height: 220px; }

  .bp-title { font-size: 1.25rem; }
  .bp-excerpt { font-size: .88rem; }

  .bp-content { font-size: .92rem; line-height: 1.9; }
  .bp-content h2 { font-size: 1.15rem; }
  .bp-content h3 { font-size: 1rem; }

  .bp-page { padding: 30px 0; }

  .pg-btn,
  .pg-num {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    font-size: .8rem;
  }
}

/* ═══════════════════════════════════════════════════════
   DARK MODE
═══════════════════════════════════════════════════════ */
[data-theme="dark"] .bl-search { background: #1e1b22; }
[data-theme="dark"] .bl-card-cover-placeholder { background: linear-gradient(135deg, #2a1a24 0%, #121014 100%); }
[data-theme="dark"] .bl-latest-img { background: #191620; }
[data-theme="dark"] .bp-cover-overlay { background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.6) 100%); }
[data-theme="dark"] .bl-empty { background: #1e1b22; }