/* =============================================================================================
   EP Blog pictures (1.3.0): card layout 2 (square picture tile on the left), the picture tile,
   and the related-posts and featured variants. Loaded only for viewers who see pictures
   (epbl_pictures_visible()), after blog.css. Every rule sits under .epbl-scope and restates what
   the theme kit styles on bare elements (headings, links, svg sizing).
   Design reference: preview/blog-cards-2.html and preview/blog-icons-5.html.
   ============================================================================================= */

/* Two columns on a computer, one on a phone. */
.epbl-scope .epbl-grid.epbl-grid--pics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 860px) { .epbl-scope .epbl-grid.epbl-grid--pics { grid-template-columns: minmax(0, 1fr); gap: 16px; } }

/* The tile: section colour behind one drawing; the town or area name is real text. */
.epbl-scope .epbl-pic {
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
	background: var(--epbl-pic-bg, #f5e9fc);
	overflow: hidden;
}
.epbl-scope .epbl-pic__art {
	position: absolute;
	top: 0;
	left: 0;
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	overflow: visible;
}
.epbl-scope .epbl-pic__name {
	position: absolute;
	left: 4%;
	right: 4%;
	bottom: 6%;
	font-family: var(--epbl-font-display);
	font-weight: 600;
	font-size: 13px;
	line-height: 1.3;
	color: var(--epbl-pic-ink, #26212f);
	text-align: center;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Card layout 2. */
.epbl-scope .epbl-pcard {
	display: grid !important;
	grid-template-columns: 34% minmax(0, 1fr);
	align-items: stretch;
	min-width: 0;
	background: #fff !important;
	border: none !important;
	float: none !important;
	border-radius: var(--epbl-radius-panel) !important;
	box-shadow: var(--epbl-shadow-panel);
	overflow: hidden;
	color: var(--epbl-ink) !important;
	text-decoration: none !important;
	transition: transform .18s ease, box-shadow .18s ease;
}
.epbl-scope .epbl-pcard:hover,
.epbl-scope .epbl-pcard:focus-visible {
	transform: translateY(-3px);
	box-shadow: 0 6px 18px rgba(17, 17, 26, .10), 0 2px 8px rgba(17, 17, 26, .06);
}
.epbl-scope .epbl-pcard__pic { position: relative; display: block; min-width: 0; }
.epbl-scope .epbl-pcard__pic::before { content: ""; display: block; padding-top: 100%; }
.epbl-scope .epbl-pcard__pic .epbl-pic { position: absolute; top: 0; left: 0; right: 0; bottom: 0; }
.epbl-scope .epbl-pcard__body {
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-width: 0;
	padding: 18px 20px;
}
.epbl-scope .epbl-pcard__title {
	margin: 0;
	font-family: var(--epbl-font-display);
	font-weight: 600;
	font-size: 18px;
	line-height: 1.35;
	letter-spacing: 0;
	color: var(--epbl-ink);
	text-align: left;
	transition: color .15s ease;
}
.epbl-scope .epbl-pcard:hover .epbl-pcard__title,
.epbl-scope .epbl-pcard:focus-visible .epbl-pcard__title { color: var(--epbl-purple-dark); }
.epbl-scope .epbl-pcard__excerpt {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 14px;
	line-height: 1.6;
	color: var(--epbl-muted);
}
.epbl-scope .epbl-pcard__meta { display: block; margin-top: auto; padding-top: 2px; font-size: 13px; color: #9a9aa6; }
/* The town moves to the meta line when it does not fit in the tile (pictures.js). */
.epbl-scope .epbl-pcard__where { display: none; }
.epbl-scope .epbl-pcard.is-name-moved .epbl-pcard__where { display: inline; }
.epbl-scope .epbl-pcard.is-name-moved .epbl-pic__name { display: none; }

/* Titles stay whole on narrow screens; the 3-line clamp is for computers only. */
@media (min-width: 861px) {
	.epbl-scope .epbl-pcard__title {
		display: -webkit-box;
		-webkit-line-clamp: 3;
		-webkit-box-orient: vertical;
		overflow: hidden;
	}
}
@media (max-width: 520px) {
	.epbl-scope .epbl-pcard { grid-template-columns: 30% minmax(0, 1fr); }
	.epbl-scope .epbl-pcard__body { gap: 8px; padding: 14px; }
	.epbl-scope .epbl-pcard__title { font-size: 16px; }
	.epbl-scope .epbl-pcard__excerpt { font-size: 13px; line-height: 1.5; }
	.epbl-scope .epbl-pcard .epbl-pic__name { font-size: 11px; bottom: 5%; left: 3%; right: 3%; }
}

/* More to explore: a small tile beside each related post. */
.epbl-scope .epbl-more-grid.epbl-more-grid--pics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .epbl-scope .epbl-more-grid.epbl-more-grid--pics { grid-template-columns: minmax(0, 1fr); } }
.epbl-scope .epbl-more-card.epbl-more-card--pic { flex-direction: row; align-items: flex-start; gap: 14px; padding: 14px; }
.epbl-scope .epbl-more-card__pic {
	position: relative;
	flex: 0 0 72px;
	width: 72px;
	height: 72px;
	border-radius: 10px;
	overflow: hidden;
}
.epbl-scope .epbl-more-card__body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.epbl-scope .epbl-pic--small .epbl-pic__name { display: none; }

/* Featured this week: the tile fills the left panel. */
.epbl-scope .epbl-feat__panel--pic { background: transparent; }
.epbl-scope .epbl-feat__panel--pic::before,
.epbl-scope .epbl-feat__panel--pic::after { display: none; }
.epbl-scope .epbl-feat__panel--pic .epbl-pic { position: absolute; top: 0; left: 0; right: 0; bottom: 0; }
.epbl-scope .epbl-feat__panel--pic .epbl-pic__name { font-size: 15px; }
@media (max-width: 720px) {
	.epbl-scope .epbl-feat__panel--pic { height: 200px; }
}

/* Map credit under any grid with a map in it. */
.epbl-scope .epbl-pic-credit {
	margin: 18px 0 0;
	font-size: 12px;
	line-height: 1.5;
	color: #8a8597;
	text-align: center;
}

/* 1.3.3: the large map at the top of a post's sidebar (location posts). Desktop only: on phones the sidebar sits above the article. */
.epbl-scope .epbl-side-map { margin: 0; }
.epbl-scope .epbl-side-map .epbl-pic--side {
	aspect-ratio: 1 / 1;
	height: auto;
	border-radius: 14px;
	box-shadow: 0 4px 18px rgba(0, 0, 0, .08);
}
.epbl-scope .epbl-side-map .epbl-pic__name { font-size: 15px; }
.epbl-scope .epbl-side-map__credit { margin: 8px 0 0; font-size: 11px; line-height: 1.4; color: #8a8597; text-align: center; }
@media (max-width: 960px) { .epbl-scope .epbl-side-map { display: none; } }
