/* ==========================================================================
   Oman School v2 – design refinements
   Loaded after main.css + style.css. Keeps the base theme intact while
   applying the final Arabic typography, article frames, card layout,
   sidebar treatment, dark text and pagination fixes.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tajawal everywhere + consistent responsive weights
   -------------------------------------------------------------------------- */
:root {
	--ef-font: 'Tajawal', 'Cairo', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
	--ef-muted: #1f2937;
}

html,
body,
button,
input,
select,
textarea,
.ef-btn,
.ef-card,
.ef-widget,
.ef-pagination,
.ef-single,
.ef-content,
.ef-menu,
.ef-menu a {
	font-family: 'Tajawal', 'Cairo', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
}

body {
	font-weight: 400;
	letter-spacing: 0;
}

h1,
h2,
h3,
h4,
h5,
h6,
.ef-single__title,
.ef-card__title,
.ef-widget__title,
.ef-results-title,
.ef-section__head h2 {
	font-family: 'Tajawal', 'Cairo', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
	font-weight: 800;
	letter-spacing: 0;
}

.ef-hero__title,
.ef-single__title {
	font-weight: 900;
}

strong,
b,
.ef-btn,
.ef-card__link,
.ef-link-more,
.ef-badge,
.ef-format {
	font-family: 'Tajawal', 'Cairo', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
}

/* --------------------------------------------------------------------------
   2. Dark, readable text on every white surface
   -------------------------------------------------------------------------- */
.ef-breadcrumbs,
.ef-breadcrumbs a,
.ef-breadcrumbs [aria-current="page"],
.ef-results-count,
.ef-section__sub,
.ef-cat-section__desc,
.ef-archive-hero__desc,
.ef-card__excerpt,
.ef-card__meta,
.ef-card__cat,
.ef-card__top,
.ef-widget-list a,
.ef-widget-list .ef-count,
.ef-widget-posts__meta,
.ef-widget-popular a,
.ef-widget__eyebrow,
.ef-single__lead,
.ef-single__meta,
.ef-content,
.ef-content p,
.ef-content li,
.ef-faq__answer,
.ef-faq__answer p,
.ef-page-hero__lead,
.ef-page-hero .ef-breadcrumbs,
.ef-filter__chips,
.ef-filter__chips a,
.ef-select select,
.ef-form-panel__note,
.ef-download__head p,
.ef-empty p,
.ef-404 p,
.ef-contact-cards a {
	color: #0f172a;
}

.ef-card__excerpt,
.ef-single__lead,
.ef-content,
.ef-faq__answer,
.ef-form-panel__note,
.ef-download__head p {
	color: #111827;
}

.ef-widget-posts__meta,
.ef-widget-list .ef-count,
.ef-single__meta {
	color: #1f2937;
}

.ef-breadcrumbs a:hover,
.ef-widget-list a:hover,
.ef-widget-list a.is-active,
.ef-widget-popular a:hover,
.ef-card__title a:hover {
	color: var(--ef-primary);
}

/* Faint icons inside light pills should stay visible. */
.ef-filter__search-icon,
.ef-select > .ef-icon {
	color: #334155;
}

/* Emoji fallback: Tajawal has no emoji glyphs, so use the platform emoji
   font explicitly. This keeps the expressive icons consistent on Windows,
   macOS, Android and Linux. */
.ef-widget__emoji,
.ef-widget-popular__emoji,
.ef-related__emoji,
.ef-popular-item__rank--icon,
.ef-card__media-emoji,
.ef-card__cat > span[aria-hidden="true"],
.ef-badge--cat > span[aria-hidden="true"],
.ef-cat-section__icon,
.ef-footer__list a > span[aria-hidden="true"],
.ef-section__head h2 > span[aria-hidden="true"] {
	font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', 'Android Emoji', sans-serif;
	font-weight: 400;
}

/* --------------------------------------------------------------------------
   3. Article title + metadata top frame
   -------------------------------------------------------------------------- */
.ef-single__head {
	position: relative;
	padding: clamp(20px, 3vw, 30px);
	margin: 0 0 18px;
	border: 1px solid var(--ef-border);
	border-top: 4px solid var(--ef-primary);
	border-radius: 20px;
	background:
		radial-gradient(ellipse at 100% 0%, rgba(37, 99, 235, .09), transparent 42%),
		linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
	box-shadow: 0 22px 48px -34px rgba(15, 23, 42, .55);
}

.ef-single__head .ef-single__badges {
	margin-bottom: 14px;
}

.ef-single__title {
	margin: 0 0 12px;
	color: #0f172a;
	font-size: clamp(1.65rem, 3.6vw, 2.45rem);
	line-height: 1.32;
}

.ef-single__lead {
	max-width: 72ch;
	margin: 0 0 16px;
	font-size: 15.5px;
	line-height: 1.85;
}

.ef-single__meta {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	padding-top: 14px;
	border-top: 1px solid #e8eef7;
	font-size: 12.5px;
	font-weight: 500;
}

.ef-single__meta span {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 5px 11px;
	border: 1px solid #e2e8f0;
	border-radius: 999px;
	background: #f8fafc;
}

.ef-single__meta .ef-icon {
	width: 15px;
	height: 15px;
	color: var(--ef-primary);
}

/* --------------------------------------------------------------------------
   4. White rounded content frame for article text
   -------------------------------------------------------------------------- */
.ef-single .ef-content,
.ef-page .ef-content {
	position: relative;
	padding: clamp(20px, 3.4vw, 38px);
	border: 1px solid var(--ef-border);
	border-radius: 20px;
	background: #ffffff;
	box-shadow: 0 24px 54px -38px rgba(15, 23, 42, .6);
	font-size: 16.5px;
	line-height: 2;
}

.ef-single .ef-content > *:first-child,
.ef-page .ef-content > *:first-child {
	margin-top: 0;
}

.ef-content h2,
.ef-content h3 {
	color: #0f172a;
	font-weight: 800;
}

.ef-content a {
	color: var(--ef-primary);
	font-weight: 500;
}

.ef-single--form .ef-content {
	margin-bottom: 20px;
}

/* --------------------------------------------------------------------------
   5. Featured images: same frame language as the article cards
   -------------------------------------------------------------------------- */
.ef-single__media {
	width: 100%;
	max-width: 100%;
	max-height: none;
	margin: 0 0 18px;
	overflow: hidden;
	border: 1px solid var(--ef-border);
	border-radius: 20px;
	background: #f1f5f9;
	box-shadow: 0 22px 48px -34px rgba(15, 23, 42, .55);
}

.ef-single__media img {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	max-height: none;
	object-fit: contain;
	object-position: center;
}

/* --------------------------------------------------------------------------
   6. Cards: portrait media on the right, text + preview on the left
   -------------------------------------------------------------------------- */
.ef-grid--4 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ef-card {
	position: relative;
	display: grid;
	grid-template-columns: 108px minmax(0, 1fr);
	align-items: stretch;
	gap: 0;
	padding: 0;
	overflow: hidden;
	border: 1px solid var(--ef-border);
	border-radius: 18px;
	background: #ffffff;
	box-shadow: 0 20px 44px -36px rgba(15, 23, 42, .55);
}

.ef-card:hover {
	border-color: #bfdbfe;
	box-shadow: 0 26px 50px -34px rgba(37, 99, 235, .45);
}

.ef-card__media {
	position: relative;
	display: block;
	align-self: center;
	width: 96px;
	height: 128px;
	min-height: 0;
	margin: 12px auto;
	overflow: hidden;
	border: 1px solid var(--ef-border);
	border-radius: 12px;
	background: #f8fafc;
}

.ef-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	padding: 4px;
	object-fit: contain;
	object-position: center;
	transition: filter .3s ease;
}

.ef-card:hover .ef-card__media img {
	filter: brightness(1.03);
}

.ef-card__media-fallback {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 10px;
	background:
		radial-gradient(circle at 20% 15%, rgba(255, 255, 255, .22), transparent 38%),
		radial-gradient(circle at 85% 85%, rgba(255, 255, 255, .15), transparent 40%),
		linear-gradient(135deg, var(--ef-indigo), var(--ef-primary));
	color: #ffffff;
	text-align: center;
}

.ef-card__media-emoji {
	font-size: clamp(26px, 4vw, 38px);
	line-height: 1;
	filter: drop-shadow(0 6px 12px rgba(15, 23, 42, .35));
}

.ef-card__media-label {
	max-width: 96%;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.45;
	opacity: .95;
}

.ef-card__body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
	padding: 15px 15px 14px;
}

.ef-card__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 6px;
	min-height: 20px;
	margin: 0;
}

.ef-card__cat {
	max-width: 68%;
	padding: 3px 8px;
	background: #eff6ff;
	color: var(--ef-indigo);
	font-size: 10.5px;
	font-weight: 700;
}

.ef-card__title {
	display: block;
	min-height: 0;
	margin: 0;
	overflow: visible;
	color: #0f172a;
	font-size: 1rem;
	font-weight: 800;
	line-height: 1.5;
	overflow-wrap: break-word;
	word-break: normal;
}

.ef-card__meta {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: auto;
	padding-top: 0;
	font-size: 10.5px;
	font-weight: 500;
}

.ef-card__actions {
	display: flex;
	justify-content: flex-end;
	margin-top: 4px;
}

.ef-card__preview {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 13px;
	border: 1px solid var(--ef-primary);
	border-radius: 10px;
	background: var(--ef-primary);
	color: #ffffff;
	font-size: 12px;
	font-weight: 800;
	line-height: 1.2;
	box-shadow: 0 12px 24px -16px rgba(37, 99, 235, .85);
	transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}

.ef-card__preview:hover {
	border-color: var(--ef-primary-dark);
	background: var(--ef-primary-dark);
	color: #ffffff;
	transform: translateY(-1px);
}

.ef-card__preview .ef-icon {
	width: 14px;
	height: 14px;
}

/* Keep the category heading area tidy on the homepage section. */
.ef-cat-section__head h2 {
	font-weight: 800;
}

.ef-cat-section__head h2 a {
	color: #0f172a;
}

.ef-cat-section__desc {
	font-size: 12.5px;
	line-height: 1.75;
}

/* --------------------------------------------------------------------------
   7. Sidebar cards + bold emoji headings
   -------------------------------------------------------------------------- */
.ef-widget,
.ef-widget--category {
	padding: 18px;
	border: 1px solid #dbeafe;
	border-radius: 18px;
	background: linear-gradient(180deg, #eff6ff 0%, #ffffff 58%);
	box-shadow: 0 20px 44px -38px rgba(37, 99, 235, .55);
}

.ef-widget__title {
	margin: 0;
	color: var(--ef-navy);
	font-size: 15px;
	font-weight: 800;
	line-height: 1.4;
}

.ef-widget__title a,
.ef-widget__title a:hover,
.ef-widget__title a:focus-visible {
	color: var(--ef-navy);
}

.ef-widget__title--solo {
	display: flex;
	align-items: center;
	gap: 9px;
	margin: 0 0 14px;
	padding: 9px 12px;
	border: 0;
	border-radius: 12px;
	background: var(--ef-navy);
	color: #ffffff;
	font-size: 15px;
	font-weight: 800;
}

.ef-widget__title--solo .ef-widget__emoji--sm {
	border-color: rgba(255, 255, 255, .26);
	background: rgba(255, 255, 255, .16);
	color: #ffffff;
}

.ef-widget__title--solo a,
.ef-widget__title--solo a:hover {
	color: #ffffff;
}

.ef-widget__emoji {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 42px;
	height: 42px;
	border: 1px solid #bfdbfe;
	border-radius: 11px;
	background: #dbeafe;
	font-size: 21px;
	line-height: 1;
}

.ef-widget__emoji--sm {
	width: 32px;
	height: 32px;
	border-radius: 9px;
	background: #dbeafe;
	font-size: 17px;
}

.ef-widget__eyebrow {
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: .2px;
}

.ef-widget-list a {
	padding: 9px 2px;
	font-weight: 600;
}

.ef-widget-popular {
	gap: 11px;
}

.ef-widget-popular__rank {
	width: 23px;
	height: 23px;
	border: 1px solid #bfdbfe;
	background: #eff6ff;
	color: var(--ef-indigo);
	font-weight: 800;
}

.ef-widget-popular a {
	display: flex;
	align-items: flex-start;
	gap: 6px;
	color: var(--ef-navy);
	font-weight: 600;
	line-height: 1.55;
}

.ef-widget-popular a:hover,
.ef-widget-popular a:focus-visible {
	color: var(--ef-navy);
	text-decoration: underline;
	text-decoration-color: rgba(37, 99, 235, .45);
	text-underline-offset: 3px;
}

/* The meta line is still used by the "most viewed" widget. */
.ef-widget-posts__meta {
	margin-top: 2px;
	font-size: 10.5px;
	font-weight: 500;
}

.ef-widget-popular__emoji {
	flex: none;
	font-size: 12px;
	line-height: 1.6;
}

/* --------------------------------------------------------------------------
   8. Related forms – same card language and emoji heading
   -------------------------------------------------------------------------- */
.ef-related {
	margin: 34px 0;
	padding: 20px;
	border: 1px solid #dbeafe;
	border-radius: 18px;
	background: linear-gradient(180deg, #eff6ff 0%, #ffffff 58%);
	box-shadow: 0 20px 44px -38px rgba(37, 99, 235, .55);
	min-width: 0;
}

.ef-related__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 14px;
	padding: 9px 14px;
	border: 0;
	border-radius: 12px;
	background: var(--ef-navy);
	color: #ffffff;
}

.ef-related__title {
	display: flex;
	align-items: center;
	gap: 9px;
	min-width: 0;
	margin: 0;
	padding: 0;
	color: #ffffff;
	font-size: 1.1rem;
	font-weight: 800;
}

.ef-related__head .ef-link-more,
.ef-related__head .ef-link-more:hover {
	color: #ffffff;
}

.ef-related__head .ef-related__emoji {
	border-color: rgba(255, 255, 255, .26);
	background: rgba(255, 255, 255, .16);
	color: #ffffff;
}

.ef-related__grid {
	margin: 0;
}

.ef-related__grid > .ef-popular-item:only-child {
	grid-column: 1 / -1;
}

.ef-popular-item__rank--icon {
	font-size: 15px;
	line-height: 1;
}

.ef-related__emoji {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 34px;
	height: 34px;
	border: 1px solid #bfdbfe;
	border-radius: 9px;
	background: #dbeafe;
	font-size: 17px;
	line-height: 1;
}

/* --------------------------------------------------------------------------
   9. Footer CTA matches the primary site color
   -------------------------------------------------------------------------- */
.ef-footer__cta {
	border: 0;
	border-radius: 10px;
	background: var(--ef-primary);
	color: #ffffff;
	font-weight: 800;
	box-shadow: 0 14px 28px -18px rgba(37, 99, 235, .9);
}

.ef-footer__cta:hover {
	background: var(--ef-primary-dark);
	color: #ffffff;
}

/* --------------------------------------------------------------------------
   10. Pagination: no stretched links, tidy responsive layout
   -------------------------------------------------------------------------- */
.ef-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	flex-wrap: wrap;
	margin: 30px 0 8px;
	padding: 0;
}

.ef-pagination .ef-page {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	min-width: 36px;
	height: 36px;
	padding: 0 10px;
	border: 1px solid var(--ef-border);
	border-radius: 9px;
	background: #ffffff;
	color: #0f172a;
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
	white-space: nowrap;
}

.ef-pagination .ef-page:hover {
	border-color: #bfdbfe;
	background: #eff6ff;
	color: var(--ef-indigo);
}

.ef-pagination .ef-page.is-current {
	border-color: var(--ef-primary);
	background: var(--ef-primary);
	color: #ffffff;
}

.ef-pagination .ef-page--dots {
	min-width: 24px;
	padding: 0 4px;
	border-color: transparent;
	background: transparent;
}

.ef-pagination .ef-page.is-disabled {
	opacity: .4;
	pointer-events: none;
}

.ef-pagination .ef-page .ef-icon {
	width: 15px;
	height: 15px;
}

/* --------------------------------------------------------------------------
   11. Small-screen alignment for article frames and images
   -------------------------------------------------------------------------- */
@media (max-width: 1120px) {
	.ef-grid--4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 720px) {
	.ef-single__head {
		padding: 18px 16px;
		border-radius: 16px;
	}

	.ef-single .ef-content,
	.ef-page .ef-content {
		padding: 20px 16px;
		border-radius: 16px;
		font-size: 16px;
		line-height: 1.95;
	}

	.ef-single__media {
		width: 100%;
		max-width: 100%;
		margin: 0 0 14px;
		border-radius: 16px;
	}

	.ef-single__media img {
		width: 100%;
		max-width: 100%;
		height: auto;
		max-height: none;
		border-radius: 0;
	}

	.ef-single__title {
		font-size: clamp(1.45rem, 6.2vw, 1.9rem);
	}

	.ef-single__meta {
		gap: 6px;
		font-size: 11.5px;
	}

	.ef-single__meta span {
		padding: 4px 9px;
	}

	.ef-card__body {
		gap: 6px;
		padding: 12px 12px 11px;
	}

	.ef-card {
		grid-template-columns: 100px minmax(0, 1fr);
	}

	.ef-card__media {
		width: 92px;
		height: 124px;
		margin: 10px auto;
	}

	.ef-card__preview {
		padding: 7px 11px;
		font-size: 11.5px;
	}

	.ef-grid--4 {
		grid-template-columns: 1fr;
	}

	.ef-share {
		padding: 12px;
		gap: 8px 10px;
	}

	.ef-share__btn {
		width: 40px;
		height: 40px;
	}

	.ef-comments {
		padding: 16px;
		border-radius: 16px;
	}

	.ef-comments .children {
		padding-inline-start: 12px;
	}

	.ef-pagination {
		gap: 4px;
		margin-top: 24px;
	}

	.ef-pagination .ef-page {
		min-width: 32px;
		height: 32px;
		padding: 0 7px;
		border-radius: 8px;
		font-size: 12px;
	}

	.ef-pagination .ef-page--dots {
		min-width: 20px;
		padding: 0 2px;
	}
}

@media (max-width: 380px) {
	.ef-pagination .ef-page {
		min-width: 30px;
		height: 30px;
		padding: 0 5px;
	}

	.ef-pagination .ef-page--dots {
		min-width: 16px;
		padding: 0;
	}
}

/* --------------------------------------------------------------------------
   12. Mobile overflow guards
   Keeps every homepage box, grid and widget inside the phone viewport even
   with long Arabic titles, so the page never scrolls horizontally.
   -------------------------------------------------------------------------- */
.ef-card,
.ef-cat-card,
.ef-widget,
.ef-popular-item,
.ef-section,
.ef-cat-section,
.ef-layout,
.ef-filter {
	min-width: 0;
}

.ef-card__body,
.ef-card__top,
.ef-card__meta,
.ef-section__head > *,
.ef-cat-section__head > *,
.ef-cat-section__title-wrap,
.ef-cat-section__title-wrap > div,
.ef-widget__head > div,
.ef-single__meta,
.ef-chips {
	min-width: 0;
}

.ef-card__title,
.ef-cat-card h3,
.ef-cat-section__head h2,
.ef-section__head h2,
.ef-widget__title,
.ef-single__title {
	overflow-wrap: anywhere;
}

.ef-card__preview {
	max-width: 100%;
}
