/* ==========================================================================
   Sunset Blog Grid — style.css v1.1.0
   ========================================================================== */

.sbg-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  font-family: 'Lato', sans-serif;
  font-size: 16px;
}

/* ── Card ── */
.sbg-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: #1a1a1a;
}

/* ── Image wrap ── */
.sbg-card__image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #f0ede8;
  border-radius: 2px;
}

.sbg-card__image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  /* Wymuszamy renderowanie w najwyższej jakości */
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  -ms-interpolation-mode: bicubic;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.sbg-card:hover .sbg-card__image-wrap img {
  transform: scale(1.05);
}

/* ── Overlay ── */
.sbg-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(15, 12, 9, 0.55) 0%,
    rgba(15, 12, 9, 0.10) 50%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.sbg-card:hover .sbg-card__overlay {
  opacity: 1;
}

/* ── Category badge ── */
.sbg-card__category {
  position: absolute;
  top: 14px;
  left: 14px;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #fff;
  background: #c8a96e;
  padding: 4px 10px;
  border-radius: 1px;
  line-height: 1;
}

/* ── Arrow ── */
.sbg-card__arrow {
  position: absolute;
  bottom: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity   0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.sbg-card__arrow svg {
  width: 14px;
  height: 14px;
}

.sbg-card:hover .sbg-card__arrow {
  opacity: 1;
  transform: translateY(0);
}

/* ── Placeholder ── */
.sbg-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0ede8;
}

.sbg-card__placeholder svg {
  width: 40px;
  height: 40px;
}

/* ── Body ── */
.sbg-card__body {
  padding: 14px 0 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sbg-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sbg-card__date,
.sbg-card__cat {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #777;
}

.sbg-card__dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #c8a96e;
  flex-shrink: 0;
}

/* ── Title ── */
.sbg-card__title {
  font-family: 'Playfair Display', serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  color: #1a1a1a;
  margin: 0;
  transition: color 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.sbg-card:hover .sbg-card__title {
  color: #000;
}

.sbg-card__title-inner {
  background-image: linear-gradient(#c8a96e, #c8a96e);
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  padding-bottom: 1px;
}

.sbg-card:hover .sbg-card__title-inner {
  background-size: 100% 1px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
  .sbg-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .sbg-grid {
    grid-template-columns: 1fr;
  }
}
