/* Parasha Insights — gold theme (#92763d) for Mordechai Ministry UK */
.mpi-grid,
.mpi-single {
	--mpi-green: #92763d;       /* main gold (book headers, hover, buttons) */
	--mpi-green-dark: #75602f;  /* darker gold for hover */
	--mpi-tile-a: #f5f0e5;      /* light cream tile */
	--mpi-tile-b: #ebe2cd;      /* slightly deeper cream tile */
	--mpi-combined: #faf7f0;
	--mpi-line: #e2d6bc;
	--mpi-text: #3b3120;
	--mpi-muted: #6f6450;
	--mpi-accent: #5c4a22;      /* deep brown for "New" / "Latest" badges */
	--mpi-dash: #c9b68c;
}

/* Page header (theme) — gold instead of purple, only on Parasha pages */
.page-header .header-filter-gradient::before,
.page-header .header-filter-gradient::after,
.header-filter.header-filter-gradient::before,
.header-filter.header-filter-gradient::after {
	background: linear-gradient(135deg, #92763d 0%, #6e5a2e 100%) !important;
	opacity: .88 !important;
}

/* ---------- Grid ---------- */
.mpi-grid {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 14px;
	max-width: 1000px;
	margin: 24px auto;
	padding: 0 16px;
	box-sizing: border-box;
	align-items: start;
}
.mpi-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.mpi-book {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 84px;               /* same height on every book, so rows line up */
	box-sizing: border-box;
	background: var(--mpi-green);
	color: #fff;
	text-align: center;
	font-weight: 700;
	font-size: 16px;
	letter-spacing: .1em;       /* tighter so DEUTERONOMY fits on one line */
	text-transform: uppercase;
	padding: 0 4px;
	overflow-wrap: anywhere;
	border-radius: 3px;
	box-shadow: 0 3px 6px rgba(0, 0, 0, .18);
}
.mpi-tile {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 72px;               /* fixed height keeps every row level */
	box-sizing: border-box;
	padding: 6px 6px;
	background: var(--mpi-tile-a);
	color: var(--mpi-text) !important;
	text-align: center;
	text-decoration: none !important;
	text-transform: uppercase;
	letter-spacing: .08em;      /* long names (BEHAALOTECHA) stay inside the box */
	font-size: 14px;
	line-height: 1.35;
	overflow-wrap: anywhere;
	transition: background-color .18s ease, color .18s ease, transform .18s ease;
}
.mpi-tile--b { background: var(--mpi-tile-b); }
.mpi-tile:hover,
.mpi-tile:focus-visible,
.mpi-tile.is-current {
	background: var(--mpi-green);
	color: #fff !important;
	outline: none;
}
.mpi-tile:hover { transform: translateY(-2px); }
.mpi-tile:focus-visible { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--mpi-green); }
.mpi-spacer { height: 72px; }   /* blank slot so shorter columns line up */
.mpi-combined-label {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 44px;
	box-sizing: border-box;
	margin-top: 6px;
	border-top: 1px solid var(--mpi-line);
	color: var(--mpi-green);
	font-weight: 700;
	font-size: 11px;
	letter-spacing: .14em;
	text-align: center;
	text-transform: uppercase;
	white-space: nowrap;
}
.mpi-tile--combined {
	background: var(--mpi-combined);
	border: 1px dashed var(--mpi-dash);
	height: 72px;               /* same height as every other box */
	font-size: 13px;
}
.mpi-new {
	position: absolute;
	top: 5px;
	right: 5px;
	background: var(--mpi-accent);
	color: #fff;
	font-size: 9px;
	font-weight: 700;
	letter-spacing: .1em;
	padding: 2px 5px;
	border-radius: 2px;
	line-height: 1.3;
}

@media (max-width: 1024px) { .mpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px)  { .mpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .mpi-col { gap: 10px; } .mpi-tile { font-size: 12px; letter-spacing: .05em; height: 60px; } .mpi-spacer { height: 60px; } .mpi-combined-label { font-size: 10px; letter-spacing: .08em; } .mpi-book { font-size: 13px; letter-spacing: .06em; height: 64px; } }

/* ---------- Portion page ---------- */
.mpi-single { color: var(--mpi-text); }
.mpi-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 14px;
	margin: 0 0 18px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--mpi-line);
}
.mpi-back { color: var(--mpi-green) !important; text-decoration: none !important; font-weight: 600; margin-right: auto; }
.mpi-back:hover { text-decoration: underline !important; }
.mpi-chip {
	background: var(--mpi-green);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	padding: 5px 12px;
	border-radius: 3px;
}
.mpi-ref { color: var(--mpi-muted); font-size: 15px; letter-spacing: .02em; }
.mpi-note {
	background: var(--mpi-combined);
	border-left: 3px solid var(--mpi-green);
	padding: 10px 14px;
	margin: 0 0 20px;
	font-size: 15px;
}
.mpi-note a { color: var(--mpi-green); font-weight: 600; }
.mpi-intro { margin-bottom: 28px; }

.mpi-section-title {
	display: flex;
	align-items: baseline;
	gap: 12px;
	margin: 8px 0 18px !important;
	font-size: 22px !important;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--mpi-green) !important;
}
.mpi-count { font-size: 13px; letter-spacing: .06em; color: var(--mpi-muted); font-weight: 400; text-transform: none; }
.mpi-sub-title {
	margin: 34px 0 14px !important;
	font-size: 14px !important;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--mpi-green) !important;
	border-top: 1px solid var(--mpi-line);
	padding-top: 18px;
}
.mpi-empty {
	background: var(--mpi-combined);
	border: 1px dashed var(--mpi-dash);
	padding: 26px;
	text-align: center;
	color: var(--mpi-muted);
}

.mpi-video-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 22px;
}
.mpi-video { background: #fff; border: 1px solid #ece4d3; border-radius: 4px; overflow: hidden; transition: box-shadow .2s ease, transform .2s ease; }
.mpi-video:hover { box-shadow: 0 8px 22px rgba(117, 96, 47, .16); transform: translateY(-2px); }
.mpi-video.is-hidden { display: none; }
.mpi-video--featured { border-color: var(--mpi-line); }
.mpi-video--featured:hover { transform: none; }

.mpi-player { position: relative; aspect-ratio: 16 / 9; background: #1d1810; }
.mpi-player iframe,
.mpi-lite { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.mpi-lite { padding: 0; margin: 0; cursor: pointer; background: #1d1810; display: block; }
.mpi-lite img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .2s ease; }
.mpi-lite:hover img { opacity: .85; }
.mpi-play {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 64px;
	height: 64px;
	margin: -32px 0 0 -32px;
	border-radius: 50%;
	background: rgba(146, 118, 61, .94);
	box-shadow: 0 4px 16px rgba(0, 0, 0, .35);
	transition: transform .2s ease, background-color .2s ease;
}
.mpi-play::after {
	content: "";
	position: absolute;
	left: 26px;
	top: 20px;
	border-style: solid;
	border-width: 12px 0 12px 19px;
	border-color: transparent transparent transparent #fff;
}
.mpi-lite:hover .mpi-play,
.mpi-lite:focus-visible .mpi-play { transform: scale(1.08); background: var(--mpi-accent); }
.mpi-video--featured .mpi-play { width: 84px; height: 84px; margin: -42px 0 0 -42px; }
.mpi-video--featured .mpi-play::after { left: 34px; top: 26px; border-width: 16px 0 16px 25px; }
.mpi-badge {
	position: absolute;
	left: 14px;
	top: 14px;
	background: var(--mpi-accent);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	padding: 5px 10px;
	border-radius: 3px;
}

.mpi-video__body { padding: 12px 14px 14px; }
.mpi-video__title { margin: 0 0 6px !important; font-size: 16px !important; line-height: 1.4 !important; letter-spacing: 0; text-transform: none; }
.mpi-video__title a { color: var(--mpi-text) !important; text-decoration: none !important; }
.mpi-video__title a:hover { color: var(--mpi-green) !important; }
.mpi-video__date { font-size: 13px; color: var(--mpi-muted); }
.mpi-video--featured .mpi-video__body { padding: 16px 18px 18px; }
.mpi-video--featured .mpi-video__title { font-size: 20px !important; }

.mpi-more-wrap { text-align: center; margin-top: 26px; }
.mpi-more {
	background: var(--mpi-green);
	color: #fff;
	border: 0;
	padding: 12px 28px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .16em;
	text-transform: uppercase;
	cursor: pointer;
	border-radius: 3px;
}
.mpi-more:hover { background: var(--mpi-green-dark); }

.mpi-nav {
	display: flex;
	justify-content: space-between;
	gap: 14px;
	margin-top: 44px;
	padding-top: 22px;
	border-top: 1px solid var(--mpi-line);
}
.mpi-nav a {
	flex: 0 1 48%;
	background: var(--mpi-tile-a);
	color: var(--mpi-text) !important;
	text-decoration: none !important;
	padding: 14px 18px;
	text-transform: uppercase;
	letter-spacing: .12em;
	font-size: 15px;
	transition: background-color .18s ease, color .18s ease;
}
.mpi-nav a small { display: block; font-size: 11px; letter-spacing: .16em; color: var(--mpi-muted); margin-bottom: 3px; }
.mpi-nav a:hover { background: var(--mpi-green); color: #fff !important; }
.mpi-nav a:hover small { color: #f1e7d0; }
.mpi-nav__next { text-align: right; margin-left: auto; }

@media (max-width: 600px) {
	.mpi-back { flex-basis: 100%; }
	.mpi-nav { flex-direction: column; }
	.mpi-nav a { flex-basis: auto; }
	.mpi-video--featured .mpi-video__title { font-size: 17px !important; }
}

/* ---------- Clean portion pages: hide theme demo sidebar, related posts, meta ---------- */
body.single-mpi_parasha .blog-sidebar-wrapper,
body.single-mpi_parasha aside#secondary,
body.single-mpi_parasha .widget-area,
body.single-mpi_parasha .related-posts,
body.single-mpi_parasha .section-related-posts,
body.single-mpi_parasha .entry-categories,
body.single-mpi_parasha .page-header .author,
body.single-mpi_parasha .page-header h4.author {
	display: none !important;
}
body.single-mpi_parasha .single-post-container,
body.single-mpi_parasha .single-post-wrap,
body.single-mpi_parasha .blog-post .col-md-8 {
	float: none !important;
	width: 100% !important;
	max-width: 960px !important;
	flex: 0 0 100% !important;
	margin-left: auto !important;
	margin-right: auto !important;
}
body.single-mpi_parasha .section-blog-info { max-width: 960px; margin-left: auto; margin-right: auto; }
.mpi-intro iframe,
.mpi-intro .wp-block-embed { width: 100%; max-width: 100%; }
.mpi-intro .wp-block-embed__wrapper iframe,
.mpi-intro > iframe { aspect-ratio: 16 / 9; height: auto; }
