/* ==========================================================================
   Bonyan — Elementor theme reproducing the original bonyan-ye.org design
   Colours and fonts come from "إعدادات بنيان" as CSS variables (inc/options.php).
   ========================================================================== */

:root {
	--bn-primary: #006838;
	--bn-accent: #80b957;
	--bn-second: #d7df23;
	--bn-text: #666;
	--bn-heading: #333;
	--bn-font-head: "Cairo", Helvetica, Arial, sans-serif;
	--bn-font-body: "Cairo", Helvetica, Arial, sans-serif;
	--bn-font-size: 14px;
	--bn-sticky-h: 66px;
	--bn-menu-size: 16px;
	--bn-band-over: rgba(0, 0, 0, .26);
	--bn-band-blend: color-dodge;
	--bn-band-title: 30px;
	--bn-footer-bg: #152318;
}

*, *::before, *::after { box-sizing: border-box; }

body {
	margin: 0;
	background: #fff;
	color: var(--bn-text);
	font-family: var(--bn-font-body);
	font-size: var(--bn-font-size);
	font-weight: 300;
	line-height: 1.7em;
	-webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; height: auto; }

a { color: var(--bn-primary); text-decoration: none; }

h1, h2, h3, h4, h5, h6 {
	margin: 0;
	padding-bottom: 10px;
	color: var(--bn-heading);
	font-family: var(--bn-font-head);
	font-weight: 500;
	line-height: 1em;
}
/* Divi's content heading scale (measured on the original site). */
h1 { font-size: 26px; }
h2 { font-size: 23px; }
h3 { font-size: 20px; }
h4 { font-size: 18px; }
h5 { font-size: 16px; }
h6 { font-size: 15px; }

p { margin: 0; padding-bottom: 1em; }
p:last-of-type { padding-bottom: 0; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
.bn-skip:focus {
	clip: auto; width: auto; height: auto;
	z-index: 1000; top: 8px; right: 8px;
	padding: 10px 16px; background: #000; color: #fff;
}

/* Divi grid ------------------------------------------------------------- */
.bn-row {
	position: relative;
	width: 80%;
	max-width: var(--bn-wrap, 1080px);
	margin: auto;
	padding: 27px 0;
}
.bn-row--wide { width: 100%; max-width: 1382px; }
.bn-section { padding: 54px 0; }

/* Navigation (logo + menu) ------------------------------------------------ */
.bn-nav {
	--bn-nav-color: #fff;
	--bn-nav-size: var(--bn-menu-size);
	--bn-drop-bg: #fff;
	--bn-drop-color: #000;
	position: relative;
	display: flex;
	align-items: center;
	gap: 20px;
}
.bn-nav--dark { --bn-nav-color: rgba(0, 0, 0, .6); --bn-nav-size: 14px; }
.bn-nav__logo { display: block; flex-shrink: 0; max-width: 17%; line-height: 0; }
.bn-nav__logo img { display: block; width: 100%; height: auto; max-height: none; }
.bn-nav--dark .bn-nav__logo { max-width: none; }
.bn-nav--dark .bn-nav__logo img { width: auto; height: calc(var(--bn-sticky-h) * .62); }
.bn-nav__menu { margin-inline-start: auto; }

.bn-menu, .bn-menu ul, .bn-mmenu, .bn-mmenu ul { list-style: none; margin: 0; padding: 0; }
.bn-menu { display: flex; flex-wrap: wrap; justify-content: flex-end; }
.bn-menu > li { position: relative; padding: 0 11px; }
.bn-menu > li:last-child { padding-inline-end: 0; }
.bn-menu a {
	display: block;
	color: var(--bn-nav-color);
	font-family: var(--bn-font-head);
	font-size: var(--bn-nav-size);
	font-weight: 600;
	line-height: 1em;
	transition: opacity .4s ease-in-out;
}
.bn-menu > li > a { padding-top: 18px; padding-bottom: 18px; }
.bn-menu > li > a:hover { opacity: .7; }
.bn-menu > .menu-item-has-children > a { padding-inline-end: 18px; position: relative; }
.bn-menu > .menu-item-has-children > a::after {
	content: "";
	position: absolute;
	inset-inline-end: 2px;
	top: 50%;
	width: 6px;
	height: 6px;
	margin-top: -5px;
	border: solid currentColor;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}
.bn-menu .sub-menu {
	position: absolute;
	top: 100%;
	inset-inline-start: 0;
	z-index: 99;
	width: 240px;
	padding: 20px 0;
	background: var(--bn-drop-bg);
	border-top: 3px solid var(--bn-accent);
	box-shadow: 0 2px 5px rgba(0, 0, 0, .1);
	opacity: 0;
	visibility: hidden;
	transition: opacity .2s ease-in-out, visibility .2s;
}
.bn-menu li:hover > .sub-menu, .bn-menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; }
.bn-menu .sub-menu li { padding: 0 20px; }
.bn-menu .sub-menu a { padding: 6px 20px; color: var(--bn-drop-color); font-size: 14px; font-weight: 500; line-height: 1.5em; }
.bn-menu .sub-menu a:hover { background: rgba(0, 0, 0, .03); opacity: .7; }
.bn-menu .sub-menu .sub-menu { top: -23px; inset-inline-start: 240px; }

.bn-nav__toggle {
	display: none;
	margin-inline-start: auto;
	padding: 0;
	background: none;
	border: 0;
	color: var(--bn-nav-color);
	cursor: pointer;
}
.bn-nav__mobile {
	position: absolute;
	top: 100%;
	inset-inline: 0;
	z-index: 9999;
	padding: 5%;
	background: #fff;
	border-top: 3px solid var(--bn-accent);
	box-shadow: 0 2px 5px rgba(0, 0, 0, .1);
}
.bn-mmenu a {
	display: block;
	padding: 10px 5%;
	border-bottom: 1px solid rgba(0, 0, 0, .03);
	color: #000;
	font-family: var(--bn-font-head);
	font-weight: 600;
}
.bn-mmenu .sub-menu a { padding-inline-start: 10%; font-weight: 500; }

/* Fixed white header (appears after scrolling) ---------------------------- */
.bn-sticky {
	position: fixed;
	top: 0;
	inset-inline: 0;
	z-index: 99999;
	background: #fff;
	box-shadow: 0 1px 0 rgba(0, 0, 0, .1);
	transform: translateY(-110%);
	opacity: 0;
	transition: transform .4s ease-in-out, opacity .4s ease-in-out;
}
.admin-bar .bn-sticky { top: 32px; }
.bn-sticky.is-visible { transform: none; opacity: 1; }
.bn-sticky .bn-row { padding: 0; }
.bn-sticky .bn-nav { min-height: var(--bn-sticky-h); }
.bn-sticky .bn-menu > li > a { padding-top: calc((var(--bn-sticky-h) - 14px) / 2); padding-bottom: calc((var(--bn-sticky-h) - 14px) / 2); }

/* Title band (old Divi header layout) ------------------------------------ */
.bn-band {
	position: relative;
	z-index: 10;
	padding: 0 0 54px;
	background-color: var(--bn-band-over);
	background-position: left center;
	background-size: cover;
	background-repeat: no-repeat;
	background-blend-mode: var(--bn-band-blend);
}
.bn-band > .bn-row:first-child { padding-top: 37px; }
.bn-band__title {
	color: #fff;
	font-size: var(--bn-band-title);
	font-weight: 500;
	padding-bottom: 10px;
}

/* Footer contact section ------------------------------------------------- */
.bn-contact {
	padding: 54px 0;
	background-color: #262626;
	background-position: center;
	background-size: cover;
}
.bn-contact__title { color: var(--bn-accent); text-align: center; font-size: 26px; }
.bn-cform {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	width: 58%;
	margin: 0 auto;
}
.bn-cform p { padding: 0; margin: 0 0 3%; }
.bn-cform__half { width: 48.5%; }
.bn-cform__full, .bn-cform__submit, .bn-cform__msg { width: 100%; }
.bn-cform input, .bn-cform textarea {
	width: 100%;
	padding: 16px;
	border: 0;
	border-radius: 10px;
	background: rgba(255, 255, 255, .08);
	color: #fff;
	font-family: var(--bn-font-body);
	font-size: 14px;
	outline: none;
	resize: vertical;
}
.bn-cform input:focus, .bn-cform textarea:focus { background: #85aa50; }
.bn-cform input::placeholder, .bn-cform textarea::placeholder { color: #fff; opacity: .85; }
.bn-cform__submit { text-align: start; }
.bn-cform button {
	padding: .3em 1em;
	background: transparent;
	border: 2px solid var(--bn-accent);
	border-radius: 3px;
	color: var(--bn-accent);
	font-family: var(--bn-font-head);
	font-size: 20px;
	line-height: 1.7em;
	cursor: pointer;
	transition: background .3s;
}
.bn-cform button:hover { background: rgba(255, 255, 255, .08); }
.bn-cform__hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.bn-cform__msg { padding: 10px 14px !important; border-radius: 8px; color: #fff; }
.bn-cform__msg.is-ok { background: rgba(128, 185, 87, .35); }
.bn-cform__msg.is-error { background: rgba(200, 50, 50, .45); }

/* "بنيان: نموذج" widget --------------------------------------------------- */
.bn-form { display: flex; flex-wrap: wrap; gap: 14px; }
.bn-form__group { flex: 0 0 calc(var(--w, 100%) - 14px); flex-grow: 1; margin: 0; }
.bn-form__field {
	width: 100%;
	padding: 16px;
	border: 0;
	background: #eee;
	color: #999;
	font-family: var(--bn-font-body);
	font-size: 14px;
	outline: none;
}
textarea.bn-form__field { resize: vertical; }
.bn-form__submit {
	padding: .3em 1em;
	background: transparent;
	border: 2px solid var(--bn-accent);
	border-radius: 3px;
	color: var(--bn-accent);
	font-family: var(--bn-font-head);
	font-size: 20px;
	line-height: 1.7em;
	cursor: pointer;
}
.bn-form__submit:disabled { opacity: .6; }
.bn-form__hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.bn-form__msg { width: 100%; padding: 10px 14px; border-radius: 6px; }
.bn-form__msg.is-ok { background: rgba(128, 185, 87, .2); color: var(--bn-primary); }
.bn-form__msg.is-error { background: rgba(200, 50, 50, .15); color: #a00; }

/* Footer menus ----------------------------------------------------------- */
.bn-footer { background: var(--bn-footer-bg); color: #fff; }
.bn-footer__cols {
	display: flex;
	justify-content: space-between;
	padding: 37px 0 30px;
}
.bn-footer__col { width: 20.875%; padding-inline-start: 84px; }
.bn-footer__title {
	color: #fff;
	font-size: 20px;
	text-shadow: 0 .08em 0 rgba(0, 0, 0, .4);
	padding-bottom: 22px;
}
.bn-footer__menu { list-style: none; margin: 0; padding: 0; }
.bn-footer__menu a { color: var(--bn-accent); font-size: 14px; line-height: 1.9; }
.bn-footer__menu a:hover { color: #fff; }
.bn-footer__bottom { background: #262626; padding: 4px 0; text-align: center; }
.bn-footer__bottom p { color: #fff; padding: 0; }

.bn-totop {
	position: fixed;
	right: 0;
	bottom: 125px;
	z-index: 99999;
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	padding: 0;
	background: rgba(0, 0, 0, .4);
	border: 0;
	border-radius: 5px 0 0 5px;
	color: #fff;
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transition: all .4s;
}
.bn-totop.is-visible { opacity: 1; visibility: visible; }

/* Post cards -------------------------------------------------------------- */
.bn-posts {
	--bn-cols: 3;
	--bn-gap: 4px;
	display: grid;
	grid-template-columns: repeat(var(--bn-cols), minmax(0, 1fr));
	gap: var(--bn-gap);
}
.bn-card { position: relative; }
.bn-card__media { position: relative; display: block; overflow: hidden; line-height: 0; }
.bn-card__media img { display: block; width: 100%; height: auto; transition: transform .6s ease; }
.bn-card__placeholder { display: block; aspect-ratio: var(--bn-thumb-ratio, 16 / 10); background: #eee; }
.bn-card__title { padding: 0; font-size: 17px; font-weight: 600; line-height: 1.6em; }
.bn-card__title a { color: var(--bn-heading); }
.bn-card__excerpt { padding-top: 8px; }

/* blog: Divi blog grid */
.bn-posts--blog { gap: 5.5% 5.5%; row-gap: 50px; align-items: start; }
.bn-card--blog {
	background: #fff;
	border: 1px solid #d8d8d8;
	box-shadow: 6px 12px 8px -6px rgba(0, 0, 0, .18);
}
.bn-card--blog .bn-card__media img { aspect-ratio: var(--bn-thumb-ratio, 400 / 250); object-fit: cover; }
.bn-card--blog .bn-card__body { padding: 19px; }

/* cards: image + centred caption (gallery) */
.bn-posts--cards { --bn-gap: 5px; row-gap: 8px; }
.bn-card--cards .bn-card__media img { aspect-ratio: 16 / 9; object-fit: cover; }
.bn-card--cards .bn-card__body { padding: 26px 10px; text-align: center; }
.bn-card--cards .bn-card__title { font-size: 18.2px; font-weight: 500; line-height: 1em; }

/* tiles + banner: caption appears on hover */
.bn-card--tiles .bn-card__media img { aspect-ratio: 361 / 183; object-fit: cover; }
.bn-card__overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(0, 104, 56, .75);
	color: #fff;
	font-family: var(--bn-font-head);
	font-size: 20px;
	font-weight: 600;
	line-height: 1.5;
	text-align: center;
	opacity: 0;
	transition: opacity .35s ease;
}
.bn-card:hover .bn-card__overlay { opacity: 1; }
.bn-card:hover .bn-card__media img { transform: scale(1.04); }
.bn-no-zoom .bn-card:hover .bn-card__media img { transform: none; }
.bn-posts--banner { grid-template-columns: 1fr; }
.bn-card--banner .bn-card__media img { aspect-ratio: 1325 / 225; object-fit: cover; }

/* Pagination ------------------------------------------------------------- */
.bn-pagination { margin-top: 50px; }
.bn-pagination ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.bn-pagination a, .bn-pagination span { display: block; padding: 4px 12px; color: var(--bn-heading); border: 1px solid #ddd; }
.bn-pagination .current, .bn-pagination a:hover { background: var(--bn-primary); border-color: var(--bn-primary); color: #fff; }

/* Slider (Divi slider look) ---------------------------------------------- */
.bn-slider { --bn-dots: #fff; --bn-arrows: #fff; position: relative; overflow: hidden; }
.bn-slide {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	background-color: #7ebec5;
	background-position: center;
	background-size: cover;
	opacity: 0;
	visibility: hidden;
	transition: opacity .6s ease, visibility .6s;
}
.bn-slide.is-active { position: relative; opacity: 1; visibility: visible; z-index: 1; }
.bn-slide__overlay { position: absolute; inset: 0; pointer-events: none; }
.bn-slide__inner {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 80%;
	max-width: 1080px;
	margin: auto;
}
.bn-slide__desc { flex: 1; padding: 16% 8%; text-align: center; }
.bn-slide.has-image .bn-slide__desc { flex: 0 0 47.25%; padding-inline: 0; }
.bn-slide__image { flex: 0 0 47.25%; text-align: center; }
.bn-slide__image img { max-height: 500px; width: auto; display: inline-block; }
.bn-slide__title { color: #fff; font-size: 46px; line-height: 1.2em; padding-bottom: 10px; }
.bn-slide__title a { color: inherit; }
.bn-slide__text { color: #fff; font-size: 16px; }
.bn-slide__text h1, .bn-slide__text h2, .bn-slide__text h3 { color: inherit; font-size: inherit; line-height: 1.7em; padding: 0; font-weight: 500; }
.bn-slide__btn {
	display: inline-block;
	margin-top: 20px;
	padding: .3em 1em;
	border: 2px solid #fff;
	border-radius: 3px;
	color: #fff;
	font-family: var(--bn-font-head);
	font-size: 20px;
	line-height: 1.7em;
	transition: background .3s;
}
.bn-slide__btn:hover { background: rgba(255, 255, 255, .2); }
.bn-slider__arrow {
	position: absolute;
	top: 50%;
	z-index: 3;
	margin-top: -24px;
	padding: 0;
	background: none;
	border: 0;
	color: var(--bn-arrows);
	cursor: pointer;
	opacity: 0;
	transition: all .3s ease-in-out;
}
.bn-slider__arrow--prev { right: 22px; }
.bn-slider__arrow--next { left: 22px; }
.bn-slider:hover .bn-slider__arrow { opacity: 1; }
.bn-slider__dots {
	position: absolute;
	bottom: 20px;
	left: 0;
	right: 0;
	z-index: 3;
	display: flex;
	justify-content: center;
	gap: 9px;
}
.bn-slider__dots button {
	width: 7px;
	height: 7px;
	padding: 0;
	border: 0;
	border-radius: 7px;
	background: var(--bn-dots);
	opacity: .5;
	cursor: pointer;
}
.bn-slider__dots button.is-active { opacity: 1; }

/* Elementor content: Divi spacing conventions ---------------------------- */
.elementor-widget-heading .elementor-heading-title { padding-bottom: 10px; }
.elementor-widget-text-editor p { margin: 0; padding-bottom: 1em; }
.elementor-widget-text-editor p:last-child { padding-bottom: 0; }
.elementor-widget-text-editor ul { padding-inline-start: 1em; line-height: 26px; }
.elementor-widget-counter .elementor-counter { flex-direction: column; }
/* Keep suffixes like "41K" in Latin order, as on the original site. */
.elementor-widget-counter .elementor-counter-number-wrapper { direction: ltr; }
.bn-logos .swiper-slide-image { margin-inline: auto; width: 80%; max-height: 190px; object-fit: contain; }
/* Carousels inside flex columns must not stretch the page. */
.e-con > .elementor-widget, .e-con-inner > .elementor-widget { min-width: 0; max-width: 100%; }
.elementor-widget-image-carousel { overflow: hidden; }
body { overflow-x: clip; }

/* Classic content -------------------------------------------------------- */
.bn-prose img { margin-block: 14px; }
.bn-prose h2 { margin-top: 1em; }
.bn-single__thumb { margin: 0 0 30px; }
.bn-single__meta { color: #999; padding-bottom: 20px; }
.bn-fallback-img img { margin-inline: auto; }
.bn-empty { text-align: center; }
.bn-searchform { display: flex; max-width: 460px; margin: 20px auto; }
.bn-searchform input { flex: 1; padding: 10px 14px; border: 1px solid #ddd; font: inherit; }
.bn-searchform button { padding: 0 18px; border: 0; background: var(--bn-primary); color: #fff; font: inherit; cursor: pointer; }

/* Responsive (Divi breakpoints) ------------------------------------------ */
@media (max-width: 980px) {
	/* Like Divi on phones: the white header is always shown at the top. */
	.bn-sticky { position: sticky; transform: none; opacity: 1; }
	.bn-band > .bn-row:first-child { display: none; }
	.bn-band { padding-top: 27px; }
	.bn-nav__menu { display: none; }
	.bn-nav__toggle { display: block; }
	.bn-nav__logo { max-width: 27%; }
	.bn-row { padding: 30px 0; }
	.bn-section, .bn-contact { padding: 50px 0; }
	.bn-posts { --bn-cols: 2 !important; }
	.bn-posts--banner { --bn-cols: 1 !important; }
	.bn-footer__cols { flex-wrap: wrap; gap: 30px 0; }
	.bn-footer__col { width: 47.25%; padding-inline-start: 0; }
	.bn-cform { width: 100%; }
	.bn-slide__inner { flex-direction: column; }
	.bn-slide.has-image .bn-slide__desc, .bn-slide__image { flex-basis: auto; width: 100%; }
	.bn-slide__image { display: none; }
	.bn-slide__title { font-size: 26px; }
}

@media (max-width: 782px) {
	.admin-bar .bn-sticky { top: 46px; }
}

@media (max-width: 767px) {
	.bn-nav__logo { max-width: 41%; }
	.bn-posts { --bn-cols: 1 !important; }
	.bn-footer__col { width: 100%; }
	.bn-cform__half { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; }
}
