/* Card component */
.card {
	background-color: var(--bg-secondary);
	border: 1px solid var(--border-color);
	border-radius: var(--border-radius);
	box-shadow: var(--card-shadow);
	margin-bottom: 20px;
	color: var(--text-primary);
	transition: background-color .3s, border-color .3s;
}

.card:hover {
	box-shadow: 0 12px 28px rgba(0, 0, 0, .12);
	/* transform: translateY(-1px); */
	transition: box-shadow .25s, transform .25s;
}

.card-header {
	border-radius: 10px 10px 0 0 !important;
	background: linear-gradient(135deg, var(--header-grad-1), var(--header-grad-2));
	border-bottom: 1px solid rgba(var(--accent-primary-rgb), .20);
	color: var(--text-primary);
}

[data-theme="dark"] .card-header,
body.dark-mode .card-header {
	background: linear-gradient(135deg, var(--header-grad-1), var(--header-grad-2));
	border-bottom: 1px solid rgba(var(--accent-primary-brighter-rgb), .25);
}

.card-header.bg-primary,
.card-header.text-white,
.card-header.bg-primary.text-white {
	background: linear-gradient(135deg, var(--header-grad-1), var(--header-grad-2)) !important;
	background-color: transparent !important;
	color: var(--text-primary) !important;
	border-bottom: 1px solid rgba(var(--accent-primary-rgb), .20) !important;
}

[data-theme="dark"] .card-header.bg-primary,
[data-theme="dark"] .card-header.text-white,
[data-theme="dark"] .card-header.bg-primary.text-white,
body.dark-mode .card-header.bg-primary,
body.dark-mode .card-header.text-white,
body.dark-mode .card-header.bg-primary.text-white {
	border-bottom: 1px solid rgba(var(--accent-primary-brighter-rgb), .25) !important;
}

.diary-item {
	margin-bottom: 0 !important;
	/* Override default card margin since we're using grid gap */
	height: fit-content;
	cursor: pointer;
}

.diary-item .diary-title {
	word-wrap: break-word;
	word-break: break-word;
	overflow-wrap: break-word;
	hyphens: auto;
	line-height: 1.4;
	/* Limit title to maximum 3 lines */
	display: -webkit-box;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.diary-item .diary-content-trunc {
	word-wrap: break-word;
	word-break: break-word;
	overflow-wrap: break-word;
	hyphens: auto;
	line-height: 1.4;
	/* Limit content preview to maximum 4 lines */
	display: -webkit-box;
	-webkit-line-clamp: 4;
	line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
}


/* Responsive adjustments for diary content */
@media (max-width: 768px) {
	.diary-item .diary-title {
		-webkit-line-clamp: 2;
		/* Reduce to 2 lines on mobile */
		line-clamp: 2;
	}

	.diary-item .diary-content-trunc {
		-webkit-line-clamp: 3;
		/* Reduce to 3 lines on mobile */
		line-clamp: 3;
	}
}