/* ==========================================================================
   שקוף+ — מערכת עיצוב
   ירוק, כרטיסים רכים, RTL. תואם לשפת העיצוב של האפליקציה.
   ========================================================================== */

:root {
	--green-900: #08422F;
	--green-700: #0B5F45;
	--green:     #0E7C5A;
	--green-400: #4FAE8A;
	--green-200: #A8DCC6;
	--green-50:  #EAF6F1;

	--ink:       #12211C;
	--ink-soft:  #354A42;
	--muted:     #5C6F68;
	--line:      #E2EAE6;
	--bg:        #F7FAF9;
	--surface:   #FFFFFF;

	--amber:     #E8A33D;

	--radius-sm: 10px;
	--radius:    16px;
	--radius-lg: 22px;

	--shadow-sm: 0 1px 2px rgba(8, 66, 47, .06), 0 2px 8px rgba(8, 66, 47, .04);
	--shadow:    0 2px 6px rgba(8, 66, 47, .06), 0 12px 28px rgba(8, 66, 47, .07);
	--shadow-lg: 0 4px 12px rgba(8, 66, 47, .08), 0 24px 48px rgba(8, 66, 47, .10);

	--wrap: 1160px;
	--reading: 720px;

	--header-h: 68px;

	--ease: cubic-bezier(.22, .61, .36, 1);
}

/* --------------------------------------------------------------- איפוס */

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

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

body {
	margin: 0;
	font-family: 'Assistant', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
	font-size: 17px;
	line-height: 1.75;
	color: var(--ink);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

a { color: var(--green-700); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--green); }

:focus-visible {
	outline: 3px solid var(--green-400);
	outline-offset: 3px;
	border-radius: 4px;
}

/* --------------------------------------------------------------- טיפוגרפיה */

h1, h2, h3, h4 {
	font-weight: 800;
	line-height: 1.25;
	color: var(--ink);
	margin: 0 0 .5em;
	letter-spacing: -.015em;
}

h1 { font-size: clamp(1.9rem, 1.35rem + 2.2vw, 2.85rem); }
h2 { font-size: clamp(1.45rem, 1.15rem + 1.3vw, 2rem); }
h3 { font-size: clamp(1.2rem, 1.05rem + .7vw, 1.45rem); }
h4 { font-size: 1.1rem; }

p { margin: 0 0 1.25em; }

.lead {
	font-size: 1.16rem;
	color: var(--ink-soft);
	line-height: 1.7;
}

.eyebrow {
	display: inline-block;
	font-size: .8rem;
	font-weight: 700;
	letter-spacing: .06em;
	color: var(--green);
	background: var(--green-50);
	padding: .3em .85em;
	border-radius: 999px;
	margin-bottom: .9rem;
}

/* --------------------------------------------------------------- פריסה */

.wrap {
	width: min(100% - 40px, var(--wrap));
	margin-inline: auto;
}

.reading {
	width: min(100% - 40px, var(--reading));
	margin-inline: auto;
}

.section { padding-block: clamp(40px, 6vw, 72px); }

/* --------------------------------------------------------------- כפתורים */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .5em;
	font: inherit;
	font-weight: 700;
	font-size: .98rem;
	padding: .68em 1.5em;
	border-radius: 999px;
	border: 1.5px solid transparent;
	cursor: pointer;
	text-decoration: none;
	transition: transform .15s var(--ease), box-shadow .2s var(--ease), background-color .2s;
	white-space: nowrap;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary {
	background: var(--green);
	color: #fff;
	box-shadow: var(--shadow-sm);
}
.btn--primary:hover { background: var(--green-700); color: #fff; box-shadow: var(--shadow); }

.btn--ghost {
	background: transparent;
	color: var(--green-700);
	border-color: var(--line);
}
.btn--ghost:hover { background: var(--green-50); border-color: var(--green-200); color: var(--green-700); }

/* --------------------------------------------------------------- כותרת עליונה */

.site-header {
	position: sticky;
	top: 0;
	z-index: 200;
	background: rgba(255, 255, 255, .92);
	backdrop-filter: saturate(180%) blur(12px);
	-webkit-backdrop-filter: saturate(180%) blur(12px);
	border-bottom: 1px solid var(--line);
}

.site-header__inner {
	display: flex;
	align-items: center;
	gap: 20px;
	height: var(--header-h);
	width: min(100% - 40px, var(--wrap));
	margin-inline: auto;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	font-weight: 800;
	font-size: 1.28rem;
	color: var(--green-700);
	text-decoration: none;
	letter-spacing: -.02em;
	flex: 0 0 auto;
}
.brand:hover { color: var(--green); }
.brand img { max-height: 40px; width: auto; }

.brand__plus {
	color: var(--amber);
	font-size: 1.1em;
	line-height: 1;
}

/* ניווט דסקטופ */

.nav-primary { margin-inline: auto; }

.nav-primary ul {
	list-style: none;
	display: flex;
	align-items: center;
	gap: 4px;
	margin: 0;
	padding: 0;
}

.nav-primary li { position: relative; }

.nav-primary a {
	display: block;
	padding: .5em .9em;
	border-radius: var(--radius-sm);
	font-weight: 600;
	font-size: .98rem;
	color: var(--ink-soft);
	text-decoration: none;
	transition: background-color .18s, color .18s;
}

.nav-primary a:hover,
.nav-primary .current-menu-item > a,
.nav-primary [aria-current="page"] {
	background: var(--green-50);
	color: var(--green-700);
}

/* תת־תפריט (קטגוריות הבלוג) */

.nav-primary .sub-menu {
	position: absolute;
	inset-inline-start: 0;
	top: calc(100% + 8px);
	min-width: 220px;
	flex-direction: column;
	align-items: stretch;
	gap: 2px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 8px;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-6px);
	transition: opacity .18s var(--ease), transform .18s var(--ease), visibility .18s;
}

.nav-primary li:hover > .sub-menu,
.nav-primary li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.nav-primary .menu-item-has-children > a::after {
	content: '';
	display: inline-block;
	width: .42em;
	height: .42em;
	margin-inline-start: .5em;
	/* פיזי בכוונה: border-inline-end מתהפך ב-RTL והחץ מצביע הצידה */
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-2px) rotate(45deg);
}

.header-cta { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }

.hdr-signin {
	color: var(--green-700);
	text-decoration: none;
	font-weight: 700;
	font-size: .93rem;
	padding: .5em .95em;
	border-radius: 999px;
	border: 1.5px solid var(--line);
	transition: all .18s var(--ease);
	white-space: nowrap;
}
.hdr-signin:hover { border-color: var(--green); background: var(--green-50); color: var(--green-700); }

/* --------------------------------------------------------------- המבורגר */

.nav-toggle {
	display: none;
	width: 44px;
	height: 44px;
	margin-inline-start: auto;
	padding: 0;
	background: transparent;
	border: 1px solid var(--line);
	border-radius: 12px;
	cursor: pointer;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
}

.nav-toggle__bars {
	position: relative;
	width: 20px;
	height: 2px;
	background: var(--ink);
	border-radius: 2px;
	transition: background-color .2s;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
	content: '';
	position: absolute;
	inset-inline-start: 0;
	width: 20px;
	height: 2px;
	background: var(--ink);
	border-radius: 2px;
	transition: transform .28s var(--ease);
}

.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after  { top: 6px; }

.nav-open .nav-toggle__bars { background: transparent; }
.nav-open .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle__bars::after  { transform: translateY(-6px) rotate(-45deg); }

/* מגירת מובייל */

.nav-drawer {
	position: fixed;
	inset: var(--header-h) 0 0 0;
	z-index: 190;
	background: var(--surface);
	padding: 24px 20px 40px;
	overflow-y: auto;
	overscroll-behavior: contain;
	transform: translateY(-8px);
	opacity: 0;
	visibility: hidden;
	transition: opacity .24s var(--ease), transform .24s var(--ease), visibility .24s;
}

.nav-open .nav-drawer {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.nav-drawer ul {
	list-style: none;
	margin: 0 0 8px;
	padding: 0;
}

.nav-drawer > ul > li { border-bottom: 1px solid var(--line); }
.nav-drawer > ul > li:last-child { border-bottom: 0; }

.nav-drawer a {
	display: block;
	padding: 15px 4px;
	font-size: 1.12rem;
	font-weight: 700;
	color: var(--ink);
	text-decoration: none;
}
.nav-drawer a:hover,
.nav-drawer [aria-current="page"] { color: var(--green); }

.nav-drawer .sub-menu {
	padding-inline-start: 14px;
	margin-block-end: 10px;
	border-inline-start: 2px solid var(--green-50);
}

.nav-drawer .sub-menu a {
	padding: 9px 4px;
	font-size: 1rem;
	font-weight: 500;
	color: var(--muted);
}

.nav-drawer__cta { margin-top: 24px; display: flex; flex-direction: column; gap: 10px; }
.nav-drawer__cta .btn { width: 100%; }

/* מעבר בין דסקטופ למובייל */

@media (max-width: 900px) {
	.nav-primary,
	.header-cta { display: none; }
	.nav-toggle { display: inline-flex; }
}

@media (min-width: 901px) {
	.nav-drawer { display: none; }
}

body.nav-open { overflow: hidden; }

/* --------------------------------------------------------------- דילוג לתוכן */

.skip-link {
	position: absolute;
	inset-inline-start: -9999px;
	top: 8px;
	z-index: 999;
	background: var(--green);
	color: #fff;
	padding: 10px 18px;
	border-radius: var(--radius-sm);
	font-weight: 700;
	text-decoration: none;
}
.skip-link:focus { inset-inline-start: 20px; color: #fff; }

/* --------------------------------------------------------------- כותרת עמוד */

.page-head {
	background: linear-gradient(180deg, var(--green-50), var(--bg));
	border-bottom: 1px solid var(--line);
	padding-block: clamp(36px, 5vw, 60px);
	text-align: center;
}

.page-head h1 { margin-bottom: .35em; }
.page-head .lead { margin: 0 auto; max-width: 60ch; }

/* פילטר קטגוריות */

.cat-filter {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin-top: 26px;
}

.cat-filter a {
	display: inline-block;
	padding: .42em 1.05em;
	border-radius: 999px;
	background: var(--surface);
	border: 1px solid var(--line);
	color: var(--ink-soft);
	font-size: .93rem;
	font-weight: 600;
	text-decoration: none;
	transition: all .18s var(--ease);
}
.cat-filter a:hover { border-color: var(--green-200); background: var(--green-50); color: var(--green-700); }
.cat-filter a.is-active { background: var(--green); border-color: var(--green); color: #fff; }

/* --------------------------------------------------------------- רשת כרטיסים */

.card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
	gap: 26px;
}

.card {
	display: flex;
	flex-direction: column;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	overflow: hidden;
	box-shadow: var(--shadow-sm);
	transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s;
}

.card:hover {
	transform: translateY(-3px);
	box-shadow: var(--shadow);
	border-color: var(--green-200);
}

.card__media {
	display: block;
	aspect-ratio: 16 / 10;
	background: var(--green-50);
	overflow: hidden;
}

.card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .4s var(--ease);
}
.card:hover .card__media img { transform: scale(1.04); }

.card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 22px 22px 24px;
}

.card__cat {
	font-size: .82rem;
	font-weight: 700;
	color: var(--green);
	text-decoration: none;
	margin-bottom: .5rem;
}
.card__cat:hover { text-decoration: underline; }

.card__title {
	font-size: 1.18rem;
	font-weight: 800;
	line-height: 1.35;
	margin: 0 0 .55rem;
}
.card__title a { color: var(--ink); text-decoration: none; }
.card__title a:hover { color: var(--green-700); }

.card__excerpt {
	color: var(--muted);
	font-size: .97rem;
	line-height: 1.65;
	margin: 0 0 1.1rem;
}

.card__meta {
	margin-top: auto;
	display: flex;
	flex-wrap: wrap;
	gap: 6px 12px;
	align-items: center;
	font-size: .85rem;
	color: var(--muted);
	padding-top: 14px;
	border-top: 1px solid var(--line);
}

.card__meta span { display: inline-flex; align-items: center; gap: .35em; }

/* --------------------------------------------------------------- מאמר בודד */

.article-head {
	padding-block: clamp(32px, 4.5vw, 52px) 0;
	text-align: center;
}

.article-head .article-meta {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px 18px;
	color: var(--muted);
	font-size: .92rem;
	margin-top: 1rem;
}

.article-hero {
	margin: 32px auto 0;
	width: min(100% - 40px, 980px);
	border-radius: var(--radius-lg);
	overflow: hidden;
	box-shadow: var(--shadow);
}

.entry-content {
	font-size: 1.09rem;
	line-height: 1.85;
	color: var(--ink-soft);
	padding-block: 36px;
}

.entry-content > * { margin-inline: auto; }

.entry-content h2 {
	margin-top: 2.2em;
	margin-bottom: .6em;
	padding-inline-start: .55rem;
	border-inline-start: 4px solid var(--green-200);
	color: var(--ink);
}

.entry-content h3 { margin-top: 1.8em; color: var(--ink); }

.entry-content ul,
.entry-content ol { padding-inline-start: 1.4em; margin-block: 0 1.3em; }
.entry-content li { margin-bottom: .55em; }
.entry-content li::marker { color: var(--green-400); }

.entry-content blockquote {
	margin: 2em 0;
	padding: 22px 26px;
	background: var(--green-50);
	border-inline-start: 4px solid var(--green);
	border-radius: var(--radius);
	font-size: 1.08rem;
	color: var(--green-900);
}
.entry-content blockquote p:last-child { margin-bottom: 0; }

.entry-content img,
.entry-content figure { border-radius: var(--radius); margin-block: 2em; }

.entry-content figcaption {
	font-size: .88rem;
	color: var(--muted);
	text-align: center;
	margin-top: .7em;
}

.entry-content table {
	width: 100%;
	border-collapse: collapse;
	margin-block: 2em;
	font-size: .98rem;
	background: var(--surface);
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: var(--shadow-sm);
}
.entry-content th,
.entry-content td { padding: 13px 16px; text-align: start; border-bottom: 1px solid var(--line); }
.entry-content th { background: var(--green-50); font-weight: 700; color: var(--green-900); }
.entry-content tr:last-child td { border-bottom: 0; }

.entry-content code {
	background: var(--green-50);
	padding: .15em .45em;
	border-radius: 6px;
	font-size: .92em;
	direction: ltr;
	display: inline-block;
}

.entry-content pre {
	background: var(--green-900);
	color: #E6F3ED;
	padding: 20px;
	border-radius: var(--radius);
	overflow-x: auto;
	direction: ltr;
	text-align: left;
}
.entry-content pre code { background: none; color: inherit; padding: 0; }

.entry-content hr {
	border: 0;
	border-top: 1px solid var(--line);
	margin-block: 2.5em;
}

/* תגיות ותחתית מאמר */

.entry-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding-block: 8px 28px;
}
.entry-tags a {
	font-size: .87rem;
	padding: .32em .85em;
	border-radius: 999px;
	background: var(--surface);
	border: 1px solid var(--line);
	color: var(--muted);
	text-decoration: none;
}
.entry-tags a:hover { border-color: var(--green-200); color: var(--green-700); }

/* קריאה לפעולה בסוף מאמר */

.article-cta {
	background: linear-gradient(135deg, var(--green-700), var(--green));
	color: #fff;
	border-radius: var(--radius-lg);
	padding: clamp(28px, 4vw, 44px);
	text-align: center;
	box-shadow: var(--shadow-lg);
	margin-block: 20px 48px;
}

.article-cta h2 { color: #fff; margin-bottom: .4em; }
.article-cta p { color: rgba(255, 255, 255, .9); max-width: 52ch; margin-inline: auto; }
.article-cta .btn {
	background: #fff;
	color: var(--green-700);
	margin-top: .6rem;
	font-size: 1.02rem;
	padding: .8em 1.9em;
}
.article-cta .btn:hover { background: var(--green-50); color: var(--green-900); }

/* ניווט בין פוסטים */

.post-nav {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 16px;
	padding-block: 8px 48px;
}

.post-nav a {
	display: block;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 18px 20px;
	text-decoration: none;
	box-shadow: var(--shadow-sm);
	transition: border-color .2s, transform .2s var(--ease);
}
.post-nav a:hover { border-color: var(--green-200); transform: translateY(-2px); }
.post-nav small { display: block; color: var(--muted); font-size: .85rem; margin-bottom: .3rem; }
.post-nav strong { color: var(--ink); font-weight: 700; line-height: 1.4; }

/* --------------------------------------------------------------- ניווט עמודים */

.pagination { padding-block: 40px 8px; }
.pagination ul {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 0;
	padding: 0;
}
.pagination a,
.pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 42px;
	padding-inline: 14px;
	border-radius: 12px;
	background: var(--surface);
	border: 1px solid var(--line);
	color: var(--ink-soft);
	font-weight: 600;
	text-decoration: none;
}
.pagination a:hover { border-color: var(--green-200); background: var(--green-50); color: var(--green-700); }
.pagination .current { background: var(--green); border-color: var(--green); color: #fff; }

/* --------------------------------------------------------------- מצב ריק / 404 */

.empty-state {
	text-align: center;
	background: var(--surface);
	border: 1px dashed var(--line);
	border-radius: var(--radius-lg);
	padding: clamp(36px, 6vw, 64px) 24px;
	box-shadow: var(--shadow-sm);
}
.empty-state p { color: var(--muted); max-width: 46ch; margin-inline: auto; }

/* --------------------------------------------------------------- חיפוש */

.search-form {
	display: flex;
	gap: 8px;
	max-width: 460px;
	margin: 24px auto 0;
}
.search-form input[type="search"] {
	flex: 1;
	font: inherit;
	font-size: 1rem;
	padding: .72em 1.1em;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--surface);
	color: var(--ink);
}
.search-form input[type="search"]:focus {
	outline: none;
	border-color: var(--green-400);
	box-shadow: 0 0 0 3px var(--green-50);
}

/* --------------------------------------------------------------- כותרת תחתונה */

.site-footer {
	background: var(--green-900);
	color: rgba(255, 255, 255, .82);
	padding-block: clamp(40px, 5vw, 60px) 0;
	margin-top: 40px;
}

.footer-grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr;
	gap: 36px;
	padding-bottom: 36px;
}

@media (max-width: 780px) {
	.footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

.site-footer h3 {
	color: #fff;
	font-size: 1rem;
	letter-spacing: .02em;
	margin-bottom: .9rem;
}

.site-footer p { color: rgba(255, 255, 255, .72); font-size: .96rem; }

.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .55em; }

.site-footer a { color: rgba(255, 255, 255, .82); text-decoration: none; font-size: .96rem; }
.site-footer a:hover { color: #fff; text-decoration: underline; }

.footer-brand {
	display: inline-flex;
	align-items: center;
	gap: .45rem;
	font-size: 1.4rem;
	font-weight: 800;
	color: #fff;
	margin-bottom: .7rem;
	text-decoration: none;
}

.footer-bottom {
	border-top: 1px solid rgba(255, 255, 255, .12);
	padding-block: 20px 24px;
	display: flex;
	flex-wrap: wrap;
	gap: 10px 22px;
	justify-content: space-between;
	align-items: center;
	font-size: .88rem;
	color: rgba(255, 255, 255, .6);
}

/* --------------------------------------------------------------- העדפות נגישות */

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		animation-duration: .01ms !important;
		transition-duration: .01ms !important;
	}
	.card:hover { transform: none; }
}

/* --------------------------------------------------------------- הדפסה */

@media print {
	.site-header, .site-footer, .article-cta, .post-nav, .nav-drawer { display: none !important; }
	body { background: #fff; font-size: 12pt; }
	.entry-content { padding: 0; }
}
