/* ============================================================
   KHM Law Firm — blog.css (loaded after styles.css)
   1:1 with the PL blog (kancelariakhm.pl/blog/ and single posts)
   ============================================================ */

.blog-page {
  color: #484C58;
  font-weight: 500;
  line-height: normal;
}
.blog-page p { margin: 0; }
.blog-container {
  max-width: 1470px;
  margin: 0 auto;
  padding: 0 25px;
}

/* -- List: hero + breadcrumbs -- */
.c-hero { margin: 40px 0 5px; padding-top: 48px; }
.c-hero h1 {
  font-size: 64px;
  font-weight: 600;
  letter-spacing: 1.92px;
  line-height: normal;
  color: #1C203F;
  margin: 0;
}
.c-hero__breadcrumbs { margin-top: 16px; }
.breadcrumbs {
  display: flex;
  align-items: center;
  column-gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  white-space: nowrap;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 400;
}
.breadcrumbs li { display: flex; align-items: center; }
.breadcrumbs__home a { display: flex; align-items: center; gap: 6px; }
.breadcrumbs__home a:hover { opacity: .7; }
.breadcrumbs svg { display: block; }
.breadcrumbs__separator { display: flex; align-items: center; margin: 0 6px; }
.breadcrumbs__current { font-weight: 500; }

/* -- List: cards -- */
.news-list__main {
  display: flex;
  flex-wrap: wrap;
  gap: 64px 40px;
  margin: 64px 0;
}
.news-item {
  position: relative;
  display: block;
  width: calc(33.33% - 40px);
  padding-bottom: 24px;
}
.news-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 8px;
  width: calc(100% - 16px);
  border-bottom: 2px solid #D8D8D8;
}
.news-item__image {
  height: 204px;
  margin-bottom: 16px;
  border-radius: 16px;
  overflow: hidden;
}
.news-item__image img { width: 100%; height: 100%; object-fit: contain; transition: .2s; }
.news-item__data {
  display: flex;
  align-items: center;
  column-gap: 7px;
  margin: 0 8px 12px;
  font-size: 14px;
  font-weight: 500;
}
.news-item__data__separator,
.post__data__separator {
  display: flex;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #484C58;
}
.blog-page .news-item__title { font-size: 20px; font-weight: 700; line-height: 1.4; margin: 0 8px 12px; transition: .2s; }
.blog-page .news-item__text { font-size: 18px; font-weight: 500; margin: 0 8px 40px; }
.news-item__button {
  display: flex;
  align-items: center;
  margin: 0 8px;
  padding: 12px 16px 12px 0;
  font-size: 16px;
  font-weight: 600;
}
.news-item__button svg { margin-left: 8px; transition: transform .2s ease-in-out; }
.news-item:hover .news-item__title { opacity: .7; }
.news-item:hover .news-item__button svg { transform: translateX(4px); }

/* First (newest) post: wide, image left */
.news-item:first-child { width: 100%; }
@media (min-width: 991px) {
  .news-item:first-child { display: flex; align-items: center; column-gap: 24px; padding-bottom: 0; }
  .news-item:first-child::after { display: none; }
  .news-item:first-child .news-item__image { width: 40%; height: auto; margin-bottom: 0; }
  .news-item:first-child .news-item__contentWrap { flex: 1 1 0%; padding-bottom: 24px; border-bottom: 2px solid #D8D8D8; }
}
.blog-empty { font-size: 18px; }

/* -- Single post -- */
.post { margin: 40px 0; padding-top: 30px; }
.post__contentWrap { display: flex; column-gap: 30px; margin-bottom: 100px; }
.post__descWrap {
  flex: 1;
  min-width: 0;
  padding: 30px;
  border-radius: 32px;
  background-color: #F1E9E3;
}
.post__sidebar {
  min-width: 300px;
  width: 300px;
  display: flex;
  padding: 30px;
  border-radius: 32px;
  background-color: #F1E9E3;
}
.post__data {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px 7px;
  font-size: 16px;
  font-weight: 500;
}
.post__data__wrap { display: flex; align-items: center; column-gap: 7px; }
.post__data a { transition: .2s; }
.post__data a:hover { opacity: .8; }
.blog-page .post__title { font-size: 32px; font-weight: 700; line-height: normal; color: #1C203F; margin: 24px 0 0; }

.post__content { margin-top: 70px; font-size: 18px; overflow-wrap: anywhere; }
.post__content > :first-child { margin-top: 0; }
.post__content img { max-width: 100%; height: auto; }
.post__content [id] { scroll-margin-top: 100px; } /* in-article anchors clear the fixed header */
.blog-page .post__content p { line-height: 24px; margin: 0 0 18px; }
.post__content h2 { font-size: 24px; font-weight: 600; line-height: 32px; color: #484C58; margin: 50px 0 20px; } /* PL: 30px spacer block + 20px */
.post__content h3 { font-size: 20px; font-weight: 600; line-height: 28px; color: #484C58; margin: 18px 0; }
.post__content a,
.post__content a:hover { color: #D96761; }
.post__content strong { font-weight: 700; }
.post__content ul,
.post__content ol {
  display: flex;
  flex-direction: column;
  row-gap: 16px;
  margin: 18px 0;
  padding-left: 40px;
}
.post__content ul li { position: relative; list-style: none; }
.post__content ul li::before {
  content: '';
  position: absolute;
  top: 50%;
  left: -16px;
  width: 4px;
  height: 26px;
  transform: translateY(-50%);
  background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0IiBoZWlnaHQ9IjI2IiB2aWV3Qm94PSIwIDAgNCAyNiIgZmlsbD0ibm9uZSI+CjxwYXRoIGQ9Ik0wIDBDMi4yMDkxNCAwIDQgMS43OTA4NiA0IDRWMjJDNCAyNC4yMDkxIDIuMjA5MTQgMjYgMCAyNlYwWiIgZmlsbD0iI0Q5Njc2MSIvPgo8L3N2Zz4=");
}
.post__content blockquote { margin: 18px 0; padding-left: 20px; border-left: 4px solid #D96761; }
.table-wrap { overflow-x: auto; margin: 0 0 18px; }
.post__content table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.post__content th,
.post__content td {
  padding: 9px;
  border: 1px solid #484C58;
  text-align: center;
  vertical-align: middle;
  word-break: break-word;
}
.post__content th { font-weight: 700; }
.post__content thead { border-bottom: 3px solid #484C58; }

/* Author box */
.post-author-box { margin-top: 60px; padding-top: 60px; border-top: 1px solid #CCC; }
.blog-page .post-author__title { font-size: 24px; font-weight: 600; text-transform: uppercase; color: #1C203F; margin: 0 0 20px; }
.post-author { display: flex; align-items: flex-start; column-gap: 30px; }
.post-author__img { width: 220px; min-width: 220px; }
.post-author__img img { width: 100%; height: auto; border-radius: 16px; }
.post-author__data { display: flex; flex-direction: column; }
.blog-page .post-author__nameWrap { font-size: 18px; color: #1C203F; }
.post-author__surname { font-weight: 700; }
.blog-page .post-author__position { margin-top: 2px; font-size: 16px; }
.post-author__desc { margin-top: 20px; font-size: 16px; }
.blog-page .post-author__desc p + p { margin-top: 16px; }
.button-link {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  font-size: 16px;
  font-weight: 600;
  color: #1C203F;
}
.button-link svg { transition: transform .2s ease-in-out; }
.button-link:hover svg { transform: translateX(4px); }

/* Sidebar */
.sidebar { display: flex; flex-direction: column; align-items: flex-start; row-gap: 20px; width: 100%; }
.sidebar__intro {
  width: 100%;
  padding: 16px;
  border-radius: 8px;
  background-color: #F4F1EE;
  color: #2A2A2A;
  font-size: 15px;
  line-height: 1.5;
  text-align: center;
}
.sidebar__intro a { color: #D66F5C; font-weight: 600; }
.sidebar__btnOffer {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 24px;
  border-radius: 512px;
  background: #1C203F;
  color: #F1E9E3;
  font-size: 16px;
  font-weight: 600;
  transition: opacity .3s ease-in-out;
}
.sidebar__btnOffer:hover { opacity: .7; }
.blog-page .sidebar__header { font-size: 18px; font-weight: 500; margin: 18px 0; }
.sidebar__lastPost ul { display: flex; flex-direction: column; row-gap: 10px; margin: 0; padding: 0; }
.sidebar__lastPost li { position: relative; margin-left: 12px; list-style: none; font-size: 14px; }
.sidebar__lastPost li::before {
  content: '';
  position: absolute;
  top: 7px;
  left: -10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: #F3C3BE;
  transition: .3s;
}
.sidebar__lastPost li a { transition: .3s; }
.sidebar__lastPost li:hover::before { background-color: #D96761; }
.sidebar__lastPost li:hover a { opacity: .7; }

/* -- Responsive (PL breakpoints) -- */
@media (max-width: 1440px) {
  .c-hero h1 { font-size: 56px; }
}
@media (max-width: 1199px) {
  .c-hero { margin-top: 24px; padding-top: 0; }
  .c-hero h1 { font-size: 42px; font-weight: 700; line-height: 1.35; letter-spacing: .84px; }
  .post__contentWrap { margin: 0 0 60px; }
}
@media (max-width: 992px) {
  .c-hero h1 { font-size: 28px; }
  .news-list__main { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; margin: 32px 0 64px; }
  .news-item,
  .news-item:first-child { width: 100%; }
  .news-item::after { left: 0; width: 100%; }
  .news-item__image { height: 281px; }
  .news-item__data { margin: 0 0 12px; }
  .blog-page .news-item__title,
  .blog-page .news-item__text { margin: 0 0 16px; }
  .news-item__button { margin: 0; }
}
@media (max-width: 991px) {
  .post__contentWrap { flex-direction: column; row-gap: 30px; }
  .post__sidebar { width: 100%; }
  .sidebar__btnOffer { width: auto; }
}
@media (max-width: 768px) {
  .news-list__main { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .post { margin-top: 24px; padding-top: 0; }
  .post__contentWrap { margin: 0 0 40px; }
  .post__descWrap,
  .post__sidebar { padding: 30px 12px; }
  .blog-page .post__title { font-size: 20px; }
  .post__content { margin-top: 40px; }
  .post__content h2,
  .post__content h3 { font-size: 18px; line-height: 28px; }
  .post-author-box { margin-top: 30px; padding-top: 30px; }
  .post__content table { min-width: 640px; table-layout: auto; font-size: 15px; }
  .post__content th,
  .post__content td { word-break: normal; hyphens: auto; }
  .post-author { flex-direction: column; row-gap: 20px; }
  .post-author__img { max-width: 50%; min-width: auto; }
}
@media (max-width: 575px) {
  .blog-container { padding: 0 16px; }
  .sidebar__btnOffer { width: 100%; }
}
