/* Blog redesign (12.2026): dark hero, white reading sheet with a sticky
 * "בעמוד הזה" table of contents, a dark quick-answer card, a mid-article
 * booking card and plus-icon FAQ. Loaded after postpro-editorial.css on
 * /blog/ pages only; the TOC, active-section highlight and mid card are
 * built by /js/postpro-blog.js. */

/* ---------- shared dark hero ---------- */
.blog-hero {
  position: relative;
  overflow: clip;
  padding-block: clamp(48px, 7vw, 96px) clamp(96px, 11vw, 150px);
  color: var(--pp-night-text);
  background:
    radial-gradient(60% 70% at 85% 10%, rgb(47 107 255 / .32), transparent 70%),
    radial-gradient(45% 60% at 10% 90%, rgb(24 189 234 / .18), transparent 70%),
    linear-gradient(180deg, var(--pp-night-frame), var(--pp-night-bg));
}
.blog-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgb(255 255 255 / .06) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, #000 30%, transparent);
}
.blog-hero > .mkt-container { position: relative; z-index: 1; }
.blog-hero .mkt-title,
.blog-hero h1 { color: #fff; }
.blog-hero .mkt-breadcrumbs,
.blog-hero .mkt-breadcrumbs span[aria-hidden="true"] { color: var(--pp-night-muted); }
.blog-hero .mkt-breadcrumbs a { color: #8fb3ff; }

.blog-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-block-end: 18px;
  padding: 6px 14px;
  border: 1px solid rgb(44 207 145 / .45);
  border-radius: 999px;
  color: #7ff0c1;
  background: rgb(44 207 145 / .1);
  font-size: 13px;
  font-weight: 700;
}
.blog-pill::before { content: ""; inline-size: 7px; block-size: 7px; border-radius: 50%; background: var(--pp-color-mint-500); box-shadow: 0 0 0 4px rgb(44 207 145 / .2); }

/* ---------- article hero ---------- */
.blog-hero__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
}
.blog-hero__intro { margin-block: 18px 0; color: #c9d3ea; font-size: clamp(17px, 1.8vw, 20px); line-height: 1.75; }
.blog-author { display: flex; align-items: center; gap: 12px; margin-block-start: 26px; }
.blog-author__mark {
  display: grid;
  place-items: center;
  flex: none;
  inline-size: 46px;
  block-size: 46px;
  border: 2px solid rgb(255 255 255 / .85);
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--pp-color-brand-500), var(--pp-color-cyan-500));
  font-size: 17px;
  font-weight: 700;
}
.blog-author__text { display: grid; gap: 2px; font-size: 14px; }
.blog-author__text strong { color: #fff; }
.blog-author__text span { color: var(--pp-night-muted); }
.blog-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-block-start: 28px; }
.blog-hero__actions .btn { min-block-size: 52px; padding-inline: 26px; border-radius: 999px; }
.blog-hero__actions .btn-secondary { border-color: rgb(255 255 255 / .45); color: #fff; background: rgb(255 255 255 / .04); }
.blog-hero__actions .btn-secondary:hover { background: rgb(255 255 255 / .12); }
.blog-hero__note { margin-block-start: 10px; color: var(--pp-night-muted); font-size: 13px; }

.blog-hero__media { position: relative; justify-self: center; inline-size: min(100%, 520px); }
.blog-hero__media::before {
  content: "";
  position: absolute;
  inset: 18px -18px -18px 18px;
  border: 1px solid rgb(143 179 255 / .45);
  border-radius: var(--pp-radius-frame);
}
.blog-hero__media img {
  position: relative;
  display: block;
  inline-size: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--pp-radius-frame);
  box-shadow: 0 30px 80px rgb(0 0 0 / .45);
  transform: rotate(-1.5deg);
}

/* ---------- reading sheet ---------- */
.blog-sheet {
  position: relative;
  z-index: 2;
  margin-block-start: clamp(-72px, -7vw, -44px);
  padding-block: clamp(36px, 5vw, 64px) clamp(56px, 7vw, 90px);
  border-radius: 40px 40px 0 0;
  background: var(--pp-color-surface);
}
.blog-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}
.blog-shell > .article-content { grid-column: 1; grid-row: 1; }
.blog-aside { grid-column: 2; grid-row: 1; position: sticky; inset-block-start: calc(var(--pp-header-height) + 20px); display: grid; gap: 16px; }
.blog-aside .btn { inline-size: 100%; min-block-size: 50px; border-radius: 999px; }

.blog-toc { padding: 18px 18px 14px; border: 1px solid var(--pp-color-border); border-radius: var(--pp-radius-lg); background: var(--pp-color-surface-tint); }
.blog-toc__title { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; color: var(--pp-color-text); font-size: 16px; font-weight: 700; }
.blog-toc__title::before { content: ""; inline-size: 9px; block-size: 9px; border-radius: 50%; background: var(--pp-color-brand-600); }
.blog-toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.blog-toc li { counter-increment: toc; }
.blog-toc a {
  display: flex;
  gap: 10px;
  padding: 8px 10px;
  border-inline-start: 2px solid var(--pp-color-border);
  color: #4a5675;
  font-size: 14px;
  line-height: 1.45;
  text-decoration: none;
  transition: color .15s ease, background-color .15s ease, border-color .15s ease;
}
.blog-toc a::before { content: counter(toc, decimal-leading-zero); flex: none; color: var(--pp-color-text-muted); font-size: 12px; font-weight: 700; line-height: 1.9; }
.blog-toc a:hover { color: var(--pp-color-brand-700); background: rgb(11 91 255 / .05); }
.blog-toc a[aria-current="true"] { border-color: var(--pp-color-brand-600); color: var(--pp-color-brand-700); background: rgb(11 91 255 / .08); font-weight: 700; }
.blog-toc a[aria-current="true"]::before { color: var(--pp-color-brand-600); }

/* phone / tablet: the TOC folds into a closed box above the text */
.blog-toc-mobile { display: none; }

/* ---------- inside the article ---------- */
.blog-shell .article-content > * { max-inline-size: none; }
.blog-shell .article-content h2 { scroll-margin-block-start: calc(var(--pp-header-height) + 24px); }

/* quick answer: dark card; only the first <strong> is the label */
.blog-shell .article-content .tip:first-child {
  margin-block: 0 36px;
  padding: 26px 28px;
  border: 0;
  border-radius: var(--pp-radius-xl);
  color: #dfe6f6;
  background:
    radial-gradient(70% 90% at 100% 0%, rgb(47 107 255 / .35), transparent 70%),
    var(--pp-night-bg);
  box-shadow: 0 20px 50px rgb(13 21 39 / .25);
  font-size: 17px;
  line-height: 1.85;
}
.blog-shell .article-content .tip:first-child strong { display: inline; margin: 0; color: #fff; }
.blog-shell .article-content .tip:first-child > strong:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-block-end: 10px;
  color: #7ff0c1;
  font-size: 14px;
}
.blog-shell .article-content .tip:first-child > strong:first-child::before { content: ""; inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--pp-color-mint-500); }
.blog-shell .article-content .tip:first-child a { color: #8fb3ff; }
/* the same bug outside the first card: inline strongs should stay inline */
.blog-shell .article-content .tip strong ~ strong,
.blog-shell .article-content .warning strong ~ strong { display: inline; margin: 0; }

/* numbered step cards */
.blog-shell .article-content > .mkt-card { position: relative; margin-block: 22px; padding: 28px 30px; border-radius: var(--pp-radius-xl); }
.blog-shell .article-content > .mkt-card > .article-kicker:first-child {
  display: inline-grid;
  place-items: center;
  inline-size: 38px;
  block-size: 38px;
  margin-block-end: 12px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--pp-color-brand-600), var(--pp-color-cyan-500));
  font-size: 16px;
}
.blog-shell .article-content > .mkt-card > .article-kicker:first-child::before { display: none; }
.blog-shell .article-content > .mkt-card > h2 { margin-block-start: 0; font-size: clamp(24px, 2.6vw, 30px); }

/* mid-article booking card (inserted by JS) */
.blog-midcta {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-block: 44px;
  padding: 24px 26px;
  border: 1px solid var(--pp-color-brand-100);
  border-radius: var(--pp-radius-xl);
  background: linear-gradient(135deg, #fff, var(--pp-color-brand-50));
  box-shadow: 0 18px 46px rgb(16 37 91 / .1);
}
.blog-midcta__icon { display: grid; place-items: center; inline-size: 52px; block-size: 52px; border-radius: 16px; color: #fff; background: linear-gradient(135deg, var(--pp-color-brand-600), var(--pp-color-cyan-500)); font-size: 24px; }
.blog-midcta h2,
.blog-shell .article-content .blog-midcta h2 { margin: 0 0 4px; font-size: 21px; }
.blog-midcta p,
.blog-shell .article-content .blog-midcta p { margin: 0; color: var(--pp-color-text-muted); font-size: 15px; line-height: 1.6; }
.blog-midcta .btn { min-block-size: 48px; border-radius: 999px; white-space: nowrap; color: #fff; text-decoration: none; }

/* FAQ: plus icon that turns into a minus */
.blog-shell .article-content details.mkt-card { padding: 0; border-radius: var(--pp-radius-lg); box-shadow: none; }
.blog-shell .article-content details.mkt-card + details.mkt-card { margin-block-start: 0; }
.blog-shell .article-content details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  color: var(--pp-color-text);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
  list-style: none;
  cursor: pointer;
}
.blog-shell .article-content details summary::-webkit-details-marker { display: none; }
.blog-shell .article-content details summary::after {
  content: "+";
  display: grid;
  place-items: center;
  flex: none;
  inline-size: 34px;
  block-size: 34px;
  border-radius: 50%;
  color: #fff;
  background: var(--pp-night-bg);
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  transition: transform .2s ease, background-color .2s ease;
}
.blog-shell .article-content details[open] summary::after { content: "−"; background: var(--pp-color-brand-600); }
.blog-shell .article-content details > p { margin: 0; padding: 0 22px 20px; }
.blog-shell .article-content .mkt-grid:has(> details) { gap: 12px; grid-template-columns: 1fr; }

/* ---------- blog list page ---------- */
.blog-hero--index { padding-block-end: clamp(110px, 12vw, 160px); text-align: center; }
.blog-hero--index .blog-hero__intro { max-inline-size: 640px; margin-inline: auto; }
.blog-hero--index .mkt-title { margin-block-start: 4px; }
.blog-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-block-start: 26px; }
.blog-stats span { padding: 7px 14px; border: 1px solid rgb(255 255 255 / .16); border-radius: 999px; color: #dfe6f6; background: rgb(255 255 255 / .05); font-size: 14px; }
.blog-stats strong { color: #fff; }

.blog-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-block: 0 34px; }
.blog-filters button {
  min-block-size: 42px;
  padding: 8px 18px;
  border: 1px solid var(--pp-color-border);
  border-radius: 999px;
  color: #34415e;
  background: var(--pp-color-surface);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: color .15s ease, background-color .15s ease, border-color .15s ease;
}
.blog-filters button:hover { border-color: var(--pp-color-brand-500); color: var(--pp-color-brand-700); }
.blog-filters button[aria-pressed="true"] { border-color: var(--pp-night-bg); color: #fff; background: var(--pp-night-bg); }
.blog-filters__count { margin-inline-start: 4px; opacity: .6; font-weight: 500; }

.blog-index .featured-article { margin-block-end: 28px; border-radius: 32px; box-shadow: 0 24px 60px rgb(16 37 91 / .14); }
.blog-index .article-card { border-radius: 24px; }
.blog-index .article-card__body .article-kicker,
.blog-index .featured-article__body .article-kicker {
  align-self: start;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--pp-color-brand-50);
  color: var(--pp-color-brand-700);
}
.blog-index .article-card__body .article-kicker::before,
.blog-index .featured-article__body .article-kicker::before { background: var(--pp-color-brand-600); }
.blog-index .article-card .article-meta span:first-child { color: var(--pp-color-brand-700); font-weight: 700; }
.blog-index .article-card[hidden] { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1023px) {
  .blog-hero__layout { grid-template-columns: 1fr; }
  .blog-hero__media { inline-size: min(100%, 560px); }
  .blog-shell { grid-template-columns: 1fr; }
  .blog-aside { display: none; }
  .blog-toc-mobile { display: block; margin-block-end: 26px; }
  .blog-toc-mobile > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border: 1px solid var(--pp-color-border);
    border-radius: var(--pp-radius-lg);
    background: var(--pp-color-surface-tint);
    font-weight: 700;
    list-style: none;
    cursor: pointer;
  }
  .blog-toc-mobile > summary::-webkit-details-marker { display: none; }
  .blog-toc-mobile > summary::after { content: "▾"; color: var(--pp-color-brand-600); }
  .blog-toc-mobile[open] > summary { border-end-start-radius: 0; border-end-end-radius: 0; }
  .blog-toc-mobile .blog-toc { border-block-start: 0; border-start-start-radius: 0; border-start-end-radius: 0; }
  .blog-toc-mobile .blog-toc__title { display: none; }
}

@media (max-width: 767px) {
  .blog-hero { padding-block-start: 32px; }
  .blog-hero__actions .btn { flex: 1 1 100%; }
  .blog-hero__media::before { inset: 12px -10px -12px 10px; }
  .blog-sheet { border-radius: 28px 28px 0 0; }
  .blog-shell .article-content > .mkt-card { padding: 22px 20px; }
  .blog-shell .article-content .tip:first-child { padding: 22px 20px; }
  .blog-midcta { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .blog-midcta .btn { inline-size: 100%; }
  .blog-filters { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; padding-block-end: 4px; scrollbar-width: none; }
  .blog-filters button { flex: none; }
}

@media (prefers-reduced-motion: reduce) {
  .blog-hero__media img { transform: none; }
}

/* ---------- scroll motion (12.2026) ----------
 * Everything below only runs when JS added .blog-motion to <html> and the
 * visitor has not asked for reduced motion. */
.blog-progress { position: fixed; inset-block-start: 0; inset-inline: 0; z-index: 1001; block-size: 3px; background: linear-gradient(90deg, var(--pp-color-cyan-500), var(--pp-color-brand-600)); transform: scaleX(0); transform-origin: right; pointer-events: none; }

.blog-motion .blog-hero__layout > div:first-child > *,
.blog-motion .blog-hero--index .mkt-container > * { opacity: 0; transform: translateY(22px); animation: blog-rise .7s cubic-bezier(.2,.7,.2,1) forwards; }
.blog-motion .blog-hero__layout > div:first-child > :nth-child(2),
.blog-motion .blog-hero--index .mkt-container > :nth-child(2) { animation-delay: .08s; }
.blog-motion .blog-hero__layout > div:first-child > :nth-child(3),
.blog-motion .blog-hero--index .mkt-container > :nth-child(3) { animation-delay: .16s; }
.blog-motion .blog-hero__layout > div:first-child > :nth-child(4),
.blog-motion .blog-hero--index .mkt-container > :nth-child(4) { animation-delay: .24s; }
.blog-motion .blog-hero__layout > div:first-child > :nth-child(5) { animation-delay: .32s; }
.blog-motion .blog-hero__layout > div:first-child > :nth-child(n+6) { animation-delay: .4s; }
.blog-motion .blog-hero__media { opacity: 0; animation: blog-float-in .9s .2s cubic-bezier(.2,.7,.2,1) forwards; }
.blog-hero__media { --blog-parallax: 0px; }
.blog-hero__media img { translate: 0 var(--blog-parallax); }
@keyframes blog-rise { to { opacity: 1; transform: none; } }
@keyframes blog-float-in { from { opacity: 0; transform: translateX(-40px) scale(.96); } to { opacity: 1; transform: none; } }

.blog-motion .blog-anim { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); transition-delay: var(--blog-delay, 0s); }
.blog-motion .blog-anim.is-in { opacity: 1; transform: none; }
.blog-motion .article-content h2.blog-anim::after { content: ""; display: block; inline-size: 0; block-size: 3px; margin-block-start: 10px; border-radius: 3px; background: linear-gradient(90deg, var(--pp-color-cyan-500), var(--pp-color-brand-600)); transition: inline-size .8s .25s cubic-bezier(.2,.7,.2,1); }
.blog-motion .article-content h2.blog-anim.is-in::after { inline-size: 56px; }
.blog-motion .blog-midcta.blog-anim { transform: translateY(26px) scale(.97); }
.blog-motion .blog-midcta.blog-anim.is-in { transform: none; }
.blog-midcta__icon { animation: blog-pulse 2.6s ease-in-out infinite; }
@keyframes blog-pulse { 50% { box-shadow: 0 0 0 10px rgb(11 91 255 / .12); } }

@media (prefers-reduced-motion: reduce) {
  .blog-progress { display: none; }
  .blog-midcta__icon { animation: none; }
  .blog-hero__media img { translate: none; }
}

/* the accessibility menu's "stop animations" (html.pp-a11y-nomo) can be switched on after
 * the page loaded: show everything at once, so nothing stays hidden at opacity 0 */
html.pp-a11y-nomo .blog-hero__layout > div:first-child > *,
html.pp-a11y-nomo .blog-hero--index .mkt-container > *,
html.pp-a11y-nomo .blog-hero__media,
html.pp-a11y-nomo .blog-anim { opacity: 1 !important; transform: none !important; animation: none !important; transition: none !important; }
html.pp-a11y-nomo .blog-hero__media img { translate: none; }
html.pp-a11y-nomo .blog-midcta__icon { animation: none; }
html.pp-a11y-nomo .blog-progress { display: none; }
