/**
 * E-book download page (template/ebook-saudi-ecommerce-guide-template.php)
 * and the e-book banner inside blog posts.
 * Colours and type follow the book: ink #131211, brand red #ff433d, General Sans.
 */

.ebook-page,
.ebook-banner {
	--eb-ink: #131211;
	--eb-body: #3a3734;
	--eb-muted: #6f6a64;
	--eb-line: #e4dfd8;
	--eb-paper: #f7f4ef;
	--eb-red: #ff433d;
	--eb-red-dark: #d92b25;
}

.ebook-page {
	color: var(--eb-body);
	overflow-x: clip;
}

.ebook-page h1,
.ebook-page h2,
.ebook-page h3 {
	font-family: "GeneralSans-Semibold", sans-serif;
	font-weight: 600;
	color: var(--eb-ink);
	letter-spacing: -0.02em;
	text-wrap: balance;
}

.ebook-kicker {
	font-family: "GeneralSans-Semibold", sans-serif;
	font-size: 13px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--eb-red);
	margin: 0 0 14px;
}

/* ---------- buttons ---------- */
.ebook-btn {
	display: inline-block;
	background: var(--eb-red);
	color: #fff;
	font-family: "GeneralSans-Semibold", sans-serif;
	font-size: 17px;
	line-height: 1.2;
	padding: 17px 26px;
	border: 0;
	border-radius: 10px;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.ebook-btn:hover,
.ebook-btn:focus-visible {
	background: var(--eb-red-dark);
	color: #fff;
}

.ebook-btn:focus-visible,
.ebook-page a:focus-visible,
.ebook-field input:focus-visible,
.ebook-field select:focus-visible {
	outline: 3px solid #ffb3b0;
	outline-offset: 2px;
}

.ebook-btn:disabled {
	opacity: 0.6;
	cursor: wait;
}

.ebook-btn-dark {
	background: var(--eb-ink);
}

.ebook-btn-dark:hover,
.ebook-btn-dark:focus-visible {
	background: #000;
}

/* ---------- hero ---------- */
.ebook-hero {
	background: var(--eb-ink);
	color: #d8d2c9;
	padding: 34px 0 0;
	position: relative;
}

.ebook-crumbs {
	list-style: none;
	display: flex;
	gap: 8px;
	padding: 0;
	margin: 0 0 44px;
	font-size: 14px;
	color: #a39c92;
}

.ebook-crumbs li + li::before {
	content: "/";
	margin-right: 8px;
}

.ebook-crumbs a {
	color: #a39c92;
	text-decoration: none;
}

.ebook-crumbs a:hover {
	color: #fff;
}

.ebook-page .ebook-h1 {
	color: #fff;
	font-size: clamp(34px, 4.6vw, 60px);
	line-height: 1.04;
	letter-spacing: -0.035em;
	margin: 0 0 22px;
}

.ebook-h1 .ebook-red {
	color: var(--eb-red);
}

.ebook-nb {
	white-space: nowrap;
}

.ebook-jump {
	display: none;
}

.ebook-lead {
	font-size: clamp(17px, 1.5vw, 20px);
	line-height: 1.5;
	color: #d8d2c9;
	max-width: 34em;
	margin: 0 0 26px;
}

.ebook-points {
	list-style: none;
	padding: 0;
	margin: 0 0 34px;
}

.ebook-points li {
	position: relative;
	padding: 0 0 12px 30px;
	font-size: 17px;
	line-height: 1.45;
	color: #f3efe9;
}

.ebook-points i {
	position: absolute;
	left: 0;
	top: 1px;
	color: var(--eb-red);
	font-size: 19px;
}

.ebook-cover-wrap {
	max-width: 330px;
	margin: 0 0 -70px;
	position: relative;
	z-index: 1;
}

.ebook-cover {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 4px;
	box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* ---------- form card ---------- */
.ebook-card {
	background: #fff;
	color: var(--eb-body);
	border-radius: 18px;
	padding: 34px 32px 30px;
	margin-bottom: -70px;
	position: relative;
	z-index: 2;
	box-shadow: 0 30px 70px rgba(0, 0, 0, 0.28);
	scroll-margin-top: 110px;
}

.ebook-page .ebook-card-title {
	font-size: 30px;
	line-height: 1.12;
	margin: 0 0 8px;
}

.ebook-card-sub {
	font-size: 16px;
	line-height: 1.5;
	color: var(--eb-muted);
	margin: 0 0 22px;
}

.ebook-field {
	display: block;
	margin: 0 0 16px;
}

.ebook-field > span {
	display: block;
	font-family: "GeneralSans-Medium", sans-serif;
	font-size: 14px;
	color: var(--eb-ink);
	margin-bottom: 6px;
}

.ebook-field em {
	font-style: normal;
	color: var(--eb-muted);
}

.ebook-field input,
.ebook-field select {
	display: block;
	width: 100%;
	height: 52px;
	padding: 0 14px;
	font-size: 16px;
	color: var(--eb-ink);
	background: #fff;
	border: 1.5px solid #c9c2b8;
	border-radius: 10px;
	appearance: auto;
}

.ebook-field input:focus,
.ebook-field select:focus {
	border-color: var(--eb-ink);
}

.ebook-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.ebook-check {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	font-size: 14px;
	line-height: 1.45;
	color: var(--eb-body);
	margin: 4px 0 20px;
	cursor: pointer;
}

.ebook-check input {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	margin-top: 1px;
	accent-color: var(--eb-red);
}

.ebook-submit {
	width: 100%;
}

.ebook-form-msg {
	margin: 14px 0 0;
	padding: 12px 14px;
	font-size: 15px;
	line-height: 1.4;
	color: #8b1a1a;
	background: #fdecee;
	border: 1px solid #f5c2c0;
	border-radius: 10px;
}

.ebook-small {
	font-size: 13px;
	line-height: 1.45;
	color: var(--eb-muted);
	margin: 14px 0 0;
}

.ebook-done .ebook-btn {
	width: 100%;
}

.ebook-next {
	margin-top: 26px;
	padding-top: 22px;
	border-top: 1px solid var(--eb-line);
}

.ebook-next p {
	font-size: 15px;
	line-height: 1.5;
	margin: 0 0 14px;
}

.ebook-next .ebook-next-title {
	font-family: "GeneralSans-Semibold", sans-serif;
	font-size: 19px;
	color: var(--eb-ink);
	margin-bottom: 6px;
}

.ebook-page [hidden] {
	display: none !important;
}

/* ---------- sections ---------- */
.ebook-section {
	padding: 110px 0 90px;
}

.ebook-hero + .ebook-section {
	padding-top: 160px;
}

.ebook-section-grey {
	background: var(--eb-paper);
}

.ebook-head {
	max-width: 720px;
	margin: 0 0 44px;
}

.ebook-page .ebook-h2 {
	font-size: clamp(30px, 3.4vw, 46px);
	line-height: 1.08;
	margin: 0 0 14px;
}

.ebook-head p:last-child {
	font-size: 19px;
	line-height: 1.5;
	color: var(--eb-muted);
	margin: 0;
}

/* parts and chapters */
.ebook-parts {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 0 48px;
}

.ebook-part {
	border-top: 2px solid var(--eb-ink);
	padding: 18px 0 34px;
}

.ebook-part-wide {
	grid-row: span 2;
}

.ebook-part-label {
	font-family: "GeneralSans-Semibold", sans-serif;
	font-size: 12px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--eb-red-dark);
	margin: 0 0 4px;
}

.ebook-page .ebook-part h3 {
	font-size: 26px;
	line-height: 1.15;
	margin: 0 0 14px;
}

.ebook-part ol {
	list-style: none;
	margin: 0;
	padding: 0;
	counter-reset: none;
}

.ebook-part li {
	display: grid;
	grid-template-columns: 38px 1fr;
	padding: 10px 0;
	border-top: 1px solid var(--eb-line);
	font-size: 17px;
	line-height: 1.4;
	color: var(--eb-ink);
}

.ebook-part li::before {
	content: attr(value);
	font-family: "GeneralSans-Semibold", sans-serif;
	color: var(--eb-red-dark);
}

/* previews */
.ebook-previews {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 22px;
}

.ebook-previews figure {
	margin: 0;
}

.ebook-previews img {
	display: block;
	width: 100%;
	height: auto;
	background: #fff;
	border: 1px solid var(--eb-line);
	border-radius: 6px;
	box-shadow: 0 14px 30px rgba(19, 18, 17, 0.1);
}

.ebook-previews figcaption {
	font-size: 15px;
	line-height: 1.4;
	color: var(--eb-body);
	margin-top: 14px;
}

/* who it is for */
.ebook-who {
	height: 100%;
	background: var(--eb-paper);
	border-radius: 14px;
	padding: 28px 26px;
	margin-bottom: 24px;
}

.ebook-page .ebook-who h3 {
	font-size: 23px;
	line-height: 1.2;
	margin: 0 0 10px;
}

.ebook-who p {
	font-size: 16px;
	line-height: 1.55;
	margin: 0;
}

.ebook-page .row > [class*="col-"] {
	margin-bottom: 0;
}

/* questions */
.ebook-faq {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 0 48px;
}

.ebook-qa {
	border-top: 1px solid #cfc8bd;
	padding: 20px 0 22px;
}

.ebook-page .ebook-qa h3 {
	font-size: 20px;
	line-height: 1.25;
	margin: 0 0 8px;
}

.ebook-qa p {
	font-size: 16px;
	line-height: 1.55;
	margin: 0;
}

.ebook-qa a {
	color: var(--eb-red-dark);
	text-decoration: underline;
}

/* closing */
.ebook-closing {
	background: var(--eb-red);
	color: #fff;
	text-align: center;
	padding: 80px 0;
}

.ebook-page .ebook-closing .ebook-h2 {
	color: #fff;
}

.ebook-closing p {
	font-size: 19px;
	margin: 0 0 26px;
}

.ebook-closing .ebook-btn {
	background: var(--eb-ink);
}

.ebook-closing .ebook-btn:hover,
.ebook-closing .ebook-btn:focus-visible {
	background: #000;
}

/* ---------- banner inside blog posts ---------- */
.ebook-banner {
	display: grid;
	grid-template-columns: 150px 1fr;
	gap: 26px;
	align-items: center;
	background: #131211;
	color: #d8d2c9;
	border-radius: 16px;
	padding: 26px 28px;
	margin: 40px 0;
}

.ebook-banner-cover {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 3px;
	box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5);
}

.ebook-banner p {
	margin: 0;
}

.ebook-banner .ebook-banner-kicker {
	font-family: "GeneralSans-Semibold", sans-serif;
	font-size: 12px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: #ff433d;
	margin-bottom: 8px;
}

.ebook-banner .ebook-banner-title {
	font-family: "GeneralSans-Semibold", sans-serif;
	font-size: 26px;
	line-height: 1.15;
	color: #fff;
	margin-bottom: 8px;
}

.ebook-banner .ebook-banner-desc {
	font-size: 16px;
	line-height: 1.5;
	color: #d8d2c9;
	margin-bottom: 18px;
}

.ebook-banner .ebook-btn {
	padding: 13px 20px;
	font-size: 16px;
	color: #fff;
	text-decoration: none;
}

/* ---------- smaller screens ---------- */
@media (max-width: 991px) {
	.ebook-crumbs {
		margin-bottom: 28px;
	}

	.ebook-cover-wrap {
		display: none;
	}

	.ebook-jump {
		display: inline-block;
		margin: 0 0 28px;
	}

	.ebook-card {
		margin-top: 8px;
		padding: 28px 22px 26px;
	}

	.ebook-section {
		padding: 80px 0 60px;
	}

	.ebook-hero + .ebook-section {
		padding-top: 130px;
	}

	.ebook-previews {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 767px) {
	.ebook-parts,
	.ebook-faq {
		grid-template-columns: 1fr;
	}

	.ebook-part-wide {
		grid-row: auto;
	}

	.ebook-banner {
		grid-template-columns: 1fr;
		padding: 22px;
	}

	.ebook-banner-cover {
		max-width: 130px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ebook-btn {
		transition: none;
	}
}

/* ---------- "check your inbox" panel ---------- */
.ebook-sent-tips {
	margin: 0 0 18px;
	padding: 0 0 0 20px;
	font-size: 15px;
	line-height: 1.5;
	color: var(--eb-body);
}

.ebook-sent-tips li {
	margin-bottom: 4px;
}

.ebook-sent-msg {
	margin: 0 0 14px;
	padding: 10px 12px;
	font-size: 14px;
	line-height: 1.4;
	background: var(--eb-paper);
	border-radius: 8px;
}

.ebook-link {
	display: inline-block;
	background: none;
	border: 0;
	padding: 6px 0;
	margin-right: 22px;
	font-family: "GeneralSans-Medium", sans-serif;
	font-size: 15px;
	color: var(--eb-red-dark);
	text-decoration: underline;
	cursor: pointer;
}

.ebook-link:disabled {
	color: var(--eb-muted);
	text-decoration: none;
	cursor: default;
}

.ebook-link:focus-visible {
	outline: 3px solid #ffb3b0;
	outline-offset: 2px;
}

/* =====================================================================
   E-book offers around the site (inc/ebook-promos.php)
   ===================================================================== */
.ebook-side,
.ebook-band,
.ebook-pop {
	--eb-ink: #131211;
	--eb-body: #3a3734;
	--eb-muted: #6f6a64;
	--eb-line: #e4dfd8;
	--eb-paper: #f7f4ef;
	--eb-red: #ff433d;
	--eb-red-dark: #d92b25;
}

.ebook-side .ebook-banner-kicker,
.ebook-band .ebook-banner-kicker,
.ebook-pop .ebook-banner-kicker {
	font-family: "GeneralSans-Semibold", sans-serif;
	font-size: 12px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: #ff433d;
	margin: 0 0 8px;
}

/* ---------- 1. blog sidebar card ---------- */
.ebook-side {
	background: #131211;
	color: #d8d2c9;
	border-radius: 16px;
	padding: 26px 24px 26px;
	margin-top: 50px;
}

.ebook-side .ebook-side-cover {
	display: block;
	width: 62%;
	max-width: 190px;
	height: auto;
	margin: 0 0 20px;
	border-radius: 3px;
	box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5);
}

.ebook-side p {
	margin: 0;
}

.ebook-side .ebook-side-title {
	font-family: "GeneralSans-Semibold", sans-serif;
	font-size: 23px;
	line-height: 1.18;
	letter-spacing: -0.015em;
	color: #fff;
	margin-bottom: 8px;
}

.ebook-side .ebook-side-desc {
	font-size: 15px;
	line-height: 1.5;
	color: #d8d2c9;
	margin-bottom: 18px;
}

.ebook-side .ebook-btn {
	display: block;
	padding: 14px 18px;
	font-size: 16px;
	color: #fff;
	text-decoration: none;
}

/* ---------- 2 and 3. band on home and service pages ---------- */
.ebook-band-section {
	padding: 30px 0 30px;
}

.ebook-band {
	display: grid;
	grid-template-columns: 260px 1fr;
	gap: 56px;
	align-items: center;
	background: #131211;
	color: #d8d2c9;
	border-radius: 24px;
	padding: 48px 56px;
}

.ebook-band-cover img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 4px;
	box-shadow: 0 24px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.ebook-band .ebook-band-title {
	font-family: "GeneralSans-Semibold", sans-serif;
	font-weight: 600;
	font-size: clamp(26px, 3vw, 40px);
	line-height: 1.08;
	letter-spacing: -0.025em;
	color: #fff;
	margin: 0 0 14px;
	text-wrap: balance;
}

.ebook-band .ebook-band-lead {
	font-size: 18px;
	line-height: 1.5;
	color: #d8d2c9;
	margin: 0 0 18px;
	max-width: 36em;
}

.ebook-band-points {
	list-style: none;
	padding: 0;
	margin: 0 0 26px;
	display: flex;
	flex-wrap: wrap;
	gap: 6px 26px;
}

.ebook-band-points li {
	position: relative;
	padding-left: 26px;
	font-size: 16px;
	line-height: 1.45;
	color: #f3efe9;
}

.ebook-band-points i {
	position: absolute;
	left: 0;
	top: 1px;
	color: #ff433d;
	font-size: 18px;
}

.ebook-band .ebook-btn {
	color: #fff;
	text-decoration: none;
}

/* ---------- 4. menu link ---------- */
.main-menu .menu-item-ebook > a {
	color: #ff433d;
}

/* ---------- 6. pop-up ---------- */
.ebook-pop {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(19, 18, 17, 0.72);
}

.ebook-pop[hidden] {
	display: none;
}

.ebook-pop-box {
	position: relative;
	display: grid;
	grid-template-columns: 200px 1fr;
	gap: 34px;
	align-items: center;
	width: 100%;
	max-width: 720px;
	background: #fff;
	color: #3a3734;
	border-radius: 20px;
	padding: 40px 40px 36px;
	box-shadow: 0 40px 90px rgba(0, 0, 0, 0.45);
}

.ebook-pop-cover {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 3px;
	box-shadow: 0 16px 34px rgba(19, 18, 17, 0.3);
}

.ebook-pop p {
	margin: 0;
}

.ebook-pop .ebook-pop-title {
	font-family: "GeneralSans-Semibold", sans-serif;
	font-size: 28px;
	line-height: 1.12;
	letter-spacing: -0.02em;
	color: #131211;
	margin-bottom: 10px;
	text-wrap: balance;
}

.ebook-pop .ebook-pop-desc {
	font-size: 16px;
	line-height: 1.5;
	margin-bottom: 22px;
}

.ebook-pop .ebook-btn {
	color: #fff;
	text-decoration: none;
}

.ebook-pop-no {
	display: inline-block;
	background: none;
	border: 0;
	padding: 10px 6px;
	margin-left: 14px;
	font-size: 15px;
	color: #6f6a64;
	text-decoration: underline;
	cursor: pointer;
}

.ebook-pop-close {
	position: absolute;
	top: 10px;
	right: 14px;
	width: 40px;
	height: 40px;
	background: none;
	border: 0;
	font-size: 30px;
	line-height: 1;
	color: #6f6a64;
	cursor: pointer;
}

.ebook-pop-close:hover,
.ebook-pop-no:hover {
	color: #131211;
}

.ebook-pop button:focus-visible,
.ebook-side a:focus-visible,
.ebook-band a:focus-visible {
	outline: 3px solid #ffb3b0;
	outline-offset: 2px;
}

@media (max-width: 991px) {
	.ebook-band {
		grid-template-columns: 180px 1fr;
		gap: 32px;
		padding: 34px 30px;
	}
}

@media (max-width: 767px) {
	.ebook-band {
		grid-template-columns: 1fr;
		gap: 24px;
		padding: 28px 22px;
		border-radius: 18px;
	}

	.ebook-band-cover img {
		max-width: 150px;
	}

	.ebook-pop-box {
		grid-template-columns: 1fr;
		gap: 18px;
		padding: 30px 22px 24px;
	}

	.ebook-pop-cover {
		max-width: 110px;
	}

	.ebook-pop .ebook-pop-title {
		font-size: 23px;
	}

	.ebook-pop .ebook-btn {
		display: block;
	}

	.ebook-pop-no {
		display: block;
		margin: 6px auto 0;
	}
}
