/* ==========================================================================
   UB Heritage — Legal Page (Terms & Conditions / Privacy Policy)
   Template: page-legal.php
   All selectors scoped under .ubh-legal
   ========================================================================== */

.ubh-legal {
	--lg-gold: var(--color-gold, #d2ab67);
	--lg-black: var(--color-black, #000);
	--lg-text: #4a4a4a;
	--lg-muted: #7a7a7a;
	--lg-line: #e6e6e6;
	--lg-font-display: var(--font-display, "IvyBodoni", "Playfair Display", Georgia, serif);
	--lg-font-body: var(--font-body, "Avenir", "Montserrat", "Segoe UI", sans-serif);
	--lg-font-list: var(--font-list, "Clother", "Avenir", "Montserrat", sans-serif);

	/* stepped type scale */
	--lg-fs-title: 56px;
	--lg-fs-h2: 30px;
	--lg-fs-h3: 20px;
	--lg-fs-body: 18px;
	--lg-fs-meta: 16px;

	/* spacing */
	--lg-pad-top: 110px;
	--lg-pad-bottom: 130px;
	--lg-head-gap: 56px;
	--lg-section-gap: 48px;
	--lg-measure: 960px;

	display: block;
	background: var(--color-bg, #fff);
	color: var(--lg-text);
}

/* ============ BANNER ============ */
.ubh-legal-banner {
	display: block;
	width: 100%;
	line-height: 0;
	overflow: hidden;
}

.ubh-legal-banner picture {
	display: block;
}

.ubh-legal-banner__img {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	border-radius: 0;
}

/* ============ CONTAINER ============ */
.ubh-legal__container {
	width: 100%;
	max-width: var(--container, 1820px);
	margin-inline: auto;
	padding-inline: var(--gutter, 50px);
	box-sizing: border-box;
}

/* ============ BODY ============ */
.ubh-legal-body {
	padding-top: var(--lg-pad-top);
	padding-bottom: var(--lg-pad-bottom);
}

.ubh-legal--no-banner .ubh-legal-body {
	padding-top: calc(var(--lg-pad-top) + 20px);
}

.ubh-legal-body__inner {
	max-width: var(--lg-measure);
}

/* ---- Head ---- */
.ubh-legal-head {
	margin-bottom: var(--lg-head-gap);
}

.ubh-legal-head__title {
	margin: 0;
	font-family: var(--lg-font-display);
	font-style: italic;
	font-weight: 400;
	font-size: var(--lg-fs-title);
	line-height: 1.15;
	color: var(--lg-black);
}

.ubh-legal-head__rule {
	display: block;
	width: 64px;
	height: 2px;
	margin-top: 24px;
	background: var(--lg-gold);
}

.ubh-legal-head__dates {
	margin-top: 28px;
}

.ubh-legal-head__dates p {
	margin: 0;
	font-family: var(--lg-font-body);
	font-size: var(--lg-fs-meta);
	line-height: 1.75;
	color: var(--lg-muted);
}

.ubh-legal-head__dates span {
	color: var(--lg-black);
	font-weight: 800;
}

/* ---- Content (WP editor output) ---- */
.ubh-legal-content {
	font-family: var(--lg-font-body);
	font-size: var(--lg-fs-body);
	line-height: 1.75;
	color: var(--lg-text);
	overflow-wrap: break-word;
}

.ubh-legal-content > *:first-child {
	margin-top: 0;
}

.ubh-legal-content > *:last-child {
	margin-bottom: 0;
}

.ubh-legal-content p {
	margin: 0 0 18px;
}

.ubh-legal-content h2 {
	margin: var(--lg-section-gap) 0 18px;
	padding-top: var(--lg-section-gap);
	border-top: 1px solid var(--lg-line);
	font-family: var(--lg-font-display);
	font-style: italic;
	font-weight: 400;
	font-size: var(--lg-fs-h2);
	line-height: 1.25;
	color: var(--lg-black);
}

/* no divider if content starts directly with a heading */
.ubh-legal-content h2:first-child {
	margin-top: 0;
	padding-top: 0;
	border-top: 0;
}

.ubh-legal-content h3 {
	margin: 28px 0 12px;
	font-family: var(--lg-font-body);
	font-weight: 800;
	font-size: var(--lg-fs-h3);
	line-height: 1.4;
	color: var(--lg-black);
}

.ubh-legal-content strong,
.ubh-legal-content b {
	font-weight: 800;
	color: var(--lg-black);
}

.ubh-legal-content a {
	color: var(--lg-black);
	text-decoration: underline;
	text-decoration-color: var(--lg-gold);
	text-decoration-thickness: 1px;
	text-underline-offset: 4px;
	transition: color 0.25s ease;
}

.ubh-legal-content a:hover {
	color: var(--lg-gold);
}

.ubh-legal-content a:focus-visible {
	outline: 2px solid var(--lg-gold);
	outline-offset: 3px;
}

/* lists */
.ubh-legal-content ul,
.ubh-legal-content ol {
	margin: 0 0 22px;
	padding: 0;
	list-style: none;
}

.ubh-legal-content li {
	position: relative;
	margin: 0 0 10px;
	padding-left: 26px;
	font-family: var(--lg-font-list);
}

.ubh-legal-content li:last-child {
	margin-bottom: 0;
}

.ubh-legal-content ul > li::before {
	content: "";
	position: absolute;
	left: 2px;
	top: 0.72em;
	width: 7px;
	height: 7px;
	background: var(--lg-gold);
	transform: rotate(45deg);
}

.ubh-legal-content ol {
	counter-reset: ubh-legal-ol;
}

.ubh-legal-content ol > li {
	counter-increment: ubh-legal-ol;
}

.ubh-legal-content ol > li::before {
	content: counter(ubh-legal-ol) ".";
	position: absolute;
	left: 0;
	top: 0;
	color: var(--lg-gold);
	font-weight: 800;
}

/* contact block */
.ubh-legal-content .ubh-legal-contact {
	margin-top: 8px;
	padding: 28px 32px;
	border-left: 2px solid var(--lg-gold);
	background: #faf7f1;
}

.ubh-legal-content .ubh-legal-contact p {
	margin-bottom: 6px;
}

.ubh-legal-content .ubh-legal-contact p:last-child {
	margin-bottom: 0;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1440px) {
	.ubh-legal {
		--lg-fs-title: 50px;
		--lg-fs-h2: 28px;
		--lg-pad-top: 96px;
		--lg-pad-bottom: 110px;
	}
}

@media (max-width: 1200px) {
	.ubh-legal {
		--lg-fs-title: 44px;
		--lg-fs-h2: 26px;
		--lg-fs-body: 17px;
		--lg-pad-top: 80px;
		--lg-pad-bottom: 96px;
		--lg-head-gap: 48px;
		--lg-section-gap: 40px;
	}

	.ubh-legal__container {
		padding-inline: 24px;
	}
}

@media (max-width: 1024px) {
	.ubh-legal {
		--lg-fs-title: 40px;
		--lg-fs-h2: 24px;
		--lg-measure: 100%;
	}
}

@media (max-width: 768px) {
	.ubh-legal {
		--lg-fs-title: 34px;
		--lg-fs-h2: 22px;
		--lg-fs-h3: 18px;
		--lg-fs-body: 16px;
		--lg-fs-meta: 15px;
		--lg-pad-top: 60px;
		--lg-pad-bottom: 72px;
		--lg-head-gap: 40px;
		--lg-section-gap: 32px;
	}

	.ubh-legal-head__rule {
		margin-top: 18px;
	}

	.ubh-legal-content .ubh-legal-contact {
		padding: 22px 20px;
	}
}

@media (max-width: 425px) {
	.ubh-legal {
		--lg-fs-title: 30px;
		--lg-fs-h2: 20px;
		--lg-fs-h3: 17px;
		--lg-fs-body: 15px;
		--lg-fs-meta: 14px;
		--lg-pad-top: 48px;
		--lg-pad-bottom: 60px;
		--lg-section-gap: 28px;
	}

	.ubh-legal__container {
		padding-inline: 18px;
	}

	.ubh-legal-content li {
		padding-left: 22px;
	}
}