/* ==========================================================================
   pages/poradnik.css — hub wiedzy (templates/template-poradnik.php).

   Karty poradnika (.guide-*) są celowo lżejsze od .article-card z komponentów:
   bez zajawki i bez „Czytaj dalej", za to z etykietą tagu i czasem czytania.
   Na tej stronie liczy się gęstość i skanowalność, nie długość opisu.
   ========================================================================== */

.guide-page{background:var(--mist-soft)}

/* Wspólny nagłówek sekcji na tej stronie — mniejszy niż globalny h2, bo
   sekcji jest dużo i muszą układać się w rytm, a nie krzyczeć każda z osobna. */
.guide-h{
  display:flex;align-items:center;gap:10px;
  font-size:clamp(18px,2.1vw,22px);margin:0 0 18px;
}
.guide-section__icon{flex:0 0 auto;display:inline-flex;width:24px;height:24px}
.guide-section__icon svg{width:100%;height:100%}
.guide-meta{font-size:12.5px;color:var(--slate);margin-top:auto}
.guide-meta__dot{color:var(--line)}


/* ==========================================================================
   1. Hero z wyszukiwarką
   ========================================================================== */
.guide-hero{
  padding-bottom:clamp(28px,4vw,44px);
  background:
    radial-gradient(90% 70% at 50% 0%, rgba(106,31,201,.13) 0%, rgba(106,31,201,0) 65%),
    radial-gradient(70% 50% at 85% 10%, rgba(23,194,161,.10) 0%, rgba(23,194,161,0) 60%);
}
.guide-hero__inner{max-width:660px;margin-inline:auto;text-align:center;padding-top:clamp(16px,2.5vw,28px)}
.guide-hero__inner h1{
  font-size:clamp(30px,4.2vw,46px);line-height:1.1;letter-spacing:-.03em;margin:0;
}
.guide-hero__lead{
  margin:16px 0 0;color:var(--slate);
  font-size:clamp(15px,1.6vw,17px);line-height:1.6;
}
.guide-hero__lead p{margin:0}

.guide-search{
  display:flex;align-items:center;gap:8px;margin-top:clamp(22px,3vw,30px);
  background:var(--surface);border:1px solid var(--line-soft);
  border-radius:var(--radius-pill);padding:8px 8px 8px 18px;
  box-shadow:var(--shadow-lift);
}
.guide-search__icon{flex:0 0 auto;display:inline-flex;width:20px;height:20px;color:var(--slate)}
.guide-search__icon svg{width:100%;height:100%}
.guide-search input[type="search"]{
  flex:1 1 auto;min-width:0;border:0;background:none;outline:none;
  font-family:var(--body);font-size:15px;color:var(--ink);padding:10px 0;
}
.guide-search input[type="search"]::placeholder{color:var(--slate);opacity:.8}
.guide-search input[type="search"]:focus-visible{outline:none}
.guide-search:focus-within{border-color:#CFC4F2;box-shadow:var(--shadow-lift),0 0 0 3px rgba(61,99,224,.16)}
.guide-search .btn{flex:0 0 auto}
@media (max-width:520px){
  .guide-search{flex-wrap:wrap;border-radius:var(--radius);padding:12px}
  .guide-search__icon{display:none}
  .guide-search input[type="search"]{flex:1 1 100%;padding:6px 4px}
  .guide-search .btn{width:100%;justify-content:center}
}


/* ==========================================================================
   2. Przeglądanie według tagów
   ========================================================================== */
/* Pastylki tagów — bez ikon, zawijają się w wiersze. Licznik siedzi w środku
   pastylki jako drobny badge, żeby nie robić z niego osobnej linijki. */
.tag-pills{
  list-style:none;display:flex;flex-wrap:wrap;gap:10px;
}
.tag-pill{
  display:inline-flex;align-items:center;gap:9px;
  background:var(--surface);border:1px solid var(--line);
  border-radius:var(--radius-pill);padding:9px 9px 9px 18px;
  font-family:var(--display);font-weight:600;font-size:14px;color:var(--ink);
  transition:border-color .15s ease,background .15s ease,color .15s ease,transform .15s ease;
}
.tag-pill__count{
  flex:0 0 auto;min-width:24px;height:24px;padding:0 7px;border-radius:var(--radius-pill);
  display:inline-flex;align-items:center;justify-content:center;
  background:var(--violet-soft);color:var(--violet);
  font-size:12px;font-weight:700;line-height:1;
}
.tag-pill:hover{
  background:var(--violet-soft);border-color:#CFC4F2;color:var(--violet);transform:translateY(-1px);
}
.tag-pill:hover .tag-pill__count{background:var(--violet);color:#fff}


/* ==========================================================================
   3. Karty poradnika
   ========================================================================== */
.guide-card{
  display:flex;flex-direction:column;height:100%;
  background:var(--surface);border:1px solid var(--line-soft);
  border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow);
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}
.guide-card:hover{transform:translateY(-3px);box-shadow:var(--shadow-hover);border-color:var(--line)}

.guide-card__media{position:relative;flex:0 0 auto}
.guide-card__thumb{
  display:block;aspect-ratio:16/10;
  background:var(--grad);background-size:cover;background-position:center;
}
.guide-card__body{display:flex;flex-direction:column;flex:1;padding:16px 18px 18px}
.guide-card h3{font-size:15px;line-height:1.35;margin:0 0 8px}
.guide-card h3 a{color:var(--ink);transition:color .15s ease}
.guide-card h3 a:hover{color:var(--violet)}
/* Lead na karcie zwykłej — przycięty do trzech wierszy, żeby karty w siatce
   miały równą wysokość niezależnie od długości zajawki. */
.guide-card .guide-card__excerpt{
  font-size:13.5px;line-height:1.55;color:var(--slate);margin:0 0 14px;
  display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;
}

/* Karta otwierająca — większe zdjęcie, autor, zajawka i CTA. */
.guide-card--lg .guide-card__thumb{aspect-ratio:16/9}
.guide-card--lg .guide-card__body{padding:clamp(20px,2.6vw,26px)}
.guide-card--lg h3{font-size:clamp(19px,2.3vw,24px);line-height:1.25;margin:0 0 12px}
.guide-card__meta{
  display:flex;align-items:center;flex-wrap:wrap;gap:8px;
  font-size:12.5px;color:var(--slate);margin:0 0 12px;
}
/* Awatar autora. Celujemy w <img> w kontekście byline'u, a nie w klasę —
   inc/local-avatar.php podmienia dane awatara i nie przenosi klasy
   przekazanej do get_avatar(). */
.guide-card__meta img{
  width:26px;height:26px;border-radius:50%;object-fit:cover;display:block;flex:0 0 auto;
}
.guide-card__excerpt{font-size:14px;line-height:1.6;color:var(--slate);margin:0 0 18px}

/* Wariant szeroki — zdjęcie po lewej, treść po prawej. Ten sam markup co
   karta otwierająca; różni się wyłącznie kierunkiem układu. */
.guide-card--wide{flex-direction:row;align-items:stretch}
.guide-card--wide .guide-card__media{flex:0 0 42%;max-width:42%;min-width:0}
.guide-card--wide .guide-card__thumb{height:100%;aspect-ratio:auto;min-height:280px}
.guide-card--wide .guide-card__body{justify-content:center;padding:clamp(24px,3vw,36px)}
.guide-card--wide h3{font-size:clamp(20px,2.4vw,26px)}
.guide-card--wide .guide-card__excerpt{max-width:56ch}
.guide-card--wide .btn{align-self:flex-start}

@media (max-width:820px){
  /* Za wąsko na dwie kolumny — zdjęcie wraca nad treść. */
  .guide-card--wide{flex-direction:column}
  .guide-card--wide .guide-card__media{flex:0 0 auto;max-width:none}
  .guide-card--wide .guide-card__thumb{aspect-ratio:16/9;min-height:0}
}


/* ==========================================================================
   4. Siatki i układy sekcji
   ========================================================================== */
.guide-grid{display:grid;gap:var(--gap)}
.guide-grid--4{grid-template-columns:repeat(4,1fr)}
.guide-grid--3{grid-template-columns:repeat(3,1fr)}
@media (max-width:1000px){.guide-grid--4{grid-template-columns:repeat(2,1fr)}}
@media (max-width:860px){.guide-grid--3{grid-template-columns:repeat(2,1fr)}}
@media (max-width:560px){
  .guide-grid--3,
  .guide-grid--4{grid-template-columns:1fr}
}

/* „Na początek" — szeroka karta na całą szerokość, pod nią trzy kafelki
   w tym samym układzie co sekcje tagów. */
.guide-featured{display:grid;gap:var(--gap)}

/* Sekcja tagu z ≥4 wpisami: karta otwierająca + siatka reszty. */
.guide-split{
  display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1.6fr);
  gap:var(--gap);align-items:stretch;
}
.guide-split__rest{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--gap);min-width:0}
@media (max-width:1000px){
  .guide-split{grid-template-columns:1fr}
  .guide-split__rest{grid-template-columns:repeat(3,1fr)}
}
@media (max-width:700px){.guide-split__rest{grid-template-columns:1fr}}

/* Sekcja z jednym wpisem — wiersz listy zamiast osamotnionej karty. */
.guide-rows{display:grid;gap:12px}
.guide-row{
  display:flex;align-items:center;gap:16px;
  background:var(--surface);border:1px solid var(--line-soft);
  border-radius:var(--radius-sm);padding:12px;
  transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease;
}
.guide-row:hover{transform:translateY(-2px);box-shadow:var(--shadow-hover);border-color:var(--line)}
.guide-row__thumb{
  flex:0 0 auto;display:block;width:96px;height:72px;border-radius:var(--radius-xs);
  background:var(--grad);background-size:cover;background-position:center;
}
.guide-row__body{display:flex;flex-direction:column;gap:5px;min-width:0}
.guide-row__label{font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--violet)}
.guide-row h3{font-size:14.5px;line-height:1.35;margin:0}
.guide-row h3 a{color:var(--ink);transition:color .15s ease}
.guide-row h3 a:hover{color:var(--violet)}
.guide-row__lead{
  font-size:13px;line-height:1.55;color:var(--slate);margin:0;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}
.guide-row .guide-meta{margin-top:0}
@media (max-width:460px){
  .guide-row__thumb{width:72px;height:60px}
  .guide-row__lead{-webkit-line-clamp:3}
}

/* Sekcja tagu w ramce — oddziela kolejne tematy od siebie. */
.guide-section{
  background:var(--surface);border:1px solid var(--line-soft);
  border-radius:var(--radius-lg);padding:clamp(20px,3vw,30px);
  box-shadow:var(--shadow-xs);
}
.guide-section .guide-card,
.guide-section .guide-row{box-shadow:none}
.guide-section .guide-card{border-color:var(--line-soft)}
.guide-section__head{margin-bottom:clamp(18px,2.4vw,24px)}
.guide-section__desc{color:var(--slate);font-size:13.5px;line-height:1.55;margin:6px 0 0}


/* ==========================================================================
   5. „Nie wiesz, gdzie zacząć?"
   ========================================================================== */
.guide-start{
  display:flex;align-items:flex-start;gap:clamp(18px,3vw,28px);
  border:2px solid transparent;border-radius:var(--radius-lg);
  background:
    linear-gradient(var(--ink-deep),var(--ink-deep)) padding-box,
    var(--grad) border-box;
  padding:clamp(24px,3.4vw,34px);
  box-shadow:0 18px 48px rgba(17,20,54,.18);
}
.guide-start__icon{
  flex:0 0 auto;width:56px;height:56px;border-radius:var(--radius-sm);
  background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.16);
  display:flex;align-items:center;justify-content:center;
}
.guide-start__icon svg{width:28px;height:28px}
.guide-start__body{flex:1 1 auto;min-width:0}
.guide-start h2{color:#fff;font-size:clamp(19px,2.2vw,24px);margin:0 0 8px}
.guide-start p{color:var(--slate-inv);font-size:14.5px;line-height:1.6;margin:0 0 18px;max-width:56ch}
.guide-start__tags{list-style:none;display:flex;flex-wrap:wrap;gap:10px}
.guide-start__tag{
  display:inline-flex;align-items:center;gap:9px;
  background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.16);
  border-radius:var(--radius-pill);padding:9px 16px;color:#fff;
  font-family:var(--display);font-weight:600;font-size:13.5px;
  transition:background .15s ease,border-color .15s ease,transform .15s ease;
}
.guide-start__tag span{display:inline-flex;width:17px;height:17px;flex:0 0 auto}
.guide-start__tag svg{width:100%;height:100%}
.guide-start__tag:hover{background:rgba(255,255,255,.15);border-color:rgba(255,255,255,.32);color:#fff;transform:translateY(-1px)}

@media (max-width:640px){
  .guide-start{flex-direction:column}
  .guide-start__icon{width:48px;height:48px}
}
