/* Top Navigation Links */
.top-links {
	position: absolute;
	top: 20px;
	left: 30px;
	z-index: 10;
}

.top-links a {
	font-family: 'Arapey', serif;
	font-size: 16px;
	color: white;
	text-decoration: none;
	margin-right: 15px;
}

.top-links a:hover {
	text-decoration: underline;
}

@media (min-width: 768px) {
	.svg-coat-of-arms {
		position: absolute;
		/* Ensures it stays above the text */
		bottom: 190px;
		/* Adjust as needed */
		left: 50px;
		/* Adjust to match desktop layout */
		width: 60px;
		/* Ensures fixed width */
		height: auto;
		/* Keeps aspect ratio */
	}

	.coat-of-arms-img-mobile {
		display: none !important;
	}

	.mobile {
		display: none !important;
	}
}

@media (max-width: 768px) {
	.pc {
		display: none !important;
	}

	.svg-coat-of-arms {
		display: none
	}

	.cover {
		position: relative;
		width: 100%;
		height: 70vh !important;
		/* Full height */
		background: var(--cover-image-mobile) no-repeat center calc(10%)/cover;
		/* Move up slightly */
		display: flex;
		align-items: flex-end;
		/* Moves text to bottom */
		justify-content: flex-start;
		/* Moves text to left */
		text-align: left;
		color: white;
		padding: 10px !important;
		/* Adds space from edges */
	}

	/* Fix Text Size */
	.cover h1 {
		font-size: 1.8em !important;
		/* Ensure smaller size */
		line-height: 1.2 !important;
		word-wrap: break-word;
		/* Prevent overflow */
		text-align: leftj !important;
	}

	.cover h2 {
		font-size: 1.2em !important;
		text-align: left !important;
	}

	.cover {
		background-position: center top !important;
		/* Center the image */
		background-size: auto;
		/* Prevents excessive zoom */
	}

	.cover::before {
		content: "";
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		background: rgba(0, 0, 0, 0.3);
		/* Light overlay for readability */
	}
}


.cover {
	position: relative;
	width: 100%;
	height: 100vh;
	/* Full height */
	background: var(--cover-image-desktop) no-repeat center calc(10%)/cover;
	/* Move up slightly */
	display: flex;
	align-items: flex-end;
	/* Moves text to bottom */
	justify-content: flex-start;
	/* Moves text to left */
	text-align: left;
	color: white;
	padding: 50px;
	/* Adds space from edges */
}

.cover::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.3);
	/* Light overlay for readability */
}

.cover-content {
	position: relative;
	z-index: 2;
	text-align: left;
}

.cover h1 {
	font-family: 'Playfair Display', serif !important;
	font-size: 2.8em;
	/* Smaller size */
	font-weight: bold;
	margin-bottom: 5px;
}

.cover h2 {
	font-family: 'Playfair Display', serif !important;
	font-size: 1.5em;
	/* More subtle */
	font-style: italic;
	font-weight: 300;
}

@media (max-width: 768px) {
	.cover-content {
		position: relative;
		z-index: 2;
		text-align: left;
	}

	.content {
		display: flex;
		flex-direction: column;
	}

	.details .section:first-child {
		/* Targets the Biography section */
		order: 1;
	}

	.coat-of-arms {
		/* Moves Coat of Arms immediately after Biography */
		display: block;
		margin-top: 20px;
		/* Adds spacing for better visual separation */
		text-align: center;
	}

	.details .section:nth-child(2) {
		/* Targets "Heir" section */
		order: 3;
	}

	.details .section:nth-child(3) {
		/* Ensures all other sections follow properly */
		order: 4;
	}
}

	{
	.cover {
		height: 80vh;
		background-position: center center;
		/* Adjust for mobile */
		padding: 30px;

		.svg-coat-of-arms {
			position: absolute;
			/* Keeps it over text */
			bottom: auto;
			/* Resets bottom positioning */
			top: 15%;
			/* Places it correctly above the text */
			left: 50%;
			/* Centers it */
			transform: translateX(-50%);
			/* Centers it properly */
			width: 60px;
			/* Keeps it small */
		}
	}

	.cover h1 {
		font-size: 2em;
		/* Adjust size for mobile */
	}

	.cover h2 {
		font-size: 1.2em;
	}
}

.logo {
	position: absolute;
	top: 20px;
	right: 30px;
	width: 360px;
	/* Adjust size as needed */
	height: auto;
	opacity: 0.9;
}

/* Prevent it from covering the face on mobile */
@media (max-width: 768px) {
	.logo {
		width: 180px;
		/* Smaller on mobile */
		right: 15px;
		top: 15px;
	}
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: 'Arapey', serif !important;
	font-size: 17px;
	font-weight: 400;
	line-height: 1.8;
	background-color: #f9f9f9;
	margin: 0;
	padding: 0;
	color: #000;
}

/* Ensure bold text looks properly thick */
strong,
b {
	font-family: Arial, sans-serif !important;
	font-weight: 700 !important;
	letter-spacing: -0.3px;
	color: #000;
}

/* Adjust headings for clarity */
h1 {
	font-family: 'Arapey', serif !important;
	font-size: 2.2em;
	font-weight: 700;
}

h2 {
	font-family: 'Arapey', serif !important;
	font-size: 1.8em;
	font-weight: 600;
}

h3 {
	font-family: 'Arapey', serif !important;
	font-size: 1.5em;
	font-weight: 600;
}

/* Adjust font size for mobile */
@media (max-width: 768px) {
	body {
		font-size: 16px;
	}
}

.container {
	max-width: 1200px;
	margin: 20px auto;
	padding: 15px;
	background: #fff;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
	border-radius: 8px;
}

.header {
	text-align: center;
	margin-bottom: 20px;
}

.header h1 {
	font-size: 2.5em;
	margin: 10px 0;
}

.header h2 {
	font-size: 1.5em;
	font-weight: 400;
	color: #555;
}

.header img {
	max-width: 150px;
	border-radius: 50%;
	margin: 15px 0;
}

.content {
	display: grid;
	grid-template-columns: 1fr 2fr;
	gap: 20px;
}

.coat-of-arms {
	text-align: center;
}

.coat-of-arms p {
	font-size: 14px;
	color: #333;
	margin-bottom: 10px;
	/* Fix unnecessary   */
}

@media (min-width: 768px) {
	.coat-of-arms-img-pc {
		max-width: 110px;
		/* Adjust size as needed */
		height: auto;
		display: block;
		margin: 0 auto;
		gap: 0px !important;
	}
}

.section {
	margin-bottom: 20px;
}

.section h3 {
	font-size: 1.8em;
	border-bottom: 2px solid #ddd;
	padding-bottom: 5px;
	margin-bottom: 10px;
	color: #333;
}

.lineage ul,
.title-holders ul {
	list-style: none;
	padding: 0;
}

.lineage ul li,
.title-holders ul li {
	padding: 5px 0;
	border-bottom: 1px solid #eee;
}

@media (max-width: 768px) {
	.content {
		display: flex;
		flex-direction: column-reverse;
		/* Moves left column after details */
	}

	.coat-of-arms-img-mobile {
		width: 55px;
		height: min;
		flex-shrink: 0;
	}

	.coat-of-arms-img-pc {
		display: none !important;
	}
}

.coat-of-arms {
	max-width: 600px;
	margin: 0rem auto;
	padding: 0 1.5rem;
	display: flex;
	align-items: start;
	gap: 0rem;
	background-color: white;
	flex-direction: column;
}

.coat-of-arms>.section {
	color: #374151;
	flex-grow: 1;
}

.coat-of-arms>.section h3 {
	margin: 0 0 0.75rem 0;
	font-size: 1.25rem;
	font-weight: 600;
}

.coat-of-arms>.section p {
	margin: 0.5rem 0;
	font-size: 0.875rem;
	line-height: 1.5;
}

small {
	display: block;
}

i {
	color: #4B5563;
}

@media (max-width: 480px) {
	.coat-of-arms {
		flex-direction: column;
		text-align: center;
		gap: 1rem;
	}

	.coat-of-arms-img-mobile {
		width: 55px;
	}
}