/* Single post — related posts & back link */

body.single #content .halink-single-post {
	margin: 0;
}

body.single #content .halink-single-post > .halink-front-article {
	margin-bottom: 0;
}

/* Related posts */
.halink-related-posts {
	margin-top: 22px;
	padding: 20px 18px 18px;
	background: #fff;
	border: 1px solid rgba(0, 137, 201, 0.12);
	border-radius: 14px;
	box-shadow: 0 8px 24px rgba(15, 60, 90, 0.08);
}

.halink-related-posts__head {
	margin-bottom: 16px;
	padding-bottom: 12px;
	border-bottom: 2px solid rgba(0, 137, 201, 0.15);
}

.halink-related-posts__title {
	margin: 0 !important;
	padding: 0 !important;
	color: #127BC7 !important;
	font-size: 20px !important;
	font-weight: 700 !important;
	line-height: 1.35 !important;
	text-transform: uppercase;
	letter-spacing: 0.4px;
}

.halink-related-posts__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px;
}

.halink-related-card {
	overflow: hidden;
	background: #f8fcff;
	border: 1px solid rgba(0, 137, 201, 0.1);
	border-radius: 12px;
	transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.halink-related-card:hover {
	transform: translateY(-3px);
	border-color: rgba(0, 137, 201, 0.28);
	box-shadow: 0 10px 24px rgba(0, 137, 201, 0.14);
}

.halink-related-card__thumb {
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: 16 / 11;
	background: linear-gradient(135deg, #e8f4fb, #d9efe0);
}

.halink-related-card__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.halink-related-card:hover .halink-related-card__thumb img {
	transform: scale(1.06);
}

.halink-related-card__badge {
	position: absolute;
	left: 8px;
	top: 8px;
	z-index: 2;
	max-width: calc(100% - 16px);
	padding: 3px 8px;
	border-radius: 999px;
	background: linear-gradient(135deg, #0089c9, #00a8e8);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	line-height: 1.3;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.halink-related-card__body {
	padding: 10px 12px 12px;
}

.halink-related-card__date {
	display: block;
	margin-bottom: 6px;
	color: #7a8f9a;
	font-size: 12px;
	line-height: 1.3;
}

.halink-related-card__title {
	margin: 0 !important;
	padding: 0 !important;
	font-size: 14px !important;
	line-height: 1.45 !important;
}

.halink-related-card__title a {
	color: #1a4f7a;
	text-decoration: none;
	transition: color 0.2s ease;
}

.halink-related-card__title a:hover {
	color: #439f55;
}

.halink-single-back {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 18px;
	padding: 10px 16px;
	border-radius: 999px;
	background: #fff;
	border: 1px solid rgba(0, 137, 201, 0.2);
	color: #0089c9;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	box-shadow: 0 4px 14px rgba(0, 137, 201, 0.1);
	transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.halink-single-back svg {
	width: 16px;
	height: 16px;
}

.halink-single-back:hover {
	background: #0089c9;
	border-color: #0089c9;
	color: #fff;
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(0, 137, 201, 0.24);
}

@media (max-width: 991px) {
	.halink-related-posts__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Comments */
body.single #content .halink-comments ol,
body.single #content .halink-comments ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.halink-comments {
	margin-top: 22px;
	padding: 20px 18px 18px;
	background: #fff;
	border: 1px solid rgba(0, 137, 201, 0.12);
	border-radius: 14px;
	box-shadow: 0 8px 24px rgba(15, 60, 90, 0.08);
}

.halink-comments__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px 16px;
	margin-bottom: 16px;
	padding-bottom: 12px;
	border-bottom: 2px solid rgba(0, 137, 201, 0.15);
}

.halink-comments__title {
	margin: 0 !important;
	padding: 0 !important;
	color: #127BC7 !important;
	font-size: 20px !important;
	font-weight: 700 !important;
	line-height: 1.35 !important;
	text-transform: uppercase;
	letter-spacing: 0.4px;
	border: 0 !important;
}

.halink-comments__count {
	color: #7a8f9a;
	font-size: 13px;
	font-weight: 600;
}

.halink-comments__empty {
	margin: 0 0 16px;
	color: #4a5f6a;
	font-size: 14px;
}

.halink-comments__notice {
	margin: 0 0 16px;
	padding: 10px 14px;
	border-radius: 10px;
	font-size: 14px;
	line-height: 1.5;
}

.halink-comments__notice--ok {
	background: rgba(67, 159, 85, 0.1);
	border: 1px solid rgba(67, 159, 85, 0.28);
	color: #2e7d32;
}

.halink-comments__notice--err {
	background: rgba(211, 47, 47, 0.08);
	border: 1px solid rgba(211, 47, 47, 0.22);
	color: #c62828;
}

.halink-comment-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 18px !important;
}

.halink-comment-item {
	margin: 0;
	padding: 0;
}

.halink-comment {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 14px;
	background: #f8fcff;
	border: 1px solid rgba(0, 137, 201, 0.1);
	border-radius: 12px;
}

.halink-comment__avatar {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	line-height: 1;
}

.halink-comment__body {
	min-width: 0;
	flex: 1;
}

.halink-comment__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px 10px;
	margin-bottom: 6px;
}

.halink-comment__author {
	color: #1a4f7a;
	font-size: 15px;
}

.halink-comment__date {
	color: #7a8f9a;
	font-size: 12px;
	font-weight: 400;
}

.halink-comment__awaiting {
	margin: 0 0 8px;
	color: #c77800;
	font-size: 13px;
	font-style: italic;
}

.halink-comment__content {
	color: #3a5a6a;
	font-size: 14px;
	line-height: 1.65;
}

.halink-comment__content p {
	margin: 0 0 8px;
}

.halink-comment__content p:last-child {
	margin-bottom: 0;
}

.halink-comment__reply {
	margin-top: 8px;
}

.halink-comment__reply a {
	display: inline-flex;
	align-items: center;
	color: #0089c9;
	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
}

.halink-comment__reply a:hover {
	color: #439f55;
}

body.single #content .halink-comments .children {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 10px 0 0 28px;
	padding: 0 0 0 14px;
	border-left: 2px solid rgba(0, 137, 201, 0.16);
}

.halink-comments .comment-respond {
	margin-top: 4px;
	padding: 16px;
	background: linear-gradient(180deg, #f4fbff 0%, #fff 100%);
	border: 1px solid rgba(0, 137, 201, 0.14);
	border-radius: 12px;
}

.halink-comment-form__title,
.halink-comments .comment-reply-title {
	margin: 0 0 12px !important;
	padding: 0 !important;
	color: #127BC7 !important;
	font-size: 16px !important;
	font-weight: 700 !important;
	line-height: 1.35 !important;
	text-transform: uppercase;
	border: 0 !important;
}

.halink-comments .comment-reply-title small {
	margin-left: 8px;
	font-size: 13px;
	font-weight: 600;
	text-transform: none;
}

.halink-comments .comment-reply-title small a {
	color: #d32f2f;
	text-decoration: none;
}

.halink-comments .comment-notes,
.halink-comments .logged-in-as {
	margin: 0 0 12px;
	color: #7a8f9a;
	font-size: 13px;
}

.halink-comments .logged-in-as a {
	color: #0089c9;
}

.halink-comment-form {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
}

@media (min-width: 640px) {
	.halink-comment-form {
		grid-template-columns: 1fr 1fr;
	}

	.halink-comment-form .comment-notes,
	.halink-comment-form .logged-in-as,
	.halink-comment-form .comment-form-comment,
	.halink-comment-form .halink-comment-math,
	.halink-comment-form .form-submit,
	.halink-comment-form .comment-form-cookies-consent {
		grid-column: 1 / -1;
	}
}

.halink-comment-form p {
	margin: 0;
}

.halink-comment-form label {
	display: block;
	margin-bottom: 6px;
	color: #1a4f7a;
	font-size: 13px;
	font-weight: 700;
}

.halink-comment-form .required {
	color: #d32f2f;
}

.halink-comment-form input[type="text"],
.halink-comment-form input[type="email"],
.halink-comment-form input[type="number"],
.halink-comment-form textarea {
	width: 100%;
	max-width: 100%;
	padding: 10px 12px;
	border: 1px solid rgba(0, 137, 201, 0.2);
	border-radius: 8px;
	background: #fff;
	color: #1a3a4a;
	font-size: 14px;
	line-height: 1.4;
	box-sizing: border-box;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.halink-comment-form input:focus,
.halink-comment-form textarea:focus {
	outline: none;
	border-color: #0089c9;
	box-shadow: 0 0 0 3px rgba(0, 137, 201, 0.12);
}

.halink-comment-form textarea {
	min-height: 110px;
	resize: vertical;
}

.halink-comment-math {
	padding: 12px 14px;
	background: rgba(0, 137, 201, 0.06);
	border: 1px dashed rgba(0, 137, 201, 0.28);
	border-radius: 10px;
}

.halink-comment-math__q {
	display: inline-block;
	margin-left: 4px;
	color: #0089c9;
	font-weight: 700;
}

.halink-comment-math input[type="number"] {
	max-width: 140px;
}

.halink-comment-form .form-submit {
	margin: 0;
}

.halink-comment-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 22px;
	border: 0;
	border-radius: 999px;
	background: #0089c9;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 6px 16px rgba(0, 137, 201, 0.22);
	transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.halink-comment-submit:hover,
.halink-comment-submit:focus {
	background: #439f55;
	color: #fff;
	transform: translateY(-1px);
	box-shadow: 0 10px 22px rgba(67, 159, 85, 0.22);
}

.halink-comment-submit.is-loading {
	position: relative;
	pointer-events: none;
	opacity: 0.88;
}

.halink-comment-submit.is-loading::after {
	content: '';
	display: inline-block;
	width: 14px;
	height: 14px;
	margin-left: 8px;
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-top-color: #fff;
	border-radius: 50%;
	animation: halink-comment-spin 0.7s linear infinite;
	vertical-align: -2px;
}

@keyframes halink-comment-spin {
	to {
		transform: rotate(360deg);
	}
}

/* Toast notifications */
.halink-toast-root {
	position: fixed;
	top: 20px;
	right: 20px;
	z-index: 99999;
	display: flex;
	flex-direction: column;
	gap: 12px;
	width: min(380px, calc(100vw - 32px));
	pointer-events: none;
}

.halink-toast {
	position: relative;
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: start;
	gap: 12px;
	padding: 14px 14px 16px;
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.96);
	border: 1px solid rgba(0, 137, 201, 0.14);
	box-shadow:
		0 18px 40px rgba(15, 60, 90, 0.18),
		0 0 0 1px rgba(255, 255, 255, 0.65) inset;
	backdrop-filter: blur(10px);
	transform: translateX(calc(100% + 28px));
	opacity: 0;
	transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
	pointer-events: auto;
	overflow: hidden;
}

.halink-toast.is-visible {
	transform: translateX(0);
	opacity: 1;
}

.halink-toast.is-leaving {
	transform: translateX(calc(100% + 28px));
	opacity: 0;
}

.halink-toast__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 12px;
	flex-shrink: 0;
}

.halink-toast__icon svg {
	width: 22px;
	height: 22px;
}

.halink-toast--success .halink-toast__icon {
	background: linear-gradient(135deg, rgba(67, 159, 85, 0.18), rgba(0, 168, 232, 0.12));
	color: #2e7d32;
}

.halink-toast--error .halink-toast__icon {
	background: linear-gradient(135deg, rgba(211, 47, 47, 0.14), rgba(255, 152, 0, 0.1));
	color: #c62828;
}

.halink-toast__body {
	min-width: 0;
	padding-top: 2px;
}

.halink-toast__message {
	margin: 0;
	color: #1a4f7a;
	font-size: 14px;
	line-height: 1.55;
	font-weight: 600;
}

.halink-toast__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: #7a8f9a;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}

.halink-toast__close svg {
	width: 16px;
	height: 16px;
}

.halink-toast__close:hover,
.halink-toast__close:focus {
	background: rgba(0, 137, 201, 0.08);
	color: #0089c9;
}

.halink-toast__progress {
	position: absolute;
	left: 0;
	bottom: 0;
	height: 3px;
	width: 100%;
	transform-origin: left center;
	background: linear-gradient(90deg, #0089c9, #439f55);
	animation: halink-toast-progress 5.2s linear forwards;
}

.halink-toast--error .halink-toast__progress {
	background: linear-gradient(90deg, #ef5350, #ff9800);
}

@keyframes halink-toast-progress {
	from {
		transform: scaleX(1);
	}
	to {
		transform: scaleX(0);
	}
}

.halink-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

.halink-comments .comment-navigation,
.halink-comments .comments-pagination {
	margin: 0 0 16px;
}

.halink-comments .nav-links {
	display: flex;
	gap: 8px;
}

.halink-comments .nav-links a {
	color: #0089c9;
	font-weight: 700;
	text-decoration: none;
}

@media (max-width: 767px) {
	.halink-related-posts {
		padding: 16px 12px 12px;
	}

	.halink-related-posts__title {
		font-size: 17px !important;
	}

	.halink-related-posts__grid {
		grid-template-columns: 1fr;
		gap: 12px;
	}

	.halink-related-card {
		display: flex;
		align-items: stretch;
	}

	.halink-related-card__thumb {
		flex: 0 0 120px;
		width: 120px;
		aspect-ratio: auto;
		min-height: 90px;
	}

	.halink-related-card__body {
		flex: 1;
		display: flex;
		flex-direction: column;
		justify-content: center;
		min-width: 0;
	}

	.halink-comments {
		padding: 16px 12px 12px;
	}

	.halink-comments__title {
		font-size: 17px !important;
	}

	body.single #content .halink-comments .children {
		margin-left: 12px;
		padding-left: 10px;
	}

	.halink-comment {
		padding: 12px;
	}

	.halink-toast-root {
		top: auto;
		right: 16px;
		bottom: 16px;
		left: 16px;
		width: auto;
	}

	.halink-toast {
		transform: translateY(calc(100% + 24px));
	}

	.halink-toast.is-visible {
		transform: translateY(0);
	}

	.halink-toast.is-leaving {
		transform: translateY(calc(100% + 24px));
	}
}
