/*
Theme Name: Zainby Academy
Template: hello-elementor
Description: Child theme of Hello Elementor for zainbyacademy.com. Global type, colour and spacing rules, the mobile contact bar, redirects and metadata live here. Page content stays in Elementor.
Version: 1.0.0
Text Domain: zainby
*/

/* ---------- Tokens ---------- */
:root {
	--zb-green: #0C4A37;
	--zb-forest: #072E22;
	--zb-gold: #C9922F;
	--zb-gold-light: #E0A94A;
	--zb-cream: #F6F2EA; /* paper */
	--zb-line: #DDD5C6;
	--zb-ink: #16201B;
	--zb-body: #3B4741;
	--zb-on-gold: #13241D;
	--zb-on-green: #E6EEE9;
	--zb-surface: #FFFCF6;
	--zb-henna: #9E3B26;
	--zb-gold-text: #8A6417;
	--zb-field-line: #8F887B;
	--zb-serif: "Lora", Georgia, "Times New Roman", serif;
	--zb-sans: "Manrope", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
	--zb-urdu: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", serif;
	--zb-measure: 38rem;
}

/* The Elementor kit ships Roboto as its default. Point the kit variables at the
   site fonts so a widget with no typography set still renders correctly. */
body.elementor-kit-5 {
	--e-global-typography-primary-font-family: "Lora";
	--e-global-typography-primary-font-weight: 600;
	--e-global-typography-secondary-font-family: "Lora";
	--e-global-typography-secondary-font-weight: 600;
	--e-global-typography-text-font-family: "Manrope";
	--e-global-typography-text-font-weight: 400;
	--e-global-typography-accent-font-family: "Manrope";
	--e-global-typography-accent-font-weight: 600;
}

body {
	background: var(--zb-cream);
	color: var(--zb-body);
	font-family: var(--zb-sans);
}

.zb-main { display: block; }

a:focus-visible,
button:focus-visible,
.elementor-button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
	outline: 3px solid var(--zb-green);
	outline-offset: 2px;
}

/* ---------- Type roles (set as a CSS class on the widget) ---------- */
/* body + .elementor-widget beat Elementor's default heading colour (0,3,0) but not a colour set on the widget itself */
body .zb-h1.elementor-widget .elementor-heading-title {
	font-family: var(--zb-serif);
	font-weight: 600;
	font-size: clamp(2.25rem, 5.2vw, 3.6rem);
	line-height: 1.08;
	letter-spacing: -0.01em;
	color: var(--zb-ink);
}
/* body + .elementor-widget beat Elementor's default heading colour (0,3,0) but not a colour set on the widget itself */
body .zb-h2.elementor-widget .elementor-heading-title {
	font-family: var(--zb-serif);
	font-weight: 600;
	font-size: clamp(1.65rem, 3.2vw, 2.3rem);
	line-height: 1.18;
	color: var(--zb-ink);
}
/* body + .elementor-widget beat Elementor's default heading colour (0,3,0) but not a colour set on the widget itself */
body .zb-h3.elementor-widget .elementor-heading-title {
	font-family: var(--zb-serif);
	font-weight: 600;
	font-size: 1.375rem;
	line-height: 1.3;
	color: var(--zb-ink);
}
.zb-label .elementor-heading-title {
	font-family: var(--zb-sans);
	font-weight: 700;
	font-size: 0.875rem;
	line-height: 1.4;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--zb-henna);
}
.zb-h2 .elementor-heading-title a,
.zb-h3 .elementor-heading-title a {
	color: inherit;
	text-decoration: underline;
	text-decoration-color: var(--zb-gold);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}
.zb-h2 .elementor-heading-title a:hover,
.zb-h3 .elementor-heading-title a:hover { text-decoration-thickness: 2px; }

.elementor-widget-text-editor.zb-text,
.elementor-widget-text-editor.zb-lead,
.elementor-widget-text-editor.zb-small,
.elementor-widget-text-editor.zb-facts,
.elementor-widget-text-editor.zb-statement {
	font-family: var(--zb-sans);
	font-weight: 400;
	color: var(--zb-body);
	max-width: var(--zb-measure);
}
.elementor-widget-text-editor.zb-text { font-size: 1.0625rem; line-height: 1.7; }
.elementor-widget-text-editor.zb-lead { font-size: 1.25rem; line-height: 1.55; color: var(--zb-ink); }
.elementor-widget-text-editor.zb-small { font-size: 0.9375rem; line-height: 1.6; }
.elementor-widget-text-editor.zb-wide { max-width: none; }

.elementor-widget-text-editor p { margin: 0 0 1em; }
.elementor-widget-text-editor p:last-child,
.elementor-widget-text-editor ul:last-child,
.elementor-widget-text-editor ol:last-child { margin-bottom: 0; }
.elementor-widget-text-editor ul,
.elementor-widget-text-editor ol { margin: 0 0 1em; padding-left: 1.2em; }
.elementor-widget-text-editor li { margin-bottom: 0.5em; }
.elementor-widget-text-editor li::marker { color: var(--zb-gold); font-weight: 700; }
.zb-text a,
.zb-lead a,
.zb-small a,
.zb-facts a,
.zb-statement a {
	color: var(--zb-green);
	font-weight: 600;
	text-decoration: underline;
	text-decoration-color: var(--zb-gold);
	text-underline-offset: 0.18em;
}

/* Urdu: Nastaliq needs far more line-height than Latin, and no letter-spacing. */
.zb-ur,
[lang="ur"] {
	font-family: var(--zb-urdu);
	direction: rtl;
	letter-spacing: 0;
}
.elementor-widget-text-editor.zb-ur {
	font-size: 1.125rem;
	line-height: 2.3;
	color: var(--zb-green);
	text-align: left;
}
.elementor-widget-text-editor.zb-ur p { margin: 0; }

/* The one display idea: a single large italic statement. */
.elementor-widget-text-editor.zb-statement { max-width: 46rem; }
.zb-statement blockquote {
	margin: 0;
	padding: 0 0 0 1.75rem;
	border-left: 2px solid var(--zb-gold);
}
.zb-statement blockquote p {
	font-family: var(--zb-serif);
	font-style: italic;
	font-weight: 500;
	font-size: clamp(1.6rem, 3.4vw, 2.5rem);
	line-height: 1.3;
	color: var(--zb-green);
	margin: 0 0 0.6em;
}
.zb-statement blockquote footer {
	font-family: var(--zb-sans);
	font-style: normal;
	font-size: 1rem;
	line-height: 1.6;
	color: var(--zb-body);
}

/* Facts as a definition list: term on the left, plain answer on the right. */
.elementor-widget-text-editor.zb-facts { max-width: 52rem; font-size: 1.0625rem; line-height: 1.7; }
.zb-facts dl {
	display: grid;
	grid-template-columns: minmax(9rem, 14rem) 1fr;
	column-gap: 2.5rem;
	margin: 0;
}
.zb-facts dt,
.zb-facts dd {
	margin: 0;
	padding: 1.15rem 0;
	border-top: 1px solid var(--zb-line);
}
.zb-facts dt {
	font-family: var(--zb-serif);
	font-weight: 600;
	font-size: 1.2rem;
	line-height: 1.4;
	color: var(--zb-green);
}

/* ---------- Containers ---------- */
.e-con.zb-rule { border-top: 1px solid var(--zb-line); }
.e-con.zb-row { border-top: 1px solid var(--zb-line); }
.e-con.zb-side { border-left: 1px solid var(--zb-line); }

body .zb-on-green .zb-h1 .elementor-heading-title,
body .zb-on-green .zb-h2 .elementor-heading-title,
body .zb-on-green .zb-h3 .elementor-heading-title { color: var(--zb-cream); }
.zb-on-green .zb-label .elementor-heading-title { color: var(--zb-gold-light); }
.zb-on-green .elementor-widget-text-editor.zb-text,
.zb-on-green .elementor-widget-text-editor.zb-lead,
.zb-on-green .elementor-widget-text-editor.zb-small { color: var(--zb-on-green); }
.zb-on-green .elementor-widget-text-editor.zb-ur { color: var(--zb-gold-light); }
.zb-on-green .zb-text a,
.zb-on-green .zb-lead a,
.zb-on-green .zb-small a { color: var(--zb-cream); }
.zb-on-green .elementor-widget-text-editor li::marker { color: var(--zb-gold-light); }

/* ---------- Images ---------- */
.zb-portrait img { width: 100%; height: auto; border-radius: 4px; }
.zb-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; }
.zb-band img { width: 100%; aspect-ratio: 21 / 8; object-fit: cover; border-radius: 4px; }
.zb-band .widget-image-caption,
.zb-photo .widget-image-caption {
	font-family: var(--zb-sans);
	font-size: 0.875rem;
	font-style: normal;
	color: var(--zb-body);
	text-align: left;
	margin-top: 0.6rem;
}

/* ---------- The two doors ---------- */
.elementor-widget-button.zb-btn .elementor-button,
.elementor-widget-button.zb-btn-wa .elementor-button {
	font-family: var(--zb-sans);
	font-weight: 700;
	font-size: 1rem;
	line-height: 1.2;
	padding: 1rem 1.5rem;
	border-radius: 4px;
	border: 2px solid transparent;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.elementor-widget-button.zb-btn .elementor-button {
	background-color: var(--zb-green);
	border-color: var(--zb-green);
	color: var(--zb-cream);
	fill: var(--zb-cream);
}
.elementor-widget-button.zb-btn .elementor-button:hover,
.elementor-widget-button.zb-btn .elementor-button:focus {
	background-color: var(--zb-forest);
	border-color: var(--zb-forest);
	color: var(--zb-cream);
}
.elementor-widget-button.zb-btn-wa .elementor-button {
	background-color: transparent;
	border-color: var(--zb-green);
	color: var(--zb-green);
	fill: var(--zb-green);
}
.elementor-widget-button.zb-btn-wa .elementor-button:hover,
.elementor-widget-button.zb-btn-wa .elementor-button:focus {
	background-color: var(--zb-green);
	color: var(--zb-cream);
}
.zb-on-green .elementor-widget-button.zb-btn-wa .elementor-button {
	border-color: var(--zb-cream);
	color: var(--zb-cream);
}
.zb-on-green .elementor-widget-button.zb-btn-wa .elementor-button:hover,
.zb-on-green .elementor-widget-button.zb-btn-wa .elementor-button:focus {
	background-color: var(--zb-cream);
	color: var(--zb-green);
}

/* On green panels the primary door turns gold, so it still stands out. */
.zb-on-green .elementor-widget-button.zb-btn .elementor-button {
	background-color: var(--zb-gold-light);
	border-color: var(--zb-gold-light);
	color: var(--zb-on-gold);
	fill: var(--zb-on-gold);
}
.zb-on-green .elementor-widget-button.zb-btn .elementor-button:hover,
.zb-on-green .elementor-widget-button.zb-btn .elementor-button:focus {
	background-color: var(--zb-cream);
	border-color: var(--zb-cream);
	color: var(--zb-green);
}
.zb-on-green a:focus-visible,
.zb-on-green .elementor-button:focus-visible,
.zb-player button:focus-visible { outline-color: var(--zb-gold-light); }

/* ---------- Trial form (Fluent Forms) ---------- */
.zb-form .fluentform .ff-el-input--label label {
	font-family: var(--zb-sans);
	font-weight: 600;
	font-size: 0.9375rem;
	color: var(--zb-ink);
}
.zb-form .fluentform .ff-el-form-control {
	font-family: var(--zb-sans);
	font-size: 1rem;
	color: var(--zb-ink);
	background: var(--zb-surface);
	border: 1px solid var(--zb-field-line);
	border-radius: 4px;
	padding: 0.75rem 0.875rem;
}
.zb-form .fluentform .ff-el-form-control:focus {
	border-color: var(--zb-green);
	box-shadow: 0 0 0 2px rgba(12, 74, 55, 0.18);
}
.zb-form .fluentform .ff-btn-submit {
	background-color: var(--zb-green) !important;
	border: 2px solid var(--zb-green) !important;
	color: var(--zb-cream) !important;
	font-family: var(--zb-sans);
	font-weight: 700;
	font-size: 1rem;
	padding: 1rem 1.5rem;
	border-radius: 4px;
}
.zb-form .fluentform .ff-btn-submit:hover,
.zb-form .fluentform .ff-btn-submit:focus {
	background-color: var(--zb-forest) !important;
	border-color: var(--zb-forest) !important;
	opacity: 1;
}

/* ---------- Icons (WhatsApp button, contact list) ---------- */
.elementor-widget-button.zb-btn-wa .elementor-button-content-wrapper { align-items: center; gap: 0.55em; }
.elementor-widget-button.zb-btn-wa .elementor-button-icon svg { width: 1.2em; height: 1.2em; fill: currentColor; }
.zb-contact .elementor-icon-list-item > a { text-decoration: none; }

/* ---------- Courses page ---------- */
/* Path: pills that jump to each course. */
.elementor-widget-text-editor.zb-path {
	font-family: var(--zb-sans);
	font-size: 1rem;
	line-height: 1.6;
	color: var(--zb-body);
}
.elementor-widget-text-editor.zb-path ol {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6rem 0;
	margin: 0 0 1rem;
	padding: 0;
}
.elementor-widget-text-editor.zb-path li { display: flex; align-items: center; margin: 0; }
.zb-path li + li::before { content: "\2192"; color: var(--zb-gold); font-weight: 700; margin: 0 0.7rem; }
.zb-path li.zb-or::before { content: "or"; color: var(--zb-body); font-weight: 400; }
.zb-path ol a {
	display: inline-block;
	padding: 0.5rem 1rem;
	background: var(--zb-surface);
	border: 1px solid var(--zb-line);
	border-radius: 999px;
	color: var(--zb-green);
	font-weight: 600;
	font-size: 0.9375rem;
	line-height: 1.3;
	text-decoration: none;
}
.zb-path ol a:hover,
.zb-path ol a:focus { border-color: var(--zb-green); }
.zb-path p a {
	color: var(--zb-green);
	font-weight: 600;
	text-decoration: underline;
	text-decoration-color: var(--zb-gold);
	text-underline-offset: 0.18em;
}

/* Two-by-two grid of course cards. */
.e-con.zb-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px;
}
.e-con.zb-card {
	background: var(--zb-surface);
	border: 1px solid var(--zb-line);
	border-radius: 6px;
	scroll-margin-top: 24px;
}
.zb-card .elementor-widget-text-editor.zb-ur { font-size: 1rem; line-height: 2.1; }
.zb-card .elementor-widget-text-editor.zb-small { margin-top: 0.4rem; }

/* Long list split into two columns. */
.zb-cols ul { columns: 2; column-gap: 2.5rem; }
.zb-cols li { break-inside: avoid; }

@media (max-width: 767px) {
	.e-con.zb-grid { grid-template-columns: 1fr; gap: 16px; }
	.zb-cols ul { columns: 1; }
}

/* ---------- Fact tiles (Home, "How lessons work") ---------- */
.e-con.zb-grid.zb-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.zb-card .zb-label .elementor-heading-title { color: var(--zb-henna); }
.zb-card .zb-h3 .elementor-heading-title { font-size: 1.25rem; }
.zb-apps .elementor-icon-list-items { gap: 1rem 0; }
.zb-apps .elementor-icon-list-icon { margin-right: 0.35rem; }

@media (max-width: 1024px) {
	.e-con.zb-grid.zb-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
	.e-con.zb-grid.zb-grid-3 { grid-template-columns: 1fr; gap: 14px; }
}

/* ---------- Audio player (zainby.js builds the controls) ---------- */
.zb-player {
	display: flex;
	align-items: center;
	gap: 1.25rem;
	padding: 1.5rem 1.75rem;
	background: var(--zb-green);
	border-radius: 8px;
}
.zb-player audio { width: 100%; }
.zb-player.is-ready audio { display: none; }
.zb-player .zb-player__btn {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--zb-gold);
	color: var(--zb-on-gold);
	cursor: pointer;
	transition: background-color 0.15s ease;
}
.zb-player .zb-player__btn:hover,
.zb-player .zb-player__btn:focus { background: var(--zb-gold-light); color: var(--zb-on-gold); }
.zb-player__btn svg { width: 30px; height: 30px; fill: currentColor; }
.zb-player .zb-pause { display: none; }
.zb-player.is-playing .zb-pause { display: inline; }
.zb-player.is-playing .zb-play { display: none; }
.zb-player__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.zb-player__title {
	font-family: var(--zb-serif);
	font-weight: 600;
	font-size: 1.125rem;
	line-height: 1.3;
	color: var(--zb-cream);
}
.zb-player__row { display: flex; align-items: center; gap: 0.9rem; }
.zb-player .zb-player__bar {
	flex: 1 1 auto;
	min-width: 0;
	width: auto;
	height: 6px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 3px;
	background: linear-gradient(to right, var(--zb-gold-light) var(--zb-p, 0%), rgba(255, 255, 255, 0.28) var(--zb-p, 0%));
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
}
.zb-player__bar::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--zb-cream);
	border: 0;
}
.zb-player__bar::-moz-range-thumb {
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--zb-cream);
	border: 0;
}
.zb-player__time {
	flex: 0 0 auto;
	font-family: var(--zb-sans);
	font-size: 0.875rem;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
	color: var(--zb-on-green);
}
@media (max-width: 767px) {
	.zb-player { padding: 1.1rem 1.1rem; gap: 0.9rem; }
	.zb-player .zb-player__btn { width: 52px; height: 52px; }
}

/* ---------- Mobile menu (UAE Navigation Menu, header template 98) ---------- */
/* Line up with the page gutter (20px), use the palette line colour, and give the
   open dropdown an edge so it does not melt into the page under it. */
@media (max-width: 767px) {
	/* Closed, the dropdown is hidden but still static and ~200px wide, which squeezed
	   the logo below its set width and made the header jump on open. The plugin's JS
	   sets left/width inline when it opens. */
	.elementor-98 .elementor-element-a1f0c003.elementor-element-a1f0c003 nav.hfe-dropdown { position: absolute; top: calc(100% + 20px); }
	/* 20px = the gap between the toggle and the bottom of the 87px header (150px logo). */
	.elementor-98 .elementor-element-a1f0c003.elementor-element-a1f0c003 nav.hfe-dropdown {
		border-top: 1px solid var(--zb-line);
		border-bottom: 1px solid var(--zb-line);
		box-shadow: 0 10px 18px rgba(22, 32, 27, 0.10);
	}
	.elementor-98 .elementor-element-a1f0c003.elementor-element-a1f0c003 nav.hfe-dropdown li.menu-item:not(:last-child) {
		border-bottom-color: var(--zb-line);
	}
	.elementor-98 .elementor-element-a1f0c003.elementor-element-a1f0c003 nav.hfe-dropdown a.hfe-menu-item {
		padding: 14px 20px;
		font-weight: 600;
	}
}

/* ---------- Privacy page: room above each heading ---------- */
body.page-id-3 .elementor-widget-text-editor + .elementor-widget.zb-h3 { margin-top: 1rem; }

/* ---------- Mobile contact bar ---------- */
.zb-bar { display: none; }

@media (max-width: 767px) {
	.zb-facts dl { grid-template-columns: 1fr; }
	.zb-facts dt { padding-bottom: 0.2rem; }
	.zb-facts dd { border-top: 0; padding-top: 0; }
	.e-con.zb-side { border-left: 0; border-top: 1px solid var(--zb-line); }
	.zb-band img { aspect-ratio: 4 / 3; }
	.zb-doors > .elementor-widget-button { width: 100%; }
	.zb-doors .elementor-button { display: block; width: 100%; text-align: center; }

	body { padding-bottom: 60px; }
	.zb-bar {
		display: flex;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 999;
		background: var(--zb-forest);
		box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.18);
	}
	.zb-bar a {
		flex: 1 1 50%;
		display: flex;
		align-items: center;
		justify-content: center;
		min-height: 60px;
		padding: 0 0.75rem;
		font-family: var(--zb-sans);
		font-weight: 700;
		font-size: 0.9375rem;
		line-height: 1.2;
		text-align: center;
		text-decoration: none;
	}
	.zb-bar .zb-bar__trial { background: var(--zb-gold); color: var(--zb-on-gold); }
	.zb-bar .zb-bar__wa { background: var(--zb-forest); color: var(--zb-cream); }
	/* Already on the trial page: keep only WhatsApp. */
	body.page-id-38 .zb-bar .zb-bar__trial { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; scroll-behavior: auto !important; }
}
