/* =========================================================
   ד"ר חסן בדראן — בלוג (מותאם מ-calcium-revive) (אינדקס + פוסט). נטען רק בעמודי הבלוג.
   משתמש בטוקנים של styles.css/brand-v2.css, כך שמצב כהה עובד אוטומטית.
   ========================================================= */

/* ---------- אינדקס: כותרת וסינון ---------- */
.blog-hero {
  text-align: center;
}
.blog-hero h1::after {
  margin-inline: auto;
}
.blog-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 30px;
}
.blog-chip {
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.blog-chip span {
  font-size: 12px;
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--text-muted);
}
.blog-chip:hover {
  border-color: var(--brand-blue);
  color: var(--brand-navy);
}
.blog-chip.is-active {
  background: var(--brand-navy);
  border-color: var(--brand-navy);
  color: #fff;
}
[data-theme='dark'] .blog-chip.is-active {
  color: #0c2029;
}
.blog-chip.is-active span {
  background: rgba(255, 255, 255, 0.22);
  color: inherit;
}
.blog-chip:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* ---------- עטיפות (covers) ---------- */
.post-cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--cover-bg);
  isolation: isolate;
}
.post-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}
.post-cover.t-smart { --cover-bg: linear-gradient(135deg, #0b202a 0%, #173f4f 55%, #4f7f8c 100%); }
.post-cover.t-treatments { --cover-bg: linear-gradient(135deg, #315f70 0%, #6f98a3 55%, #d6e4e5 100%); }
.post-cover.t-style { --cover-bg: linear-gradient(135deg, #7a5c3c 0%, #a88358 50%, #e8d6bd 100%); }
.post-cover.t-knowledge { --cover-bg: linear-gradient(135deg, #4e5b58 0%, #8e9b94 55%, #e4e6df 100%); }

.post-cover__orb {
  position: absolute;
  width: 62%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.06) 62%, transparent 70%);
  inset-inline-end: -14%;
  top: -30%;
  transition: transform 0.8s var(--ease-glide, ease);
}
.post-cover__orb--2 {
  width: 34%;
  inset-inline-end: auto;
  inset-inline-start: 8%;
  top: auto;
  bottom: -18%;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.28), transparent 68%);
}
.post-cover.p1 .post-cover__orb { inset-inline-end: auto; inset-inline-start: -16%; top: -38%; }
.post-cover.p1 .post-cover__orb--2 { inset-inline-start: auto; inset-inline-end: 12%; bottom: -10%; }
.post-cover.p2 .post-cover__orb { top: 22%; width: 78%; inset-inline-end: -36%; }
.post-cover.p2 .post-cover__orb--2 { bottom: auto; top: -12%; inset-inline-start: 18%; }
.post-cover.p3 .post-cover__orb { width: 48%; top: -12%; inset-inline-end: 22%; }
.post-cover.p3 .post-cover__orb--2 { width: 52%; bottom: -36%; inset-inline-start: -10%; }

.post-cover__word {
  position: absolute;
  inset-inline-start: 22px;
  bottom: 16px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 2px 18px rgba(14, 36, 54, 0.25);
}
.post-cover::after {
  /* גרעון עדין שמונע מראה "שטוח" של שיפוע */
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1.2px);
  background-size: 14px 14px;
  mask-image: linear-gradient(to bottom, transparent, #000 70%);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 70%);
  opacity: 0.6;
  pointer-events: none;
}

/* ---------- כרטיסי מאמר ---------- */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.post-card {
  margin: 0;
}
.post-card[hidden] {
  display: none;
}
.post-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  color: inherit;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.post-card__link:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
  border-color: var(--border-strong);
}
.post-card__link:hover .post-cover__orb {
  transform: scale(1.12);
}
.post-card__link:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring), var(--shadow-lift);
}
.post-card__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  padding: 20px 22px 22px;
}
.post-card__title {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
  text-wrap: balance;
}
.post-card__link:hover .post-card__title {
  color: var(--brand-navy);
}
.post-card__excerpt {
  margin: 0;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card__more {
  margin-top: auto;
  padding-top: 6px;
  font-weight: 700;
  font-size: 14.5px;
  color: var(--brand-navy);
}
.post-card__more span {
  display: inline-block;
  transition: transform 0.2s ease;
}
.post-card__link:hover .post-card__more span {
  transform: translateX(-4px);
}
html[dir='ltr'] .post-card__link:hover .post-card__more span {
  transform: translateX(4px);
}

/* מאמר מוביל */
.post-card--featured {
  margin-bottom: 26px;
}
.post-card--featured .post-card__link {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
}
.post-card--featured .post-cover {
  aspect-ratio: auto;
  min-height: 320px;
}
.post-card--featured .post-cover__word {
  font-size: clamp(30px, 4vw, 44px);
  inset-inline-start: 30px;
  bottom: 26px;
}
.post-card--featured .post-card__body {
  justify-content: center;
  gap: 14px;
  padding: clamp(24px, 4vw, 44px);
}
.post-card--featured .post-card__title {
  font-size: clamp(24px, 2.6vw, 32px);
}
.post-card--featured .post-card__excerpt {
  font-size: 16.5px;
  -webkit-line-clamp: 4;
}
.post-badge {
  align-self: flex-start;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--brand-gradient-soft);
  color: var(--brand-navy);
  border: 1px solid var(--border-subtle);
}

/* שורת מטא */
.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  font-size: 13.5px;
  color: var(--text-muted);
}
.post-meta > * + *::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-inline-end: 14px;
  border-radius: 50%;
  background: var(--border-strong);
  vertical-align: middle;
}
.post-meta__topic {
  font-weight: 700;
  color: var(--brand-blue);
}

/* ---------- עמוד פוסט ---------- */
.read-progress {
  position: fixed;
  top: 0;
  inset-inline: 0;
  height: 3px;
  z-index: 60;
  pointer-events: none;
}
.read-progress span {
  display: block;
  height: 100%;
  background: var(--brand-gradient);
  transform: scaleX(0);
  transform-origin: 100% 50%;
}
html[dir='ltr'] .read-progress span {
  transform-origin: 0 50%;
}

.post-hero {
  max-width: 820px;
  margin: 0 auto 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.post-hero h1 {
  margin: 0;
  font-size: clamp(30px, 4.4vw, 48px);
  text-wrap: balance;
}
.post-hero .lead {
  margin: 0;
  max-width: 680px;
  font-size: 18px;
  line-height: 1.75;
  color: var(--text-secondary);
  text-wrap: pretty;
}
.post-hero .post-meta {
  justify-content: center;
}
.post-back {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
}
.post-back:hover {
  color: var(--brand-navy);
}
.post-hero > .post-meta__topic {
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--brand-gradient-soft);
  border: 1px solid var(--border-subtle);
}

.post-cover--hero {
  max-width: 1040px;
  margin: 0 auto 40px;
  aspect-ratio: auto;
  height: clamp(150px, 22vw, 250px);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}
.post-cover--hero .post-cover__word {
  font-size: clamp(28px, 4.5vw, 48px);
  inset-inline-start: clamp(22px, 4vw, 44px);
  bottom: clamp(16px, 3vw, 30px);
}

.post-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 720px);
  justify-content: center;
  gap: 48px;
  align-items: start;
}
.post-toc {
  position: sticky;
  top: 110px;
}
.post-toc details {
  border-inline-start: 2px solid var(--border-subtle);
  padding-inline-start: 16px;
}
.post-toc summary {
  list-style: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.post-toc summary::-webkit-details-marker {
  display: none;
}
.post-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}
.post-toc a {
  display: block;
  padding: 5px 0;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}
.post-toc a:hover,
.post-toc a.is-current {
  color: var(--brand-navy);
}
.post-toc a.is-current {
  font-weight: 700;
}

/* טיפוגרפיית גוף */
.post-body {
  max-width: 720px;
  margin: 0;
  font-size: 17.5px;
}
.post-body > p:first-child {
  font-size: 19px;
  line-height: 1.85;
  color: var(--text-primary);
}
.post-body p,
.post-body li {
  color: var(--text-secondary);
  line-height: 1.95;
  font-size: inherit;
}
.post-body p {
  margin: 0 0 1.15em;
}
.post-body h2 {
  position: relative;
  margin: 2.2em 0 0.7em;
  padding-top: 1.1em;
  font-size: clamp(1.35rem, 2.4vw, 1.65rem);
  line-height: 1.3;
  scroll-margin-top: 110px;
  border-top: 1px solid var(--border-subtle);
}
.post-body h2::before {
  content: '';
  position: absolute;
  top: -2px;
  inset-inline-start: 0;
  width: 48px;
  height: 3px;
  border-radius: 999px;
  background: var(--brand-gradient);
}
.post-body h3 {
  margin: 1.7em 0 0.5em;
  font-size: 1.2rem;
  color: var(--brand-navy);
}
.post-body strong {
  color: var(--text-primary);
  font-weight: 700;
}
.post-body a {
  color: var(--brand-navy);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--brand-sky);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
.post-body a:hover {
  text-decoration-color: var(--brand-navy);
}
.post-body ul {
  list-style: none;
  margin: 0 0 1.3em;
  padding: 0;
}
.post-body ul li {
  position: relative;
  padding-inline-start: 28px;
  margin-bottom: 0.45em;
}
.post-body ul li::before {
  content: '';
  position: absolute;
  inset-inline-start: 6px;
  top: 0.8em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-gradient);
}
.post-body blockquote {
  margin: 1.8em 0;
  padding: 22px 26px;
  border-radius: var(--radius-md);
  background: var(--brand-gradient-soft);
  border-inline-start: 4px solid var(--brand-blue);
}
.post-body blockquote p {
  margin: 0;
  font-size: 1.08em;
  color: var(--text-primary);
}

/* CTA */
.post-cta {
  max-width: 1040px;
  margin: 56px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(26px, 4vw, 40px);
  border-radius: var(--radius-xl);
  background: var(--brand-gradient-deep);
  color: #fff;
  box-shadow: var(--shadow-glow-accent);
  position: relative;
  overflow: hidden;
}
.post-cta::before {
  content: '';
  position: absolute;
  width: 320px;
  aspect-ratio: 1;
  border-radius: 50%;
  inset-inline-end: -90px;
  top: -160px;
  background: radial-gradient(circle, rgba(159, 216, 242, 0.35), transparent 65%);
}
.post-cta > * {
  position: relative;
}
.post-cta h2 {
  margin: 0 0 6px;
  color: #fff;
  font-size: clamp(1.3rem, 2.4vw, 1.6rem);
}
.post-cta p {
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
  max-width: 560px;
}

/* מאמרים קשורים */
.post-related {
  max-width: 1040px;
  margin: 56px auto 0;
}
.post-related__title {
  font-size: clamp(1.3rem, 2.4vw, 1.6rem);
  margin: 0 0 20px;
}
.post-related .post-card__title {
  font-size: 17px;
}
.blog-post .section-actions {
  margin-top: 36px;
  justify-content: center;
  display: flex;
}

/* ---------- רספונסיביות ---------- */
@media (max-width: 1023px) {
  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .post-layout {
    grid-template-columns: minmax(0, 720px);
    gap: 0;
  }
  .post-toc {
    position: static;
    margin-bottom: 26px;
  }
  .post-toc details {
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background: var(--surface-card);
    padding: 14px 18px;
  }
  .post-toc summary {
    margin: 0;
    display: flex;
    justify-content: space-between;
  }
  .post-toc summary::after {
    content: '+';
    font-size: 18px;
    line-height: 1;
  }
  .post-toc details[open] summary {
    margin-bottom: 10px;
  }
  .post-toc details[open] summary::after {
    content: '−';
  }
}
@media (max-width: 760px) {
  .post-card--featured .post-card__link {
    grid-template-columns: 1fr;
  }
  .post-card--featured .post-cover {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }
  .post-cta {
    flex-direction: column;
    align-items: flex-start;
  }
  .post-cta .btn {
    white-space: normal;
  }
}
@media (max-width: 600px) {
  .post-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .blog-filters {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    margin-inline: -16px;
    padding: 2px 16px 6px;
    scrollbar-width: none;
  }
  .blog-filters::-webkit-scrollbar {
    display: none;
  }
  .blog-chip {
    flex: none;
  }
  .post-body {
    font-size: 16.5px;
  }
  .post-body > p:first-child {
    font-size: 17.5px;
  }
  .post-hero .lead {
    font-size: 16.5px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .post-card__link,
  .post-cover__orb,
  .post-card__more span {
    transition: none;
  }
  .post-card__link:hover {
    transform: none;
  }
}

/* ---------- התאמות למותג (brand-v2: כותרות ענק גלובליות, זהב כאקסנט) ---------- */
.blog-hero {
  max-width: 820px;
  margin-inline: auto;
}
.blog-hero h1 {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
}
.post-meta__topic,
.post-badge {
  color: var(--brand-gold);
}
.post-body h2::before,
.read-progress span,
.post-body ul li::before {
  background: linear-gradient(90deg, var(--brand-gold), var(--brand-gold-soft));
}
.post-body blockquote {
  border-inline-start-color: var(--brand-gold);
}
.post-body a {
  text-decoration-color: var(--brand-gold-soft);
}
.post-cta__btn {
  background: #fbfaf7;
  color: #102b38;
  border-radius: 999px;
}
.post-cta__btn:hover,
.post-cta__btn:focus-visible {
  background: #fff;
  color: #102b38;
}
.post-cta::before {
  background: radial-gradient(circle, rgba(216, 194, 164, 0.32), transparent 65%);
}

/* ---- declutter 2026-11-11 (kb/rules/site-design.md): no circles, pills or rings around controls/images ---- */
:root { --shape: 18px 5px 18px 18px; --shape-sm: 12px 3px 12px 12px; }
.blog-chip,
.blog-chip span,
.post-cover__orb,
.post-badge,
.post-hero > .post-meta__topic,
.post-body h2::before,
.post-cta::before,
.post-cta__btn { border-radius: var(--shape) !important; }
.post-meta > * + *::before,
.post-body ul li::before { border-radius: 2px !important; }
.post-card__more > span[aria-hidden], .post-back > span[aria-hidden] { display: inline-block; width: 16px; height: 1px; background: currentColor; vertical-align: middle; transition: width .35s ease; }
.post-card:hover .post-card__more > span[aria-hidden], .post-back:hover > span[aria-hidden] { width: 30px; }

