/* =========================================================
 *  Premium FAQ for Elementor - Frontend Styles
 *  עיצוב פרימיום: צללים עדינים, אנימציות חלקות, אפקטי hover
 * ========================================================= */

.pfe-faq {
	--pfe-accent: #4f46e5;
	--pfe-accent-2: #7c3aed;
	--pfe-ease: cubic-bezier(.22, .61, .36, 1);
	width: 100%;
	box-sizing: border-box;
}

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

/* ---------- כותרת ---------- */
.pfe-header {
	margin-bottom: 10px;
}

.pfe-title {
	margin: 0;
	line-height: 1.25;
	letter-spacing: -0.01em;
}

.pfe-separator {
	display: inline-block;
	background-color: var(--pfe-accent);
	border-radius: 999px;
}

.pfe-subtitle {
	margin: 0;
	line-height: 1.6;
	opacity: .92;
}

/* ---------- ניווט טאבים ---------- */
.pfe-tabs-nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
}

.pfe-tab {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	border: none;
	background: #f4f4f8;
	color: #4a4a63;
	font-family: inherit;
	font-weight: 600;
	line-height: 1.4;
	transition: background-color .3s var(--pfe-ease), color .3s var(--pfe-ease),
		border-color .3s var(--pfe-ease), box-shadow .3s var(--pfe-ease), transform .3s var(--pfe-ease);
	-webkit-appearance: none;
	appearance: none;
}

.pfe-tab:hover {
	color: var(--pfe-accent);
	transform: translateY(-1px);
}

.pfe-tab.pfe-active {
	background: var(--pfe-accent);
	color: #fff;
	box-shadow: 0 8px 20px -6px rgba(79, 70, 229, .5);
}

.pfe-tab .pfe-tab-label {
	margin: 0;
	display: inline;
	font: inherit;
	color: inherit;
	line-height: inherit;
}

.pfe-tab-icon {
	display: inline-flex;
	align-items: center;
}

.pfe-tab-icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

/* ---------- פאנלים ---------- */
.pfe-panel {
	display: none;
}

.pfe-panel.pfe-active {
	display: block;
	animation: pfeFade .4s var(--pfe-ease);
}

@keyframes pfeFade {
	from { opacity: 0; transform: translateY(10px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* ---------- רשימת כרטיסיות ---------- */
.pfe-list {
	display: grid;
	grid-template-columns: 1fr;
	align-items: start;
}

/* ---------- כרטיסיית שאלה ---------- */
.pfe-item {
	position: relative;
	background: #fff;
	border: 1px solid #ececf3;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 1px 2px rgba(16, 16, 40, .04), 0 6px 16px -10px rgba(16, 16, 40, .12);
	transition: border-color .3s var(--pfe-ease), background-color .3s var(--pfe-ease),
		box-shadow .35s var(--pfe-ease), transform .35s var(--pfe-ease);
}

.pfe-item:hover {
	box-shadow: 0 2px 4px rgba(16, 16, 40, .05), 0 18px 36px -16px rgba(16, 16, 40, .22);
	transform: translateY(-2px);
}

/* פס הדגשה אנכי בקצה הכרטיסייה הפתוחה */
.pfe-item::before {
	content: "";
	position: absolute;
	inset-block: 0;
	inset-inline-start: 0;
	width: 4px;
	background: linear-gradient(180deg, var(--pfe-accent), var(--pfe-accent-2));
	transform: scaleY(0);
	transform-origin: top;
	transition: transform .35s var(--pfe-ease);
	z-index: 2;
}

.pfe-item.pfe-open::before {
	transform: scaleY(1);
}

.pfe-item.pfe-open {
	box-shadow: 0 4px 10px rgba(79, 70, 229, .08), 0 24px 48px -20px rgba(79, 70, 229, .35);
}

/* ---------- שורת השאלה ---------- */
.pfe-question {
	display: flex;
	align-items: center;
	gap: 0;
	padding: 20px 22px;
	cursor: pointer;
	user-select: none;
	outline: none;
	transition: background-color .25s var(--pfe-ease);
}

.pfe-question:focus-visible {
	box-shadow: inset 0 0 0 2px rgba(79, 70, 229, .45);
	border-radius: inherit;
}

/* מספור */
.pfe-number {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background-color: var(--pfe-accent);
	background-image: linear-gradient(135deg, var(--pfe-accent), var(--pfe-accent-2));
	color: #fff;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	margin-inline-end: 16px;
	line-height: 1;
	box-shadow: 0 6px 16px -6px rgba(79, 70, 229, .55);
	transition: transform .35s var(--pfe-ease);
}

.pfe-item.pfe-open .pfe-number {
	transform: scale(1.06);
}

/* טקסט השאלה */
.pfe-question-text {
	margin: 0;
	flex: 1 1 auto;
	line-height: 1.45;
	font-size: 1.06em;
	font-weight: 600;
	color: #14142b;
	transition: color .25s var(--pfe-ease);
	letter-spacing: -0.005em;
}

/* ---------- אייקון פתיחה / סגירה ---------- */
.pfe-icon {
	flex: 0 0 auto;
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	margin-inline-start: 16px;
	color: var(--pfe-accent);
	background: rgba(79, 70, 229, .09);
	border-radius: 50%;
	transition: transform .35s var(--pfe-ease), background-color .3s var(--pfe-ease), color .3s var(--pfe-ease);
}

.pfe-item.pfe-open .pfe-icon {
	background: var(--pfe-accent);
	color: #fff;
}

/* פלוס / מינוס - נבנה ביחידות em כך שהוא גדל באופן אחיד לפי גודל האייקון */
.pfe-icon-plus::before,
.pfe-icon-plus::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	background-color: currentColor;
	border-radius: 0.1em;
	transition: transform .35s var(--pfe-ease), opacity .3s var(--pfe-ease);
}

/* קו אופקי */
.pfe-icon-plus::before {
	width: 0.64em;
	height: max(2px, 0.12em);
	transform: translate(-50%, -50%);
}

/* קו אנכי */
.pfe-icon-plus::after {
	width: max(2px, 0.12em);
	height: 0.64em;
	transform: translate(-50%, -50%);
}

.pfe-item.pfe-open .pfe-icon-plus {
	transform: rotate(180deg);
}

.pfe-item.pfe-open .pfe-icon-plus::after {
	transform: translate(-50%, -50%) scaleY(0);
	opacity: 0;
}

/* חץ - גם הוא ביחידות em לשמירת פרופורציה בכל גודל */
.pfe-icon-arrow::before {
	content: "";
	width: 0.4em;
	height: 0.4em;
	margin-top: -0.12em;
	border-inline-end: max(2px, 0.1em) solid currentColor;
	border-bottom: max(2px, 0.1em) solid currentColor;
	transform: rotate(45deg);
	transition: transform .35s var(--pfe-ease);
}

.pfe-item.pfe-open .pfe-icon-arrow::before {
	margin-top: 0.12em;
	transform: rotate(-135deg);
}

/* ---------- אזור התשובה (פתיחה/סגירה) ---------- */
.pfe-answer {
	overflow: hidden;
	max-height: 0;
	transition: max-height .4s var(--pfe-ease);
}

.pfe-answer-inner {
	padding: 4px 22px 22px;
	color: #5a5a72;
	line-height: 1.75;
}

.pfe-answer-inner > *:first-child {
	margin-top: 0;
}

.pfe-answer-inner > *:last-child {
	margin-bottom: 0;
}

.pfe-answer-inner p {
	margin: 0 0 1em;
}

.pfe-answer-inner a {
	color: var(--pfe-accent);
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* ---------- תמיכת RTL ---------- */
/* החץ סימטרי אופקית (מצביע מעלה/מטה) ולכן אינו דורש היפוך ב-RTL */

/* ---------- רספונסיב ---------- */
@media (max-width: 767px) {
	.pfe-tabs-nav {
		gap: 8px;
	}

	.pfe-question {
		padding: 16px 16px;
	}

	.pfe-number {
		width: 34px;
		height: 34px;
		margin-inline-end: 12px;
	}

	.pfe-icon {
		width: 26px;
		height: 26px;
		margin-inline-start: 12px;
	}

	.pfe-answer-inner {
		padding-inline: 16px;
		padding-bottom: 18px;
	}
}

/* ---------- העדפת תנועה מופחתת ---------- */
@media (prefers-reduced-motion: reduce) {
	.pfe-faq *,
	.pfe-faq *::before,
	.pfe-faq *::after {
		transition-duration: .01ms !important;
		animation-duration: .01ms !important;
	}
}

/* =========================================================
 *  וריאציית עיצוב: זכוכית (Glassmorphism)
 *  נראה הכי טוב על רקע צבעוני / תמונת רקע
 * ========================================================= */

.pfe-style-glass .pfe-title,
.pfe-style-glass .pfe-subtitle {
	text-shadow: 0 1px 14px rgba(16, 16, 40, .14);
}

/* טאבים מזכוכית */
.pfe-style-glass .pfe-tab {
	background: rgba(255, 255, 255, .35);
	-webkit-backdrop-filter: blur(12px) saturate(150%);
	backdrop-filter: blur(12px) saturate(150%);
	border: 1px solid rgba(255, 255, 255, .55);
	color: #2a2a45;
	box-shadow: 0 8px 24px -14px rgba(16, 16, 40, .35);
}

.pfe-style-glass .pfe-tab:hover {
	background: rgba(255, 255, 255, .5);
	color: var(--pfe-accent);
}

.pfe-style-glass .pfe-tab.pfe-active {
	background: linear-gradient(135deg, rgba(79, 70, 229, .92), rgba(124, 58, 237, .92));
	border-color: rgba(255, 255, 255, .65);
	color: #fff;
	box-shadow: 0 10px 26px -8px rgba(79, 70, 229, .6);
}

/* כרטיסיות מזכוכית */
.pfe-style-glass .pfe-item {
	background: rgba(255, 255, 255, .42);
	-webkit-backdrop-filter: blur(18px) saturate(160%);
	backdrop-filter: blur(18px) saturate(160%);
	border: 1px solid rgba(255, 255, 255, .55);
	box-shadow: 0 8px 32px -12px rgba(16, 16, 40, .28);
}

.pfe-style-glass .pfe-item:hover {
	background: rgba(255, 255, 255, .52);
	box-shadow: 0 16px 44px -16px rgba(16, 16, 40, .4);
	transform: translateY(-2px);
}

.pfe-style-glass .pfe-item.pfe-open {
	background: rgba(255, 255, 255, .62);
	border-color: rgba(255, 255, 255, .85);
	box-shadow: 0 18px 50px -18px rgba(79, 70, 229, .5);
}

/* טקסטים בתוך כרטיס הזכוכית */
.pfe-style-glass .pfe-question-text {
	color: #1b1b34;
}

.pfe-style-glass .pfe-answer-inner {
	color: #36364f;
	border-top-color: rgba(16, 16, 40, .12) !important;
}

/* אייקון בתוך זכוכית */
.pfe-style-glass .pfe-icon {
	background: rgba(255, 255, 255, .5);
	border: 1px solid rgba(255, 255, 255, .6);
}

.pfe-style-glass .pfe-item.pfe-open .pfe-icon {
	background: var(--pfe-accent);
	border-color: transparent;
}

/* מספור עם זוהר מעט חזק יותר */
.pfe-style-glass .pfe-number {
	box-shadow: 0 8px 20px -6px rgba(79, 70, 229, .7);
	border: 1px solid rgba(255, 255, 255, .35);
}

/* =========================================================
 *  סרגל כלים: חיפוש + פתח/סגור הכל
 * ========================================================= */

.pfe-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	flex-wrap: wrap;
	margin-bottom: 22px;
}

.pfe-search {
	position: relative;
	flex: 1 1 260px;
	max-width: 420px;
	min-width: 200px;
}

.pfe-search-icon {
	position: absolute;
	top: 50%;
	inset-inline-start: 16px;
	transform: translateY(-50%);
	display: inline-flex;
	color: #9aa0b4;
	pointer-events: none;
}

.pfe-search-input {
	width: 100%;
	font: inherit;
	color: #1b1b34;
	padding-block: 13px;
	padding-inline-start: 44px;
	padding-inline-end: 40px;
	background: #fff;
	border: 1px solid #e6e6ef;
	border-radius: 50px;
	outline: none;
	transition: border-color .25s var(--pfe-ease), box-shadow .25s var(--pfe-ease);
}

.pfe-search-input::placeholder {
	color: #9aa0b4;
}

.pfe-search-input:focus {
	border-color: var(--pfe-accent);
	box-shadow: 0 0 0 4px rgba(79, 70, 229, .14);
}

.pfe-search-clear {
	position: absolute;
	top: 50%;
	inset-inline-end: 12px;
	transform: translateY(-50%);
	display: none;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: #ececf3;
	color: #555;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	transition: background-color .2s var(--pfe-ease), color .2s var(--pfe-ease);
}

.pfe-search-clear.pfe-show {
	display: inline-flex;
}

.pfe-search-clear:hover {
	background: var(--pfe-accent);
	color: #fff;
}

.pfe-bulk {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.pfe-bulk-btn {
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	padding: 11px 20px;
	border-radius: 50px;
	border: 1px solid #e6e6ef;
	background: #fff;
	color: #4a4a63;
	transition: color .25s var(--pfe-ease), border-color .25s var(--pfe-ease),
		background-color .25s var(--pfe-ease), transform .2s var(--pfe-ease);
}

.pfe-bulk-btn:hover {
	color: var(--pfe-accent);
	border-color: var(--pfe-accent);
	transform: translateY(-1px);
}

/* פריט מוסתר בחיפוש */
.pfe-item.pfe-hidden {
	display: none !important;
}

/* הודעת "אין תוצאות" */
.pfe-no-results {
	display: none;
	text-align: center;
	padding: 34px 20px;
	color: #8a8aa0;
	font-size: 1.02em;
}

.pfe-no-results.pfe-show {
	display: block;
}

/* וריאציית זכוכית לסרגל הכלים */
.pfe-style-glass .pfe-search-input,
.pfe-style-glass .pfe-bulk-btn {
	background: rgba(255, 255, 255, .4);
	-webkit-backdrop-filter: blur(12px) saturate(150%);
	backdrop-filter: blur(12px) saturate(150%);
	border: 1px solid rgba(255, 255, 255, .55);
	color: #1b1b34;
}

.pfe-style-glass .pfe-bulk-btn:hover {
	background: rgba(255, 255, 255, .6);
	color: var(--pfe-accent);
}

.pfe-style-glass .pfe-no-results {
	color: rgba(255, 255, 255, .92);
}

/* רספונסיב לסרגל הכלים */
@media (max-width: 600px) {
	.pfe-toolbar {
		flex-direction: column;
		align-items: stretch;
	}

	.pfe-search {
		max-width: none;
	}

	.pfe-bulk {
		justify-content: center;
	}
}

/* =========================================================
 *  מונה שאלות בטאב
 * ========================================================= */

.pfe-tab-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.5em;
	height: 1.5em;
	padding: 0 .45em;
	font-size: .78em;
	font-weight: 700;
	line-height: 1;
	border-radius: 999px;
	background: rgba(16, 16, 40, .10);
	color: inherit;
}

.pfe-tab.pfe-active .pfe-tab-count {
	background: rgba(255, 255, 255, .28);
	color: #fff;
}

.pfe-style-glass .pfe-tab-count {
	background: rgba(16, 16, 40, .12);
}

.pfe-style-glass .pfe-tab.pfe-active .pfe-tab-count {
	background: rgba(255, 255, 255, .3);
}

/* =========================================================
 *  תגיות, שאלה נעוצה ותאריך עדכון
 * ========================================================= */

.pfe-q-main {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.pfe-q-row {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

/* תגית צבעונית */
.pfe-badge {
	flex: 0 0 auto;
	font-size: .72em;
	font-weight: 800;
	padding: 3px 9px;
	border-radius: 50px;
	line-height: 1;
	letter-spacing: .02em;
}

.pfe-badge.is-indigo { background: rgba(79, 70, 229, .12); color: #4f46e5; }
.pfe-badge.is-green  { background: rgba(22, 163, 74, .12); color: #16a34a; }
.pfe-badge.is-orange { background: rgba(234, 88, 12, .12); color: #ea580c; }
.pfe-badge.is-red    { background: rgba(220, 38, 38, .12); color: #dc2626; }

/* תאריך עדכון */
.pfe-updated {
	font-size: .8em;
	color: #9aa0b4;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

/* כוכב נעיצה */
.pfe-pin {
	flex: 0 0 auto;
	color: #f59e0b;
	margin-inline-start: 10px;
}

/* כרטיס נעוץ / מודגש */
.pfe-item.is-pinned {
	border-color: rgba(245, 158, 11, .4);
	background: linear-gradient(180deg, rgba(245, 158, 11, .05), #fff 60%);
}

.pfe-item.is-pinned::before {
	background: linear-gradient(180deg, #f59e0b, #f97316);
	transform: scaleY(1);
}

/* התאמות לוריאציית זכוכית */
.pfe-style-glass .pfe-item.is-pinned {
	background: linear-gradient(180deg, rgba(245, 158, 11, .14), rgba(255, 255, 255, .42) 60%);
	border-color: rgba(245, 158, 11, .5);
}

.pfe-style-glass .pfe-updated {
	color: rgba(255, 255, 255, .85);
}

/* =========================================================
 *  בורר עמודות קדמי (לגולש)
 * ========================================================= */

.pfe-layout-bar {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	margin-bottom: 16px;
}

.pfe-layout-label {
	font-size: .9em;
	font-weight: 600;
	color: #8a8aa0;
}

.pfe-layout-switcher {
	display: inline-flex;
	gap: 4px;
	padding: 4px;
	background: #f1f2f7;
	border-radius: 50px;
}

.pfe-layout-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border: none;
	background: transparent;
	color: #8a8aa0;
	border-radius: 50px;
	cursor: pointer;
	transition: color .2s var(--pfe-ease), background-color .2s var(--pfe-ease), box-shadow .2s var(--pfe-ease);
}

.pfe-layout-btn:hover {
	color: var(--pfe-accent);
}

.pfe-layout-btn.pfe-active {
	background: #fff;
	color: var(--pfe-accent);
	box-shadow: 0 3px 8px -2px rgba(16, 16, 40, .18);
}

/* החלת בחירת הגולש - רק בדסקטופ, גוברת על בקרת העמודות */
@media (min-width: 768px) {
	.pfe-faq[style*="--pfe-cols"] .pfe-list {
		display: grid !important;
		grid-template-columns: repeat(var(--pfe-cols), minmax(0, 1fr)) !important;
		align-items: start;
	}
}

/* במובייל תמיד עמודה אחת - מסתירים את הבורר */
@media (max-width: 767px) {
	.pfe-layout-bar {
		display: none;
	}
}

/* וריאציית זכוכית */
.pfe-style-glass .pfe-layout-switcher {
	background: rgba(255, 255, 255, .4);
	-webkit-backdrop-filter: blur(10px) saturate(150%);
	backdrop-filter: blur(10px) saturate(150%);
	border: 1px solid rgba(255, 255, 255, .5);
}

.pfe-style-glass .pfe-layout-btn.pfe-active {
	background: rgba(255, 255, 255, .85);
}
