/* The Lads Page - HMS Eagle */
body.routes-page {
	/* CUSTOMIZE: Change the background image path below */
	background: url("../Images/Eagle/Eagle leaving Guz.webp") no-repeat center
		center fixed;
	background-size: cover;
}

/* Place Page Styles */
.place-page {
	width: 90vw;
	margin: 20px auto;
	padding: 20px;

	padding-bottom: calc(100vh - 80px);
	position: relative;
	z-index: 100;
}

.place-header {
	background: url("../Images/Eagle/carrierbgd2.webp") no-repeat center top;
	background-size: cover;
	padding: 30px;
	margin-bottom: 20px;
	border-radius: 10px;
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.header-top {
	display: flex;
	align-items: center;
	gap: 15px;
}

.header-buttons {
	display: flex;
	gap: 10px;
	align-items: center;
	margin-left: auto;
	padding-right: 15px;
}

.header-subtitle {
	color: white;
	font-size: 1rem;
	margin: 0;
	text-align: center;
	text-shadow:
		2px 2px 8px black,
		0 0 10px black,
		0 0 20px black;
}

.place-header h1 {
	color: white;
	font-size: 1.8rem;
	margin: 0;
	padding-left: 15px;
	text-shadow:
		2px 2px 8px black,
		0 0 10px black,
		0 0 20px black;
}

.back-button,
.nav-button {
	background-color: rgba(70, 130, 180, 0.7);
	color: white;
	padding: 6px 14px;
	border-radius: 4px;
	text-decoration: none;
	border: 1px solid rgba(70, 130, 180, 0.9);
	transition: all 0.3s ease;
	font-size: 0.85rem;
	font-weight: bold;
}

.header-top .back-button,
.header-top .nav-button {
	padding: 4px 10px;
	font-size: 0.75rem;
}

.back-button:hover,
.nav-button:hover {
	background-color: rgba(70, 130, 180, 0.85);
	transform: none;
}

/* Lads Jumbotron */
.lads-jumbotron {
	background: url("../Images/Eagle/carrierbgd2.webp") no-repeat center center;
	background-size: 100% 100%;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 20px;
	border-radius: 10px;
	padding: 0 20px;
}

.lads-jumbotron p {
	color: white;
	font-size: 1rem;
	margin: 0;
	text-align: center;
	text-shadow:
		2px 2px 8px black,
		0 0 10px black,
		0 0 20px black;
}

/* Main Content Wrapper - Two Column Layout */
.main-content-wrapper {
	display: flex;
	gap: 20px;
	align-items: flex-start;
}

/* Large viewport tuning: give the right gallery column more width */
@media (min-width: 1200px) {
	.place-page {
		width: 96vw;
		max-width: 1800px;
		display: flex;
		flex-direction: column;
		min-height: calc(100vh - 140px);
	}

	.main-content-wrapper {
		gap: 16px;
	}

	.lads-vertical-column {
		flex: 0 0 170px;
		padding: 16px;
	}

	.lads-container {
		flex: 1 1 auto;
		min-width: 0;
	}

	.lads-gallery {
		grid-template-columns: repeat(6, minmax(125px, 1fr));
	}

	.navigation-footer {
		margin-top: auto;
	}
}

/* Left Column - Vertical Image Boxes */
.lads-vertical-column {
	background: url("../Images/backgrounds/Back (19).webp") center center;
	background-size: cover;
	padding: 20px;
	border-radius: 10px;
	border: 4px solid white;
	display: flex;
	flex-direction: column;
	gap: 10px;
	flex: 0 0 200px;
}

/* Vertical Image Box */
.lads-vertical-image-box {
	width: 100%;
	aspect-ratio: 1;
	background-color: rgba(255, 255, 255, 0.05);
	border: 2px solid rgba(255, 255, 255, 0.2);
	border-radius: 5px;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s ease;
	position: relative;
}

.lads-vertical-image-box:hover {
	background-color: rgba(255, 255, 255, 0.2);
	border-color: rgba(255, 255, 255, 0.6);
}

.lads-vertical-image-box img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
	cursor: pointer;
	transition: transform 0.3s ease;
	display: block;
	max-width: 100%;
	max-height: 100%;
	image-orientation: from-image;
}

.lads-vertical-image-box img:hover {
	transform: none;
}

/* Empty image boxes (when no src) */
.lads-vertical-image-box img:not([src]),
.lads-vertical-image-box img[src=""] {
	display: none;
}

/* Lads Container - Gallery Style */
.lads-container {
	background: url("../Images/backgrounds/Back (19).webp") center center;
	background-size: cover;
	padding: 30px;
	border-radius: 10px;
	border: 4px solid white;
	display: flex;
	flex-direction: column;
	gap: 20px;
	flex: 1;
}

/* Each Row for a Person */
.lads-row {
	display: flex;
	gap: 20px;
	padding: 15px;
	background-color: rgba(0, 0, 0, 0.2);
	border-radius: 8px;
	border: 2px solid rgba(255, 255, 255, 0.2);
}

/* Left Column - Name and Rank */
.lads-info {
	flex: 0 0 200px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 10px;
	background-color: rgba(0, 0, 0, 0.3);
	border-radius: 5px;
	border: 2px solid rgba(255, 255, 255, 0.3);
}

.lads-name {
	color: white;
	font-size: 1.4rem;
	margin: 0 0 10px 0;
	text-align: center;
	text-shadow:
		2px 2px 6px black,
		0 0 8px black;
}

.lads-rank {
	color: goldenrod;
	font-size: 1.1rem;
	margin: 0;
	text-align: center;
	text-shadow:
		1px 1px 4px black,
		0 0 6px black;
}

/* Gallery Container - wraps headings and gallery */
.lads-gallery-container {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

/* Gallery Headings */
.lads-gallery-headings {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 10px;
}

.lads-heading {
	text-align: center;
	font-size: 1.2rem;
	font-weight: bold;
	padding: 5px;
}

.lads-heading-span-4 {
	grid-column: span 4;
	position: relative;
	padding-bottom: 30px;
}

.lads-heading-span-4::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 10%;
	right: 10%;
	height: 25px;
	border: 3px solid darkgoldenrod;
	border-bottom: none;
	border-radius: 50% 50% 0 0;
}

/* Right Column - 6-Column Gallery Grid */
.lads-gallery {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 10px;
	align-items: start;
}

/* Image Box */
.lads-image-box {
	width: 100%;
	aspect-ratio: auto;
	background-color: rgba(255, 255, 255, 0.05);
	border: 2px solid rgba(255, 255, 255, 0.2);
	border-radius: 5px;
	overflow: visible;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s ease;
	position: relative;
	min-height: 120px;
	padding: 6px;
}

.lads-image-box:hover {
	background-color: rgba(255, 255, 255, 0.2);
	border-color: rgba(255, 255, 255, 0.6);
}

.lads-image-box img {
	width: 100%;
	height: auto;
	object-fit: contain;
	object-position: center;
	cursor: pointer;
	transition: transform 0.3s ease;
	display: block;
	image-orientation: from-image;
	max-width: 100%;
	max-height: 220px;
}

.lads-image-box img:hover {
	transform: none;
}

/* Hide the broken browser image icon in empty boxes */
.lads-image-box img[src=""],
.lads-image-box img:not([src]) {
	display: none;
}

/* Show admiralty anchor in empty/missing image boxes — instant via CSS :has() */
.lads-image-box:has(img[src=""])::after,
.lads-image-box:has(img:not([src]))::after,
.lads-image-box.lads-no-photo::after {
	content: "\2693";
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: 2rem;
	color: rgba(255, 215, 0, 0.7);
	pointer-events: none;
	line-height: 1;
}

/* Crossed the Bar indicator — small cross beside the person's name */
.crossed-bar-cross {
	display: inline-block;
	margin-left: 6px;
	color: rgba(220, 220, 255, 0.9);
	font-size: 1rem;
	vertical-align: middle;
	text-shadow: 1px 1px 3px black;
}

/* Responsive adjustments for smaller screen image boxes */
@media (min-width: 641px) and (max-width: 900px) {
	.lads-image-box {
		min-height: 110px;
	}

	.lads-gallery {
		grid-template-columns: repeat(3, 1fr) !important;
	}

	.lads-heading-span-4 {
		grid-column: span 2 !important;
	}
}

/* Responsive adjustments */
@media (max-width: 900px) {
	.place-page {
		margin-top: 130px;
	}

	.main-content-wrapper {
		flex-direction: column;
	}

	.lads-vertical-column {
		flex: 1;
		display: grid;
		grid-template-columns: repeat(4, 1fr);
		gap: 10px;
		width: 100%;
	}

	.lads-vertical-column h2 {
		grid-column: 1 / -1;
		margin-bottom: 10px;
	}

	.lads-info {
		flex: 0 0 150px;
	}

	/* Adjust gallery to 3 columns on medium screens */
	.lads-gallery {
		grid-template-columns: repeat(3, 1fr) !important;
	}

	.lads-heading-span-4 {
		grid-column: span 2 !important;
	}
}

@media (max-width: 640px) {
	.place-page {
		padding-top: 20px;
		margin-top: 0;
	}

	.place-header {
		flex-direction: column;
	}

	.header-top {
		flex-direction: column;
		align-items: center;
		padding-right: 0;
		gap: 15px;
	}

	.back-button {
		width: 100%;
		max-width: 300px;
		text-align: center;
		order: 2;
	}

	.header-subtitle {
		order: 1;
	}

	.lads-vertical-column {
		grid-template-columns: repeat(2, 1fr);
	}

	.lads-vertical-column h2 {
		grid-column: 1 / -1;
		margin-bottom: 10px;
		text-align: center;
	}

	.lads-row {
		flex-direction: column;
	}

	.lads-info {
		flex: 1;
	}

	/* Shrink gallery to 2 columns on mobile */
	.lads-gallery {
		grid-template-columns: repeat(2, 1fr) !important;
	}

	.lads-gallery-container {
		display: block;
	}

	.lads-gallery-headings {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		gap: 10px;
		margin-bottom: 10px;
	}

	.lads-gallery {
		display: grid;
	}

	.lads-heading-span-4 {
		grid-column: 1 / -1 !important;
	}

	.lads-image-box {
		min-height: 100px;
	}

	.lads-image-box img {
		max-height: 180px;
	}
}

@media (max-width: 420px) {
	.place-page {
		padding: 12px;
		margin: 8px 0;
	}

	.lads-image-box {
		min-height: 90px;
		padding: 4px;
	}

	.lads-image-box img {
		max-height: 140px;
	}

	.back-button {
		width: 100%;
		max-width: none;
		padding: 6px 10px;
		font-size: 0.75rem;
	}

	.header-subtitle {
		font-size: 0.9rem;
	}

	.lads-row {
		flex-direction: column;
		padding: 6px;
		gap: 6px;
		min-width: 0;
		width: 100%;
	}

	.lads-info {
		flex: 1;
		width: 100%;
		min-width: 0;
	}

	.lads-gallery {
		grid-template-columns: repeat(2, 1fr) !important;
	}

	.lads-vertical-column {
		grid-template-columns: repeat(2, 1fr);
	}

	.lads-heading {
		font-size: 0.8rem;
	}

	.lads-image-box {
		width: 100px;
		height: 100px;
	}
}

@media (max-width: 300px) {
	.place-page {
		padding: 8px;
		margin: 4px 0;
	}

	.back-button {
		padding: 4px 8px;
		font-size: 0.65rem;
	}

	.header-subtitle {
		font-size: 0.8rem;
	}

	.lads-row {
		padding: 4px;
		gap: 4px;
	}

	.lads-gallery {
		grid-template-columns: repeat(2, 1fr) !important;
		gap: 4px;
	}

	.lads-heading {
		font-size: 0.7rem;
	}

	.lads-image-box {
		width: 70px;
		height: 70px;
	}
}

/* Navigation Footer */
.navigation-footer {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 20px;
	margin-top: 30px;
	padding-top: 20px;
	border-top: 2px solid rgba(255, 255, 255, 0.2);
}

/* Eagle nav buttons: original style, smaller and uniform */
.place-header .header-top {
display: flex;
align-items: center;
}

.place-header .header-buttons {
margin-left: auto;
justify-content: flex-end;
align-items: center;
flex-wrap: wrap;
gap: 10px;
padding-right: 15px;
}

.navigation-footer {
display: flex;
justify-content: center;
align-items: center;
gap: 10px;
flex-wrap: nowrap;
}

.header-buttons .back-button,
.header-buttons .nav-button,
.navigation-footer .back-button,
.navigation-footer .nav-button {
display: inline-flex;
align-items: center;
justify-content: center;
width: 170px;
min-height: 28px;
padding: 4px 8px;
font-size: 0.72rem;
line-height: 1.2;
box-sizing: border-box;
text-align: center;
margin: 0;
flex: 0 0 170px;
}