/* ============================================================
   Курьерс — Homepage / City Page Blog Preview Section
   ============================================================ */

.s-blog__head {
  text-align: center;
  margin-bottom: var(--space-10);
}
.s-blog__head h2 {
  font-size: clamp(24px, 3.2vw, 36px);
  font-weight: var(--fw-bold);
  margin-bottom: var(--space-2);
}
.s-blog__head p {
  font-size: var(--fs-16);
  color: var(--fg-2);
  margin: 0;
}

.s-blog__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
}

.s-blog__card {
  display: flex;
  flex-direction: column;
  background: var(--surface-0);
  border: 1px solid var(--border-1);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-1);
  transition: transform var(--t-base) var(--ease-out),
              box-shadow var(--t-base) var(--ease-out),
              border-color var(--t-base) var(--ease-out);
}
.s-blog__card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-2);
  border-color: rgba(255, 84, 54, 0.35);
}

.s-blog__cover-link {
  display: block;
  text-decoration: none;
  background: var(--surface-0);
}
.s-blog__cover {
  width: 100%;
  height: 196px;
  background: var(--surface-0);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: var(--space-3);
}
.s-blog__cover img {
  height: 100%;
  width: 100%;
  max-height: 180px;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
  /* Generated covers include a faint export edge; crop it so the white canvas is seamless. */
  clip-path: inset(2px);
  transition: transform var(--t-slow) var(--ease-out);
}
.s-blog__card:hover .s-blog__cover img {
  transform: scale(1.06);
}

.s-blog__body {
  display: flex;
  flex-direction: column;
  padding: var(--space-4);
  flex: 1;
}
.s-blog__cat {
  align-self: flex-start;
  font-size: var(--fs-12);
  font-weight: var(--fw-semibold);
  color: var(--accent-soft-fg);
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: var(--r-pill);
  margin-bottom: var(--space-2);
}
.s-blog__title {
  margin: 0 0 var(--space-2) 0;
  font-size: var(--fs-16);
  line-height: 1.35;
  font-weight: var(--fw-bold);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.s-blog__title a {
  color: var(--fg-1);
  text-decoration: none;
  transition: color var(--t-fast);
}
.s-blog__title a:hover {
  color: var(--accent);
}
.s-blog__excerpt {
  font-size: var(--fs-14);
  line-height: var(--lh-relaxed);
  color: var(--fg-2);
  margin: 0 0 var(--space-4) 0;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.s-blog__date {
  font-size: var(--fs-12);
  color: var(--fg-3);
  margin-top: auto;
}
.s-blog__cta {
  text-align: center;
  margin-top: var(--space-10);
}

@media (max-width: 1024px) {
  .s-blog__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .s-blog__grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
  .s-blog__cover {
    height: 180px;
  }
}
