/*
 * "The Book" section – Figma "UX/UI Review B2B Egypt Summit Website", node 19:5.
 * Desktop values are the exact Figma values (1920 frame, 1280 content).
 * Fonts Lora, Roboto and Inter are already loaded by the site (Google Fonts).
 *
 * font-family uses !important on purpose: the "Use Any Font" plugin forces its
 * uploaded font ("int" = Inter Regular only) on h1-h6, p, a, li ... with
 * !important site-wide. These rules are scoped to this section only.
 */

.psb-book {
	--psb-green: #79a371;
	--psb-heading: #1c1b1b;
	--psb-body: #363636;
	position: relative;
	box-sizing: border-box;
	width: 100%;
	padding: 106px 0;
	background: #ffffff;
	overflow: hidden; /* contains the dot pattern, which overhangs the content box by 40px */
}

.psb-book *,
.psb-book *::before,
.psb-book *::after {
	box-sizing: border-box;
}

.psb-book__inner {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 108px;
	width: 1280px;
	max-width: 100%;
	min-height: 708px;
	margin: 0 auto;
}

/* Dot pattern: Figma x 1419 / y 600 in the 1920 frame = 40px past the content's right edge, 494px from its top. */
.psb-book__dots {
	position: absolute;
	top: 494px;
	right: -40px;
	z-index: 0;
	width: 221px;
	height: 200px;
	max-width: none;
	object-fit: cover;
	pointer-events: none;
}

.psb-book__text {
	position: relative;
	z-index: 1;
	display: flex;
	flex: 0 1 720px;
	flex-direction: column;
	align-items: flex-start;
	gap: 40px;
	width: 720px;
	min-width: 0;
}

.psb-book__head {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
	width: 100%;
}

.psb-book .psb-book__eyebrow {
	margin: 0;
	padding: 0;
	font-family: "Roboto", sans-serif !important;
	font-size: 16px;
	font-weight: 500;
	line-height: 26px;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--psb-green);
}

.psb-book .psb-book__title {
	width: 100%;
	margin: 0;
	padding: 0;
	font-family: "Lora", serif !important;
	font-size: 50px;
	font-weight: 700;
	font-style: normal;
	line-height: 55px;
	letter-spacing: normal;
	text-transform: none;
	color: var(--psb-heading);
}

.psb-book__body {
	display: flex;
	flex-direction: column;
	gap: 16px;
	width: 100%;
}

.psb-book .psb-book__body p {
	margin: 0;
	padding: 0;
	font-family: "Inter", sans-serif !important;
	font-size: 20px;
	font-weight: 400;
	line-height: 32px;
	color: var(--psb-body);
	overflow-wrap: break-word;
}

/* Button: 225 x 64, 2px border, 5px radius; label 32px from the left edge, chevron 16px after it. */
.psb-book .psb-book__btn {
	display: inline-flex;
	align-items: center;
	gap: 16px;
	width: 225px;
	height: 64px;
	padding: 0 0 0 30px;
	border: 2px solid var(--psb-green);
	border-radius: 5px;
	background: var(--psb-green);
	font-family: "Inter", sans-serif !important;
	font-size: 17px;
	font-weight: 500;
	line-height: 34px;
	text-transform: uppercase;
	text-decoration: none;
	white-space: nowrap;
	color: #ffffff;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

.psb-book .psb-book__btn:hover,
.psb-book .psb-book__btn:focus-visible {
	background: #6a9163;
	border-color: #6a9163;
	color: #ffffff;
	text-decoration: none;
}

.psb-book .psb-book__btn:focus-visible {
	outline: 3px solid var(--psb-heading) !important; /* the theme removes focus outlines on links */
	outline-offset: 3px;
}

.psb-book__chevron {
	display: block;
	flex: none;
	width: 6.08px;
	height: 17px;
	max-width: none;
}

/* Book cover: 450 x 708 frame; the image is cropped exactly as in Figma. */
.psb-book__media {
	position: relative;
	z-index: 1;
	flex: 0 0 450px;
	width: 450px;
	aspect-ratio: 450 / 708;
	overflow: hidden;
}

.psb-book .psb-book__media img {
	position: absolute;
	top: -3.17%;
	left: -25.12%;
	width: 153.21%;
	height: 112.97%;
	max-width: none;
	pointer-events: none;
}

/* ---------- Narrower desktops / laptops: keep the layout, shrink the gap and cover. ---------- */
@media (max-width: 1320px) {
	.psb-book__inner {
		gap: 64px;
		min-height: 0;
		padding: 0 20px;
	}

	.psb-book__media {
		flex: 0 1 450px;
		width: 38%;
	}

	.psb-book__dots {
		right: 0;
		top: auto;
		bottom: 0;
	}
}

/* ---------- Tablet: stack text above the cover. ---------- */
@media (max-width: 1024px) {
	.psb-book {
		padding: 80px 0;
	}

	.psb-book__inner {
		flex-direction: column;
		align-items: flex-start;
		gap: 56px;
		padding: 0 24px;
	}

	.psb-book__text {
		flex: none;
		width: 100%;
		max-width: 720px;
	}

	.psb-book__media {
		flex: none;
		align-self: center;
		width: min(360px, 80%);
	}

	.psb-book__dots {
		display: none;
	}

	.psb-book .psb-book__title {
		font-size: 42px;
		line-height: 48px;
	}
}

/* ---------- Phone ---------- */
@media (max-width: 767px) {
	.psb-book {
		padding: 64px 0;
	}

	.psb-book__inner {
		gap: 48px;
		padding: 0 16px;
	}

	.psb-book__text {
		gap: 32px;
	}

	.psb-book .psb-book__title {
		font-size: 34px;
		line-height: 40px;
	}

	.psb-book .psb-book__body p {
		font-size: 18px;
		line-height: 29px;
	}

	.psb-book__media {
		width: min(300px, 85%);
	}
}
