/**
 * Print Stylesheet - DineroEnUSA (DP-1)
 * WSJ-quality print output for financial content.
 * Enqueued via functions.php with media="print"
 */

@media print {

	/* === HIDE NON-ESSENTIAL ELEMENTS === */
	header,
	footer,
	.sidebar,
	.widget-area,
	nav,
	.breadcrumbs,
	.comments-area,
	.wp-block-navigation,
	.search-modal,
	.social-share,
	.theme-related-posts,
	.ez-toc-container,
	.generatepress-header,
	.site-header,
	.site-footer,
	[role="navigation"],
	button,
	.no-print {
		display: none !important;
	}

	/* === OPTIMIZE MAIN CONTENT === */
	body {
		font-family: Georgia, 'Times New Roman', serif;
		font-size: 12pt;
		line-height: 1.5;
		color: #000;
		background: #fff;
	}

	.site-content,
	.entry-content,
	.inside-article {
		width: 100%;
		max-width: none;
		margin: 0;
		padding: 0;
	}

	/* Remove shadows and decorative borders */
	*,
	*::before,
	*::after {
		box-shadow: none !important;
		text-shadow: none !important;
	}

	/* === TYPOGRAPHY FOR PRINT === */
	h1,
	h2,
	h3,
	h4 {
		font-family: Georgia, serif;
		page-break-after: avoid;
		margin-top: 1em;
	}

	h1 {
		font-size: 24pt;
	}

	h2 {
		font-size: 18pt;
		border-bottom: 1pt solid #000;
		padding-bottom: 4pt;
	}

	h3 {
		font-size: 14pt;
	}

	h4 {
		font-size: 12pt;
	}

	p,
	li {
		orphans: 3;
		widows: 3;
	}

	/* === LINKS - Show URLs for external === */
	a[href^="http"]:after {
		content: " (" attr(href) ")";
		font-size: 9pt;
		color: #666;
		word-break: break-all;
	}

	/* Don't show URL for internal/anchor links */
	a[href^="#"]:after,
	a[href^="javascript"]:after,
	a[href^="/"]:after {
		content: "";
	}

	/* Reset link styling */
	a {
		color: #000;
		text-decoration: underline;
		box-shadow: none;
	}

	/* === TABLES - Financial Data === */
	table {
		border-collapse: collapse;
		width: 100%;
		page-break-inside: avoid;
		margin: 1em 0;
	}

	th,
	td {
		border: 1px solid #000;
		padding: 8px;
		text-align: left;
	}

	th {
		background: #f0f0f0 !important;
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
		font-weight: bold;
	}

	/* Numeric columns */
	td[data-type="number"],
	.numeric {
		text-align: right;
		font-variant-numeric: tabular-nums;
	}

	/* === IMAGES === */
	img {
		max-width: 100%;
		page-break-inside: avoid;
	}

	figure {
		margin: 1em 0;
		page-break-inside: avoid;
	}

	figcaption {
		font-size: 10pt;
		font-style: italic;
		color: #666;
	}

	/* === PAGE BREAKS === */
	.tarjeta_features_box,
	.theme-etf-card,
	blockquote,
	.alert,
	pre {
		page-break-inside: avoid;
	}

	/* Force page break before major sections */
	.page-break-before {
		page-break-before: always;
	}

	/* === LISTS === */
	.entry-content ul li,
	.entry-content ol li {
		background: none;
		border-left: none;
		padding-left: 0;
	}

	.entry-content ul li::before {
		content: "• ";
		color: #000;
	}

	.entry-content ol li::before {
		background: none;
		color: #000;
		padding: 0;
		margin-right: 8px;
	}

	/* === BLOCKQUOTES === */
	blockquote {
		border-left: 3pt solid #000;
		padding-left: 12pt;
		margin: 1em 0;
		font-style: italic;
	}

	/* === CODE BLOCKS === */
	pre,
	code {
		font-family: 'Courier New', monospace;
		font-size: 10pt;
		background: #f5f5f5 !important;
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
	}

	pre {
		padding: 12pt;
		border: 1pt solid #ccc;
		page-break-inside: avoid;
		white-space: pre-wrap;
	}

	/* === CREDIT CARD REVIEW BOXES === */
	.tarjeta_features_box {
		border: 1pt solid #000;
		padding: 12pt;
		margin: 1em 0;
		background: #f9f9f9 !important;
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
	}

	/* === FOOTER/BRANDING === */
	@page {
		margin: 2cm;
	}

	/* Add site URL at bottom */
	body::after {
		content: "Impreso desde dineroenusa.com";
		display: block;
		text-align: center;
		font-size: 9pt;
		color: #666;
		margin-top: 2em;
		padding-top: 1em;
		border-top: 1pt solid #ccc;
	}
}