/* ============================================================
   Post Filter Grid — [post_filter_grid]
   Brand palette:
     cream   #e5d4af
     burgundy #811252
     teal    #276c6c
     white   #fff
     dark    #231f20
     silver  #e8e8e8
   ============================================================ */

/* ── Wrapper ─────────────────────────────────────────────── */
.pfg-wrap {
  position: relative;
  font-family: inherit;
  color: #231f20;
}

/* ── Search ──────────────────────────────────────────────── */
.pfg-search-wrap {
  margin-bottom: 1.5rem;
}

.pfg-search-inner {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 560px;
}

.pfg-search-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: #811252;
  pointer-events: none;
  flex-shrink: 0;
}

.pfg-search {
  width: 100%;
  padding: 0.7rem 2.6rem 0.7rem 2.6rem;
  border: 2px solid #e5d4af;
  border-radius: 6px;
  font-size: 0.95rem;
  color: #231f20;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.pfg-search:focus {
  outline: none;
  border-color: #811252;
  box-shadow: 0 0 0 3px rgba(129, 18, 82, 0.12);
}

.pfg-search::-webkit-search-cancel-button { display: none; }

.pfg-search-clear {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #811252;
  display: flex;
  align-items: center;
  opacity: 0.7;
  transition: opacity 0.15s;
}

.pfg-search-clear:hover { opacity: 1; }
.pfg-search-clear svg { width: 15px; height: 15px; }

/* ── Category chips ──────────────────────────────────────── */
.pfg-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 2rem;
}

.pfg-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  padding: 0.42em 1em;
  border: 2px solid #276c6c;
  border-radius: 999px;
  background: transparent;
  color: #276c6c;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s, transform 0.12s;
  white-space: nowrap;
}

.pfg-chip:hover {
  background: rgba(39, 108, 108, 0.08);
  transform: translateY(-1px);
}

.pfg-chip--active {
  background: #276c6c;
  color: #fff;
  border-color: #276c6c;
}

.pfg-chip--active:hover {
  background: #1d5252;
  border-color: #1d5252;
}

.pfg-chip--hidden { display: none; }

.pfg-chip-x {
  font-size: 0.75em;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.15s, transform 0.15s;
  line-height: 1;
  margin-left: 0.1em;
  display: none;
}

.pfg-chip--active .pfg-chip-x {
  opacity: 1;
  transform: scale(1);
  display: inline-block;
}

.pfg-show-all {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  color: #811252;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
  padding: 0.3em 0.4em;
  transition: color 0.15s;
}

.pfg-show-all:hover { color: #5a0c39; }

/* ── Status / ARIA live ──────────────────────────────────── */
.pfg-status {
  font-size: 0.82rem;
  color: #666;
  min-height: 1.2em;
  margin-bottom: 1rem;
}

/* ── Grid ────────────────────────────────────────────────── */
.pfg-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  min-height: 200px;
  transition: opacity 0.2s;
}

.pfg-wrap--loading .pfg-grid { opacity: 0.4; pointer-events: none; }

@media (max-width: 900px) {
  .pfg-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .pfg-grid { grid-template-columns: 1fr; }
}

/* ── Card ────────────────────────────────────────────────── */
.pfg-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e8e8e8;
  transition: box-shadow 0.2s, transform 0.2s;
}

.pfg-card:hover {
  box-shadow: 0 6px 24px rgba(35, 31, 32, 0.1);
  transform: translateY(-3px);
}

.pfg-card__thumb-link { display: block; text-decoration: none; }

.pfg-card__thumb {
  width: 100%;
  padding-top: 58%;
  background-size: cover;
  background-position: center;
  background-color: #e5d4af;
  transition: transform 0.3s ease;
}

.pfg-card:hover .pfg-card__thumb { transform: scale(1.03); }
.pfg-card__thumb-link { overflow: hidden; display: block; }

.pfg-card__thumb--placeholder {
  background-color: #e5d4af;
  background-image: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 6px,
    rgba(129,18,82,.06) 6px,
    rgba(129,18,82,.06) 12px
  );
}

.pfg-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.1rem 1.25rem 1.25rem;
  gap: 0.4rem;
}

.pfg-card__cat {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #811252;
}

.pfg-card__title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.35;
}

.pfg-card__title a {
  color: #231f20;
  text-decoration: none;
  transition: color 0.15s;
}

.pfg-card__title a:hover { color: #811252; }

.pfg-card__excerpt {
  font-size: 0.875rem;
  color: #555;
  margin: 0.25rem 0 0;
  line-height: 1.6;
  flex: 1;
}

.pfg-card__meta {
  font-size: 0.78rem;
  color: #888;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #f0f0f0;
}

/* ── No results ──────────────────────────────────────────── */
.pfg-no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  color: #888;
}

.pfg-no-results svg {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  opacity: 0.35;
}

.pfg-no-results p {
  font-size: 1rem;
  margin: 0;
}

/* ── Pagination ──────────────────────────────────────────── */
.pfg-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 2.5rem;
}

.pfg-page-btn {
  min-width: 38px;
  height: 38px;
  padding: 0 0.6rem;
  border: 2px solid #e5d4af;
  border-radius: 6px;
  background: #fff;
  color: #231f20;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pfg-page-btn:hover:not(:disabled):not(.pfg-page-btn--active) {
  border-color: #276c6c;
  color: #276c6c;
}

.pfg-page-btn--active {
  background: #811252;
  border-color: #811252;
  color: #fff;
  cursor: default;
}

.pfg-page-btn--prev,
.pfg-page-btn--next {
  font-size: 1.1rem;
}

.pfg-page-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.pfg-page-ellipsis {
  padding: 0 0.25rem;
  color: #aaa;
  font-size: 0.875rem;
  line-height: 38px;
}

/* ── Loading dots ────────────────────────────────────────── */
.pfg-loading {
  display: none;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 1.5rem;
}

.pfg-wrap--loading .pfg-loading { display: flex; }

.pfg-loading span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #811252;
  animation: pfgPulse 1.2s ease-in-out infinite;
}

.pfg-loading span:nth-child(2) { animation-delay: 0.2s; }
.pfg-loading span:nth-child(3) { animation-delay: 0.4s; }

@keyframes pfgPulse {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40%           { transform: scale(1);   opacity: 1; }
}