/* --- CARD CONTAINER --- */
.card {
	background-color: #fefefe;
	border: 1px solid #eaeaea;
	border-radius: 12px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
	overflow: hidden;
	position: relative;
	transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

/* --- Make links inside card inherit text style --- */
.card a {
	text-decoration: none;
	color: inherit;
}

/* --- HOVER EFFECT --- */
.card:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
	background-color: #ffffff;
	border-color: #d4edda;
}

/* --- CARD IMAGE --- */
/* --- CARD IMAGE WRAPPER --- */
.card-img-wrapper {
	position: relative;
	width: 100%;
	height: 220px;
	overflow: hidden;
	border-top-left-radius: 12px;
	border-top-right-radius: 12px;
}

/* --- BLURRED BACKGROUND IMAGE --- */
.card-img-wrapper::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: var(--bg-img);
	background-size: cover;
	background-position: center;
	filter: blur(20px) brightness(0.8);
	transform: scale(1.2);
	z-index: 1;
}

/* --- MAIN FOREGROUND IMAGE --- */
.card-img-top {
	position: relative;
	z-index: 2;
	width: 100%;
	height: 100%;
	object-fit: contain;
	/* show full image without crop */
	background-color: #f8f9fa;
	display: block;
}


/* --- CARD BODY --- */
.card-body {
	padding: 1.5rem;
}

.card-title {
	font-size: 1.25rem;
	font-weight: 600;
	color: #333;
	margin-bottom: 0.75rem;
}

/* --- Highlighted Text --- */
.card-title mark,
.card-text mark {
	background-color: yellow;
	padding: 0;
	font-weight: 600;
}

/* --- CARD TEXT / DESCRIPTION --- */
.card-text {
	font-size: 0.95rem;
	color: #666;
	line-height: 1.5;
	height: 2.8em;
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

/* --- CARD FOOTER --- */
.card-footer {
	background-color: transparent;
	border-top: none;
	padding: 0 1.5rem 1rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

/* --- BADGE STYLE --- */
.card-footer .badge {
	font-size: 0.75rem;
	background-color: #71c55d;
	color: #fff;
	padding: 0.4em 0.75em;
	border-radius: 50px;
	cursor: pointer;
	transition: background-color 0.3s ease;
	display: inline-block;
}

.card-footer .badge:hover {
	background-color: #5dae4a;
}

/* --- SOCIAL MEDIA BUTTONS --- */
.social-buttons {
	position: absolute;
	top: 12px;
	right: 12px;
	display: flex;
	gap: 6px;
	z-index: 1;
}

.social-buttons a {
	background-color: rgba(0, 0, 0, 0.4);
	color: white;
	padding: 8px;
	border-radius: 50%;
	font-size: 1rem;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.3s ease, transform 0.2s ease;
}

.social-buttons a:hover {
	background-color: #71c55d;
	transform: scale(1.1);
}

.social-buttons a:focus {
	outline: 2px solid #198754;
	outline-offset: 2px;
}

/* --- SHARE BUTTONS (on hover) --- */
.blog-card .share-buttons {
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s ease;
}

.blog-card:hover .share-buttons {
	opacity: 1;
	pointer-events: auto;
}

/* --- READ MORE BUTTON --- */
.read-more-btn {
	background-color: #198754;
	color: #ffffff !important;
	/* Force white text */
	border-radius: 4px;
	padding: 0.3rem 0.75rem;
	font-size: 0.8rem;
	font-weight: 500;
	display: inline-block;
	text-decoration: none;
	/* Remove underline */
	transition: background-color 0.3s ease;
}

.read-more-btn:hover {
	background-color: #157347;
	color: #ffffff !important;
	/* Keep text white on hover */
	cursor: pointer;
	text-decoration: none;
}

/* --- PAGINATION BUTTONS --- */
.pagination-btn {
	padding: 0.5rem 1rem;
	background-color: #f8f9fa;
	border: 1px solid #dee2e6;
	border-radius: 0.25rem;
	color: #198754;
	cursor: pointer;
	font-weight: 500;
	margin: 0 0.2rem;
	transition: all 0.3s ease;
}

.pagination-btn:hover:not(.disabled) {
	background-color: #e9f7ef;
	transform: translateY(-2px);
}

.pagination-btn.active {
	background-color: #198754;
	color: white;
	border-color: #198754;
}

.pagination-btn.disabled {
	color: #6c757d;
	cursor: not-allowed;
	opacity: 0.65;
}

/* --- RESPONSIVE TWEAKS --- */
@media (max-width: 768px) {
	.card-body {
		padding: 1rem;
	}

	.card-img-top {
		height: 180px;
	}

	.card-title {
		font-size: 1.1rem;
	}
}

@media (max-width: 576px) {
	.card-footer {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.5rem;
	}

	.social-buttons {
		flex-direction: row;
		position: static;
		margin-top: 0.5rem;
	}
}