/* Taverna Arcanum – focused production fixes, v1.0.0 */

/* The active item changes colour only; no line crosses the submenu label. */
.ta-primary-nav .current-menu-item > a,
.ta-primary-nav .current-menu-ancestor > a,
.ta-primary-nav .current_page_item > a {
	color: var(--ta-gold-light) !important;
	text-decoration: none !important;
	background-image: none !important;
}

.ta-primary-nav .current-menu-item > a::after,
.ta-primary-nav .current-menu-ancestor > a::after,
.ta-primary-nav .current_page_item > a::after {
	display: none !important;
	content: none !important;
}

/* Package calls to action share the same baseline. */
.tac-package {
	display: flex;
	flex-direction: column;
}

.tac-package > .tac-button {
	align-self: flex-start;
	margin-top: auto;
}

/* Month navigation remains interactive without showing a calendar list. */
.tac-google-calendar__frame iframe {
	pointer-events: auto !important;
}

/* Compact, browseable gallery grid. */
.ta-gallery.ta-gallery--polished {
	display: grid !important;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
	columns: unset !important;
}

.ta-gallery.ta-gallery--polished figure {
	position: relative;
	min-width: 0;
	margin: 0 !important;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: #170d10;
	border: 1px solid rgba(196, 154, 82, .24);
}

.ta-gallery-card {
	display: block;
	width: 100%;
	height: 100%;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: zoom-in;
}

.ta-gallery.ta-gallery--polished img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: saturate(.88) contrast(1.04);
	transition: transform .35s ease, filter .35s ease;
}

.ta-gallery-card:hover img,
.ta-gallery-card:focus-visible img {
	transform: scale(1.035);
	filter: saturate(1) contrast(1.02) brightness(1.04);
}

.ta-gallery-card:focus-visible {
	outline: 2px solid var(--ta-gold-light, #dfc486);
	outline-offset: -3px;
}

.ta-gallery-lightbox {
	position: fixed;
	inset: 0;
	z-index: 10000;
	width: 100%;
	max-width: none;
	height: 100%;
	max-height: none;
	margin: 0;
	padding: 64px 80px 54px;
	border: 0;
	background: rgba(6, 3, 4, .96);
	color: #eee2cd;
}

.ta-gallery-lightbox::backdrop {
	background: rgba(6, 3, 4, .96);
}

.ta-gallery-lightbox[open] {
	display: grid;
	grid-template-columns: 54px minmax(0, 1fr) 54px;
	grid-template-rows: minmax(0, 1fr) auto;
	align-items: center;
	gap: 16px;
}

.ta-gallery-lightbox__image {
	grid-column: 2;
	grid-row: 1;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.ta-gallery-lightbox__counter {
	grid-column: 2;
	grid-row: 2;
	margin: 0;
	color: #dfc486;
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .14em;
	text-align: center;
	text-transform: uppercase;
}

.ta-gallery-lightbox__close,
.ta-gallery-lightbox__prev,
.ta-gallery-lightbox__next {
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	padding: 0;
	border: 1px solid rgba(196, 154, 82, .5);
	background: rgba(20, 10, 13, .85);
	color: #eee2cd;
	font: inherit;
	font-size: 1.4rem;
	cursor: pointer;
}

.ta-gallery-lightbox__close {
	position: absolute;
	top: 16px;
	right: 18px;
}

.ta-gallery-lightbox__prev {
	grid-column: 1;
	grid-row: 1;
}

.ta-gallery-lightbox__next {
	grid-column: 3;
	grid-row: 1;
}

.ta-gallery-lightbox__close:hover,
.ta-gallery-lightbox__prev:hover,
.ta-gallery-lightbox__next:hover,
.ta-gallery-lightbox button:focus-visible {
	border-color: #dfc486;
	background: #541124;
	outline: 0;
}

body.ta-gallery-open {
	overflow: hidden;
}

@media (max-width: 1080px) {
	/* A closed mobile menu must never catch clicks meant for the page. */
	.ta-primary-nav {
		align-items: start !important;
		max-height: 100dvh;
		overflow-x: hidden;
		overflow-y: auto;
		overscroll-behavior: contain;
		-webkit-overflow-scrolling: touch;
		pointer-events: none;
	}

	.ta-primary-nav.is-open {
		pointer-events: auto;
	}

	.ta-primary-nav > ul,
	.ta-primary-nav > div > ul {
		width: 100%;
		margin: 0;
		padding-bottom: 32px;
	}

	.ta-primary-nav .menu-item-has-children {
		margin: 8px 0 14px;
		padding-top: 12px;
		border-top: 1px solid rgba(196, 154, 82, .24);
	}

	.ta-primary-nav .menu-item-has-children > a,
	.ta-primary-nav .ta-nav-group-title {
		padding: 8px 12px 5px;
		color: var(--ta-gold-light) !important;
		font-size: .78rem;
		font-weight: 700;
		letter-spacing: .15em;
		text-transform: uppercase;
		cursor: default;
	}

	.ta-primary-nav .sub-menu {
		margin-top: 2px;
	}

	.ta-primary-nav .sub-menu a {
		padding: 8px 12px;
		border: 0;
		color: #eee2cd;
		font-family: var(--ta-serif);
		font-size: .92rem;
		letter-spacing: .025em;
		text-transform: none;
	}
}

@media (min-width: 1081px) {
	.ta-primary-nav {
		pointer-events: auto;
	}
}

@media (max-width: 820px) {
	.ta-gallery.ta-gallery--polished {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 9px;
	}
}

@media (max-width: 600px) {
	.ta-gallery.ta-gallery--polished {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 7px;
	}

	.ta-gallery-lightbox {
		padding: 58px 10px 22px;
	}

	.ta-gallery-lightbox[open] {
		grid-template-columns: 46px minmax(0, 1fr) 46px;
		gap: 6px;
	}

	.ta-gallery-lightbox__close,
	.ta-gallery-lightbox__prev,
	.ta-gallery-lightbox__next {
		width: 42px;
		height: 42px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ta-gallery.ta-gallery--polished img {
		transition: none;
	}
}

