/* ==========================================================================
   Wonders Kids — Blog (list + single post)
   1. Toolbar & search   2. Featured post   3. Post cards   4. Post page
   5. Article typography (.prose)   6. Sidebar   7. Responsive
   Loaded with pages.css (banner, empty state, pagination).
   ========================================================================== */

/* 1. TOOLBAR =============================================================== */
.blog-list { padding-top: 80px; }
.blog-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; flex-wrap: wrap; margin-bottom: 40px; }
.blog-toolbar .badge { margin-bottom: 12px; }
.blog-toolbar__title { font-size: 34px; font-weight: 700; letter-spacing: -.02em; }
.blog-search {
  position: relative; display: flex; align-items: center; gap: 8px; width: 420px; max-width: 100%;
  padding: 6px 6px 6px 48px; border-radius: 50px; background: #fff; border: 1px solid #E4E4EE;
  transition: border-color .2s, box-shadow .2s;
}
.blog-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 5px rgba(87, 81, 225, .1); }
.blog-search__icon { position: absolute; left: 18px; width: 19px; height: 19px; color: var(--primary); }
.blog-search input { flex: 1; min-width: 0; height: 42px; border: 0; outline: 0; background: transparent; font-size: 15px; color: var(--heading); }
.blog-search input::-webkit-search-cancel-button { display: none; }
.blog-search__clear { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--body); background: #F3F3F8; }
.blog-search__clear:hover { background: var(--heading); color: #fff; }
.blog-search__clear .wk-icon { width: 14px; height: 14px; }
.blog-search .btn { padding: 12px 22px; font-size: 14.5px; }

/* shared meta row */
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; font-size: 14px; color: var(--body); }
.post-meta li { display: inline-flex; align-items: center; gap: 7px; }
.post-meta .wk-icon { width: 16px; height: 16px; color: var(--primary); }

.post-thumb-fallback {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: linear-gradient(135deg, #EFEEFE, #FCE8F3); color: var(--primary);
}
.post-thumb-fallback .wk-icon { width: 44px; height: 44px; opacity: .6; }

/* 2. FEATURED ============================================================== */
.post-featured {
  display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; gap: 0; margin-bottom: 50px;
  border-radius: 28px; background: #fff; overflow: hidden;
  border: 1px solid #EEEEF4; box-shadow: 0 30px 70px -40px rgba(22, 20, 57, .45);
}
.post-featured__media { position: relative; display: block; height: 100%; min-height: 380px; overflow: hidden; background: #F3F3F8; }
.post-featured__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.post-featured:hover .post-featured__media img { transform: scale(1.05); }
.post-featured__tag {
  position: absolute; top: 20px; left: 20px; display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 50px; background: var(--yellow); color: var(--heading);
  font-family: var(--font-heading); font-weight: 700; font-size: 13px; box-shadow: 3px 4px 0 rgba(22, 20, 57, .2);
}
.post-featured__tag .wk-icon { width: 15px; height: 15px; }
.post-featured__body { padding: 44px 48px; }
.post-featured__body .post-meta { margin-bottom: 16px; }
.post-featured__title { font-size: 32px; font-weight: 700; line-height: 1.25; letter-spacing: -.02em; margin-bottom: 16px; }
.post-featured__title a:hover { color: var(--primary); }
.post-featured__excerpt { font-size: 16.5px; line-height: 1.75; margin-bottom: 28px; }

/* 3. CARDS ================================================================= */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.post-card {
  display: flex; flex-direction: column; border-radius: 24px; background: #fff; overflow: hidden;
  border: 1px solid #EEEEF4; box-shadow: 0 18px 44px -30px rgba(22, 20, 57, .45);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.post-card:hover { transform: translateY(-8px); box-shadow: 0 30px 60px -30px rgba(87, 81, 225, .5); }
.post-card__media { position: relative; display: block; aspect-ratio: 16 / 10.5; overflow: hidden; background: #F3F3F8; }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.post-card:hover .post-card__media img { transform: scale(1.07); }
.post-card__date {
  position: absolute; left: 16px; bottom: 16px; display: flex; flex-direction: column; align-items: center;
  min-width: 56px; padding: 7px 8px; border-radius: 14px; background: #fff; color: var(--body);
  font-size: 12px; font-weight: 600; text-transform: uppercase; line-height: 1.1; box-shadow: 0 8px 18px -8px rgba(22, 20, 57, .4);
}
.post-card__date strong { font-family: var(--font-heading); font-size: 22px; color: var(--primary); }
.post-card__body { flex: 1; display: flex; flex-direction: column; padding: 22px 24px 26px; }
.post-card__meta { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--body); margin-bottom: 10px; }
.post-card__meta .wk-icon { width: 15px; height: 15px; color: var(--primary); }
.post-card__title { font-size: 20px; font-weight: 700; line-height: 1.35; margin-bottom: 10px; }
.post-card__title a:hover { color: var(--primary); }
.post-card__excerpt { font-size: 15px; line-height: 1.65; margin-bottom: 18px; }
.post-card__more {
  margin-top: auto; display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  font-family: var(--font-heading); font-weight: 600; font-size: 15px; color: var(--primary);
}
.post-card__more .wk-icon { width: 17px; height: 17px; transition: transform .2s; }
.post-card:hover .post-card__more .wk-icon { transform: translateX(5px); }

/* 4. POST PAGE ============================================================= */
.read-progress {
  position: fixed; top: 0; left: 0; z-index: 200; height: 4px; width: 100%;
  background: linear-gradient(90deg, #5751E1, #A855F7, #EC4B95, #FFC224);
  transform-origin: 0 50%; transform: scaleX(var(--read, 0));
}
.post-hero { position: relative; overflow: hidden; text-align: center; background: var(--hero-bg); padding: 70px 0 100px; }
.post-hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 22px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 108 22'%3E%3Cpath d='M0 22C14 2 40 0 54 0s40 2 54 22Z' fill='%23fff'/%3E%3C/svg%3E") 0 0 / 108px 22px repeat-x;
}
.post-hero__inner { position: relative; z-index: 1; max-width: 900px; }
.post-hero .breadcrumb { margin-bottom: 24px; }
.breadcrumb__clip { display: inline-block; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.post-hero__title { font-size: 48px; font-weight: 700; line-height: 1.18; letter-spacing: -.03em; margin-bottom: 22px; }
.post-meta--center { justify-content: center; font-size: 15px; }
.post-meta__avatar { width: 32px; height: 32px; border-radius: 50%; overflow: hidden; background: #fff; display: inline-grid; place-items: center; box-shadow: 0 4px 10px -4px rgba(22,20,57,.3); }
.post-meta__avatar img { width: 26px; height: 26px; object-fit: contain; }

.post { padding-top: 60px; }
.post__layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 50px; align-items: start; }
.post__cover { margin: 0 0 34px; border-radius: 26px; overflow: hidden; background: #F3F3F8; box-shadow: 0 30px 60px -36px rgba(22, 20, 57, .5); }
.post__cover img { width: 100%; max-height: 520px; object-fit: cover; }
.post__lead {
  position: relative; margin-bottom: 30px; padding: 20px 24px 20px 28px; border-radius: 18px; background: var(--primary-soft);
  font-family: var(--font-heading); font-weight: 500; font-size: 19px; line-height: 1.6; color: var(--heading);
}
.post__lead::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 5px; border-radius: 0 5px 5px 0; background: var(--primary); }

/* 5. PROSE ================================================================= */
.prose { font-size: 17.5px; line-height: 1.85; color: #4A4960; overflow-wrap: break-word; }
.prose > * + * { margin-top: 1.1em; }
.prose h1, .prose h2, .prose h3, .prose h4 { color: var(--heading); line-height: 1.3; margin-top: 1.7em; margin-bottom: .2em; letter-spacing: -.01em; }
.prose h1 { font-size: 34px; } .prose h2 { font-size: 29px; } .prose h3 { font-size: 23px; } .prose h4 { font-size: 19px; }
.prose a { color: var(--primary); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: rgba(87, 81, 225, .35); }
.prose a:hover { text-decoration-color: var(--primary); }
.prose strong, .prose b { color: var(--heading); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose ul { list-style: none; padding-left: 0; }
.prose ul > li { position: relative; padding-left: 30px; }
.prose ul > li::before { content: ""; position: absolute; left: 6px; top: .72em; width: 9px; height: 9px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 3px #FFF1C7; }
.prose ol { list-style: decimal; }
.prose ol > li::marker { color: var(--primary); font-weight: 700; }
.prose li + li { margin-top: .45em; }
.prose img { max-width: 100%; height: auto !important; border-radius: 18px; display: inline-block; }
.prose figure { margin: 1.6em 0; }
.prose figcaption { margin-top: 8px; font-size: 14px; color: #8D8CA0; text-align: center; }
.prose blockquote {
  position: relative; margin: 1.8em 0; padding: 26px 30px 26px 70px; border-radius: 22px; background: #FFF8E5;
  font-family: var(--font-heading); font-style: italic; font-size: 20px; line-height: 1.6; color: var(--heading);
}
.prose blockquote::before { content: "“"; position: absolute; left: 22px; top: 6px; font-size: 72px; line-height: 1; color: var(--yellow); font-style: normal; }
.prose hr { border: 0; height: 2px; margin: 2.4em auto; width: 120px; background: repeating-linear-gradient(90deg, #D6D6DE 0 8px, transparent 8px 14px); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15.5px; display: block; overflow-x: auto; }
.prose th, .prose td { padding: 12px 14px; border: 1px solid #E8E8F0; text-align: left; }
.prose th { background: #F6F6FC; color: var(--heading); }
.prose iframe, .prose video { max-width: 100%; border: 0; border-radius: 18px; }
.prose iframe[src*="youtube"], .prose iframe[src*="vimeo"] { width: 100%; height: auto; aspect-ratio: 16 / 9; }
.prose code { padding: 2px 6px; border-radius: 6px; background: #F3F3F8; font-size: .9em; }

/* share + prev/next */
.post-share {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  margin-top: 46px; padding: 20px 24px; border-radius: 20px; background: #F7F7FB;
}
.post-share__label { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-heading); font-weight: 600; color: var(--heading); }
.post-share__label .wk-icon { width: 20px; height: 20px; color: var(--primary); }
.post-share__list { display: flex; gap: 10px; }
.post-share__btn {
  position: relative; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  transition: transform .25s var(--ease), box-shadow .25s;
}
.post-share__btn .wk-icon { width: 18px; height: 18px; }
.post-share__btn:hover { transform: translateY(-3px); box-shadow: 0 10px 18px -8px rgba(22,20,57,.5); }
.post-share__btn.is-whatsapp { background: #25D366; }
.post-share__btn.is-facebook { background: #1877F2; }
.post-share__btn.is-linkedin { background: #0A66C2; }
.post-share__btn.is-copy { background: var(--heading); }
.post-share__toast {
  position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translate(-50%, 6px);
  padding: 6px 10px; border-radius: 8px; background: var(--heading); color: #fff; font-size: 12.5px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.post-share__toast:empty { display: none; }
.post-share__btn.is-copied .post-share__toast { opacity: 1; transform: translate(-50%, 0); }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 26px; }
.post-nav__link {
  display: flex; flex-direction: column; gap: 6px; padding: 20px 22px; border-radius: 20px;
  border: 1px solid #EEEEF4; background: #fff; transition: border-color .25s, box-shadow .25s, transform .25s var(--ease);
}
.post-nav__link:hover { border-color: transparent; transform: translateY(-3px); box-shadow: 0 20px 40px -24px rgba(87, 81, 225, .5); }
.post-nav__link--next { text-align: right; align-items: flex-end; }
.post-nav__dir { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--primary); }
.post-nav__dir .wk-icon { width: 15px; height: 15px; }
.post-nav__link strong { font-family: var(--font-heading); font-size: 16.5px; color: var(--heading); line-height: 1.4; }

/* 6. SIDEBAR =============================================================== */
.post__aside { position: sticky; top: 100px; display: grid; gap: 24px; }
.aside-card { padding: 24px; border-radius: 22px; background: #fff; border: 1px solid #EEEEF4; box-shadow: 0 18px 40px -30px rgba(22, 20, 57, .4); }
.aside-card__title { position: relative; font-size: 19px; font-weight: 700; margin-bottom: 18px; padding-bottom: 12px; }
.aside-card__title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 28px; height: 3px; border-radius: 3px; background: var(--primary); }
.aside-search { position: relative; display: flex; }
.aside-search input { width: 100%; height: 50px; padding: 0 56px 0 18px; border-radius: 50px; border: 1px solid #E4E4EE; background: #F8F8FC; font-size: 15px; }
.aside-search input:focus { outline: 0; border-color: var(--primary); background: #fff; }
.aside-search button { position: absolute; right: 5px; top: 5px; width: 40px; height: 40px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; }
.aside-search button .wk-icon { width: 17px; height: 17px; }
.aside-posts { display: grid; gap: 16px; }
.aside-post { display: flex; align-items: center; gap: 14px; }
.aside-post__img { position: relative; flex-shrink: 0; width: 74px; height: 74px; border-radius: 16px; overflow: hidden; background: #F3F3F8; }
.aside-post__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.aside-post:hover .aside-post__img img { transform: scale(1.1); }
.aside-post__img .post-thumb-fallback .wk-icon { width: 26px; height: 26px; }
.aside-post strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-family: var(--font-heading); font-weight: 600; font-size: 15px; line-height: 1.4; color: var(--heading); margin-bottom: 4px; }
.aside-post:hover strong { color: var(--primary); }
.aside-post small { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--body); }
.aside-post small .wk-icon { width: 13px; height: 13px; color: var(--primary); }

.aside-cta { position: relative; overflow: hidden; padding: 28px 24px; border-radius: 22px; background: var(--grad-brand, var(--primary)); color: #fff; }
.aside-cta__swirl { position: absolute; right: -50px; top: -20px; width: 220px; color: rgba(255,255,255,.14); }
.aside-cta__eyebrow { position: relative; font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #D9D7FF; margin-bottom: 6px; }
.aside-cta__title { position: relative; font-family: var(--font-heading); font-weight: 700; font-size: 21px; line-height: 1.3; margin-bottom: 16px; }
.aside-cta__phone { position: relative; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; margin-bottom: 20px; }
.aside-cta__phone .wk-icon { width: 17px; height: 17px; color: var(--yellow); }
.aside-cta .btn { position: relative; height: 46px; padding: 0 22px; font-size: 15px; }

.more-posts { background: var(--hero-bg); padding: 110px 0; }
.more-posts::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 22px; background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 108 22'%3E%3Cpath d='M0 22C14 2 40 0 54 0s40 2 54 22Z' fill='%23F4F4F4'/%3E%3C/svg%3E");
  background-size: 108px 22px; background-repeat: repeat-x;
}

/* 7. RESPONSIVE ============================================================ */
@media (max-width: 1199px) {
  .post__layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 36px; }
  .post-featured__body { padding: 36px; }
  .post-featured__title { font-size: 28px; }
}
@media (max-width: 991px) {
  .post-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .post-featured { grid-template-columns: 1fr; }
  .post-featured__media { min-height: 0; aspect-ratio: 16 / 9; }
  .post-hero__title { font-size: 38px; }
  .post__layout { grid-template-columns: 1fr; }
  .post__aside { position: static; grid-template-columns: 1fr 1fr; }
  .post__aside .aside-cta { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
  .blog-list { padding-top: 60px; }
  .blog-toolbar__title { font-size: 26px; }
  .blog-search { width: 100%; }
  .post-grid { grid-template-columns: 1fr; max-width: 440px; margin-inline: auto; }
  .post-featured { border-radius: 22px; }
  .post-featured__body { padding: 26px 22px 30px; }
  .post-featured__title { font-size: 24px; }
  .post-hero { padding: 50px 0 80px; }
  .post-hero__title { font-size: 30px; }
  .breadcrumb__clip { max-width: 140px; }
  .post-meta--center { font-size: 14px; gap: 8px 14px; }
  .post { padding-top: 40px; }
  .post__cover { border-radius: 18px; margin-bottom: 26px; }
  .post__lead { font-size: 17px; }
  .prose { font-size: 16.5px; }
  .prose h2 { font-size: 24px; } .prose h3 { font-size: 20px; }
  .prose blockquote { padding: 22px 20px 22px 54px; font-size: 17.5px; }
  .prose blockquote::before { left: 14px; font-size: 56px; }
  .post-share { justify-content: center; text-align: center; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav__link--next { text-align: left; align-items: flex-start; }
  .post__aside { grid-template-columns: 1fr; }
  .more-posts { padding: 80px 0; }
}