/* ============================================================
   firemnikrabicky.cz — fk-blog-list-1.css — v1
   PRODUCTION CSS pro výpis článků (Shoptet Články)
   Port ze skinspecialist ss-blog-list-2.css (live nasazená verze)

   Pairs with: fk-blog-list-1.js v1

   DETECTION:
   - body.type-posts-listing (FK index /nase-novinky/ + případné
     budoucí flat rubriky /{rubrika}/). FK nemá /blog/ rozcestnik,
     žádná exkluze .in-blog není potřeba.

   ARCHITECTURE — REPLACE PATTERN:
   - Body bg okamžitě (bez class gate).
   - CSS skryje nativní #content-wrapper + .breadcrumbs-wrapper hned.
   - JS přečte nativní .news-item DOM, postaví .fk-blog root,
     vloží jako SOUROZENCE před #content-wrapper, přidá
     body.fk-blog-loaded. Při selhání JS do 5 s přidá
     body.fk-blog-fouc-failed → nativní obsah se znovu ukáže.

   FK paleta (unwrapped, bez var()):
   forest #223924, forest-dk #1A2B1C, leaf #5C765E, sand #E6DFCD,
   sand-lt #F4F0E6, sunshine #E1B124, sunshine-dk #C9971A,
   wood #816645, wood-dk #6B5238, muted #6B7B6D, cream #FBF8F0
   Radius: pill 999, karta 18, velké bloky 26.
   ============================================================ */


/* ============================================================
   1) PAGE BG — okamžitě, bez class gate
   !important přebíjí <style> bloky vložené v tělech článků
   (nativní výpis dumpuje HTML článku vč. <style> do .description)
   ============================================================ */
body.type-posts-listing {
  background: #F4F0E6 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: hidden; /* .fk-blog root je 100vw — scrollbar nesmí vyrobit h-scroll */
}


/* ============================================================
   2) HIDE NATIVE — hned (zero FOUC)
   JS přidá .fk-blog-fouc-failed pokud render selže → fallback
   ============================================================ */
body.type-posts-listing:not(.fk-blog-fouc-failed) #content-wrapper,
body.type-posts-listing:not(.fk-blog-fouc-failed) .breadcrumbs-wrapper {
  display: none !important;
}
body.type-posts-listing.fk-blog-fouc-failed #content-wrapper,
body.type-posts-listing.fk-blog-fouc-failed .breadcrumbs-wrapper {
  display: block !important;
}


/* ============================================================
   3) ROOT — full-bleed canvas
   ============================================================ */
.fk-blog {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  background: #F4F0E6;
  font-family: 'Aspekta', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #1A2B1C;
  padding: clamp(40px, 5vw, 72px) clamp(16px, 2.2vw, 32px) clamp(72px, 7vw, 112px);
  box-sizing: border-box;
  animation: fk-blog-in .5s cubic-bezier(.4, 0, .2, 1) both;
}
.fk-blog *,
.fk-blog *::before,
.fk-blog *::after { box-sizing: border-box; }

@keyframes fk-blog-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

.fk-blog-inner {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
}


/* ============================================================
   4) HERO — kompaktní 2 sloupce (titulek vlevo, lead vpravo)
   ============================================================ */
.fk-blog-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 4vw, 64px);
  align-items: end;
  margin: 0 0 clamp(40px, 4.5vw, 64px);
  padding-bottom: clamp(28px, 3vw, 44px);
  border-bottom: 1px solid rgba(34, 57, 36, .12);
}

.fk-blog-eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: #5C765E;
  margin: 0 0 12px;
}

.fk-blog-title {
  font-size: clamp(38px, 5vw, 64px);
  font-weight: 750;
  line-height: 1.08;
  letter-spacing: -.02em;
  color: #223924;
  margin: 0;
}

.fk-blog-meta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #6B7B6D;
}
.fk-blog-meta-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #C9971A;
  display: inline-block;
}

.fk-blog-lead {
  font-size: clamp(15px, 1.15vw, 17px);
  line-height: 1.62;
  color: #6B7B6D;
  margin: 0;
  max-width: 480px;
}


/* ============================================================
   5) GRID — 3 sloupce článků
   ============================================================ */
.fk-blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 2vw, 28px);
  margin-bottom: clamp(40px, 4.5vw, 64px);
}


/* ============================================================
   6) KARTA — jako blog dlaždice na FK homepage:
   krémová karta radius 18, náhledovka 16:9 nahoře, rubrika chip,
   nadpis forest, „Číst článek" se šipkou
   ============================================================ */
.fk-blog-card {
  display: flex;
  flex-direction: column;
  background: #FBF8F0;
  border: 1px solid rgba(34, 57, 36, .10);
  border-radius: 18px;
  overflow: hidden;
  color: inherit;
  text-decoration: none !important;
  box-shadow: 0 6px 18px rgba(34, 57, 36, .05);
  transition:
    transform .35s cubic-bezier(.4, 0, .2, 1),
    box-shadow .35s cubic-bezier(.4, 0, .2, 1),
    border-color .35s cubic-bezier(.4, 0, .2, 1);
}
.fk-blog-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(34, 57, 36, .12);
  border-color: rgba(34, 57, 36, .16);
  text-decoration: none;
}
.fk-blog-card,
.fk-blog-card * { text-decoration: none !important; }

.fk-blog-card-media {
  display: block;
  aspect-ratio: 16 / 9;
  background: #E6DFCD;
  overflow: hidden;
}
.fk-blog-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s cubic-bezier(.4, 0, .2, 1);
}
.fk-blog-card:hover .fk-blog-card-media img { transform: scale(1.03); }

.fk-blog-card-body {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 18px 20px 20px;
  flex: 1;
}

.fk-blog-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.fk-blog-card-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  background: #E6DFCD;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #223924;
  white-space: nowrap;
}
.fk-blog-card-date {
  font-size: 12px;
  font-weight: 600;
  color: #6B7B6D;
  white-space: nowrap;
}

.fk-blog-card-title {
  font-size: 17.5px;
  font-weight: 750;
  color: #1A2B1C;
  line-height: 1.3;
  letter-spacing: -.01em;
  margin: 0;
}

.fk-blog-card-perex {
  font-size: 14px;
  line-height: 1.55;
  color: #6B7B6D;
  margin: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

.fk-blog-card-more {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  font-size: 14px;
  color: #223924;
  margin-top: auto;
  padding-top: 4px;
  transition: gap .3s cubic-bezier(.4, 0, .2, 1);
}
.fk-blog-card:hover .fk-blog-card-more { gap: 12px; }
.fk-blog-card-more svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}


/* ============================================================
   7) EMPTY STATE — 0 článků
   ============================================================ */
.fk-blog-empty {
  grid-column: 1 / -1;
  padding: 72px 24px;
  text-align: center;
  color: #6B7B6D;
}
.fk-blog-empty strong {
  display: block;
  font-size: 22px;
  font-weight: 750;
  color: #223924;
  margin-bottom: 10px;
}


/* ============================================================
   8) PAGINATION — pill položky, centrované
   ============================================================ */
.fk-blog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: clamp(20px, 2vw, 32px);
  border-top: 1px solid rgba(34, 57, 36, .12);
}
.fk-blog-pagination > * {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  color: #6B7B6D;
  text-decoration: none;
  padding: 9px 15px;
  min-width: 40px;
  text-align: center;
  border-radius: 999px;
  transition: background .2s cubic-bezier(.4, 0, .2, 1), color .2s cubic-bezier(.4, 0, .2, 1);
}
.fk-blog-pagination > a:hover {
  background: rgba(34, 57, 36, .06);
  color: #223924;
}
.fk-blog-pagination > .current {
  color: #F4F0E6;
  background: #223924;
}


/* ============================================================
   9) RESPONSIVE — tablet
   ============================================================ */
@media (max-width: 1024px) {
  .fk-blog-grid { grid-template-columns: repeat(2, 1fr); }
}


/* ============================================================
   10) RESPONSIVE — mobil
   ============================================================ */
@media (max-width: 640px) {
  .fk-blog-hero {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 14px;
  }
  .fk-blog-grid { grid-template-columns: 1fr; gap: 14px; }
}
