/* VN Custom Posts Widget Styles - Flatsome Compatible */

.vn-custom-posts-widget {
	margin: 20px 0;
}

/* Flatsome Grid System Support */
.vn-custom-posts-widget.row {
	display: flex;
	flex-wrap: wrap;
	/* margin-left: -15px; */
	/* margin-right: -15px; */
}

.vn-custom-posts-widget .col {
	position: relative;
	padding-left: 15px;
	padding-right: 15px;
	margin-bottom: 30px;
}

.vn-custom-posts-widget .col-inner {
	height: 100%;
}

/* Column Spacing */
.vn-custom-posts-widget.row-small {
	margin-left: -7.5px;
	margin-right: -7.5px;
}

.vn-custom-posts-widget.row-small .col {
	padding-left: 7.5px;
	padding-right: 7.5px;
}

.vn-custom-posts-widget.row-large {
	margin-left: -30px;
	margin-right: -30px;
}

.vn-custom-posts-widget.row-large .col {
	padding-left: 30px;
	padding-right: 30px;
}

.vn-custom-posts-widget.row-xlarge {
	margin-left: -45px;
	margin-right: -45px;
}

.vn-custom-posts-widget.row-xlarge .col {
	padding-left: 45px;
	padding-right: 45px;
}

/* Text Alignment */
.vn-custom-posts-widget.align-left {
	text-align: left;
}

.vn-custom-posts-widget.align-center {
	text-align: center;
}

.vn-custom-posts-widget.align-right {
	text-align: right;
}

/* Text Color */
.vn-custom-posts-widget.text-dark {
	color: #333;
}

.vn-custom-posts-widget.text-light {
	color: #fff;
}

/* Text Size */
.vn-custom-posts-widget.text-small {
	font-size: 0.9em;
}

.vn-custom-posts-widget.text-large {
	font-size: 1.1em;
}

.vn-custom-posts-widget.text-xlarge {
	font-size: 1.2em;
}

/* Post Item */
.vn-post-item {
	background: #fff;
	border: 1px solid #e1e5e9;
	border-radius: 8px;
	overflow: hidden;
	transition: box-shadow 0.3s ease;
	height: 100%;
	display: flex;
	flex-direction: column;
}

.vn-post-item:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.vn-post-item .box-image {
	width: 100%;
}

/* Image Styles */
.vn-post-thumbnail {
	position: relative;
	overflow: hidden;
	width: 100%;
}

.vn-post-thumbnail a {
	display: block;
}

.vn-post-thumbnail img {
	width: 100%;
	height: auto;
	display: block;
	transition: transform 0.3s ease;
}

.vn-post-thumbnail:hover img {
	transform: scale(1.05);
}

/* Image Aspect Ratios */
.vn-post-thumbnail.aspect-ratio-1_1 {
	padding-bottom: 100%;
}

.vn-post-thumbnail.aspect-ratio-4_3 {
	padding-bottom: 75%;
}

.vn-post-thumbnail.aspect-ratio-3_2 {
	padding-bottom: 66.67%;
}

.vn-post-thumbnail.aspect-ratio-16_9 {
	padding-bottom: 56.25%;
}

.vn-post-thumbnail.aspect-ratio-2_1 {
	padding-bottom: 50%;
}

.vn-post-thumbnail.aspect-ratio-3_4 {
	padding-bottom: 133.33%;
}

.vn-post-thumbnail.aspect-ratio-2_3 {
	padding-bottom: 150%;
}

.vn-post-thumbnail[class*="aspect-ratio"] a,
.vn-post-thumbnail[class*="aspect-ratio"] img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Custom Ratio Support (padding-bottom set via inline style) */
.vn-post-thumbnail.vn-custom-ratio {
	position: relative;
	overflow: hidden;
}

.vn-post-thumbnail.vn-custom-ratio a,
.vn-post-thumbnail.vn-custom-ratio img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Image Overlays */
.vn-post-thumbnail.overlay-icon::before {
	content: "\f06e";
	font-family: "Font Awesome 5 Free";
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	color: #fff;
	font-size: 24px;
	opacity: 0;
	transition: opacity 0.3s ease;
	z-index: 2;
}

.vn-post-thumbnail.overlay-icon:hover::before {
	opacity: 1;
}

.vn-post-thumbnail.overlay-fade::after {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.3);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.vn-post-thumbnail.overlay-fade:hover::after {
	opacity: 1;
}

.vn-post-thumbnail.overlay-color::after {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: var(--primary-color, #007cba);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.vn-post-thumbnail.overlay-color:hover::after {
	opacity: 0.7;
}

/* Content */
.vn-post-content {
	padding: 20px;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.vn-post-title {
	margin: 0 0 10px;
	font-size: 18px;
	line-height: 1.5;
}

.vn-post-title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.3s ease;
}

.vn-post-title a:hover {
	color: var(--primary-color, #007cba);
}

.vn-post-meta {
	margin: 0 0 15px;
	font-size: 14px;
	opacity: 0.7;
	display: flex;
	gap: 15px;
	flex-wrap: wrap;
}

.vn-post-category,
.vn-post-date,
.vn-post-author {
	display: inline-block;
}

.vn-post-category a {
	color: inherit;
	text-decoration: none;
}

.vn-post-excerpt {
	margin: 0 0 15px;
	line-height: 1.6;
	flex: 1;
}

.vn-post-read-more {
	margin-top: auto;
}

.vn-read-more-btn {
	display: inline-block;
	padding: 8px 16px;
	background: var(--primary-color, #007cba);
	color: #fff;
	text-decoration: none;
	border-radius: 4px;
	font-size: 14px;
	transition: background-color 0.3s ease;
}

.vn-read-more-btn:hover {
	background: var(--primary-color-dark, #005177);
	color: #fff;
}

.vn-no-posts {
	text-align: center;
	padding: 40px 20px;
	opacity: 0.7;
	font-style: italic;
}

/* Responsive Grid System */
@media (min-width: 992px) {
	.vn-custom-posts-widget .large-1 { flex: 0 0 8.33333%; max-width: 8.33333%; }
	.vn-custom-posts-widget .large-2 { flex: 0 0 16.66667%; max-width: 16.66667%; }
	.vn-custom-posts-widget .large-3 { flex: 0 0 25%; max-width: 25%; }
	.vn-custom-posts-widget .large-4 { flex: 0 0 33.33333%; max-width: 33.33333%; }
	.vn-custom-posts-widget .large-5 { flex: 0 0 41.66667%; max-width: 41.66667%; }
	.vn-custom-posts-widget .large-6 { flex: 0 0 50%; max-width: 50%; }
	.vn-custom-posts-widget .large-7 { flex: 0 0 58.33333%; max-width: 58.33333%; }
	.vn-custom-posts-widget .large-8 { flex: 0 0 66.66667%; max-width: 66.66667%; }
	.vn-custom-posts-widget .large-9 { flex: 0 0 75%; max-width: 75%; }
	.vn-custom-posts-widget .large-10 { flex: 0 0 83.33333%; max-width: 83.33333%; }
	.vn-custom-posts-widget .large-11 { flex: 0 0 91.66667%; max-width: 91.66667%; }
	.vn-custom-posts-widget .large-12 { flex: 0 0 100%; max-width: 100%; }
	.vn-custom-posts-widget .large-1-5 { flex: 0 0 20%; max-width: 20%; }
}

@media (min-width: 768px) and (max-width: 991px) {
	.vn-custom-posts-widget .medium-1 { flex: 0 0 8.33333%; max-width: 8.33333%; }
	.vn-custom-posts-widget .medium-2 { flex: 0 0 16.66667%; max-width: 16.66667%; }
	.vn-custom-posts-widget .medium-3 { flex: 0 0 25%; max-width: 25%; }
	.vn-custom-posts-widget .medium-4 { flex: 0 0 33.33333%; max-width: 33.33333%; }
	.vn-custom-posts-widget .medium-5 { flex: 0 0 41.66667%; max-width: 41.66667%; }
	.vn-custom-posts-widget .medium-6 { flex: 0 0 50%; max-width: 50%; }
	.vn-custom-posts-widget .medium-7 { flex: 0 0 58.33333%; max-width: 58.33333%; }
	.vn-custom-posts-widget .medium-8 { flex: 0 0 66.66667%; max-width: 66.66667%; }
	.vn-custom-posts-widget .medium-9 { flex: 0 0 75%; max-width: 75%; }
	.vn-custom-posts-widget .medium-10 { flex: 0 0 83.33333%; max-width: 83.33333%; }
	.vn-custom-posts-widget .medium-11 { flex: 0 0 91.66667%; max-width: 91.66667%; }
	.vn-custom-posts-widget .medium-12 { flex: 0 0 100%; max-width: 100%; }
}

@media (max-width: 767px) {
	.vn-custom-posts-widget .small-1 { flex: 0 0 8.33333%; max-width: 8.33333%; }
	.vn-custom-posts-widget .small-2 { flex: 0 0 16.66667%; max-width: 16.66667%; }
	.vn-custom-posts-widget .small-3 { flex: 0 0 25%; max-width: 25%; }
	.vn-custom-posts-widget .small-4 { flex: 0 0 33.33333%; max-width: 33.33333%; }
	.vn-custom-posts-widget .small-5 { flex: 0 0 41.66667%; max-width: 41.66667%; }
	.vn-custom-posts-widget .small-6 { flex: 0 0 50%; max-width: 50%; }
	.vn-custom-posts-widget .small-7 { flex: 0 0 58.33333%; max-width: 58.33333%; }
	.vn-custom-posts-widget .small-8 { flex: 0 0 66.66667%; max-width: 66.66667%; }
	.vn-custom-posts-widget .small-9 { flex: 0 0 75%; max-width: 75%; }
	.vn-custom-posts-widget .small-10 { flex: 0 0 83.33333%; max-width: 83.33333%; }
	.vn-custom-posts-widget .small-11 { flex: 0 0 91.66667%; max-width: 91.66667%; }
	.vn-custom-posts-widget .small-12 { flex: 0 0 100%; max-width: 100%; }
	
	.vn-post-content {
		padding: 15px;
	}
	
	.vn-post-title {
		font-size: 16px;
	}
	
	.vn-post-meta {
		flex-direction: column;
		gap: 5px;
	}
}
