@import url("https://fonts.googleapis.com/css2?family=Glegoo:wght@400;700&family=Inter:wght@400;500;600;700&display=swap");

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	font-family: var(--font-body);
	color: var(--color-text);
	line-height: 1.55;
	background: var(--color-surface);
}

img {
	max-width: 100%;
	display: block;
}

a {
	color: var(--color-accent);
}

a:hover {
	color: var(--color-accent-light);
}

h1,
h2,
h3 {
	font-family: var(--font-heading);
	line-height: 1.2;
	margin: 0 0 var(--space-3);
}

.wrap {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 0 var(--space-4);
}

/* Header / nav */

.site-header {
	border-bottom: 8px solid var(--color-header-border);
}

.site-header-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	padding-top: var(--space-3);
	padding-bottom: var(--space-3);
	gap: var(--space-3);
}

.site-logo {
	display: block;
	line-height: 0;
}

.site-logo-img {
	display: block;
	width: 100px;
	height: 100px;
	border-radius: var(--radius);
}

@media (min-width: 720px) {
	.site-logo-img {
		width: 250px;
		height: 250px;
	}
}

/* Hamburger toggle — mobile only, sits next to the logo. */
.nav-toggle {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 5px;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	background: var(--color-surface);
	cursor: pointer;
}

.nav-toggle-bar {
	display: block;
	width: 20px;
	height: 2px;
	background: var(--color-text);
	transition:
		transform 0.15s ease,
		opacity 0.15s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
	opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* Collapsible nav — hidden by default on mobile, toggled open via nav.js;
   always visible from the desktop breakpoint up, where the toggle is hidden. */
.site-nav-wrap {
	display: none;
	flex-basis: 100%;
	order: 3;
}

.site-nav-wrap.is-open {
	display: block;
}

.site-nav {
	display: flex;
	flex-direction: column;
	gap: var(--space-2);
	list-style: none;
	margin: var(--space-3) 0 0;
	padding: 0;
}

.site-nav a {
	display: block;
	color: var(--color-text);
	text-decoration: none;
	font-weight: 600;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
	color: var(--color-primary-dark);
}

@media (min-width: 720px) {
	.nav-toggle {
		display: none;
	}

	.site-nav-wrap {
		display: block;
		flex-basis: auto;
		order: 0;
	}

	.site-nav {
		flex-direction: row;
		flex-wrap: wrap;
		gap: var(--space-2) var(--space-4);
		margin: 0;
	}
}

/* Hero */

.hero {
	position: relative;
	color: #fff;
	background: linear-gradient(
		135deg,
		var(--color-primary) 0%,
		var(--color-accent) 100%
	);
	padding: var(--space-6) 0;
	margin-bottom: var(--space-5);
	overflow: hidden;
	min-height: 280px;
	display: flex;
	align-items: center;
}

.hero-banner {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	z-index: 0;
}

.hero-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		135deg,
		rgba(143, 197, 99, 0.65) 0%,
		rgba(97, 147, 181, 0.65) 100%
	);
	z-index: 1;
}

.hero .wrap {
	position: relative;
	z-index: 2;
}

.hero h1 {
	color: #fff;
	font-size: clamp(1.75rem, 4vw, 2.75rem);
}

.hero p {
	max-width: 60ch;
	font-size: 1.1rem;
	opacity: 0.95;
}

@media (min-width: 960px) {
	.hero {
		min-height: 380px;
	}
}

/* Content media — every page except Gallery: an image alongside a block of
   text. A real two-column flex row from the breakpoint up, so the columns
   stay side by side no matter how long the text runs (unlike a float,
   which only wraps for the image's own height). Which side the image is
   on is just down to DOM order — image first for image-left, text first
   for image-right. Below the breakpoint it stacks: whichever comes first
   in markup renders on top. */

.content-media {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--space-4);
	margin-bottom: var(--space-4);
}

.content-media-image {
	width: 100%;
	max-width: 400px;
	border-radius: var(--radius);
	box-shadow: var(--shadow-card);
	flex-shrink: 0;
}

.content-media-text {
	flex: 1 1 0%;
	min-width: 0;
}

.content-media-text > :first-child {
	margin-top: 0;
}

@media (min-width: 640px) {
	.content-media {
		flex-direction: row;
	}

	.content-media-image {
		width: 65%;
	}
}

/* Main content */

main {
	padding-bottom: var(--space-6);
}

.prose {
	max-width: 80ch;
}

/* Footer */

.site-footer {
	border-top: 1px solid var(--color-border);
	background: var(--color-surface-alt);
	padding: var(--space-5) 0;
	margin-top: var(--space-6);
	color: var(--color-text-muted);
	font-size: 0.9rem;
}

.site-footer a {
	color: var(--color-text-muted);
}

/* Contact info block (hydrated by contact.js) */

.contact-info {
	display: grid;
	gap: var(--space-2);
}

.contact-info .contact-person {
	font-weight: 600;
}

/* Gallery: year tabs */

.year-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2);
	margin-bottom: var(--space-5);
	border-bottom: 1px solid var(--color-border);
	padding-bottom: var(--space-3);
}

.year-tab {
	border: 1px solid var(--color-border);
	background: var(--color-surface);
	border-radius: 999px;
	padding: var(--space-1) var(--space-3);
	font-weight: 600;
	cursor: pointer;
	color: var(--color-text);
}

.year-tab[aria-selected="true"] {
	background: var(--color-primary);
	border-color: var(--color-primary);
	color: #fff;
}

/* Trip cards */

.trip-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--space-4);
}

@media (min-width: 640px) {
	.trip-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 960px) {
	.trip-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

.trip-card {
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: var(--shadow-card);
	background: var(--color-surface);
	display: flex;
	flex-direction: column;
	transition: box-shadow 0.15s ease;
}

.trip-card:hover {
	box-shadow: var(--shadow-card-hover);
}

.trip-card-photos {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2px;
}

.trip-photo-thumb {
	display: block;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
}

.trip-card-photos img {
	width: 100%;
	height: 110px;
	object-fit: cover;
}

.trip-card-body {
	padding: var(--space-3);
	display: flex;
	flex-direction: column;
	gap: var(--space-2);
	flex: 1;
}

.trip-card-date {
	color: var(--color-text-muted);
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.trip-card-title {
	margin: 0;
	font-size: 1.15rem;
}

.trip-card-description {
	color: var(--color-text-muted);
	font-size: 0.95rem;
	margin: 0;
}

.trip-card-fb {
	margin-top: auto;
	font-weight: 600;
	font-size: 0.9rem;
	text-decoration: none;
}

.empty-state {
	color: var(--color-text-muted);
	padding: var(--space-5) 0;
}

/* Buttons (shared with admin) */

.btn {
	display: inline-block;
	border: none;
	border-radius: var(--radius);
	padding: var(--space-2) var(--space-4);
	font-weight: 600;
	font-family: var(--font-body);
	cursor: pointer;
	text-decoration: none;
}

.btn-primary {
	background: var(--color-primary);
	color: #fff;
}

.btn-primary:hover {
	background: var(--color-primary-dark);
	color: #fff;
}

.btn-secondary {
	background: transparent;
	color: var(--color-text);
	border: 1px solid var(--color-border);
}

/* Gallery lightbox */

.lightbox {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.9);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1000;
	padding: var(--space-4);
}

.lightbox[hidden] {
	display: none;
}

.lightbox-figure {
	margin: 0;
	max-width: min(90vw, 1100px);
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--space-2);
}

.lightbox-image {
	max-width: 100%;
	max-height: 80vh;
	object-fit: contain;
	border-radius: var(--radius);
}

@media (min-width: 960px) {
	.lightbox-figure {
		max-width: min(94vw, 1600px);
		max-height: 94vh;
	}

	.lightbox-image {
		max-height: 88vh;
	}
}

.lightbox-caption {
	color: #fff;
	font-size: 0.9rem;
	text-align: center;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
	position: absolute;
	background: rgba(0, 0, 0, 0.5);
	color: #fff;
	border: none;
	border-radius: 999px;
	cursor: pointer;
	line-height: 1;
}

.lightbox-close {
	top: var(--space-3);
	right: var(--space-3);
	width: 44px;
	height: 44px;
	font-size: 1.75rem;
}

.lightbox-prev,
.lightbox-next {
	top: 50%;
	transform: translateY(-50%);
	width: 48px;
	height: 48px;
	font-size: 2rem;
}

.lightbox-prev {
	left: var(--space-3);
}

.lightbox-next {
	right: var(--space-3);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
	background: rgba(0, 0, 0, 0.75);
}
