/**
 * Home page blocks: hero slider, bands (books, events, authors, staff picks,
 * publishing covers), publishing panel, kids tabs and the wide banner.
 * Card internals come from Diwan Core (books.css, events.css, kids.css);
 * this file is the layout Elementor used to hold in each section's settings.
 */

/* ------------------------------------------------------------------ hero */

.diwan-home-hero {
	margin: 0;
	position: relative;
	overflow: hidden;
	background: var(--diwan-wood, #3b0f00);
}

.diwan-home-hero__track {
	display: grid;
}

.diwan-home-hero__slide {
	grid-area: 1 / 1;
	position: relative;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.6s ease, visibility 0s linear 0.6s;
}

.diwan-home-hero__slide.is-active {
	opacity: 1;
	visibility: visible;
	transition: opacity 0.6s ease;
}

.diwan-home-hero__picture,
.diwan-home-hero__image {
	display: block;
	inline-size: 100%;
}

.diwan-home-hero__image {
	block-size: clamp(var(--diwan-hero-min, 260px), calc(100svh - var(--diwan-hero-above, 252px) - var(--diwan-hero-tail, 16px)), var(--diwan-hero-max, 720px));
	object-fit: cover;
}

.diwan-home-hero__button {
	position: absolute;
	inset-block-end: 39px;
	inset-inline-start: 50%;
	transform: translateX(-50%);
	background: var(--diwan-canvas, #faf7db);
	border: 1px solid var(--diwan-canvas, #faf7db);
	border-radius: var(--diwan-radius-sm, 4px);
	color: var(--diwan-wood, #3b0f00);
	font-family: var(--diwan-font-button, "Loew", "Tajawal", system-ui, sans-serif);
	font-size: var(--wp--preset--font-size--md, 15px);
	font-weight: 600;
	padding: 8px 26px;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 0.16s ease, color 0.16s ease;
}

html[dir="rtl"] .diwan-home-hero__button {
	transform: translateX(50%);
}

.diwan-home-hero__button:hover,
.diwan-home-hero__button:focus-visible {
	background: var(--diwan-hover, #e0b070);
	border-color: var(--diwan-hover, #e0b070);
	color: var(--diwan-hover-text, #3b0f00);
}

.diwan-home-hero button.diwan-run__btn {
	inset-block-start: 50%;
	border-radius: 0;
	inline-size: 40px;
	block-size: 40px;
}

.diwan-home-hero .diwan-run__btn--prev {
	inset-inline-start: 10px;
}

.diwan-home-hero .diwan-run__btn--next {
	inset-inline-end: 10px;
}

.diwan-home-hero__dots {
	position: absolute;
	inset-block-end: 3px;
	inset-inline: 0;
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
}

button.diwan-home-hero__dot {
	display: grid;
	place-items: center;
	inline-size: 24px;
	block-size: 24px;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}

button.diwan-home-hero__dot::after {
	content: "";
	inline-size: 6px;
	block-size: 6px;
	border-radius: 50%;
	background: var(--diwan-white, #fff);
	opacity: 0.5;
}

button.diwan-home-hero__dot.is-active::after {
	opacity: 1;
}

@media (max-width: 1024px) {

	.diwan-home-hero__image {
		--diwan-hero-tail: 150px;
	}
}

@media (max-width: 900px) {

	.diwan-home-hero__image {
		--diwan-hero-min: 220px;
		--diwan-hero-max: 440px;
	}
}

@media (max-width: 767px) {

	.diwan-home-hero__image {
		--diwan-hero-tail: 120px;
	}

	.diwan-home-hero__button {
		inset-block-end: 34px;
		font-size: var(--wp--preset--font-size--base, 14px);
	}

	.diwan-home-hero button.diwan-run__btn {
		display: none;
	}
}

@media (min-width: 1025px) {

	.diwan-hero-full-desktop .diwan-home-hero__image {
		--diwan-hero-max: 100svh;
		--diwan-hero-tail: 0px;
	}
}

@media (min-width: 768px) and (max-width: 1024px) {

	.diwan-hero-full-tablet .diwan-home-hero__image {
		--diwan-hero-max: 100svh;
		--diwan-hero-tail: 0px;
	}
}

@media (max-width: 767px) {

	.diwan-hero-full-phone .diwan-home-hero__image {
		--diwan-hero-max: 100svh;
		--diwan-hero-tail: 0px;
	}
}

/* ------------------------------------------------------------------ bands */

.diwan-home-band {
	padding-block: var(--wp--preset--spacing--40, 32px) 44px;
	background: var(--diwan-white, #fff);
}

.diwan-home-band--paper {
	background: var(--diwan-band, #fafafa);
}

/* Count the sections actually rendered, including an optional wide banner. */
.diwan-home-sections > :nth-child(odd of .diwan-home-band--arabic-bestsellers, .diwan-home-band--arabic-bestsellers ~ section:not([hidden])) {
	background-color: var(--diwan-white, #fff);
}

.diwan-home-sections > :nth-child(even of .diwan-home-band--arabic-bestsellers, .diwan-home-band--arabic-bestsellers ~ section:not([hidden])) {
	background-color: var(--diwan-band, #fafafa);
}

.diwan-band__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--20, 16px);
	margin-block-end: var(--wp--preset--spacing--20, 16px);
}

.diwan-band__head--center {
	justify-content: center;
	text-align: center;
	margin-block-end: 22px;
}

.diwan-band__head--center .diwan-band__titles {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.diwan-band__heading {
	color: var(--diwan-blue, #246b8f);
	font-family: var(--diwan-font-display, "TAY", "Tajawal", system-ui, sans-serif);
	font-size: var(--wp--preset--font-size--xl, 24px);
	font-weight: 700;
	letter-spacing: 0.02em;
	line-height: 1.15;
	margin: 0;
	text-transform: uppercase;
}

.diwan-band__rule {
	display: block;
	inline-size: 42px;
	block-size: 3px;
	margin-block-start: 14px;
	background: var(--diwan-black, #000);
}

.diwan-home-band .diwan-band__tagline {
	color: var(--diwan-text-soft, #444);
	font-size: var(--wp--preset--font-size--md, 15px);
	line-height: 1.4;
	margin: 6px 0 0;
}

.diwan-home-band--arabic-bestsellers .diwan-band__tagline {
	color: var(--diwan-text-soft, #444);
}

.diwan-home-band .diwan-books__all {
	color: var(--diwan-text, #000);
	font-family: var(--diwan-font-button, "Loew", "Tajawal", system-ui, sans-serif);
	font-size: var(--wp--preset--font-size--base, 14px);
	font-weight: 700;
	letter-spacing: 0.06em;
	text-decoration: underline;
	text-underline-offset: 4px;
	text-transform: uppercase;
	white-space: nowrap;
	padding-inline-end: 14px;
}

.diwan-band__all {
	margin: 28px 0 0;
	text-align: center;
}

.diwan-home-band__button.diwan-button {
	font-family: var(--diwan-font-button, "Loew", "Tajawal", system-ui, sans-serif);
	font-size: var(--wp--preset--font-size--base, 14px);
	font-weight: 700;
	letter-spacing: 0.08em;
	padding: 12px 30px;
	text-decoration: none;
	text-transform: uppercase;
}

html[dir="rtl"] .diwan-band__heading,
html[dir="rtl"] .diwan-home-band .diwan-books__all,
html[dir="rtl"] .diwan-home-band__button.diwan-button,
html[dir="rtl"] button.diwan-home-tabs__tab {
	letter-spacing: 0;
}

/* -------------------------------------------------------------- the run */

.diwan-run {
	position: relative;
	padding-inline: 70px;
}

.diwan-run--book {
	--diwan-book-columns: 6;
	--diwan-book-gap: 58px;
	--diwan-book-width: calc((100% - (var(--diwan-book-columns) - 1) * var(--diwan-book-gap)) / var(--diwan-book-columns));
}

.diwan-run--book .diwan-run__track {
	grid-auto-columns: var(--diwan-book-width);
	column-gap: var(--diwan-book-gap);
}

.diwan-run__track {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: calc((100% - 5 * var(--diwan-run-gap, 58px)) / 6);
	gap: var(--diwan-run-gap, 58px);
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	padding-block: 2px 6px;
}

.diwan-run__track::-webkit-scrollbar {
	display: none;
}

.diwan-run__dots:not([hidden]) {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	margin-block-start: 8px;
}

.diwan-run__dots button {
	display: grid;
	place-items: center;
	min-width: 24px;
	min-height: 24px;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.diwan-run__dots button::after {
	content: "";
	display: block;
	inline-size: 8px;
	block-size: 8px;
	border-radius: 50%;
	background: currentColor;
	opacity: .25;
}

.diwan-run__dots button[aria-current="true"]::after {
	opacity: 1;
}

.diwan-run__slide {
	scroll-snap-align: start;
	min-inline-size: 0;
	display: flex;
}

.diwan-run__slide > * {
	inline-size: 100%;
}

/*
 * Upcoming Events and Book Clubs with every card on the screen (Ahmad, 25
 * November 2026): the cards sit where Events settings says, at the start of
 * the line (as they fall), in the middle or at its end. Only while they all
 * fit: a run that scrolls needs its cards from the start.
 */
.diwan-run--align-center.diwan-run--fits .diwan-run__track {
	justify-content: center;
}

.diwan-run--align-end.diwan-run--fits .diwan-run__track {
	justify-content: end;
}

.diwan-run--event,
.diwan-run--author {
	padding-inline: 52px;
}

.diwan-run--event .diwan-run__track {
	--diwan-run-gap: var(--wp--preset--spacing--30, 24px);
	grid-auto-columns: calc((100% - 3 * 24px) / 4);
}

.diwan-home-band--book-clubs .diwan-run--event .diwan-run__track {
	grid-auto-columns: calc((100% - 2 * 24px) / 3);
}

.diwan-run--author .diwan-run__track {
	--diwan-run-gap: var(--wp--preset--spacing--30, 24px);
	grid-auto-columns: calc((100% - 8 * 24px) / 9);
}

.diwan-run--cover .diwan-run__track {
	--diwan-run-gap: 52px;
}

button.diwan-run__btn {
	position: absolute;
	inset-block-start: 40%;
	transform: translateY(-50%);
	z-index: 5;
	inline-size: 40px;
	block-size: 40px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	background: var(--diwan-white, #fff);
	border: 1px solid var(--diwan-border-strong, #d5d5d5);
	border-radius: 2px;
	color: var(--diwan-text, #000);
	cursor: pointer;
	transition: background-color 0.16s ease, color 0.16s ease, opacity 0.16s ease;
}

button.diwan-run__btn:hover,
button.diwan-run__btn:focus-visible {
	background: var(--diwan-hover, #e0b070);
	border-color: var(--diwan-hover, #e0b070);
	color: var(--diwan-hover-text, #3b0f00);
}

button.diwan-run__btn[disabled] {
	opacity: 0.35;
	cursor: default;
}

.diwan-run__btn--prev {
	inset-inline-start: 0;
}

.diwan-run__btn--prev svg {
	transform: rotate(180deg);
}

.diwan-run__btn--next {
	inset-inline-end: 0;
}

html[dir="rtl"] .diwan-run__btn--prev svg {
	transform: none;
}

html[dir="rtl"] .diwan-run__btn--next svg {
	transform: rotate(180deg);
}

.diwan-run--author button.diwan-run__btn,
.diwan-run--event button.diwan-run__btn {
	inset-block-start: 50%;
}

/* ------------------------------------------------------------ the cards */

.diwan-run .e-loop-item.diwan-card-item {
	block-size: 100%;
}

.diwan-run .diwan-book-card__name .elementor-heading-title {
	-webkit-box-orient: vertical;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
}

/* Events */
.diwan-run--event .diwan-event-card {
	position: relative;
	block-size: 100%;
	border: 1px solid var(--diwan-border, #e6e6e6);
	border-radius: 4px;
	background: var(--diwan-white, #fff);
	overflow: hidden;
}

.diwan-event-card__built {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 12px 12px 22px;
	position: relative;
	block-size: 100%;
	box-sizing: border-box;
}

.diwan-event-card__cover-widget {
	aspect-ratio: 270 / 152;
	overflow: hidden;
	background: var(--diwan-surface-sunken, #f4f3f1);
}

.diwan-home-band--book-clubs .diwan-event-card__cover-widget {
	aspect-ratio: 376 / 212;
}

.diwan-event-card__cover-widget img {
	block-size: 100%;
	display: block;
	inline-size: 100%;
	object-fit: cover;
}

.diwan-event-card__built > .diwan-event-tag {
	position: absolute;
	inset-block-start: 12px;
	inset-inline-end: 12px;
	z-index: 2;
	padding: 6px 12px;
}

.diwan-event-card__built .diwan-event-card__meta {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 10px;
	list-style: none;
	margin: 6px 0 0;
	padding: 0;
	font-size: var(--wp--preset--font-size--text, 16px);
	color: var(--diwan-text-muted, #6e6e6e);
}

.diwan-event-card__meta li {
	display: flex;
	align-items: center;
	gap: 10px;
	min-block-size: 20px;
}

.diwan-event-card__meta .diwan-icon {
	color: var(--diwan-text-muted, #6e6e6e);
	flex: none;
}

.diwan-event-card__built .diwan-event-card__name {
	font-family: var(--diwan-font-card, var(--diwan-font-body));
	font-size: var(--wp--preset--font-size--text-lg, 17px);
	font-weight: 600;
	line-height: 1.35;
	margin: 6px 0 0;
}

.diwan-event-card__built:hover .diwan-event-card__name {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* The whole card is the link. */
.diwan-run .diwan-card-link {
	position: absolute;
	inset: 0;
	z-index: 1;
}

.diwan-pub-card .diwan-book-card__wish,
.diwan-staff-card .diwan-book-card__wish {
	z-index: 3;
}

/* Authors */
.diwan-run--author .diwan-author-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	--diwan-author-size: 76px;
}

.diwan-run--author .diwan-author-card__photo--initials {
	background: var(--diwan-taupe, #ab9169);
	font-size: var(--wp--preset--font-size--title, 22px);
	border: 3px solid var(--wp--preset--color--sand, #f1e6d2);
}

.diwan-run--author .diwan-author-card__name {
	font-size: var(--wp--preset--font-size--base, 14px);
	font-weight: 500;
	color: var(--diwan-text-soft, #444);
}

/* Publishing covers */
.diwan-run--cover .diwan-pub-card {
	position: relative;
	inline-size: 100%;
}

.diwan-run--cover .diwan-book-card__wish {
	inset-block-start: 10px;
	inset-inline-end: 10px;
}

/* Staff picks: three across, two deep, cover beside the words */
.diwan-run--grid {
	padding-inline: 0;
}

.diwan-run__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--wp--preset--spacing--20, 16px) 40px;
}

.diwan-run--staff .diwan-staff-card {
	position: relative;
	display: flex;
	gap: 20px;
	align-items: flex-start;
}

.diwan-run--staff .diwan-staff-card .diwan-staff-card__cover {
	flex: 0 0 114px;
	inline-size: 114px;
	min-inline-size: 114px;
}

.diwan-staff-card__words {
	flex: 1 1 auto;
	min-inline-size: 0;
	padding-block-start: 2px;
}

.diwan-staff-card__words > * {
	margin: 0 0 12px;
}

.diwan-run--staff .diwan-staff-card__name {
	font-family: var(--diwan-font-card, var(--diwan-font-body));
	font-size: var(--wp--preset--font-size--title-xs, 19px);
	font-weight: 600;
	line-height: 1.25;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	max-block-size: 2.5em;
	overflow: hidden;
}

.diwan-run--staff .diwan-staff-card__author {
	color: var(--diwan-text-muted, #6e6e6e);
	font-size: var(--wp--preset--font-size--base, 14px);
}

.diwan-run--staff .diwan-staff-card__note {
	color: var(--diwan-text-soft, #444);
	font-size: var(--wp--preset--font-size--md, 15px);
}

.diwan-run--staff .diwan-staff-card__by {
	color: var(--diwan-text-soft, #444);
	font-size: var(--wp--preset--font-size--sm, 13px);
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

html[dir="rtl"] .diwan-run--staff .diwan-staff-card__by {
	letter-spacing: 0;
}

/* ------------------------------------------------------ publishing panel */

.diwan-home-band--publishing .diwan-pub__panel {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 680px);
	gap: 36px;
	align-items: start;
	margin-block-end: var(--wp--preset--spacing--20, 16px);
}

.diwan-home-band--publishing .diwan-pub__name {
	text-shadow: none;
	margin-block-end: 6px;
}

.diwan-home-band--publishing .diwan-pub__title {
	color: var(--diwan-blue, #246b8f);
	font-size: var(--wp--preset--font-size--title-sm, 20px);
	font-style: italic;
	margin: 0 0 14px;
}

.diwan-home-band--publishing .diwan-pub__text {
	color: var(--diwan-wood, #3b0f00);
	font-size: var(--wp--preset--font-size--text-lg, 17px);
	line-height: 1.5;
	margin: 0 0 28px;
}

.diwan-home-band--publishing .diwan-pub__button.diwan-button {
	background: var(--diwan-wood, #3b0f00);
	border-color: var(--diwan-wood, #3b0f00);
	color: var(--diwan-white, #fff);
	font-size: var(--wp--preset--font-size--base, 14px);
	font-weight: 700;
	letter-spacing: 0.08em;
	padding: 13px 40px;
	text-decoration: none;
	text-transform: uppercase;
}

.diwan-home-band--publishing .diwan-pub__button.diwan-button:hover {
	background: var(--diwan-papyrus, #e0b070);
	border-color: var(--diwan-papyrus, #e0b070);
	color: var(--diwan-wood, #3b0f00);
}

.diwan-pub__portrait picture {
	display: block;
}

.diwan-pub__portrait img {
	display: block;
	inline-size: 100%;
	block-size: 250px;
	object-fit: cover;
}

/* ------------------------------------------------------------- kids tabs */

.diwan-home-band--kids .diwan-kids-ages {
	justify-content: center;
	margin-block: 4px 18px;
}

.diwan-home-tabs__nav {
	display: flex;
	justify-content: center;
	gap: var(--wp--preset--spacing--20, 16px);
	margin-block-end: 12px;
}

button.diwan-home-tabs__tab {
	background: none;
	border: 0;
	border-block-end: 2px solid transparent;
	color: var(--diwan-text-muted, #6e6e6e);
	cursor: pointer;
	font-family: var(--diwan-font-button, "Loew", "Tajawal", system-ui, sans-serif);
	font-size: var(--wp--preset--font-size--base, 14px);
	font-weight: 700;
	letter-spacing: 0.08em;
	padding: var(--wp--preset--spacing--10, 8px) 14px 12px;
	text-transform: uppercase;
}

button.diwan-home-tabs__tab[aria-selected="true"] {
	border-block-end-color: var(--diwan-black, #000);
	color: var(--diwan-text, #000);
}

button.diwan-home-tabs__tab:focus-visible {
	outline: 2px solid var(--diwan-blue, #246b8f);
	outline-offset: 2px;
}

/* ------------------------------------------------------------ wide banner */

.diwan-home-wide {
	margin: 0;
	line-height: 0;
}

.diwan-home-wide picture {
	display: block;
}

.diwan-home-wide img {
	display: block;
	inline-size: 100%;
	block-size: auto;
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 1200px) {

	.diwan-run--book {
		--diwan-book-columns: 5;
		--diwan-book-gap: var(--wp--preset--spacing--40, 32px);
	}

	.diwan-run__track {
		--diwan-run-gap: var(--wp--preset--spacing--40, 32px);
		grid-auto-columns: calc((100% - 4 * var(--diwan-run-gap)) / 5);
	}

	.diwan-run--author .diwan-run__track {
		grid-auto-columns: calc((100% - 6 * 24px) / 7);
	}
}

@media (max-width: 1024px) {

	.diwan-run--book {
		--diwan-book-columns: 4;
		--diwan-book-gap: var(--wp--preset--spacing--30, 24px);
	}

	.diwan-run {
		padding-inline: var(--wp--preset--spacing--50, 48px);
	}

	.diwan-run__track {
		--diwan-run-gap: var(--wp--preset--spacing--30, 24px);
		grid-auto-columns: calc((100% - 3 * var(--diwan-run-gap)) / 4);
	}

	.diwan-run--event .diwan-run__track,
	.diwan-home-band--book-clubs .diwan-run--event .diwan-run__track {
		grid-auto-columns: calc((100% - 24px) / 2);
	}

	.diwan-run--author .diwan-run__track {
		grid-auto-columns: calc((100% - 4 * 24px) / 5);
	}

	.diwan-run__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	/* On a tablet the picture beside the words, as on the Elementor home, at
	   the size its tablet picture is drawn (492 by 250, 3 December 2026); on a
	   phone under them (below). */
	.diwan-home-band--publishing .diwan-pub__panel {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		gap: 24px;
	}
}

@media (max-width: 767px) {

	.diwan-home-band {
		padding-block: var(--wp--preset--spacing--30, 24px) var(--wp--preset--spacing--40, 32px);
	}

	.diwan-run--book {
		--diwan-book-columns: 2;
		--diwan-book-gap: 16px;
	}

	.diwan-band__heading {
		font-size: var(--wp--preset--font-size--title-sm, 20px);
	}

	.diwan-run,
	.diwan-run--event,
	.diwan-run--author {
		padding-inline: 0;
	}

	button.diwan-run__btn {
		display: none;
	}

	.diwan-run__track {
		--diwan-run-gap: 16px;
		grid-auto-columns: calc((100% - var(--diwan-run-gap)) / 2);
	}

	.diwan-run--event .diwan-run__track,
	.diwan-home-band--book-clubs .diwan-run--event .diwan-run__track {
		--diwan-run-gap: 16px;
		grid-auto-columns: 100%;
	}

	.diwan-run--author .diwan-run__track {
		--diwan-run-gap: 16px;
		grid-auto-columns: calc((100% - 2 * var(--diwan-run-gap)) / 3);
	}

	.diwan-run--cover .diwan-run__track {
		--diwan-run-gap: 16px;
	}

	.diwan-home-band--kids .diwan-kids-ages {
		--diwan-kids-circle: 58px;
		gap: var(--wp--preset--spacing--10, 8px);
		flex-wrap: nowrap;
	}

	.diwan-run__grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.diwan-run--staff .diwan-run__grid > :nth-child(n+4) {
		display: none;
	}

	.diwan-home-band--publishing .diwan-pub__panel {
		grid-template-columns: minmax(0, 1fr);
	}

	/* The phone's picture is drawn 350 by 250, as the Elementor home shows it. */
	.diwan-pub__portrait img {
		block-size: 250px;
	}

	.diwan-home-tabs__nav {
		gap: 4px;
	}

	button.diwan-home-tabs__tab {
		font-size: var(--wp--preset--font-size--xs, 12px);
		padding-inline: var(--wp--preset--spacing--10, 8px);
	}
}

/* The search grid uses the same slide width and centred cover as the home shelf. */
:is(.diwan-home-band .diwan-run--book, .diwan-search__books) {
	--diwan-book-columns: 2;
	--diwan-book-gap: 16px;
}

@media (min-width: 767px) {
	:is(.diwan-home-band .diwan-run--book, .diwan-search__books) {
		--diwan-book-columns: 4;
		--diwan-book-gap: 24px;
	}
}

@media (min-width: 768px) {
	:is(.diwan-home-band .diwan-run--book, .diwan-search__books) {
		padding-inline: 52px;
	}

	:is(.diwan-home-band .diwan-run--book, .diwan-search__books) .diwan-book-card {
		inline-size: min(var(--diwan-card-width, 156px), calc(100% - 16px));
		margin-inline: auto;
	}
}

@media (min-width: 768px) and (max-width: 1024px) {
	:is(.diwan-home-band .diwan-run--book, .diwan-search__books) .diwan-book-card {
		inline-size: min(140px, calc(100% - 16px));
	}
}

@media (min-width: 1024px) {
	:is(.diwan-home-band .diwan-run--book, .diwan-search__books) {
		--diwan-book-columns: 5;
	}
}

@media (min-width: 1300px) {
	:is(.diwan-home-band .diwan-run--book, .diwan-search__books) {
		--diwan-book-columns: 6;
	}
}

@media (prefers-reduced-motion: reduce) {

	.diwan-run__track {
		scroll-behavior: auto;
	}

	.diwan-home-hero__slide,
	.diwan-home-hero__slide.is-active {
		transition: none;
	}
}
