/* Ancient Athens 3D – theme styles.
   Main colours come from the palette (Appearance → Editor → Styles → Colors). */

:root {
	--aa3d-base: var(--wp--preset--color--base, #F4EFE4);
	--aa3d-ink: var(--wp--preset--color--contrast, #1E2328);
	--aa3d-accent: #8B2D2D;
	--aa3d-sand: var(--wp--preset--color--accent-2, #ECE5D6);
	--aa3d-muted: var(--wp--preset--color--accent-4, #59616A);
	--aa3d-line: var(--wp--preset--color--accent-5, #E0D8C7);
	--aa3d-white: var(--wp--preset--color--accent-6, #FFFFFF);
	--aa3d-titleband: var(--wp--preset--color--accent-8, #EAE3D3);
	--aa3d-gold: var(--wp--preset--color--accent-9, #D5AC66);
	--aa3d-menu: #8B2D2D;     /* top main menu (burgundy) */
	--aa3d-foot: #232323;     /* footer (charcoal) */
	--aa3d-pband: #2F2F2F;    /* period row (charcoal) */
	--aa3d-dark: #232323;     /* glossary popup, plan labels, list banners */
	--aa3d-card: #FFFDF8;
	--aa3d-tile: var(--aa3d-titleband);            /* background of panels */
	--aa3d-tile-edge: rgba(213, 172, 102, 0.75);   /* thin gold edge of panels */
	--aa3d-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
	--aa3d-serif: var(--wp--preset--font-family--ysabeau-office, Georgia, serif);
	--aa3d-top-h: 78px;
	--aa3d-wide: var(--wp--style--global--wide-size, 1560px);
}
@media (max-width: 860px) {
	:root { --aa3d-top-h: 60px; }
}

/* ======================================================================
   Page frame: no gaps between header, banner, title band, content, footer
   ====================================================================== */

.wp-site-blocks > .aa3d-cover,
.wp-site-blocks > .aa3d-cover-rule,
.wp-site-blocks > .aa3d-titleband,
.wp-site-blocks > .aa3d-main,
.wp-site-blocks > footer,
.wp-site-blocks > header.wp-block-template-part + * { margin-block-start: 0 !important; }
.wp-site-blocks > p:empty,
.wp-site-blocks > br,
header.wp-block-template-part > p:empty,
header.wp-block-template-part > br { display: none; }

.aa3d-main { padding-top: 24px; padding-bottom: 56px; }
.aa3d-main .wp-block-post-title { margin-top: 12px; }

/* The accent colour is fixed here, so an older colour saved in the Site Editor cannot bring the navy back */
body { --wp--preset--color--accent-1: #8B2D2D; font-weight: 400; }

/* ======================================================================
   Header: top row and period row both stay (sticky)
   ====================================================================== */

header.wp-block-template-part:has(.aa3d-top) {
	position: sticky;
	top: 0;
	z-index: 100;
}
.admin-bar header.wp-block-template-part:has(.aa3d-top) { top: 32px; }
@media (max-width: 782px) {
	.admin-bar header.wp-block-template-part:has(.aa3d-top) { top: 46px; }
}
@media (max-width: 600px) {
	.admin-bar header.wp-block-template-part:has(.aa3d-top) { top: 0; }
}
html.aa3d-menu-open header.wp-block-template-part:has(.aa3d-top) { top: 0; }
.admin-bar.aa3d-menu-open header.wp-block-template-part:has(.aa3d-top) { top: 32px; }

/* Top row */
.aa3d-top { background: var(--aa3d-menu); }
.aa3d-top__inner {
	max-width: var(--aa3d-wide);
	margin: 0 auto;
	padding: 0 32px;
	height: var(--aa3d-top-h);
	box-sizing: border-box;
	display: flex;
	align-items: center;
	gap: 28px;
}
.aa3d-logo {
	font-family: var(--aa3d-serif);
	font-size: 1.5rem;
	font-weight: 600;
	color: #FFFFFF !important;
	white-space: nowrap;
	text-decoration: none !important;
}
.aa3d-logo span { color: inherit; }
.aa3d-logo--img { display: flex; align-items: center; height: 100%; }
.aa3d-logo__img { display: block; width: auto; height: auto; max-height: 62px; max-width: 280px; transition: max-height .3s ease; }

/* Compact header after scrolling down: smaller top row, slides in with a shadow */
.aa3d-top__inner { transition: height .3s ease; }
.aa3d-logo { transition: font-size .3s ease; }
html.aa3d-scrolled { --aa3d-top-h: 54px; }
html.aa3d-scrolled .aa3d-logo { font-size: 1.25rem; }
html.aa3d-scrolled .aa3d-logo__img { max-height: 42px; }
header.wp-block-template-part:has(.aa3d-top) { transition: box-shadow .3s ease; }
html.aa3d-scrolled header.wp-block-template-part:has(.aa3d-top) { box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28); }
@media (max-width: 860px) {
	html.aa3d-scrolled { --aa3d-top-h: 50px; }
	html.aa3d-scrolled .aa3d-logo { font-size: 1.1rem; }
	html.aa3d-scrolled .aa3d-logo__img { max-height: 36px; }
}
@media (prefers-reduced-motion: reduce) {
	.aa3d-top__inner, .aa3d-logo, .aa3d-logo__img { transition: none; }
}

.aa3d-top__nav { flex: 1 1 auto; padding: 0 24px; }
.aa3d-toplinks {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 8px 24px;
	flex-wrap: wrap;
	justify-content: space-evenly;
}
.aa3d-toplinks a {
	display: inline-block;
	padding: 10px 0;
	color: #FFFFFF;
	font-size: 0.875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}
.aa3d-toplinks a:hover { color: var(--aa3d-gold); text-decoration: none; }
.aa3d-toplinks a.is-current { box-shadow: inset 0 -2px 0 var(--aa3d-gold); }

.aa3d-top__tools { display: flex; align-items: center; gap: 16px; }
.aa3d-search { margin: 0; }
.aa3d-search input {
	height: 40px;
	width: 220px;
	box-sizing: border-box;
	padding: 0 12px;
	border: 1px solid var(--aa3d-line);
	border-radius: 0;
	background: var(--aa3d-base);
	font: inherit;
	font-size: 0.9375rem;
	color: var(--aa3d-ink);
}
.aa3d-top__tools .aa3d-search input { background: var(--aa3d-sand); border: 0; }
.aa3d-top__tools .aa3d-search input::placeholder { color: var(--aa3d-muted); }

/* Language switch: flag in the header, flag + name in the mobile menu */
.aa3d-lang {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 4px;
	color: #FFFFFF !important;
	font-size: 0.9375rem;
	font-weight: 600;
}
.aa3d-lang__flag { display: block; width: 26px; height: auto; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6); }
.aa3d-top__tools .aa3d-lang__flag + .aa3d-lang__name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Mobile buttons and menu panel */
.aa3d-mbtn {
	display: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: var(--aa3d-gold);
	cursor: pointer;
}
.aa3d-mpanel {
	background: var(--aa3d-white);
	border-bottom: 1px solid var(--aa3d-line);
	padding: 12px 20px 20px;
}
.aa3d-mpanel .aa3d-search input { width: 100%; height: 48px; font-size: 1.0625rem; }
.aa3d-mpanel .aa3d-toplinks { flex-direction: column; justify-content: flex-start; gap: 0; margin-top: 8px; }
.aa3d-mpanel .aa3d-toplinks a { display: block; padding: 13px 0; font-size: 1.0625rem; border-bottom: 1px solid var(--aa3d-line); }
.aa3d-mpanel .aa3d-toplinks a, .aa3d-mpanel .aa3d-lang { color: var(--aa3d-ink) !important; }
.aa3d-mpanel .aa3d-lang__flag { box-shadow: 0 0 0 1px var(--aa3d-line); }
.aa3d-mpanel__langs { padding-top: 12px; }

/* mobile bar: language flag (shown only on small screens) */
.aa3d-mlang { display: none; }
.aa3d-mlang .aa3d-lang { padding: 10px 8px; }
.aa3d-mlang .aa3d-lang__flag + .aa3d-lang__name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 860px) {
	.aa3d-top__inner { padding: 0 8px 0 16px; gap: 4px; }
	.aa3d-mlang { display: flex; margin-left: auto; }
	.aa3d-mlang + .aa3d-mbtn--first { margin-left: 0; }
	.aa3d-top__nav, .aa3d-top__tools { display: none; }
	.aa3d-mbtn { display: inline-flex; }
	.aa3d-mbtn--first { margin-left: auto; }
	.aa3d-logo { font-size: 1.3rem; }
	.aa3d-logo__img { max-height: 46px; max-width: 200px; }
}
@media (min-width: 861px) {
	.aa3d-mpanel { display: none !important; }
}

/* Period row */
.aa3d-pbar {
	background: linear-gradient(180deg, #3D3D3D 0%, #2F2F2F 55%, #232323 100%);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 2px 6px rgba(35, 35, 35, 0.18);
}
.aa3d-pbar__inner {
	position: relative;
	max-width: var(--aa3d-wide);
	margin: 0 auto;
	padding: 0 24px;
	box-sizing: border-box;
}
.aa3d-pbar__strip {
	display: flex;
	gap: 2px;
	overflow-x: auto;
	scrollbar-width: none;
}
.aa3d-pbar__strip::-webkit-scrollbar { display: none; }
.aa3d-pbar__strip > :first-child { margin-left: auto; }
.aa3d-pbar__strip > :last-child { margin-right: auto; }
.aa3d-pbar__label {
	flex: 0 0 auto;
	align-self: center;
	padding: 0 14px 0 0;
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--aa3d-gold);
	white-space: nowrap;
}
.aa3d-per {
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 6px 14px;
	color: #E6E6E6 !important;
	text-decoration: none !important;
	white-space: nowrap;
}
.aa3d-per:hover { background: rgba(255, 255, 255, 0.12); }
.aa3d-per__name { font-size: 0.9375rem; font-weight: 600; line-height: 1.3; }
.aa3d-per__dates { font-size: 0.78rem; font-weight: 600; line-height: 1.3; color: #D8D8D8; }
.aa3d-per.is-current,
.aa3d-per.is-current:hover { background: var(--aa3d-gold); color: #1E2328 !important; box-shadow: none; }
.aa3d-per.is-current .aa3d-per__dates { color: #3A2D1E; }
.aa3d-parr {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 52px;
	padding: 0;
	border: 0;
	display: flex;
	align-items: center;
	color: #FFFFFF;
	cursor: pointer;
}
.aa3d-parr[hidden] { display: none; }
.aa3d-parr--l { left: 0; justify-content: flex-start; padding-left: 6px; background: linear-gradient(to left, rgba(47, 47, 47, 0), var(--aa3d-pband) 55%); }
.aa3d-parr--r { right: 0; justify-content: flex-end; padding-right: 6px; background: linear-gradient(to right, rgba(47, 47, 47, 0), var(--aa3d-pband) 55%); }
@media (max-width: 860px) {
	.aa3d-pbar__inner { padding: 0 8px; }
	.aa3d-per { padding: 6px 12px; }
}

/* ======================================================================
   Banner, title band, breadcrumbs
   ====================================================================== */

.aa3d-cover {
	height: clamp(280px, 40vw, 520px);
	box-sizing: border-box;
	padding: 0 24px clamp(28px, 4vw, 56px);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-end;
	text-align: center;
	background-color: var(--aa3d-dark);
	background-image: var(--aa3d-cover-l, none);
	background-size: cover;
	background-position: center;
	background-attachment: fixed;
}
@media (hover: none), (max-width: 860px) {
	.aa3d-cover { background-attachment: scroll; }
}
/* Banner picture size per screen (must match the preload lines in inc/layout.php) */
@media (max-width: 1699px) { .aa3d-cover { background-image: var(--aa3d-cover-m, var(--aa3d-cover-l, none)); } }
@media (max-width: 767px) { .aa3d-cover { background-image: var(--aa3d-cover-s, var(--aa3d-cover-m, var(--aa3d-cover-l, none))); } }
.aa3d-cover__frame {
	max-width: 1000px;
	padding: 18px 36px 20px;
	background: rgba(20, 22, 25, 0.58);
}
.aa3d-cover__title {
	margin: 0;
	font-family: var(--aa3d-serif);
	font-size: clamp(2.1rem, 1.4rem + 3vw, 3.9rem);
	font-weight: 600;
	line-height: 1.1;
	color: #FFFFFF;
	text-shadow: var(--aa3d-shadow);
}
.aa3d-cover__sub {
	margin: 12px 0 0;
	font-size: clamp(1.05rem, 0.9rem + 0.6vw, 1.3rem);
	color: #FFFFFF;
}
.aa3d-cover-rule { height: 4px; background: var(--aa3d-gold); }

/* page without a featured image */
.aa3d-cover--plain { height: auto; padding: 40px 24px 12px; background: var(--aa3d-titleband); }
.aa3d-cover--plain .aa3d-cover__frame { background: none; padding: 0; }
.aa3d-cover--plain .aa3d-cover__title,
.aa3d-cover--plain .aa3d-cover__sub { color: var(--aa3d-ink); text-shadow: none; }

/* search results, tag/category lists, 404 */
.aa3d-cover--list { height: auto; min-height: 170px; padding-top: 36px; background: linear-gradient(180deg, #3D3D3D 0%, var(--aa3d-dark) 100%); background-attachment: scroll; }

.aa3d-titleband {
	background: var(--aa3d-titleband);
	border-bottom: 1px solid var(--aa3d-line);
	padding: 14px 32px !important;
	margin-top: 0 !important;
}
.aa3d-titleband + .aa3d-main { padding-top: 40px; }
@media (max-width: 860px) { .aa3d-titleband { padding: 14px 16px 24px !important; } }

.aa3d-crumbs ol {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	font-size: 0.9375rem;
	color: var(--aa3d-muted);
}
.aa3d-crumbs li + li::before { content: "›"; margin-right: 4px; }
.aa3d-crumbs [aria-current] { color: var(--aa3d-ink); }

/* ======================================================================
   Footer
   ====================================================================== */

.aa3d-footer { background: var(--aa3d-foot); }
.aa3d-footer__inner {
	max-width: var(--aa3d-wide);
	margin: 0 auto;
	padding: 48px 32px 28px;
	box-sizing: border-box;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 32px;
}
.aa3d-footer p { margin: 0; font-size: 0.9375rem; line-height: 1.6; color: #AEB6BF; }
.aa3d-footer .aa3d-footer__name { font-family: var(--aa3d-serif); font-size: 1.25rem; font-weight: 600; color: #FFFFFF; margin-bottom: 10px; }
.aa3d-footer .aa3d-footer__title { font-weight: 700; color: #FFFFFF; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.875rem; }
.aa3d-footer a { color: #E6E6E6; }
.aa3d-footer a:hover { color: #FFFFFF; }
.aa3d-footer__list { list-style: none; margin: 0; padding: 0; font-size: 0.9375rem; line-height: 2; }
.aa3d-footer__bottom {
	max-width: var(--aa3d-wide);
	margin: 0 auto;
	padding: 20px 32px 32px;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	gap: 20px;
	flex-wrap: wrap;
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	font-size: 0.875rem;
	color: #AEB6BF;
}
.aa3d-footer__legal { list-style: none; margin: 0; padding: 0; display: flex; gap: 20px; }

/* social icons (coloured tiles) */
.aa3d-social { display: flex; gap: 10px; flex-wrap: wrap; }
.aa3d-social__link { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; color: #FFFFFF !important; background: var(--aa3d-ink); }
.aa3d-social__link:hover { filter: brightness(1.12); }
.aa3d-social--youtube { background: #E62117; }
.aa3d-social--facebook { background: #1877F2; }
.aa3d-social--instagram { background: #C13584; }
.aa3d-social--patreon { background: #FF424D; }
.aa3d-social--twitter,
.aa3d-social--x-com { background: #000000; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35); }

/* ======================================================================
   Content: images, links, galleries, lightbox
   ====================================================================== */

/* image shadow (as on the old site); style "No shadow" removes it */
.wp-block-post-content .wp-block-image img,
.wp-block-post-content .wp-block-post-featured-image img { box-shadow: var(--aa3d-shadow); }
.wp-block-post-content .wp-block-image.is-style-no-shadow img { box-shadow: none; }
/* captions: a discreet band under the image, as wide as the image */
.wp-block-post-content .wp-block-image figcaption,
.wp-block-gallery.has-nested-images figure.wp-block-image figcaption {
	margin: 0 !important;
	padding: 7px 12px 8px !important;
	background: rgba(35, 35, 35, 0.06) !important;
	border-bottom: 1px solid rgba(213, 172, 102, 0.45);
	color: var(--aa3d-muted) !important;
	font-size: 0.9375rem;
	line-height: 1.45;
	text-align: center;
}
/* the figure shrinks to the image, so the caption band is exactly as wide as the image */
.wp-block-post-content figure.wp-block-image:not(.wp-block-gallery figure):not(.alignfull):not(.alignwide):has(> figcaption) { width: fit-content; max-width: 100%; margin-left: auto; margin-right: auto; }
.wp-block-post-content figure.wp-block-image:has(> figcaption) > img,
.wp-block-post-content figure.wp-block-image:has(> figcaption) > a > img { display: block; }

/* links in text: navy with a gold underline */
.wp-block-post-content :is(p, li, figcaption) a:not(.wp-element-button) {
	text-decoration: underline;
	text-decoration-color: var(--aa3d-gold);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}
.wp-block-post-content :is(p, li, figcaption) a:not(.wp-element-button):hover { color: #8A6A2E; }

/* galleries: captions below the images */
.wp-block-gallery.has-nested-images figure.wp-block-image { justify-content: flex-start; }
.wp-block-gallery.has-nested-images figure.wp-block-image:has(figcaption)::before { display: none; }
.wp-block-gallery.has-nested-images figure.wp-block-image figcaption {
	position: static;
	max-height: none;
	overflow: visible;
	margin: 0;
	padding: 8px 0 4px;
	background: none;
	color: var(--aa3d-muted);
	text-shadow: none;
	text-align: center;
	font-size: 0.9375rem;
	line-height: 1.45;
}
.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image) img { aspect-ratio: 16 / 9; height: auto; flex: none; }

/* lightbox */
.wp-block-image a[data-aa3d-lb] { cursor: zoom-in; }
html.aa3d-lb-open { overflow: hidden; }
.aa3d-lb {
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: rgba(15, 16, 18, 0.94);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 56px 72px 24px;
	box-sizing: border-box;
}
.aa3d-lb[hidden] { display: none; }
.aa3d-lb__img { max-width: 100%; max-height: calc(100vh - 170px); object-fit: contain; box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5); }
.aa3d-lb__cap { max-width: 900px; margin: 14px 0 0; color: #E9ECEF; font-size: 1rem; line-height: 1.5; text-align: center; }
.aa3d-lb__count { color: #9AA3AC; font-size: 0.875rem; margin-top: 6px; }
.aa3d-lb__btn {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	border: 0;
	background: rgba(255, 255, 255, 0.08);
	color: #FFFFFF;
	cursor: pointer;
}
.aa3d-lb__btn:hover { background: rgba(255, 255, 255, 0.18); }
.aa3d-lb__btn[hidden] { display: none; }
.aa3d-lb__close { top: 12px; right: 12px; }
.aa3d-lb__prev { left: 12px; top: 50%; transform: translateY(-50%); }
.aa3d-lb__next { right: 12px; top: 50%; transform: translateY(-50%); }
@media (max-width: 700px) {
	.aa3d-lb { padding: 56px 8px 16px; }
	.aa3d-lb__prev, .aa3d-lb__next { top: auto; bottom: 12px; transform: none; }
}

/* ======================================================================
   Boxes and cards
   ====================================================================== */

.aa3d-box {
	background: var(--aa3d-white);
	border: 1px solid var(--aa3d-line);
	border-radius: 0;
	padding: 20px 22px;
}
.aa3d-box--sand { background: var(--aa3d-sand); border-color: transparent; }
.aa3d-box > :first-child { margin-top: 0; }
.aa3d-box h3, .aa3d-box h4 { font-family: inherit; font-size: 1.125rem; }

/* card links: period cards, area cards, places, "More in <place>" */
.aa3d-card {
	display: block;
	background: var(--aa3d-card);
	border: 1px solid var(--aa3d-line);
	border-radius: 0;
	overflow: hidden;
	color: var(--aa3d-ink) !important;
	text-decoration: none !important;
}
.aa3d-card:hover { border-color: var(--aa3d-gold); box-shadow: 0 2px 8px rgba(35, 35, 35, 0.12); }
.aa3d-card img, .aa3d-card__noimg { display: block; width: 100%; height: 140px; object-fit: cover; background: var(--aa3d-sand); }
.aa3d-card__title { display: block; padding: 12px 16px 14px; font-weight: 600; }
.aa3d-card__meta { display: block; padding: 0 16px 14px; margin-top: -8px; font-size: 0.875rem; color: var(--aa3d-muted); }

.aa3d-pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.aa3d-subpages { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.aa3d-subpages .aa3d-card img, .aa3d-subpages .aa3d-card__noimg { height: 150px; }

/* monument cards (Query Loop with class aa3d-cards) */
.aa3d-cards .wp-block-post { background: var(--aa3d-card); border: 1px solid var(--aa3d-line); border-radius: 0; overflow: hidden; transition: box-shadow 0.2s; }
.aa3d-cards .wp-block-post:hover { border-color: var(--aa3d-gold); box-shadow: 0 2px 8px rgba(35, 35, 35, 0.12); }
.aa3d-cards .wp-block-post-featured-image img { box-shadow: none !important; }
.aa3d-cards .wp-block-post-featured-image { margin: 0; }
.aa3d-cards .wp-block-post-title,
.aa3d-cards .wp-block-post-excerpt { padding: 0 18px; }
.aa3d-cards .wp-block-post-title { font-size: 1.3125rem; margin-top: 14px; }
.aa3d-cards .wp-block-post-title a { color: var(--aa3d-ink); }
.aa3d-cards .wp-block-post-excerpt { font-size: 0.9375rem; color: var(--aa3d-muted); padding-bottom: 16px; }
.aa3d-cards .wp-block-post-excerpt__excerpt { margin: 6px 0 0; }
.aa3d-cards .wp-block-query-pagination { margin-top: 32px; gap: 8px; }
.aa3d-cards .wp-block-query-pagination a,
.aa3d-cards .wp-block-query-pagination .current { padding: 4px 10px; border: 1px solid var(--aa3d-line); background: var(--aa3d-card); text-decoration: none; }
.aa3d-cards .wp-block-query-pagination .current { background: var(--aa3d-gold); border-color: var(--aa3d-gold); }

/* ======================================================================
   Monument posts
   ====================================================================== */

.aa3d-kicker {
	font-size: 0.875rem !important;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--aa3d-muted);
	margin-bottom: 0.25rem !important;
}
.aa3d-facts { list-style: none; padding: 0; margin: 0; font-size: 0.9375rem; }
/* two columns: label on the left, value on the right (long values wrap in their own column) */
.aa3d-facts li { position: relative; padding: 9px 0 9px 7.5em; border-bottom: 1px solid var(--aa3d-line); }
.aa3d-facts li:last-child { border-bottom: 0; }
/* "> div >": in the editor each line sits in an extra box */
.aa3d-facts li > strong:first-child,
.aa3d-facts li > div > strong:first-child { position: absolute; left: 0; top: 9px; width: 7em; font-weight: 400; color: var(--aa3d-muted); }
@media (max-width: 380px) { .aa3d-facts li { padding-left: 0; } .aa3d-facts li > strong:first-child, .aa3d-facts li > div > strong:first-child { position: static; display: block; width: auto; } }

.aa3d-map { position: relative; min-height: 280px; height: 100%; background: var(--aa3d-sand); }
.aa3d-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.aa3d-facts-map { gap: 20px !important; }
.aa3d-facts-map > .wp-block-column { display: flex; flex-direction: column; }
.aa3d-facts-map > .wp-block-column > * { flex: 1 1 auto; }
.aa3d-facts-map .aa3d-box h3 { margin-bottom: 8px; }

/* desktop: Key facts + map as a side panel on the right */
@media (min-width: 1000px) {
	.wp-block-post-content > .aa3d-facts-map {
		float: right;
		clear: right;
		width: 340px;
		max-width: 340px;
		flex-direction: column;
		margin: 0 0 28px 40px !important;
		gap: 16px !important;
	}
	.wp-block-post-content > .aa3d-facts-map > .wp-block-column { flex-basis: auto !important; width: 100%; }
	.wp-block-post-content > .aa3d-facts-map .aa3d-map { height: 260px; min-height: 260px; }
	/* content next to the panel narrows instead of running underneath it */
	.wp-block-post-content:has(> .aa3d-facts-map) > :not(.aa3d-facts-map) { display: flow-root; }
	.wp-block-post-content:has(> .aa3d-facts-map) > .is-layout-flex:not(.aa3d-facts-map) { display: flex; }
	.wp-block-post-content:has(> .aa3d-facts-map) > .is-layout-grid { display: grid; }
	.wp-block-post-content:has(> .aa3d-facts-map) > .aa3d-kicker { margin-top: 0; }
	.wp-block-post-content::after { content: ""; display: block; clear: both; }
}

/* "More in <place>" */
.aa3d-nearby { border-top: 1px solid var(--aa3d-line); padding-top: 32px; }
.aa3d-nearby h2 { margin: 0 0 18px; }
.aa3d-nearby__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }

/* ======================================================================
   Home page sections
   ====================================================================== */

.wp-block-post-content > .alignfull { margin-block-start: 0; }
.wp-block-post-content > .alignfull:first-child { margin-top: 0; }
.aa3d-main:has(> .wp-block-post-content > .aa3d-band:first-child) { padding-top: 0; }

.aa3d-band, .aa3d-band-alt { padding-top: 64px; padding-bottom: 64px; border-top: 1px solid var(--aa3d-line); }
.aa3d-band-alt { background: var(--aa3d-titleband); }
.aa3d-band h2, .aa3d-band-alt h2 { margin-top: 0; }
/* "More to explore" and Support page boxes: picture (Image block) on top, centred */
.aa3d-feature { height: 100%; text-align: center; }
.aa3d-feature > .wp-block-image { margin: 0 auto 14px !important; width: 120px; overflow: hidden; }
.aa3d-feature > .wp-block-image img { display: block; width: 120px !important; height: 120px !important; object-fit: cover; box-shadow: var(--aa3d-shadow) !important; transition: transform 0.35s ease; }
.aa3d-feature:hover > .wp-block-image img { transform: scale(1.05); }

/* Support page */

/* ======================================================================
   Lists: monument index, places, "through the periods", search
   ====================================================================== */

.aa3d-index__filter { width: 100%; max-width: 420px; height: 46px; padding: 0 14px; border: 1px solid var(--aa3d-line); border-radius: 0; background: var(--aa3d-card); font: inherit; box-sizing: border-box; }
.aa3d-index__jump { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 18px 0 8px; font-weight: 600; }
.aa3d-index__group h2 { margin: 40px 0 14px; padding-bottom: 8px; border-bottom: 2px solid var(--aa3d-gold); scroll-margin-top: 140px; }
.aa3d-index__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px 24px; }
.aa3d-index__list a { display: grid; grid-template-columns: 64px 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center; padding: 6px; color: var(--aa3d-ink); text-decoration: none !important; }
.aa3d-index__list a:hover { background: var(--aa3d-sand); }
.aa3d-index__list img, .aa3d-index__noimg { grid-row: 1 / 3; width: 64px; height: 48px; object-fit: cover; display: block; background: var(--aa3d-sand); box-shadow: none !important; }
.aa3d-index__name { font-weight: 600; line-height: 1.3; align-self: end; }
.aa3d-index__place { font-size: 0.875rem; color: var(--aa3d-muted); line-height: 1.3; align-self: start; }

.aa3d-place { margin-bottom: 48px; scroll-margin-top: 140px; }
.aa3d-place h2 { margin: 0 0 16px; padding-bottom: 8px; border-bottom: 2px solid var(--aa3d-gold); }
.aa3d-place__count { font-family: inherit; font-size: 0.9375rem; font-weight: 400; color: var(--aa3d-muted); margin-left: 8px; }

.aa3d-through { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 28px; }
.aa3d-through__label { margin-right: 6px; font-size: 0.9375rem; font-weight: 600; color: var(--aa3d-muted); }
.aa3d-through__btn { padding: 7px 16px; border: 1px solid var(--aa3d-line); background: var(--aa3d-card); color: var(--aa3d-ink) !important; font-size: 0.9375rem; font-weight: 500; text-decoration: none !important; }
.aa3d-through__btn:hover { border-color: var(--aa3d-gold); }
.aa3d-through__btn.is-current { background: var(--aa3d-gold); border-color: var(--aa3d-gold); color: var(--aa3d-ink) !important; font-weight: 600; }

.aa3d-searchbox { max-width: 560px; margin: 24px auto 48px; text-align: center; }
.aa3d-searchbox .aa3d-search input { width: 100%; height: 48px; background: var(--aa3d-card); }

/* ======================================================================
   Videos page
   ====================================================================== */

.aa3d-videos { margin-bottom: 36px; gap: 32px !important; }
.aa3d-video-title { font-size: 1.125rem !important; margin-top: 10px !important; }

/* ======================================================================
   Timeline: vertical line, period circles, event dots
   ====================================================================== */

.aa3d-tl-period { margin-top: 56px !important; scroll-margin-top: 150px; }
.wp-block-post-content > .aa3d-tl-period,
.wp-block-post-content > .aa3d-timeline { position: relative; padding-left: 60px; }
.wp-block-post-content > .aa3d-tl-period::before,
.wp-block-post-content > .aa3d-timeline::before {
	content: "";
	position: absolute;
	left: 21px;
	top: -56px;
	bottom: -56px;
	width: 2px;
	background: #CDBB94;
}
.wp-block-post-content > .aa3d-tl-period:first-of-type::before { top: 50%; }
.wp-block-post-content > .aa3d-timeline:last-of-type::before { top: 0; bottom: auto; height: calc(100% - 26px); }
.wp-block-post-content > .aa3d-tl-period::after {
	content: "";
	position: absolute;
	z-index: 2;
	left: 6px;
	top: 50%;
	width: 32px;
	height: 32px;
	margin-top: -16px;
	box-sizing: border-box;
	border-radius: 50%;
	background: var(--aa3d-accent);
	border: 4px solid var(--aa3d-gold);
	box-shadow: 0 0 0 5px var(--aa3d-base);
}
.wp-block-table.aa3d-timeline { margin-top: 10px !important; margin-bottom: 0 !important; overflow: visible !important; }
.aa3d-timeline table, .aa3d-timeline tbody { display: block; width: 100%; }
.aa3d-timeline tr { display: grid; grid-template-columns: 180px 1fr; position: relative; transition: background 0.2s; }
.aa3d-timeline tr:hover { background: var(--aa3d-card); }
.aa3d-timeline tr::before {
	content: "";
	position: absolute;
	z-index: 1;
	left: -45px;
	top: 17px;
	width: 14px;
	height: 14px;
	box-sizing: border-box;
	border-radius: 50%;
	background: var(--aa3d-base);
	border: 2px solid var(--aa3d-gold);
	transition: background 0.2s, transform 0.2s;
}
.aa3d-timeline tr:hover::before { background: var(--aa3d-gold); transform: scale(1.25); }
.aa3d-timeline td { display: block; border: 0 !important; border-bottom: 1px solid var(--aa3d-line) !important; padding: 12px 14px; }
.aa3d-timeline td:first-child { font-weight: 600; color: var(--aa3d-accent); }
@media (max-width: 600px) {
	.wp-block-post-content > .aa3d-tl-period,
	.wp-block-post-content > .aa3d-timeline { padding-left: 48px; }
	.wp-block-post-content > .aa3d-tl-period::before,
	.wp-block-post-content > .aa3d-timeline::before { left: 15px; }
	.wp-block-post-content > .aa3d-tl-period::after { left: 0; }
	.aa3d-timeline tr { grid-template-columns: 1fr; }
	.aa3d-timeline tr::before { left: -39px; }
	.aa3d-timeline td:first-child { border-bottom: 0 !important; padding-bottom: 0; }
}

/* period chips and gentle fade-in (added by aa3d.js) */
.aa3d-tl-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.aa3d-tl-nav a { padding: 5px 12px; border: 1px solid var(--aa3d-line); background: var(--aa3d-card); color: var(--aa3d-ink) !important; font-size: 0.9375rem; text-decoration: none !important; }
.aa3d-tl-nav a:hover { border-color: var(--aa3d-gold); background: var(--aa3d-gold); }
@media (prefers-reduced-motion: no-preference) {
	.aa3d-tl-anim .aa3d-timeline tr { opacity: 0; transform: translateY(10px); transition: opacity 0.5s ease, transform 0.5s ease, background 0.2s; }
	.aa3d-tl-anim .aa3d-timeline tr.is-in { opacity: 1; transform: none; }
}

/* ======================================================================
   Home: period cards as ordinary blocks (pattern "Home: choose a period")
   ====================================================================== */

.aa3d-pgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (min-width: 1200px) { .aa3d-pgrid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); } }
@media (max-width: 600px) { .aa3d-pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.aa3d-pgrid > * { margin: 0 !important; }
.aa3d-pcard { background: var(--aa3d-card); border: 1px solid var(--aa3d-line); overflow: hidden; transition: box-shadow 0.2s; }
.aa3d-pcard:hover { border-color: var(--aa3d-gold); box-shadow: 0 2px 8px rgba(35, 35, 35, 0.12); }
.aa3d-pcard > * { margin: 0 !important; }
.aa3d-pcard .wp-block-image img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; box-shadow: none !important; }
.aa3d-pcard .aa3d-pcard__title { padding: 10px 12px 2px; font-weight: 600; line-height: 1.3; }
.aa3d-pcard .aa3d-pcard__title a { color: var(--aa3d-ink); text-decoration: none !important; }
.aa3d-pcard .aa3d-pcard__meta { padding: 0 12px 10px; font-size: 0.875rem; color: var(--aa3d-muted); }

/* WPML's own language switcher is not used (the header has the flags) */
.wpml-ls-statics-footer, .wpml-ls-statics-post_translations { display: none !important; }

/* Panels: a full-width section with darker background and thin gold edge, heading inside
   (patterns "Area cards (automatic)" and "Monument cards") */
.aa3d-panel { background: var(--aa3d-tile); border: 1px solid var(--aa3d-tile-edge); padding: 24px 28px 28px; margin-top: 40px !important; margin-bottom: 40px !important; }
.aa3d-panel > :first-child { margin-top: 0 !important; }
.aa3d-panel > :last-child { margin-bottom: 0 !important; }
.aa3d-panel > h2, .aa3d-panel > h3 { margin-bottom: 18px; }
.aa3d-panel .wp-block-query-no-results p { margin: 0; color: var(--aa3d-muted); }
@media (max-width: 600px) { .aa3d-panel { padding: 18px 16px 20px; } }

/* Gentle zoom of the period card pictures on hover */
.aa3d-pcard .wp-block-image { overflow: hidden; }
.aa3d-pcard .wp-block-image img { transition: transform 0.35s ease; }
.aa3d-pcard:hover .wp-block-image img { transform: scale(1.05); }
@media (prefers-reduced-motion: reduce) {
	.aa3d-pcard .wp-block-image img, .aa3d-feature > .wp-block-image img { transition: none; transform: none !important; }
}

/* Monument index: type filter buttons */
.aa3d-index__types { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 0 4px; }
.aa3d-index__types-label { margin-right: 4px; font-size: 0.9375rem; font-weight: 600; color: var(--aa3d-muted); }
.aa3d-index__type { padding: 6px 14px; border: 1px solid var(--aa3d-line); border-radius: 0; background: var(--aa3d-card); color: var(--aa3d-ink); font: inherit; font-size: 0.9375rem; cursor: pointer; }
.aa3d-index__type:hover { border-color: var(--aa3d-gold); }
.aa3d-index__type.is-active { background: var(--aa3d-gold); border-color: var(--aa3d-gold); color: var(--aa3d-ink); font-weight: 600; }

/* "Other places to visit" at the end of area pages: same width as the page content */
.aa3d-main > .aa3d-siblings { max-width: var(--wp--style--global--content-size, 1280px); margin-left: auto !important; margin-right: auto !important; box-sizing: border-box; }

/* No focus frame when a menu link or period is clicked with the mouse (keyboard users still see it) */
.aa3d-toplinks a:focus:not(:focus-visible),
.aa3d-per:focus:not(:focus-visible),
.aa3d-lang:focus:not(:focus-visible),
.aa3d-logo:focus:not(:focus-visible) { outline: none; }

/* ======================================================================
   Home: shared bits
   ====================================================================== */

.aa3d-label { margin: 0 0 6px !important; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #8A6A2E; }
.aa3d-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; background: var(--aa3d-gold); color: var(--aa3d-ink) !important; font-weight: 600; text-decoration: none !important; }
.aa3d-btn:hover { background: #C49A50; }
.aa3d-btn--yt { background: #E62117; color: #FFFFFF !important; }
.aa3d-btn--yt:hover { background: #C51A11; }
.aa3d-chips .wp-block-button__link { padding: 9px 18px; background: var(--aa3d-card); border: 1px solid var(--aa3d-line); color: var(--aa3d-ink); font-weight: 500; }
.aa3d-chips .wp-block-button__link:hover { border-color: var(--aa3d-gold); background: var(--aa3d-card); color: var(--aa3d-ink); }

/* Monument of the month */
.aa3d-month { display: flex; flex-wrap: wrap; background: var(--aa3d-card); border: 1px solid var(--aa3d-tile-edge); }
.aa3d-month__pic { flex: 1 1 300px; min-width: 0; display: block; overflow: hidden; }
.aa3d-month__img { display: block; width: 100%; height: 100%; min-height: 240px; object-fit: cover; transition: transform 0.35s ease; }
.aa3d-month:hover .aa3d-month__img { transform: scale(1.04); }
.aa3d-month__body { flex: 1 1 260px; padding: 24px 26px; box-sizing: border-box; }
.aa3d-month__title { margin: 4px 0 8px; font-size: 1.75rem; }
.aa3d-month__title a { color: inherit; text-decoration: none; }
.aa3d-month__meta { margin: 0 0 8px; font-size: 0.9375rem; color: var(--aa3d-muted); }
.aa3d-month__text { margin: 0 0 18px; line-height: 1.6; }

/* What's new */
.aa3d-news { list-style: none; margin: 0; padding: 0; }
.aa3d-news li { padding: 12px 0; border-bottom: 1px solid #D9CFBA; }
.aa3d-news li:first-child { padding-top: 0; }
.aa3d-badge { display: inline-block; padding: 2px 8px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.aa3d-badge--new { background: var(--aa3d-gold); color: var(--aa3d-ink); }
.aa3d-badge--updated { background: var(--aa3d-accent); color: #FFFFFF; }
.aa3d-badge--video { background: #E62117; color: #FFFFFF; }
.aa3d-news__date { font-size: 0.8125rem; color: var(--aa3d-muted); }
.aa3d-news__title { display: block; margin-top: 4px; font-weight: 600; color: var(--aa3d-ink) !important; text-decoration: none !important; }
.aa3d-news__title:hover { color: #8A6A2E !important; }
.aa3d-news__note { display: block; font-size: 0.875rem; color: var(--aa3d-muted); }

/* Did you know? */
.aa3d-dyk { max-width: 860px; margin: 0 auto; text-align: center; }
/* next to the What's new column: compact box under Monument of the month */
.wp-block-column > .aa3d-dyk { max-width: none; margin: 20px 0 0; padding: 18px 22px; text-align: left; background: var(--aa3d-card); border: 1px solid var(--aa3d-tile-edge); border-left: 4px solid var(--aa3d-gold); }
.wp-block-column > .aa3d-dyk .aa3d-dyk__text { font-size: 1.125rem; line-height: 1.5; }
.aa3d-dyk__text { margin: 6px 0 10px; font-family: var(--aa3d-serif); font-size: clamp(1.25rem, 1rem + 1vw, 1.625rem); line-height: 1.45; }
.aa3d-dyk__text strong { color: var(--aa3d-accent); }
.aa3d-dyk__more { margin: 0; font-weight: 600; }

/* Latest video (YouTube loads only when played) */
.aa3d-latest { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; }
.aa3d-yt { flex: 1.2 1 440px; min-width: 0; position: relative; aspect-ratio: 16 / 9; padding: 0; border: 0; background: #000; cursor: pointer; overflow: hidden; box-shadow: var(--aa3d-shadow); }
.aa3d-yt img { display: block; width: 100%; height: 100%; object-fit: cover; }
.aa3d-yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.aa3d-yt__play { position: absolute; left: 50%; top: 50%; width: 72px; height: 50px; margin: -25px 0 0 -36px; background: #E62117; border-radius: 12px; }
.aa3d-yt__play::after { content: ""; position: absolute; left: 29px; top: 15px; border-style: solid; border-width: 10px 0 10px 17px; border-color: transparent transparent transparent #FFFFFF; }
.aa3d-yt:hover .aa3d-yt__play { background: #C51A11; }
.aa3d-latest__body { flex: 1 1 300px; min-width: 0; }
.aa3d-latest__title { margin: 4px 0 6px; font-size: 1.75rem; }
.aa3d-latest__date { margin: 0 0 18px; color: var(--aa3d-muted); }
.aa3d-latest__btns { margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.aa3d-latest--novideo { justify-content: center; text-align: center; }
.aa3d-latest--novideo .aa3d-latest__title { margin-bottom: 18px; }
.aa3d-latest--novideo .aa3d-latest__btns { justify-content: center; }
.aa3d-btn--dark { background: var(--aa3d-dark); color: #FFFFFF !important; }
.aa3d-btn--dark:hover { background: #3D3D3D; }

/* About + Terms | Support column */
.aa3d-supportbox { background: var(--aa3d-pband); color: #FFFFFF; padding: 28px !important; height: 100%; box-sizing: border-box; }
.aa3d-supportbox h3, .aa3d-supportbox p { color: #FFFFFF; }
.aa3d-supportbox > p { color: #D8D8D8; }
.aa3d-support-row { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; justify-content: space-between; margin-top: 12px !important; padding: 14px 16px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(213, 172, 102, 0.6); }
.aa3d-support-row > * { margin: 0 !important; }
.aa3d-support-row p { color: #D8D8D8; font-size: 0.9375rem; line-height: 1.45; }
.aa3d-support-row strong { color: #FFFFFF; font-family: var(--aa3d-serif); font-size: 1.125rem; font-weight: 600; }
.aa3d-support-row .wp-block-button__link { padding: 8px 16px; font-size: 0.9375rem; }

/* ======================================================================
   Glossary
   ====================================================================== */

.aa3d-gl { position: relative; border-bottom: 2px dotted #B8862F; background: rgba(213, 172, 102, 0.12); cursor: help; outline: none; }
.aa3d-gl__tip {
	position: absolute;
	z-index: 50;
	left: 0;
	bottom: calc(100% + 8px);
	width: max-content;
	max-width: min(320px, 80vw);
	padding: 10px 12px;
	background: var(--aa3d-dark);
	color: #E6E6E6;
	font-size: 0.875rem;
	font-weight: 400;
	line-height: 1.5;
	text-align: left;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
	display: none;
	pointer-events: none;
}
.aa3d-gl__tip strong { color: var(--aa3d-gold); margin-right: 4px; }
/* hidden boxes take no space, so the page never gets wider on phones; JS keeps the box inside the screen */
.aa3d-gl:hover .aa3d-gl__tip, .aa3d-gl:focus .aa3d-gl__tip { display: block; }
.aa3d-gl.is-below .aa3d-gl__tip { bottom: auto; top: calc(100% + 8px); }

.aa3d-glossary__letters { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 8px; }
.aa3d-glossary__letters a { min-width: 36px; padding: 5px 8px; text-align: center; border: 1px solid var(--aa3d-line); background: var(--aa3d-card); color: var(--aa3d-ink) !important; font-weight: 600; text-decoration: none !important; }
.aa3d-glossary__letters a:hover { background: var(--aa3d-gold); border-color: var(--aa3d-gold); }
.aa3d-glossary__letter { margin: 36px 0 12px; padding-bottom: 6px; border-bottom: 2px solid var(--aa3d-gold); scroll-margin-top: 140px; }
.aa3d-glossary__term { display: flex; gap: 20px; align-items: flex-start; padding: 16px 0; border-bottom: 1px solid var(--aa3d-line); scroll-margin-top: 140px; }
.aa3d-glossary__term h3 { margin: 0 0 6px; font-size: 1.25rem; }
.aa3d-glossary__term p { margin: 0 0 8px; }
.aa3d-glossary__where { font-size: 0.9375rem; color: var(--aa3d-muted); }
@media (max-width: 600px) { .aa3d-glossary__term { flex-direction: column; } }

/* ======================================================================
   Clickable plan
   ====================================================================== */

.aa3d-plan { width: fit-content; max-width: 100%; margin-left: auto; margin-right: auto; }
.aa3d-plan__wrap { position: relative; max-width: 100%; }
.aa3d-plan__legend { margin: 0; padding: 8px 14px 9px; background: rgba(35, 35, 35, 0.06); border-bottom: 1px solid rgba(213, 172, 102, 0.45); color: var(--aa3d-muted); font-size: 0.9375rem; line-height: 1.55; text-align: center; }
.aa3d-plan__intro { display: block; color: var(--aa3d-ink); }
.aa3d-plan__hint { display: block; margin: 2px 0 4px; font-size: 0.875rem; font-style: italic; color: #8A6A2E; }
.aa3d-plan__item { white-space: normal; }
.aa3d-plan__legend a { color: var(--aa3d-ink); text-decoration: underline; text-decoration-color: var(--aa3d-gold); text-underline-offset: 2px; }
.aa3d-plan__img { display: block; max-width: 100%; height: auto; box-shadow: var(--aa3d-shadow); }
.aa3d-plan__pt {
	position: absolute;
	transform: translate(-50%, -50%);
	display: flex;
	align-items: center;
	justify-content: center;
	width: clamp(22px, 3.2vw, 34px);
	height: clamp(22px, 3.2vw, 34px);
	border-radius: 50%;
	background: var(--aa3d-accent);
	border: 2px solid var(--aa3d-gold);
	color: #FFFFFF !important;
	font-size: clamp(0.6875rem, 1.2vw, 0.9375rem);
	font-weight: 700;
	line-height: 1;
	text-decoration: none !important;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
	transition: transform 0.15s, background 0.15s;
	user-select: none;
}
.aa3d-plan__pt:hover, .aa3d-plan__pt:focus { transform: translate(-50%, -50%) scale(1.15); background: #8A6A2E; z-index: 2; outline: none; }
.aa3d-plan__pt.is-nolink { cursor: default; }
.aa3d-plan__tip {
	position: absolute;
	bottom: calc(100% + 8px);
	left: 50%;
	transform: translateX(-50%);
	padding: 6px 10px;
	background: var(--aa3d-dark);
	color: #FFFFFF;
	font-size: 0.875rem;
	font-weight: 600;
	white-space: nowrap;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.15s;
	pointer-events: none;
}
.aa3d-plan__pt:hover .aa3d-plan__tip, .aa3d-plan__pt:focus .aa3d-plan__tip { opacity: 1; visibility: visible; }
.aa3d-plan--edit .aa3d-plan__pt.is-selected { background: #8A6A2E; box-shadow: 0 0 0 3px #FFFFFF, 0 0 0 5px var(--aa3d-gold); }

/* plan labels: not part of the page width until shown; kept inside the screen near the edges */
.aa3d-plan__tip { display: none; }
.aa3d-plan__pt:hover .aa3d-plan__tip, .aa3d-plan__pt:focus .aa3d-plan__tip { display: block; }
.aa3d-plan__pt.is-left .aa3d-plan__tip { left: 0; transform: none; }
.aa3d-plan__pt.is-right .aa3d-plan__tip { left: auto; right: 0; transform: none; }
.aa3d-plan__pt.is-low .aa3d-plan__tip { bottom: auto; top: calc(100% + 8px); }
.aa3d-plan__pt.is-open .aa3d-plan__tip { display: block; opacity: 1; visibility: visible; }

/* Captions never make a picture wider than its image: their text wraps to the image width
   (also when the plan or image sits inside a box or column) */
.aa3d-plan { min-width: 0; }
.aa3d-plan__legend,
.wp-block-post-content figure.wp-block-image > figcaption { contain: inline-size; }

.aa3d-plan__legend { overflow-wrap: anywhere; }

/* Back to top button */
.aa3d-totop { position: fixed; right: 18px; bottom: 18px; z-index: 90; width: 46px; height: 46px; border: 0; border-radius: 50%; background: var(--aa3d-gold); color: #1E2328; box-shadow: 0 2px 8px rgba(0,0,0,.3); cursor: pointer; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .2s, transform .2s, visibility .2s; }
.aa3d-totop.is-on { opacity: 1; visibility: visible; transform: none; }
.aa3d-totop:hover { background: #E2BF82; }
@media (max-width: 600px) { .aa3d-totop { right: 12px; bottom: 12px; width: 42px; height: 42px; } }

/* Footer: sister site box (Sounion 3D) */
.aa3d-sister { display: block; max-width: 300px; border: 1px solid rgba(213, 172, 102, 0.6); background: #2F2F2F; text-decoration: none !important; overflow: hidden; }
.aa3d-sister__img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform 0.35s ease; }
.aa3d-sister:hover .aa3d-sister__img { transform: scale(1.04); }
.aa3d-sister__label { display: block; position: relative; padding: 9px 12px; background: #2F2F2F; color: var(--aa3d-gold); font-weight: 600; font-size: 0.9375rem; }
.aa3d-sister:hover .aa3d-sister__label { color: #FFFFFF; }

/* ======================================================================
   About page (pattern "About page"): section bar, sections, cards, terms
   ====================================================================== */
.aa3d-jump {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 28px;
	margin: 0 0 8px !important;
	padding: 0 22px;
	background: var(--aa3d-titleband);
	border-bottom: 1px solid var(--aa3d-line);
	scroll-margin-top: calc(var(--aa3d-hdr, 130px) + 16px);
}
.aa3d-jump::-webkit-scrollbar { display: none; }
.wp-block-post-content .aa3d-jump a:not(.wp-element-button) {
	flex: 0 0 auto;
	padding: 13px 0 11px;
	border-bottom: 2px solid transparent;
	color: var(--aa3d-accent);
	font-weight: 700;
	font-size: 0.9375rem;
	text-decoration: none;
	white-space: nowrap;
}
.wp-block-post-content .aa3d-jump a:not(.wp-element-button):hover { color: var(--aa3d-ink); border-bottom-color: var(--aa3d-gold); }
.aa3d-about-sec { margin-top: 64px !important; scroll-margin-top: calc(var(--aa3d-hdr, 130px) + 24px); }
.aa3d-about-sec h2 { margin-top: 0; }
.aa3d-about-cols { gap: 40px; align-items: flex-start; }
.aa3d-about-support { background: var(--aa3d-titleband); border-top: 3px solid var(--aa3d-gold); padding: 36px 40px 40px; }
.aa3d-about-cards, .aa3d-about-cite { gap: 20px; margin-top: 24px; }
.aa3d-about-card { display: flex; flex-direction: column; gap: 8px; background: var(--aa3d-card); border: 1px solid var(--aa3d-line); padding: 24px; }
.aa3d-about-card > * { margin: 0 !important; }
.aa3d-about-card h3 { font-size: 1.1875rem; }
.aa3d-about-card p { color: var(--aa3d-muted); }
.aa3d-about-card .wp-block-buttons { margin-top: auto !important; padding-top: 8px; }
.aa3d-cite-card { background: var(--aa3d-card); border-left: 3px solid var(--aa3d-gold); padding: 20px 24px; }
.aa3d-cite-card > * { margin: 0 !important; }
.aa3d-cite-card > p:last-child { overflow-wrap: anywhere; }
.aa3d-cite-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 20px !important; }
.aa3d-cite-grid > .aa3d-cite-card { margin: 0 !important; }
@media (max-width: 781px) { .aa3d-cite-grid { grid-template-columns: 1fr; } }
.aa3d-backtop { margin: 20px 0 0 !important; text-align: right; font-size: 0.875rem; }
.wp-block-post-content .aa3d-backtop a:not(.wp-element-button) { color: var(--aa3d-muted); text-decoration: none; }
.wp-block-post-content .aa3d-backtop a:not(.wp-element-button):hover { color: var(--aa3d-accent); }
.aa3d-about-contact { gap: 12px 24px; justify-content: space-between; margin-top: 28px !important; padding: 20px 24px; background: var(--aa3d-titleband); border-top: 3px solid var(--aa3d-gold); }
.aa3d-about-contact > * { margin: 0 !important; }
.aa3d-terms { border-bottom: 1px solid var(--aa3d-line); padding: 16px 0; margin: 0 !important; }
.aa3d-terms:first-of-type { border-top: 1px solid var(--aa3d-line); margin-top: 20px !important; }
.aa3d-terms > summary { cursor: pointer; font-weight: 700; color: var(--aa3d-accent); }
.aa3d-terms > summary:hover { color: var(--aa3d-ink); }
.aa3d-terms[open] > summary { margin-bottom: 12px; }
.aa3d-terms > :not(summary) { color: var(--aa3d-muted); }
@media (max-width: 781px) {
	.aa3d-about-support { padding: 28px 20px 24px; }
	.aa3d-jump { padding: 4px 16px; gap: 0 20px; }
	.aa3d-about-contact { padding: 18px 20px; }
}

/* ======================================================================
   References page (pattern "References page")
   ====================================================================== */
.aa3d-refs-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 24px !important; }
.aa3d-refs-stat { background: var(--aa3d-card); border: 1px solid var(--aa3d-line); padding: 20px 22px; margin: 0 !important; }
.aa3d-refs-stat > * { margin: 0 !important; }
.aa3d-refs-stat p:not(.aa3d-refs-num) { color: var(--aa3d-muted); font-weight: 600; line-height: 1.35; }
.aa3d-refs-num { font-size: 2.75rem; font-weight: 800; line-height: 1.05; color: var(--aa3d-accent); }
.aa3d-refs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 56px; align-items: start; margin-top: 56px !important; }
.aa3d-refs > *, .aa3d-refs-side > * { margin: 0 !important; min-width: 0; }
.aa3d-refs-side { display: flex; flex-direction: column; gap: 48px; }
.aa3d-refs-group h2 { margin: 0 0 6px; }
.aa3d-refs-group ul { list-style: none; margin: 0 !important; padding: 0 !important; border-top: 2px solid var(--aa3d-gold); }
.aa3d-refs-group li { position: relative; display: flow-root; margin: 0 !important; padding: 10px 0 10px 62px; border-bottom: 1px solid var(--aa3d-line); line-height: 1.5; }
.aa3d-refs-group li > strong:first-child { position: absolute; left: 0; top: 10px; color: var(--aa3d-ink); }
.aa3d-refs-group li img { float: right; width: 104px !important; height: 70px !important; object-fit: cover; margin: 2px 0 4px 14px; }
/* Books column: a tall cover-style picture on the left of the text, about two rows high */
.aa3d-refs > .aa3d-refs-group li img { float: left; width: 74px !important; height: 110px !important; margin: 4px 16px 4px 0; }
.aa3d-refs-group ul.is-noyears li { padding-left: 0; }
@media (max-width: 900px) { .aa3d-refs-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .aa3d-refs { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .aa3d-refs-group li { padding-left: 0; } .aa3d-refs-group li > strong:first-child { position: static; margin-right: 6px; } }
.aa3d-refs-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding-top: 16px; border-top: 2px solid var(--aa3d-gold); }
.aa3d-refs-card { display: flex; flex-direction: column; margin: 0 !important; background: var(--aa3d-card); border: 1px solid var(--aa3d-line); }
.aa3d-refs-card > * { margin: 0 !important; }
.aa3d-refs-card__img img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.aa3d-refs-card__img figcaption { display: none; }
.aa3d-refs-card > p { padding: 0 16px; line-height: 1.45; }
.aa3d-refs-card > .aa3d-refs-year { padding-top: 12px; font-weight: 700; }
.aa3d-refs-card > p:last-child { padding-bottom: 16px; }
@media (max-width: 480px) { .aa3d-refs-cards { grid-template-columns: 1fr; } }

/* References – Books: one block per entry (picture, year, text in a row) */
.aa3d-refs-books { margin: 0 !important; border-top: 2px solid var(--aa3d-gold); }
.aa3d-refs-books > .aa3d-refs-book { margin: 0 !important; padding: 10px 0; border-bottom: 1px solid var(--aa3d-line); line-height: 1.5; align-items: flex-start; flex-wrap: nowrap; }
.aa3d-refs-book > * { margin: 0 !important; }
.aa3d-refs-book > .aa3d-refs-book__img { flex: 0 0 89px; width: 89px; }
.aa3d-refs-book .aa3d-refs-book__img img { display: block; width: 89px !important; height: 132px !important; object-fit: cover; }
.aa3d-refs-book__img figcaption { display: none; }
.aa3d-refs-book > .aa3d-refs-book__year { flex: 0 0 48px; width: 48px; font-weight: 700; color: var(--aa3d-ink); }
.aa3d-refs-book > .aa3d-refs-book__text { flex: 1 1 0; min-width: 0; }
@media (max-width: 480px) { .aa3d-refs-book > .aa3d-refs-book__img { flex-basis: 70px; width: 70px; } .aa3d-refs-book .aa3d-refs-book__img img { width: 70px !important; height: 104px !important; } }
/* References: pictures are not clickable */
.aa3d-refs a:has(> img) { pointer-events: none; cursor: default; }
