/* Herbawell — Journal (blog): lista wpisów (home.php) + wpis (single.php).
   1:1 z makiety Premium (widoki isJournal / isPost). Styleguide 1.0:
   Jost, zieleń butelkowa + kość + mosiądz, zero zaokrągleń i cieni, podział linią 1px.
   Wszystkie gridy: repeat(N, minmax(0,1fr)) — inaczej treść rozpycha siatkę ponad 390px. */

.hw-journal,
.hw-post {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding: 26px 56px 96px;
  font-family: var(--hw-font);
  color: var(--hw-text);
}

/* ---------- Okruszek ---------- */
.hw-crumb {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--hw-text-muted);
}
.hw-crumb a { color: var(--hw-text-muted); text-decoration: none; }
.hw-crumb a:hover { color: var(--hw-green); }
.hw-crumb__sep { margin: 0 6px; }
.hw-crumb__current { color: var(--hw-green); }

/* ========================================================================
   LISTA (home.php)
   ===================================================================== */
.hw-journal__head {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 56px;
  align-items: end;
  padding: 40px 0;
  border-bottom: 1px solid var(--hw-line);
}
.hw-journal__h1 {
  margin: 0;
  font-family: var(--hw-font);
  font-size: 64px;
  font-weight: 500;
  letter-spacing: -.02em;
  color: var(--hw-green);
  line-height: .98;
}
.hw-journal__lead {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.8;
  color: var(--hw-text-soft);
}
.hw-journal__empty {
  padding: 60px 0;
  font-size: 16px;
  color: var(--hw-text-soft);
}

/* Wyróżniony wpis (najnowszy) */
.hw-journal__feat {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 48px;
  padding: 44px 0;
  border-bottom: 1px solid var(--hw-line);
  text-decoration: none;
  color: inherit;
}
.hw-journal__feat-media {
  height: 400px;
  padding-bottom: 14px;
  position: relative;
  overflow: hidden;
}
.hw-journal__feat-img,
.hw-journal__card-img,
.hw-post__hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hw-journal__feat-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}
.hw-journal__feat-flag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--hw-brass-dark);
}
.hw-journal__feat-title {
  margin: 0;
  font-family: var(--hw-font);
  font-size: 44px;
  font-weight: 500;
  letter-spacing: -.02em;
  color: var(--hw-green);
  line-height: 1.05;
}
.hw-journal__feat-lead {
  margin: 0;
  font-size: 16px;
  line-height: 1.8;
  color: var(--hw-text-soft);
}
.hw-journal__meta {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--hw-text-muted);
}
.hw-journal__feat-cta {
  align-self: flex-start;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--hw-brass);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--hw-green);
}

/* Siatka pozostałych wpisów */
.hw-journal__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--hw-line);
  margin-top: 44px;
  border: 1px solid var(--hw-line);
}
.hw-journal__card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 26px;
  background: var(--hw-bone);
  text-decoration: none;
  color: inherit;
  transition: background .25s ease;
}
.hw-journal__card:hover { background: var(--hw-bone-dark); }
.hw-journal__card-media {
  height: 190px;
  position: relative;
  overflow: hidden;
}
.hw-journal__card-tag {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--hw-brass-dark);
}
.hw-journal__card-title {
  margin: 0;
  font-family: var(--hw-font);
  font-size: 23px;
  font-weight: 500;
  color: var(--hw-green);
  line-height: 1.15;
}
.hw-journal__card-lead {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--hw-text-soft);
}
.hw-journal__card-meta {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--hw-line);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--hw-text-muted);
}

/* Paginacja */
.hw-journal__pager { margin-top: 44px; }
.hw-journal__pager .nav-links {
  display: flex;
  gap: 1px;
  background: var(--hw-line);
  border: 1px solid var(--hw-line);
  width: max-content;
}
.hw-journal__pager .page-numbers {
  min-width: 46px;
  padding: 12px 14px;
  background: var(--hw-bone);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--hw-green);
  text-decoration: none;
  text-align: center;
}
.hw-journal__pager .page-numbers.current { background: var(--hw-green); color: var(--hw-bone); }
.hw-journal__pager .page-numbers:hover:not(.current) { background: var(--hw-bone-dark); }

/* ========================================================================
   WPIS (single.php)
   ===================================================================== */
.hw-crumb--post { padding-bottom: 0; }
.hw-post__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 44px 0 40px;
  text-align: center;
}
.hw-post__eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--hw-brass-dark);
}
.hw-post__h1 {
  margin: 0;
  max-width: 900px;
  font-family: var(--hw-font);
  font-size: 58px;
  font-weight: 500;
  letter-spacing: -.02em;
  color: var(--hw-green);
  line-height: 1.02;
}
.hw-post__lead {
  margin: 0;
  max-width: 640px;
  font-size: 17px;
  line-height: 1.8;
  color: var(--hw-text-soft);
}
.hw-post__hero {
  height: 440px;
  position: relative;
  overflow: hidden;
  padding-bottom: 16px;
}

/* Treść + sidebar */
.hw-post__body-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 64px;
  padding-top: 56px;
  align-items: start;
}
.hw-post__article {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 720px;
}
.hw-post__article p {
  margin: 0;
  font-size: 17.5px;
  line-height: 1.9;
  color: var(--hw-text);
  text-wrap: pretty;
}
.hw-post__article .hw-post__quote,
.hw-post__article blockquote {
  margin: 8px 0;
  padding: 28px 32px;
  background: var(--hw-bone-dark);
  border: 0;
}
.hw-post__article blockquote p {
  font-family: var(--hw-font);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--hw-green);
}
.hw-post__article h2 {
  margin: 12px 0 0;
  font-family: var(--hw-font);
  font-size: 28px;
  font-weight: 500;
  color: var(--hw-green);
}
.hw-post__article a { color: var(--hw-brass-dark); }

.hw-post__aside {
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 92px;
}
.hw-post__facts { display: flex; flex-direction: column; }
.hw-post__facts-label {
  padding-bottom: 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--hw-brass-dark);
}
.hw-post__fact {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 0;
  border-top: 1px solid var(--hw-line);
}
.hw-post__fact-k {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--hw-text-muted);
}
.hw-post__fact-v {
  font-family: var(--hw-font);
  font-size: 22px;
  font-weight: 500;
  color: var(--hw-green);
}
.hw-post__cta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
  padding: 24px;
  background: var(--hw-green);
}
.hw-post__cta-title {
  font-family: var(--hw-font);
  font-size: 22px;
  font-weight: 500;
  color: var(--hw-bone);
  line-height: 1.2;
}
.hw-post__cta-text {
  font-size: 13px;
  line-height: 1.7;
  color: #A9B8AC;
}
.hw-post__cta-btn {
  padding: 15px;
  border: 1px solid var(--hw-brass);
  background: transparent;
  color: #E8D9C1;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
}
.hw-post__cta-btn:hover { background: var(--hw-brass); color: var(--hw-green); }

/* Czytaj dalej */
.hw-post__related { padding-top: 76px; }
.hw-post__related-title {
  margin: 0;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--hw-line);
  font-family: var(--hw-font);
  font-size: 36px;
  font-weight: 500;
  letter-spacing: -.015em;
  color: var(--hw-green);
}
.hw-post__related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--hw-line);
  margin-top: 32px;
  border: 1px solid var(--hw-line);
}
.hw-post__related-grid .hw-journal__card-media { height: 160px; }

/* ========================================================================
   MOBILE 390 — 1:1 z mobilnym wariantem makiety (bez poziomego scrolla)
   ===================================================================== */
@media (max-width: 768px) {
  .hw-journal,
  .hw-post { padding: 24px 22px 64px; }

  /* Lista */
  .hw-journal__head { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 24px 0; }
  .hw-journal__h1 { font-size: 42px; line-height: 1; }
  .hw-journal__lead { font-size: 14.5px; }

  .hw-journal__feat { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 22px 0 26px; }
  .hw-journal__feat-media { height: 230px; padding-bottom: 10px; }
  .hw-journal__feat-title { font-size: 28px; letter-spacing: -.015em; line-height: 1.1; }
  .hw-journal__feat-lead { font-size: 14px; line-height: 1.75; }
  .hw-journal__feat-cta { display: none; }

  /* Siatka → lista miniatur 104px + tekst (wariant mobilny makiety) */
  .hw-journal__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    margin-top: 0;
    border: 0;
    background: transparent;
  }
  .hw-journal__card {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 16px;
    padding: 20px 0;
    border-bottom: 1px solid var(--hw-line);
    background: transparent;
  }
  .hw-journal__card:hover { background: transparent; }
  .hw-journal__card-media { height: 104px; }
  .hw-journal__card-tag { grid-column: 2; }
  .hw-journal__card-title { grid-column: 2; font-size: 18px; line-height: 1.2; }
  .hw-journal__card-lead { display: none; }
  .hw-journal__card-meta { grid-column: 2; margin-top: 0; padding-top: 0; border-top: 0; }

  /* Wpis */
  .hw-post__head { padding: 20px 0 24px; gap: 14px; align-items: flex-start; text-align: left; }
  .hw-post__h1 { font-size: 34px; line-height: 1.06; }
  .hw-post__lead { font-size: 15px; }
  .hw-post__hero { height: 240px; padding-bottom: 12px; }

  .hw-post__body-wrap { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 0; }
  /* Sidebar (fakty) idzie NAD treść na mobile — kolejność makiety */
  .hw-post__aside { position: static; order: -1; }
  .hw-post__facts { margin-top: 24px; border-top: 1px solid var(--hw-line); }
  .hw-post__fact {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    border-top: 0;
    border-bottom: 1px solid var(--hw-line);
  }
  .hw-post__fact-v { font-size: 17px; }
  .hw-post__article { padding-top: 26px; gap: 20px; }
  .hw-post__article p { font-size: 15.5px; }
  .hw-post__article blockquote { padding: 22px; }
  .hw-post__article blockquote p { font-size: 19px; line-height: 1.5; }
  .hw-post__cta { margin-top: 28px; }

  .hw-post__related { padding-top: 32px; }
  .hw-post__related-title { font-size: 26px; padding-bottom: 14px; }
  .hw-post__related-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    margin-top: 0;
    border: 0;
    background: transparent;
  }
  .hw-post__related-grid .hw-journal__card {
    grid-template-columns: 88px minmax(0, 1fr);
    padding: 18px 0;
  }
  .hw-post__related-grid .hw-journal__card-media { height: 88px; }
}
