:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-soft: #fff8f2;
  --surface-accent: #fff1e8;
  --text: #2b2420;
  --muted: #665f59;
  --line: #eee4dc;
  --brand: #E57534;
  --brand-dark: #c85e23;
  --shadow: 0 16px 36px rgba(43, 36, 32, 0.08);
  --shadow-soft: 0 10px 26px rgba(43, 36, 32, 0.06);
  --radius-lg: 26px;
  --max: 1120px;
}

.container {
  width: min(calc(100% - 28px), var(--max));
  margin-inline: auto;
}

.blog-index {
  padding: 24px 0 84px;
  background: linear-gradient(180deg, #ffffff 0%, #fffdfa 100%);
  color: var(--text);
}

.blog-head {
  margin-bottom: 26px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 30px;
}

.blog-head h1 {
  margin: 0;
  font-size: clamp(28px, 7vw, 42px);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.blog-lead {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: clamp(14px, 3.8vw, 16px);
  font-weight: 750;
  line-height: 1.7;
}

.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 8px;
}

.category-filter a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 17px;
  border: 1px solid var(--brand);
  border-radius: 999px;
  background: #fff;
  color: var(--brand-dark);
  font-size: 14px;
  font-weight: 900;
  text-decoration: none !important;
  transition: 0.2s ease;
}

.category-filter a:hover,
.category-filter a:focus-visible,
.category-filter a.is-active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.posts-grid {
  display: grid;
  gap: 12px;
}

.post-card {
  display: grid;
  gap: 12px;
  border-radius: var(--radius-lg);
  padding: 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.post-card:hover,
.post-card:focus-within {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.post-thumb {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #f0e8df;
  min-height: 0;
  height: auto;
  aspect-ratio: 16 / 10;
  display: block;
  isolation: isolate;
}

.post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(0,0,0,0.20));
  z-index: 1;
  pointer-events: none;
}

.post-content-link {
  display: block;
  color: inherit;
  text-decoration: none !important;
}

.post-content-link:hover,
.post-content-link:focus-visible,
.post-content-link:hover h2,
.post-content-link:focus-visible h2 {
  text-decoration: none !important;
}

.post-content-link:hover h2,
.post-content-link:focus-visible h2 {
  color: var(--brand-dark);
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 800;
}

.post-tag {
  color: var(--brand-dark);
  background: var(--surface-accent);
  padding: 5px 10px;
  border-radius: 999px;
}

.post-card h2 {
  margin: 0;
  font-size: clamp(18px, 4.7vw, 22px);
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.post-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.72;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tile-more {
  margin-top: 4px;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 900;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
}

.pager a,
.pager span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-weight: 900;
  text-decoration: none !important;
}

.pager .current {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.blog-empty {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-soft);
  color: var(--muted);
}

.blog-empty p {
  margin: 0;
}

@media (min-width: 720px) {
  .blog-index {
    padding-top: 38px;
  }
  .blog-head {
    margin-bottom: 30px;
    padding-bottom: 34px;
  }
  .posts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 980px) {
  .posts-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}
