/* =========================================================
   BLOG – LAYOUT
========================================================= */

.site-main--blog {
  padding-block: 3.75rem; /* 60px */
}

.blog-container {
  max-width: 75rem; /* 1200px */
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.blog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20rem; /* content + sidebar */
  gap: 3.75rem;
}


/* =========================================================
   BLOG POST (ARCHIVE CARD)
========================================================= */

.blog-post {
  margin-bottom: 3.75rem;
}

.blog-post__thumb {
  margin-bottom: 1.25rem;
}

.blog-post__thumb img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 1rem;
}

.blog-post__meta {
  font-size: 0.75rem;
  opacity: 0.6;
  margin-bottom: 0.5rem;
}

.blog-post__title {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  line-height: 1.3;
  margin-bottom: 1rem;
  font-weight: 600;
}

.blog-post__title a {
  color: #000;
  text-decoration: none;
  transition: color .2s ease;
}

.blog-post__title a:hover {
  color: var(--e-global-color-primary);
}

.blog-post__excerpt {
  font-size: 0.9375rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}


/* =========================================================
   READ MORE
========================================================= */

.blog-post__readmore .btn-readmore {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  color: #ffffff;
  font-weight: 500;
  position: relative;
  background-color: var(--e-global-color-primary);
  padding: 0.4em 1em;
  border-radius: 16px;
  transition: 0.2s;
}

.blog-post__readmore .btn-readmore::after {
  content: "→";
  margin-left: 0.375rem;
  transition: transform .2s ease;
}

.blog-post__readmore .btn-readmore:hover::after {
  transform: translateX(0.25rem);
}

.blog-post__readmore .btn-readmore:hover{
    background-color: var(--e-global-color-accent);
}


/* =========================================================
   SIDEBAR – GENERAL
========================================================= */

.blog-sidebar .widget {
  margin-bottom: 3rem;
}

.blog-sidebar .widget-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--e-global-color-primary);
}

.blog-sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}


/* =========================================================
   SIDEBAR – CATEGORIES
========================================================= */

.blog-sidebar .cat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.blog-sidebar .cat-item a {
  color: #000;
  text-decoration: none;
  transition: color .2s ease;
}

.blog-sidebar .cat-item a:hover {
  color: var(--e-global-color-primary);
}

.blog-sidebar .children {
  margin-top: 0.5rem;
  padding-left: 1rem;
}

.blog-sidebar .cat-count {
  opacity: 0.6;
}


/* =========================================================
   SIDEBAR – RECENT POSTS
========================================================= */

.recent-posts {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.recent-post {
  display: flex;
  gap: 1rem;
}

.recent-post__thumb {
  flex-shrink: 0;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 0.75rem;
  overflow: hidden;
}

.recent-post__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recent-post__content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.recent-post__title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  color: #000;
  text-decoration: none;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;

  transition: color .2s ease;
}

.recent-post__title:hover {
  color: var(--e-global-color-primary);
}

.recent-post__date {
  font-size: 0.75rem;
  opacity: 0.6;
}


/* =========================================================
   PAGINATION
========================================================= */

.blog-pagination {
  margin-top: 3rem;
}

.blog-pagination .page-numbers {
  display: inline-block;
  margin-right: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.blog-pagination .current {
  font-weight: 600;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 64rem) {
  .blog-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .blog-sidebar {
    margin-top: 4rem;
  }
}
/* ===============================
   BLOG CATEGORIES – FIX LAYOUT
================================ */

.blog-categories > .cat-item {
  display: block;
  margin-bottom: 1rem;
}

/* link + count w jednej linii */
.blog-categories > .cat-item > a {
  font-weight: 600;
  font-size: 0.95rem;
  color: #000;
  text-decoration: none;
}

.blog-categories > .cat-item > a:hover {
  color: var(--e-global-color-primary);
}


.blog-categories .cat-item > .count,
.blog-categories .cat-item > .cat-count {
  margin-left: 0.25rem;
  font-weight: 400;
  opacity: 0.6;
}


.blog-categories .children {
  margin-top: 0.5rem;
  padding-left: 1.25rem;
}

.blog-categories .children .cat-item {
  font-size: 0.875rem;
  font-weight: 400;
  opacity: 0.85;
}

/* =========================================================
   STICKY SIDEBAR
========================================================= */

.blog-sidebar {
  position: sticky;
  top: 6rem; 
  align-self: start;
}

/* ===============================
   RECENT POSTS – ELLIPSIS
================================ */

.recent-post__title {
  display: -webkit-box;
  -webkit-line-clamp: 2;   
  -webkit-box-orient: vertical;
  overflow: hidden;

  font-weight: 600;
  color: #000;
  line-height: 1.35;
}

.recent-post__title:hover {
  color: var(--e-global-color-primary);
}

.blog-post__title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ZABEZPIECZENIE NA MEGA DŁUGIE SŁOWA */

.blog-post__title,
.recent-post__title {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.blog-post__title {
  display: -webkit-box;
  -webkit-line-clamp: 2; /* albo 3 */
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.recent-post__title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* STICKY SIDEBAR – DESKTOP ONLY */
@media (min-width: 64rem) { /* 1024px+ */
  .blog-sidebar {
    position: sticky;
    top: 5rem; 
    align-self: start;
  }
}
.blog-sidebar {
  padding-block: 3em;
}


@media (max-width: 64rem) {
  .blog-sidebar {
    padding-block: 0em;
  }
}
.blog-categories > li {
  margin-bottom: 0.75em;
}
.blog-categories li ul {
  margin-top: 0.5em;
  margin-left: 1.25em;
}

.blog-categories li ul li {
  margin-bottom: 0.4em;
}

.blog-categories li ul a {
  font-size: 0.9em;
  font-weight: 400;
  opacity: 0.85;
}
.blog-categories > li:not(:last-child) {
  padding-bottom: 0.75em;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
