/*
 * Inner pages: the new home page's identity on the Elementor / theme pages.
 * Same tokens as ib-home.css (Rubik, navy/blue/orange, white cards with a soft shadow, pentagon
 * section marks, pill buttons). Loaded on every public page except the front page.
 */
:root {
	--ib-navy: #101740;
	--ib-blue: #0561A0;
	--ib-blue-l: #2A86C7;
	--ib-orange: #F27731;
	--ib-yellow: #F2B12E;
	--ib-muted: #5d6789;
	--ib-text: #2f3a5c;
	--ib-line: #E4E9F3;
	--ib-bg: #F6F8FC;
	--ib-cream: #FFF7EC;
	--ib-grad: linear-gradient(135deg, #F68B47 0%, #F27731 55%, #E2621C 100%);
	--ib-grad-text: linear-gradient(120deg, #F27731 10%, #F2B12E 95%);
	--ib-shadow: 0 1px 2px rgb(16 23 64 / 4%), 0 14px 34px -18px rgb(16 23 64 / 28%);
	--ib-shadow-hover: 0 2px 4px rgb(16 23 64 / 5%), 0 22px 40px -20px rgb(16 23 64 / 36%);
	--ib-font: "Rubik", "Noto Sans Arabic", system-ui, sans-serif;
	--ib-pmask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpolygon points='50,10 90,39 75,87 25,87 10,39' fill='black' stroke='black' stroke-width='16' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}

/* ---------- canvas & type ---------- */
body:not(.home) .site-content { background-color: var(--ib-bg); }

body:not(.home) #content :is(p, li, a, label, blockquote, td, th, dd, dt, input, textarea, select, button, h1, h2, h3, h4, h5, h6, span:not([class*="icon"]):not([class*="fa-"]):not([class^="fa"])) {
	font-family: var(--ib-font) !important;
}
/* colours only for builder / theme content — the plugin's own components (forms, gateway) keep theirs */
body:not(.home) #content :is(.elementor-widget:not(.elementor-widget-shortcode), .entry-content > p, .entry-content > ul, .entry-content > ol) :is(p, li, dd):not([class*="ibf"] *) { color: var(--ib-text); line-height: 1.95; }
body:not(.home) #content :is(.elementor-widget:not(.elementor-widget-shortcode), .page-header, .single-post-title) :is(h1, h2, h3, h4, .ekit-heading--title, .elementor-heading-title):not([class*="ibf"] *),
body:not(.home) #content .single-post-title { color: var(--ib-navy); }

/* ---------- section headings (ElementsKit heading) ---------- */
body:not(.home) #content h2.ekit-heading--title {
	font-size: clamp(26px, 3.2vw, 38px) !important;
	font-weight: 900 !important;
	line-height: 1.3 !important;
	letter-spacing: -.3px;
}
body:not(.home) #content h2.ekit-heading--title::before {
	content: "";
	display: inline-block;
	inline-size: .7em;
	block-size: .7em;
	margin-inline-end: .35em;
	vertical-align: -.02em;
	-webkit-mask: var(--ib-pmask);
	mask: var(--ib-pmask);
	background: linear-gradient(135deg, var(--ib-orange), var(--ib-yellow));
}
/* the accent word: orange gradient text, like «فكرتك» in the home hero (no more underline bar) */
body:not(.home) #content .ekit-heading--title span {
	display: inline !important;
	padding: 0 !important;
	background: var(--ib-grad-text) !important;
	background-size: 100% 100% !important;
	-webkit-background-clip: text !important;
	background-clip: text !important;
	color: transparent !important;
	-webkit-text-fill-color: transparent;
}
body:not(.home) #content .ekit-heading__description,
body:not(.home) #content .ekit-heading__description p { color: var(--ib-muted) !important; font-size: 1.05rem; }
body:not(.home) #content .ekit-heading__subtitle,
body:not(.home) #content .elementskit-section-subtitle {
	display: inline-block;
	padding: 4px 14px;
	border-radius: 999px;
	background: #fff1e7;
	color: #b4501a !important;
	font-size: .85rem;
	font-weight: 700;
}
/* decorative "shadow text" behind some headings reads as a faded duplicate paragraph */
body:not(.home) #content .ekit-heading__shadow-text { display: none !important; }

/* ---------- cards ---------- */
.ib-card,
body.page-id-27002 :is(.elementor-element-7414080e, .elementor-element-2c382714, .elementor-element-773b58d3, .elementor-element-756f10c2),
body:not(.home) #content .elementor-widget-elementskit-icon-box .elementskit-infobox,
body:not(.home) #content .elementor-widget-elementskit-funfact .elementskit-funfact,
body:not(.home) #content .elementskit-post-image-card,
body:not(.home) #content .elementskit-accordion .elementskit-card,
body.search #content article,
body.archive #content article {
	background: #fff !important;
	border: 1px solid var(--ib-line) !important;
	border-radius: 20px !important;
	box-shadow: var(--ib-shadow) !important;
	transition: transform .25s ease, box-shadow .25s ease;
}
:is(body.page-id-27002 :is(.elementor-element-7414080e, .elementor-element-2c382714, .elementor-element-773b58d3, .elementor-element-756f10c2),
body:not(.home) #content .elementor-widget-elementskit-icon-box .elementskit-infobox,
body:not(.home) #content .elementskit-post-image-card,
body.search #content article):hover {
	transform: translateY(-3px);
	box-shadow: var(--ib-shadow-hover) !important;
}

/* about: grey full-width bands and the counters' own boxes → page background + cards */
body.page-id-27001 :is(.elementor-element-eb1d5ea, .elementor-element-59cbcf0) { background: transparent !important; }
body.page-id-27001 :is(.elementor-element-d627a43, .elementor-element-810e349) { background: transparent !important; }
body:not(.home) #content .elementskit-funfact { padding: 26px 18px !important; }
body:not(.home) #content .elementskit-funfact :is(.number-percentage-wraper, .number-percentage, .super) {
	font-family: var(--ib-font) !important;
	font-weight: 900 !important;
	color: var(--ib-navy) !important;
}
body:not(.home) #content .elementskit-funfact .funfact-title { color: var(--ib-muted) !important; font-weight: 600; }

/* about: vision / mission accordion */
body:not(.home) #content .elementskit-accordion .elementskit-card { margin-block-end: 14px !important; overflow: hidden; }
body:not(.home) #content .elementskit-accordion .elementskit-card-header,
body:not(.home) #content .elementskit-accordion .ekit-accordion--toggler { background: transparent !important; border: 0 !important; }
body:not(.home) #content .elementskit-accordion .ekit-accordion-title { font-weight: 800 !important; color: var(--ib-navy) !important; }

/* support: icon boxes */
body:not(.home) #content .elementskit-infobox { padding: 30px 26px !important; }
body:not(.home) #content .elementskit-infobox .elementskit-box-header .elementskit-info-box-icon {
	display: inline-grid !important;
	place-items: center;
	inline-size: 62px;
	block-size: 62px;
	border-radius: 18px;
	background: var(--ib-cream);
	margin-block-end: 6px;
}
body:not(.home) #content .elementskit-infobox .elementskit-info-box-title { font-weight: 800 !important; color: var(--ib-navy) !important; }

/* partners: logo cards */
body.page-id-27002 :is(.elementor-element-7414080e, .elementor-element-2c382714, .elementor-element-773b58d3, .elementor-element-756f10c2) { padding: 22px !important; }

/* ---------- images ---------- */
body:not(.home) #content .elementor-widget-image img { border-radius: 22px; }
body.page-id-27002 #content .elementor-widget-image img,
body.page-id-27002 #content .elementor-widget-elementskit-image-swap img { border-radius: 0; }

/* ---------- buttons ---------- */
body:not(.home) #content :is(.elementor-button, .elementskit-btn, .ib-btn),
body.page-id-27004 #content .wpforms-submit {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-block-size: 46px;
	padding: 0 24px !important;
	border: 0 !important;
	border-radius: 999px !important;
	background: var(--ib-grad) !important;
	color: #fff !important;
	font-family: var(--ib-font) !important;
	font-weight: 700 !important;
	box-shadow: 0 10px 22px -12px var(--ib-orange) !important;
	transition: transform .2s ease, box-shadow .2s ease;
}
body:not(.home) #content :is(.elementor-button, .elementskit-btn):hover,
body.page-id-27004 #content .wpforms-submit:hover {
	transform: translateY(-2px);
	box-shadow: 0 14px 26px -12px var(--ib-orange) !important;
}

/* ---------- news cards (ElementsKit blog posts) ---------- */
body:not(.home) #content .elementskit-post-image-card { padding: 14px 14px 20px !important; overflow: hidden; }
body:not(.home) #content .elementskit-post-image-card .elementskit-entry-thumb img { border-radius: 14px; aspect-ratio: 16 / 10; object-fit: cover; }
body:not(.home) #content .elementskit-post-image-card .entry-title,
body:not(.home) #content .elementskit-post-image-card .entry-title a { font-weight: 800 !important; color: var(--ib-navy) !important; line-height: 1.5; }
body:not(.home) #content .elementskit-post-body { padding: 14px 6px 0 !important; }

/* ---------- forms (contact) ---------- */
body.page-id-27004 #content .wpforms-container :is(input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="number"], select, textarea) {
	border: 1.5px solid #cdd6e6 !important;
	border-radius: 14px !important;
	background: #fff !important;
	min-block-size: 50px;
	box-shadow: none !important;
}
body.page-id-27004 #content .wpforms-container :is(input, select, textarea):focus {
	border-color: var(--ib-blue) !important;
	box-shadow: 0 0 0 4px rgb(5 97 160 / 14%) !important;
	outline: 0;
}
body.page-id-27004 #content .wpforms-container .wpforms-field-label { font-weight: 700 !important; color: var(--ib-navy) !important; }

/* contact: the form and the "direct contact" block sit on white cards */
body.page-id-27004 #content .elementor-widget-wpforms,
body.page-id-27004 #content .elementor-widget-text-editor {
	padding: 28px 26px;
	border: 1px solid var(--ib-line);
	border-radius: 22px;
	background: #fff;
	box-shadow: var(--ib-shadow);
}

/* ---------- long text pages (privacy, terms) ---------- */
:is(body.page-id-26998, body.page-id-26997) #content .elementor-widget-text-editor {
	padding: clamp(22px, 4vw, 44px);
	border: 1px solid var(--ib-line);
	border-radius: 24px;
	background: #fff;
	box-shadow: var(--ib-shadow);
}
:is(body.page-id-26998, body.page-id-26997) #content .elementor-widget-text-editor strong { color: var(--ib-navy); }

/* ---------- single post / single initiative (theme templates) ---------- */
body.single-post #content .single-post-title { font-weight: 900 !important; line-height: 1.35; }
body.single-post #content .entry-content > p,
body.single-post #content .entry-content li { font-size: 1.05rem; }
body.single-post #content .entry-content img { border-radius: 18px; }
body.single-post #content .widget {
	padding: 22px;
	border: 1px solid var(--ib-line);
	border-radius: 20px;
	background: #fff;
	box-shadow: var(--ib-shadow);
}

/* ---------- search / archive lists ---------- */
body:is(.search, .archive) #content article { padding: 22px 24px !important; margin-block-end: 18px !important; }
body:is(.search, .archive) #content article .entry-title a { color: var(--ib-navy) !important; font-weight: 800; }

@media (prefers-reduced-motion: reduce) {
	body:not(.home) #content * { transition: none !important; }
}

/* contact: its banner title is an h2 — keep it a banner title, not a section heading */
body.page-id-27004 #content .elementor-element-a1b13b8 h2.ekit-heading--title { font-size: clamp(1.9rem, 4.2vw, 2.9rem) !important; font-weight: 800 !important; }
body.page-id-27004 #content .elementor-element-a1b13b8 h2.ekit-heading--title::before { content: none; }

/* news grid: bootstrap's clearfix pseudo-elements became empty grid cells; equal-height cards */
body:not(.home) #content .row.ekit-blog-posts-content::before,
body:not(.home) #content .row.ekit-blog-posts-content::after { content: none !important; display: none !important; }
body:not(.home) #content .row.ekit-blog-posts-content > [class*="col-"] { display: flex; }
body:not(.home) #content .row.ekit-blog-posts-content > [class*="col-"] > .elementskit-post-image-card { flex: 1; display: flex; flex-direction: column; }
body:not(.home) #content .elementskit-post-image-card .elementskit-post-body { flex: 1; display: flex; flex-direction: column; }
body:not(.home) #content .elementskit-post-image-card .elementskit-post-body .elementskit-btn-wraper,
body:not(.home) #content .elementskit-post-image-card .elementskit-post-body > :last-child { margin-block-start: auto; }

/* page banners (h1): the line under the title stays plain text, not a pill */
body:not(.home) #content .ekit-heading:has(h1) .ekit-heading__subtitle,
body:not(.home) #content .ekit-heading:has(h1) .elementskit-section-subtitle {
	display: block;
	padding: 0;
	border-radius: 0;
	background: none;
	color: var(--ib-blue) !important;
	font-size: 1.05rem;
	font-weight: 500;
}

/* contact: the form card stretched to its column's height and left a blank area under the button */
body.page-id-27004 #content .elementor-widget-wpforms { align-self: flex-start !important; block-size: auto !important; min-block-size: 0 !important; inline-size: 100%; }

/* phones: justified Arabic paragraphs leave wide gaps between words */
@media (max-width: 767px) {
	body:not(.home) #content .elementor-widget:not(.elementor-widget-shortcode) :is(p, li):not([class*="ibf"] *) { text-align: start !important; }
}

/* body text size like the home page (some text blocks were set to ~20px in the builder) */
body:not(.home) #content .elementor-widget-text-editor :is(p, li):not([class*="ibf"] *) { font-size: clamp(1rem, .92rem + .35vw, 1.12rem) !important; }

/* Elementor entrance animations keep blocks hidden (visibility:hidden) until its script runs and the
   block scrolls into view: on a slow connection the title, photos and headings were missing at first,
   then popped in. Show the content immediately and drop the entrance animation. */
.elementor-invisible { visibility: visible !important; }
.elementor-element.animated { animation: none !important; }

/* partners + library: cards touched the screen edge on tablets / narrow laptops */
body.page-id-27002 #content .e-con-inner:has(> :is(.elementor-element-7414080e, .elementor-element-2c382714)),
body.page-id-27002 #content .e-con:has(> :is(.elementor-element-7414080e, .elementor-element-2c382714)),
body.page-id-30980 #content .elementor-element-9eb6a09 { padding-inline: 16px !important; box-sizing: border-box; }
