/* GTTCI Flipbooks: viewer + feed. Colours follow the GTTCI site (accent #249bd3). */
.gttci-fb,
.gttci-fb-feed {
	--gttci-fb-accent: #249bd3;
	--gttci-fb-ink: #111318;
	--gttci-fb-muted: #6f7378;
	--gttci-fb-line: #e4e4e4;
	--gttci-fb-head: "Libre Baskerville", Georgia, serif;
}

/* ---------- Viewer ---------- */
.gttci-fb {
	position: relative;
	margin: 0 0 32px;
	padding: 28px 24px 0;
	border-radius: 10px;
	background: radial-gradient(120% 90% at 50% 0%, #3a4049 0%, #22262c 60%, #1a1d22 100%);
	color: #fff;
	outline: none;
	box-sizing: border-box;
}
.gttci-fb *,
.gttci-fb *::before,
.gttci-fb *::after { box-sizing: border-box; }
.gttci-fb:focus-visible { box-shadow: 0 0 0 3px var(--gttci-fb-accent); }

.gttci-fb__stage {
	position: relative;
	margin: 0 auto;
	min-height: 360px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.gttci-fb.is-ready .gttci-fb__stage { min-height: 0; }

.gttci-fb__book {
	width: 100%;
	margin: 0 auto;
}
.gttci-fb__page {
	background: #fff;
	overflow: hidden;
}
.gttci-fb__page canvas {
	display: block;
	width: 100%;
	height: 100%;
}

.gttci-fb__loading {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	font-size: 15px;
	color: #d7dadf;
	text-align: center;
	padding: 20px;
}
.gttci-fb__loading[hidden] { display: none; }
.gttci-fb__loading a { color: #fff; text-decoration: underline; }
.gttci-fb__spinner {
	width: 34px;
	height: 34px;
	border: 3px solid rgba(255, 255, 255, .2);
	border-top-color: var(--gttci-fb-accent);
	border-radius: 50%;
	animation: gttci-fb-spin .9s linear infinite;
}
@keyframes gttci-fb-spin { to { transform: rotate(360deg); } }
.gttci-fb.is-error .gttci-fb__spinner { display: none; }

.gttci-fb__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 5;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .14);
	color: #fff;
	font-size: 30px;
	line-height: 40px;
	padding: 0;
	cursor: pointer;
	opacity: 0;
	transition: opacity .2s, background .2s;
}
.gttci-fb.is-ready .gttci-fb__nav { opacity: 1; }
.gttci-fb__nav:hover,
.gttci-fb__nav:focus-visible { background: var(--gttci-fb-accent); }
.gttci-fb__nav--prev { left: -10px; }
.gttci-fb__nav--next { right: -10px; }

.gttci-fb__bar {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
	padding: 18px 0 18px;
	margin-top: 18px;
	border-top: 1px solid rgba(255, 255, 255, .1);
}
.gttci-fb__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 38px;
	padding: 0 10px;
	border: 1px solid rgba(255, 255, 255, .18);
	border-radius: 6px;
	background: transparent;
	color: #fff !important;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none !important;
	cursor: pointer;
	transition: background .2s, border-color .2s;
}
.gttci-fb__btn:hover,
.gttci-fb__btn:focus-visible { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .35); }
.gttci-fb__btn--text { padding: 0 14px; font-size: 13px; letter-spacing: .02em; }
.gttci-fb__btn--accent { background: var(--gttci-fb-accent); border-color: var(--gttci-fb-accent); }
.gttci-fb__btn--accent:hover { background: #1c86b8; border-color: #1c86b8; }
.gttci-fb__count {
	min-width: 120px;
	padding: 0 8px;
	text-align: center;
	font-size: 14px;
	color: #d7dadf;
	font-variant-numeric: tabular-nums;
}
.gttci-fb__spacer { flex: 1 1 auto; }

/* Full screen (native, or the overlay fallback on iPhone). */
.gttci-fb.is-full,
.gttci-fb:fullscreen {
	position: fixed;
	inset: 0;
	z-index: 100000;
	margin: 0;
	border-radius: 0;
	padding: 18px 20px 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	overflow: auto;
}
.gttci-fb.is-full .gttci-fb__bar { margin-top: 10px; }
html.gttci-fb-lock,
html.gttci-fb-lock body { overflow: hidden; }

.gttci-fb-desc { margin-top: 8px; }
.gttci-fb-note { color: var(--gttci-fb-muted); font-style: italic; }

@media (max-width: 640px) {
	.gttci-fb { padding: 16px 8px 0; border-radius: 8px; }
	.gttci-fb__nav { width: 36px; height: 36px; font-size: 24px; line-height: 32px; }
	.gttci-fb__nav--prev { left: -4px; }
	.gttci-fb__nav--next { right: -4px; }
	.gttci-fb__bar { justify-content: center; }
	.gttci-fb__spacer { flex-basis: 100%; height: 0; }
	.gttci-fb__count { min-width: 96px; font-size: 13px; }
	.gttci-fb__btn--text { flex: 1 1 40%; }
}

/* ---------- Feed ---------- */
.gttci-fb-feed { width: 100%; }
.gttci-fb-feed__heading {
	font-family: var(--gttci-fb-head);
	font-weight: 400;
	color: var(--gttci-fb-ink);
	margin: 0 0 28px;
}
.gttci-fb-grid {
	display: grid;
	grid-template-columns: repeat(var(--gttci-fb-cols, 3), minmax(0, 1fr));
	gap: 32px 28px;
}
.gttci-fb-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--gttci-fb-line);
	border-radius: 8px;
	overflow: hidden;
	transition: box-shadow .25s, transform .25s;
}
.gttci-fb-card:hover { box-shadow: 0 14px 34px rgba(17, 19, 24, .12); transform: translateY(-3px); }
.gttci-fb-card__cover {
	position: relative;
	display: block;
	aspect-ratio: 4 / 5;
	background: linear-gradient(160deg, #eef1f4, #dfe4ea);
	overflow: hidden;
}
.gttci-fb-card__cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top center;
	display: block;
	transition: transform .5s;
}
.gttci-fb-card:hover .gttci-fb-card__cover img { transform: scale(1.03); }
.gttci-fb-card__placeholder {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font: 700 28px/1 var(--gttci-fb-head);
	color: #9aa3ad;
}
.gttci-fb-card__badge {
	position: absolute;
	left: 14px;
	top: 14px;
	padding: 6px 10px;
	border-radius: 4px;
	background: var(--gttci-fb-accent);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
}
.gttci-fb-card__body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 20px 22px 24px;
	flex: 1 1 auto;
}
.gttci-fb-card__body time {
	font-size: 12px;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--gttci-fb-muted);
}
.gttci-fb-card__body h3 {
	margin: 0;
	font-family: var(--gttci-fb-head);
	font-size: 19px;
	font-weight: 400;
	line-height: 1.35;
}
.gttci-fb-card__body h3 a { color: var(--gttci-fb-ink); text-decoration: none; }
.gttci-fb-card__body h3 a:hover { color: var(--gttci-fb-accent); }
.gttci-fb-card__body p { margin: 0; color: var(--gttci-fb-muted); font-size: 15px; line-height: 1.6; }
.gttci-fb-card__cta {
	margin-top: auto;
	padding-top: 6px;
	color: var(--gttci-fb-accent);
	font-weight: 600;
	font-size: 14px;
	text-decoration: none;
}
.gttci-fb-card__cta:hover { text-decoration: underline; }

.gttci-fb-pager {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	margin-top: 44px;
}
.gttci-fb-pager .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border: 1px solid var(--gttci-fb-line);
	border-radius: 6px;
	color: var(--gttci-fb-ink);
	text-decoration: none;
}
.gttci-fb-pager .page-numbers.current,
.gttci-fb-pager a.page-numbers:hover { background: var(--gttci-fb-accent); border-color: var(--gttci-fb-accent); color: #fff; }

@media (max-width: 1024px) {
	.gttci-fb-grid { grid-template-columns: repeat(min(var(--gttci-fb-cols, 3), 2), minmax(0, 1fr)); gap: 24px; }
}
@media (max-width: 640px) {
	.gttci-fb-grid { grid-template-columns: 1fr; }
}

/* ---------- Viewer: centred covers, end states (0.8.1) ---------- */
.gttci-fb__book { transition: transform .55s cubic-bezier(.2, .7, .2, 1); }
.gttci-fb.is-front .gttci-fb__book { transform: translateX(-25%); }
.gttci-fb.is-back .gttci-fb__book { transform: translateX(25%); }
.gttci-fb.is-start .gttci-fb__nav--prev,
.gttci-fb.is-end .gttci-fb__nav--next { opacity: 0 !important; pointer-events: none; }
.gttci-fb.is-start [data-act="prev"],
.gttci-fb.is-start [data-act="first"],
.gttci-fb.is-end [data-act="next"],
.gttci-fb.is-end [data-act="last"] { opacity: .35; pointer-events: none; }

/* ---------- Flipbook page (templates/single-flipbook.php) ---------- */
.gfb-page {
	--gfb-ink: #111318;
	--gfb-muted: #6f7378;
	--gfb-navy: #0d1220;
	--gfb-head: "Libre Baskerville", Georgia, serif;
	position: relative;
	left: 50%;
	width: 100vw;
	max-width: 100vw;
	margin-left: -50vw;
	overflow: hidden;
	background: #fff;
	color: var(--gfb-ink);
}
.gfb-page *, .gfb-page *::before, .gfb-page *::after { box-sizing: border-box; }
.gfb-wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 40px; }
.gfb-wrap--wide { max-width: 1320px; }
.gfb-wrap--text { max-width: 860px; }

/* Banner */
.gfb-hero {
	position: relative;
	color: #fff;
	background-color: var(--gfb-navy);
	background-image: linear-gradient(100deg, rgba(13, 15, 19, .94) 0%, rgba(13, 15, 19, .82) 45%, rgba(13, 15, 19, .35) 100%), var(--gfb-hero-image, none);
	background-size: cover;
	background-position: center;
	padding: 72px 0 84px;
}
.gfb-hero__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(220px, 340px);
	gap: 64px;
	align-items: center;
}
.gfb-hero__grid--solo { grid-template-columns: minmax(0, 1fr); }
.gfb-crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: rgba(255, 255, 255, .6); margin-bottom: 26px; }
.gfb-crumbs a { color: rgba(255, 255, 255, .78); text-decoration: none; }
.gfb-crumbs a:hover { color: #fff; text-decoration: underline; }
.gfb-eyebrow {
	margin: 0 0 14px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--gttci-fb-accent, #249bd3);
}
.gfb-hero h1 {
	margin: 0;
	font-family: var(--gfb-head);
	font-weight: 400;
	font-size: 46px;
	line-height: 1.18;
	color: #fff;
	max-width: 760px;
}
.gfb-lead { margin: 20px 0 0; max-width: 640px; font-size: 17px; line-height: 1.65; color: rgba(255, 255, 255, .78); }
.gfb-meta { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 26px 0 0; padding: 0; }
.gfb-meta li {
	margin: 0;
	padding: 7px 14px;
	border: 1px solid rgba(255, 255, 255, .2);
	border-radius: 999px;
	font-size: 13px;
	color: rgba(255, 255, 255, .85);
	background: rgba(255, 255, 255, .06);
}
.gfb-meta li[hidden] { display: none; }
.gfb-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.gfb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 50px;
	padding: 0 28px;
	border-radius: 6px;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none !important;
	transition: background .2s, border-color .2s, color .2s, transform .2s;
}
.gfb-btn--primary { background: var(--gttci-fb-accent, #249bd3); color: #fff !important; border: 1px solid var(--gttci-fb-accent, #249bd3); }
.gfb-btn--primary:hover { background: #1c86b8; border-color: #1c86b8; transform: translateY(-1px); }
.gfb-btn--ghost { color: #fff !important; border: 1px solid rgba(255, 255, 255, .45); background: transparent; }
.gfb-btn--ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .08); }

.gfb-hero__cover { display: block; justify-self: end; width: 100%; max-width: 320px; perspective: 1400px; }
.gfb-hero__cover img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 3px 8px 8px 3px;
	box-shadow: -14px 0 0 -6px rgba(255, 255, 255, .08), 0 34px 60px rgba(0, 0, 0, .55), 0 10px 20px rgba(0, 0, 0, .35);
	transform: rotateY(-14deg) rotateX(3deg);
	transform-origin: left center;
	transition: transform .5s cubic-bezier(.2, .7, .2, 1);
}
.gfb-hero__cover:hover img { transform: rotateY(-4deg) rotateX(1deg) translateY(-4px); }

/* Reader */
.gfb-reader { background: #f2f4f7; padding: 56px 0 64px; scroll-margin-top: 90px; }
.gfb-reader .gttci-fb { margin: 0; box-shadow: 0 24px 60px rgba(13, 18, 32, .18); }

/* About + more */
.gfb-about { padding: 64px 0 8px; }
.gfb-about h2,
.gfb-more h2 { margin: 0 0 18px; font-family: var(--gfb-head); font-weight: 400; font-size: 30px; line-height: 1.25; color: var(--gfb-ink); }
.gfb-about__body { font-size: 17px; line-height: 1.75; color: #3a3f45; }
.gfb-more { padding: 64px 0 80px; }
.gfb-more__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.gfb-more__head h2 { margin: 0; }
.gfb-eyebrow--dark { color: var(--gttci-fb-accent, #249bd3); margin-bottom: 8px; }
.gfb-more__all { color: var(--gttci-fb-accent, #249bd3); font-weight: 600; text-decoration: none; white-space: nowrap; }
.gfb-more__all:hover { text-decoration: underline; }

@media (max-width: 1024px) {
	.gfb-wrap { padding: 0 28px; }
	.gfb-hero { padding: 56px 0 64px; }
	.gfb-hero__grid { grid-template-columns: minmax(0, 1fr) 240px; gap: 40px; }
	.gfb-hero h1 { font-size: 36px; }
}
@media (max-width: 767px) {
	.gfb-wrap { padding: 0 20px; }
	.gfb-hero { padding: 36px 0 44px; }
	.gfb-hero__grid { grid-template-columns: 1fr; gap: 28px; }
	.gfb-hero__cover { order: -1; justify-self: start; max-width: 150px; }
	.gfb-hero__cover img { transform: none; box-shadow: 0 18px 36px rgba(0, 0, 0, .5); }
	.gfb-crumbs { margin-bottom: 18px; }
	.gfb-hero h1 { font-size: 27px; line-height: 1.28; }
	.gfb-lead { font-size: 15px; }
	.gfb-meta { margin-top: 20px; gap: 8px; }
	.gfb-meta li { font-size: 12px; padding: 6px 12px; }
	.gfb-actions { margin-top: 24px; }
	.gfb-btn { flex: 1 1 100%; min-height: 48px; }
	.gfb-reader { padding: 24px 0 36px; }
	.gfb-reader .gfb-wrap { padding: 0 12px; }
	.gfb-about { padding: 44px 0 0; }
	.gfb-about h2, .gfb-more h2 { font-size: 24px; }
	.gfb-more { padding: 44px 0 56px; }
	.gfb-more__head { flex-direction: column; align-items: flex-start; }
}

/* Landscape covers (brochures): show the whole cover instead of cropping it. */
.gttci-fb-card__cover.is-wide { display: flex; align-items: center; justify-content: center; padding: 18px; }
.gttci-fb-card__cover.is-wide img { height: auto; max-height: 100%; object-fit: contain; box-shadow: 0 10px 24px rgba(17, 19, 24, .18); }
