/*
 * Nueify — Print Stylesheet
 * Strips navigation, animations, and dark backgrounds for clean printing.
 */

@media print {

	/* Force white background / black text */
	*,
	*::before,
	*::after {
		background: #fff !important;
		color: #000 !important;
		box-shadow: none !important;
		text-shadow: none !important;
	}

	/* Hide non-essential elements */
	header,
	footer,
	nav,
	.wp-block-navigation,
	.wp-block-site-logo,
	aside,
	.wp-block-template-part[data-slug="sidebar"],
	.nueify-scroll-top,
	.cg-mode-toggle,
	.cg-preloader,
	.cg-cookie-consent,
	.cg-reading-progress,
	.cg-sharing,
	.cg-related-posts,
	.wp-block-post-comments-form,
	.cg-author-box__link,
	.skip-to-content-link,
	#wpadminbar {
		display: none !important;
	}

	/* Ensure links are visible */
	a,
	a:visited {
		text-decoration: underline;
	}

	/* Print URL after links */
	a[href]::after {
		content: " (" attr(href) ")";
		font-size: 0.75em;
		color: #555 !important;
	}

	/* Suppress URLs on internal/anchor/JS links */
	a[href^="#"]::after,
	a[href^="javascript:"]::after {
		content: "";
	}

	/* Images */
	img {
		max-width: 100% !important;
		page-break-inside: avoid;
	}

	/* Tables */
	table {
		border-collapse: collapse;
	}
	th,
	td {
		border: 1px solid #ccc !important;
		padding: 0.35rem 0.5rem;
	}

	/* Headings — avoid page breaks after headings */
	h1, h2, h3, h4, h5, h6 {
		page-break-after: avoid;
		font-family: "Roboto Serif", Georgia, serif !important;
	}

	/* Paragraphs — avoid widows and orphans */
	p {
		orphans: 3;
		widows: 3;
	}

	/* Blockquotes */
	blockquote {
		border-left: 3px solid #999 !important;
		padding-left: 1rem;
		margin-left: 0;
	}

	/* Code */
	pre,
	code {
		border: 1px solid #ccc !important;
		page-break-inside: avoid;
	}

	/* Remove WP admin bar spacing */
	html {
		margin-top: 0 !important;
	}

	/* Single column layout for print */
	.wp-block-columns {
		display: block !important;
	}
	.wp-block-column {
		flex-basis: 100% !important;
		max-width: 100% !important;
	}
}
