/* Reset */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

/* Layout */
#header {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	z-index: 2000;
	box-sizing: border-box;
	background-color: #123456;
}

header {
	background-color: #123456; /* match your header colour */
	color: white;
	padding: 20px 0;
	text-align: center;
	width: 100%;
	box-sizing: border-box;
}

/* Header top section (contains hamburger) */
.header-top {
	background-color: #123456;
	padding: 0;
}
img {
	max-width: 100%;
	height: auto;
	display: block;
	image-orientation: from-image;
}

html,
body {
	height: 100%;
	margin: 0;
}
.page-wrapper {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	/* No padding - handled by content sections */
}
main {
	flex: 1;
}
/* Default reset */
html,
body {
	height: 100%;
	margin: 0;
	padding: 0;
	overflow-x: hidden;
}

/* Body with fixed background - all pages */
body {
	font-family: Arial, sans-serif;
	min-height: 100vh;
	position: relative;
	/* Background images will be defined in page-specific CSS */
	background-attachment: fixed;
	background-position: center center;
	background-repeat: no-repeat;
	background-size: cover;
}

/* Extra scroll room so content can fully clear the viewport */
body::after {
	content: "";
	display: block;
	height: 100vh;
	width: 100%;
	pointer-events: none;
}

/* Page backgrounds */
body.routes-page {
	background: url("../Images/Atlantic/North Atlantic 1.webp") no-repeat center
		center fixed;
	background-size: cover;
}

body.friends-page {
	background: url("../Images/Friends/Jim&Sharon/TurtlesGroup.webp") no-repeat
		center center fixed;
	background-size: cover;
}

body.learning-page {
	background: url("../Images/Learning/Learning 1.webp") no-repeat center center
		fixed;
	background-size: cover;
}

/* Header Menu */
.main-menu {
	background: #123456;
	padding: 10px 0;
}

/* Content sections - ensure proper spacing for fixed header and footer */
/* Default wrapper for content sections - provides scroll behavior */
section,
.content,
.page-content,
main,
body > section:first-of-type {
	padding-top: 120px; /* Space for fixed header */
	padding-bottom: calc(
		100vh - 80px
	); /* Full viewport minus footer - allows content to scroll under header */
	min-height: 100vh;
	position: relative;
	z-index: 100;
}

/* Place page wrapper */
.place-page {
	padding-top: 120px; /* Space for fixed header */
	padding-bottom: calc(
		100vh - 80px
	); /* Full viewport minus footer - allows content to scroll under header */
	min-height: 100vh;
	position: relative;
	z-index: 100;
}

/* Place header styling */
.place-header {
	text-align: center;
	padding: 20px;
	margin-bottom: 20px;
	position: relative;
	z-index: 100;
}

.place-header h1 {
	color: white;
	font-size: 2.5rem;
	text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
	margin-bottom: 15px;
}

.back-button {
	display: inline-block;
	padding: 10px 20px;
	background-color: rgba(255, 255, 255, 0.2);
	color: white;
	text-decoration: none;
	border-radius: 5px;
	font-weight: bold;
	transition: all 0.3s ease;
}

.back-button:hover {
	background-color: rgba(255, 255, 255, 0.4);
	transform: translateX(-5px);
}

.main-menu ul {
	list-style: none;
	display: flex;
	justify-content: center;
	gap: 30px;
}

.main-menu a {
	color: white;
	text-decoration: none;
	font-weight: bold;
}

.main-menu a:hover {
	text-decoration: underline;
}

/* Hamburger button */
.hamburger {
	display: none;
	flex-direction: column;
	background: none;
	border: none;
	cursor: pointer;
	padding: 10px 15px;
	gap: 6px;
	z-index: 2001;
}

.hamburger span {
	width: 25px;
	height: 3px;
	background-color: white;
	transition: all 0.3s ease;
	border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
	transform: rotate(45deg) translate(9px, 9px);
}

.hamburger.active span:nth-child(2) {
	opacity: 0;
}

.hamburger.active span:nth-child(3) {
	transform: rotate(-45deg) translate(9px, -9px);
}

/* Dropdown menu styles */
.main-menu li {
	position: relative;
}

.main-menu .dropdown {
	position: relative;
}

.main-menu .dropdown-menu {
	list-style: none;
	position: absolute;
	top: 100%;
	left: 0;
	background: #222;
	min-width: 200px;
	padding: 10px 0;
	border-radius: 4px;
	display: none;
	flex-direction: column;
	box-shadow: 0 4px 6px rgba(196, 194, 194, 0.3);
	z-index: 2001;
}

.main-menu .dropdown:hover .dropdown-menu {
	display: flex;
}

.main-menu .dropdown-menu li {
	padding: 0;
	position: relative;
}

.main-menu .dropdown-menu .dropdown-menu {
	position: absolute;
	left: 100%;
	top: 0;
	background: #222;
	min-width: 180px;
	border-radius: 4px;
	display: none !important;
	flex-direction: column;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
	z-index: 2002;
	margin-left: 0;
	padding: 10px 0;
}

.main-menu .dropdown-menu .dropdown:hover > .dropdown-menu {
	display: flex !important;
}

.main-menu .dropdown-menu a {
	display: block;
	padding: 10px 20px;
	color: white;
	text-decoration: none;
	font-weight: normal;
	transition: all 0.2s ease;
}

.main-menu .dropdown-menu a:hover {
	background: #333;
	text-decoration: none;
	padding-left: 25px;
}

/* Responsive hamburger menu */
@media (max-width: 768px) {
	.header-top {
		display: flex;
		justify-content: flex-end;
		align-items: center;
		padding: 10px 20px;
		background: #123456;
	}

	.hamburger {
		display: flex;
	}

	.main-menu {
		display: none;
		position: fixed;
		top: 60px;
		left: 0;
		right: 0;
		background: #123456;
		flex-direction: column;
		z-index: 1999;
		max-height: calc(100vh - 60px);
		overflow-y: auto;
	}

	.main-menu.active {
		display: flex;
	}

	.main-menu ul {
		flex-direction: column;
		gap: 0;
		padding: 10px 0;
	}

	.main-menu li {
		padding: 0;
	}

	.main-menu a {
		display: block;
		padding: 12px 20px;
		color: white;
		text-decoration: none;
		font-weight: bold;
	}

	.main-menu a:hover {
		background: #222;
	}
}

/* Two-column layout for non-home pages */
.page-columns {
	display: flex;
	gap: 20px;
	padding: 120px 20px calc(100vh - 80px) 20px; /* Top padding for header, bottom allows scrolling under header */
	position: relative;
	z-index: 100;
	min-height: 100vh;
}

.column {
	flex: 1;
	max-width: 700px;
	min-height: 300px;
	max-height: 70vh;
	overflow-y: auto;
	overscroll-behavior: auto;
	border: 2px solid #555;
	padding: 15px;
	background: rgba(255, 255, 255, 0.85);
	position: relative;
}

/* Applies to all place pages */
.place-columns {
	display: flex;
	justify-content: center; /* centres the columns */
	align-items: flex-start; /* Ensures both columns start at the same level */
	gap: 40px; /* equal spacing between columns */
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px; /* Horizontal padding only - parent handles vertical */
	box-sizing: border-box;
	flex-wrap: wrap; /* Allow wrapping on small screens */
}

/* When place-columns is used without .place-page wrapper, add padding */
body > .place-columns,
body > div > .place-columns:first-child {
	padding-top: 120px;
	padding-bottom: calc(100vh - 80px);
	min-height: 100vh;
}

/* Each column */
.place-columns .column,
.place-columns .place-column-left,
.place-columns .place-column-right {
	flex: 1; /* Allows columns to grow equally */
	min-width: 300px; /* Minimum width before wrapping */
	max-width: 600px; /* Maximum width for each column */
	max-height: 70vh;
	overflow-y: auto;
	border: 2px solid rgba(255, 255, 255, 0.7);
	border-radius: 8px;
	padding: 20px;
	box-sizing: border-box;
	background: rgba(255, 255, 255, 0.85); /* Better visibility */
	backdrop-filter: blur(2px);
	position: relative;
	z-index: 100;
}

/* Mobile layout */
@media (max-width: 1100px) {
	.place-columns {
		display: flex;
		flex-direction: column;
		justify-content: flex-start;
		align-items: center;
		gap: 20px;
		width: 100%;
		max-width: 100%;
		margin: 0 auto;
		padding: 0 20px;
		box-sizing: border-box;
	}

	.place-columns .column,
	.place-columns .place-column-left,
	.place-columns .place-column-right {
		width: 100%;
		max-width: 100%;
		min-width: auto;
		max-height: 60vh;
		overflow-y: auto;
		overscroll-behavior: auto;
		border: 2px solid rgba(255, 255, 255, 0.7);
		border-radius: 8px;
		padding: 20px;
		box-sizing: border-box;
		background: rgba(255, 255, 255, 0.85);
		backdrop-filter: blur(2px);
	}

	.place-page {
		padding-top: 100px;
	}
}

#footer {
	position: fixed;
	bottom: 0;
	left: 0;
	width: 100%;
	text-align: center;
	background-color: #123456;
	color: white;
	padding: 20px 0;
	z-index: 1500;
	box-sizing: border-box;
}

#footer p {
	margin: 0;
	font-weight: bold;
	font-size: 1rem;
	color: white !important;
}

/* ===========================
   LIGHTBOX GALLERY STYLES
   =========================== */

.lightbox-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.9);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 10000;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
	opacity: 1;
	pointer-events: auto;
}

.lightbox-content,
.lightbox-container {
	position: relative;
	max-width: 95%;
	max-height: 95vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 15px;
}

.lightbox-image {
	max-width: 85vw;
	max-height: 70vh;
	object-fit: contain;
	border-radius: 8px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
	animation: slideIn 0.3s ease;
	image-orientation: from-image;
}

@keyframes slideIn {
	from {
		opacity: 0;
		transform: scale(0.95);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

/* Navigation arrows */
.lightbox-arrow,
.lightbox-prev,
.lightbox-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(255, 255, 255, 0.2);
	border: none;
	color: white;
	font-size: 2.5rem;
	padding: 15px 20px;
	cursor: pointer;
	user-select: none;
	border-radius: 4px;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 60px;
	min-height: 60px;
}

.lightbox-arrow:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
	background: rgba(255, 255, 255, 0.4);
	transform: translateY(-50%) scale(1.1);
}

.lightbox-arrow.left,
.lightbox-prev {
	left: 20px;
}

.lightbox-arrow.right,
.lightbox-next {
	right: 20px;
}

/* Close button */
.lightbox-close {
	position: absolute;
	top: 20px;
	right: 20px;
	background: rgba(255, 255, 255, 0.2);
	border: none;
	color: white;
	font-size: 2.5rem;
	width: 50px;
	height: 50px;
	cursor: pointer;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s ease;
	line-height: 1;
	padding: 0;
}

.lightbox-close:hover {
	background: rgba(255, 255, 255, 0.4);
	transform: scale(1.1);
}

/* Image info section with large fonts */
.lightbox-info {
	background: rgba(0, 0, 0, 0.7);
	color: white;
	padding: 20px;
	border-radius: 6px;
	max-width: 85vw;
	min-width: 300px;
}

.lightbox-caption {
	font-size: 1.5rem;
	line-height: 1.6;
	margin-bottom: 10px;
	word-wrap: break-word;
	text-align: center;
	min-height: 2.4rem;
}

.lightbox-counter {
	font-size: 1.1rem;
	color: #aaa;
	text-align: center;
}

/* Gallery grid layout */
.gallery-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 15px;
	margin: 15px 0;
	max-width: 100%;
}

.gallery-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
}

.gallery-caption {
	margin: 0;
	text-align: center;
	font-size: 0.95rem;
	line-height: 1.4;
	color: #f2f2f2;
	word-break: break-word;
	display: none;
}

/* Make images clickable - display as thumbnails */
img[data-gallery] {
	cursor: pointer;
	transition:
		transform 0.2s ease,
		filter 0.2s ease;
	width: 100%;
	height: auto;
	max-width: 200px;
	max-height: 150px;
	object-fit: contain;
	border-radius: 4px;
	display: block;
	border: 3px solid darkgoldenrod;
}

img[data-gallery]:hover {
	transform: scale(1.05);
	filter: brightness(1.1);
}

/* Responsive mobile adjustments */
@media (max-width: 768px) {
	.lightbox-arrow {
		font-size: 2rem;
		padding: 10px 15px;
		min-width: 50px;
		min-height: 50px;
	}

	.lightbox-arrow.left {
		left: 10px;
	}

	.lightbox-arrow.right {
		right: 10px;
	}

	.lightbox-close {
		font-size: 2rem;
		width: 45px;
		height: 45px;
		top: 10px;
		right: 10px;
	}

	.lightbox-image {
		max-width: 95vw;
		max-height: 60vh;
	}

	.lightbox-info {
		max-width: 95vw;
		padding: 15px;
	}

	.lightbox-caption {
		font-size: 1.2rem;
	}
}

/* ============================================ */
/* LIGHTBOX OVERLAY AND CONTAINER             */
/* ============================================ */

.lightbox-caption-container {
	background: rgba(0, 0, 0, 0.8);
	color: white;
	padding: 15px 20px;
	border-radius: 6px;
	max-width: 85vw;
	text-align: center;
	margin-top: 10px;
}

.lightbox-caption {
	font-size: 1.3rem;
	line-height: 1.5;
	margin-bottom: 8px;
	word-wrap: break-word;
}

.lightbox-counter {
	font-size: 0.95rem;
	color: #aaa;
	text-align: center;
}

.lightbox-comments {
	background: rgba(0, 0, 0, 0.8);
	color: white;
	padding: 15px;
	border-radius: 6px;
	max-width: 85vw;
	margin-top: 10px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.lightbox-comment-box {
	width: 100%;
	min-height: 80px;
	padding: 10px;
	background: rgba(255, 255, 255, 0.1);
	color: white;
	border: 1px solid rgba(255, 255, 255, 0.3);
	border-radius: 4px;
	font-family: Arial, sans-serif;
	resize: vertical;
}

.lightbox-comment-box::placeholder {
	color: rgba(255, 255, 255, 0.5);
}

.lightbox-save-btn {
	padding: 8px 16px;
	background: rgba(255, 255, 255, 0.2);
	color: white;
	border: 1px solid rgba(255, 255, 255, 0.3);
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.3s ease;
}

.lightbox-save-btn:hover {
	background: rgba(255, 255, 255, 0.3);
}

.lightbox-container {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	max-width: 90vw;
	max-height: 85vh;
	background: transparent;
	border-radius: 12px;
	padding: 20px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
	overflow: auto;
}

/* ============================================ */
/* LIGHTBOX IMAGE AND CONTROLS               */
/* ============================================ */

.lightbox-image {
	max-width: 100%;
	max-height: 50vh;
	object-fit: contain;
	margin-bottom: 15px;
	border-radius: 8px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
	image-orientation: from-image;
}

/* Navigation Buttons */
.lightbox-prev,
.lightbox-next,
.lightbox-close {
	position: absolute;
	background: rgba(0, 0, 0, 0.7);
	color: white;
	border: none;
	font-size: 28px;
	cursor: pointer;
	padding: 12px 16px;
	border-radius: 6px;
	transition: all 0.3s ease;
	z-index: 2010;
	min-width: 50px;
	min-height: 50px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.lightbox-prev:hover,
.lightbox-next:hover,
.lightbox-close:hover {
	background: rgba(255, 255, 255, 0.2);
	transform: scale(1.1);
}

.lightbox-prev:disabled,
.lightbox-next:disabled {
	opacity: 0.3;
	cursor: not-allowed;
}

.lightbox-prev {
	left: 15px;
	top: 50%;
	transform: translateY(-50%);
}

.lightbox-next {
	right: 15px;
	top: 50%;
	transform: translateY(-50%);
}

.lightbox-close {
	top: 12px;
	right: 12px;
	width: 45px;
	height: 45px;
	font-size: 24px;
	padding: 0;
}

/* ============================================ */
/* CAPTION AND COMMENTS SECTION              */
/* ============================================ */

.lightbox-caption-container {
	text-align: center;
	width: 100%;
	margin: 15px 0;
	border-top: 1px solid rgba(255, 255, 255, 0.2);
	border-bottom: 1px solid rgba(255, 255, 255, 0.2);
	padding: 15px 0;
}

.lightbox-caption {
	font-size: 1.5rem;
	color: #ffffff;
	line-height: 1.6;
	margin: 0 0 10px 0;
	word-wrap: break-word;
	font-weight: 500;
}

.lightbox-counter {
	font-size: 1rem;
	color: #aaa;
	margin: 8px 0 0 0;
	font-style: italic;
}

/* ============================================ */
/* COMMENTS SECTION                           */
/* ============================================ */

.lightbox-comments {
	width: 100%;
	margin-top: 15px;
	padding: 15px;
	background: rgba(255, 255, 255, 0.05);
	border-radius: 8px;
	border: 1px solid rgba(255, 255, 255, 0.1);
}

.lightbox-comment-box {
	width: 100%;
	min-height: 80px;
	padding: 12px;
	margin-bottom: 10px;
	background: rgba(255, 255, 255, 0.1);
	color: white;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 6px;
	font-family: Arial, sans-serif;
	font-size: 14px;
	resize: vertical;
	transition: all 0.3s ease;
}

.lightbox-comment-box:focus {
	outline: none;
	background: rgba(255, 255, 255, 0.15);
	border-color: rgba(255, 255, 255, 0.4);
	box-shadow: 0 0 8px rgba(255, 200, 0, 0.3);
}

.lightbox-comment-box::placeholder {
	color: rgba(255, 255, 255, 0.6);
}

.lightbox-save-btn {
	width: 100%;
	padding: 10px 16px;
	background: linear-gradient(135deg, #ffc800, #ff9500);
	color: #000;
	border: none;
	border-radius: 6px;
	font-size: 14px;
	font-weight: bold;
	cursor: pointer;
	transition: all 0.3s ease;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.lightbox-save-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(255, 200, 0, 0.4);
}

.lightbox-save-btn:active {
	transform: translateY(0);
}

/* ============================================ */
/* RESPONSIVE DESIGN                          */
/* ============================================ */

@media (max-width: 768px) {
	.lightbox-container {
		max-width: 95vw;
		max-height: 90vh;
		padding: 15px;
	}

	.lightbox-image {
		max-height: 45vh;
	}

	.lightbox-prev,
	.lightbox-next {
		font-size: 24px;
		padding: 10px 14px;
		min-width: 45px;
		min-height: 45px;
	}

	.lightbox-prev {
		left: 8px;
	}

	.lightbox-next {
		right: 8px;
	}

	.lightbox-close {
		top: 8px;
		right: 8px;
		width: 40px;
		height: 40px;
		font-size: 20px;
	}

	.lightbox-caption {
		font-size: 1.2rem;
	}

	.lightbox-comment-box {
		min-height: 60px;
		font-size: 13px;
	}
}
