/* ============================================
   Print Styles
   Optimized for printing blog posts
   ============================================ */

@media print {
	/* ----------------------------------------
	   Reset backgrounds and colors
	   ---------------------------------------- */
	*,
	*::before,
	*::after {
		background: transparent !important;
		color: #000 !important;
		box-shadow: none !important;
		text-shadow: none !important;
	}

	body {
		font-size: 12pt;
		line-height: 1.5;
	}

	/* ----------------------------------------
	   Hide non-essential elements
	   ---------------------------------------- */
	header,
	footer,
	nav,
	.fca-header,
	.fca-footer,
	.fca-single-sidebar,
	.fca-sidebar-sticky,
	.fca-toc,
	.fca-back-link,
	.fca-copy-link,
	.fca-code-copy,
	.fca-theme-toggle,
	.fca-header-search,
	.fca-mobile-search-toggle,
	.fca-search-modal,
	.fca-categories-dropdown,
	.fca-login-link,
	.fca-user-dropdown,
	.fca-edit-link,
	.fca-sticky-related,
	.fca-related-posts,
	.fca-comments-section,
	.fca-category-pills,
	.wp-block-post-terms.fca-category-pill,
	.wp-block-comments,
	.comment-respond,
	#respond,
	.navigation,
	.wp-block-query-pagination,
	.wp-block-navigation,
	[aria-hidden="true"] {
		display: none !important;
	}

	/* ----------------------------------------
	   Layout adjustments
	   ---------------------------------------- */
	.wp-block-columns {
		display: block !important;
	}

	.wp-block-column {
		flex-basis: 100% !important;
		width: 100% !important;
	}

	.alignwide,
	.alignfull {
		width: 100% !important;
		max-width: 100% !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
	}

	main,
	article,
	.wp-block-post-content {
		width: 100% !important;
		max-width: 100% !important;
		padding: 0 !important;
		margin: 0 !important;
	}

	/* ----------------------------------------
	   Typography
	   ---------------------------------------- */
	h1 {
		font-size: 24pt;
		margin-bottom: 12pt;
	}

	h2 {
		font-size: 18pt;
		margin-top: 18pt;
		margin-bottom: 8pt;
	}

	h3 {
		font-size: 14pt;
		margin-top: 14pt;
		margin-bottom: 6pt;
	}

	h4, h5, h6 {
		font-size: 12pt;
		margin-top: 12pt;
		margin-bottom: 4pt;
	}

	p, li, td, th {
		font-size: 11pt;
		line-height: 1.6;
	}

	/* ----------------------------------------
	   Links - show URL
	   ---------------------------------------- */
	a[href]::after {
		content: " (" attr(href) ")";
		font-size: 9pt;
		color: #666 !important;
		word-break: break-all;
	}

	/* Don't show URL for internal/anchor links */
	a[href^="#"]::after,
	a[href^="javascript"]::after,
	.fca-post-title a::after,
	h1 a::after,
	h2 a::after,
	h3 a::after {
		content: none;
	}

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

	.wp-block-image {
		margin: 12pt 0;
	}

	figure {
		page-break-inside: avoid;
	}

	figcaption {
		font-size: 9pt;
		font-style: italic;
	}

	/* ----------------------------------------
	   Code blocks
	   ---------------------------------------- */
	pre,
	code,
	.wp-block-code,
	.wp-block-preformatted {
		background: #f5f5f5 !important;
		border: 1px solid #ccc !important;
		color: #000 !important;
		font-size: 9pt !important;
		white-space: pre-wrap !important;
		word-wrap: break-word !important;
		page-break-inside: avoid;
		padding: 8pt !important;
	}

	code {
		padding: 1pt 3pt !important;
	}

	/* Syntax highlighting - make all same color for print */
	pre [class*="token"],
	code [class*="token"],
	.hljs-keyword,
	.hljs-string,
	.hljs-number,
	.hljs-comment {
		color: #000 !important;
	}

	/* ----------------------------------------
	   Tables
	   ---------------------------------------- */
	table {
		border-collapse: collapse;
		width: 100%;
		page-break-inside: avoid;
	}

	th, td {
		border: 1px solid #ccc !important;
		padding: 6pt 8pt;
		text-align: left;
	}

	th {
		background: #f0f0f0 !important;
		font-weight: bold;
	}

	/* ----------------------------------------
	   Blockquotes
	   ---------------------------------------- */
	blockquote,
	.wp-block-quote {
		border-left: 3pt solid #ccc !important;
		margin: 12pt 0;
		padding-left: 12pt;
		font-style: italic;
	}

	/* ----------------------------------------
	   Lists
	   ---------------------------------------- */
	ul, ol {
		margin: 8pt 0;
		padding-left: 20pt;
	}

	li {
		margin-bottom: 4pt;
	}

	/* ----------------------------------------
	   Page breaks
	   ---------------------------------------- */
	h1, h2, h3, h4, h5, h6 {
		page-break-after: avoid;
		page-break-inside: avoid;
	}

	p, blockquote, ul, ol, table, figure, pre {
		orphans: 3;
		widows: 3;
	}

	/* ----------------------------------------
	   Post meta (show author and date)
	   ---------------------------------------- */
	.fca-post-hero-meta {
		display: block !important;
		margin-bottom: 12pt;
		padding-bottom: 12pt;
		border-bottom: 1pt solid #ccc;
	}

	.fca-post-hero-meta .wp-block-avatar {
		display: none !important;
	}

	/* ----------------------------------------
	   Alerts
	   ---------------------------------------- */
	.fca-alert {
		border: 1px solid #ccc !important;
		padding: 8pt;
		margin: 12pt 0;
	}

	/* ----------------------------------------
	   Print-specific info
	   ---------------------------------------- */
	@page {
		margin: 2cm;
	}

	/* Add URL at the bottom */
	body::after {
		content: "Impresso de: " attr(data-url);
		display: block;
		margin-top: 24pt;
		font-size: 9pt;
		color: #666 !important;
	}
}
