/* AI Blogpost Filter v6 */

.abf-wrap {
  --abf-ac: #1a1a1a;
  --abf-bc: #c0392b;
  font-family: 'Heebo','Rubik',system-ui,sans-serif;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 0 60px;
  color: #1a1a1a;
  direction: rtl;
}

/* ── GROUP ── */
.abf-group { margin-bottom: 24px; }

.abf-group-label {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: black;
  margin-bottom: 12px;
}

/* ── TABS ── */
.abf-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  direction: rtl;
}

.abf-tab {
  display: inline-flex;
  align-items: center;
  padding: 7px 18px;
  border: 1.5px solid #ccc;
  border-radius: 999px;
  background: #DDD6C6;
  color: #1a1a1a;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all .18s ease;
  white-space: nowrap;
  line-height: 1.4;
  outline: none;
}

.abf-tab:hover {
  border-color: var(--abf-ac);
  color: var(--abf-ac);
}

.abf-tab.active {
  background: var(--abf-ac);
  border-color: var(--abf-ac);
  color: #fff;
  font-weight: 700;
}

/* ── SEARCH ── */
.abf-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 500px;
}

.abf-search-icon {
  position: absolute;
  right: 14px;
  width: 17px;
  height: 17px;
  color: #bbb;
  pointer-events: none;
}

.abf-search-input {
  width: 100%;
  padding: 11px 44px 11px 40px;
  border: 1.5px solid #ccc;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  background: #F5EDDF;
  color: #1a1a1a;
  direction: rtl;
  transition: border-color .2s, box-shadow .2s;
}

.abf-search-input:focus {
  border-color: var(--abf-ac);
  box-shadow: 0 0 0 3px rgba(0,0,0,.05);
}

.abf-search-input::placeholder { color: #bbb; }

.abf-clear-btn {
  position: absolute;
  left: 12px;
  background: #eee;
  border: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 10px;
  color: #666;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
  transition: background .15s;
}
.abf-clear-btn:hover { background: #ddd; }

/* ── SORT ── */
.abf-sort-select {
  padding: 9px 14px;
  border: 1px solid #666;
  border-radius: 10px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  background: #F5EDDF;
  color: #1a1a1a;
  cursor: pointer;
  min-width: 160px;
  max-width: 200px;
  direction: rtl;
  transition: border-color .2s;
}

.abf-sort-select:focus { border-color: var(--abf-ac); }

/* ── COUNT BAR ── */
.abf-count-bar {
  font-size: 13px;
  color: #555;
  padding-bottom: 18px;
  margin-bottom: 4px;
  border-bottom: 1.5px solid #2f2d2d59;
  text-align: right;
}

.abf-count-bar strong { color: #1a1a1a; }

/* ── LIST ── */
.abf-list { display: flex; flex-direction: column; }

/* ── POST ROW ── */
.abf-post-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 8px;
  border-bottom: 1px solid #2f2d2d59;
  text-decoration: none;
  color: #1a1a1a;
  transition: background .15s;
  animation: abfFadeIn .3s ease both;
}

.abf-post-row:hover {
  background: #F8F3E1 !important;
  border-top: 1px solid #2f2d2d59 !important;
  border-bottom: 1px solid #2f2d2d59 !important;
}

@keyframes abfFadeIn {
  from { opacity:0; transform:translateY(8px); }
  to   { opacity:1; transform:none; }
}

.abf-post-body {
  flex: 1;
  min-width: 0;
  text-align: right;
}

.abf-post-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
  justify-content: flex-end;
}

.abf-post-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--abf-bc);
}

.abf-post-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 6px;
  color: #1a1a1a;
}

.abf-post-excerpt {
  font-size: 13px;
  color: #777;
  line-height: 1.6;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.abf-post-date {
  font-size: 11px;
  color: #bbb;
  margin-top: 6px;
}

.abf-post-arrow {
  font-size: 18px;
  color: #999;
  flex-shrink: 0;
  transition: transform .2s ease;
}

.abf-post-row:hover .abf-post-arrow { transform: translateX(-4px); }

/* ── LOADER ── */
.abf-loader {
  display: flex;
  justify-content: center;
  padding: 50px 0;
}

.abf-spinner {
  width: 30px;
  height: 30px;
  border: 3px solid #e5e5e5;
  border-top-color: var(--abf-ac);
  border-radius: 50%;
  animation: abfSpin .7s linear infinite;
}

@keyframes abfSpin { to { transform: rotate(360deg); } }

/* ── EMPTY ── */
.abf-empty {
  text-align: center;
  padding: 50px 20px;
  color: #999;
}
.abf-empty-icon { font-size: 32px; margin-bottom: 10px; }
.abf-empty p { font-size: 14px; }

/* ── LOAD MORE ── */
.abf-more-wrap { text-align: center; margin-top: 32px; }

.abf-more-btn {
  padding: 11px 40px;
  background: transparent;
  border: 2px solid var(--abf-ac);
  border-radius: 999px;
  color: var(--abf-ac);
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all .2s ease;
  outline: none;
}

.abf-more-btn:hover {
  background: var(--abf-ac);
  color: #fff;
}

/* ── MOBILE ── */
@media (max-width: 600px) {
  .abf-tab { font-size: 12px; padding: 6px 14px; }
  .abf-post-title { font-size: 16px; }
  .abf-search-input { font-size: 13px; }
  .abf-post-row { padding: 18px 4px; }
}
/* Fix search box - full width, icon left */
.abf-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 100% !important;
  width: 100%;
}

.abf-search-input {
  width: 100% !important;
  padding: 13px 18px 13px 46px !important;
  border: 1.5px solid #ccc;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  background: #F5EDDF;
  color: #1a1a1a;
  direction: rtl;
  transition: border-color .2s, box-shadow .2s;
}

.abf-search-input:focus {
  border-color: var(--abf-ac);
  box-shadow: 0 0 0 3px rgba(0,0,0,.05);
}

.abf-search-icon {
  position: absolute;
  left: 14px !important;
  right: auto !important;
  width: 17px;
  height: 17px;
  color: #bbb;
  pointer-events: none;
}

.abf-clear-btn {
  position: absolute;
  right: 12px !important;
  left: auto !important;
}
.abf-post-cats {
  text-align: right !important;
  direction: rtl !important;
  width: 100% !important;
  display: block !important;
  margin-bottom: 6px !important;
}

.abf-post-badge {
  display: inline-block !important;
  margin-left: 8px !important;
  margin-right: 0 !important;
}

.abf-post-badge:first-child {
  margin-left: 0 !important;
}

.abf-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 400px !important;
  width: 100%;
}
.abf-group {
    margin-bottom: 24px;
    margin-top: 30px;
}
.abf-tab:hover,
.abf-tab.active {
  background: #1a1a1a !important;
  border-color: #1a1a1a !important;
  color: #fff !important;
}