/* Responsive layout, 2026
 *
 * The page is fluid up to a maximum width, with a main column and a 230px side bar that stack on small screens.
 * The dotted rules reuse the original dot images.
 */

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body {
	margin: 20px 0 10px;
}

img {
	max-width: 100%;
	height: auto;
}

/* Page frame */

#page {
	box-sizing: border-box;
	max-width: 1102px;
	margin: 0 auto;
	padding: 0 10px;
	text-align: left;
}

#frame {
	padding: 1px;
	background:
		url(img/dots_720.gif) repeat-x 0 0,
		url(img/dots_720.gif) repeat-x 0 100%,
		url(img/dots_v.gif) repeat-y 0 0,
		url(img/dots_v.gif) repeat-y 100% 0;
}

/* ferner.css sets the base text style on td, so set it here for content that is not in a table */
#content, #footer {
	font-family: Verdana, Arial, sans-serif;
	font-size: 13px;
	line-height: 20px;
	color: #666666;
}

#content p {
	margin: 0 0 1em;
}

#footer {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 10px 20px;
	padding-top: 10px;
}

.footer-links {
	text-align: right;
}

.key {
	padding: 1px 10px 0;
	background: url(img/dots_720.gif) repeat-x 0 0;
}

.key img {
	display: block;
}

/* Header: the logo is the left of the original header image, the nav and search are HTML */

#header {
	position: relative;
	width: auto;
	height: 140px;
	background: #efeee8;
}

#header h1 {
	position: relative;
	width: 274px;
	height: 140px;
	margin: 0;
	overflow: hidden;
	text-indent: -999em;
	font-size: 1px;
	background: url(img/2006/ferner_hdr.gif) no-repeat 0 0;
}

#header h1 a {
	position: absolute;
	inset: 0;
}

#header-tools {
	position: absolute;
	top: 0;
	right: 0;
	width: 446px;
	height: 140px;
}

#nav {
	position: static;
	display: flex;
	width: auto;
	height: auto;
	overflow: visible;
	gap: 2px;
	margin: 0;
	padding: 0;
	list-style: none;
}

#nav li {
	flex: 0 0 110px;
}

#nav a, #nav a:link, #nav a:visited {
	display: block;
	float: none;
	width: auto;
	height: 33px;
	padding: 0;
	overflow: visible;
	line-height: 33px;
	text-align: center;
	background: #98987c;
	color: #fff;
	font-family: Michroma, Verdana, sans-serif;
	font-size: 10.5px;
	text-transform: uppercase;
	text-decoration: none;
	white-space: nowrap;
}

/* The original lettering is all capitals with a slightly larger first letter of each word */
#nav a::first-letter,
#search label span::first-letter {
	font-size: 1.15em;
}

#nav a:hover, #nav a:active, #nav a.selected {
	background: #a1182c;
}

#search {
	position: absolute;
	top: 33px;
	right: 0;
	left: auto;
	width: 222px;
	height: 70px;
	box-sizing: border-box;
	padding: 16px 22px 0;
	background: #a1182c;
}

#search label {
	display: block;
	margin-bottom: 6px;
	color: #fff;
	font-family: Michroma, Verdana, sans-serif;
	font-size: 10.5px;
	line-height: 15px;
	text-transform: uppercase;
}

#search label span {
	display: inline-block;
}

.searchbox {
	width: 130px;
	height: 15px;
	padding: 0 3px;
	border: none;
	background-color: #b55;
	color: #fff;
	vertical-align: middle;
}

.searchbox:focus {
	background-color: #fff;
	color: #666;
	outline: none;
}

#go {
	vertical-align: middle;
	margin-left: 2px;
}

/* Page layouts: two columns, or a single column */

.columns {
	display: flex;
	padding: 1px 0 0 10px;
	background: url(img/dots_720.gif) repeat-x 0 0;
}

.column-main {
	flex: 1;
	min-width: 0;
	padding: 0 15px 15px 0;
}

.column-side {
	flex: none;
	width: 230px;
	padding: 0 0 15px 10px;
	background: url(img/dots_v_top.gif) repeat-y 0 0;
}

.page-single,
.list-page {
	padding: 1px 10px 15px;
	background: url(img/dots_720.gif) repeat-x 0 0;
}

.page-single > .column-main {
	padding: 0;
	background: none;
}

.section-title {
	margin: 0 0 15px;
	line-height: 0;
}

.image-title {
	margin: 0 0 5px;
	line-height: 0;
}

/* Long-form text: larger, with a comfortable line length */
.body-text {
	max-width: 40em;
	margin: 15px 0;
	font-size: 15px;
	line-height: 1.65;
	overflow-wrap: break-word;
}

#content .body-text p {
	margin: 0 0 1em;
}

.body-text::after {
	content: "";
	display: block;
	clear: both;
}

.body-image {
	float: right;
	max-width: 45%;
	margin: 5px 0 15px 20px;
}

.body-image figcaption {
	margin-top: 6px;
}

/* An image with the original thin frame and drop shadow */
.framed-image,
.artwork-image {
	display: inline-block;
	max-width: 100%;
	box-sizing: border-box;
	padding: 2px;
	border: 1px solid #b4b4b4;
	background: #fff;
	box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.25);
	vertical-align: top;
}

.framed-image img,
.artwork-image img {
	display: block;
}

img.bordercontrol {
	border: 1px solid #8899aa;
}

.plain-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Side bar */

.side-title {
	margin: 0;
	line-height: 0;
}

.side-title-plain {
	margin-top: 15px;
}

.side-body {
	padding: 0 15px;
	background: url(img/2006/side_bg.jpg) no-repeat 0 0;
}

.side-body-plain {
	background: none;
}

.side-body h4 {
	margin-top: 10px;
}

.side-list li {
	padding: 3px 0;
}

.side-more {
	padding: 10px 15px 0;
}

.side-news p {
	margin: 0 0 1em;
}

.side-artwork-image {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	width: fit-content;
	padding-top: 10px;
}

.side-artwork-image img {
	display: block;
}

.side-artwork-caption {
	padding-top: 3px;
}

/* Artwork */

.artwork-artists {
	margin-bottom: 20px;
}

.artwork-figure {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 6px 10px;
	margin-bottom: 10px;
}

.artwork-icons {
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.artwork-icons img {
	display: block;
}

.artwork-details {
	padding-bottom: 10px;
}

/* Exhibitions */

.exhibition-tabs {
	display: flex;
	flex-wrap: wrap;
	margin-bottom: 20px;
	line-height: 0;
}

.exhibition {
	padding-bottom: 20px;
}

.exhibition + .exhibition {
	padding-top: 20px;
	background: url(img/dots_720.gif) repeat-x 0 0;
}

.exhibition-details {
	margin-bottom: 10px;
}

/* News */

.news-item {
	padding-bottom: 20px;
}

.news-item + .news-item {
	padding-top: 5px;
	background: url(img/dots_720.gif) repeat-x 0 0;
}

.news-item::after {
	content: "";
	display: block;
	clear: both;
}

.news-date {
	margin: -5px 0 10px;
}

/* Galleries */

.galleries {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 30px;
}

.gallery-heading {
	margin: 10px 0;
}

.gallery-map img {
	display: block;
}

/* Contact */

.contact-galleries {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 0 20px;
	margin: 10px 0;
}

.form-messages {
	margin-bottom: 1em;
}

.form-grid {
	display: grid;
	grid-template-columns: max-content minmax(0, 1fr);
	align-items: start;
	gap: 10px 12px;
	max-width: 560px;
}

.form-grid > label,
.form-label {
	padding-top: 4px;
}

.form-heading {
	grid-column: 1 / -1;
	margin-top: 5px;
	font-weight: bold;
}

.form-grid input[type=text],
.form-grid textarea {
	box-sizing: border-box;
	width: 100%;
	padding: 4px 6px;
	border: 1px solid #b4b4b4;
}

.form-grid input[type=submit] {
	-webkit-appearance: none;
	appearance: none;
	padding: 9px 24px;
	border: none;
	border-radius: 0;
	background: #a1182c;
	color: #fff;
	font-family: Michroma, Verdana, sans-serif;
	font-size: 11px;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	cursor: pointer;
}

.form-grid input[type=submit]:hover,
.form-grid input[type=submit]:focus-visible {
	background: #841224;
}

.form-checkboxes label {
	display: block;
}

.form-checkbox-columns {
	columns: 2 160px;
	column-gap: 20px;
}

/* Publications */

.publication-columns {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 0 25px;
	margin: 20px 0;
}

.column-heading {
	margin: 0 0 10px;
	padding: 8px 0;
	border-bottom: 1px dotted #b8c3cf;
	color: #8899aa;
	font-size: 14px;
	text-align: center;
}

.publication-item {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-bottom: 12px;
}

.publication-item > a {
	flex: none;
	width: 80px;
}

.publication-item img {
	display: block;
}

/* Artists */

.artist-collections {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
	gap: 30px;
}

.artist-collection {
	display: flex;
	justify-content: space-between;
	gap: 15px;
}

.artist-collection h3 {
	margin: 0 0 5px;
	font-size: 13px;
	font-weight: normal;
}

.artist-collection-feature {
	flex: none;
	max-width: 45%;
	margin: 0;
	text-align: right;
}

.artist-collection-feature figcaption {
	margin-top: 6px;
}

/* Artworks */

.artworks-tiles {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 30px 20px;
}

.artworks-tile {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	text-align: center;
}

.artworks-tile-image {
	align-self: stretch;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	height: 252px;
	margin-bottom: 4px;
}

.artworks-tile-image:empty {
	background: #f6f6f3;
}

.artworks-tile-image .framed-image {
	max-height: 100%;
}

.artworks-tile-image img {
	max-height: 240px;
	width: auto;
}

.artworks-genres {
	align-items: stretch;
	text-align: left;
}

.artworks-genres > img {
	align-self: center;
	margin-bottom: 6px;
}

/* Homepage */

.home {
	padding: 10px 17px 0;
}

.home-title {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0 0 20px;
	color: #b5b0a5;
	font-size: 13px;
	font-weight: normal;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.home-title::before,
.home-title::after {
	content: "";
	flex: 1;
	height: 1px;
	background: url(img/dots_720.gif) repeat-x 0 0;
}

.home-features {
	display: flex;
	gap: 25px;
	padding-bottom: 20px;
}

.home-feature {
	min-width: 0;
}

.home-feature .framed-image {
	display: block;
}

.home-feature .framed-image img {
	width: 100%;
}

.home-feature-caption {
	display: flex;
	align-items: flex-start;
	gap: 4px;
	margin-top: 8px;
}

.home-feature-caption > img {
	flex: none;
	margin-top: 4px;
}

.home-news {
	display: flex;
	align-items: center;
	gap: 15px;
	margin: 0 -17px;
	padding: 10px;
	background: url(img/dots_720.gif) repeat-x 0 0;
}

/* Lightbox, see ferner.js */

#lightbox {
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 0;
	border: none;
	background: rgba(24, 24, 22, 0.97);
	color: #ddd;
	cursor: zoom-out;
}

#lightbox[open] {
	display: flex;
	align-items: center;
	justify-content: center;
}

#lightbox::backdrop {
	background: transparent;
}

#lightbox figure {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin: 0;
	padding: 20px;
}

#lightbox img {
	display: block;
	max-width: calc(100vw - 40px);
	max-height: calc(100vh - 90px);
	width: auto;
	height: auto;
	background: #333;
	box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
	cursor: default;
}

#lightbox figcaption {
	margin-top: 12px;
	font-family: Verdana, Arial, sans-serif;
	font-size: 13px;
	line-height: 18px;
	text-align: center;
}

#lightbox figcaption strong {
	color: #fff;
}

.lightbox-close {
	position: absolute;
	top: 8px;
	right: 12px;
	padding: 4px 10px;
	border: none;
	background: none;
	color: #ccc;
	font-size: 32px;
	line-height: 1;
	cursor: pointer;
}

.lightbox-close:hover {
	color: #fff;
}

/* Lists of artworks, artists and search results */

.list-page .section-title {
	margin-bottom: 0;
}

.list-header,
.list-footer {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: baseline;
	gap: 5px 20px;
	padding: 10px 0;
}

.list-header {
	margin-bottom: 15px;
	background: url(img/dots_720.gif) repeat-x 0 100%;
}

.list-footer {
	margin-top: 10px;
	background: url(img/dots_720.gif) repeat-x 0 0;
}

.pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 5px 8px;
}

.list-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 25px 20px;
}

.list-item-image {
	display: flex;
	align-items: flex-end;
	aspect-ratio: 1;
	margin-bottom: 6px;
}

.list-item-image img {
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
}

.list-item-image:empty,
.list-item-icon {
	align-items: center;
	justify-content: center;
	background: #f6f6f3;
}

.list-item-more {
	margin-top: 4px;
}

.list-item-text .artwork-desc {
	display: block;
	margin-top: 2px;
}

/* Small screens */

@media (max-width: 760px) {
	body {
		margin-top: 0;
	}

	#page {
		padding: 0;
	}

	#header,
	#header-tools {
		position: static;
		width: auto;
		height: auto;
	}

	#nav li {
		flex: 1 1 0;
		min-width: 0;
	}

	#nav a, #nav a:link, #nav a:visited {
		height: 36px;
		line-height: 36px;
		font-size: 9px;
	}

	#search {
		position: static;
		display: flex;
		align-items: center;
		gap: 10px;
		width: auto;
		height: auto;
		padding: 10px;
	}

	#search label {
		margin: 0;
	}

	.searchbox {
		flex: 1;
		min-width: 0;
		width: auto;
		height: auto;
		padding: 6px 8px;
		font-size: 16px;
	}

	.columns {
		flex-direction: column;
		padding: 1px 10px 0;
	}

	.column-main {
		padding-right: 0;
	}

	.column-side {
		width: auto;
		padding-left: 0;
		padding-top: 1px;
		background: url(img/dots_720.gif) repeat-x 0 0;
	}

	.body-image {
		float: none;
		max-width: none;
		margin: 0 0 15px;
	}

	.home {
		padding: 10px 10px 0;
	}

	.home-features {
		flex-direction: column;
	}

	.home-news {
		margin: 0 -10px;
	}

	.artist-collections {
		grid-template-columns: 1fr;
	}

	.list-grid {
		grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
		gap: 20px 15px;
	}

	.form-grid {
		grid-template-columns: 1fr;
		gap: 4px;
	}

	.form-grid > div {
		margin-bottom: 8px;
	}

	.form-grid input[type=text],
	.form-grid textarea {
		font-size: 16px;
	}

	#footer {
		flex-direction: column;
		padding: 10px;
	}

	.footer-links {
		text-align: left;
	}

	.key {
		display: none;
	}
}
