@media print {
	/* ========================================
	   BASE - Page Setup & Universal Resets
	   ======================================== */
	
	@page {
		margin: 2cm;
		size: a4;
	}

	* {
		background: transparent !important;
		color: black !important;
		box-shadow: none !important;
		text-shadow: none !important;
		justify-content: flex-start !important;
		align-items: flex-start !important;
		text-align: left !important;
	}

	body {
		font-size: 12pt;
		line-height: 1.4;
		color: black;
		background: white;
		display: block;
		grid-template-columns: none;
		grid-template-rows: none;
	}

	/* ========================================
	   UTILITIES - Hidden Elements & Helpers
	   ======================================== */
	
	header.page-header nav,
	#announcement-banner,
	.page-footer,
	.theme-switcher,
	.announcement-popup,
	.section-border,
	button:not(.print-keep),
	input[type="button"],
	input[type="submit"],
	.no-print {
		display: none !important;
	}

	.page-break {
		page-break-before: always;
		break-before: page;
	}

	/* ========================================
	   LAYOUT - Grid, Flexbox & Containers
	   ======================================== */
	
	/* Reset page layout grid */
	body > #announcement-banner,
	body > header.page-header,
	body > #content,
	body > footer.page-footer {
		grid-row: unset;
		display: block;
	}

	/* Convert content grid to single column */
	.grid {
		display: block;
		grid-template-columns: none;
		grid-gap: 0;
		grid-column-gap: 0;
	}

	.grid :is(.col-1, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8) {
		grid-column: unset;
		width: 100%;
		margin-bottom: 1rem;
	}

	/* Container & section spacing */
	.container {
		max-width: none;
		margin: 0;
		padding: 1.5rem;
		position: static;

		&.small-spacing {
			padding: 1.5rem;
		}
	}

	section,
	.background-contrast {
		margin: 0;
	}

	/* Reset flexbox layouts */
	.container,
	section,
	.grid,
	div:not(.icon-block, .pdf-preview-anchor),
	.home-hero-meetings,
	.home-club .container .col-4,
	.home-membership > .container {
		display: block !important;
		justify-content: unset !important;
		align-items: unset !important;
		flex-direction: unset !important;
		flex-wrap: unset !important;
		height: auto !important;
	}

	/* Text alignment overrides */
	.center-text :is(h1, h2, h3, h4, h5, h6, p, a, span) {
		text-align: left !important;
	}

	.page-header {
		border-bottom: 2px solid black;
		padding-bottom: 10pt;
	}

	main {
		margin: 0;
		padding: 0;
	}

	/* ========================================
	   COMPONENTS
	   ======================================== */
	
	/* Icon blocks - preserve layout */
	.icon-block {
		display: flex !important;
		justify-content: flex-start !important;
		align-items: flex-start !important;
	}

	/* Meetup highlight - use mobile layout */
	.upcoming-meetup-highlight {
		position: static !important;
		top: auto !important;
		left: auto !important;
		z-index: auto !important;
		display: flex !important;
		flex-direction: column !important;
		border: none !important;
		margin-bottom: 0.5rem;
	}

	/* Images & logos */
	img {
		max-width: 100% !important;
		height: auto !important;
	}

	.page-header img,
	.page-header svg,
	img[src*="logo"],
	svg[src*="logo"] {
		max-width: 10% !important;
		height: auto !important;
		width: auto !important;
	}

	/* Links */
	a[href]::after {
		content: " (" attr(href) ")";
		font-size: 10pt;
		color: #666;
	}

	a[href^="#"]::after,
	a[href^="/"]::after {
		content: "";
	}

	/* Tables */
	table {
		border-collapse: collapse;
		width: 100%;
	}

	th, td {
		border: 1px solid #ddd;
		padding: 8px;
		text-align: left;
	}

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

	/* Boxes */
	.box {
		box-shadow: none !important;
		transform: none !important;
		transition: none !important;
		background: white !important;
	}

	/* Galleries */
	.gallery {
		display: block !important;
	}

	.gallery-frame {
		aspect-ratio: unset !important;
		height: auto !important;
		overflow: visible !important;
		position: static !important;
		background: transparent !important;
	}

	.gallery-frame figure {
		display: block !important;
		opacity: 1 !important;
		margin-bottom: 0.5rem;
	}

	.gallery-frame figure:not(:first-child) {
		display: none !important;
	}

	.gallery-actions,
	.gallery-frame-expand,
	.gallery-dialog {
		display: none !important;
	}

	/* ========================================
	   TYPOGRAPHY & PAGE BREAKS
	   ======================================== */
	
	h1, h2, h3, h4, h5, h6 {
		page-break-after: avoid;
		break-after: avoid;
	}

	p {
		margin: 10pt 0;
		orphans: 3;
		widows: 3;
	}

	img, 
	pre, 
	blockquote, 
	table, 
	figure {
		page-break-inside: avoid;
		break-inside: avoid;
	}

	/* ========================================
	   PAGES - Page-specific overrides
	   ======================================== */
	
	/* Home page */
	.home-membership .container,
	.home-membership .membership-benefits {
		align-items: flex-start !important;
		width: 100% !important;
	}

	.home-hero-meetings-actions {
		margin-top: 0.5cm;
	}

	.home-hero,
	.home-club,
	.home-membership {
		position: static !important;
		z-index: auto !important;
	}

	/* Magazine pages */
	.kakteenblaetter-intro .grid {
		grid-column-gap: 1rem !important;
	}

	.kakteenblaetter-list {
		grid-row-gap: 1rem !important;
		margin-block: 1rem !important;
	}

	.kakteenblaetter-list .box {
		transform: none !important;
		box-shadow: none !important;
		transition: none !important;
	}

	.kakteenblaetter-cover {
		margin-bottom: 0.5rem !important;
		max-width: 8cm !important;
	}

	.kakteenblaetter-toc li {
		grid-template-columns: 1fr !important;
		gap: 0.25rem !important;
		padding: 0.5rem !important;
		border-radius: 0 !important;
	}

	/* Kakteentage (Event) page */
	.template-kakteentage::before {
		display: none !important;
	}

	.kakteentage-hero {
		position: static !important;
		height: auto !important;
	}

	.kakteentage-hero::after {
		display: none !important;
	}

	.kakteentage-hero .container {
		height: auto !important;
		display: block !important;
		justify-content: unset !important;
		align-items: unset !important;
	}

	.kakteentage-hero h1 {
		background: transparent !important;
		padding: 0 !important;
		border-radius: 0 !important;
		text-shadow: none !important;
		text-align: left !important;
		display: block !important;
	}

	[data-map] {
		display: none !important;
	}

	/* Article/Blog pages */
	.article-content {
		width: 100% !important;
		margin-top: 1rem !important;
	}

	/* Program page */
	.program-list-content {
		flex-direction: column !important;
		align-items: flex-start !important;
		gap: 0.5rem !important;
	}

	/* Imprint page */
	.template-imprint main h1 {
		text-align: left !important;
		margin-bottom: 1rem !important;
	}

	.imprint-info li {
		padding: 0.5rem 0 !important;
		border-bottom: 1px solid #ddd !important;
	}

	/* Privacy page */
	.template-privacy main h1 {
		text-align: left !important;
		margin-bottom: 1rem !important;
	}

	.privacy-list {
		width: 100% !important;
		margin-inline: 0 !important;
	}

	/* PDF preview component */
	.pdf-preview-anchor {
		position: static !important;
		display: block !important;
	}

	.pdf-preview-shadow-copy {
		display: none !important;
	}
} 