/**
 * EMCP Themer — dynamic block front-end + editor styles.
 *
 * Intentionally light: layout + sensible defaults only, so the active theme and
 * each block's own supports (color/typography/spacing/border) drive the look.
 * No gradients.
 */

/* Breadcrumbs */
.emcp-dyn-breadcrumbs {
	font-size: 0.875em;
}
.emcp-dyn-breadcrumbs a {
	text-decoration: none;
}
.emcp-dyn-breadcrumbs a:hover {
	text-decoration: underline;
}
.emcp-dyn-breadcrumbs .emcp-dyn-sep {
	opacity: 0.5;
	margin: 0 0.25em;
}

/* Post meta */
.emcp-dyn-post-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25em 1em;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 0.875em;
}
.emcp-dyn-post-meta > li {
	margin: 0;
	padding: 0;
}
.emcp-dyn-post-meta a {
	text-decoration: none;
}

/* Site title / logo */
.emcp-dyn-site-title a,
.emcp-dyn-site-logo {
	text-decoration: none;
}
.emcp-dyn-site-title {
	font-weight: 700;
}
.emcp-dyn-site-tagline {
	display: block;
	font-size: 0.8125em;
	opacity: 0.7;
}
.emcp-dyn-site-logo-img,
.emcp-dyn-site-logo img {
	display: block;
	height: auto;
}

/* Nav menu */
.emcp-dyn-nav-menu .emcp-dyn-menu {
	display: flex;
	flex-wrap: wrap;
	gap: 1.25em;
	margin: 0;
	padding: 0;
	list-style: none;
	align-items: center;
}
.emcp-dyn-nav-menu .emcp-dyn-menu a {
	text-decoration: none;
	display: inline-block;
}
.emcp-dyn-nav-menu .sub-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

/* Description */
.emcp-dyn-description {
	line-height: 1.6;
}

/* Archive loop.
   Card look is driven by CSS variables so the Elementor/Gutenberg controls can
   override them (background, border, radius, padding, gap). Defaults are clean:
   grid = carded, list = borderless magazine rows. */
.emcp-dyn-archive-loop {
	--emcp-card-gap: 28px;
	--emcp-card-bg: transparent;
	--emcp-card-border-color: rgba(0, 0, 0, 0.1);
	--emcp-card-border-width: 0px;
	--emcp-card-radius: 12px;
	--emcp-card-pad: 0px;
	--emcp-card-media: clamp(180px, 32%, 320px);
}
.emcp-dyn-archive-loop--grid {
	display: grid;
	grid-template-columns: repeat(var(--emcp-cols, 3), minmax(0, 1fr));
	gap: var(--emcp-card-gap);
}
.emcp-dyn-archive-loop--list {
	display: flex;
	flex-direction: column;
	gap: var(--emcp-card-gap);
}

/* Card */
.emcp-dyn-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	background: var(--emcp-card-bg);
	border: var(--emcp-card-border-width) solid var(--emcp-card-border-color);
	border-radius: var(--emcp-card-radius);
	overflow: hidden;
	transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
/* Grid cards read as cards by default (subtle border + hover lift). */
.emcp-dyn-archive-loop--grid {
	--emcp-card-border-width: 1px;
	--emcp-card-pad: 18px;
}
.emcp-dyn-archive-loop--grid .emcp-dyn-card:hover {
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
	transform: translateY(-2px);
	border-color: rgba(0, 0, 0, 0.16);
}

/* List rows: image left, content right; collapses to full-width text with no
   image (flexbox, so the empty column that used to cramp the text is gone). */
.emcp-dyn-archive-loop--list .emcp-dyn-card {
	flex-direction: row;
	gap: 24px;
	align-items: stretch;
}
.emcp-dyn-archive-loop--list .emcp-dyn-card-media {
	flex: 0 0 var(--emcp-card-media);
	max-width: 340px;
}
.emcp-dyn-archive-loop--list .emcp-dyn-card-body {
	flex: 1 1 auto;
	justify-content: center;
}

/* Media */
.emcp-dyn-card-media {
	display: block;
	overflow: hidden;
	background: rgba(0, 0, 0, 0.04);
}
.emcp-dyn-card-media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.emcp-dyn-archive-loop--grid .emcp-dyn-card-media img {
	aspect-ratio: 16 / 10;
}
.emcp-dyn-archive-loop--list .emcp-dyn-card-media img {
	min-height: 100%;
	border-radius: 8px;
}
.emcp-dyn-card:hover .emcp-dyn-card-media img {
	transform: scale(1.03);
}
.emcp-dyn-card-media img {
	transition: transform 0.3s ease;
}

/* Body */
.emcp-dyn-card-body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
	padding: var(--emcp-card-pad);
	flex: 1 1 auto;
}
.emcp-dyn-card-meta {
	font-size: 0.8125em;
	opacity: 0.7;
}
.emcp-dyn-card-title {
	margin: 0;
	font-size: 1.15em;
	line-height: 1.3;
}
.emcp-dyn-card-title a {
	text-decoration: none;
	color: inherit;
}
.emcp-dyn-card-title a:hover {
	text-decoration: underline;
}
.emcp-dyn-card-excerpt {
	line-height: 1.6;
	opacity: 0.9;
}
.emcp-dyn-card-more {
	align-self: flex-start;
	margin-top: 4px;
	text-decoration: none;
	font-weight: 600;
}

/* Pagination */
.emcp-dyn-pagination {
	margin-top: 32px;
}
.emcp-dyn-pagination .page-numbers {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.emcp-dyn-pagination .page-numbers li {
	margin: 0;
}
.emcp-dyn-pagination .page-numbers a,
.emcp-dyn-pagination .page-numbers span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 38px;
	padding: 0 10px;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 6px;
	text-decoration: none;
	line-height: 1;
}
.emcp-dyn-pagination .page-numbers .current {
	background: currentColor;
	color: #fff;
	border-color: transparent;
}

/* Editor: placeholder for elements with no data in the current context */
.emcp-dyn-placeholder {
	display: inline-block;
	padding: 6px 12px;
	border: 1px dashed rgba(0, 0, 0, 0.25);
	border-radius: 6px;
	font-size: 0.875em;
	opacity: 0.7;
}

/* Small screens */
@media (max-width: 782px) {
	.emcp-dyn-archive-loop--grid {
		grid-template-columns: 1fr;
	}
	/* Stack list rows on small screens: image on top, text below. */
	.emcp-dyn-archive-loop--list .emcp-dyn-card {
		flex-direction: column;
	}
	.emcp-dyn-archive-loop--list .emcp-dyn-card-media {
		flex-basis: auto;
		max-width: none;
	}
	.emcp-dyn-archive-loop--list .emcp-dyn-card-media img {
		aspect-ratio: 16 / 9;
	}
}
