/**
 * עמוד הבית – ישיבת חיפה אור וישועה.
 *
 * שפת העיצוב: כחול עמוק וזהב – צבעי הזהות שכבר משמשים באתר.
 * כותרות ב-Frank Ruhl Libre, פונט עברי שנועד לסדר טקסטים תורניים,
 * מול גוף טקסט ב-Assistant שכבר בשימוש באתר.
 *
 * אלמנט החתימה: קו זהב דק שחוזר בכל מעבר – מתחת לכותרת הראשית,
 * כגבול עליון לכרטיסים, וכקו שנפתח בריחוף.
 */

.ov-home {
	--ink: #001b38;
	--navy: var(--ov-navy, #002347);
	--gold: var(--ov-gold, #d59b2a);
	--gold-deep: #9a6c17;
	--cream: var(--ov-cream, #fdfaf1);
	--paper: #ffffff;
	--muted: #5a6672;

	--display: 'Frank Ruhl Libre', 'Assistant', Georgia, serif;
	--body: 'Assistant', system-ui, sans-serif;

	--edge: min(6vw, 64px);

	font-family: var(--body);
	color: var(--ink);
}

/* ---------- Hero ---------- */

.ov-hero {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: clamp(340px, 52vh, 560px);
	padding: var(--edge);
	padding-block-end: clamp(36px, 6vh, 72px);
	background-color: var(--navy);
	background-size: cover;
	background-position: center 40%;
	overflow: hidden;
}

.ov-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0, 20, 45, 0.94) 0%, rgba(0, 27, 56, 0.72) 45%, rgba(0, 27, 56, 0.42) 100%);
}

.ov-hero__inner {
	position: relative;
	z-index: 1;
	max-width: 780px;
}

.ov-hero__eyebrow {
	margin: 0 0 14px;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.18em;
	color: var(--gold);
}

.ov-hero__title {
	margin: 0;
	font-family: var(--display);
	font-size: clamp(2.1rem, 5.5vw, 3.9rem);
	font-weight: 700;
	line-height: 1.12;
	color: #fff;
}

/* קו הזהב – אלמנט החתימה שחוזר בכל העמוד */
.ov-rule {
	width: 68px;
	height: 3px;
	margin-block: 22px 20px;
	background: var(--gold);
	border: 0;
}

.ov-hero__lede {
	margin: 0;
	max-width: 46ch;
	font-size: clamp(1rem, 2vw, 1.2rem);
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.86);
}

/* ---------- שלושת השערים ---------- */

.ov-gates {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1px;
	background: rgba(0, 35, 71, 0.12);
}

.ov-gate {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-height: 260px;
	padding: 28px 26px 26px;
	background-color: var(--navy);
	background-size: cover;
	background-position: center;
	color: #fff;
	text-decoration: none;
	overflow: hidden;
}

.ov-gate::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0, 20, 45, 0.92) 8%, rgba(0, 35, 71, 0.55) 60%, rgba(0, 35, 71, 0.35) 100%);
	transition: opacity 0.35s ease;
}

.ov-gate:hover::after,
.ov-gate:focus-visible::after {
	opacity: 0.82;
}

.ov-gate__body {
	position: relative;
	z-index: 1;
}

.ov-gate__label {
	display: block;
	margin-bottom: 8px;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	color: var(--gold);
}

.ov-gate__title {
	margin: 0;
	font-family: var(--display);
	font-size: 1.6rem;
	font-weight: 700;
	line-height: 1.25;
	color: #fff;
}

/* הקו שנפתח בריחוף */
.ov-gate__seam {
	position: relative;
	z-index: 1;
	width: 34px;
	height: 3px;
	margin-top: 16px;
	background: var(--gold);
	transition: width 0.35s ease;
}

.ov-gate:hover .ov-gate__seam,
.ov-gate:focus-visible .ov-gate__seam {
	width: 84px;
}

.ov-gate:focus-visible {
	outline: 3px solid var(--gold);
	outline-offset: -4px;
}

/* ---------- דרכה של הישיבה ---------- */

.ov-about {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: clamp(32px, 5vw, 64px);
	align-items: center;
	max-width: 1240px;
	margin-inline: auto;
	padding: clamp(56px, 8vh, 96px) var(--edge);
}

.ov-about__eyebrow {
	margin: 0;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	color: var(--gold-deep);
}

.ov-about__title {
	margin: 10px 0 0;
	font-family: var(--display);
	font-size: clamp(1.7rem, 3.4vw, 2.5rem);
	font-weight: 700;
	line-height: 1.2;
	color: var(--navy);
}

.ov-about__text p {
	margin: 0 0 16px;
	font-size: 1.05rem;
	line-height: 1.75;
	color: #333c46;
}

.ov-about__text p:last-child {
	margin-bottom: 0;
}

.ov-about__media {
	position: relative;
	aspect-ratio: 16 / 9;
	border-radius: 2px;
	overflow: hidden;
	box-shadow: 0 22px 50px rgba(0, 35, 71, 0.18);
}

.ov-about__media iframe {
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

/* ---------- שיעורים אחרונים ---------- */

.ov-latest {
	background: var(--cream);
	border-top: 1px solid rgba(213, 155, 42, 0.28);
}

.ov-latest__inner {
	max-width: 1240px;
	margin-inline: auto;
	padding: clamp(52px, 7vh, 84px) var(--edge);
}

.ov-latest__head {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	align-items: baseline;
	justify-content: space-between;
	margin-bottom: 32px;
}

.ov-latest__title {
	margin: 0;
	font-family: var(--display);
	font-size: clamp(1.5rem, 3vw, 2.1rem);
	font-weight: 700;
	color: var(--navy);
}

.ov-latest__link {
	font-size: 0.95rem;
	font-weight: 700;
	color: var(--gold-deep);
	text-decoration: none;
	border-bottom: 2px solid transparent;
	transition: border-color 0.25s ease;
}

.ov-latest__link:hover,
.ov-latest__link:focus-visible {
	border-bottom-color: var(--gold);
	color: var(--gold-deep);
}

/* הרשימה מגיעה מהמודול OVC_Recent_Lessons – מעצבים אותה לרובד עמוד הבית */
.ov-latest .ov-recent {
	flex-direction: row;
	flex-wrap: wrap;
	gap: 22px;
}

.ov-latest .ov-recent__item {
	flex: 1 1 220px;
	max-width: 300px;
}

.ov-latest .ov-recent__link {
	flex-direction: column;
	align-items: stretch;
	gap: 0;
	height: 100%;
	padding: 0;
	background: var(--paper);
	border-radius: 0;
	border-top: 3px solid transparent;
	box-shadow: 0 4px 18px rgba(0, 35, 71, 0.07);
	transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.ov-latest .ov-recent__link:hover,
.ov-latest .ov-recent__link:focus-visible {
	border-top-color: var(--gold);
	transform: translateY(-4px);
	box-shadow: 0 16px 34px rgba(0, 35, 71, 0.14);
}

.ov-latest .ov-recent__img {
	width: 100%;
	height: 150px;
	border-radius: 0;
}

.ov-latest .ov-recent__title {
	display: block;
	padding: 16px 18px 20px;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.45;
	color: var(--navy);
}

/* ---------- רספונסיביות ---------- */

@media (max-width: 900px) {
	.ov-gates { grid-template-columns: 1fr; }
	.ov-gate { min-height: 200px; }
	.ov-about { grid-template-columns: 1fr; }
	.ov-about__media { order: -1; }
}

@media (max-width: 560px) {
	.ov-latest .ov-recent__item { max-width: none; flex-basis: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.ov-gate::after,
	.ov-gate__seam,
	.ov-latest .ov-recent__link {
		transition: none;
	}

	.ov-latest .ov-recent__link:hover {
		transform: none;
	}
}
