/* Towerland Wilderness — main stylesheet
   Tokens reproduce the old Elementor kit: green #C0CF8E headings/links, grey text,
   translucent beige boxes on the botanical "fabric" background, Roboto. */

@font-face {
	font-family: "Roboto";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("../fonts/roboto-var.woff2") format("woff2");
}
@font-face {
	font-family: "Roboto";
	font-style: italic;
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/roboto-italic.woff2") format("woff2");
}

:root {
	--green: #c0cf8e;
	--green-dark: #a3b56a;
	--green-deep: #7f9440;
	--accent: #e85c5d;
	--accent-dark: #d04647;
	--text: #6b6b6b;
	--text-strong: #54595f;
	--bg: #fbf3ea;
	--box: rgba(46, 47, 48, 0.08);
	--panel: rgba(255, 255, 255, 0.9);
	--line: rgba(46, 47, 48, 0.12);
	--radius: 4px;
	--container: 1040px;
	--font: "Roboto", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
	--ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

body {
	margin: 0;
	font-family: var(--font);
	font-size: 1.0625rem;
	line-height: 1.65;
	color: var(--text);
	background: var(--bg) url("../img/fabric.jpg") no-repeat center center;
	background-size: cover;
	background-attachment: fixed;
	min-height: 100vh;
	-webkit-font-smoothing: antialiased;
}
@media (max-width: 900px) {
	body { background-attachment: scroll; background-size: auto 100vh; }
}

img, svg, video { max-width: 100%; height: auto; }
a { color: var(--green-deep); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover, a:focus-visible { color: var(--green-dark); }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; border-radius: 2px; }

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font);
	color: var(--green);
	line-height: 1.25;
	margin: 0 0 0.6em;
	text-wrap: balance;
}
h1 { font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.25rem); font-weight: 600; text-align: center; }
h2 { font-size: clamp(1.4rem, 1.2rem + 1vw, 1.75rem); font-weight: 500; }
h3 { font-size: 1.25rem; font-weight: 500; }
h4, h5, h6 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }
strong { color: var(--text-strong); }
hr, .wp-block-separator { border: 0; border-top: 1px solid var(--line); margin: 2rem auto; width: 100%; }
ul, ol { padding-left: 1.4em; margin: 0 0 1.1em; }
blockquote, .wp-block-quote { margin: 1.5em 0; padding: 0.2em 0 0.2em 1.2em; border-left: 3px solid var(--green); font-style: italic; }
.wp-block-quote cite { display: block; font-style: normal; font-size: 0.9em; margin-top: 0.5em; }
table { border-collapse: collapse; width: 100%; }
th, td { padding: 0.5em 0.7em; border-bottom: 1px solid var(--line); text-align: left; }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 10000; width: auto; height: auto; clip: auto; clip-path: none; padding: 0.6em 1em; background: #fff; color: var(--text-strong); border-radius: var(--radius); box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2); }

/* ---- Layout ---- */
.site { max-width: var(--container); margin: 0 auto; padding: 0 6px; }
/* Wider content box on large screens (the old 1040px box left a lot of empty background on big monitors). */
@media (min-width: 1400px) { .site { --container: 1240px; } body { font-size: 1.125rem; } }
@media (min-width: 1800px) { .site { --container: 1400px; } }
.site-main { padding-bottom: 10px; }

.box {
	background: var(--box);
	border-radius: var(--radius);
	padding: 40px 30px;
	margin: 10px 10px 14px;
}
.box.is-centered { text-align: center; }
@media (max-width: 640px) {
	.site { padding: 0; }
	.box { padding: 28px 18px; margin: 8px 8px 12px; }
}

.is-unboxed { margin: 10px 10px 14px; }
.is-unboxed .entry-content > .wp-block-group.box { margin: 0; }
.is-unboxed .entry-content > .wp-block-gallery.is-style-slides { margin: 0 0 10px; }
@media (max-width: 640px) { .is-unboxed { margin: 8px 8px 12px; } }

/* ---- Header ---- */
.site-header { text-align: center; padding: 14px 10px 6px; }
.site-branding { margin: 0 auto; max-width: 482px; }
.site-branding .custom-logo-link { display: inline-block; }
.site-branding img { display: block; width: 100%; height: auto; }

.site-nav { position: relative; margin-top: 12px; }
.menu, .sub-menu { list-style: none; margin: 0; padding: 0; }
.menu { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; }
.menu > li { position: relative; display: flex; align-items: center; }
.menu a {
	display: block;
	padding: 12px 20px;
	font-size: 0.95rem;
	line-height: 1.2;
	color: var(--text);
	position: relative;
	white-space: nowrap;
}
.menu > li > a::after {
	content: "";
	position: absolute;
	left: 20px; right: 20px; bottom: 6px;
	height: 2px;
	background: var(--green);
	transform: scaleX(0);
	transform-origin: center;
	transition: transform 0.25s var(--ease);
}
.menu > li:hover > a, .menu > li > a:focus-visible, .menu > li.is-active > a, .menu > li > a[aria-current] { color: var(--green-deep); }
.menu > li:hover > a::after, .menu > li.is-active > a::after, .menu > li > a[aria-current]::after { transform: scaleX(1); }

.submenu-toggle {
	appearance: none; background: none; border: 0; padding: 0 10px 0 0; margin-left: -14px;
	color: var(--text); cursor: pointer; display: inline-flex; align-items: center; height: 40px;
	transition: transform 0.25s var(--ease), color 0.2s;
}
.submenu-toggle svg { transition: transform 0.25s var(--ease); }
.menu > li:hover .submenu-toggle, .menu > li.is-active .submenu-toggle { color: var(--green-deep); }
.submenu-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

.sub-menu {
	position: absolute;
	top: 100%; left: 8px;
	min-width: 210px;
	background: var(--panel);
	border-radius: var(--radius);
	box-shadow: 0 8px 28px rgba(46, 47, 48, 0.16);
	padding: 6px 0;
	z-index: 50;
	opacity: 0; visibility: hidden; transform: translateY(6px);
	transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0s 0.2s;
	text-align: left;
}
.sub-menu a { color: var(--text-strong); padding: 10px 18px; font-size: 0.92rem; white-space: normal; }
.sub-menu a:hover, .sub-menu a:focus-visible, .sub-menu a[aria-current] { background: var(--green); color: #fff; }
.menu > li:hover > .sub-menu, .menu > li:focus-within > .sub-menu, .menu > li.is-open > .sub-menu {
	opacity: 1; visibility: visible; transform: translateY(0); transition-delay: 0s;
}

.menu-toggle {
	display: none;
	appearance: none; border: 1px solid var(--line); background: var(--panel); color: var(--text-strong);
	border-radius: var(--radius); padding: 8px 14px; margin: 0 auto; cursor: pointer; font: inherit; font-size: 0.95rem;
	align-items: center; gap: 10px;
}
.menu-toggle__bars { display: inline-flex; flex-direction: column; gap: 4px; }
.menu-toggle__bars i { display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px; transition: transform 0.25s var(--ease), opacity 0.2s; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars i:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 900px) {
	.menu-toggle { display: inline-flex; }
	.menu {
		display: none;
		flex-direction: column;
		align-items: stretch;
		background: var(--panel);
		border-radius: var(--radius);
		box-shadow: 0 8px 28px rgba(46, 47, 48, 0.16);
		margin: 10px 4px 0;
		padding: 6px 0;
		text-align: left;
	}
	.site-nav.is-open .menu { display: flex; }
	.menu > li { flex-wrap: wrap; }
	.menu > li > a { flex: 1; padding: 12px 18px; white-space: normal; }
	.menu > li > a::after { display: none; }
	.menu > li.is-active > a, .menu > li > a[aria-current] { color: var(--green-deep); font-weight: 500; }
	.submenu-toggle { margin: 0; padding: 0 18px; height: 44px; }
	.sub-menu {
		position: static; display: none; opacity: 1; visibility: visible; transform: none;
		box-shadow: none; background: rgba(46, 47, 48, 0.05); border-radius: 0; width: 100%; padding: 4px 0;
	}
	.menu > li.is-open > .sub-menu { display: block; }
	.menu > li:hover > .sub-menu:not(.force) { }
	.menu > li:not(.is-open):hover > .sub-menu, .menu > li:not(.is-open):focus-within > .sub-menu { display: none; }
	.sub-menu a { padding: 10px 18px 10px 34px; }
}

/* ---- Sub-navigation (Sense of Place / Venue sections) ---- */
.subnav { margin: -0.2rem 0 1.4rem; }
.entry-content > h1 + .subnav { margin-top: -0.2rem; }
.subnav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px; }
.subnav a { display: block; padding: 8px 14px; font-size: 0.95rem; color: var(--text); position: relative; }
.subnav a::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px; background: var(--green); transform: scaleX(0); transition: transform 0.25s var(--ease); }
.subnav a:hover, .subnav a:focus-visible, .subnav .is-current a { color: var(--green-deep); }
.subnav a:hover::after, .subnav .is-current a::after { transform: scaleX(1); }

/* ---- Entry ---- */
.entry-header { text-align: center; margin-bottom: 1.5rem; }
.entry-meta { font-size: 0.85rem; color: var(--text); opacity: 0.8; text-align: center; margin-top: -0.4rem; }
.entry-content > * + * { margin-top: 1.1em; }
.entry-content > h1 { margin-top: 0; }
.entry-content > h2, .entry-content > h3 { margin-top: 1.6em; }
.entry-content h1 + .subnav { margin-top: 0; }
.entry-content > .wp-block-gallery, .entry-content > .wp-block-image, .entry-content > .wp-block-media-text, .entry-content > .wp-block-columns { margin-top: 1.4em; margin-bottom: 1.4em; }
.entry-content > p + .wp-block-gallery { margin-top: 1.2em; }
.has-text-align-center { text-align: center; }
.has-text-align-right { text-align: right; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignleft { float: left; margin: 0.3em 1.5em 1em 0; }
.alignright { float: right; margin: 0.3em 0 1em 1.5em; }
.alignwide, .alignfull { margin-left: 0; margin-right: 0; }
figure { margin: 0; }
figcaption, .wp-element-caption { font-size: 0.85rem; color: var(--text); opacity: 0.85; text-align: center; margin-top: 0.5em; }

/* Palette classes (theme.json) */
.has-green-color { color: var(--green); } .has-green-background-color { background-color: var(--green); }
.has-accent-color { color: var(--accent); } .has-accent-background-color { background-color: var(--accent); }
.has-text-color { color: var(--text); } .has-white-color { color: #fff; } .has-white-background-color { background-color: #fff; }
.has-secondary-color { color: var(--text-strong); }

/* ---- Images & galleries ---- */
.wp-block-image img { border-radius: var(--radius); display: block; }
.wp-block-image.is-resized img { height: auto; }
.wp-block-image a img, .tw-gallery a img { transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease); }
.wp-block-image a:hover img { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(46, 47, 48, 0.18); }

.tw-gallery { --wp--style--gallery-gap-default: 16px; gap: 16px; }
.wp-block-gallery.has-nested-images { display: flex; flex-wrap: wrap; gap: 16px; align-items: stretch; }
.wp-block-gallery.has-nested-images figure.wp-block-image { margin: 0; display: flex; flex-direction: column; flex-grow: 1; width: calc((100% - 32px) / 3); }
.wp-block-gallery.has-nested-images figure.wp-block-image > a, .wp-block-gallery.has-nested-images figure.wp-block-image > img { flex: 1; display: block; }
.wp-block-gallery.has-nested-images figure.wp-block-image img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }
.wp-block-gallery.has-nested-images figure.wp-block-image figcaption { flex: 0 0 auto; }
.wp-block-gallery.columns-1 figure.wp-block-image { width: 100%; }
.wp-block-gallery.columns-2 figure.wp-block-image { width: calc((100% - 16px) / 2); }
.wp-block-gallery.columns-3 figure.wp-block-image { width: calc((100% - 32px) / 3); }
.wp-block-gallery.columns-4 figure.wp-block-image { width: calc((100% - 48px) / 4); }
.wp-block-gallery.columns-5 figure.wp-block-image { width: calc((100% - 64px) / 5); }
.wp-block-gallery.columns-6 figure.wp-block-image { width: calc((100% - 80px) / 6); }
.wp-block-gallery.is-cropped figure.wp-block-image > a, .wp-block-gallery.is-cropped figure.wp-block-image > img { aspect-ratio: 4 / 3; }
.wp-block-gallery.is-cropped figure.wp-block-image > a > img { height: 100%; }
.tw-gallery a { display: block; overflow: hidden; border-radius: var(--radius); }
.tw-gallery a:hover img, .tw-gallery a:focus-visible img { transform: scale(1.03); }
@media (max-width: 640px) {
	.wp-block-gallery.has-nested-images { gap: 10px; }
	.wp-block-gallery.columns-3 figure.wp-block-image, .wp-block-gallery.columns-4 figure.wp-block-image, .wp-block-gallery.columns-5 figure.wp-block-image, .wp-block-gallery.columns-6 figure.wp-block-image { width: calc((100% - 10px) / 2); }
	.wp-block-gallery.columns-3.is-style-tiles figure.wp-block-image:last-child:nth-child(odd) { width: 100%; }
}

/* ---- Slideshow (gallery block, "Slideshow" style) ---- */
.wp-block-gallery.is-style-slides, .wp-block-gallery.is-style-slides.is-layout-flex {
	display: block !important;
	position: relative;
	height: 320px;
	border: 15px solid var(--panel);
	border-radius: var(--radius);
	background: var(--panel);
	overflow: hidden;
	margin: 0 0 14px;
}
.wp-block-gallery.is-style-slides figure.wp-block-image {
	position: absolute; inset: 0; width: 100% !important; height: 100%; margin: 0; display: block;
	opacity: 0; transition: opacity 1.2s var(--ease);
}
.wp-block-gallery.is-style-slides figure.wp-block-image.is-active { opacity: 1; z-index: 1; }
.wp-block-gallery.is-style-slides figure.wp-block-image img, .wp-block-gallery.is-style-slides figure.wp-block-image a { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.wp-block-gallery.is-style-slides figure.wp-block-image img { transform: scale(1); transition: transform 7s linear; }
.wp-block-gallery.is-style-slides figure.wp-block-image.is-active img { transform: scale(1.04); }
.wp-block-gallery.is-style-slides figcaption {
	position: absolute; right: 0; top: 0; bottom: 0; width: 40%; max-width: 380px; margin: 0;
	display: flex; align-items: center; justify-content: flex-end; text-align: right;
	padding: 0 55px 0 30px; opacity: 1;
	background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.75) 35%, rgba(255, 255, 255, 0.9) 100%);
	color: var(--green); font-size: 2em; font-weight: 500; line-height: 1.3;
}
.wp-block-gallery.is-style-slides figcaption > span { display: block; max-width: 200px; }
.tw-slides__nav {
	position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
	width: 44px; height: 44px; border: 0; border-radius: 50%; cursor: pointer;
	background: rgba(255, 255, 255, 0.55); color: var(--text-strong);
	display: grid; place-items: center; transition: background 0.2s;
}
.tw-slides__nav:hover { background: rgba(255, 255, 255, 0.9); }
.tw-slides__nav--prev { left: 10px; } .tw-slides__nav--next { right: 10px; }
.tw-slides__dots { position: absolute; left: 0; right: 0; bottom: 10px; z-index: 3; display: flex; justify-content: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tw-slides__dots button { width: 10px; height: 10px; border-radius: 50%; border: 0; padding: 0; background: rgba(255, 255, 255, 0.7); cursor: pointer; }
.tw-slides__dots button[aria-current="true"] { background: var(--green-deep); }
@media (max-width: 640px) {
	.wp-block-gallery.is-style-slides { height: 260px; border-width: 8px; }
	.wp-block-gallery.is-style-slides figcaption { width: 60%; font-size: 1.35em; padding: 0 20px 0 16px; background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.85) 30%, rgba(255, 255, 255, 0.95) 100%); }
}

/* ---- Buttons ---- */
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.wp-block-buttons.is-content-justification-right { justify-content: flex-end; }
.wp-block-buttons.is-content-justification-center { justify-content: center; }
.wp-block-button__link, .tw-button {
	display: inline-block;
	background: var(--green);
	color: #fff;
	font: inherit;
	font-size: 0.95rem;
	font-weight: 500;
	padding: 0.7em 1.5em;
	border: 0;
	border-radius: var(--radius);
	cursor: pointer;
	line-height: 1.2;
	text-align: center;
	transition: background 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.wp-block-button__link:hover, .tw-button:hover, .wp-block-button__link:focus-visible, .tw-button:focus-visible { background: var(--green-dark); color: #fff; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(46, 47, 48, 0.15); }
.wp-block-button__link.has-accent-background-color { background: var(--accent); }
.wp-block-button__link.has-accent-background-color:hover { background: var(--accent-dark); }
.is-style-outline .wp-block-button__link { background: transparent; border: 2px solid var(--green); color: var(--green-deep); }
.is-style-outline .wp-block-button__link:hover { background: var(--green); color: #fff; }
.wp-block-button.is-full-width, .wp-block-button.is-full-width .wp-block-button__link { width: 100%; display: block; }

/* ---- Columns / media-text ---- */
.wp-block-columns { display: flex; gap: 24px; flex-wrap: wrap; }
.wp-block-column { flex: 1 1 0; min-width: 0; }
@media (max-width: 700px) { .wp-block-columns { flex-direction: column; } .wp-block-column { flex-basis: auto !important; } }
.wp-block-media-text { display: grid; grid-template-columns: 50% 1fr; gap: 24px; align-items: start; }
.wp-block-media-text.has-media-on-the-right { grid-template-columns: 1fr 50%; }
.wp-block-media-text.has-media-on-the-right .wp-block-media-text__media { order: 2; }
.wp-block-media-text.is-vertically-aligned-center { align-items: center; }
.wp-block-media-text__media img { width: 100%; border-radius: var(--radius); display: block; }
@media (max-width: 700px) { .wp-block-media-text, .wp-block-media-text.has-media-on-the-right { grid-template-columns: 1fr; } .wp-block-media-text.has-media-on-the-right .wp-block-media-text__media { order: 0; } }

/* ---- File / PDF block ---- */
.wp-block-file { margin: 1.4em 0; }
.wp-block-file object, .wp-block-file iframe { width: 100%; height: min(80vh, 900px); border-radius: var(--radius); background: #fff; margin-bottom: 0.6em; }
.wp-block-file a { font-weight: 500; }
.wp-block-file__button { margin-left: 0.6em; }

/* ---- Embeds ---- */
.wp-block-embed__wrapper { position: relative; }
.wp-embed-responsive .wp-has-aspect-ratio .wp-block-embed__wrapper::before { content: ""; display: block; padding-top: 56.25%; }
.wp-embed-responsive .wp-has-aspect-ratio iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---- Contact form ---- */
.tw-contact { max-width: 560px; margin: 0 auto; text-align: left; }
.tw-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.tw-field { margin-bottom: 1rem; }
.tw-field label { display: block; font-size: 0.92rem; font-weight: 500; color: var(--text-strong); margin-bottom: 0.35em; }
.tw-field .req { color: var(--accent); }
.tw-form input[type="text"], .tw-form input[type="email"], .tw-form textarea {
	width: 100%; font: inherit; color: var(--text-strong);
	padding: 0.65em 0.8em; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
	transition: border-color 0.2s, box-shadow 0.2s;
}
.tw-form input:focus, .tw-form textarea:focus { outline: 0; border-color: var(--green); box-shadow: 0 0 0 3px rgba(192, 207, 142, 0.35); }
.tw-form textarea { resize: vertical; min-height: 160px; }
.tw-notice { padding: 0.8em 1em; border-radius: var(--radius); margin-bottom: 1.2rem; background: var(--panel); border-left: 4px solid var(--green); }
.tw-notice.is-error { border-left-color: var(--accent); }

/* ---- Posts list ---- */
.post-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin-top: 1.5rem; }
.post-card { background: var(--panel); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.post-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(46, 47, 48, 0.15); }
.post-card__image img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.post-card__body { padding: 18px 20px 22px; }
.post-card__title { font-size: 1.2rem; margin: 0 0 0.3em; }
.post-card .entry-meta { text-align: left; margin: 0 0 0.6em; }
.post-nav { display: flex; justify-content: space-between; gap: 20px; padding: 18px 30px; }
.post-nav__next { margin-left: auto; }
.pagination { margin-top: 2rem; text-align: center; }
.pagination .nav-links { display: inline-flex; gap: 6px; }
.pagination .page-numbers { display: inline-block; padding: 0.4em 0.8em; border-radius: var(--radius); background: var(--panel); }
.pagination .page-numbers.current { background: var(--green); color: #fff; }

/* ---- Footer ---- */
.site-footer {
	background: var(--panel);
	border-radius: var(--radius);
	margin: 0 10px 20px;
	padding: 14px 20px;
	text-align: center;
	font-size: 0.95rem;
	color: rgba(122, 122, 122, 0.85);
}

/* ---- Lightbox ---- */
.tw-lightbox {
	position: fixed; inset: 0; z-index: 9999;
	background: rgba(20, 22, 18, 0.92);
	display: flex; align-items: center; justify-content: center;
	opacity: 0; transition: opacity 0.25s var(--ease);
	padding: 0; margin: 0; border: 0; max-width: none; max-height: none; width: 100%; height: 100%; color: #fff;
}
.tw-lightbox:not([open]) { display: none; }
.tw-lightbox[open] { opacity: 1; }
.tw-lightbox::backdrop { background: transparent; }
.tw-lightbox__figure { margin: 0; max-width: min(96vw, 1400px); max-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.tw-lightbox__img { max-width: 96vw; max-height: 86vh; object-fit: contain; border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); background: #222; }
.tw-lightbox__caption { color: rgba(255, 255, 255, 0.85); margin-top: 12px; font-size: 0.95rem; opacity: 1; }
.tw-lightbox__caption:empty { display: none; }
.tw-lightbox__btn {
	position: absolute; top: 50%; transform: translateY(-50%);
	width: 48px; height: 48px; border: 0; border-radius: 50%; cursor: pointer;
	background: rgba(255, 255, 255, 0.12); color: #fff; display: grid; place-items: center; transition: background 0.2s;
}
.tw-lightbox__btn:hover { background: rgba(255, 255, 255, 0.28); }
.tw-lightbox__btn--prev { left: 14px; } .tw-lightbox__btn--next { right: 14px; }
.tw-lightbox__btn--close { top: 14px; right: 14px; transform: none; }
.tw-lightbox__count { position: absolute; top: 24px; left: 20px; font-size: 0.9rem; color: rgba(255, 255, 255, 0.7); }
body.tw-lightbox-open { overflow: hidden; }
@media (max-width: 640px) {
	.tw-lightbox__btn--prev, .tw-lightbox__btn--next { top: auto; bottom: 16px; transform: none; }
}
