/** 
 * main.css
 * 
 * 1. General HTML tags
 * 2. Masthead area
 * 3. Main content and sidebar
 * 4. Footer
 * 5. Media queries for responsive layout
 * 
 */

/*********************************************************************
 * 1. General HTML tags
 *
 */

* {
	box-sizing: border-box; 
}

body {
	padding: 5%;
	max-width: 1600px; 
	margin: 0 auto; 
}

body, td, input[type=text], textarea {
	font-family: 'Quattrocento', serif;
	font-size: 105%; 
	line-height: 1.8em;
	color: #444; 
}

img {
	max-width: 100%; 
}

h2 {
	font-weight: normal;
}

h3 {
	border-top: 1px solid #eee; 
	padding-top: 1em;
	color: #777; 
}

a {
	color: #333;
	text-decoration: none;
	border-bottom: 1px solid #ccc; 
}
	a:hover,
	.nav a:hover {
		color: #000;
		border-color: #aaa; 
	}

blockquote {
	margin-left: 0;
	padding-left: 1.5em;
	padding-right: 2em; 
	border-left: 4px solid #ddd; 
	font-style: italic; 
	color: #777; 
}

pre, code {
	background: #eee; 
	border: 1px solid #ddd; 
}

pre {
	font-size: 14px; 
	line-height: 1.4em;
	padding: 1em;
	border-left: 4px solid #ddd; 
}

/*********************************************************************
 * 2. Masthead area
 *
 */

.topnav, .topnav li {
	list-style: none; 
	padding: 0;
	margin: 0;
}
	.topnav li {
		float: left; 
		margin-right: 1em;
		margin-bottom: 1em;
	}
	.topnav a {
		padding: 0.25em 0.5em;
		text-decoration: none; 
		display: block;
		background: #eee; 
		color: #333; 
		border: 1px solid #eee; 
	}
	.topnav a:hover {
		background: #ddd;
		border-color: #ddd; 
	}
	.topnav li.current a {
		background: #ddd; 
		border-color: #ddd; 
	}
	.topnav li.edit a {
		background: none; 
	}



.breadcrumbs {
	clear: both; 
	padding-top: 1em; 
}
	.breadcrumbs span:after {
		content: ">";
		color: #999; 
		padding-left: 0.5em;
		padding-right: 0.25em; 
	}

/*********************************************************************
 * 3. Main content and sidebar
 *
 */

#main {
	border-top: 1px solid #eee; 
	padding-top: 1em; 
	margin-top: 1em; 
	clear: both; 
}

#content {
	width: 85%; 
}

#content, #sidebar {
	padding-bottom: 2em; 
}

body.has-sidebar #content {
	width: 65%; 
	float: left;
}

body.has-sidebar #sidebar {
	width: 35%;
	padding-left: 5%; 
	float: left; 
}

.nav {
	margin-left: 0;
	padding-left: 0;
	list-style: none; 
}
	.nav .nav {
		padding-left: 1.5em;
		list-style: disc;
	}
	.nav li {
		margin: 1em 0;
	}

	.nav-tree li {
		margin-top: 0;
		margin-bottom: 0;
	}

	.nav a {
		font-weight: bold;
	}

	.nav-tree li a {
		color: #777; 
	}

	.nav .current > a {
		color: #333; 
	}

.align_left {
	/* for images placed in rich text editor */ 
	float: left;
	margin: 0 1em 0.5em 0; 
	position: relative;
	top: 0.5em;
	max-width: 50%; 
}

.align_right {
	/* for images placed in rich text editor */ 
	float: right;
	margin: 0 0 0.5em 1em;
	max-width: 50%; 
}

.align_center {
	/* for images placed in rich text editor */ 
	display: block;
	margin: 1em auto; 
	position: relative;
	top: 0.5em;
}

figure {
	display: table;
	width: 1px;
	margin: 1em 0;
}

figure img {
	display: table-row;
	margin-bottom: 0.5em;
}

figure figcaption {
	display: table-row;
	font-size: smaller;
	color: #777;
	line-height: 1.4em;
}

/*********************************************************************
 * 4. Footer
 *
 */

#footer {
	clear: both; 
	border-top: 1px solid #eee; 
	font-size: 80%; 
}

/*********************************************************************
 * 5. Media queries for responsive layout
 *
 */

@media only screen and (max-width: 767px) {
	/* mobile layout */ 

	body, td, textarea {
		font-size: 100%; 
	}
	body.has-sidebar #content, 
	body.has-sidebar #sidebar {
		float: none;
		width: 100%; 
		padding: 0; 
	}
	#content {
		width: 100%; 
	}
	#sidebar {
		border-top: 1px solid #eee;
		padding-top: 1em; 
	}
	.align_left, .align_right, .align_center {
		display: block;
		float: none; 
		margin: 1em auto;
		max-width: 100%; 
	}

}

@media only screen and (min-width: 1200px) {
	/* extra-wide desktop layout */ 
	
	body, td, textarea {
		font-size: 115%; 
	}
}

/*********************************************************************
 * 6. Static site additions: slider, gallery, works list, lightbox
 *    (replaces the ProcessWire/Jssor slider module, no PHP needed)
 */

.topnav::after { content: ""; display: table; clear: both; }
.topnav a { border-bottom: 1px solid #eee; }

#content { width: 100%; }

/* slider */
.slider {
	position: relative;
	overflow: hidden;
	background: #f4f4f4;
	margin: 0 0 2em;
	user-select: none;
}
.slider .track {
	display: flex;
	transition: transform .6s ease;
	touch-action: pan-y;
}
.slider .slide {
	flex: 0 0 100%;
	margin: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	height: min(70vh, 720px);
}
.slider .slide img {
	max-height: 100%;
	max-width: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
}
.slider .arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 44px;
	height: 64px;
	border: 0;
	background: rgba(0,0,0,.35);
	color: #fff;
	font-size: 42px;
	line-height: 60px;
	cursor: pointer;
	padding: 0;
	font-family: inherit;
	transition: background .2s;
}
.slider .arrow:hover { background: rgba(0,0,0,.6); }
.slider .prev { left: 0; }
.slider .next { right: 0; }
.slider .bullets {
	position: absolute;
	bottom: 12px;
	left: 0;
	right: 0;
	text-align: center;
	line-height: 0;
}
.slider .bullets button {
	width: 11px;
	height: 11px;
	border-radius: 50%;
	border: 1px solid #fff;
	background: rgba(0,0,0,.3);
	margin: 0 4px;
	padding: 0;
	cursor: pointer;
}
.slider .bullets button.on { background: #fff; }

/* thumbnail gallery (images were 260px high in the original body) */
.gallery {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
.gallery a, .works a { border: 0; }
.gallery img {
	height: 260px;
	width: auto;
	display: block;
	transition: opacity .2s;
}
.gallery a:hover img { opacity: .85; }

/* works list on the home page */
.works {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 1.5em;
}
.works img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	display: block;
	margin-bottom: .4em;
}
.works span {
	font-weight: bold;
	border-bottom: 1px solid #ccc;
}
.works a:hover span { color: #000; border-color: #aaa; }

/* lightbox */
.lightbox {
	position: fixed;
	inset: 0;
	background: rgba(20,20,20,.94);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 100;
}
.lightbox[hidden] { display: none; }
.lightbox img {
	max-width: 92vw;
	max-height: 90vh;
}
.lightbox button {
	position: absolute;
	background: none;
	border: 0;
	color: #fff;
	font-size: 48px;
	cursor: pointer;
	padding: 10px 18px;
	opacity: .75;
	font-family: inherit;
}
.lightbox button:hover { opacity: 1; }
.lb-close { top: 0; right: 0; }
.lb-prev { left: 0; top: 50%; transform: translateY(-50%); }
.lb-next { right: 0; top: 50%; transform: translateY(-50%); }

@media only screen and (max-width: 767px) {
	.slider .slide { height: 60vw; }
	.slider .arrow { width: 34px; height: 50px; font-size: 32px; line-height: 46px; }
	.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
	.gallery img { height: auto; width: 100%; }
	.works { grid-template-columns: repeat(2, 1fr); gap: 1em; }
}
