/*
 * Photos single + grid styles.
 */

#photo-detail {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 2.5rem;
	align-items: start;
	margin-bottom: 3rem;
}

@media (max-width: 900px) {
	#photo-detail {
		grid-template-columns: 1fr;
	}
}

.photo-figure img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 80vh;
	object-fit: contain;
	background: #111;
	border-radius: 6px;
}

.photo-missing {
	width: 100%;
	aspect-ratio: 4 / 3;
	background: #eaeaea;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #999;
	border-radius: 6px;
}

.photo-meta-cat {
	display: inline-block;
	padding: 0.2rem 0.6rem;
	border-radius: 999px;
	background: #f0f0f0;
	color: #535353;
	font-size: 0.75em;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin-bottom: 1rem;
}

.photo-facts {
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: 0.4rem 1.2rem;
	margin: 0 0 1.5rem;
}

.photo-facts dt {
	font-family: 'gotham_mediumregular';
	text-transform: uppercase;
	font-size: 0.72em;
	letter-spacing: 0.08em;
	color: #888;
	align-self: center;
}

.photo-facts dd {
	margin: 0;
	color: #222;
}

.photo-caption {
	color: #333;
	line-height: 1.65;
	margin-bottom: 1.5rem;
}

.photo-related {
	margin-top: 1.5rem;
}

.photo-related .aside-title {
	font-family: 'gotham_mediumregular';
	font-size: 0.8em;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: #535353;
	border-bottom: 1px solid #eaeaea;
	padding-bottom: 0.4em;
	margin: 0 0 0.6rem;
}

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

.rel-list li {
	padding: 0.3rem 0;
	border-bottom: 1px solid #f4f4f4;
}

.rel-list li:last-child {
	border-bottom: 0;
}

.rel-list a {
	color: #535353;
	text-decoration: none;
}

.rel-list a:hover {
	color: #111;
}

/* === Photos grid (used in album Photos tab) === */
.photos-group + .photos-group {
	margin-top: 2rem;
}

.photos-group-title {
	font-family: 'gotham_mediumregular';
	font-size: 0.85em;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #535353;
	margin: 0 0 0.75rem;
}

.photos-group-count {
	color: #999;
	font-weight: normal;
	margin-left: 0.3em;
}

.photos-grid {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 0.5rem;
}

.photos-grid .photo {
	overflow: hidden;
	border-radius: 4px;
}

.photos-grid .photo a {
	display: block;
}

.photos-grid .photo img {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	transition: transform 0.2s ease;
}

.photos-grid .photo a:hover img {
	transform: scale(1.05);
}

/* Archive grid (photos and category archives) */
.photos-grid {
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 1rem;
}

.photo-card {
	list-style: none;
}

.photo-card a {
	display: block;
	color: inherit;
	text-decoration: none;
}

.photo-card__image {
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: #eaeaea;
	border-radius: 4px;
	margin-bottom: 0.5rem;
}

.photo-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.2s ease;
}

.photo-card a:hover img {
	transform: scale(1.05);
}

.photo-card__missing {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #999;
	font-size: 0.85em;
}

.photo-card__body {
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
	font-size: 0.85em;
	line-height: 1.3;
}

.photo-card__title {
	font-family: 'gotham_mediumregular';
	color: #111;
}

.photo-card__cat {
	color: #888;
	font-size: 0.85em;
}

.archive-bar--photos {
	flex-wrap: wrap;
}

.photo-cats {
	flex-wrap: wrap;
	gap: 0.4rem;
}

.archive-tab__count {
	color: #999;
	font-size: 0.85em;
	margin-left: 0.2em;
}

.archive-tab.active .archive-tab__count {
	color: rgba(255, 255, 255, 0.7);
}
