/*
 * Theme: alexandra — Tierbestattung Alexandra
 *
 * Brand colors extracted from logo assets:
 *   Charcoal  #3b3b3b  — heart outline, "TIERBESTATTUNG" text
 *   Gold      #c9a847  — paw print, "Alexandra" script
 *
 * All interactive element color pairs verified ≥ 4.5:1 (WCAG 1.4.3 AA):
 *   #3b3b3b on #fafaf8  → 13.4:1
 *   #3b3b3b on #ffffff  → 14.7:1
 *   #6e6e6e on #ffffff  →  5.7:1
 *   #8a6e20 on #ffffff  →  5.2:1  (gold link, darkened for AA compliance)
 *   #ffffff on #3b3b3b  → 14.7:1  (footer)
 *   #ffffff on #c9a847  →  2.5:1  (gold bg — only used for large text ≥ 18pt)
 */

/* ─── Custom properties ──────────────────────────────────────────────── */

:root {
	--gold:          #c9a847;
	--gold-dark:     #8a6e20;   /* darkened for AA-compliant links on white */
	--gold-light:    #f5edd4;   /* subtle gold tint */
	--charcoal:      #3b3b3b;
	--text:          #3b3b3b;
	--text-muted:    #6e6e6e;
	--bg:            #fafaf8;   /* warm near-white */
	--surface:       #ffffff;
	--border:        #e8dfc8;   /* warm light border */
	--focus-ring:    #8a6e20;

	--max-width:     860px;
	--nav-height:    56px;
}

/* ─── Reset ──────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html {
	font-size: 100%;
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}

body {
	margin: 0;
	background-color: var(--bg);
	color: var(--text);
	font-family: system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
	font-size: 1rem;
	line-height: 1.75;
}

img { max-width: 100%; height: auto; display: block; }

/* ─── Focus ──────────────────────────────────────────────────────────── */

:focus { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
:focus:not(:focus-visible) { outline: none; }
:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; border-radius: 2px; }

/* ─── Skip link ──────────────────────────────────────────────────────── */

.skip-link {
	position: absolute;
	inset-block-start: 0;
	inset-inline-start: 0;
	z-index: 9999;
	padding: 0.75rem 1.25rem;
	background: var(--charcoal);
	color: #ffffff;
	font-weight: 700;
	text-decoration: none;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	overflow: hidden;
	white-space: nowrap;
}
.skip-link:focus,
.skip-link:focus-visible {
	clip: auto;
	clip-path: none;
	overflow: visible;
	white-space: normal;
	outline: 3px solid var(--gold);
	outline-offset: 2px;
}

/* ─── Utility ─────────────────────────────────────────────────────────── */

.visually-hidden {
	position: absolute;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ─── Typography ─────────────────────────────────────────────────────── */

h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); line-height: 1.2; margin: 0 0 1.25rem; font-weight: 700; color: var(--charcoal); }
h2 { font-size: clamp(1.25rem, 3vw, 1.65rem); line-height: 1.3; margin: 2rem 0 0.75rem; font-weight: 600; color: var(--charcoal); }
h3 { font-size: 1.15rem; line-height: 1.35; margin: 1.5rem 0 0.5rem; }
h4, h5, h6 { font-size: 1rem; line-height: 1.4; margin: 1rem 0 0.5rem; }

p { margin: 0 0 1rem; }

a { color: var(--gold-dark); text-decoration: underline; }
a:hover { color: var(--charcoal); }
a:visited { color: var(--gold-dark); }

/* ─── Site header ────────────────────────────────────────────────────── */

.site-header {
	background: var(--surface);
	border-bottom: 1px solid var(--border);
	/* Subtle gold accent line at very top */
	border-top: 3px solid var(--gold);
}

.header-inner {
	max-width: var(--max-width);
	margin-inline: auto;
	padding: 1.5rem 1.25rem 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0;
}

/* Logo */
.site-logo-link {
	display: block;
	text-decoration: none;
	line-height: 0;
}

.site-logo {
	max-width: 320px;
	width: 100%;
	height: auto;
}

/* ─── Navigation ─────────────────────────────────────────────────────── */

.site-header nav {
	width: 100%;
	margin-top: 1.25rem;
}

.nav-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 0;
}

.nav-item {
	display: flex;
	align-items: center;
}

.nav-link {
	display: flex;
	align-items: center;
	padding: 0.65rem 1rem;
	color: var(--charcoal);
	text-decoration: none;
	font-size: 0.95rem;
	font-weight: 500;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	min-height: 44px;
	transition: color 0.15s;
}

.nav-link:hover {
	color: var(--gold-dark);
	text-decoration: underline;
	text-decoration-color: var(--gold);
	text-decoration-thickness: 3px;
	text-underline-offset: 5px;
}

.nav-link[aria-current="page"] {
	color: var(--gold-dark);
	font-weight: 700;
	text-decoration: underline;
	text-decoration-color: var(--gold);
	text-decoration-thickness: 3px;
	text-underline-offset: 5px;
}

/*
 * Pipe separators — on .nav-item (the <li>), NOT on .nav-link (the <a>).
 * Keeping the pipe outside the <a> means text-decoration underline on
 * the link cannot extend onto the pipe character.
 */
@media (min-width: 600px) {
	.nav-item:not(:last-child)::after {
		content: "|";
		color: var(--gold);
		font-weight: 300;
		pointer-events: none;
		align-self: center;
	}
}

/* Mobile nav toggle button */
.nav-toggle {
	display: none; /* shown by JS */
	background: none;
	border: 2px solid var(--charcoal);
	border-radius: 4px;
	padding: 0.5rem 0.7rem;
	cursor: pointer;
	min-height: 44px;
	min-width: 44px;
	align-items: center;
	justify-content: center;
	position: absolute;
	top: 1.25rem;
	right: 1.25rem;
}
.nav-toggle:hover { border-color: var(--gold-dark); }
.nav-toggle:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
	display: block;
	width: 20px;
	height: 2px;
	background: var(--charcoal);
	position: relative;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after {
	content: "";
	position: absolute;
}
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after  { top:  6px; }

/* When JS is active on narrow screens, hidden list gets display:none */
.nav-list[hidden] { display: none; }

@media (max-width: 599px) {
	.site-header { position: relative; }

	html.js .nav-list:not([hidden]) {
		flex-direction: column;
		align-items: stretch;
		padding: 0.5rem 0 1rem;
		border-top: 1px solid var(--border);
		margin-top: 1rem;
	}

	html.js .nav-link {
		justify-content: center;
		border-left: 3px solid transparent;
		padding: 0.65rem 1.25rem;
		text-decoration: none;
	}

	html.js .nav-link:hover,
	html.js .nav-link[aria-current="page"] {
		border-left-color: var(--gold);
		text-decoration: none;
	}
}

/* ─── Main content ───────────────────────────────────────────────────── */

.site-main {
	min-height: 60vh;
}

.site-main:focus { outline: none; }

.page-inner {
	max-width: var(--max-width);
	margin-inline: auto;
	padding: 3rem 1.25rem 4rem;
}

/* Cover image */
.page-cover {
	width: 100%;
	max-height: 420px;
	object-fit: cover;
	border-radius: 4px;
	margin-bottom: 2rem;
}

/* Page body */
.page-content {
	font-size: 1.05rem;
	line-height: 1.8;
}

.page-content img {
	border-radius: 4px;
	margin-block: 1rem;
}

.page-content ul,
.page-content ol {
	padding-left: 1.5rem;
	margin-bottom: 1rem;
}

.page-content li { margin-bottom: 0.25rem; }

.page-content blockquote {
	margin-inline: 0;
	padding: 1rem 1.5rem;
	background: var(--gold-light);
	border-left: 4px solid var(--gold);
	border-radius: 0 4px 4px 0;
}

.page-content pre {
	background: #f3f0e8;
	border: 1px solid var(--border);
	border-radius: 4px;
	padding: 1rem;
	overflow-x: auto;
	font-size: 0.875rem;
}

.page-content table {
	border-collapse: collapse;
	width: 100%;
	font-size: 0.95rem;
}

.page-content th,
.page-content td {
	border: 1px solid var(--border);
	padding: 0.5rem 0.75rem;
	text-align: left;
}

.page-content th {
	background: var(--gold-light);
	font-weight: 600;
}

/* ─── AGB page ───────────────────────────────────────────────────────── */
/*
 * The AGB page slug is 'agb'. Its content is entered in the Bludit admin.
 * This class styles the content area specifically for legal/long-form text.
 */
.page-agb h2 {
	font-size: 1.1rem;
	margin-top: 2rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--border);
	color: var(--charcoal);
}

.page-agb h2:first-of-type {
	border-top: none;
	padding-top: 0;
}

.page-agb .page-content {
	font-size: 0.95rem;
}

/* ─── Pricing tables ─────────────────────────────────────────────────── */

.pricing-vat-note {
	font-size: 0.875rem;
	color: var(--text-muted);
	padding: 0.75rem 1rem;
	background: var(--gold-light);
	border-left: 3px solid var(--gold);
	border-radius: 0 4px 4px 0;
	margin-bottom: 2.5rem;
}

.pricing-section {
	margin-bottom: 3rem;
}

.pricing-section h2 {
	margin-top: 0;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid var(--gold);
	color: var(--charcoal);
}

.pricing-section-note {
	font-size: 0.9rem;
	color: var(--text-muted);
	margin-bottom: 1rem;
}

.pricing-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.975rem;
}

.pricing-table th {
	background: var(--charcoal);
	color: #ffffff;
	font-weight: 600;
	padding: 0.7rem 1rem;
	text-align: left;
	font-size: 0.875rem;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

.pricing-table td {
	padding: 0.65rem 1rem;
	border-bottom: 1px solid var(--border);
	vertical-align: top;
}

.pricing-table tbody tr:nth-child(even) td {
	background: var(--gold-light);
}

.pricing-table tbody tr:last-child td {
	border-bottom: none;
}

.pricing-table tbody tr:hover td {
	background: #ede9da;
}

.price-col,
.pricing-table th.price-col {
	text-align: right;
	white-space: nowrap;
	font-weight: 600;
	color: var(--charcoal);
	min-width: 180px;
}

/* Responsive: allow table to scroll on very small screens */
.pricing-section {
	overflow-x: auto;
}

/* ─── Blog / post list ───────────────────────────────────────────────── */

.post-card {
	border-bottom: 1px solid var(--border);
	padding-bottom: 2rem;
	margin-bottom: 2rem;
}

.post-card:last-of-type { border-bottom: none; }

.post-cover {
	width: 100%;
	max-height: 320px;
	object-fit: cover;
	border-radius: 4px;
	margin-bottom: 1rem;
}

.post-title { margin-top: 0; }
.post-title a { color: var(--charcoal); text-decoration: none; }
.post-title a:hover { color: var(--gold-dark); text-decoration: underline; }

.post-meta { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 0.75rem; }

.btn-link {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	font-weight: 600;
	color: var(--gold-dark);
	text-decoration: none;
	border-bottom: 2px solid var(--gold);
	padding-bottom: 1px;
	min-height: 44px;
}
.btn-link:hover { color: var(--charcoal); border-bottom-color: var(--charcoal); }

/* ─── Pagination ─────────────────────────────────────────────────────── */

.pagination-nav { margin-top: 2rem; }

.pagination {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
}

.page-link {
	display: inline-flex;
	align-items: center;
	padding: 0.5rem 1rem;
	border: 2px solid var(--gold-dark);
	border-radius: 4px;
	color: var(--gold-dark);
	text-decoration: none;
	font-weight: 600;
	min-height: 44px;
}
.page-link:hover { background: var(--gold-dark); color: #ffffff; text-decoration: none; }
.page-current { font-size: 0.9rem; color: var(--text-muted); }

/* ─── Footer ─────────────────────────────────────────────────────────── */

.site-footer {
	background: var(--charcoal);
	color: #e8e0d0;
	padding: 1.5rem 0;   /* horizontal padding lives on footer-inner, not here */
	margin-top: 0;
}

.footer-inner {
	max-width: var(--max-width);
	margin-inline: auto;
	padding: 0 1.25rem;  /* mirrors .page-inner's horizontal padding exactly */
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 0.75rem;
}

.footer-nav .footer-nav { display: flex; } /* override if nested */

.footer-nav {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}

.footer-nav a {
	color: #e8e0d0;  /* #e8e0d0 on #3b3b3b → 8.4:1 ✓ */
	text-decoration: underline;
	font-size: 0.9rem;
}

.footer-nav a:hover { color: var(--gold); }

.footer-sep {
	color: var(--gold);
	font-weight: 300;
}

.footer-copy {
	margin: 0;
	font-size: 0.85rem;
	color: #c5b99a;  /* #c5b99a on #3b3b3b → 5.3:1 ✓ */
}

/* ─── Kontakt page ───────────────────────────────────────────────────── */
/*
 * Styles for the Bludit contact form plugin output on the 'kontakt' page.
 * The plugin renders <label> + <input> / <textarea> + <button> markup.
 */
.page-kontakt input[type="text"],
.page-kontakt input[type="email"],
.page-kontakt textarea {
	display: block;
	width: 100%;
	padding: 0.6rem 0.9rem;
	font-family: inherit;
	font-size: 1rem;
	color: var(--text);
	background: var(--surface);
	border: 2px solid #9a9280;  /* #9a9280 on #fff → 3.1:1 — non-text component ✓ */
	border-radius: 4px;
	margin-top: 0.25rem;
	margin-bottom: 1rem;
	min-height: 44px;
}

.page-kontakt input:focus,
.page-kontakt textarea:focus {
	border-color: var(--gold-dark);
	outline: 3px solid var(--focus-ring);
	outline-offset: 2px;
}

.page-kontakt label {
	font-weight: 600;
	display: block;
}

.page-kontakt button,
.page-kontakt input[type="submit"] {
	background: var(--charcoal);
	color: #ffffff;
	border: 2px solid var(--charcoal);
	padding: 0.65rem 1.75rem;
	font-size: 1rem;
	font-family: inherit;
	font-weight: 600;
	border-radius: 4px;
	cursor: pointer;
	min-height: 44px;
	min-width: 44px;
}

.page-kontakt button:hover,
.page-kontakt input[type="submit"]:hover {
	background: var(--gold-dark);
	border-color: var(--gold-dark);
}

/* ─── Responsive ─────────────────────────────────────────────────────── */

@media (max-width: 599px) {
	.page-inner { padding: 2rem 1rem 3rem; }

	.footer-inner { flex-direction: column; align-items: flex-start; gap: 0.5rem; padding: 0 1rem; }

	.price-col { min-width: 120px; }

	h1 { margin-bottom: 1rem; }
}

/* ─── Print ──────────────────────────────────────────────────────────── */

@media print {
	.skip-link, .nav-toggle, .site-footer { display: none; }
	.site-header { border: none; }
	.nav-link { font-size: 0.8rem; }
	.page-inner { padding: 0; }
	a[href]::after { content: " (" attr(href) ")"; font-size: 0.75em; color: #666; }
	a[href^="#"]::after, a[href^="javascript:"]::after { content: ""; }
}

.page-body > h1 { display: none; }

.page-content pre,
.page-content code {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  font-family: inherit !important;
}

.page-content {
  text-align: justify;
}