/* ── Toon Kids Blog components ───────────────────────────────────────────────
   Used by the WordPress blog shells (src/wp-templates/). Plain CSS — copied
   as-is by the passthrough (no Tailwind processing needed).
   Header/footer/cookie-banner styles come from main.css like every page.
   ─────────────────────────────────────────────────────────────────────────── */

/* ── Blog index hero ─────────────────────────────────────────────────────── */
.blog-hero {
  background: linear-gradient(135deg, #E0F4FF 0%, #ffffff 60%, #FFB3D1 100%);
  padding: 8rem 0 2.5rem;
  text-align: center;
  border-bottom: 1px solid #C5E8FF;
}
.blog-hero__eyebrow {
  display: inline-block;
  background: #E0F4FF;
  color: #4BA8E8;
  font-family: var(--font-fredoka), 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0.3rem 1rem;
  border-radius: 999px;
  border: 1px solid #C5E8FF;
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.blog-hero__title {
  font-family: var(--font-fredoka), 'Fredoka', sans-serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}
.blog-hero__subtitle {
  color: #6b7280;
  font-size: 1.0625rem;
  max-width: 520px;
  margin: 0 auto;
}
.blog-hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  background: #4BA8E8;
  color: #fff;
  font-family: var(--font-fredoka), 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 1.125rem;
  padding: 0.75rem 2rem;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(75, 168, 232, 0.35);
  text-decoration: none;
  transition: background 0.15s, transform 0.15s;
}
.blog-hero__cta:hover { background: #3a9ae0; transform: translateY(-2px); }

/* ── Containers ──────────────────────────────────────────────────────────── */
.container-blog-wide { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }
.container-blog { width: 100%; max-width: 740px; margin: 0 auto; padding: 0 1.25rem; }

/* ── Posts grid ──────────────────────────────────────────────────────────── */
.blog-grid-section { padding: 3rem 0 4rem; }
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.75rem;
}
.blog-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 1.25rem;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.1); }
.blog-card__img-wrap { position: relative; aspect-ratio: 16/9; background: #E0F4FF; overflow: hidden; }
.blog-card__img, .blog-card__img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.blog-card:hover .blog-card__img, .blog-card:hover .blog-card__img-wrap img { transform: scale(1.04); }
.blog-card__emoji {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
}
.blog-card__body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.blog-card__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #9ca3af;
  margin-bottom: 0.625rem;
}
.blog-card__tag {
  background: #E0F4FF;
  color: #4BA8E8;
  font-weight: 700;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
}
.blog-card__title {
  font-family: var(--font-fredoka), 'Fredoka', sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.35;
  margin-bottom: 0.5rem;
}
.blog-card__excerpt {
  font-size: 0.875rem;
  color: #6b7280;
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.25rem;
  border-top: 1px solid #f3f4f6;
  font-size: 0.8125rem;
  color: #9ca3af;
}
.blog-card__read-more { color: #4BA8E8; font-weight: 700; font-size: 0.8125rem; }

/* Featured (first) card */
.blog-card--featured { grid-column: 1 / -1; }
@media (min-width: 768px) {
  .blog-card--featured { flex-direction: row; max-height: 300px; }
  .blog-card--featured .blog-card__img-wrap { flex: 0 0 45%; aspect-ratio: auto; min-height: 100%; }
  .blog-card--featured .blog-card__body { justify-content: center; }
  .blog-card--featured .blog-card__title { font-size: 1.375rem; }
  .blog-card--featured .blog-card__excerpt { -webkit-line-clamp: 4; }
}

/* ── Pagination ──────────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 2.5rem 0 1rem;
  flex-wrap: wrap;
}
.pagination__btn, .pagination__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.85rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
  transition: background 0.15s, color 0.15s, transform 0.12s;
  cursor: pointer;
  text-decoration: none;
}
.pagination__btn { background: #ffffff; color: #4BA8E8; border: 2px solid #4BA8E8; }
.pagination__btn:hover { background: #4BA8E8; color: #ffffff; transform: translateY(-1px); }
.pagination__btn--disabled { border-color: #d1d5db; color: #9ca3af; cursor: default; pointer-events: none; }
.pagination__num { background: #ffffff; color: #1a1a2e; border: 2px solid #e5e7eb; }
.pagination__num:hover { background: #E0F4FF; border-color: #4BA8E8; color: #4BA8E8; transform: translateY(-1px); }
.pagination__num--active { background: #4BA8E8; border-color: #4BA8E8; color: #ffffff; cursor: default; pointer-events: none; }

/* ── Post hero ───────────────────────────────────────────────────────────── */
.post-hero {
  background: linear-gradient(135deg, #E0F4FF 0%, #ffffff 60%, #FFB3D1 100%);
  padding: 8rem 0 2.5rem;
  border-bottom: 1px solid #C5E8FF;
}
.post-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: #9ca3af;
  margin-bottom: 1.5rem;
}
.post-breadcrumbs a { color: #4BA8E8; font-weight: 600; text-decoration: none; }
.post-breadcrumbs a:hover { text-decoration: underline; }
.post-breadcrumbs__sep { color: #d1d5db; }
.post-hero__emoji { font-size: 3.5rem; margin-bottom: 1rem; }
.post-hero__tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.post-hero__tag {
  background: #E0F4FF;
  color: #4BA8E8;
  font-weight: 700;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  border: 1px solid #C5E8FF;
}
.post-hero__title {
  font-family: var(--font-fredoka), 'Fredoka', sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.625rem);
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.25;
  margin-bottom: 1rem;
}
.post-hero__meta { display: flex; align-items: center; gap: 1rem; font-size: 0.875rem; color: #6b7280; }
.post-hero__meta-sep { color: #d1d5db; }

/* ── Post featured image ─────────────────────────────────────────────────── */
.post-featured-img {
  width: 100%;
  max-width: 740px;
  margin: 2.5rem auto 0;
  border-radius: 1.25rem;
  overflow: hidden;
}
.post-featured-img img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: #E0F4FF;
  border-radius: 1.25rem;
  display: block;
}
.post-featured-img figcaption { font-size: 0.8rem; color: #6b7280; text-align: center; padding: 0.4rem 0; }

/* ── Post body / prose ───────────────────────────────────────────────────── */
.post-body { padding: 3rem 0 4rem; }
.prose { color: #374151; font-size: 1.0625rem; line-height: 1.8; }
.prose p { margin-bottom: 1.25rem; }
.prose figure { margin: 1.5rem 0; }
.prose figure img { width: 100%; border-radius: 0.5rem; display: block; }
.prose figcaption { font-size: 0.8rem; color: #6b7280; text-align: center; margin-top: 0.4rem; font-style: italic; }
.prose h2 {
  font-family: var(--font-fredoka), 'Fredoka', sans-serif;
  font-size: 1.625rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-top: 2.5rem;
  margin-bottom: 0.875rem;
  line-height: 1.3;
}
.prose h3 {
  font-family: var(--font-fredoka), 'Fredoka', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1a1a2e;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}
.prose ul, .prose ol { padding-left: 1.5rem; margin-bottom: 1.25rem; }
.prose ul { list-style-type: disc; }
.prose ol { list-style-type: decimal; }
.prose li { margin-bottom: 0.5rem; line-height: 1.75; }
.prose li ul, .prose li ol { margin-top: 0.5rem; margin-bottom: 0.25rem; }
.prose strong { font-weight: 700; color: #1f2937; }
.prose em { font-style: italic; }
.prose a { color: #4BA8E8; font-weight: 600; }
.prose a:hover { text-decoration: underline; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin: 1.5rem 0; border-radius: 8px; outline: 2px solid #94a3b8; outline-offset: 0; overflow: hidden; }
.prose thead tr { background: #E0F4FF !important; }
.prose th { padding: 10px 14px; text-align: center; vertical-align: middle; border: 1px solid #94a3b8; font-weight: 700; color: #4BA8E8; font-family: var(--font-fredoka), 'Fredoka', sans-serif; }
.prose td { padding: 10px 14px; text-align: center; vertical-align: middle; border: 1px solid #94a3b8; }
.prose tbody tr:nth-child(even) { background: #fafafa; }
.prose blockquote {
  margin: 1.5rem 0;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, #E0F4FF 0%, #ffffff 100%);
  border-left: 4px solid #4BA8E8;
  border-radius: 0.75rem;
  font-size: 0.95rem;
  line-height: 1.7;
  box-shadow: 0 2px 8px rgba(75, 168, 232, 0.1);
}
.prose blockquote p { margin-bottom: 0.75rem; }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose blockquote strong { color: #4BA8E8; font-family: var(--font-fredoka), 'Fredoka', sans-serif; font-weight: 700; }
.prose pre {
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  border: 2px solid #E0F4FF;
  border-radius: 1rem;
  padding: 1.5rem;
  margin: 2rem 0;
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.8;
  color: #1a1a2e;
  white-space: pre-wrap;
  word-break: break-word;
}
.prose code {
  background: #E0F4FF;
  color: #4BA8E8;
  padding: 0.2rem 0.5rem;
  border-radius: 0.5rem;
  font-size: 0.9em;
  font-weight: 600;
  border: 1px solid #C5E8FF;
}
.prose pre code { background: none; padding: 0; border-radius: 0; color: inherit; border: none; font-weight: 500; }

/* ── Flow charts (transformed blockquote guides) ─────────────────────────── */
.flow-chart {
  margin: 2rem 0;
  padding: 1.5rem;
  background: linear-gradient(135deg, #E0F4FF 0%, #ffffff 100%);
  border: 2px solid #C5E8FF;
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(75, 168, 232, 0.1);
}
.flow-chart__header {
  font-family: var(--font-fredoka), 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  color: #4BA8E8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #C5E8FF;
}
.flow-chart__steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.flow-chart__step { display: flex; flex-direction: column; align-items: flex-start; gap: 0.375rem; }
.flow-chart__node {
  background: #ffffff;
  border: 2px solid #4BA8E8;
  border-radius: 0.875rem;
  padding: 0.75rem 1rem;
  box-shadow: 0 2px 8px rgba(75, 168, 232, 0.12);
  width: 100%;
}
.flow-chart__title { font-family: var(--font-fredoka), 'Fredoka', sans-serif; font-weight: 700; font-size: 1rem; color: #1a1a2e; line-height: 1.4; }
.flow-chart__arrow { align-self: center; font-size: 1.25rem; color: #4BA8E8; line-height: 1; padding: 0.125rem 0; }
.flow-chart__desc { font-size: 0.9375rem; color: #4b5563; line-height: 1.6; padding: 0 0.25rem; }

/* ── CTA box (end of post) ───────────────────────────────────────────────── */
.blog-cta-box {
  margin-top: 3rem;
  padding: 2rem;
  background: linear-gradient(135deg, #E0F4FF 0%, #FFB3D1 100%);
  border-radius: 1.25rem;
  text-align: center;
  border: 1px solid #C5E8FF;
}
.blog-cta-box__title {
  font-family: var(--font-fredoka), 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: #1a1a2e;
  margin-bottom: 1rem;
}
.blog-cta-box__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #52C93F 0%, #4BA8E8 50%, #E8488A 100%);
  color: #fff;
  font-family: var(--font-fredoka), 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 1.125rem;
  padding: 0.75rem 2rem;
  border-radius: 999px;
  text-decoration: none;
  position: relative;
  transition: filter 0.15s;
  animation: cta-pulse-ring 1.8s ease-out infinite, cta-btn-bounce 2.4s ease-in-out infinite;
}
.blog-cta-box__btn:hover { filter: brightness(1.15); animation: none; transform: translateY(-2px) scale(1.04); }
.blog-cta-box__sub { margin-top: 0.75rem; font-size: 0.8125rem; color: #6b7280; }
@keyframes cta-pulse-ring {
  0%   { box-shadow: 0 6px 20px rgba(75,168,232,0.5), 0 0 0 0 rgba(255,255,255,0.7); }
  60%  { box-shadow: 0 6px 30px rgba(75,168,232,0.7), 0 0 0 18px rgba(255,255,255,0); }
  100% { box-shadow: 0 6px 20px rgba(75,168,232,0.5), 0 0 0 0 rgba(255,255,255,0); }
}
@keyframes cta-btn-bounce {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.05); }
}
@media (max-width: 640px) {
  .blog-cta-box__btn { font-size: 1rem; padding: 0.65rem 1.5rem; white-space: nowrap; }
}

/* ── Mid-article inline CTA + secondary image (injected by PHP) ──────────── */
.blog-cta-inline {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  background: linear-gradient(135deg, #E0F4FF 0%, #FFB3D1 100%);
  border: 1px solid #C5E8FF;
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  margin: 2rem 0;
}
.blog-cta-inline__text { font-size: 0.9375rem; font-weight: 600; color: #1a1a2e; }
.blog-cta-inline__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: #4BA8E8;
  color: #fff;
  font-weight: 700;
  font-size: 0.9375rem;
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, transform 0.15s;
}
.blog-cta-inline__btn:hover { background: #3a9ae0; transform: translateY(-1px); }
.blog-secondary-image { margin: 0 0 2rem; border-radius: 1rem; overflow: hidden; background: #E0F4FF; }
.blog-secondary-image__wrap { aspect-ratio: 16/9; overflow: hidden; border-radius: 1rem; }
.blog-secondary-image__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-secondary-image__caption { font-size: 0.8rem; color: #6b7280; text-align: center; padding: 0.4rem 0.75rem 0; }

/* ── Related posts ("You Might Also Like") ───────────────────────────────── */
.related-posts { margin-top: 3.5rem; padding-top: 2.5rem; border-top: 2px solid #E0F4FF; }
.related-posts__title {
  font-family: var(--font-fredoka), 'Fredoka', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 1.25rem;
  text-align: center;
}
.related-posts__list { display: flex; flex-direction: column; gap: 0.625rem; }
.blog-card-mini {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.625rem 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.875rem;
  text-decoration: none;
  color: inherit;
  background: #fff;
  transition: background 0.15s, box-shadow 0.15s;
}
.blog-card-mini:hover { background: #F0F9FF; box-shadow: 0 4px 16px rgba(75,168,232,0.1); }
.blog-card-mini__thumb {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border-radius: 0.625rem;
  overflow: hidden;
  background: #E0F4FF;
  display: flex;
  align-items: center;
  justify-content: center;
}
.blog-card-mini__thumb img { width: 100%; height: 100%; object-fit: cover; }
.blog-card-mini__emoji { font-size: 2rem; }
.blog-card-mini__body { flex: 1; min-width: 0; }
.blog-card-mini__meta { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.25rem; }
.blog-card-mini__tag {
  background: #E0F4FF;
  color: #4BA8E8;
  font-weight: 700;
  font-size: 0.7rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
}
.blog-card-mini__date { font-size: 0.75rem; color: #9ca3af; white-space: nowrap; }
.blog-card-mini__title {
  font-family: var(--font-fredoka), 'Fredoka', sans-serif;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card-mini:hover .blog-card-mini__title { color: #4BA8E8; }

/* ── Back to blog link ───────────────────────────────────────────────────── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: #4BA8E8;
  font-weight: 700;
  font-size: 0.9rem;
  margin-top: 2.5rem;
  text-decoration: none;
}
.back-link:hover { text-decoration: underline; }

/* ── Reading progress bar ────────────────────────────────────────────────── */
.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #4BA8E8, #E84080);
  z-index: 100;
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
}

/* ── Post share buttons ──────────────────────────────────────────────────── */
.post-share { display: inline-flex; align-items: center; gap: 0.4rem; }
.post-share__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, transform 0.12s, color 0.15s;
  white-space: nowrap;
}
.post-share__btn--twitter { background: #000; color: #fff; }
.post-share__btn--twitter:hover { background: #222; transform: translateY(-1px); }
.post-share__btn--facebook { background: #1877F2; color: #fff; }
.post-share__btn--facebook:hover { background: #0d6edc; transform: translateY(-1px); }
.post-share__btn--copy { background: #f3f4f6; color: #374151; }
.post-share__btn--copy:hover { background: #e5e7eb; transform: translateY(-1px); }
.post-share__btn--copied { background: #52C93F !important; color: #fff !important; }

/* ── Responsive tweaks ───────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .blog-grid { grid-template-columns: 1fr; }
  .post-hero__meta { flex-wrap: wrap; gap: 0.5rem; }
  .post-hero__meta .post-hero__meta-sep { display: none; }
}
