/* Blok Display Posts - Main Styles */

.blok-posts-container {
	margin: 30px 0;
}

/* Grid Layout */
.blok-posts-container.blok-posts-grid {
	width: 100%;
}

.blok-posts-grid {
	margin: 0;
}

/* Post Card Styles */
.blok-post-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	background-color: #fff;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	transition: all 0.3s ease;
}

.blok-post-card:hover {
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
	transform: translateY(-5px);
}

.blok-post-image {
	width: 100%;
	height: 250px;
	overflow: hidden;
	background-color: #f0f0f0;
	position: relative;
}

.blok-post-image a {
	display: block;
	width: 100%;
	height: 100%;
}

.blok-post-thumbnail {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.blok-post-card:hover .blok-post-thumbnail {
	transform: scale(1.05);
}

.blok-post-content {
	flex: 1;
	display: flex;
	flex-direction: column;
	padding: 20px;
}

.blok-post-title {
	margin: 0 0 15px 0;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.4;
}

.blok-post-title a {
	color: #333;
	text-decoration: none;
	transition: color 0.3s ease;
}

.blok-post-title a:hover {
	color: #0066cc;
}

.blok-post-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 15px;
	margin: 0 0 12px 0;
	font-size: 13px;
	color: #999;
}

.blok-post-date,
.blok-post-author {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.blok-post-date i,
.blok-post-author i {
	margin-right: 3px;
}

.blok-post-excerpt {
	margin: 0 0 15px 0;
	font-size: 14px;
	line-height: 1.6;
	color: #666;
	flex: 1;
}

.blok-post-link {
	display: inline-block;
	color: #0066cc;
	text-decoration: none;
	font-weight: 500;
	font-size: 14px;
	transition: color 0.3s ease;
}

.blok-post-link:hover {
	color: #0052a3;
}

/* List Layout */
.blok-posts-container.blok-posts-list {
	width: 100%;
}

.blok-posts-list {
	display: flex;
	flex-direction: column;
	gap: 25px;
}

.blok-post-list-item {
	display: flex;
	gap: 25px;
	background-color: #fff;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	padding: 20px;
	transition: box-shadow 0.3s ease;
}

.blok-post-list-item:hover {
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.blok-post-list-content {
	display: flex;
	gap: 20px;
	width: 100%;
}

.blok-post-list-image {
	flex: 0 0 200px;
	height: 160px;
	overflow: hidden;
	border-radius: 6px;
	background-color: #f0f0f0;
}

.blok-post-list-thumbnail {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.blok-post-list-text {
	flex: 1;
	display: flex;
	flex-direction: column;
}

.blok-post-list-title {
	margin: 0 0 10px 0;
	font-size: 20px;
	font-weight: 600;
	line-height: 1.4;
}

.blok-post-list-title a {
	color: #333;
	text-decoration: none;
	transition: color 0.3s ease;
}

.blok-post-list-title a:hover {
	color: #0066cc;
}

/* Carousel Layout */
.blok-posts-container.blok-posts-carousel {
	width: 100%;
}

.blok-carousel-wrapper {
	position: relative;
	overflow: hidden;
}

.blok-carousel-inner {
	margin-right: -10px;
	padding-right: 10px;
}

.blok-carousel-item {
	min-width: 0;
}

/* Mobile Card Layout (50% image, title, arrow button) */
.blok-posts-container.blok-posts-mobile {
	width: 100%;
}

.blok-posts-mobile-list {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.blok-post-mobile-card {
	display: flex;
	align-items: stretch;
	background-color: #fff;
	border-bottom: 1px solid #eee;
	overflow: hidden;
	transition: all 0.3s ease;
	height: 60px;
}

.blok-post-mobile-card:hover {
	background-color: #f9f9f9;
	border-left: 4px solid #0073aa;
	padding-left: 0;
}

.blok-mobile-image-side {
	flex: 0 0 50px;
	height: 60px;
	width: 50px;
	overflow: hidden;
	background-color: transparent;
	max-width: 50px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.blok-mobile-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
	display: block;
}

.blok-post-mobile-card:hover .blok-mobile-image {
	transform: scale(1.05);
}

.blok-mobile-image-placeholder {
	width: 100%;
	height: 100%;
	background-color: transparent;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 32px;
}

.blok-mobile-image-placeholder a {
	color: #999;
	text-decoration: none;
}

.blok-mobile-title-side {
	flex: 1;
	padding: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 0;
}

.blok-mobile-title {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	color: #333;
	word-break: break-word;
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
}

.blok-mobile-title a {
	color: #333;
	text-decoration: none;
	transition: color 0.3s ease;
}

.blok-mobile-title a:hover {
	color: #0073aa;
}

.blok-mobile-arrow-side {
	flex: 0 0 60px;
	height: 60px;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: transparent;
	border-left: 1px solid #eee;
	transition: all 0.3s ease;
}

.blok-post-mobile-card:hover .blok-mobile-arrow-side {
	background-color: #0073aa;
	border-left: 1px solid #0073aa;
}

.blok-mobile-arrow-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 50px;
	height: 50px;
	border-radius: 50%;
	border: 2px solid #999;
	text-decoration: none;
	background-color: transparent;
	color: #999;
	transition: all 0.3s ease;
}

.blok-mobile-arrow-btn:hover {
	border-color: #333;
	color: #333;
	background-color: rgba(51, 51, 51, 0.05);
}

.blok-post-mobile-card:hover .blok-mobile-arrow-btn {
	border-color: white;
	background-color: white;
}

.blok-arrow-icon {
	display: inline-block;
	font-size: 24px;
	font-weight: bold;
	color: #0073aa;
	line-height: 1;
	transition: all 0.3s ease;
}

.blok-post-mobile-card:hover .blok-arrow-icon {
	color: #0073aa;
	transform: translateX(2px);
}

/* Tablet responsive mobile layout */
@media (max-width: 1024px) {
	.blok-post-mobile-card {
		height: 60px;
	}

	.blok-mobile-image-side {
		height: 50px;
	}

	.blok-mobile-title {
		font-size: 13px;
	}

	.blok-mobile-title-side {
		padding: 8px;
	}

	.blok-mobile-arrow-side {
		height: 60px;
	}

	.blok-mobile-arrow-btn {
		width: 48px;
		height: 48px;
		border-width: 2px;
	}

	.blok-arrow-icon {
		font-size: 22px;
	}
}

/* Small mobile responsive mobile layout */
@media (max-width: 600px) {
	.blok-post-mobile-card {
		height: 60px;
	}

	.blok-mobile-image-side {
		flex: 0 0 50px;
		height: 50px;
		width: 50px;
		max-width: 50px;
	}

	.blok-mobile-title-side {
		padding: 8px;
	}

	.blok-mobile-title {
		font-size: 12px;
	}

	.blok-mobile-arrow-side {
		height: 60px;
	}

	.blok-mobile-arrow-btn {
		width: 48px;
		height: 48px;
		border-width: 2px;
	}

	.blok-arrow-icon {
		font-size: 20px;
	}
}

/* Responsive Design for Divi & Standard Themes */

/* Tablet */
@media (max-width: 1024px) {
	.blok-posts-grid {
		grid-template-columns: repeat(2, 1fr) !important;
	}

	.blok-post-list-content {
		flex-direction: column;
		gap: 15px;
	}

	.blok-post-list-image {
		flex: 0 0 100%;
		height: 200px;
	}
}

/* Mobile */
@media (max-width: 768px) {
	.blok-posts-grid {
		grid-template-columns: 1fr !important;
		gap: 20px;
	}

	.blok-post-card {
		margin-bottom: 20px;
	}

	.blok-post-image {
		height: 200px;
	}

	.blok-post-list-item {
		flex-direction: column;
		gap: 15px;
		padding: 15px;
	}

	.blok-post-list-content {
		flex-direction: column;
		gap: 15px;
	}

	.blok-post-list-image {
		flex: 0 0 100%;
		height: 200px;
	}

	.blok-post-title {
		font-size: 16px;
	}

	.blok-posts-meta {
		font-size: 12px;
	}

	.blok-post-excerpt {
		font-size: 13px;
	}

	.blok-carousel-item {
		flex: 0 0 280px;
	}
}

/* Divi Theme Specific Overrides */
.et_pb_post,
.blok-post-card {
	background-color: #fff;
}

/* Basics/Astra Theme Specific */
body.astra .blok-post-card,
body.generatepress .blok-post-card {
	border-radius: 4px;
}

/* No posts message */
.blok-posts-no-posts {
	text-align: center;
	padding: 40px 20px;
	color: #999;
	font-size: 16px;
	background-color: #f9f9f9;
	border-radius: 8px;
}

/* Utility Classes */
.blok-post-link-button {
	display: inline-block;
	padding: 10px 20px;
	background-color: #0066cc;
	color: #fff;
	text-decoration: none;
	border-radius: 4px;
	transition: background-color 0.3s ease;
	font-weight: 500;
	font-size: 14px;
}

.blok-post-link-button:hover {
	background-color: #0052a3;
	color: #fff;
}

/* Custom CSS Class Support */
.blok-posts-container.full-width {
	max-width: 100%;
	margin-left: -100vw;
	margin-right: -100vw;
	padding-left: 100vw;
	padding-right: 100vw;
}

/* Print Styles */
@media print {
	.blok-post-card {
		page-break-inside: avoid;
		box-shadow: none;
		border: 1px solid #ddd;
	}

	.blok-post-link {
		display: none;
	}
}

/* Accessibility */
.blok-post-card:focus-within,
.blok-post-list-item:focus-within {
	outline: 2px solid #0066cc;
	outline-offset: 2px;
}

.blok-post-title a:focus,
.blok-post-link:focus {
	outline: 2px solid #0066cc;
	outline-offset: 2px;
}

/* Animation for fade-in */
@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.blok-post-card,
.blok-post-list-item {
	animation: fadeIn 0.3s ease;
}

/* Support for Divi's et_pb_row and other containers */
.et_pb_row .blok-posts-container,
body .blok-posts-container {
	width: 100%;
}
