/* ==========================================================================
   Base2 – Light Tech design system (RTL-first, logical properties)
   ========================================================================== */

:root {
  --b2-navy: #0F172A;
  --b2-indigo: #1E293B;
  --b2-cyan: #06B6D4;
  --b2-sky: #0EA5E9;
  --b2-slate: #334155;
  --b2-muted: #64748B;
  --b2-light: #F1F5F9;
  --b2-lighter: #F8FAFC;
  --b2-border: #E2E8F0;
  --b2-radius: 16px;
  --b2-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
  --b2-shadow-lg: 0 2px 4px rgba(15, 23, 42, .05), 0 18px 40px rgba(15, 23, 42, .12);
  --b2-gutter: max(24px, calc((100% - 1200px) / 2));
  --b2-header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--b2-header-h) + 16px); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: Heebo, "Segoe UI", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--b2-slate);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { max-width: 100%; height: auto; }
a { color: #0369A1; text-underline-offset: 3px; }
a:hover { color: var(--b2-sky); }
h1, h2, h3, h4 { color: var(--b2-navy); line-height: 1.25; font-weight: 800; margin: 0 0 .5em; }
p { margin: 0 0 1em; }

:focus-visible { outline: 3px solid var(--b2-sky); outline-offset: 2px; border-radius: 4px; }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.b2-skip { position: absolute; inset-inline-start: 12px; top: -60px; background: var(--b2-navy); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 10000; }
.b2-skip:focus { top: 12px; color: #fff; }

.b2-container { max-width: 1200px; margin-inline: auto; padding-inline: 24px; }

/* ---------- Buttons ---------- */
.b2-btn,
.wp-block-button.b2-btn-primary .wp-block-button__link,
.wp-block-button.b2-btn-outline .wp-block-button__link,
.wp-block-button.b2-btn-whatsapp .wp-block-button__link,
.wp-block-button.b2-btn-light .wp-block-button__link {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-size: 1rem; font-weight: 700; line-height: 1.2;
  padding: 14px 26px; border-radius: 12px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease;
}
.b2-btn:hover, .wp-block-button .wp-block-button__link:hover { transform: translateY(-2px); }

.b2-btn-primary,
.wp-block-button.b2-btn-primary .wp-block-button__link {
  background: var(--b2-cyan); color: var(--b2-navy); box-shadow: 0 6px 18px rgba(6, 182, 212, .35);
}
.b2-btn-primary:hover,
.wp-block-button.b2-btn-primary .wp-block-button__link:hover { background: #22D3EE; color: var(--b2-navy); box-shadow: 0 10px 24px rgba(6, 182, 212, .45); }

.b2-btn-outline,
.wp-block-button.b2-btn-outline .wp-block-button__link {
  background: transparent; color: var(--b2-navy); border-color: var(--b2-navy);
}
.b2-btn-outline:hover,
.wp-block-button.b2-btn-outline .wp-block-button__link:hover { background: var(--b2-navy); color: #fff; }

.wp-block-button.b2-btn-whatsapp .wp-block-button__link { background: #128C4A; color: #fff; }
.wp-block-button.b2-btn-whatsapp .wp-block-button__link:hover { background: #0E7A40; color: #fff; }

.wp-block-button.b2-btn-light .wp-block-button__link { background: #fff; color: var(--b2-navy); }
.b2-dark .wp-block-button.b2-btn-outline .wp-block-button__link,
.b2-cta .wp-block-button.b2-btn-outline .wp-block-button__link { color: #fff; border-color: rgba(255, 255, 255, .6); }
.b2-dark .wp-block-button.b2-btn-outline .wp-block-button__link:hover,
.b2-cta .wp-block-button.b2-btn-outline .wp-block-button__link:hover { background: #fff; color: var(--b2-navy); }

.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 0; }
.wp-block-button { margin: 0; }

/* ---------- Header ---------- */
.b2-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255, 255, 255, .88); backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--b2-border);
  transition: box-shadow .2s ease;
}
.b2-header.is-scrolled { box-shadow: 0 6px 24px rgba(15, 23, 42, .08); }
.admin-bar .b2-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .b2-header { top: 46px; } }

.b2-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: var(--b2-header-h); }

.b2-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--b2-navy); }
.b2-logo:hover { color: var(--b2-navy); }
.b2-logo-icon { display: block; flex: none; }
.b2-logo-text { font-size: 1.65rem; font-weight: 800; letter-spacing: -.5px; line-height: 1; }
.b2-logo-text span { color: var(--b2-cyan); }

.b2-nav { display: flex; align-items: center; gap: 20px; }
.b2-menu { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.b2-menu a {
  display: block; position: relative; padding: 8px 12px; border-radius: 8px;
  color: var(--b2-slate); font-weight: 500; font-size: .98rem; text-decoration: none; white-space: nowrap;
}
.b2-menu a:hover { background: var(--b2-light); color: var(--b2-navy); }
.b2-menu .is-current > a { color: var(--b2-navy); font-weight: 700; }
.b2-menu .is-current > a::after {
  content: ""; position: absolute; inset-inline: 12px; bottom: 2px; height: 3px; border-radius: 3px; background: var(--b2-cyan);
}
.b2-header-cta { padding: 11px 20px; font-size: .95rem; white-space: nowrap; }

.b2-nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--b2-border); border-radius: 10px; background: #fff; cursor: pointer; padding: 0; position: relative; }
.b2-nav-toggle-bars, .b2-nav-toggle-bars::before, .b2-nav-toggle-bars::after {
  content: ""; position: absolute; inset-inline-start: 11px; width: 20px; height: 2px; background: var(--b2-navy); border-radius: 2px; transition: transform .2s ease, opacity .2s ease;
}
.b2-nav-toggle-bars { top: 21px; }
.b2-nav-toggle-bars::before { top: -7px; inset-inline-start: 0; }
.b2-nav-toggle-bars::after { top: 7px; inset-inline-start: 0; }
.b2-nav-toggle[aria-expanded="true"] .b2-nav-toggle-bars { background: transparent; }
.b2-nav-toggle[aria-expanded="true"] .b2-nav-toggle-bars::before { transform: translateY(7px) rotate(45deg); }
.b2-nav-toggle[aria-expanded="true"] .b2-nav-toggle-bars::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1100px) {
  .b2-nav-toggle { display: block; }
  .b2-nav {
    display: none; position: absolute; inset-inline: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 12px;
    background: #fff; padding: 16px 24px 24px; border-bottom: 1px solid var(--b2-border); box-shadow: 0 18px 30px rgba(15, 23, 42, .1);
  }
  .b2-nav.is-open { display: flex; }
  .b2-menu { flex-direction: column; align-items: stretch; }
  .b2-menu a { padding: 12px; }
  .b2-menu .is-current > a::after { display: none; }
  .b2-menu .is-current > a { background: var(--b2-light); }
}

/* ---------- Page structure ---------- */
.b2-main { min-height: 60vh; }
.b2-page-header { padding-block: 56px 16px; }
.b2-page-header h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.b2-page-header time { color: var(--b2-muted); font-size: .9rem; }

/* תוכן רגיל (פוסטים/עמודים חדשים שנוצרו ע"י הלקוח) */
.entry-content > :not(.b2-section) { max-width: 820px; margin-inline: auto; padding-inline: 24px; }
.entry-content > .alignwide { max-width: 1200px; }
.entry-content > :last-child:not(.b2-section) { margin-bottom: 64px; }
.entry-content > .b2-section:last-child { margin-bottom: 0; }
.b2-single-thumb img { border-radius: var(--b2-radius); width: 100%; }
.b2-cta-inline { text-align: center; padding-block: 0 72px; }

/* ---------- Sections (blocks) ---------- */
.entry-content .b2-section { padding: 80px var(--b2-gutter); position: relative; }
.entry-content .b2-section > * { margin-block: 0; max-width: none; margin-inline: 0; padding-inline: 0; }
.entry-content .b2-section > * + * { margin-block-start: 16px; }
.entry-content .b2-section h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
.entry-content .b2-section > h2 { margin-block-end: 8px; }
.b2-alt { background: var(--b2-lighter); border-block: 1px solid var(--b2-border); }

.b2-eyebrow {
  display: inline-block; font-size: .85rem; font-weight: 700; letter-spacing: .02em;
  color: #0E7490; background: rgba(6, 182, 212, .12); padding: 6px 14px; border-radius: 999px; margin-bottom: 12px !important;
}
.entry-content .b2-section > .b2-lead { font-size: 1.15rem; color: var(--b2-muted); max-width: 720px; margin-block-end: 8px; }
.b2-section-head { margin-bottom: 40px; }

/* ---------- Hero ---------- */
.entry-content .b2-hero {
  padding-block: 96px 88px; overflow: hidden;
  background:
    radial-gradient(900px 420px at 8% 0%, rgba(14, 165, 233, .14), transparent 60%),
    radial-gradient(700px 420px at 100% 100%, rgba(6, 182, 212, .12), transparent 60%),
    var(--b2-lighter);
  border-bottom: 1px solid var(--b2-border);
}
.b2-hero::after {
  content: ""; position: absolute; inset-block: 0; inset-inline-end: 0; width: 46%; pointer-events: none;
  background-image: radial-gradient(rgba(14, 165, 233, .45) 1.3px, transparent 1.3px); background-size: 24px 24px;
  -webkit-mask-image: linear-gradient(to right, #000, transparent 85%); mask-image: linear-gradient(to right, #000, transparent 85%);
}
.entry-content .b2-hero > * { position: relative; z-index: 1; }
.b2-hero::before {
  content: ""; position: absolute; z-index: 0; pointer-events: none;
  inset-inline-end: max(40px, calc((100% - 1200px) / 2)); top: 50%; width: 360px; height: 360px; transform: translateY(-50%);
  background: linear-gradient(135deg, var(--b2-cyan), var(--b2-sky)); opacity: .22;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z'/%3E%3Cpath d='M9.5 13.5l2 2 3.5-4'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z'/%3E%3Cpath d='M9.5 13.5l2 2 3.5-4'/%3E%3C/svg%3E") center / contain no-repeat;
}
@media (max-width: 1000px) { .b2-hero::before { display: none; } }
.entry-content .b2-hero h1 { font-size: clamp(2.2rem, 5.2vw, 3.7rem); font-weight: 800; letter-spacing: -.01em; max-width: 820px; margin-block-end: 20px; }
.entry-content .b2-hero h1 em { font-style: normal; background: linear-gradient(90deg, #0891B2, #0EA5E9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.entry-content .b2-hero > p:not(.b2-eyebrow) { font-size: 1.2rem; max-width: 680px; color: var(--b2-slate); }
.b2-hero-sm { padding-block: 72px 64px !important; }

.b2-chips { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0 !important; margin-top: 28px !important; }
.b2-chips li { background: #fff; border: 1px solid var(--b2-border); border-radius: 999px; padding: 6px 16px; font-size: .92rem; font-weight: 600; color: var(--b2-slate); box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.b2-chips li::before { content: "✓"; color: var(--b2-cyan); font-weight: 800; margin-inline-end: 8px; }

/* ---------- Grids & cards ---------- */
.entry-content .wp-block-columns.b2-grid { display: grid; gap: 24px; margin: 0; }
.wp-block-columns.b2-grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.wp-block-columns.b2-grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.wp-block-columns.b2-grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); }
.b2-grid > .wp-block-column { flex: none; min-width: 0; }

.b2-card {
  background: #fff; border: 1px solid var(--b2-border); border-radius: var(--b2-radius);
  padding: 28px; box-shadow: var(--b2-shadow); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.b2-card:hover { transform: translateY(-4px); box-shadow: var(--b2-shadow-lg); border-color: rgba(6, 182, 212, .5); }
.b2-card h3 { font-size: 1.28rem; margin-bottom: 8px; }
.b2-card p { color: var(--b2-muted); margin-bottom: .8em; }
.b2-card > :last-child { margin-bottom: 0; }

[class*="b2-icon-"]::before {
  content: ""; display: block; width: 46px; height: 46px; margin-bottom: 16px;
  background: linear-gradient(135deg, var(--b2-cyan), var(--b2-sky));
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
}

.b2-card-link { font-weight: 700; margin-top: 12px !important; }
.b2-card-link a { text-decoration: none; }
.b2-card-link a:hover { text-decoration: underline; }

.b2-list-check { list-style: none; padding: 0 !important; margin: 12px 0 0 !important; }
.b2-list-check li { position: relative; padding-inline-start: 28px; margin-bottom: 8px; color: var(--b2-slate); }
.b2-list-check li::before { content: "✓"; position: absolute; inset-inline-start: 0; top: 0; color: var(--b2-cyan); font-weight: 800; }

/* שלבים ממוספרים */
.b2-steps { counter-reset: b2step; }
.b2-step::before {
  counter-increment: b2step; content: counter(b2step);
  display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-bottom: 16px;
  border-radius: 12px; background: var(--b2-navy); color: var(--b2-cyan); font-weight: 800; font-size: 1.2rem;
}

/* השוואה (גישת MSP) */
.b2-card-muted { background: var(--b2-lighter); box-shadow: none; }
.b2-card-accent { border-color: rgba(6, 182, 212, .6); background: linear-gradient(180deg, rgba(6, 182, 212, .06), #fff 60%); }

.b2-note { font-size: .92rem; color: var(--b2-muted); border-inline-start: 4px solid var(--b2-cyan); padding: 4px 16px; background: var(--b2-lighter); border-radius: 4px; }

/* ---------- Dark / CTA ---------- */
.entry-content .b2-dark, .entry-content .b2-cta { background: linear-gradient(135deg, var(--b2-navy), var(--b2-indigo)); color: #CBD5E1; }
.b2-dark h2, .b2-dark h3, .b2-cta h2 { color: #fff; }
.b2-dark .b2-lead { color: #94A3B8 !important; }
.b2-dark .b2-card { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .12); box-shadow: none; }
.b2-dark .b2-card p { color: #94A3B8; }
.b2-dark .b2-card:hover { border-color: var(--b2-cyan); }
.b2-dark .b2-eyebrow, .b2-cta .b2-eyebrow { background: rgba(6, 182, 212, .18); color: #67E8F9; }
.entry-content .b2-cta { text-align: center; padding-block: 72px; overflow: hidden; }
.entry-content .b2-cta > * { max-width: 760px; margin-inline: auto; }
.entry-content .b2-cta .wp-block-buttons { justify-content: center; }
.b2-cta p { color: #CBD5E1; font-size: 1.1rem; }

/* ---------- Lead capture section ---------- */
.entry-content .wp-block-columns.b2-lead-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 48px; align-items: start; margin: 0; }
.b2-lead-grid > .wp-block-column { flex: none; min-width: 0; }
.entry-content .b2-section > .wp-block-columns { margin-block-start: 40px; }
.entry-content .b2-section > .wp-block-buttons { margin-block-start: 28px; }
.b2-form-wrap { background: #fff; border: 1px solid var(--b2-border); border-radius: 20px; padding: 32px; box-shadow: var(--b2-shadow-lg); color: var(--b2-slate); }
.b2-form { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.b2-form-wrap.is-compact .b2-form { grid-template-columns: repeat(3, 1fr); }
.b2-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.b2-field-wide { grid-column: 1 / -1; }
.b2-field label { font-weight: 600; font-size: .95rem; color: var(--b2-navy); }
.b2-field input[type="text"], .b2-field input[type="tel"], .b2-field input[type="email"], .b2-field select, .b2-field textarea {
  width: 100%; font: inherit; color: var(--b2-navy); background: #fff;
  padding: 12px 14px; border: 1px solid #CBD5E1; border-radius: 10px; transition: border-color .15s ease, box-shadow .15s ease;
}
.b2-field textarea { resize: vertical; min-height: 120px; }
.b2-field input:focus, .b2-field select:focus, .b2-field textarea:focus { outline: none; border-color: var(--b2-sky); box-shadow: 0 0 0 4px rgba(14, 165, 233, .18); }
.b2-consent label { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; font-size: .9rem; color: var(--b2-muted); }
.b2-consent input { margin-top: 5px; width: 18px; height: 18px; flex: none; accent-color: var(--b2-sky); }
.b2-form button[type="submit"] { width: 100%; font-size: 1.05rem; }
.b2-hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); opacity: 0; }

.b2-form-notice { padding: 14px 18px; border-radius: 10px; margin-bottom: 20px; font-weight: 600; }
.b2-form-notice.is-success { background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }
.b2-form-notice.is-error { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }

.b2-contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.b2-contact-list li { background: #fff; border: 1px solid var(--b2-border); border-radius: 14px; padding: 16px 20px; display: flex; flex-direction: column; box-shadow: var(--b2-shadow); }
.b2-contact-list span { font-size: .85rem; color: var(--b2-muted); font-weight: 600; }
.b2-contact-list a { font-size: 1.15rem; font-weight: 700; text-decoration: none; }

@media (max-width: 900px) {
  .entry-content .wp-block-columns.b2-lead-grid { grid-template-columns: 1fr; gap: 28px; }
  .b2-form-wrap.is-compact .b2-form { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .b2-form { grid-template-columns: 1fr; }
  .b2-form-wrap { padding: 22px; }
  .entry-content .b2-section { padding-block: 56px; }
  .entry-content .b2-hero { padding-block: 64px 56px; }
}

/* ---------- Blog ---------- */
.b2-posts { padding-block: 24px 80px; }
.b2-post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 24px; }
.b2-post-card { background: #fff; border: 1px solid var(--b2-border); border-radius: var(--b2-radius); overflow: hidden; box-shadow: var(--b2-shadow); display: flex; flex-direction: column; }
.b2-post-thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.b2-post-body { padding: 22px; }
.b2-post-body time { color: var(--b2-muted); font-size: .85rem; }
.b2-post-body h2 { font-size: 1.25rem; margin: 6px 0 10px; }
.b2-post-body h2 a { color: var(--b2-navy); text-decoration: none; }
.b2-more { font-weight: 700; text-decoration: none; }
.b2-pagination { margin-top: 40px; text-align: center; }
.b2-pagination .page-numbers { display: inline-block; padding: 8px 14px; border: 1px solid var(--b2-border); border-radius: 8px; text-decoration: none; margin: 0 2px; }
.b2-pagination .current { background: var(--b2-navy); color: #fff; border-color: var(--b2-navy); }
.b2-404 { text-align: center; padding-block: 96px; }

/* ---------- Footer ---------- */
.b2-footer { background: var(--b2-navy); color: #CBD5E1; margin-top: 0; }
.b2-footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 48px; padding-block: 64px 40px; }
.b2-footer h2 { color: #fff; font-size: 1.05rem; margin-bottom: 16px; }
.b2-footer a { color: #CBD5E1; text-decoration: none; }
.b2-footer a:hover { color: var(--b2-cyan); }
.b2-footer .b2-logo, .b2-footer .b2-logo-text { color: #fff; }
.b2-footer-brand p { margin-top: 16px; max-width: 360px; color: #94A3B8; }
.b2-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.b2-footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding-block: 20px; font-size: .9rem; color: #94A3B8; }
.b2-footer-bottom .b2-container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
@media (max-width: 800px) { .b2-footer-grid { grid-template-columns: 1fr; gap: 32px; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
