/* Bayt Revamp Custom Styles */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

body {
	overflow-x: clip;
}

/* Asymmetric grid break utility */
.grid-break-left {
    margin-left: -8.333333%;
}
.grid-break-right {
    margin-right: -8.333333%;
}
@media (max-width: 1024px) {
    .grid-break-left, .grid-break-right {
        margin-left: 0;
        margin-right: 0;
    }
}

/* Reveal animation */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Infinite Scroll Animation */
@keyframes infinite-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
.animate-infinite-scroll {
    animation: infinite-scroll 30s linear infinite;
}

.animate-infinite-scroll:hover {
	animation-play-state: paused;
}

/* Keep the LU Homes approval visible during the first mobile viewport. */
.bayt-home-hero-title-row {
	position: relative;
}

.bayt-home-hero-mobile-badge {
	display: none;
}

/* A compact contact route replaces the desktop-only secondary-header action. */
.bayt-mobile-whatsapp {
	align-items: center;
	background: #075e54;
	border: 2px solid #ffffff;
	border-radius: 999px;
	bottom: calc(16px + env(safe-area-inset-bottom));
	box-shadow: 0 5px 0 rgba(15, 23, 42, 0.22);
	color: #ffffff;
	display: inline-flex;
	font-family: "Plus Jakarta Sans", system-ui, sans-serif;
	font-size: 14px;
	font-weight: 700;
	gap: 8px;
	padding: 11px 15px;
	position: fixed;
	right: 16px;
	text-decoration: none;
	transition: background-color 180ms ease-out, box-shadow 180ms ease-out, transform 180ms ease-out;
	z-index: 40;
}

.bayt-mobile-whatsapp:hover {
	background: #064e47;
	box-shadow: 0 3px 0 rgba(15, 23, 42, 0.26);
	color: #ffffff;
	transform: translateY(2px);
}

.bayt-mobile-whatsapp:focus-visible {
	outline: 3px solid #fd761a;
	outline-offset: 3px;
}

.bayt-header-whatsapp {
	color: #075e54;
	font-weight: 800;
	text-decoration: none;
}

.bayt-header-whatsapp svg {
	color: currentColor;
}

.bayt-header-whatsapp:hover {
	color: #064e47;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.bayt-header-whatsapp:focus-visible {
	border-radius: 4px;
	outline: 3px solid rgba(7, 94, 84, 0.34);
	outline-offset: 3px;
}

/* Property pages and the booking dialog already expose WhatsApp in context;
   keep the floating action from covering appointment times or form controls. */
body.single-property .bayt-mobile-whatsapp,
body.bayt-booking-modal-open .bayt-mobile-whatsapp {
	display: none;
}

/* Homepage value props: native details disclosures behave like tooltips on
   hover, while remaining tappable and keyboard-accessible without React. */
.bayt-value-props-section,
.bayt-value-props-grid {
	overflow: visible;
	position: relative;
}

.bayt-value-props-grid {
	align-items: stretch;
}

.bayt-value-prop {
	background: #fcf8fa;
	border: 1px solid #c6c6cd;
	border-radius: 16px;
	height: 100%;
	min-width: 0;
	position: relative;
	transition: box-shadow 220ms cubic-bezier(0.16, 1, 0.3, 1), transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.bayt-value-prop:hover,
.bayt-value-prop:focus-within,
.bayt-value-prop:has(.bayt-value-prop__details[open]) {
	box-shadow: 8px 8px 0 #0f172a;
	transform: translateY(-6px);
	z-index: 30;
}

.bayt-value-prop__details {
	height: 100%;
}

.bayt-value-prop__summary {
	box-sizing: border-box;
	cursor: help;
	display: block;
	height: 100%;
	list-style: none;
	padding: 20px;
}

.bayt-value-prop__summary::-webkit-details-marker {
	display: none;
}

.bayt-value-prop__summary:focus-visible {
	border-radius: 15px;
	outline: 3px solid #9d4300;
	outline-offset: 3px;
}

.bayt-value-prop__title-row {
	align-items: flex-start;
	display: flex;
	gap: 12px;
	justify-content: space-between;
}

.bayt-value-prop__title-row h2 {
	color: #0f172a;
	font-family: "Bricolage Grotesque", system-ui, sans-serif;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.25;
	margin: 0;
	text-wrap: balance;
}

.bayt-value-prop__cue {
	align-items: center;
	background: var(--bayt-value-accent, #dae2fd);
	border-radius: 999px;
	color: #0f172a;
	display: inline-flex;
	flex: 0 0 auto;
	font-family: "Plus Jakarta Sans", system-ui, sans-serif;
	font-size: 11px;
	font-weight: 800;
	gap: 4px;
	line-height: 1;
	padding: 7px 9px;
}

.bayt-value-prop__cue span {
	align-items: center;
	display: inline-flex;
	font-size: 15px;
	height: 16px;
	justify-content: center;
	line-height: 1;
	transform-origin: 50% 50%;
	transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
	width: 16px;
}

.bayt-value-prop__details[open] .bayt-value-prop__cue span {
	transform: rotate(45deg);
}

.bayt-value-prop__description {
	color: #45464d;
	display: block;
	font-family: "Plus Jakarta Sans", system-ui, sans-serif;
	font-size: 14px;
	line-height: 1.65;
	margin-top: 12px;
	text-wrap: pretty;
}

.bayt-value-prop__popover {
	background: #0f172a;
	border-radius: 12px;
	bottom: calc(100% + 10px);
	box-shadow: 0 6px 0 rgba(157, 67, 0, 0.3);
	color: #ffffff;
	left: 14px;
	opacity: 0;
	pointer-events: none;
	position: absolute;
	right: 14px;
	transform: translateY(8px) scale(0.98);
	transform-origin: bottom center;
	transition: opacity 180ms ease-out, transform 220ms cubic-bezier(0.16, 1, 0.3, 1), visibility 180ms ease-out;
	visibility: hidden;
	z-index: 31;
}

.bayt-value-prop__popover::before {
	bottom: -12px;
	content: "";
	height: 12px;
	left: 0;
	position: absolute;
	right: 0;
}

.bayt-value-prop__popover::after {
	background: #0f172a;
	bottom: -6px;
	content: "";
	height: 12px;
	left: calc(50% - 6px);
	position: absolute;
	transform: rotate(45deg);
	width: 12px;
}

.bayt-value-prop__popover p {
	color: #ffffff;
	font-family: "Plus Jakarta Sans", system-ui, sans-serif;
	font-size: 13px;
	line-height: 1.55;
	margin: 0;
	padding: 16px 16px 12px;
	text-wrap: pretty;
}

.bayt-value-prop__popover a {
	align-items: center;
	background: #ffffff;
	border-radius: 8px;
	color: #0f172a;
	display: flex;
	font-family: "Plus Jakarta Sans", system-ui, sans-serif;
	font-size: 12px;
	font-weight: 800;
	justify-content: space-between;
	line-height: 1.35;
	margin: 0 10px 10px;
	padding: 10px 11px;
	text-decoration: none;
}

.bayt-value-prop__popover a:hover,
.bayt-value-prop__popover a:focus-visible {
	background: #ffdbca;
	color: #5c2400;
}

.bayt-value-prop__popover a:focus-visible {
	outline: 3px solid #fd761a;
	outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
	.bayt-value-prop:hover .bayt-value-prop__popover,
	.bayt-value-prop:focus-within .bayt-value-prop__popover,
	.bayt-value-prop__details[open] .bayt-value-prop__popover {
		opacity: 1;
		pointer-events: auto;
		transform: translateY(0) scale(1);
		visibility: visible;
	}
}

@media (max-width: 767px), (hover: none), (pointer: coarse) {
	.bayt-value-prop:hover,
	.bayt-value-prop:focus-within,
	.bayt-value-prop:has(.bayt-value-prop__details[open]) {
		transform: none;
	}

	.bayt-value-prop__summary {
		min-height: 0;
	}

	.bayt-value-prop__popover {
		bottom: auto;
		box-shadow: none;
		left: auto;
		margin: 0 14px;
		max-height: 0;
		overflow: hidden;
		position: relative;
		right: auto;
		transform: none;
		transition: max-height 260ms cubic-bezier(0.16, 1, 0.3, 1), opacity 180ms ease-out, visibility 180ms ease-out;
	}

	.bayt-value-prop__popover::before,
	.bayt-value-prop__popover::after {
		display: none;
	}

	.bayt-value-prop__details[open] .bayt-value-prop__popover {
		margin-bottom: 14px;
		max-height: 320px;
		opacity: 1;
		pointer-events: auto;
		visibility: visible;
	}
}

.bayt-enquiry-contact {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 4px 14px;
	justify-content: flex-end;
}

.bayt-enquiry-contact > span {
	margin-right: 2px;
}

@media (max-width: 767px) {
	.bayt-home-hero-title-row {
		align-items: flex-start;
		display: flex;
		gap: 12px;
	}

	.bayt-home-hero-title-row .bayt-home-hero-title {
		flex: 1 1 0;
		margin-bottom: 24px;
		min-width: 0;
	}

	.bayt-home-hero-mobile-badge {
		display: block;
		flex: 0 0 72px;
		height: 72px;
		margin-top: 5px;
		object-fit: contain;
		width: 72px;
	}

	.bayt-home-hero-image-badge {
		display: none;
	}

	.bayt-enquiry-contact {
		justify-content: center;
		line-height: 1.5;
		text-align: center;
	}

	.bayt-enquiry-contact > span {
		flex-basis: 100%;
	}

	.bayt-enquiry-contact a {
		white-space: nowrap;
	}
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .reveal,
    .reveal.active {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .animate-infinite-scroll {
        animation: none;
        transform: none;
    }
}

/* Hide scrollbar for carousels */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Ensure Elementor wrapper columns and containers do not restrict full-width layout */
#bayt-revamp-content {
    width: 100%;
}
#bayt-revamp-content .elementor,
#bayt-revamp-content .elementor-section {
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
}
#bayt-revamp-content .elementor-container {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}
#bayt-revamp-content .elementor-column,
#bayt-revamp-content .elementor-widget-wrap,
#bayt-revamp-content .elementor-widget,
#bayt-revamp-content .elementor-widget-container {
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
}

/* Trust marks use one optical frame rather than one forced image height. */
.bayt-trust-logo-frame {
	align-items: center;
	display: inline-flex;
	flex: 0 0 160px;
	height: 52px;
	justify-content: center;
	width: 160px;
}

.animate-infinite-scroll .bayt-trust-logo {
	display: block;
	filter: grayscale(1);
	height: auto !important;
	max-height: 40px !important;
	max-width: 148px;
	object-fit: contain;
	transition: filter 180ms ease-out;
	width: auto !important;
}

.animate-infinite-scroll .bayt-trust-logo:hover {
	filter: grayscale(0);
}

.animate-infinite-scroll .bayt-trust-logo--lu-homes {
	max-height: 44px !important;
	max-width: 52px;
}

.animate-infinite-scroll .bayt-trust-logo--nrla {
	max-height: 38px !important;
	max-width: 116px;
}

.animate-infinite-scroll .bayt-trust-logo--tds {
	max-height: 34px !important;
	max-width: 136px;
}

.animate-infinite-scroll .bayt-trust-logo--university {
	max-height: 30px !important;
	max-width: 148px;
}

.animate-infinite-scroll .bayt-trust-logo--cumbria {
	max-height: 44px !important;
	max-width: 82px;
}

/* Elementor can place this widget inside a constrained column. Let the contact
   band reach both viewport edges while its content remains container-aligned. */
.bayt-contact-strip {
	margin-inline: calc(50% - 50vw);
	width: 100vw;
}

.bayt-city-centre-image {
	object-position: 58% 46% !important;
}

@media (max-width: 767px) {
	.bayt-trust-logo-frame {
		flex-basis: 140px;
		width: 140px;
	}
}

/* Ensure hero image fills its border container */
.elementor-widget-bayt_hero img.w-full.h-full {
    height: 100% !important;
    width: 100% !important;
    object-fit: cover !important;
}

/* Houzez blog templates load Bootstrap, whose .text-primary (#007bff
   !important) hijacks the Tailwind token of the same name in the universal
   header/footer. Pin the brand colour back; !important is required to win. */
.text-primary {
    color: #0f172a !important;
}

/* Links inside post body copy must not rely on colour alone (WCAG 1.4.1). */
.single-post .elementor-element p > a,
.single-post .post-content-wrap p > a {
    text-decoration: underline;
}

/* Shared success state shown in place of a form's fields after a send. */
.bayt-form-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    padding: 28px 20px;
    outline: none;
}
.bayt-form-success__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-bottom: 6px;
    border-radius: 999px;
    background: #0e6f63;
    color: #ffffff;
    font-size: 30px;
    line-height: 1;
}
.bayt-form-success__title {
    margin: 0;
    color: #0f172a;
    font-family: "Bricolage Grotesque", system-ui, sans-serif;
    font-size: 22px;
    font-weight: 800;
}
.bayt-form-success__message {
    margin: 0;
    color: #0f172a;
    font-size: 15px;
    max-width: 42ch;
}
.bayt-form-success__followup {
    margin: 0;
    color: #54545c;
    font-size: 13px;
}
