/* Blue Bee Holiday Homes: Featured Holiday Homes block (made for the home page). Shared buttons are in ui.css. */

.bbh-feat {
	--bbh-navy: var(--wp--preset--color--contrast, #0A2B47);
	--bbh-blue: var(--wp--preset--color--primary, #0071B8);
	--bbh-honey: var(--wp--preset--color--accent, #FFB81C);
	--bbh-honey-light: var(--wp--preset--color--accent-light, #FFC845);
	--bbh-sky: var(--wp--preset--color--sky, #E6F2FB);
	--bbh-line: var(--wp--preset--color--line, #DCE9F4);
	--bbh-slate: var(--wp--preset--color--slate, #4A6177);
	--bbh-white: var(--wp--preset--color--base, #FFFFFF);
	--bbh-bangla: var(--wp--preset--font-family--bangla, 'Anek Bangla', sans-serif);
	--bbh-pad: clamp(16px, 4vw, 40px);
	--bbh-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
	color: var(--bbh-navy);
}
.bbh-feat * { box-sizing: border-box; }
.bbh-feat :where(h3, p, ul) { margin: 0; }
.bbh-feat ul { padding: 0; list-style: none; }

.bbh-feat__head,
.bbh-feat__grid,
.bbh-feat__places,
.bbh-feat__empty {
	max-width: calc(1160px + 2 * var(--bbh-pad));
	margin-inline: auto;
	padding-inline: var(--bbh-pad);
}

/* ---------- Heading row ---------- */

.bbh-feat__head {
	margin-bottom: clamp(28px, 4vw, 44px);
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px 40px;
}
/* :where() keeps these defaults easy to change from the theme or Additional CSS. */
:where(.bbh-feat__intro) { flex: 1 1 520px; display: flex; flex-direction: column; gap: 12px; }
:where(.bbh-feat__intro) > * { margin: 0; }
:where(.bbh-feat__intro) h2 { font-size: var(--wp--preset--font-size--display, clamp(42px, 5.4vw, 78px)); }
:where(.bbh-feat__intro) p { max-width: 54ch; font-size: 19px; line-height: 1.5; color: var(--bbh-slate); }
:where(.bbh-feat__intro) .bb-kicker {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--bbh-blue);
}
.bbh-feat__all { flex: none; gap: 10px; }
.bbh-feat__all svg { transition: transform 0.25s var(--bbh-ease); }
.bbh-feat__all:hover svg { transform: translateX(3px); }

/* ---------- Cards: one large, the rest smaller ---------- */

.bbh-feat__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	grid-auto-rows: clamp(236px, 21vw, 268px);
	grid-auto-flow: dense;
	gap: 16px;
}
.bbh-feat--n1 .bbh-feat__grid,
.bbh-feat--n2 .bbh-feat__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: clamp(300px, 30vw, 420px); }

/* The card is a column with the text at the bottom, so the stretched link
   below covers the whole card. */
.bbh-feat__card {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	border-radius: 26px;
	background: #CFE6F7;
	color: var(--bbh-white);
	transition: transform 0.4s var(--bbh-ease), box-shadow 0.4s var(--bbh-ease);
}
.bbh-feat__card.is-big { grid-column: span 2; grid-row: span 2; border-radius: 32px; }
.bbh-feat__card:focus-within { outline: 3px solid var(--bbh-honey); outline-offset: 3px; }

.bbh-feat__media { position: absolute; inset: 0; z-index: -2; }
.bbh-feat__media img,
.bbh-feat__media .bb-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.bbh-feat__card::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(180deg, rgba(10, 43, 71, 0.28) 0%, rgba(10, 43, 71, 0) 30%);
	pointer-events: none;
}

.bbh-feat__top {
	position: absolute;
	top: 14px;
	left: 14px;
	right: 14px;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 8px;
	pointer-events: none;
}
.bbh-feat__kind,
.bbh-feat__rating {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 32px;
	padding: 0 12px;
	border-radius: 999px;
	font-size: 13.5px;
	font-weight: 650;
	line-height: 1.2;
	white-space: nowrap;
}
.bbh-feat__kind { max-width: 70%; overflow: hidden; text-overflow: ellipsis; background: rgba(255, 255, 255, 0.94); color: var(--bbh-navy); }
.bbh-feat__kind svg { flex: none; color: var(--bbh-blue); }
.bbh-feat__rating { gap: 4px; padding: 0 10px; background: var(--bbh-honey); color: var(--bbh-navy); font-weight: 750; }
.bbh-feat__rating svg { fill: currentColor; }

/* The shade sits behind the text itself, so names stay readable on light photos. */
.bbh-feat__info {
	padding: 56px 18px 18px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	background: linear-gradient(180deg, rgba(10, 43, 71, 0) 0, rgba(10, 43, 71, 0.6) 52px, rgba(10, 43, 71, 0.92) 100%);
}
.bbh-feat__card.is-big .bbh-feat__info {
	padding: 110px clamp(20px, 2.4vw, 32px) clamp(20px, 2.4vw, 32px);
	gap: 10px;
	background: linear-gradient(180deg, rgba(10, 43, 71, 0) 0, rgba(10, 43, 71, 0.58) 100px, rgba(10, 43, 71, 0.92) 100%);
}
.bbh-feat__where { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 14px; line-height: 1.35; color: rgba(255, 255, 255, 0.9); }
.bbh-feat__where svg { flex: none; }
.bbh-feat__where span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.bbh-feat__name {
	font-family: var(--bbh-bangla);
	font-size: 21px;
	font-weight: 700;
	line-height: 1.25;
	color: var(--bbh-white);
	text-wrap: balance;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
}
.bbh-feat__card.is-big .bbh-feat__name { font-size: clamp(28px, 2.7vw, 38px); line-height: 1.15; -webkit-line-clamp: 3; }
.bbh-feat__link { color: inherit; text-decoration: none; }
.bbh-feat__link:hover { color: inherit; }
/* The whole card opens the property. */
.bbh-feat__link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.bbh-feat__link:focus-visible { outline: none; }
.bbh-feat__tag { font-family: var(--bbh-bangla); font-size: 17px; font-weight: 500; color: var(--bbh-honey-light); }
.bbh-feat__am { display: flex; flex-wrap: wrap; gap: 6px; }
.bbh-feat__am li {
	padding: 5px 11px;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.24);
	background: rgba(255, 255, 255, 0.14);
	font-size: 13px;
	line-height: 1.3;
	color: var(--bbh-white);
}
.bbh-feat__foot { margin-top: 6px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.bbh-feat__price { font-family: var(--bbh-bangla); font-size: 21px; font-weight: 750; line-height: 1.1; color: var(--bbh-white); }
.bbh-feat__price span { display: block; margin-top: 3px; font-size: 13px; font-weight: 500; color: rgba(255, 255, 255, 0.78); }
.bbh-feat__card.is-big .bbh-feat__price { font-size: 30px; }
.bbh-feat__go {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 44px;
	height: 44px;
	border-radius: 999px;
	background: var(--bbh-white);
	color: var(--bbh-navy);
	transition: background-color 0.25s, transform 0.25s var(--bbh-ease);
}
.bbh-feat__card.is-big .bbh-feat__go {
	width: auto;
	height: 52px;
	padding: 0 22px;
	background: var(--bbh-honey);
	font-size: 16.5px;
	font-weight: 700;
}

@media (hover: hover) {
	.bbh-feat__card:hover { transform: translateY(-4px); box-shadow: 0 26px 44px -22px rgba(10, 43, 71, 0.55); }
	.bbh-feat__card:hover .bbh-feat__media img { transform: scale(1.06); }
	.bbh-feat__card:hover .bbh-feat__go { background: var(--bbh-honey); transform: translateX(2px); }
	.bbh-feat__card.is-big:hover .bbh-feat__go { background: var(--bbh-honey-light); }
}

/* ---------- Quick links by place ---------- */

.bbh-feat__places { margin-top: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.bbh-feat__places-label { margin-right: 4px; font-size: 15px; font-weight: 650; color: var(--bbh-slate); }
.bbh-feat__place {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 42px;
	padding: 0 7px 0 16px;
	border-radius: 999px;
	background: var(--bbh-white);
	box-shadow: inset 0 0 0 1.5px var(--bbh-line);
	color: var(--bbh-navy);
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	transition: box-shadow 0.2s, color 0.2s;
}
.bbh-feat__place span {
	min-width: 28px;
	height: 28px;
	padding: 0 8px;
	display: inline-grid;
	place-items: center;
	border-radius: 999px;
	background: var(--bbh-sky);
	color: var(--bbh-blue);
	font-size: 13px;
	font-weight: 700;
}
.bbh-feat__place:hover { color: var(--bbh-blue); box-shadow: inset 0 0 0 1.5px var(--bbh-blue); text-decoration: none; }
.bbh-feat__place:focus-visible { outline: 3px solid var(--bbh-honey); outline-offset: 2px; }

.bbh-feat__empty { font-size: 17px; color: var(--bbh-slate); }

/* ---------- Smaller screens ---------- */

@media (max-width: 1023px) {
	.bbh-feat__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 250px; }
}

/* Phones: heading, a row of cards to swipe through, the button, then the places. */
@media (max-width: 639px) {
	.bbh-feat { display: flex; flex-direction: column; }
	.bbh-feat__head { display: contents; }
	.bbh-feat__intro { order: 1; flex: none; margin-bottom: 28px; padding-inline: var(--bbh-pad); }
	.bbh-feat__grid,
	.bbh-feat__places,
	.bbh-feat__empty { margin-inline: 0; }
	:where(.bbh-feat__intro) p { font-size: 17px; }
	.bbh-feat__grid,
	.bbh-feat__empty { order: 2; }
	.bbh-feat__all { order: 3; margin: 20px var(--bbh-pad) 0; }
	.bbh-feat__places { order: 4; }
	.bbh-feat__grid,
	.bbh-feat--n1 .bbh-feat__grid,
	.bbh-feat--n2 .bbh-feat__grid {
		display: flex;
		gap: 12px;
		margin-block: -8px;
		padding-block: 8px;
		overflow-x: auto;
		overscroll-behavior-x: contain;
		scroll-snap-type: x mandatory;
		scroll-padding-inline: var(--bbh-pad);
		scrollbar-width: none;
	}
	.bbh-feat__grid::-webkit-scrollbar { display: none; }
	.bbh-feat__grid::after { content: ""; flex: 0 0 1px; }
	.bbh-feat__card,
	.bbh-feat__card.is-big { flex: 0 0 84%; height: 400px; border-radius: 26px; scroll-snap-align: start; }
	.bbh-feat__card.is-big .bbh-feat__info { padding: 80px 18px 18px; gap: 8px; }
	.bbh-feat__am { display: none; }
	.bbh-feat__card.is-big .bbh-feat__name { font-size: 26px; }
	.bbh-feat__card.is-big .bbh-feat__price { font-size: 24px; }
	.bbh-feat__card.is-big .bbh-feat__go { height: 46px; padding: 0 18px; font-size: 15.5px; }
	.bbh-feat__all { justify-content: center; }
	.bbh-feat__places { gap: 8px; }
	.bbh-feat__places-label { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.bbh-feat__card,
	.bbh-feat__go,
	.bbh-feat__all svg { transition: none; }
	.bbh-feat__card:hover { transform: none; }
	.bbh-feat__card:hover .bbh-feat__media img { transform: none; }
}

/* Editor: the heading is edited above the preview, so the preview's own heading row is hidden. */
.editor-styles-wrapper .wp-block-bluebee-stay-featured { width: 100%; }
.bbh-feat-edit__preview .bbh-feat__head { display: none; }
.bbh-feat-edit .bbh-feat__all { pointer-events: none; }
