/**
 * Block: How To Book Steps (acf/how-to-book-steps)
 * Figma: 8039:901 — frame "Homepage" 8039:720 (1920px)
 *
 * Mobile-first. Breakpoints: 1024px, 1280px.
 */

.how-to-book-steps {
	--htb-primary: #008888;
	--htb-primary-hover: #007a7a;
	--htb-white: #ffffff;
	--htb-black: #000000;
	--htb-outline: #38a09d;
	--htb-heading: #2d2e3e;
	--htb-body: #666666;
	--htb-bg: rgba(209, 211, 212, 0.2);

	--htb-font-display: "Big Caslon CC", "Big Caslon", Georgia, "Times New Roman", serif;
	--htb-font-body: "Inter Display", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
	--htb-font-button: "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS", sans-serif;

	/* Fluid type — derived 375px -> 1920px (no mobile frame in Figma). */
	--htb-size-heading: clamp(30px, 25.63px + 1.17vw, 48px);
	--htb-size-body: clamp(16px, 15.03px + 0.26vw, 20px);
	--htb-size-card-title: clamp(22px, 19.09px + 0.78vw, 34px);
	--htb-size-button-sm: clamp(16px, 15.51px + 0.13vw, 18px);
	--htb-stack-gap: clamp(32px, 25.21px + 1.81vw, 60px);

	width: 100%;
	box-sizing: border-box;
	background-color: var(--htb-bg);
}

.how-to-book-steps *,
.how-to-book-steps *::before,
.how-to-book-steps *::after {
	box-sizing: border-box;
}

.how-to-book-steps.alignwide,
.how-to-book-steps.alignfull {
	width: 100%;
	max-width: none;
	margin-left: 0;
	margin-right: 0;
}

/* ------------------------------------------------------------ Container */

.how-to-book-steps__container {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--htb-stack-gap);
	width: 100%;
	max-width: 100%;
	margin-inline: auto;
	padding-left: 20px;
	padding-right: 20px;
	padding-top: clamp(48px, 40.23px + 2.07vw, 80px);
	padding-bottom: clamp(48px, 40.23px + 2.07vw, 80px);
}

/* ---------------------------------------------------------------- Intro */

.how-to-book-steps__intro {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 16px;
	width: 100%;
	text-align: center;
}

.how-to-book-steps__heading {
	margin: 0;
	font-family: var(--htb-font-display);
	font-weight: 400;
	font-size: var(--htb-size-heading);
	line-height: 1.3;
	letter-spacing: 0;
	color: var(--htb-heading);
}

.how-to-book-steps__subheading {
	margin: 0;
	font-family: var(--htb-font-body);
	font-weight: 400;
	font-size: var(--htb-size-body);
	line-height: 1.6;
	letter-spacing: 0;
	color: var(--htb-body);
}

/* ---------------------------------------------------------------- Steps */

.how-to-book-steps__list {
	display: grid;
	grid-template-columns: 1fr;
	gap: 32px;
	width: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
}

.how-to-book-steps__step {
	display: flex;
	flex-direction: column;
	margin: 0;
	background-color: var(--htb-primary);
	overflow: hidden;
}

.how-to-book-steps__step-title {
	flex: 0 0 auto;
	margin: 0;
	padding: 16px;
	font-family: var(--htb-font-button);
	font-weight: 600;
	font-size: var(--htb-size-card-title);
	line-height: normal;
	text-align: center;
	color: var(--htb-white);
}

.how-to-book-steps__step-media {
	position: relative;
	display: flex;
	flex: 1 0 auto;
	align-items: flex-start;
	justify-content: center;
	width: 100%;
	padding: 16px;
	/* Figma image area 424 x 340. */
	aspect-ratio: 424 / 340;
}

.how-to-book-steps__step-image {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: 100%;
	object-fit: cover;
}

.how-to-book-steps__step-description {
	position: relative;
	flex: 1 0 0;
	min-width: 1px;
	margin: 0;
	font-family: var(--htb-font-body);
	font-weight: 400;
	font-size: var(--htb-size-body);
	line-height: 1.6;
	color: var(--htb-white);
}

/* -------------------------------------------------------------- Buttons */

.how-to-book-steps__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 16px;
	width: 100%;
}

.how-to-book-steps__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	min-height: 67px;
	padding: 18px 24px;
	border: 1px solid transparent;
	border-radius: 8px;
	font-family: var(--htb-font-button);
	font-weight: 700;
	line-height: 1.414;
	letter-spacing: 1px;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.how-to-book-steps__button-icon {
	display: block;
	flex: 0 0 26px;
	width: 26px;
	height: 26px;
}

.how-to-book-steps__button-icon img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	transition: filter 0.3s ease;
}

.how-to-book-steps__button-label {
	display: block;
}

.how-to-book-steps__button--primary {
	background-color: var(--htb-primary);
	border-color: var(--htb-primary);
	color: var(--htb-white);
	font-size: var(--htb-size-body);
}

.how-to-book-steps__button--secondary {
	padding-inline: 32px;
	background-color: var(--htb-white);
	border-color: var(--htb-outline);
	color: var(--htb-black);
	font-size: var(--htb-size-button-sm);
}

/* Hover / focus — no hover variant exists in Figma (see report). */
.how-to-book-steps__button--primary:hover,
.how-to-book-steps__button--primary:focus-visible {
	background-color: var(--htb-primary-hover);
	border-color: var(--htb-primary-hover);
	color: var(--htb-white);
}

.how-to-book-steps__button--secondary:hover,
.how-to-book-steps__button--secondary:focus-visible {
	background-color: var(--htb-primary);
	border-color: var(--htb-primary);
	color: var(--htb-white);
}

.how-to-book-steps__button--secondary:hover .how-to-book-steps__button-icon img,
.how-to-book-steps__button--secondary:focus-visible .how-to-book-steps__button-icon img {
	filter: brightness(0) invert(1);
}

.how-to-book-steps__button:focus-visible {
	outline: 2px solid var(--htb-primary);
	outline-offset: 3px;
}

/* ---------------------------------------------------------- Breakpoints */

@media (min-width: 768px) {

	.how-to-book-steps__container {
		padding-left: 60px;
		padding-right: 60px;
	}

	.how-to-book-steps__button {
		width: auto;
		min-width: 293px;
	}
}

@media (min-width: 1024px) {

	/* Three 424px cards cannot hold below this width; keeping the steps on
	   one row preserves the sequence. Figma gap 84 / 1440 = 5.83%. */
	.how-to-book-steps__list {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 5.83%;
	}
}

@media (min-width: 1280px) {

	.how-to-book-steps__container {
		/* Figma gutter 240 / 1920 = 12.5%. */
		padding-left: 12.5%;
		padding-right: 12.5%;
	}

	.how-to-book-steps__actions {
		width: auto;
	}

	.how-to-book-steps__button {
		min-width: 0;
	}

	.how-to-book-steps__button--primary {
		min-width: 301px;
	}

	.how-to-book-steps__button--secondary {
		min-width: 293px;
	}
}

/* ------------------------------------------------------- Reduced motion */

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

	.how-to-book-steps__button,
	.how-to-book-steps__button-icon img {
		transition: none;
	}
}

/* ------------------------------------------------------------------------
   Theme reset.
   style.css ships `ol, ol li, ul:not(.menu), ul:not(.menu) li { margin: 1.25rem }`.
   Those selectors score (0,1,1) and (0,1,2), so a single block class loses to
   them. These block-scoped descendant selectors score (0,2,0) and win.
   ------------------------------------------------------------------------ */

.how-to-book-steps .how-to-book-steps__list {
	margin: 0;
	padding: 0;
}

.how-to-book-steps__list .how-to-book-steps__step {
	margin: 0;
}
