/* =========================================================================
   Motyl-Pro — Blog archive + single post styles
   Reuses info-page visual language (petrol, cards, sidebar)
   ========================================================================= */

/* ---- Blog archive hero ---- */
.blog-hero {
  position: relative; overflow: hidden; isolation: isolate;
}
.blog-hero__grad {
  position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(120% 140% at 80% -10%, #f59236 0%, rgba(245,146,54,0) 55%),
    radial-gradient(120% 120% at 0% 120%, #c25500 0%, rgba(194,85,0,0) 60%),
    linear-gradient(135deg, #c25500 0%, #fb9942 100%);
}
.blog-hero__texture {
  position: absolute; inset: 0; z-index: -1; opacity: .5; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='1.1' opacity='0.5'%3E%3Cpath d='M10 60 Q40 20 60 60 T110 60'/%3E%3Cpath d='M10 90 Q40 50 60 90 T110 90'/%3E%3Cpath d='M10 30 Q40 -10 60 30 T110 30'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 240px;
}
.blog-hero__inner {
  position: relative; text-align: center; padding: 64px 32px 96px; color: #fff;
}
.blog-hero__eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  font-weight: 600; color: rgba(255,255,255,.82); margin-bottom: 14px;
}
.blog-hero__eyebrow::before {
  content: ""; width: 26px; height: 1.5px; background: #fb9942;
}
.blog-hero h1 {
  color: #fff; font-size: clamp(30px,4vw,48px); font-weight: 700;
  text-shadow: 0 2px 30px rgba(0,0,0,.25); margin: 0;
}
.blog-hero__sub {
  font-size: clamp(15px,1.8vw,18px); font-weight: 300;
  color: rgba(255,255,255,.85); margin-top: 10px;
}
/* Hero z featured image jako tło */
.blog-hero--has-thumb {
  background-size: cover; background-position: center;
}
.blog-hero--has-thumb .blog-hero__grad {
  background:
    radial-gradient(120% 140% at 80% -10%, rgba(245,146,54,.65) 0%, rgba(245,146,54,0) 55%),
    radial-gradient(120% 120% at 0% 120%, rgba(194,85,0,.78) 0%, rgba(194,85,0,0) 60%),
    linear-gradient(135deg, rgba(194,85,0,.88) 0%, rgba(251,153,66,.72) 100%);
}

/* ---- Category filter chips ---- */
.blog-filters {
  background: #fafaf8; border-bottom: 1px solid #e7e7e7;
}
.blog-filters .wrap {
  display: flex; align-items: center; gap: 10px; padding-top: 20px; padding-bottom: 20px;
  flex-wrap: wrap;
}
.blog-chip {
  display: inline-flex; align-items: center; padding: 8px 18px;
  border-radius: 6px; font-size: 14px; font-weight: 500;
  color: #54575a; background: #fff; border: 1px solid #e7e7e7;
  text-decoration: none; transition: .16s;
}
.blog-chip:hover { border-color: #000000; color: #000000; }
.blog-chip.is-active {
  background: #000000; color: #fff; border-color: #000000;
}

/* ---- Blog grid ---- */
.blog-body { background: #fafaf8; padding-bottom: 64px; }
.blog-body .wrap { margin-top: -48px; padding-top: 40px; position: relative; z-index: 2; }
.blog-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.blog-card {
  background: #fff; border: 1px solid #e7e7e7; border-radius: 10px;
  overflow: hidden; box-shadow: 0 1px 2px rgba(20,20,20,.04), 0 8px 24px rgba(20,20,20,.05);
  transition: box-shadow .2s, transform .2s;
}
.blog-card:hover { box-shadow: 0 12px 32px rgba(20,20,20,.1); transform: translateY(-2px); }
.blog-card__img-wrap {
  display: block; overflow: hidden; line-height: 0;
  aspect-ratio: 4 / 3;   /* ratio na wrapperze — niezależne od atrybutów img WP */
}
.blog-card__img {
  display: block; width: 100%; height: 100%;
  object-fit: cover; object-position: center;
}
.blog-card__img-placeholder {
  display: block; width: 100%; height: 100%; min-height: 200px; background: #eef4f3;
}
.blog-card__body { padding: 22px 24px 24px; }
.blog-card__cat {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: #000000; background: #eef4f3;
  padding: 4px 10px; border-radius: 4px; margin-bottom: 10px;
}
.blog-card__title {
  font-size: 18px; font-weight: 700; color: #1b1b1b; line-height: 1.3;
  margin: 0 0 8px; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.blog-card__title a { color: inherit; text-decoration: none; }
.blog-card__title a:hover { color: #000000; }
.blog-card__excerpt {
  font-size: 14px; color: #54575a; line-height: 1.6; margin: 0 0 14px;
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}
.blog-card__meta {
  font-size: 12px; color: #7c8085;
}
.blog-card__read {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: #000000;
  text-transform: uppercase; letter-spacing: .04em;
  text-decoration: none; border-bottom: 1.5px solid #000000;
  padding-bottom: 2px; margin-top: 12px;
}
.blog-card__read:hover { color: #fb9942; border-color: #fb9942; }

/* ---- Pagination ---- */
.blog-pagination {
  display: flex; justify-content: center; gap: 8px; margin-top: 48px;
}
.blog-pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 6px; font-size: 15px; font-weight: 600;
  color: #1b1b1b; background: #fff; border: 1px solid #e7e7e7;
  text-decoration: none; transition: .16s;
}
.blog-pagination .page-numbers:hover { border-color: #000000; color: #000000; }
.blog-pagination .page-numbers.current {
  background: #000000; color: #fff; border-color: #000000;
}
.blog-pagination .page-numbers.prev,
.blog-pagination .page-numbers.next {
  width: auto; padding: 0 16px; font-size: 13px;
}

/* ---- Single post layout ---- */
.blog-single-body { background: #fafaf8; }
.blog-single-layout {
  display: grid; grid-template-columns: 1fr 280px; gap: 48px;
  align-items: start; margin-top: -48px; padding-bottom: 88px;
  position: relative; z-index: 2;
}
.blog-single-content { min-width: 0; }
.blog-single-article {
  background: #fff; border: 1px solid #e7e7e7; border-radius: 10px;
  padding: 48px 52px; box-shadow: 0 1px 2px rgba(20,20,20,.04), 0 8px 24px rgba(20,20,20,.05);
}
.blog-single-article .entry-featured {
  margin: -48px -52px 32px; border-radius: 10px 10px 0 0; overflow: hidden;
}
.blog-single-article .entry-featured img {
  width: 100%; height: auto; display: block;
}
.blog-single-article .entry-meta {
  font-size: 13px; color: #7c8085; margin-bottom: 24px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.blog-single-article .entry-meta .cat-badge {
  font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: #000000; background: #eef4f3;
  padding: 4px 10px; border-radius: 4px;
}
.blog-single-article h1 {
  font-size: clamp(24px,3vw,32px); color: #1b1b1b; margin: 0 0 24px;
  line-height: 1.25;
}
.blog-single-article .entry-content {
  font-size: 16px; line-height: 1.75; color: #54575a;
}
.blog-single-article .entry-content p { margin: 0 0 18px; }
.blog-single-article .entry-content h2 {
  font-size: 24px; color: #1b1b1b; margin: 36px 0 12px;
}
.blog-single-article .entry-content h3 {
  font-size: 20px; color: #000000; margin: 30px 0 10px;
}
.blog-single-article .entry-content img {
  max-width: 100%; height: auto; border-radius: 10px; margin: 16px 0;
}
.blog-single-article .entry-content a {
  color: #2c6d6c; font-weight: 600;
  border-bottom: 1px solid rgba(44,109,108,.3);
}
.blog-single-article .entry-content a:hover { color: #000000; }
.blog-single-article .entry-content ul,
.blog-single-article .entry-content ol {
  margin: 0 0 18px; padding-left: 24px; color: #54575a;
}
.blog-single-article .entry-content blockquote {
  margin: 24px 0; padding: 20px 24px; background: #eef4f3;
  border-left: 4px solid #000000; border-radius: 6px;
  font-style: italic; color: #3d5a57;
}

/* ---- Sidebar ---- */
.blog-sidebar { position: sticky; top: 24px; }
.blog-sidebar__card {
  background: #fff; border: 1px solid #e7e7e7; border-radius: 10px;
  padding: 24px; box-shadow: 0 1px 2px rgba(20,20,20,.04), 0 8px 24px rgba(20,20,20,.05);
}
.blog-sidebar__title {
  font-size: 14px; font-weight: 700; color: #1b1b1b;
  text-transform: uppercase; letter-spacing: .04em;
  margin: 0 0 16px; padding-bottom: 12px;
  border-bottom: 1px solid #e7e7e7;
}
.blog-sidebar__list { list-style: none; margin: 0; padding: 0; }
.blog-sidebar__list li { margin-bottom: 14px; }
.blog-sidebar__list li:last-child { margin-bottom: 0; }
.blog-sidebar__list a {
  display: flex; gap: 14px; align-items: flex-start; text-decoration: none;
}
.blog-sidebar__list .sb-thumb {
  width: 70px; height: 50px; border-radius: 6px; object-fit: cover; flex: 0 0 auto;
}
.blog-sidebar__list .sb-info { min-width: 0; }
.blog-sidebar__list .sb-title {
  font-size: 14px; font-weight: 600; color: #1b1b1b; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.blog-sidebar__list a:hover .sb-title { color: #000000; }
.blog-sidebar__list .sb-date { font-size: 12px; color: #7c8085; margin-top: 3px; }

.blog-sidebar__cta {
  margin-top: 18px; background: #000000; color: #fff;
  border-radius: 10px; padding: 24px;
  box-shadow: 0 18px 50px rgba(16,58,60,.18);
}
.blog-sidebar__cta h4 { font-size: 15px; margin: 0 0 6px; color: #fff; }
.blog-sidebar__cta p { font-size: 13.5px; color: rgba(255,255,255,.75); margin: 0 0 14px; }
.blog-sidebar__cta .ip-btn {
  width: 100%; padding: 12px 16px; font-size: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  cursor: pointer; border: 1.5px solid transparent; border-radius: 6px;
  line-height: 1; transition: .18s; text-decoration: none;
  background: #fb9942; color: #fff;
}
.blog-sidebar__cta .ip-btn:hover { background: #e07530; }

/* ---- Responsive ---- */
@media (max-width: 1040px) {
  .blog-single-layout { grid-template-columns: 1fr; }
  .blog-sidebar { position: static; }
}
@media (max-width: 768px) {
  .blog-grid { grid-template-columns: 1fr; }
  .blog-single-article { padding: 30px 22px; }
  .blog-single-article .entry-featured { margin: -30px -22px 24px; border-radius: 10px 10px 0 0; }
  .blog-hero__inner { padding: 48px 22px 72px; }
}
@media (max-width: 480px) {
  .blog-grid { grid-template-columns: 1fr; }
}

/* =========================================================================
   Blog – Grid page template (page-blog.php)
   Klasy: .blg-toolbar, .blg-grid-section, .blg-search-wrap,
          .blg-results-info, .blg-empty
   ========================================================================= */

/* ─────────────────────────────────────────────────────────────────
   TOOLBAR — połączona wyszukiwarka + filtry kategorii
   ───────────────────────────────────────────────────────────────── */
.blg-toolbar {
  background: #fff;
  border-bottom: 1px solid #efefef;
  box-shadow: 0 4px 28px rgba(20,20,20,.07), 0 1px 4px rgba(20,20,20,.04);
  position: relative;
  z-index: 10;
}
.blg-toolbar .wrap {
  padding-top: 22px;
  padding-bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ---- Wiersz wyszukiwarki ---- */
.blg-toolbar__search-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.blg-toolbar__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #c4c8cc;
  flex: 0 0 auto;
  white-space: nowrap;
}

/* Formularz wyszukiwarki */
.blg-search-wrap {
  display: flex;
  align-items: stretch;
  flex: 1 1 auto;
  max-width: 640px;
  border: 2px solid #eaeaea;
  border-radius: 10px;
  background: #fafaf8;
  overflow: hidden;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.blg-search-wrap:focus-within {
  border-color: #fb9942;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(251,153,66,.12);
}
.blg-search__input {
  flex: 1 1 auto;
  border: none;
  outline: none;
  padding: 12px 16px;
  font-size: 15px;
  font-family: inherit;
  color: #1b1b1b;
  background: transparent;
  min-width: 0;
}
.blg-search__input::placeholder { color: #bbbfc4; }
.blg-search__clear {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  color: #c4c8cc;
  text-decoration: none;
  transition: color .15s;
}
.blg-search__clear:hover { color: #7c8085; }
.blg-search__btn {
  flex: 0 0 auto;
  background: #fb9942;
  border: none;
  cursor: pointer;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: background .16s;
}
.blg-search__btn:hover { background: #e07530; }
.blg-search__btn svg { flex: 0 0 auto; }

/* ---- Wiersz chipów ---- */
.blg-toolbar__chips-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.blg-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Nadpisanie chipów wewnątrz toolbara — pill, pomarańczowy active */
.blg-toolbar .blog-chip {
  border-radius: 100px;
  padding: 7px 18px;
  font-size: 13.5px;
}
.blg-toolbar .blog-chip:hover {
  border-color: #fb9942;
  color: #fb9942;
}
.blg-toolbar .blog-chip.is-active {
  background: #fb9942;
  border-color: #fb9942;
  color: #fff;
}

/* ---- Sekcja siatki ---- */
.blg-grid-section {
  background: #fafaf8;
  padding: 40px 0 72px;
}

/* ---- Pasek informacji o filtrach ---- */
.blg-results-info {
  font-size: 13.5px;
  color: #7c8085;
  margin: 0 0 24px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.blg-results-info strong { color: #1b1b1b; }
.blg-results-reset {
  margin-left: 6px;
  font-size: 12px;
  color: #fb9942;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: .02em;
}
.blg-results-reset:hover { color: #e07530; text-decoration: underline; }

/* ---- Brak wyników ---- */
.blg-empty {
  text-align: center;
  padding: 72px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.blg-empty__title {
  font-size: 20px;
  font-weight: 700;
  color: #1b1b1b;
  margin: 0;
}
.blg-empty__desc {
  font-size: 15px;
  color: #7c8085;
  margin: 0;
}
.blg-empty__desc a {
  color: #fb9942;
  text-decoration: none;
  font-weight: 600;
}
.blg-empty__desc a:hover { text-decoration: underline; }

/* ---- Responsive (blog page template) ---- */
@media (max-width: 768px) {
  .blg-toolbar .wrap { padding-top: 16px; padding-bottom: 16px; gap: 12px; }
  .blg-toolbar__label { display: none; } /* Ukryj labele na mobile — oszczędność miejsca */
  .blg-search-wrap { max-width: 100%; }
  .blg-search__btn span { display: none; } /* Tylko ikona na mobile */
  .blg-search__btn { padding: 0 14px; }
  .blg-grid-section { padding: 28px 0 48px; }
}
@media (max-width: 600px) {
  .blog-grid { grid-template-columns: 1fr; gap: 16px; }
}
