/* ═══════════════════════════════════════════════════════════
   /blog/ — Wideoblog LifeMasters (layout wg makiety)
   Filtry + siatka filmów + panel boczny (CTA, najpopularniejsze).
   ═══════════════════════════════════════════════════════════ */

.lm-bloglist {
  --ink: #17152c;
  --ink-2: #2b283d;
  --muted: #5e5a6d;
  --muted-2: #8a8798;
  --purple: #6B3FE7;
  --purple-soft: rgba(107,63,231,.09);
  --line: rgba(81,67,130,.14);
}
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.bl-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 36px;
  align-items: start;
  padding-top: 22px;
  padding-bottom: 80px;
}
.bl-main { min-width: 0; }

/* Nagłówek */
.bl-breadcrumbs { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; color: var(--muted-2); font-size: 14px; }
.bl-breadcrumbs a { display: inline-flex; color: var(--purple); padding: 2px 0; }
.bl-header h1 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: clamp(38px, 4.2vw, 60px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -.045em;
}
.bl-header h1 span {
  background: linear-gradient(120deg, #6B3FE7 0%, #8B5CFF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  /* tło przycięte do tekstu ucina ostatnią literę przy ujemnym letter-spacing — dodatkowe miejsce na jej krawędź */
  padding-right: .08em;
  margin-right: -.08em;
}
.bl-header p { max-width: 790px; margin: 0; color: var(--muted); font-size: 18px; line-height: 1.6; }
.bl-header strong { color: var(--ink); font-weight: 700; }

/* Pasek filtrów */
.bl-toolbar { display: flex; align-items: center; flex-wrap: nowrap; gap: 10px; margin: 28px 0 24px; }
.bl-search {
  flex: 0 0 200px;
  min-width: 0;
  height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: #6f6b84;
  transition: border-color .2s, box-shadow .2s;
}
.bl-search:focus-within { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(107,63,231,.12); }
.bl-search svg { flex: none; }
.bl-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
}
.bl-search input::placeholder { color: #8f8ba3; }
.bl-search input::-webkit-search-cancel-button { cursor: pointer; }

.bl-chips {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 4px;
  scrollbar-width: none;
}
.bl-chips::-webkit-scrollbar { display: none; }
/* Gdy kategorie się nie mieszczą: wygaszona krawędź jako sygnał „przewiń” (klasy ustawia blog-list.js) */
.bl-chips.fade-end { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); }
.bl-chips.fade-start { -webkit-mask-image: linear-gradient(90deg, transparent, #000 40px); mask-image: linear-gradient(90deg, transparent, #000 40px); }
.bl-chips.fade-start.fade-end { -webkit-mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent); }
.bl-chip {
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--ink-2);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
}
.bl-chip:hover { border-color: rgba(107,63,231,.45); }
.bl-chip.is-active { background: var(--purple); border-color: var(--purple); color: #fff; box-shadow: 0 8px 20px rgba(107,63,231,.25); }

.bl-sort { position: relative; flex: none; display: inline-flex; align-items: center; color: var(--ink-2); }
.bl-sort select {
  appearance: none;
  -webkit-appearance: none;
  height: 44px;
  padding: 0 36px 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink-2);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.bl-sort select:focus-visible { outline: 0; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(107,63,231,.12); }
.bl-sort svg { position: absolute; right: 14px; pointer-events: none; }

/* Siatka filmów */
.bl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.vcard[hidden] { display: none; }
.vcard {
  position: relative;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(41,31,87,.04);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.vcard:hover { transform: translateY(-4px); border-color: rgba(107,63,231,.3); box-shadow: 0 18px 40px rgba(56,38,117,.11); }
.vcard.is-featured { border: 2px solid var(--purple); box-shadow: 0 14px 34px rgba(107,63,231,.16); }
.vcard-link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.vcard-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 15px 15px 0 0;
  background: #eeeaf8;
}
.vcard.is-featured .vcard-thumb { border-radius: 14px 14px 0 0; }
.vcard-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.vcard:hover .vcard-thumb img { transform: scale(1.03); }
.vcard-featured {
  position: absolute;
  top: 0; left: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px 7px 10px;
  border-radius: 0 0 12px 0;
  background: var(--purple);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(107,63,231,.35);
}
.vcard-duration {
  position: absolute;
  right: 8px; bottom: 8px;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(10,8,25,.86);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}
.vcard-body { flex: 1; display: flex; flex-direction: column; padding: 14px 16px 16px; }
.vcard-tag {
  align-self: flex-start;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--purple-soft);
  color: var(--purple);
  font-size: 11.5px;
  font-weight: 700;
}
.vcard-title {
  margin: 10px 0 6px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: -.015em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.vcard-excerpt {
  flex: 1;
  color: #6a6680;
  font-size: 13.5px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.vcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.vcard-author { display: flex; align-items: center; gap: 9px; min-width: 0; }
.vcard-avatar {
  width: 32px; height: 32px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #9B72FF, #4A1FB8);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}
.vcard-author b { display: block; color: var(--ink-2); font-size: 12.5px; font-weight: 700; line-height: 1.25; }
.vcard-author small { display: block; color: var(--muted-2); font-size: 11.5px; line-height: 1.3; }
.vcard-cta { display: inline-flex; align-items: center; gap: 6px; flex: none; color: var(--purple); font-size: 14px; font-weight: 700; }
.vcard-cta svg { transition: transform .2s ease; }
.vcard:hover .vcard-cta svg { transform: translateX(3px); }

.bl-empty { margin: 8px 0 0; padding: 28px; border: 1px dashed rgba(107,63,231,.3); border-radius: 16px; text-align: center; color: var(--muted); }
.bl-empty button { border: 0; background: none; color: var(--purple); font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; }

/* Panel boczny */
.bl-side { min-width: 0; display: flex; flex-direction: column; gap: 26px; }

.bl-cta {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 126px;
  grid-template-areas: "copy phone" "stores stores";
  gap: 22px 16px;
  align-items: center;
  padding: 26px 24px 22px;
  border: 1px solid rgba(107,63,231,.16);
  border-radius: 20px;
  background:
    radial-gradient(circle at 90% 10%, rgba(129,78,255,.16), transparent 45%),
    linear-gradient(135deg, #fbf9ff, #efe9ff);
  box-shadow: 0 20px 54px rgba(56,38,117,.09);
}
.bl-cta-copy { grid-area: copy; min-width: 0; }
.bl-cta h2 { margin: 0 0 10px; color: var(--ink); font-size: 25px; font-weight: 900; line-height: 1.12; letter-spacing: -.03em; }
.bl-cta p { margin: 0 0 14px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.bl-cta ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.bl-cta li { display: flex; align-items: center; gap: 10px; color: #3a3650; font-size: 14px; font-weight: 500; }
.bl-cta li svg { flex: none; }
.bl-cta-phone {
  grid-area: phone;
  justify-self: center;
  width: 118px;
  border: 5px solid #1A1235;
  border-radius: 24px;
  background: #1A1235;
  box-shadow: 0 0 0 1px rgba(255,255,255,.06), 0 18px 40px rgba(26,18,53,.28), 0 0 50px rgba(107,63,231,.22);
  transform: rotate(5deg);
}
.bl-cta-phone img { width: 100%; height: auto; border-radius: 19px; }

.bl-popular-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.bl-popular-head h2 { margin: 0; color: var(--ink); font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.bl-popular-all { flex: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; padding: 4px 0; border: 0; background: none; color: var(--purple); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.bl-popular-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.bl-popular-list a {
  display: grid;
  grid-template-columns: 30px 128px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 8px 12px 8px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition: border-color .2s, transform .2s;
}
.bl-popular-list a:hover { border-color: rgba(107,63,231,.35); transform: translateX(2px); }
.bl-rank { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: var(--purple-soft); color: var(--purple); font-size: 15px; font-weight: 800; }
.bl-pop-thumb { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 8px; background: #eeeaf8; }
.bl-pop-thumb img { width: 100%; height: 100%; object-fit: cover; }
.bl-pop-thumb .vcard-duration { right: 5px; bottom: 5px; padding: 1px 5px; font-size: 10.5px; }
.bl-pop-body { min-width: 0; }
.bl-pop-body b {
  color: #1f1c32;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bl-pop-body small { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; color: var(--muted-2); font-size: 12px; }
.bl-views { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }

/* ─── Responsywność ─── */
@media (max-width: 1480px) {
  .bl-page { grid-template-columns: minmax(0, 1fr) 360px; gap: 30px; }
  .bl-popular-head h2 { font-size: 19px; }
}
/* Węższe ekrany: wyszukiwarka + sortowanie w pierwszym rzędzie, wszystkie kategorie widoczne w drugim */
@media (max-width: 1439px) and (min-width: 621px) {
  .bl-toolbar { flex-wrap: wrap; }
  .bl-search { flex: 1 1 auto; max-width: 420px; }
  .bl-sort { margin-left: auto; }
  .bl-chips { order: 3; flex: 1 1 100%; flex-wrap: wrap; overflow: visible; padding: 0; }
}
@media (max-width: 1280px) {
  .bl-cta { grid-template-columns: minmax(0, 1fr) 110px; }
  .bl-cta-phone { width: 104px; }
  .bl-popular-list a { grid-template-columns: 28px 112px minmax(0, 1fr); gap: 10px; }
}
@media (max-width: 1180px) {
  .bl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 940px) {
  .bl-page { grid-template-columns: 1fr; gap: 40px; padding-top: 17px; padding-bottom: 56px; }
  .bl-side { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
  .bl-cta { grid-template-columns: minmax(0, 1fr) 118px; }
  .bl-cta-phone { width: 110px; }
}
@media (max-width: 760px) {
  .bl-side { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .lm-bloglist .shell { width: min(calc(100% - 40px), var(--shell)); }
  .bl-breadcrumbs { margin-bottom: 10px; font-size: 13px; }
  .bl-header h1 { font-size: 38px; }
  .bl-header p { font-size: 15.5px; line-height: 1.6; }

  /* Filtry: wyszukiwarka + sortowanie w jednym rzędzie, kategorie przewijane poziomo */
  .bl-toolbar { flex-wrap: wrap; margin: 22px 0 18px; gap: 10px 8px; }
  .bl-search { flex: 1 1 0; height: 46px; }
  .bl-sort select { height: 46px; padding: 0 34px 0 12px; font-size: 13.5px; }
  .bl-sort svg { right: 11px; }
  .bl-chips {
    order: 3;
    flex: 1 1 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    margin: 0 -20px;
    padding: 2px 20px 4px;
    scrollbar-width: none;
  }
  .bl-chips::-webkit-scrollbar { display: none; }
  .bl-chip { height: 38px; padding: 0 14px; font-size: 13.5px; }

  /* Pierwszy film w pełnej karcie, kolejne jako kompaktowe wiersze */
  .bl-grid { grid-template-columns: 1fr; gap: 12px; }
  .vcard:hover { transform: none; }
  .vcard:not(.is-lead) .vcard-link { flex-direction: row; align-items: center; gap: 12px; padding: 8px; }
  .vcard:not(.is-lead) .vcard-thumb { flex: 0 0 136px; border-radius: 10px; }
  .vcard:not(.is-lead) .vcard-featured { font-size: 10px; padding: 4px 7px; border-radius: 0 0 8px 0; }
  .vcard:not(.is-lead) .vcard-featured svg { width: 10px; height: 10px; }
  .vcard:not(.is-lead) .vcard-duration { right: 5px; bottom: 5px; padding: 1px 5px; font-size: 10.5px; }
  .vcard:not(.is-lead) .vcard-body { padding: 0 4px 0 0; }
  .vcard:not(.is-lead) .vcard-tag { padding: 2px 7px; font-size: 10.5px; }
  .vcard:not(.is-lead) .vcard-title { margin: 6px 0 4px; font-size: 15px; -webkit-line-clamp: 3; }
  .vcard:not(.is-lead) .vcard-excerpt,
  .vcard:not(.is-lead) .vcard-author b,
  .vcard:not(.is-lead) .vcard-avatar,
  .vcard:not(.is-lead) .vcard-cta { display: none; }
  .vcard:not(.is-lead) .vcard-foot { margin-top: 0; }
  .vcard.is-lead { margin-bottom: 6px; }
  .vcard.is-lead .vcard-title { font-size: 20px; }

  .bl-cta { grid-template-columns: minmax(0, 1fr) 96px; gap: 18px 14px; padding: 22px 16px 18px 18px; }
  .bl-cta h2 { font-size: 23px; }
  .bl-cta p { font-size: 13.5px; }
  .bl-cta li { font-size: 13.5px; gap: 8px; }
  .bl-cta li svg { width: 18px; height: 18px; }
  .bl-cta-phone { width: 88px; border-width: 4px; border-radius: 19px; }
  .bl-cta-phone img { border-radius: 15px; }
  /* Na telefonie lista „Najpopularniejsze” powielałaby te same 6 filmów tuż pod siatką — sortowanie „Najpopularniejsze” zastępuje ją */
  .bl-popular { display: none; }
}
