/*
 * Peninsula Gastroenterology Medical Group — print stylesheet
 * https://www.gipractice.com/
 *
 * Include AFTER the screen stylesheets:
 * <link rel="stylesheet" href="/css/print.css" media="print">
 *
 * Tailored starting point based on the site's known page components.
 * The current live CSS/DOM could not be inspected completely, so compare
 * selector names with the deployed source before treating this as final.
 */

@page {
	margin: 0.65in;
}

@media print {
	/* --------------------------------------------
	   Page foundation
	-------------------------------------------- */
	html,
	body {
		width: auto !important;
		min-width: 0 !important;
		height: auto !important;
		margin: 0 !important;
		padding: 0 !important;
		overflow: visible !important;
		background: #fff !important;
		color: #000 !important;
	}

	body {
		font-family: Arial, Helvetica, sans-serif !important;
		font-size: 10.5pt !important;
		line-height: 1.4 !important;
	}

	*,
	*::before,
	*::after {
		box-shadow: none !important;
		text-shadow: none !important;
		animation: none !important;
		transition: none !important;
	}

	main,
	section,
	article,
	.content-container,
	.container,
	.inner-container {
		max-width: none !important;
		min-width: 0 !important;
	}

	main,
	.content-container,
	.container,
	.inner-container {
		width: 100% !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
	}

	/* Flatten decorative screen backgrounds and gradients. */
	body,
	header,
	main,
	main section,
	footer,
	.provider-display,
	.provider-item,
	.provider-panel,
	.provider-detail {
		background: transparent !important;
		background-image: none !important;
	}

	/* --------------------------------------------
	   Hide screen-only interface / media
	-------------------------------------------- */
	nav,
	.main-nav,
	.primary-nav,
	.mobile-nav,
	.menu-toggle,
	.mobile-menu-toggle,
	.nav-toggle,
	.hamburger,
	.video-toggle,
	.video-controls,
	.video-control,
	#hero-video,
	video,
	.hero-video,
	.hero-video-container,
	.video-banner,
	.video-background,
	.video-wrapper,
	.social,
	.social-links,
	.social-icons,
	.utility-bar,
	.top-utility-bar,
	.skip-link,
	.cookie-banner,
	.cookie-consent,
	#cookie-banner,
	#locations-map,
	.locations-map,
	.map-container,
	.leaflet-container,
	.leaflet-control-container,
	iframe[src*="maps"],
	footer, #services, .button.appointment-button, #mma-cookie-banner, #mma-cookie-settings-float, .sidenav {
		display: none !important;
	}

	/* Avoid fixed-height gaps left by the video / interactive maps. */
	.hero,
	.hero-banner,
	.banner,
	#physicians,
	.physicians {
		min-height: 0 !important;
		height: auto !important;
	}

	/* Keep actual header contact details and logo, if present. */
	header,
	.site-header,
	.header {
		position: static !important;
		min-height: 0 !important;
		height: auto !important;
		margin: 0 0 0.25in !important;
		padding: 0 0 0.1in !important;
		border-bottom: 1px solid #bbb !important;
	}

	header img,
	.site-header img {
		max-width: 2.8in !important;
		max-height: 1in !important;
		width: auto !important;
		height: auto !important;
	}

	/* --------------------------------------------
	   Typography and links
	-------------------------------------------- */
	h1,
	h2,
	h3,
	h4,
	h5,
	h6,
	p,
	li,
	dt,
	dd,
	th,
	td {
		color: #000 !important;
	}

	h1 {
		font-size: 20pt !important;
	}

	h2 {
		font-size: 16pt !important;
	}

	h3 {
		font-size: 13pt !important;
	}

	h4,
	h5,
	h6 {
		font-size: 11pt !important;
	}

	h1,
	h2,
	h3,
	h4,
	h5,
	h6 {
		line-height: 1.2 !important;
		margin-top: 0.15in !important;
		margin-bottom: 0.08in !important;
		break-after: avoid-page;
		page-break-after: avoid;
	}

	p,
	ul,
	ol {
		margin-top: 0 !important;
		margin-bottom: 0.1in !important;
	}

	a,
	a:link,
	a:visited {
		color: #000 !important;
		text-decoration: underline !important;
	}

	/* Do not append long link URLs: forms and interior pages can be link-heavy. */
	img,
	svg {
		max-width: 100% !important;
		height: auto !important;
	}

	/* --------------------------------------------
	   Physician accordion: print ALL biographies
	-------------------------------------------- */
	#physicians,
	.physicians,
	#physicians .content-container,
	#physicians .provider-display,
	#physicians .provider-item,
	#physicians .provider-panel,
	#physicians .provider-detail {
		position: static !important;
		width: 100% !important;
		max-width: none !important;
		min-width: 0 !important;
		height: auto !important;
		max-height: none !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
		overflow: visible !important;
		transform: none !important;
	}

	#physicians .provider-display,
	#physicians .provider-item,
	#physicians .provider-detail {
		display: block !important;
	}

	/* The visible provider title is already printed inside each biography. */
	#physicians .provider-label,
	#physicians .provider-button,
	#physicians .provider-expand-icon,
	#physicians .provider-collapse-icon {
		display: none !important;
	}

	/* Override initial HTML hidden attributes and JS screen states. */
	#physicians .provider-panel,
	#physicians .provider-panel[hidden] {
		display: block !important;
		visibility: visible !important;
		opacity: 1 !important;
		position: static !important;
		height: auto !important;
		max-height: none !important;
		overflow: visible !important;
		transform: none !important;
		padding: 0 !important;
	}

	#physicians .provider-item {
		padding: 0.12in 0 !important;
		margin: 0 0 0.08in !important;
		border-bottom: 1px solid #ccc !important;
	}

	#physicians .provider-item::after {
		content: "";
		display: table;
		clear: both;
	}

	#physicians .provider-detail img {
		float: left;
		width: auto !important;
		max-width: 1.25in !important;
		max-height: 1.7in !important;
		margin: 0 0.15in 0.08in 0 !important;
	}

	/* Read More controls are navigation, not needed on the printed bios. */
	#physicians .provider-panel a.button {
		display: none !important;
	}

	/* --------------------------------------------
	   Tables, images, and page breaks
	-------------------------------------------- */
	table {
		width: 100% !important;
		border-collapse: collapse !important;
	}

	th,
	td {
		padding: 0.05in !important;
		border: 1px solid #bbb !important;
		vertical-align: top !important;
	}

	thead {
		display: table-header-group;
	}

	tr,
	img,
	figure,
	blockquote {
		break-inside: avoid;
		page-break-inside: avoid;
	}

	p,
	li {
		orphans: 3;
		widows: 3;
	}

	/* Prevent fixed and sticky screen elements from covering printed pages. */
	.sticky,
	.fixed,
	.fixed-header {
		position: static !important;
	}
	
	
	/* Allow interior page content to flow naturally when printing */
	#main-content .inside-content {
		display: block !important;
		height: auto !important;
		min-height: 0 !important;
		overflow: visible !important;
		break-inside: auto !important;
		page-break-inside: auto !important;
	}

	/* Allow intro content and provider tables to span pages */
	#main-content .intro,
	#main-content table.providers {
		display: block;
		break-before: auto !important;
		break-inside: auto !important;
		page-break-before: auto !important;
		page-break-inside: auto !important;
	}

	/* Keep individual provider rows together */
	#main-content table.providers tr {
		break-inside: avoid;
		page-break-inside: avoid;
	}


}
