/* Journal (blog): home, topic pages and posts. Templates are Core's (templates/blog-*.php); the Load More script and
   the sticky bar are Core's blog.js. Tokens only: Navy header, Gold buttons, Soft Green strips (06 §5.1). */

.go-journal {
	--go-jw: var(--go-content-width);
	background: var(--go-white);
	color: var(--go-forest-800);
	font-family: var(--go-font-body);
}

.go-jwrap {
	width: 100%;
	max-width: var(--go-jw);
	margin-inline: auto;
	padding-inline: var(--go-gutter);
	box-sizing: border-box;
}

/* ---------- Header: navy, one heading, one line ---------- */
.go-jhead {
	background: var(--go-forest-950);
	color: var(--go-white);
	padding-block: var(--go-space-9) var(--go-space-10);
}

.go-jhead h1 {
	max-width: 20ch;
	margin: var(--go-space-4) 0 var(--go-space-4);
	color: var(--go-white);
	font-family: var(--go-font-display);
	font-size: clamp(36px, 7vw, 60px);
	font-weight: 400;
	line-height: 1.06;
	letter-spacing: -.015em;
	text-wrap: balance;
}

.go-jhead p {
	max-width: 52ch;
	margin: 0;
	color: var(--go-text-on-dark);
	font-size: 18px;
	line-height: 1.6;
}

/* Journal home and topic pages: a photo behind the words, with the site's navy wash on the left. About 10% shorter than before. */
.go-jhead--photo {
	padding-block: var(--go-space-8) calc(var(--go-space-9) + var(--go-space-1));
	background-color: var(--go-forest-950);
	background-image: var(--go-grad-hero), var(--go-jhead-img);
	background-position: center, center 55%;
	background-size: cover, cover;
	background-repeat: no-repeat;
}

.go-jhead--photo {
	position: relative;
	isolation: isolate;
}

/* A light navy tint over the whole photo, so white words stay readable on bright water. */
.go-jhead--photo::before {
	position: absolute;
	inset: 0;
	z-index: -1;
	background: color-mix(in srgb, var(--go-forest-950) 32%, transparent);
	content: "";
}

.go-jhead--photo h1 {
	margin-block: var(--go-space-3);
	font-size: clamp(34px, 6vw, 54px);
}

.go-jhead--post h1 {
	max-width: 24ch;
	font-size: clamp(32px, 5.6vw, 52px);
}

.go-jhead .go-jbyline {
	margin-top: var(--go-space-5);
	font-size: 15px;
	color: var(--go-text-on-dark);
}

.go-jcrumbs {
	display: flex;
	flex-wrap: wrap;
	font-size: 14px;
	font-weight: 500;
}

.go-jcrumbs a {
	color: var(--go-white);
	text-decoration: underline;
	text-decoration-color: rgba(255, 255, 255, .45);
	text-underline-offset: 3px;
}

.go-jcrumbs a + a::before {
	margin-inline: var(--go-space-2);
	color: var(--go-text-on-dark);
	content: "\203A";
	text-decoration: none;
	display: inline-block;
}

.go-jcrumbs a:hover {
	text-decoration-color: var(--go-accent);
}

.go-journal a:focus-visible,
.go-journal button:focus-visible {
	outline: 3px solid var(--go-forest-800);
	outline-offset: 3px;
	border-radius: 4px;
}

.go-jhead a:focus-visible,
.go-jband a:focus-visible,
.go-jbar a:focus-visible {
	outline-color: var(--go-lime-300);
}

/* ---------- Featured post: photo and words side by side ---------- */
.go-jfeature {
	padding-block: var(--go-space-8) 0;
}

.go-jfeature .go-jcard {
	display: grid;
	gap: 0;
	overflow: hidden;
	border-radius: var(--go-radius-lg);
	background: var(--go-white);
	box-shadow: var(--go-shadow-lg);
}

/* ---------- Cards ---------- */
.go-jcard {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--go-border-light);
	border-radius: var(--go-radius-md);
	background: var(--go-white);
	color: inherit;
	text-decoration: none;
	transition: transform var(--go-dur-ui) var(--go-ease-in), box-shadow var(--go-dur-ui) var(--go-ease-in);
}

.go-jcard--big {
	border: 0;
}

.go-jcard__media {
	display: block;
	aspect-ratio: 3 / 2;
	overflow: hidden;
	background: var(--go-soft-green);
}

.go-jcard__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.go-jcard__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: var(--go-space-2);
	padding: var(--go-space-5) var(--go-space-5) var(--go-space-6);
}

.go-jcard__topic {
	color: var(--go-green-700);
	font-size: 14px;
	font-weight: 700;
}

.go-jcard__title {
	margin: 0;
	color: var(--go-forest-950);
	font-family: var(--go-font-display);
	font-size: 24px;
	font-weight: 400;
	line-height: 1.2;
	text-wrap: balance;
}

.go-jcard__excerpt {
	color: var(--go-forest-800);
	font-size: 16px;
	line-height: 1.55;
}

.go-jcard__meta {
	margin-top: auto;
	padding-top: var(--go-space-2);
	color: var(--go-text-muted);
	font-size: 14px;
}

.go-jcard:active {
	transform: scale(.985);
}

@media (hover: hover) and (pointer: fine) {
	.go-jcard:hover {
		box-shadow: var(--go-shadow-md);
		transform: translateY(-2px);
	}

	.go-jcard:hover .go-jcard__title {
		text-decoration: underline;
		text-decoration-color: var(--go-accent);
		text-decoration-thickness: 2px;
		text-underline-offset: 4px;
	}

	.go-jcard:hover .go-jcard__media img {
		transform: scale(1.03);
	}
}

.go-jcard__media img {
	transition: transform var(--go-dur-enter) var(--go-ease-in);
}

.go-jcard--big .go-jcard__title {
	font-size: clamp(28px, 4.2vw, 40px);
}

.go-jcard--big .go-jcard__body {
	justify-content: center;
	gap: var(--go-space-3);
	padding: var(--go-space-7) var(--go-space-6);
}

.go-jcard--big .go-jcard__excerpt {
	font-size: 18px;
}

.go-jcard--big .go-jcard__media {
	aspect-ratio: 16 / 10;
}

/* ---------- Topic bar and grid, on a Soft Green strip ---------- */
.go-jgridwrap {
	padding-block: var(--go-space-8) var(--go-space-10);
	margin-top: var(--go-space-8);
	background: var(--go-soft-green);
	box-shadow: 0 0 0 100vmax var(--go-soft-green);
	clip-path: inset(0 -100vmax);
}

.go-jtopics {
	display: flex;
	gap: var(--go-space-2);
	margin: 0 calc(-1 * var(--go-gutter)) var(--go-space-7);
	padding: 0 var(--go-gutter) var(--go-space-1);
	overflow-x: auto;
	scrollbar-width: none;
}

.go-jtopics::-webkit-scrollbar {
	display: none;
}

.go-jtopics a {
	display: inline-flex;
	flex: none;
	align-items: center;
	min-height: 44px;
	padding: 0 var(--go-space-5);
	border: 1px solid var(--go-border-light);
	border-radius: var(--go-radius-pill);
	background: var(--go-white);
	color: var(--go-forest-950);
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	transition: background-color var(--go-dur-hover) ease, color var(--go-dur-hover) ease, transform var(--go-dur-hover) ease;
}

.go-jtopics a:active {
	transform: scale(.97);
}

.go-jtopics a[aria-current="page"] {
	border-color: var(--go-forest-950);
	background: var(--go-forest-950);
	color: var(--go-white);
}

@media (hover: hover) and (pointer: fine) {
	.go-jtopics a:not([aria-current]):hover {
		background: var(--go-forest-950);
		color: var(--go-white);
	}
}

.go-jgrid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--go-space-6);
}

.go-jgrid [hidden] {
	display: none;
}

.go-jmore {
	display: block;
	min-height: 48px;
	margin: var(--go-space-8) auto 0;
	padding: 0 var(--go-space-8);
	border: 2px solid var(--go-forest-950);
	border-radius: var(--go-radius-pill);
	background: transparent;
	color: var(--go-forest-950);
	font: 600 16px/1 var(--go-font-body);
	cursor: pointer;
	transition: background-color var(--go-dur-hover) ease, color var(--go-dur-hover) ease, transform var(--go-dur-hover) ease;
}

.go-jmore:active {
	transform: scale(.97);
}

@media (hover: hover) and (pointer: fine) {
	.go-jmore:hover {
		background: var(--go-forest-950);
		color: var(--go-white);
	}
}

.go-jempty {
	margin: 0;
	font-size: 18px;
}

@media (prefers-reduced-motion: no-preference) {
	.go-jcard--new {
		animation: go-jcard-in var(--go-dur-enter) var(--go-ease-in) both;
	}

	@keyframes go-jcard-in {
		from {
			opacity: 0;
			transform: translateY(8px);
		}
	}
}

@media (prefers-reduced-motion: reduce) {
	.go-jcard,
	.go-jcard__media img {
		transition: none;
	}
}

/* ---------- Browse By Theme: photo tiles, one per theme ---------- */
.go-jthemes {
	padding-block: var(--go-space-10);
}

.go-jthemes h2 {
	margin: 0 0 var(--go-space-7);
	color: var(--go-forest-950);
	font-family: var(--go-font-display);
	font-size: clamp(28px, 4vw, 38px);
	font-weight: 400;
	line-height: 1.15;
}

.go-jthemes__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: var(--go-space-4);
}

.go-jtheme {
	position: relative;
	display: block;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	border-radius: var(--go-radius-md);
	background: var(--go-forest-950);
	color: var(--go-white);
	text-decoration: none;
	transition: transform var(--go-dur-ui) var(--go-ease-in), box-shadow var(--go-dur-ui) var(--go-ease-in);
}

.go-jtheme img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform var(--go-dur-enter) var(--go-ease-in);
}

.go-jtheme::after {
	position: absolute;
	inset: 0;
	background: var(--go-grad-scrim);
	content: "";
}

.go-jtheme__text {
	position: absolute;
	inset: auto var(--go-space-4) var(--go-space-4);
	z-index: 1;
	display: grid;
	gap: var(--go-space-1);
}

.go-jtheme__name {
	font-family: var(--go-font-display);
	font-size: 24px;
	line-height: 1.15;
}

.go-jtheme__count {
	color: var(--go-text-on-dark);
	font-size: 14px;
}

.go-jtheme:active {
	transform: scale(.985);
}

@media (hover: hover) and (pointer: fine) {
	.go-jtheme:hover {
		box-shadow: var(--go-shadow-md);
		transform: translateY(-2px);
	}

	.go-jtheme:hover img {
		transform: scale(1.04);
	}
}

@media (prefers-reduced-motion: reduce) {
	.go-jtheme,
	.go-jtheme img {
		transition: none;
	}
}

/* ---------- Buttons ---------- */
.go-jbtn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 var(--go-space-7);
	border-radius: var(--go-radius-pill);
	font: 700 16px/1 var(--go-font-body);
	text-decoration: none;
	white-space: nowrap;
	transition: background-color var(--go-dur-hover) ease, transform var(--go-dur-hover) ease;
}

.go-jbtn:active {
	transform: scale(.97);
}

.go-jbtn--gold {
	background: var(--go-cta);
	color: var(--go-on-cta);
}

.go-jbtn--wa {
	background: var(--go-whatsapp);
	color: var(--go-forest-950);
}

@media (hover: hover) and (pointer: fine) {
	.go-jbtn--gold:hover {
		background: var(--go-cta-hover);
	}

	.go-jbtn--wa:hover {
		background: color-mix(in srgb, var(--go-whatsapp) 85%, var(--go-white));
	}
}

/* ---------- Enquiry band ---------- */
.go-jband {
	background: var(--go-forest-950);
	color: var(--go-white);
	padding-block: var(--go-space-9);
}

.go-jband__inner {
	display: grid;
	gap: var(--go-space-6);
	align-items: center;
}

/* On the home and topic pages the band is the last thing before the footer, which is also navy: leave a clear gap. */
.go-journal > .go-jband:last-child {
	margin-bottom: var(--go-space-10);
}

.go-jband h2 {
	margin: 0 0 var(--go-space-2);
	color: var(--go-white);
	font-family: var(--go-font-display);
	font-size: clamp(28px, 4vw, 38px);
	font-weight: 400;
	line-height: 1.15;
}

.go-jband p {
	max-width: 52ch;
	margin: 0;
	color: var(--go-text-on-dark);
	font-size: 17px;
	line-height: 1.6;
}

.go-jband__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--go-space-3);
}

/* ---------- Post: cover, text ---------- */
.go-jcover {
	margin: calc(-1 * var(--go-space-8)) auto 0;
	padding-bottom: 0;
}

.go-jcover img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: var(--go-radius-lg);
	box-shadow: var(--go-shadow-lg);
}

.go-jcover figcaption,
.go-jtext p:has(> img:only-child) + p > em:only-child {
	margin-top: var(--go-space-2);
	color: var(--go-text-muted);
	font-size: 14px;
	font-style: normal;
	line-height: 1.5;
}

.go-jcover figcaption a {
	color: var(--go-green-700);
}

.go-jlayout {
	display: block;
	padding-block: var(--go-space-9) var(--go-space-10);
}

.go-jtext {
	min-width: 0;
	font-size: 18px;
	line-height: 1.75;
}

.go-jtext h2,
.go-jtext h3 {
	scroll-margin-top: 120px;
}

.go-jaside {
	display: none;
}

.go-jtoc h2,
.go-jenquire h2 {
	margin: 0 0 var(--go-space-3);
	color: var(--go-forest-950);
	font-family: var(--go-font-display);
	font-size: 22px;
	font-weight: 400;
	line-height: 1.2;
}

.go-jtoc ol {
	margin: 0;
	padding: 0;
	list-style: none;
}

.go-jtoc li + li {
	margin-top: var(--go-space-1);
}

.go-jtoc a {
	display: block;
	padding: var(--go-space-1) 0;
	color: var(--go-forest-800);
	font-size: 15px;
	line-height: 1.4;
	text-decoration: none;
}

.go-jtoc a:hover {
	color: var(--go-green-700);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.go-jenquire {
	display: grid;
	gap: var(--go-space-3);
	padding: var(--go-space-6);
	border-radius: var(--go-radius-md);
	background: var(--go-forest-950);
}

.go-jenquire h2 {
	margin: 0;
	color: var(--go-white);
}

.go-jenquire p {
	margin: 0;
	color: var(--go-text-on-dark);
	font-size: 16px;
	line-height: 1.5;
}

.go-jtext p {
	margin: 0 0 var(--go-space-5);
}

.go-jtext h2 {
	margin: var(--go-space-10) 0 var(--go-space-4);
	color: var(--go-forest-950);
	font-family: var(--go-font-display);
	font-size: clamp(28px, 4vw, 34px);
	font-weight: 400;
	line-height: 1.15;
	text-wrap: balance;
}

.go-jtext h3 {
	margin: var(--go-space-8) 0 var(--go-space-3);
	color: var(--go-forest-950);
	font-family: var(--go-font-display);
	font-size: 24px;
	font-weight: 400;
	line-height: 1.2;
}

.go-jtext a {
	color: var(--go-green-700);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.go-jtext a:hover {
	color: var(--go-forest-950);
}

.go-jtext ul,
.go-jtext ol {
	margin: 0 0 var(--go-space-5);
	padding-left: var(--go-space-6);
}

.go-jtext li {
	margin-bottom: var(--go-space-2);
}

.go-jtext img {
	display: block;
	width: 100%;
	height: auto;
	margin-top: var(--go-space-7);
	border-radius: var(--go-radius-md);
}

.go-jtext p:has(> img:only-child) {
	margin-bottom: 0;
}

.go-jtext p:has(> img:only-child) + p {
	margin-bottom: var(--go-space-7);
}

/* The "At A Glance" box that opens a post */
.go-jtext blockquote {
	margin: var(--go-space-7) 0;
	padding: var(--go-space-6);
	border-radius: var(--go-radius-md);
	background: var(--go-soft-green);
}

.go-jtext blockquote p:last-child,
.go-jtext blockquote ul:last-child {
	margin-bottom: 0;
}

.go-jtext table {
	display: block;
	width: 100%;
	margin: var(--go-space-6) 0;
	overflow-x: auto;
	border-collapse: collapse;
	font-size: 16px;
}

.go-jtext th,
.go-jtext td {
	padding: var(--go-space-3) var(--go-space-4);
	border-bottom: 1px solid var(--go-border-light);
	text-align: left;
	vertical-align: top;
}

.go-jtext th {
	color: var(--go-forest-950);
	font-weight: 700;
	white-space: nowrap;
}

/* ---------- Trips Like This ---------- */
.go-jtrips {
	padding-block: var(--go-space-10);
	background: var(--go-soft-green);
}

.go-jtrips h2 {
	margin: 0 0 var(--go-space-7);
	color: var(--go-forest-950);
	font-family: var(--go-font-display);
	font-size: clamp(28px, 4vw, 38px);
	font-weight: 400;
	line-height: 1.15;
}

.go-jtrips__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--go-space-6);
}

/* ---------- Sticky bar on a post ---------- */
.go-jbar {
	position: fixed;
	inset: auto 0 0;
	z-index: 40;
	display: flex;
	gap: var(--go-space-3);
	justify-content: center;
	padding: var(--go-space-3) var(--go-gutter) calc(var(--go-space-3) + env(safe-area-inset-bottom));
	background: var(--go-forest-950);
	box-shadow: 0 -8px 24px rgba(10, 59, 97, .18);
}

.go-jbar[hidden] {
	display: none;
}

.go-jbar .go-jbtn {
	flex: 1;
	max-width: 260px;
	padding-inline: var(--go-space-4);
}

body.go-blog-post a.go-float-wa[href] {
	display: none;
}

/* ---------- Wider screens ---------- */
@media (min-width: 640px) {
	.go-jgrid,
	.go-jtrips__grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.go-jtopics {
		flex-wrap: wrap;
		margin-inline: 0;
		padding-inline: 0;
		overflow: visible;
	}
}

@media (min-width: 1024px) {
	.go-jlayout {
		display: grid;
		grid-template-columns: minmax(0, 1fr) 340px;
		gap: var(--go-space-10);
		align-items: start;
	}

	.go-jaside {
		position: sticky;
		top: 120px;
		display: grid;
		gap: var(--go-space-6);
	}

	.go-jbar {
		display: none;
	}
}

@media (min-width: 900px) {
	.go-jfeature .go-jcard {
		grid-template-columns: 1.25fr 1fr;
	}

	.go-jfeature .go-jcard--big .go-jcard__media {
		aspect-ratio: auto;
		min-height: 400px;
	}

	.go-jfeature .go-jcard--big .go-jcard__body {
		padding: var(--go-space-9) var(--go-space-8);
	}

	.go-jgrid,
	.go-jtrips__grid {
		grid-template-columns: repeat(3, 1fr);
	}

	.go-jband__inner {
		grid-template-columns: 1fr auto;
		gap: var(--go-space-9);
	}
}

/* ---------- Theme tiles: name always white ---------- */
.go-jthemes .go-jtheme,
.go-jthemes .go-jtheme .go-jtheme__name,
.go-jthemes .go-jtheme .go-jtheme__count {
	color: var(--go-white, #fff);
}

/* ---------- Phones: Journal cards about half as tall, theme tiles 20% shorter ---------- */
@media (max-width: 639px) {
	.go-jcard__media,
	.go-jcard--big .go-jcard__media {
		aspect-ratio: 3 / 1;
	}

	.go-jcard__body,
	.go-jcard--big .go-jcard__body {
		gap: 4px;
		padding: 12px 14px 12px;
	}

	.go-jcard__topic {
		font-size: 12px;
	}

	.go-jcard__title,
	.go-jcard--big .go-jcard__title {
		font-size: 18px;
		line-height: 1.2;
	}

	.go-jcard__excerpt,
	.go-jcard--big .go-jcard__excerpt {
		display: -webkit-box;
		overflow: hidden;
		font-size: 13px;
		line-height: 1.45;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
	}

	.go-jcard__meta {
		padding-top: 2px;
		font-size: 12px;
	}

	.go-jtheme {
		aspect-ratio: 1 / 1;
	}
}

@media (max-width: 639px) {
	.go-jgrid .go-jcard__excerpt {
		display: none;
	}

	.go-jgrid .go-jcard__title {
		font-size: 16px;
	}

	.go-jgrid .go-jcard__media {
		aspect-ratio: 16 / 5;
	}
}

/* ---------- Phones: Trips Like This uses the Trips page layout (two across, the card sizes itself) ---------- */
@media (max-width: 639px) {
	.go-jtrips__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
	}

	/* Planning a Trip: both buttons on one row */
	.go-jband__actions {
		flex-wrap: nowrap;
		gap: var(--go-space-2);
	}

	.go-jband__actions .go-jbtn {
		flex: 1 1 0;
		min-width: 0;
		padding-inline: var(--go-space-3);
		font-size: 14px;
	}
}
