/*
Theme Name: Fairmont Residences Editable
Theme URI: https://fairmontresidencesruaalmadinah.com/
Author: Rua Al Madinah Holding
Description: Editable child theme for the Fairmont Residences Rua Al Madinah one-page website. Keeps the original design while making page text and images manageable from the WordPress Customizer.
Version: 1.7.0
Template: fairmont-residences
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: fairmont-residences-editable
*/

/*
 * Layout, responsive rules, and local typography are inherited from the
 * installed parent theme: Fairmont Residences Rua Al Madinah.
 */

/* Typeform live embed */
.fr-typeform-slot {
	width: 100%;
	min-width: 0;
}
.fr-typeform-slot [data-tf-live] {
	width: 100%;
}


/* Header language picker — matches the approved Figma header arrangement. */
.fr-language-picker {
	position: relative;
	z-index: 10;
	font-family: "Montserrat", Arial, sans-serif;
	font-size: 0.85rem;
	line-height: 1;
}

.fr-language-picker > summary {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	min-height: 2.5rem;
	padding: 0.25rem 0;
	color: var(--fr-ink, #111);
	cursor: pointer;
	list-style: none;
	user-select: none;
}

.fr-language-picker > summary::-webkit-details-marker {
	display: none;
}

.fr-language-picker__arrow {
	width: 0.42rem;
	height: 0.42rem;
	border-right: 1px solid currentColor;
	border-bottom: 1px solid currentColor;
	transform: translateY(-0.12rem) rotate(45deg);
	transition: transform 160ms ease;
}

.fr-language-picker[open] .fr-language-picker__arrow {
	transform: translateY(0.12rem) rotate(225deg);
}

.fr-language-picker__menu {
	position: absolute;
	top: calc(100% + 0.25rem);
	right: 0;
	display: grid;
	min-width: 8.5rem;
	padding: 0.35rem;
	border: 1px solid rgba(0, 0, 0, 0.22);
	background: rgba(255, 255, 255, 0.96);
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
	backdrop-filter: blur(8px);
}

.fr-language-picker__menu a {
	display: block;
	padding: 0.65rem 0.75rem;
	color: var(--fr-ink, #111);
	text-decoration: none;
	white-space: nowrap;
}

.fr-language-picker__menu a:hover,
.fr-language-picker__menu a:focus-visible,
.fr-language-picker__menu a.is-active {
	background: rgba(0, 0, 0, 0.06);
}

html[dir="rtl"] .fr-language-picker__menu {
	right: auto;
	left: 0;
}

/* Keep the action arrangement identical to the approved desktop comps. */
html[dir="ltr"] .fr-hero__actions .fr-language-picker {
	order: 1;
}
html[dir="ltr"] .fr-hero__actions .fr-outline-button--hero {
	order: 2;
}
html[dir="rtl"] .fr-hero__actions .fr-outline-button--hero {
	order: 1;
}
html[dir="rtl"] .fr-hero__actions .fr-language-picker {
	order: 2;
}

/* The picker remains available on tablet/mobile; parent theme hides the old language nav only. */
@media (max-width: 860px) {
	.fr-language-picker {
		display: block;
		font-size: 0.75rem;
	}
	.fr-language-picker > summary {
		min-height: 2.35rem;
	}
	.fr-hero__actions {
		flex-wrap: nowrap;
	}
}

@media (max-width: 767px) {
	.fr-hero__actions {
		gap: 0.55rem;
	}
	.fr-language-picker {
		font-size: 0.68rem;
	}
	.fr-language-picker__menu {
		min-width: 7.5rem;
	}
}


/* v1.4.0 — Hero header alignment refinements based on approved desktop comps. */
@media (min-width: 861px) {
	/* WordPress already offsets the document for the admin bar. Avoid a second 32px push. */
	body.fairmont-site.admin-bar .fr-hero__header {
		top: 0;
	}

	.fr-hero__header {
		top: 0;
		width: 100%;
		max-width: none;
		padding-top: 1.25rem;
		padding-inline: clamp(1.5rem, 2.5vw, 2.5rem);
		grid-template-columns: minmax(150px, 220px) minmax(220px, 1fr) minmax(320px, 430px);
		gap: 1.25rem;
		align-items: start;
	}

	.fr-brand {
		width: clamp(8.75rem, 11.5vw, 10.75rem);
		justify-self: start;
		margin: 0;
	}

	.fr-hero__tagline {
		justify-self: center;
		align-self: start;
		margin: -0.1rem 0 0;
		font-size: clamp(2.4rem, 3.1vw, 3.35rem);
		line-height: 0.95;
	}

	.fr-hero__actions {
		justify-self: end;
		align-self: start;
		direction: ltr;
	}

	/* Use language body classes as a robust fallback even if the document dir is cached incorrectly. */
	body.fairmont-lang-ar .fr-hero__header {
		grid-template-columns: minmax(320px, 430px) minmax(220px, 1fr) minmax(150px, 220px);
	}

	body.fairmont-lang-ar .fr-brand {
		grid-column: 3;
		grid-row: 1;
		justify-self: end;
		width: clamp(9.25rem, 12vw, 11.25rem);
	}

	body.fairmont-lang-ar .fr-hero__tagline {
		grid-column: 2;
		grid-row: 1;
		justify-self: center;
	}

	body.fairmont-lang-ar .fr-hero__actions {
		grid-column: 1;
		grid-row: 1;
		justify-self: start;
		justify-content: flex-start;
	}

	body.fairmont-lang-en .fr-brand {
		grid-column: 1;
		grid-row: 1;
	}

	body.fairmont-lang-en .fr-hero__tagline {
		grid-column: 2;
		grid-row: 1;
	}

	body.fairmont-lang-en .fr-hero__actions {
		grid-column: 3;
		grid-row: 1;
	}
}

@media (max-width: 860px) {
	body.fairmont-site.admin-bar .fr-hero__header {
		top: 0;
	}

	/* Keep the Arabic logo on the right and controls on the left on tablet/mobile. */
	body.fairmont-lang-ar .fr-hero__header {
		direction: ltr;
	}
	body.fairmont-lang-ar .fr-brand {
		grid-column: 2;
		grid-row: 1;
		justify-self: end;
	}
	body.fairmont-lang-ar .fr-hero__actions {
		grid-column: 1;
		grid-row: 1;
		justify-self: start;
		justify-content: flex-start;
		direction: ltr;
	}
	body.fairmont-lang-ar .fr-hero__tagline {
		grid-column: 1 / -1;
		grid-row: 2;
	}
}

/* ========================================================================== 
   v1.5.0 — simplified language switch, linked logos, current bilingual layout
   ========================================================================== */

.fr-logo-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	max-width: 100%;
	color: inherit;
	text-decoration: none;
}

.fr-logo-link:focus-visible {
	outline: 1px solid currentColor;
	outline-offset: 6px;
}

.fr-brand .fr-logo-link,
.fr-brand__image {
	width: 100%;
}

.fr-brand__image,
.fr-register__logo {
	display: block;
	height: auto;
}

/* A single-click language control replaces the old dropdown. */
.fr-language-switch {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.42rem;
	min-height: 2.5rem;
	padding: 0.2rem 0.15rem;
	color: var(--fr-ink, #111);
	font-family: "Montserrat", Arial, sans-serif;
	font-size: 0.78rem;
	font-weight: 400;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
}

.fr-language-switch__globe {
	font-size: 0.85em;
	opacity: 0.72;
}

.fr-language-switch__arrow {
	font-size: 0.85em;
	line-height: 1;
	opacity: 0.72;
	transition: transform 160ms ease;
}

.fr-language-switch:hover .fr-language-switch__arrow,
.fr-language-switch:focus-visible .fr-language-switch__arrow {
	transform: translateX(2px);
}

.fr-language-switch__short {
	display: none;
}

.fr-hero__tagline:empty {
	display: none;
}

/* Keep the header in the same physical positions in both languages:
   logo left, language/CTA right. The page copy below still follows RTL. */
@media (min-width: 861px) {
	.fr-hero__header,
	body.fairmont-lang-ar .fr-hero__header,
	html[dir="rtl"] .fr-hero__header {
		direction: ltr;
		grid-template-columns: minmax(150px, 205px) minmax(120px, 1fr) minmax(300px, 430px);
		align-items: start;
		padding-top: 1.35rem;
	}

	.fr-brand,
	body.fairmont-lang-en .fr-brand,
	body.fairmont-lang-ar .fr-brand,
	html[dir="rtl"] .fr-brand {
		grid-column: 1;
		grid-row: 1;
		justify-self: start;
		width: clamp(8.3rem, 10.5vw, 9.8rem);
		margin: 0;
	}

	.fr-hero__tagline,
	body.fairmont-lang-en .fr-hero__tagline,
	body.fairmont-lang-ar .fr-hero__tagline,
	html[dir="rtl"] .fr-hero__tagline {
		grid-column: 2;
		grid-row: 1;
		justify-self: center;
	}

	.fr-hero__actions,
	body.fairmont-lang-en .fr-hero__actions,
	body.fairmont-lang-ar .fr-hero__actions,
	html[dir="rtl"] .fr-hero__actions {
		grid-column: 3;
		grid-row: 1;
		justify-self: end;
		justify-content: flex-end;
		direction: ltr;
	}

	body.fairmont-lang-en .fr-language-switch { order: 1; }
	body.fairmont-lang-en .fr-outline-button--hero { order: 2; }
	body.fairmont-lang-ar .fr-outline-button--hero { order: 1; }
	body.fairmont-lang-ar .fr-language-switch { order: 2; }
}

/* Team logos use equal optical boxes so no brand appears oversized. */
.fr-team__logos {
	grid-template-columns: repeat(3, minmax(0, 1fr));
	align-items: end;
	gap: clamp(1.4rem, 3.5vw, 4rem);
}

.fr-team__logo-box {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: clamp(5.5rem, 7.5vw, 7rem);
}

.fr-team__logo-box .fr-logo-link {
	width: 100%;
	height: 100%;
}

.fr-team__logo {
	display: block;
	width: auto;
	height: auto;
	max-width: 82%;
	max-height: 68%;
	object-fit: contain;
}

.fr-team__logo--rua.is-vertical {
	max-width: 62%;
	max-height: 88%;
}

.fr-team__logo--rua.is-horizontal {
	max-width: 92%;
	max-height: 52%;
}

.fr-team__logo--accor {
	max-width: 50%;
	max-height: 72%;
}

.fr-team__logo--fairmont {
	max-width: 72%;
	max-height: 60%;
}

.fr-register__brand .fr-logo-link {
	justify-content: flex-start;
}

.fr-register__brand .fr-register__logo {
	width: clamp(9.5rem, 15vw, 13.5rem);
}

html[dir="rtl"] .fr-register__brand .fr-logo-link {
	justify-content: flex-end;
}

@media (max-width: 860px) {
	.fr-hero__header,
	body.fairmont-lang-ar .fr-hero__header,
	html[dir="rtl"] .fr-hero__header {
		direction: ltr;
		grid-template-columns: minmax(7rem, 1fr) auto;
		grid-template-rows: auto auto;
	}

	.fr-brand,
	body.fairmont-lang-ar .fr-brand,
	html[dir="rtl"] .fr-brand {
		grid-column: 1;
		grid-row: 1;
		justify-self: start;
	}

	.fr-hero__actions,
	body.fairmont-lang-ar .fr-hero__actions,
	html[dir="rtl"] .fr-hero__actions {
		grid-column: 2;
		grid-row: 1;
		justify-self: end;
		justify-content: flex-end;
		direction: ltr;
	}

	.fr-hero__tagline,
	body.fairmont-lang-ar .fr-hero__tagline,
	html[dir="rtl"] .fr-hero__tagline {
		grid-column: 1 / -1;
		grid-row: 2;
	}
}

@media (max-width: 767px) {
	.fr-language-switch {
		gap: 0.28rem;
		font-size: 0.66rem;
	}

	.fr-language-switch__full {
		display: none;
	}

	.fr-language-switch__short {
		display: inline;
	}

	.fr-language-switch__globe {
		display: none;
	}

	.fr-team__logo-box {
		height: 4rem;
	}

	.fr-team__logo--rua.is-vertical {
		max-width: 72%;
		max-height: 88%;
	}

	.fr-team__logo--accor {
		max-width: 58%;
	}

	.fr-team__logo--fairmont {
		max-width: 78%;
	}
}

/* ========================================================================== 
   v1.6.0 — fixed header controls, restored horizontal RUA team lockup,
   and official vertical RUA mark above the legal disclaimer.
   ========================================================================== */

/* Keep the language switch and CTA in the same physical top-right position
   in English and Arabic. RTL applies to page copy, not the header controls. */
@media (min-width: 861px) {
	.fr-hero__header,
	body.fairmont-lang-en .fr-hero__header,
	body.fairmont-lang-ar .fr-hero__header,
	html[dir="rtl"] .fr-hero__header {
		direction: ltr;
		grid-template-columns: minmax(150px, 205px) minmax(120px, 1fr) 25rem;
	}

	.fr-hero__actions,
	body.fairmont-lang-en .fr-hero__actions,
	body.fairmont-lang-ar .fr-hero__actions,
	html[dir="rtl"] .fr-hero__actions {
		grid-column: 3;
		grid-row: 1;
		justify-self: end;
		justify-content: flex-end;
		width: 25rem;
		gap: 1rem;
		direction: ltr;
	}

	.fr-language-switch,
	body.fairmont-lang-en .fr-language-switch,
	body.fairmont-lang-ar .fr-language-switch {
		order: 1 !important;
		flex: 0 0 5.75rem;
		width: 5.75rem;
		min-width: 5.75rem;
		min-height: 3.25rem;
	}

	.fr-outline-button--hero,
	body.fairmont-lang-en .fr-outline-button--hero,
	body.fairmont-lang-ar .fr-outline-button--hero {
		order: 2 !important;
		box-sizing: border-box;
		flex: 0 0 18.25rem;
		width: 18.25rem;
		min-width: 18.25rem;
		max-width: 18.25rem;
		height: 3.25rem;
		min-height: 3.25rem;
		padding: 0.65rem 1rem;
		line-height: 1.2;
	}

	body.fairmont-lang-ar .fr-outline-button--hero {
		font-family: "Lateef", serif;
		font-size: 1.08rem;
	}
}

/* Restore the original horizontal RUA lockup in Meet the Team and preserve
   balanced optical sizing between the three brands. */
.fr-team__logos {
	grid-template-columns: 1.6fr 0.8fr 1fr;
	align-items: end;
	gap: clamp(1.2rem, 3vw, 3rem);
}

.fr-team__logo-box {
	height: clamp(5rem, 6.5vw, 6.5rem);
}

.fr-team__logo--rua.is-horizontal {
	max-width: 94%;
	max-height: 58%;
}

.fr-team__logo--accor {
	max-width: 58%;
	max-height: 74%;
}

.fr-team__logo--fairmont {
	max-width: 76%;
	max-height: 62%;
}

/* Official RUA vertical mark above the legal disclaimer. */
.fr-footer__rua-mark {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	margin: clamp(2.5rem, 4vw, 4rem) auto clamp(2rem, 3vw, 3rem);
	text-align: center;
}

.fr-footer__rua-mark .fr-logo-link {
	width: min(14rem, 42vw);
}

.fr-footer__rua-logo {
	display: block;
	width: 100%;
	height: auto;
	object-fit: contain;
}

@media (max-width: 860px) {
	.fr-hero__actions,
	body.fairmont-lang-en .fr-hero__actions,
	body.fairmont-lang-ar .fr-hero__actions,
	html[dir="rtl"] .fr-hero__actions {
		grid-column: 2;
		grid-row: 1;
		justify-self: end;
		justify-content: flex-end;
		width: 13.25rem;
		gap: 0.5rem;
		direction: ltr;
	}

	.fr-language-switch,
	body.fairmont-lang-en .fr-language-switch,
	body.fairmont-lang-ar .fr-language-switch {
		order: 1 !important;
		flex: 0 0 3.25rem;
		width: 3.25rem;
		min-width: 3.25rem;
		min-height: 2.5rem;
	}

	.fr-outline-button--hero,
	body.fairmont-lang-en .fr-outline-button--hero,
	body.fairmont-lang-ar .fr-outline-button--hero {
		order: 2 !important;
		box-sizing: border-box;
		flex: 0 0 9.5rem;
		width: 9.5rem;
		min-width: 9.5rem;
		max-width: 9.5rem;
		height: 2.5rem;
		min-height: 2.5rem;
		padding: 0.45rem 0.55rem;
		font-size: 0.5rem;
		line-height: 1.15;
	}

	body.fairmont-lang-ar .fr-outline-button--hero {
		font-family: "Lateef", serif;
		font-size: 0.9rem;
	}

	.fr-team__logos {
		grid-template-columns: 1.55fr 0.8fr 1fr;
		gap: 0.8rem;
	}

	.fr-team__logo-box {
		height: 4.25rem;
	}

	.fr-team__logo--rua.is-horizontal {
		max-width: 96%;
		max-height: 56%;
	}

	.fr-footer__rua-mark .fr-logo-link {
		width: min(11.5rem, 55vw);
	}
}

@media (max-width: 420px) {
	.fr-hero__actions,
	body.fairmont-lang-en .fr-hero__actions,
	body.fairmont-lang-ar .fr-hero__actions,
	html[dir="rtl"] .fr-hero__actions {
		width: 11.65rem;
		gap: 0.35rem;
	}

	.fr-language-switch,
	body.fairmont-lang-en .fr-language-switch,
	body.fairmont-lang-ar .fr-language-switch {
		flex-basis: 2.65rem;
		width: 2.65rem;
		min-width: 2.65rem;
	}

	.fr-outline-button--hero,
	body.fairmont-lang-en .fr-outline-button--hero,
	body.fairmont-lang-ar .fr-outline-button--hero {
		flex-basis: 8.65rem;
		width: 8.65rem;
		min-width: 8.65rem;
		max-width: 8.65rem;
	}
}



/* ==========================================================================
   v1.7.0 — comprehensive editable design + SEO support
   ========================================================================== */

/* Keep section-level backgrounds clean when users add their own colors/images. */
.fr-intro, .fr-address, .fr-features, .fr-team, .fr-register, .fr-footer {
  background-clip: padding-box;
}

/* Keep linked logos keyboard-accessible and prevent underlines from themes/plugins. */
.fr-logo-link { text-decoration: none !important; }

/* Fixed, predictable top CTA footprint in both languages. */
.fr-outline-button--hero {
  flex: 0 0 auto;
  white-space: normal;
}

/* Vertical RUA mark above legal copy. */
.fr-footer__rua-mark {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto clamp(2rem, 4vw, 4rem);
}
.fr-footer__rua-mark .fr-logo-link {
  display: inline-flex;
  justify-content: center;
}
.fr-footer__rua-logo { display: block; margin-inline: auto; object-fit: contain; }
