/*
Theme Name: ARB Exhibits
Theme URI: https://libapps.libraries.uc.edu/exhibits/
Description: A restrained, archival-style child theme for the Archives and Rare Books Library exhibits index. Built on Twenty Twelve and designed to preserve the Multisite Site Index [site-index] shortcode while presenting exhibit sites as responsive cards with curated or automatic thumbnails.
Author: UC Libraries
Template: twentytwelve
Version: 1.2.0
Text Domain: arb-exhibits
*/

/* ==========================================================
   ARB Exhibits child theme
   Parent theme: Twenty Twelve
   ========================================================== */

:root {
	--arb-red: #e00122;
	--arb-red-dark: #b8011c;
	--arb-ink: #242424;
	--arb-muted: #66645f;
	--arb-line: #dedbd4;
	--arb-paper: #fffefa;
	--arb-page: #f3f0ea;
	--arb-soft: #f7f5f0;
}

/* ---------- Page shell ---------- */
html {
	background: var(--arb-page);
}

body,
body.custom-background {
	background-color: var(--arb-page) !important;
	background-image: none !important;
	color: var(--arb-ink);
}

body #page.site {
	box-sizing: border-box;
	max-width: 1180px;
	margin: 28px auto;
	padding: 0 56px 42px;
	background: var(--arb-paper);
	border: 0;
	box-shadow: 0 12px 36px rgba(0, 0, 0, 0.08);
	overflow: visible;
}

.wrapper {
	padding-bottom: 12px;
}

/* ---------- Masthead ---------- */
.site-header {
	padding: 42px 0 0;
}

.site-header hgroup {
	padding-bottom: 22px;
}

.site-header .site-title {
	margin: 0;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 2.15rem;
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.02em;
}

.site-header .site-title a,
.site-header .site-title a:visited {
	color: var(--arb-red-dark);
	text-decoration: none;
}

.site-header .site-title a:hover,
.site-header .site-title a:focus {
	color: var(--arb-red);
	text-decoration: underline;
	text-underline-offset: 4px;
}

.site-header .site-description {
	margin-top: 7px;
	color: var(--arb-muted);
	font-size: 0.85rem;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.header-image {
	display: block;
	width: 100%;
	max-width: none;
	height: auto;
	margin: 0;
	border: 0;
	box-shadow: none !important;
}

/* ---------- Primary navigation ---------- */
.main-navigation {
	margin: 0 0 22px;
	border-top: 1px solid var(--arb-line);
	border-bottom: 1px solid var(--arb-line);
}

.main-navigation ul.nav-menu,
.main-navigation div.nav-menu > ul {
	border: 0;
}

.main-navigation li {
	margin-right: 34px;
}

.main-navigation li a {
	padding: 1px 0;
	color: #53514d;
	font-size: 0.76rem;
	font-weight: 700;
	letter-spacing: 0.055em;
	text-transform: uppercase;
}

.main-navigation li a:hover,
.main-navigation li a:focus,
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a {
	color: var(--arb-red-dark);
}

/* ---------- Main page layout ---------- */
.home #primary.site-content,
.home #secondary.widget-area {
	float: none;
	width: 100%;
}

.home #primary.site-content {
	margin-top: 38px;
}

.home .site-content article {
	border-bottom: 0;
	margin-bottom: 0;
	padding-bottom: 0;
}

.entry-header {
	margin-bottom: 22px;
}

.entry-header .entry-title {
	font-family: Georgia, "Times New Roman", serif;
	font-size: 2rem;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.015em;
	color: var(--arb-ink);
}

.entry-content,
.entry-summary,
.mu_register {
	font-size: 1rem;
	line-height: 1.72;
}

.entry-content p {
	margin-bottom: 1.25rem;
}

.entry-content a,
.entry-content a:visited {
	color: #075f84;
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}

.entry-content a:hover,
.entry-content a:focus {
	color: var(--arb-red-dark);
}

/* The homepage begins with the archival-content notice. */
.home .entry-content > p:first-child {
	margin: 0 0 26px;
	padding: 17px 20px;
	background: var(--arb-soft);
	border-left: 4px solid #68645d;
	color: #373532;
	font-size: 0.94rem;
	line-height: 1.6;
}

/* ---------- Multisite Site Index ---------- */
ul.site-index,
.entry-content ul.site-index {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 22px;
	margin: 30px 0 8px;
	padding: 0;
	list-style: none;
	overflow: visible;
}

/* Important: the plugin uses .site on every list item. These rules are
   deliberately specific so Twenty Twelve's outer .site styles do not leak
   into the individual exhibit cards. */
.site-index .site,
body .site-index .site {
	box-sizing: border-box;
	float: none;
	width: auto;
	max-width: none;
	min-width: 0;
	margin: 0;
	--arb-card-pad: 25px;
	padding: 0 var(--arb-card-pad) 22px;
	background: #fff;
	border: 1px solid var(--arb-line);
	border-top: 4px solid var(--arb-red);
	border-radius: 2px;
	box-shadow: 0 3px 12px rgba(0, 0, 0, 0.055);
	overflow: hidden;
	transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

/* Visual added by the child theme to the plugin's existing cards. */
.arb-exhibit-thumbnail {
	display: block;
	width: calc(100% + (2 * var(--arb-card-pad)));
	aspect-ratio: 16 / 9;
	margin: 0 calc(-1 * var(--arb-card-pad)) 20px;
	background: #ece8df;
	border-bottom: 1px solid var(--arb-line);
	overflow: hidden;
	text-decoration: none !important;
}

.arb-exhibit-thumbnail img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	border: 0;
	box-shadow: none !important;
	object-fit: cover;
	transition: transform 220ms ease;
}

.site-index .site:hover .arb-exhibit-thumbnail--header img,
.site-index .site:focus-within .arb-exhibit-thumbnail--header img {
	transform: scale(1.025);
}

/*
 * Curated images come in many shapes: banners, portraits, square scans, and
 * historic photographs. Preserve the complete image instead of forcing a crop.
 * A softly blurred copy fills the unused space so every card still has a
 * consistent visual frame.
 */
.arb-exhibit-thumbnail--manual {
	position: relative;
	background-color: #e9e5dd;
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
}

.arb-exhibit-thumbnail--manual::before {
	content: "";
	position: absolute;
	inset: -12px;
	background-image: inherit;
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
	filter: blur(11px);
	opacity: 0.24;
	transform: scale(1.06);
}

.arb-exhibit-thumbnail--manual::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(255, 254, 250, 0.12);
}

.arb-exhibit-thumbnail--manual img {
	position: relative;
	z-index: 1;
	object-fit: contain;
}

.site-index .site:hover .arb-exhibit-thumbnail--manual img,
.site-index .site:focus-within .arb-exhibit-thumbnail--manual img {
	transform: scale(1.012);
}

/* Site icons are a secondary fallback, so preserve the whole icon instead of cropping it. */
.arb-exhibit-thumbnail--icon {
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--arb-soft);
}

.arb-exhibit-thumbnail--icon img {
	width: min(44%, 150px);
	height: min(70%, 150px);
	object-fit: contain;
}

/* Neutral fallback for sites with neither a header image nor a site icon. */
.arb-exhibit-thumbnail--fallback {
	display: flex;
	align-items: stretch;
	background:
		linear-gradient(135deg, rgba(224, 1, 34, 0.08), transparent 42%),
		linear-gradient(0deg, #eeebe4, #f8f6f1);
}

.arb-exhibit-thumbnail-fallback {
	display: flex;
	flex: 1;
	flex-direction: column;
	justify-content: flex-end;
	padding: 24px;
	border-left: 5px solid var(--arb-red);
	color: #3f3b36;
}

.arb-exhibit-thumbnail-kicker {
	margin-bottom: 5px;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.arb-exhibit-thumbnail-label {
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.25;
}


.site-index .site:hover,
.site-index .site:focus-within {
	transform: translateY(-2px);
	border-color: #c9c5bd;
	border-top-color: var(--arb-red-dark);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.09);
}

.site-index-site-icon {
	display: none !important;
}

.site-index-site-title {
	display: block;
	margin: 0 0 9px;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1.15rem;
	font-weight: 700;
	line-height: 1.35;
}

.site-index-site-title a,
a.site-index-site-title,
.site-index .site > a:first-of-type {
	color: #145f7d;
	text-decoration: none;
}

.site-index-site-title a:hover,
.site-index-site-title a:focus,
a.site-index-site-title:hover,
a.site-index-site-title:focus,
.site-index .site > a:first-of-type:hover,
.site-index .site > a:first-of-type:focus {
	color: var(--arb-red-dark);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.site-index-site-tagline {
	display: block;
	margin-top: 4px;
	color: #55524d;
	font-size: 0.9rem;
	font-style: normal;
	line-height: 1.58;
}

/* ---------- Main sidebar becomes a collection footer on the homepage ---------- */
.home #secondary.widget-area {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 28px 46px;
	margin-top: 52px;
	padding: 32px 0 0;
	border-top: 1px solid var(--arb-line);
}

.home #secondary .widget {
	margin: 0;
}

.home #secondary .widget h3 {
	margin: 0 0 13px;
	color: var(--arb-ink);
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1.1rem;
	font-weight: 700;
}

.home #secondary .widget p,
.home #secondary .widget li,
.home #secondary .widget .textwidget {
	font-size: 0.9rem;
	line-height: 1.65;
}

.home #secondary .widget a,
.home #secondary .widget a:visited {
	color: #5d5a55;
}

.home #secondary .widget a:hover,
.home #secondary .widget a:focus {
	color: var(--arb-red-dark);
}

.home #secondary .widget img {
	box-shadow: none !important;
}

/* ---------- Footer ---------- */
footer[role="contentinfo"] {
	max-width: none;
	margin-top: 42px;
	padding: 24px 0 0;
	border-top: 1px solid var(--arb-line);
	color: #77736c;
}

footer[role="contentinfo"] a,
footer[role="contentinfo"] a:visited {
	color: #68645d;
}

/* ---------- Images ---------- */
.entry-content img,
.comment-content img,
.widget img,
img.header-image,
.author-avatar img,
img.wp-post-image {
	box-shadow: none;
}

/* ---------- Responsive ---------- */
@media screen and (max-width: 959px) {
	body #page.site {
		margin: 0 auto;
		padding: 0 34px 34px;
		box-shadow: none;
	}

	.site-header {
		padding-top: 30px;
	}
}

@media screen and (max-width: 720px) {
	body #page.site {
		padding-left: 22px;
		padding-right: 22px;
	}

	ul.site-index,
	.entry-content ul.site-index,
	.home #secondary.widget-area {
		grid-template-columns: 1fr;
	}

	.site-index .site,
	body .site-index .site {
		--arb-card-pad: 20px;
		padding: 0 var(--arb-card-pad) 21px;
	}

	.site-header .site-title {
		font-size: 1.75rem;
	}

	.entry-header .entry-title {
		font-size: 1.7rem;
	}
}

@media screen and (max-width: 599px) {
	.site-header h1,
	.site-header h2 {
		text-align: left;
	}

	.main-navigation {
		padding: 10px 0;
	}

	.menu-toggle {
		margin: 0;
		padding: 8px 12px;
		background: #fff;
		border: 1px solid var(--arb-line);
		border-radius: 2px;
		color: var(--arb-ink);
		font-weight: 700;
	}

	.main-navigation ul.nav-menu.toggled-on {
		padding-top: 8px;
	}

	.main-navigation li {
		margin-top: 10px;
	}
}

/* ---------- Print ---------- */
@media print {
	body #page.site {
		max-width: none;
		margin: 0;
		padding: 0;
		box-shadow: none;
	}

	.site-index .site,
	body .site-index .site {
		break-inside: avoid;
		box-shadow: none;
	}
}
