/* Photography pages - grid, lightbox, sub-nav */

/* Sub-navigation */
.photo-subnav {
	font-family: Verdana, Geneva, sans-serif;
	font-size: 11px;
	text-align: center;
	padding: 8px 0 16px 0;
	text-transform: uppercase;
}
.photo-subnav a {
	color: #333;
	text-decoration: none;
	margin: 0 6px;
}
.photo-subnav a:hover {
	color: #999;
}
.photo-subnav a.active {
	color: #000;
	font-weight: bold;
}

/* Gallery intro text */
.gallery-intro {
	font-family: Verdana, Geneva, sans-serif;
	font-size: small;
	color: #333;
	max-width: 700px;
	margin: 0 auto 24px auto;
	text-align: justify;
	line-height: 1.6;
}

/* Thumbnail grid */
.photo-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
	width: 90vw;
	max-width: 2000px;
	position: relative;
	left: 50%;
	transform: translateX(-50%);
	margin: 0 0 32px 0;
	padding: 0;
}
.photo-grid figure {
	margin: 0;
	padding: 0;
	cursor: pointer;
	overflow: hidden;
	position: relative;
}
.photo-grid figure img {
	width: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	display: block;
	transition: opacity 0.2s;
}
.photo-grid figure:hover img {
	opacity: 0.85;
}
/* Hide alt text for broken images */
.photo-grid figure img,
.cover-grid a img {
	color: transparent;
	font-size: 0;
}

/* Square grid for PCT Holga */
.photo-grid.square figure img {
	aspect-ratio: 1 / 1;
}

/* Cover image grid (landing page) */
.cover-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
	width: 90vw;
	max-width: 1400px;
	position: relative;
	left: 50%;
	transform: translateX(-50%);
	margin: 0 0 32px 0;
	padding: 0;
}
.cover-grid a {
	display: block;
	position: relative;
	overflow: hidden;
	text-decoration: none;
}
.cover-grid a img {
	width: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	display: block;
	transition: opacity 0.2s;
}
.cover-grid a:hover img {
	opacity: 0.8;
}
/* Wide cover for PCT Holga - centered, spans both columns */
.cover-grid a.cover-wide {
	grid-column: 1 / -1;
	max-width: 50%;
	justify-self: center;
}
.cover-grid a.cover-wide img {
	aspect-ratio: 3 / 1;
}
.cover-grid a .cover-label {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	font-family: Verdana, Geneva, sans-serif;
	font-size: small;
	text-align: center;
	padding: 8px 4px;
	text-transform: uppercase;
	letter-spacing: 1px;
}

/* Painting gallery - keeps the original inline layout, uses the lightbox */
.painting-thumb {
	cursor: pointer;
}
.painting-thumb img {
	border: none;
	max-width: 100%;
	height: auto;
	transition: opacity 0.2s;
}
.painting-thumb:hover img {
	opacity: 0.85;
}

/* Lightbox overlay */
.lightbox-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgb(253, 251, 245);
	z-index: 9999;
	justify-content: center;
	align-items: center;
	flex-direction: column;
	display: flex;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.24s ease;
}
.lightbox-overlay.active {
	opacity: 1;
	pointer-events: auto;
}
.lightbox-overlay img {
	max-width: 90vw;
	max-height: 65vh;
	object-fit: contain;
	box-shadow: 0 2px 24px rgba(0, 0, 0, 0.15);
}
.lightbox-divider {
	width: 500px;
	max-width: 80vw;
	margin: 44px auto 0 auto;
	border: none;
	border-top: 1px solid #ccc;
}
.lightbox-caption {
	width: 500px;
	max-width: 80vw;
	margin: 0;
	padding: 0;
	height: 100px;
	flex-shrink: 0;
	position: relative;
}
.lightbox-caption span {
	position: absolute;
	top: 50%;
	left: 0;
	right: 0;
	transform: translateY(-50%);
	color: #444;
	font-family: Verdana, Geneva, sans-serif;
	font-size: 13px;
	text-align: center;
	line-height: 1.5;
}
/* Second divider (after caption) — no extra margin, caption height handles spacing */
.lightbox-caption + .lightbox-divider {
	margin-top: 0;
}
/* Print Available button — shown only when the image has data-print-id.
   The row keeps its height even when empty so prev/next never shift
   position while navigating between print and non-print images. */
.lightbox-print-row {
	height: 34px;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}
.lightbox-print {
	visibility: hidden;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-family: Verdana, Geneva, sans-serif;
	font-size: 10px;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: #444;
	text-decoration: none;
	border: 1px solid #999;
	padding: 6px 14px;
	transition: color 0.2s, border-color 0.2s;
}
.lightbox-print.available {
	visibility: visible;
}
.lightbox-print:hover {
	color: #999;
	border-color: #ccc;
}
.lightbox-print svg {
	width: 13px;
	height: 13px;
	stroke: currentColor;
	stroke-width: 1.5;
	fill: none;
}
.lightbox-print-row + .lightbox-divider {
	margin-top: 0;
}
.lightbox-close {
	position: absolute;
	top: 20px;
	left: 50%;
	transform: translateX(-50%);
	cursor: pointer;
	z-index: 10001;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.06);
	border-radius: 50%;
	transition: background 0.2s;
}
.lightbox-close svg {
	width: 20px;
	height: 20px;
	stroke: #555;
	stroke-width: 2;
	fill: none;
	stroke-linecap: round;
	transition: stroke 0.2s;
}
.lightbox-close:hover {
	background: rgba(0, 0, 0, 0.15);
}
.lightbox-close:hover svg {
	stroke: #000;
}
.lightbox-nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	margin-top: 20px;
}
.lightbox-prev,
.lightbox-next {
	cursor: pointer;
	user-select: none;
	z-index: 10000;
	width: 55px;
	height: 55px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.06);
	border-radius: 50%;
	transition: background 0.2s;
	flex-shrink: 0;
}
.lightbox-prev svg,
.lightbox-next svg {
	width: 25px;
	height: 25px;
	stroke: #555;
	stroke-width: 2;
	fill: none;
	stroke-linecap: round;
	stroke-linejoin: round;
	transition: stroke 0.2s;
}
.lightbox-prev:hover,
.lightbox-next:hover {
	background: rgba(0, 0, 0, 0.15);
}
.lightbox-prev:hover svg,
.lightbox-next:hover svg {
	stroke: #000;
}
.lightbox-counter {
	color: #777;
	font-family: Verdana, Geneva, sans-serif;
	font-size: x-small;
	min-width: 50px;
	text-align: center;
}

/* While the lightbox is open, page thumbnails reduce to thin outlines.
   The outline is seen through the 90%-opaque overlay, so it must be
   near-black to read as a faint gray line. */
body.lightbox-open .painting-thumb {
	display: inline-block;
	line-height: 0;
	outline: 1px solid #000;
	outline-offset: -1px;
}

/* Prints page (prints.html) */
.print-detail img {
	max-width: 90%;
	max-height: 60vh;
	object-fit: contain;
	box-shadow: 0 2px 24px rgba(0, 0, 0, 0.15);
}
.print-title {
	font-family: Verdana, Geneva, sans-serif;
	font-size: 13px;
	color: #444;
	line-height: 1.5;
}
.print-blurb {
	font-family: Verdana, Geneva, sans-serif;
	font-size: 11px;
	color: #777;
	line-height: 1.6;
	max-width: 420px;
	margin: 0 auto;
}
.print-option {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: Verdana, Geneva, sans-serif;
	font-size: 11px;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: #444 !important;
	text-decoration: none;
	border: 1px solid #999;
	padding: 9px 20px;
	margin: 6px;
	transition: color 0.2s, border-color 0.2s;
}
.print-option:hover {
	color: #999 !important;
	border-color: #ccc;
}
.print-option svg {
	width: 14px;
	height: 14px;
	stroke: currentColor;
	stroke-width: 1.5;
	fill: none;
}
.print-index a {
	display: inline-block;
	margin: 12px;
	font-family: Verdana, Geneva, sans-serif;
	font-size: 11px;
	color: #444;
	text-decoration: none;
}
.print-index a:hover {
	color: #999;
}
.print-index img {
	display: block;
	width: 220px;
	height: 165px;
	object-fit: cover;
	margin-bottom: 8px;
	box-shadow: 0 1px 12px rgba(0, 0, 0, 0.12);
}
body.lightbox-open .photo-grid figure {
	outline: 1px solid #000;
	outline-offset: -1px;
}
body.lightbox-open .painting-thumb img,
body.lightbox-open .photo-grid figure img {
	opacity: 0;
}

/* Responsive breakpoints */
@media (max-width: 900px) {
	.content,
	.header {
		width: auto;
		max-width: 100%;
	}
	.photo-grid,
	.cover-grid {
		grid-template-columns: repeat(2, 1fr);
		width: auto;
		left: auto;
		transform: none;
		margin-left: 8px;
		margin-right: 8px;
	}
}
@media (max-width: 550px) {
	.photo-grid,
	.cover-grid {
		grid-template-columns: 1fr;
	}
}
