/* ==========================================================================
   ks-main.css — העיצוב החדש של מחסן מילים
   מיקום: wp-content/themes/enfold-child/ks-main.css
   נטען מ-functions.php אחרי הסגנון של Enfold.

   כל הכללים תחת body.ks-skin — כך שעמודי החנות לא מושפעים.
   ========================================================================== */

/* ---------- בסיס ---------- */
body.ks-skin,
body.ks-skin #wrap_all,
body.ks-skin #main,
body.ks-skin .container_wrap {
	background: #faf6ef !important;
	background-image: none !important;
	border: none !important;
}
body.ks-skin {
	color: #26201a;
	font-family: 'Alef', sans-serif;
}

body.ks-skin a { color: inherit; text-decoration: none; }
body.ks-skin a:hover { color: #cf3a2c; }

/* הסתרת הכותרת והפוטר של Enfold */
body.ks-skin #header,
body.ks-skin #header_meta,
body.ks-skin #header_main,
body.ks-skin #header_main_alternate,
body.ks-skin .av_mobile_menu_tablet #header,
body.ks-skin #advanced_menu_toggle,
body.ks-skin #advanced_menu_hide,
body.ks-skin #mobile_menu_toggle,
body.ks-skin .av-burger-menu-main,
body.ks-skin .av-logo-container,
body.ks-skin .title_container,
body.ks-skin .breadcrumb,
body.ks-skin #footer,
body.ks-skin #socket { display: none !important; }

/* ביטול הרקע הירקרק והאריח של Enfold על עוטפי התוכן */
body.ks-skin,
body.ks-skin #top,
body.ks-skin #wrap_all,
body.ks-skin #main,
body.ks-skin .container_wrap,
body.ks-skin .container_wrap_first,
body.ks-skin .main_color,
body.ks-skin .alternate_color,
body.ks-skin #main .container {
	background-color: #faf6ef !important;
	background-image: none !important;
}

/* ביטול הרווח שנשאר מהכותרת המוסתרת */
body.ks-skin #main,
body.ks-skin #wrap_all,
body.ks-skin .html_header_top.html_header_sticky #top #wrap_all #main {
	padding-top: 0 !important;
	margin-top: 0 !important;
}
body.ks-skin #main > .container_wrap,
body.ks-skin #main .container {
	padding: 0 !important;
	margin: 0 !important;
	max-width: none !important;
	width: 100% !important;
	border: 0 !important;
}

/* Enfold כופה height:auto על תמונות — מבטלות נקודתית */
body.ks-skin .ks-home img { max-width: 100%; }

/* ---------- הרצועה העליונה ---------- */
.ks-strip {
	position: sticky;
	top: 0;
	z-index: 500;
	background-color: #eef7f5;
	background-image: url(tile.png);
	background-repeat: repeat;
	background-size: 100px 100px;
	padding: 22px clamp(20px, 7vw, 140px);
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 14px 24px;
	box-shadow: 0 1px 6px rgba(27, 42, 48, .08);
	direction: rtl;
}

.ks-brand { display: flex; align-items: center; gap: 20px; }
.ks-brand-name { font: 400 19px/1 'Suez One', 'Alef', sans-serif; color: #cf3a2c; }
.ks-brand-sub  { font: 400 15px/1 'Alef', sans-serif; color: #cf3a2c; }

.ks-nav {
	display: flex;
	align-items: center;
	gap: 22px;
	font: 400 15px/1 'Alef', sans-serif;
	color: #123240;
}
.ks-nav a { color: #123240; }
.ks-nav a:hover { color: #cf3a2c; }
/* ביטול הנקודות/מפרידים של Enfold בין פריטי התפריט */
.ks-nav ul, .ks-nav li { list-style: none !important; margin: 0; padding: 0; display: contents; }
.ks-nav li::before, .ks-nav li::after,
.ks-nav a::before, .ks-nav a::after { content: none !important; display: none !important; }

.ks-nav-cta {
	background: #cf3a2c;
	color: #fff !important;
	font: 700 15px/1 'Alef', sans-serif;
	padding: 9px 16px;
	display: flex;
	align-items: center;
}
.ks-nav-cta:hover { color: #cfe8f1 !important; }

/* ---------- הפוסט המוביל ---------- */
.ks-home { direction: rtl; }

.ks-hero {
	position: relative;
	background: #faf6ef !important;
	border-bottom: 1px solid #e0d5c2;
}
.ks-hero-img {
	width: 100% !important;
	height: 430px !important;
	max-width: none !important;
	object-fit: cover;
	object-position: center;
	display: block;
}
.ks-hero-img-empty { display: block; height: 430px; background: #ece4d6; }

.ks-hero-card {
	position: absolute;
	right: clamp(20px, 7vw, 140px);
	top: 50%;
	transform: translateY(-50%);
	width: min(560px, 52vw);
	background: #faf6ef;
	padding: 30px 34px 32px;
	display: flex;
	flex-direction: column;
	gap: 14px;
	box-shadow: 0 2px 28px rgba(38, 32, 26, .18);
}
.ks-hero-card h1 {
	margin: 0;
	font: 400 40px/1.3 'Suez One', 'Alef', sans-serif;
	letter-spacing: -.005em;
	color: #26201a;
	text-wrap: balance;
}
.ks-hero-card p {
	margin: 0;
	font: 400 17px/1.7 'Alef', sans-serif;
	color: #4f4a41;
	text-align: justify;
}
.ks-hero-cta { align-self: flex-end; margin-top: 2px; }

/* ---------- שורת התאריך והקטגוריות ---------- */
.ks-meta {
	display: flex;
	align-items: baseline;
	gap: 14px;
	font: 400 14px 'Alef', sans-serif;
	letter-spacing: .1em;
	color: #cf3a2c;
}
.ks-meta-cats { color: #4a94ad; }

/* ---------- קישור עם קו תחתון אדום ---------- */
.ks-underline {
	font: 700 15px 'Alef', sans-serif;
	color: #26201a;
	border-bottom: 2px solid #cf3a2c;
	padding-bottom: 2px;
	white-space: nowrap;
}
.ks-underline:hover { color: #cf3a2c; }

/* ---------- שלושת הבלוקים ---------- */
.ks-gates {
	background-color: #faf6ef;
	background-image: url(tile.png);
	background-repeat: repeat;
	background-size: 100px 100px;
	border-bottom: 1px solid #e0d5c2;
	padding: 32px clamp(20px, 7vw, 140px);
}
.ks-gates-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
	max-width: 920px;   /* ריבועים ממורכזים, לא גדלים על מסך רחב */
	margin-inline: auto;
}
.ks-gate {
	background: #faf6ef;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.ks-gate h2 {
	margin: 0;
	font: 400 18px/1.25 'Suez One', 'Alef', sans-serif;
	color: #26201a;
	min-height: 45px;      /* גובה אחיד לשתי שורות */
	display: flex;
	align-items: flex-start;
}
.ks-gate-frame {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	border: 1px solid #e0d5c2;
	background: #e6f3f8;
	overflow: hidden;
	container-type: inline-size;
}
.ks-gate-frame img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
}
.ks-gate-empty {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font: 400 15px 'Alef', sans-serif;
	color: #7c8f96;
	text-align: center;
	padding: 12px;
}

.ks-gate-med .ks-med-title {
	position: absolute;
	inset: 0 0 auto 0;
	padding: 66px 13px 15px;
	background: linear-gradient(to bottom, rgba(0,0,0,.5), rgba(0,0,0,.22) 70%, rgba(0,0,0,0));
	font: 400 7.9cqw/1.3 'Suez One', 'Alef', sans-serif;
	color: #fff;
	text-align: center;
}
.ks-gate-med .ks-med-date {
	position: absolute;
	inset: auto 0 0 0;
	padding: 14px 13px;
	background: linear-gradient(to top, rgba(0,0,0,.45), rgba(0,0,0,.18) 60%, rgba(0,0,0,0));
	font: 400 5.1cqw 'Alef', sans-serif;
	letter-spacing: .08em;
	color: #fff;
	text-align: center;
}

.ks-gate-links {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-top: auto;
}
.ks-gate .ks-underline { font-size: 14px; }
.ks-soon {
	font: 400 14px 'Alef', sans-serif;
	color: #8d8477;
	white-space: nowrap;
}

/* ---------- מגזין + סרגל צד ---------- */
.ks-body {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 340px;
	width: 100%;
	max-width: 1400px;
	margin-inline: auto;
	background: #faf6ef;
	box-sizing: border-box;
}
.ks-list {
	padding: 72px clamp(20px, 7vw, 140px) 48px 44px;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.ks-item {
	display: grid;
	grid-template-columns: 150px minmax(0, 1fr);
	gap: 22px;
	padding: 32px 0;
	align-items: start;
}
.ks-item:first-child { padding-top: 0; }

.ks-item-thumb { display: block; }
.ks-item-thumb img {
	width: 150px !important;
	height: 96px !important;
	object-fit: cover;
	display: block;
}
.ks-item-thumb-empty {
	display: block;
	width: 150px;
	height: 96px;
	background: #ece4d6;
}

.ks-item-text { display: flex; flex-direction: column; gap: 6px; }
.ks-item-title {
	font: 400 23px/1.4 'Suez One', 'Alef', sans-serif;
	color: #26201a;
	text-wrap: pretty;
}
.ks-item-excerpt {
	font: 400 17px/1.65 'Alef', sans-serif;
	color: #6b6055;
	text-wrap: pretty;
}
.ks-more { align-self: flex-start; margin-top: 24px; }

.ks-side {
	border-right: 1px solid #e0d5c2;
	padding: 72px 36px 48px clamp(20px, 4vw, 80px);
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.ks-portrait { display: block; width: 100%; height: auto; }
.ks-portrait-empty {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 190px;
	background: #e6f3f8;
	font: 400 14px 'Alef', sans-serif;
	color: #7c8f96;
}
.ks-bio {
	margin: 0;
	font: 400 15px/1.8 'Alef', sans-serif;
	color: #4c443b;
	text-wrap: pretty;
}

/* ---------- הפוטר ---------- */
.ks-foot {
	background-color: #eef7f5;
	background-image: url(tile.png);
	background-repeat: repeat;
	background-size: 100px 100px;
	padding: 12px clamp(20px, 7vw, 140px);
	border-top: 1px solid #e0eae8;
	scroll-margin-top: 96px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 22px;
	direction: rtl;
}
.ks-foot-rights { font: 400 14px/1 'Alef', sans-serif; color: #123240; }
.ks-foot-form {
	display: flex;
	gap: 10px;
	align-items: center;
	margin-inline-start: auto;
}
.ks-foot-form input[type="email"] {
	flex: 0 1 240px;
	width: 240px;
	min-width: 80px;
	height: 36px;
	background: #fff;
	border: 1px solid #a9cfdd;
	padding: 0 12px;
	font: 400 14px/36px 'Alef', sans-serif;
	color: #1b2a30;
	box-sizing: border-box;
	border-radius: 0;
}
.ks-foot-form button {
	flex: none;
	border: none;
	background: #cfe8f1;
	color: #1b1b1b;
	height: 36px;
	padding: 0 16px;
	font: 400 15px/36px 'Alef', sans-serif;
	cursor: pointer;
	white-space: nowrap;
	border-radius: 0;
}

/* ==========================================================================
   מסכים צרים
   ========================================================================== */

@media (max-width: 1000px) {
	.ks-body { grid-template-columns: minmax(0, 1fr); }
	.ks-side {
		border-right: none;
		border-top: 1px solid #e0d5c2;
		padding: 34px clamp(20px, 7vw, 140px) 44px;
	}
	.ks-item { grid-template-columns: minmax(0, 1fr); gap: 12px; }
	.ks-item-thumb img,
	.ks-item-thumb-empty { width: 100% !important; height: 220px !important; }
	.ks-list { padding: 48px clamp(20px, 7vw, 140px) 40px; }
}

@media (max-width: 860px) {
	.ks-gates-grid { grid-template-columns: 1fr; gap: 22px; max-width: 420px; }
	.ks-gate h2 { min-height: 0; }
	.ks-foot { padding: 14px 18px; gap: 10px; }
	.ks-foot-form { flex-wrap: wrap; width: 100%; margin-inline-start: 0; }
	.ks-foot-form input[type="email"] { flex: 1 1 160px; width: auto; }
	.ks-foot-form button { font-size: 17px; }
}

@media (max-width: 760px) {
	.ks-strip { padding: 10px 14px; flex-wrap: nowrap; }
	.ks-brand-sub { display: none; }
	.ks-nav { flex-wrap: nowrap; gap: 12px; font-size: 13px; white-space: nowrap; overflow-x: auto; scrollbar-width: none; }
	.ks-nav-cta { padding: 6px 10px; }

	.ks-hero-img, .ks-hero-img-empty { height: 300px !important; }
	.ks-hero-card {
		position: relative;
		right: auto;
		top: auto;
		transform: none;
		width: auto;
		margin: -60px 18px 0;
		padding: 22px 20px;
	}
	.ks-hero-card h1 { font-size: 29px; }

	.ks-item-extra { display: none; }
	.ks-item:nth-of-type(n+4) { display: none; }
	.ks-item-thumb img,
	.ks-item-thumb-empty { height: 170px !important; }
	.ks-item-title { font-size: 21px; }

	.ks-list { padding: 24px 18px 32px; }
	.ks-side { padding: 24px 18px 34px; }
	.ks-gates { padding: 24px 18px; }
}
