/* ══════════════════════════════════════════════════════════════
   Bliska Psychologia — Blog Archive Styles v3
   Plik: /wp-content/plugins/bp-patterns/assets/bp-blog.css

   v3: toolbar nie nachodzi, mniejsze paddingi, mniejszy placeholder
   ══════════════════════════════════════════════════════════════ */

/* ── Ukryj domyślne elementy GP wewnątrz .site-main ── */
.blog .site-main .entry-header,
.archive .site-main .entry-header,
.blog .site-main .entry-summary,
.archive .site-main .entry-summary,
.blog .site-main .entry-meta,
.archive .site-main .entry-meta,
.blog .site-main > article.post,
.archive .site-main > article.post,
.blog .site-main .paging-navigation,
.archive .site-main .paging-navigation,
.blog .site-main > .page-header,
.category .site-main > .page-header {
  display: none !important;
}

.blog .site-main,
.archive .site-main,
.blog .content-area,
.archive .content-area {
  width: 100% !important;
  max-width: 100% !important;
}

/* Wyzeruj domyślne paddingi GP na archiwum */
.blog .site-main,
.archive .site-main {
  padding-top: 0 !important;
  margin-top: 0 !important;
}
.blog .inside-article,
.archive .inside-article {
  padding: 0 !important;
  margin: 0 !important;
}
.blog .site-content .content-area,
.archive .site-content .content-area {
  padding: 0 !important;
}
.blog .entry-content,
.archive .entry-content {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* ══════════════════════════════════════════
   BLOG HERO
   ══════════════════════════════════════════ */
.bp-blog-hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 20px 12px;
}

.bp-blog-hero-h1 {
  font-family: var(--bp-f-serif) !important;
  font-weight: 700 !important;
  font-size: clamp(24px, 3.5vw, 32px) !important;
  color: var(--bp-navy) !important;
  margin: 0 0 6px 0 !important;
  line-height: 1.25 !important;
  padding: 0 !important;
}

.bp-blog-hero-desc {
  font-family: var(--bp-f-sans);
  font-size: 16px;
  color: var(--bp-muted);
  max-width: 560px;
  line-height: 1.5;
  margin: 0;
}

/* ══════════════════════════════════════════
   TOOLBAR — filtry i szukajka
   Szukajka ZAWSZE w osobnej linii pod filtrami.
   Dzięki temu nigdy nie nachodzą na siebie.
   ══════════════════════════════════════════ */
.bp-blog-toolbar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bp-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.bp-filter-btn {
  display: inline-block;
  background: var(--bp-card);
  border: 1px solid var(--bp-sep);
  color: var(--bp-text);
  padding: 6px 14px;
  border-radius: 18px;
  font-family: var(--bp-f-sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  text-decoration: none;
  line-height: 1.4;
}
.bp-filter-btn:hover {
  border-color: var(--bp-teal);
  color: var(--bp-teal);
  text-decoration: none;
}
.bp-filter-btn.active {
  background: var(--bp-teal);
  border-color: var(--bp-teal);
  color: #fff;
}
.bp-filter-btn.active:hover {
  background: var(--bp-teal-dark);
  border-color: var(--bp-teal-dark);
  color: #fff;
}

/* Szukajka — !important na wszystkim bo GP nadpisuje input[type="text"] */
.bp-blog-toolbar .bp-search-wrap {
  position: relative;
  max-width: 300px;
}
.bp-blog-toolbar .bp-search-wrap .bp-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--bp-muted);
  pointer-events: none;
  z-index: 2;
}
.bp-blog-toolbar .bp-search-wrap input.bp-search-input {
  background: var(--bp-card) !important;
  border: 1px solid var(--bp-sep) !important;
  border-radius: 8px !important;
  padding: 8px 14px 8px 34px !important;
  font-family: var(--bp-f-sans) !important;
  font-size: 13px !important;
  color: var(--bp-text) !important;
  width: 100% !important;
  max-width: 300px !important;
  height: auto !important;
  min-height: 0 !important;
  line-height: 1.4 !important;
  margin: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  -webkit-appearance: none !important;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.bp-blog-toolbar .bp-search-wrap input.bp-search-input::placeholder {
  color: var(--bp-muted) !important;
  opacity: 1;
}
.bp-blog-toolbar .bp-search-wrap input.bp-search-input:focus {
  border-color: var(--bp-teal) !important;
  box-shadow: 0 0 0 3px rgba(61,126,143,0.1) !important;
}

/* ══════════════════════════════════════════
   INFO O WYNIKACH
   ══════════════════════════════════════════ */
.bp-results-info {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 6px;
  font-family: var(--bp-f-sans);
  font-size: 13px;
  color: var(--bp-muted);
  transition: opacity 0.2s;
}
.bp-results-info strong {
  color: var(--bp-text);
  font-weight: 600;
}

/* ══════════════════════════════════════════
   GRID KART
   ══════════════════════════════════════════ */
.bp-blog-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 40px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  transition: opacity 0.2s ease;
}

/* Animacje przejść dla wyszukiwarki */
.bp-grid-fade-out {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.bp-grid-fade-in {
  animation: bp-gridIn 0.35s ease both;
}

@keyframes bp-gridIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════
   KARTA ARTYKUŁU
   ══════════════════════════════════════════ */
.bp-blog-card {
  background: var(--bp-card);
  border-radius: 10px;
  border: 1px solid var(--bp-sep);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  cursor: pointer;
  text-decoration: none !important;
  color: inherit !important;
  animation: bp-fadeUp 0.4s ease both;
}
.bp-blog-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(27,58,75,0.07);
  color: inherit !important;
  text-decoration: none !important;
}

.bp-blog-card.bp-card-enter {
  animation: bp-fadeUp 0.35s ease both;
}

/* Obrazek / placeholder — mniejszy niż 16:9 */
.bp-card-img {
  width: 100%;
  aspect-ratio: 2.2 / 1;
  background: linear-gradient(135deg, var(--bp-teal-bg) 0%, #daeef3 100%);
  position: relative;
  overflow: hidden;
}
.bp-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.bp-card-img-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  opacity: 0.15;
  color: var(--bp-teal);
}

/* Body karty */
.bp-card-body {
  padding: 16px 20px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.bp-card-cat {
  font-family: var(--bp-f-sans);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--bp-teal);
  margin-bottom: 6px;
  display: block;
}

.bp-card-title {
  font-family: var(--bp-f-serif) !important;
  font-weight: 700 !important;
  font-size: 17px !important;
  line-height: 1.35 !important;
  color: var(--bp-navy) !important;
  margin: 0 0 8px 0 !important;
  padding: 0 !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bp-blog-card:hover .bp-card-title {
  color: var(--bp-teal-dark) !important;
}

.bp-card-excerpt {
  font-family: var(--bp-f-sans);
  font-size: 14px;
  line-height: 1.55;
  color: var(--bp-muted);
  margin: 0 0 14px 0;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Meta karty */
.bp-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--bp-f-sans);
  font-size: 12px;
  color: var(--bp-muted);
  padding-top: 12px;
  border-top: 1px solid var(--bp-sep);
}
.bp-card-meta-right {
  display: flex;
  align-items: center;
  gap: 4px;
}
.bp-card-meta svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════
   PAGINACJA
   ══════════════════════════════════════════ */
.bp-pagination {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--bp-f-sans);
}

.bp-pagination a,
.bp-pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--bp-sep);
  background: var(--bp-card);
  font-size: 14px;
  font-weight: 500;
  color: var(--bp-text);
  text-decoration: none;
  transition: all 0.2s;
}
.bp-pagination a:hover {
  border-color: var(--bp-teal);
  color: var(--bp-teal);
  text-decoration: none;
}
.bp-pagination span.current {
  background: var(--bp-teal);
  border-color: var(--bp-teal);
  color: #fff;
}
.bp-pagination span.dots {
  border: none;
  background: none;
  color: var(--bp-muted);
  min-width: 28px;
  padding: 0;
}
.bp-pagination a.prev,
.bp-pagination a.next {
  padding: 0;
}
.bp-pagination a.prev svg,
.bp-pagination a.next svg {
  width: 16px;
  height: 16px;
}

/* ══════════════════════════════════════════
   PUSTY STAN
   ══════════════════════════════════════════ */
.bp-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 56px 20px;
}
.bp-empty svg {
  width: 40px;
  height: 40px;
  color: var(--bp-muted);
  opacity: 0.4;
  margin-bottom: 14px;
}
.bp-empty p {
  color: var(--bp-muted);
  font-family: var(--bp-f-sans);
  font-size: 15px;
  margin: 0;
}
.bp-empty-reset {
  display: inline-block;
  margin-top: 10px;
  font-family: var(--bp-f-sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--bp-teal);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
}
.bp-empty-reset:hover {
  color: var(--bp-teal-dark);
}

/* ══════════════════════════════════════════
   ANIMACJA KART
   ══════════════════════════════════════════ */
@keyframes bp-fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════ */

/* Tablet — 2 kolumny */
@media (max-width: 960px) {
  .bp-blog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
}

/* Telefon */
@media (max-width: 680px) {
  .bp-blog-hero {
    padding: 22px 16px 14px;
  }
  .bp-blog-hero-h1 {
    font-size: 22px !important;
  }
  .bp-blog-toolbar {
    padding: 0 16px 14px;
  }
  .bp-search-wrap {
    max-width: 100%;
  }
  .bp-search-input {
    width: 100%;
  }
  .bp-filters {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .bp-filters::-webkit-scrollbar {
    display: none;
  }
  .bp-blog-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 0 16px 36px;
  }
  .bp-results-info {
    padding: 0 16px 8px;
  }
  .bp-pagination {
    padding: 0 16px 40px;
  }
}
