/**
 * Blog Posts Cobble — Frontend and Editor styles
 *
 * Asymmetric 3-column cobble magazine blog layout with center featured story and overflow grid.
 * Adheres strictly to Gutenberg standards:
 * - Inherits typography and font-family from theme.json Global Styles (h4).
 * - Zero hard-coded hex/rgb colors; utilizes theme presets and CSS color functions.
 * - Non-overriding :where() wrapper and native Gutenberg color class support.
 */

:where(.wp-block-alonepro-blog-posts-cobble),
.alonepro-blog-posts-cobble {
	box-sizing: border-box;
	display: block;
	width: 100%;
}

.alonepro-blog-posts-cobble,
.alonepro-blog-posts-cobble *,
.alonepro-blog-posts-cobble *::before,
.alonepro-blog-posts-cobble *::after {
	box-sizing: border-box;
}

.alonepro-blog-posts-cobble__item,
.alonepro-blog-posts-cobble__grid-item {
	box-sizing: border-box;
	width: 100%;
}

/* ---------------------------------------------------------------------------
   Asymmetric Magazine / Cobble 3-Column Layout
--------------------------------------------------------------------------- */
.alonepro-blog-posts-cobble__cobble {
	display: flex;
	flex-wrap: wrap;
	width: 100%;
}

/* Left Column (25% width, items with images) */
.alonepro-blog-posts-cobble__col--left {
	width: 25%;
	padding-right: 1.875rem;
	/* 30px */
}

.alonepro-blog-posts-cobble__col--left .alonepro-blog-posts-cobble__item:not(:last-child) {
	margin-bottom: 1.875rem;
	padding-bottom: 1.875rem;
	border-bottom: 1px solid var(--alonepro-cobble-divider-color, rgb(from var(--wp--preset--color--contrast, #0a0a0a) r g b / 0.12));
}

/* Center Column (50% width, featured post with left & right borders) */
.alonepro-blog-posts-cobble__col--feature {
	width: 50%;
	padding-left: 1.875rem;
	padding-right: 1.875rem;
	border-left: 1px solid var(--alonepro-cobble-divider-color, rgb(from var(--wp--preset--color--contrast, #0a0a0a) r g b / 0.12));
	border-right: 1px solid var(--alonepro-cobble-divider-color, rgb(from var(--wp--preset--color--contrast, #0a0a0a) r g b / 0.12));
}

/* Right Column (25% width, text-only items) */
.alonepro-blog-posts-cobble__col--right {
	width: 25%;
	padding-left: 1.875rem;
}

.alonepro-blog-posts-cobble__col--right .alonepro-blog-posts-cobble__item:not(:last-child) {
	margin-bottom: 1.875rem;
	padding-bottom: 1.875rem;
	border-bottom: 1px solid var(--alonepro-cobble-divider-color, rgb(from var(--wp--preset--color--contrast, #0a0a0a) r g b / 0.12));
}

/* ---------------------------------------------------------------------------
   Thumbnails & Images
--------------------------------------------------------------------------- */
.alonepro-blog-posts-cobble__thumb-wrap {
	position: relative;
	width: 100%;
	overflow: hidden;
}

.alonepro-blog-posts-cobble__thumb-wrap--side,
.alonepro-blog-posts-cobble__thumb-wrap--grid {
	margin-bottom: 0.9375rem;
	/* 15px */
}

.alonepro-blog-posts-cobble__thumb-wrap--feature {
	margin-bottom: 1.5625rem;
	/* 25px */
}

.alonepro-blog-posts-cobble__thumb {
	display: block;
	position: relative;
	width: 100%;
	line-height: 0;
	overflow: hidden;
}

/* Aspect ratios */
.alonepro-blog-posts-cobble__thumb-wrap--side .alonepro-blog-posts-cobble__thumb {
	aspect-ratio: 5 / 3;
}

.alonepro-blog-posts-cobble__thumb-wrap--feature .alonepro-blog-posts-cobble__thumb {
	aspect-ratio: 3 / 2;
}

.alonepro-blog-posts-cobble__thumb-wrap--grid .alonepro-blog-posts-cobble__thumb {
	aspect-ratio: 16 / 10;
}

.alonepro-blog-posts-cobble__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.alonepro-blog-posts-cobble__item:hover .alonepro-blog-posts-cobble__img,
.alonepro-blog-posts-cobble__grid-item:hover .alonepro-blog-posts-cobble__img {
	transform: scale(1.08);
}

.alonepro-blog-posts-cobble__placeholder {
	width: 100%;
	height: 100%;
	min-height: 160px;
	background-color: var(--wp--preset--color--surface, #f4f4f4);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--wp--preset--color--secondary, #525252);
}

.alonepro-blog-posts-cobble__placeholder-icon {
	opacity: 0.4;
}

/* ---------------------------------------------------------------------------
   Content (Date, Title H4, Excerpt)
--------------------------------------------------------------------------- */
.alonepro-blog-posts-cobble__content {
	display: flex;
	flex-direction: column;
}

.alonepro-blog-posts-cobble__date {
	display: inline-block;
	font-size: 0.875rem;
	/* 14px */
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary, #ffc247);
	margin-bottom: 0.375rem;
	/* 6px */
}

/* H4 Post Titles — Inherits theme typography & font-family via theme.json */
.alonepro-blog-posts-cobble .alonepro-blog-posts-cobble__title,
.alonepro-blog-posts-cobble__item .alonepro-blog-posts-cobble__title,
.alonepro-blog-posts-cobble__grid-item .alonepro-blog-posts-cobble__title {
	margin: 0;
	line-height: 1.35;
	/* No color declaration: inherits Global Styles h1-h6 color (contrast) or Gutenberg classes */
}

.alonepro-blog-posts-cobble__title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}

.alonepro-blog-posts-cobble__title a:hover,
.alonepro-blog-posts-cobble__title a:focus-visible {
	color: var(--wp--preset--color--contrast);
}

/* Title clamping for side columns and overflow grid */
.alonepro-blog-posts-cobble__col--left .alonepro-blog-posts-cobble__title,
.alonepro-blog-posts-cobble__col--right .alonepro-blog-posts-cobble__title,
.alonepro-blog-posts-cobble__grid-item .alonepro-blog-posts-cobble__title {
	font-family: var(--nextora-font-body);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Featured title prominence while respecting Gutenberg heading scale & font-size picker */
.alonepro-blog-posts-cobble .alonepro-blog-posts-cobble__title--feature:not([class*="-font-size"]) {
	font-size: clamp(var(--wp--preset--font-size--medium, 1.25rem), 2.2vw, var(--wp--preset--font-size--plus, 2rem));
	line-height: 1.35;
}

.alonepro-blog-posts-cobble .alonepro-blog-posts-cobble__title--feature {
	font-family: var(--nextora-font-body);
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Excerpt — Inherits paragraph styling from theme.json Global Styles */
.alonepro-blog-posts-cobble .alonepro-blog-posts-cobble__excerpt,
.alonepro-blog-posts-cobble__item .alonepro-blog-posts-cobble__excerpt,
.alonepro-blog-posts-cobble__grid-item .alonepro-blog-posts-cobble__excerpt {
	margin: 1rem 0 0;
	line-height: 1.6;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	/* No color declaration: inherits theme paragraph color or Gutenberg classes */
}

.alonepro-blog-posts-cobble__excerpt p {
	margin: 0;
}

/* ---------------------------------------------------------------------------
   Overflow Grid (Posts 7+)
--------------------------------------------------------------------------- */
.alonepro-blog-posts-cobble__grid {
	width: 100%;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1.875rem;
	/* 30px */
	margin-top: 1.875rem;
	padding-top: 1.875rem;
	border-top: 1px solid var(--alonepro-cobble-divider-color, rgb(from var(--wp--preset--color--contrast, #0a0a0a) r g b / 0.12));
}

.alonepro-blog-posts-cobble__grid-item {
	display: flex;
	flex-direction: column;
}

/* ---------------------------------------------------------------------------
   Responsive Breakpoints
--------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
	.alonepro-blog-posts-cobble__col--left {
		width: 100%;
		padding-right: 0;
		margin-bottom: 1.875rem;
		padding-bottom: 1.875rem;
		border-bottom: 1px solid var(--alonepro-cobble-divider-color, rgb(from var(--wp--preset--color--contrast, #0a0a0a) r g b / 0.12));
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		gap: 1.875rem;
	}

	.alonepro-blog-posts-cobble__col--left .alonepro-blog-posts-cobble__item:not(:last-child) {
		margin-bottom: 0;
		padding-bottom: 0;
		border-bottom: none;
	}

	.alonepro-blog-posts-cobble__col--feature {
		width: 100%;
		padding-left: 0;
		padding-right: 0;
		border-left: none;
		border-right: none;
		margin-bottom: 1.875rem;
		padding-bottom: 1.875rem;
		border-bottom: 1px solid var(--alonepro-cobble-divider-color, rgb(from var(--wp--preset--color--contrast, #0a0a0a) r g b / 0.12));
	}

	.alonepro-blog-posts-cobble__col--right {
		width: 100%;
		padding-left: 0;
		display: grid;
		grid-template-columns: repeat(3, 1fr);
		gap: 1.875rem;
	}

	.alonepro-blog-posts-cobble__col--right .alonepro-blog-posts-cobble__item:not(:last-child) {
		margin-bottom: 0;
		padding-bottom: 0;
		border-bottom: none;
	}

	.alonepro-blog-posts-cobble__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 767.98px) {
	.alonepro-blog-posts-cobble__col--left {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}

	.alonepro-blog-posts-cobble__col--right {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}

	.alonepro-blog-posts-cobble__grid {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}
}

/* ---------------------------------------------------------------------------
   Reduced Motion
--------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	.alonepro-blog-posts-cobble__img {
		transition: none !important;
		transform: none !important;
	}
}