/* ==========================================================================
   Blog / Tudástár page (blog.html)
   ========================================================================== */

/* ---------- Hero ---------- */
.blog-hero { padding: 72px 0 64px; background: var(--bg); }
.blog-hero__grid { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; }
.blog-hero__text { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; max-width: 640px; }
.blog-hero__text .lead { color: var(--muted); }
.pill--yellow { background: rgba(253, 172, 45, .22); color: var(--navy); }
.pill--yellow::before { background: var(--yellow); }
.blog-search { width: 380px; flex: none; }
.blog-search input { background: var(--bg); }
.blog-search input::-webkit-search-cancel-button { cursor: pointer; }

/* ---------- Filter chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--navy);
  font: 600 14px/1.2 var(--font-text);
  white-space: nowrap;
  transition: background-color .2s var(--ease-out), border-color .2s var(--ease-out), color .2s var(--ease-out);
}
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--dot, transparent); flex: none; }
.chip[data-filter="all"]::before { display: none; }
.chip--green { --dot: var(--green); }
.chip--pink { --dot: var(--pink); }
.chip--blue { --dot: var(--blue); }
.chip--orange { --dot: var(--orange); }
.chip--yellow { --dot: var(--yellow); }
.chip:hover { border-color: var(--navy); }
.chip.is-active { background: var(--navy); border-color: var(--navy); color: var(--white); }
.chip.is-active::before { background: currentColor; }
.chip[data-filter="all"].is-active::before { display: none; }

/* ---------- Tags / meta ---------- */
.post__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.tag {
  display: inline-flex; align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font: 600 14px/1.2 var(--font-text);
  letter-spacing: .04em;
}
.tag--green { background: rgba(3, 142, 119, .12); color: var(--green); }
.tag--blue { background: rgba(6, 116, 183, .12); color: var(--blue); }
.tag--pink { background: rgba(236, 32, 123, .12); color: var(--pink); }
.tag--orange { background: rgba(253, 114, 65, .14); color: #d9531f; }
.tag--yellow { background: rgba(253, 172, 45, .22); color: var(--navy); }
.tag--solid-pink { background: var(--pink); color: var(--white); }
.post__time { font: 400 15px/1.5 var(--font-text); color: var(--muted); }

/* ---------- Featured article ---------- */
.blog-featured-sec { padding-block: 96px; }
.featured {
  position: relative;
  display: grid; grid-template-columns: 620px 1fr;
  margin-top: 32px;
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255, 255, 255, .07);
  transition: background-color .25s var(--ease-out), box-shadow .25s var(--ease-out);
}
.featured__cover { display: grid; place-items: center; min-height: 410px; background: var(--bg-2); color: var(--muted); font: 400 15px/1.5 var(--font-text); }
.featured__body { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 20px; padding: 48px; }
.featured .post__time { color: rgba(255, 255, 255, .6); }
.featured__title { font: 600 32px/1.3 var(--font-head); letter-spacing: -.01em; color: var(--white); }
.featured__title a::after { content: ""; position: absolute; inset: 0; }
.featured__excerpt { font: 400 19px/1.6 var(--font-text); color: rgba(255, 255, 255, .75); }
.featured__link { color: var(--white); }
.featured:hover { background: rgba(255, 255, 255, .1); box-shadow: 0 18px 40px rgba(0, 0, 0, .25); }
.featured:hover .featured__link { gap: 14px; padding-right: 0; }

/* ---------- Article cards (Card/Blog) ---------- */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  transition: border-color .25s var(--ease-out), box-shadow .25s var(--ease-out), opacity .25s var(--ease-out), transform .25s var(--ease-out);
}
.post.is-hidden { display: none; }
.post.is-fading { opacity: 0; transform: translateY(10px); }
.post__cover { display: grid; place-items: center; height: 220px; flex: none; color: rgba(91, 107, 117, .8); font: 400 15px/1.5 var(--font-text); }
.cover--green { background: #d4ebe7; }
.cover--blue { background: #d5e6f1; }
.cover--orange { background: #fde3d9; }
.cover--pink { background: #fbdbe9; }
.cover--yellow { background: #fdf0d8; }
.post__body { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 24px 28px 28px; }
.post__title { font: 600 20px/1.35 var(--font-head); color: var(--navy); transition: color .25s var(--ease-out); }
.post__title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.post__excerpt { color: var(--muted); }
.post__link { margin-top: auto; padding-top: 16px; }
.post:hover { border-color: var(--blue); box-shadow: var(--shadow-hover); }
.post:hover .post__title { color: var(--blue); }
.post:hover .post__link { gap: 14px; padding-right: 0; }
.post:focus-within { border-color: var(--blue); }
.post__title a:focus-visible { outline: none; }

.posts-empty { margin-top: 8px; padding: 40px 24px; border: 1px dashed var(--line); border-radius: 24px; text-align: center; color: var(--muted); }

/* ---------- Pagination ---------- */
.pager { display: flex; justify-content: center; gap: 8px; margin-top: 48px; }
.pager__btn {
  display: grid; place-items: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--navy);
  font: 600 16px/1 var(--font-text);
  transition: background-color .2s var(--ease-out), border-color .2s var(--ease-out), color .2s var(--ease-out);
}
.pager[hidden] { display: none; }
.pager__btn .i { width: 20px; height: 20px; }
.pager__btn--arrow { background: var(--bg-2); border-color: var(--bg-2); }
.pager__btn:hover { border-color: var(--navy); }
.pager__btn.is-active { background: var(--navy); border-color: var(--navy); color: var(--white); }
.pager__btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }

/* ---------- Tablet ---------- */
@media (max-width: 1199px) {
  .blog-hero { padding: 64px 0 56px; }
  .blog-hero__grid { flex-direction: column; align-items: stretch; gap: 28px; }
  .blog-search { width: auto; }
  .chips { margin-top: 28px; }
  .blog-featured-sec { padding-block: 80px; }
  .featured { grid-template-columns: 1fr; }
  .featured__cover { min-height: 300px; }
  .featured__body { padding: 40px; }
  .posts { grid-template-columns: repeat(2, 1fr); }
  .pager { margin-top: 40px; }
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
  .blog-hero { padding: 56px 0 48px; }
  .chips { gap: 8px; }
  .blog-featured-sec { padding-block: 56px; }
  .featured { margin-top: 24px; }
  .featured__cover { min-height: 200px; }
  .featured__body { padding: 28px 24px; gap: 16px; }
  .featured__title { font-size: 24px; }
  .featured__excerpt { font-size: 17px; }
  .posts { grid-template-columns: 1fr; }
  .post__cover { height: 190px; }
  .pager { margin-top: 32px; }
  .pager__btn { width: 44px; height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .post, .featured, .chip { transition: none; }
}
