/*
Theme Name: Friedrich Law
Theme URI: https://wirtschaft.law
Author: Kanzlei Dr. Thomas Friedrich
Description: Individuelles WordPress-Theme im Design von wirtschaft.law – schlanke Kanzlei-Website mit fixer Seitennavigation, Blog-Unterstützung und Rechtsseiten (Impressum/Datenschutz).
Version: 1.0.5
Requires PHP: 7.4
License: Proprietary
Text Domain: friedrich-law
*/

/* ==========================================================================
   Fonts
   ========================================================================== */
@font-face {
	font-family: 'Biryani ExtraLight';
	font-weight: 200;
	font-style: normal;
	font-display: swap;
	src: url('assets/fonts/Biryani-ExtraLight.woff2') format('woff2'),
		 url('assets/fonts/Biryani-ExtraLight.woff') format('woff');
}

/* ==========================================================================
   Variables
   ========================================================================== */
:root {
	--color-navy: #1f303f;
	--color-blue: #2080cc;
	--color-white: #ffffff;
	--color-black: #000000;
	--color-page-bg: #f3f3f3;
	--color-box-bg: #f6f6f6;
	--color-box-border: #efefef;
	--color-ink: #0a0e12;
	--color-text: #1f303f;
	--color-muted-on-dark: rgba(255, 255, 255, 0.62);
	--color-border-on-dark: rgba(255, 255, 255, 0.16);
	--sidebar-width: 14em;
	/* vw instead of % — a % value resolves against each element's own
	   (nested, already-narrower) containing block, so a child's negative
	   margin using the same % never fully cancels the parent's padding.
	   vw always resolves against the viewport, so padding and the
	   full-bleed .info-box's negative margin cancel out exactly. */
	--content-pad-left: 16vw;
	--content-pad-right: 5em;
	--font-display: 'Biryani ExtraLight', Tahoma, Geneva, sans-serif;
	--font-title: Tahoma, Geneva, sans-serif;
	--font-body: Helvetica, Arial, Tahoma, Verdana, sans-serif;
}

/* ==========================================================================
   Reset / base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, h5, h6, p, ul, ol, figure { margin: 0; padding: 0; }
body {
	min-height: 100vh;
	background: var(--color-page-bg);
	color: var(--color-black);
	font-family: var(--font-body);
	font-size: 1em;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }

/* ==========================================================================
   Layout shell
   ========================================================================== */
.site-shell {
	display: flex;
	align-items: stretch;
	min-height: 100vh;
}

/* ---- Sidebar (logo + main nav) ---- */
.site-sidebar {
	flex: 0 0 var(--sidebar-width);
	width: var(--sidebar-width);
	display: flex;
	flex-direction: column;
	background: transparent;
	min-height: 100vh;
}
.site-logo {
	padding: 2.5em 1.5em 1em;
	text-align: center;
}
.site-logo img {
	margin: 0 auto;
	border-radius: 4px;
}
.site-nav-toggle {
	display: none;
}
.main-nav {
	padding: 1.5em 1.5em 3em;
}
.main-nav ul { margin: 0; padding: 0; }
.main-nav li { border-top: 1px solid var(--color-black); }
.main-nav li:last-child { border-bottom: 1px solid var(--color-black); }
.main-nav a {
	display: block;
	padding: 0.5em 1em 0.5em 0.5em;
	font-family: var(--font-display);
	font-weight: 200;
	font-style: normal;
	text-transform: uppercase;
	font-size: 1.05em;
	letter-spacing: 0.02em;
	position: relative;
	transition: opacity 0.25s ease;
}
.main-nav a:hover { opacity: 0.6; text-decoration: none; }
.main-nav li.current-menu-item a,
.main-nav li.current_page_item a,
.main-nav li.current-menu-parent a {
	background: var(--color-navy);
	color: var(--color-white);
	opacity: 1;
	text-decoration: none;
}

/* ---- Main column ---- */
/* One continuous navy panel for header + content, matching the original
   site: the whole column carries the brand color, and only specific boxed
   elements (.info-box, badge chips) break out of it with a light background. */
.site-main {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	background: var(--color-navy);
	color: var(--color-white);
}

/* ---- Page header band (title / subtitle / headline) ---- */
.site-header {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 2.5em 0.5em;
}
/* Optional per-page override via the "flaw_header_photo" custom field. */
.site-header.has-photo {
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}
/* Title/subtitle span the full column width and are centered on it — this
   matches the original, where they sit outside the headline's indent. */
.site-header-top {
	padding: 0 5%;
}
/* The headline uses the same left/right indent system as .site-content
   below, but with a smaller left value, so it always sits visibly further
   left than the body text — regardless of viewport width. */
.site-header-headline {
	margin-top: 1.25em;
	padding: 0 5em 0 12%;
}
.site-title {
	font-family: var(--font-title);
	font-weight: 700;
	font-size: 2.2em;
	line-height: 1.3;
	color: var(--color-white);
	text-align: center;
}
.site-title a { color: inherit; }
.site-title a:hover { text-decoration: none; }
.site-subtitle {
	margin-top: 0.35em;
	font-family: var(--font-display);
	font-weight: 200;
	text-transform: uppercase;
	line-height: 1.3;
	color: var(--color-white);
	text-align: center;
}
.entry-headline {
	font-family: var(--font-display);
	font-weight: 200;
	text-transform: uppercase;
	font-size: 1.8em;
	line-height: 1.3;
	color: var(--color-white);
	display: inline-block;
	text-align: left;
	border-right: solid 2px var(--color-white);
	padding-right: 0.5em;
	max-width: 100%;
}

/* ---- Content area ---- */
.site-content {
	flex: 1 1 auto;
	padding: 3em var(--content-pad-right) 4em var(--content-pad-left);
}
.entry-content > * + * { margin-top: 1em; }
.entry-content h2,
.entry-content h3 {
	font-family: var(--font-body);
	font-weight: 700;
	font-size: 1.3em;
	color: var(--color-white);
	margin-top: 1.6em;
}
.entry-content p { line-height: 1.7; }
.entry-content a { color: #8fc6f2; text-decoration: underline; }

/* boxed "highlight" section, e.g. "Mensch und Anwalt" — the one place that
   deliberately breaks out of the navy panel with a light card. In the
   original this card runs full-bleed edge-to-edge (no navy gutter left or
   right), while its own text keeps the normal content indent — so it
   cancels out .site-content's padding with a matching negative margin. */
.info-box {
	background: var(--color-box-bg);
	border: 1px solid var(--color-box-border);
	color: var(--color-ink);
	margin: 2em calc(-1 * var(--content-pad-right)) 2em calc(-1 * var(--content-pad-left));
	padding: 2em var(--content-pad-right) 2em var(--content-pad-left);
}
.info-box h3,
.info-box h2 { margin-top: 0; color: var(--color-navy); }
.info-box a { color: var(--color-blue); }
.info-box-columns {
	display: flex;
	gap: 2.5em;
	margin-top: 1.5em;
	flex-wrap: wrap;
}
.info-box-columns .info-box-image { flex: 1 1 280px; }
.info-box-columns .info-box-text { flex: 1 1 320px; }
.info-box-columns .info-box-text p + p { margin-top: 1em; }

.contact-block { margin-top: 2.5em; }
.contact-block h3 { color: var(--color-white); margin-bottom: 0.75em; }
.contact-block p { margin: 0.25em 0; }

/* ---- Footer ---- */
.site-footer {
	padding: 2em var(--content-pad-right) 3em var(--content-pad-left);
	font-size: 0.9em;
	color: var(--color-muted-on-dark);
}
.site-footer a { color: inherit; text-decoration: underline; }

/* ---- Blog listing / single post ---- */
.post-list-item {
	padding-bottom: 2em;
	margin-bottom: 2em;
	border-bottom: 1px solid var(--color-border-on-dark);
}
.post-list-item .entry-title { font-size: 1.4em; margin-bottom: 0.4em; }
.post-list-item .entry-title a { text-decoration: none; }
.post-list-item .entry-title a:hover { text-decoration: underline; }
.entry-meta { font-size: 0.85em; color: var(--color-muted-on-dark); margin-bottom: 0.75em; }
.entry-title { font-family: var(--font-body); font-weight: 700; color: var(--color-white); }
.entry-title a { color: inherit; }

/* ---- Judikatur / Kommentar-Wiki: badges & meta ---- */
.judikatur-meta,
.entry-meta { display: flex; flex-wrap: wrap; gap: 0.5em; align-items: center; }
.badge {
	display: inline-block;
	font-size: 0.8em;
	line-height: 1.4;
	padding: 0.2em 0.7em;
	border-radius: 999px;
	background: var(--color-box-bg);
	border: 1px solid var(--color-box-border);
	color: var(--color-navy);
	text-decoration: none;
	white-space: nowrap;
}
a.badge:hover { text-decoration: none; background: var(--color-box-border); }
.badge-case { font-weight: 700; }
.badge-date { color: #555; }
.badge-link,
.badge-gesetz { background: var(--color-blue); color: var(--color-white); border-color: var(--color-blue); }
.badge-theme { background: var(--color-blue); color: var(--color-white); border-color: var(--color-blue); }
.badge-type { font-size: 0.72em; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 700; }
.badge-paragraph-plain { color: #888; }

.badge-list { margin-top: 1.5em; display: flex; flex-wrap: wrap; gap: 0.5em; align-items: center; }
.badge-list-label { font-size: 0.85em; color: var(--color-muted-on-dark); margin-right: 0.25em; }

.entry-dates { margin-top: 2em; font-size: 0.85em; color: var(--color-muted-on-dark); }

.related-list { list-style: none; margin: 0; padding: 0; }
.related-list li {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1em;
	padding: 0.6em 0;
	border-bottom: 1px solid var(--color-box-border);
}
.related-list li:last-child { border-bottom: none; }
.related-judikatur { margin-top: 2.5em; }

/* ---- Mobile nav toggle button ---- */
.site-nav-toggle-btn {
	display: none;
	position: fixed;
	top: 1em;
	left: 1em;
	z-index: 20;
	width: 46px;
	height: 46px;
	background: var(--color-navy);
	border: none;
	border-radius: 4px;
	color: var(--color-white);
	cursor: pointer;
}
.site-nav-toggle-btn svg { width: 22px; height: 22px; fill: currentColor; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media all and (max-width: 900px) {
	:root { --content-pad-left: 2em; --content-pad-right: 2em; }
	.site-header-headline { padding: 0 2em; }
}

@media all and (max-width: 834px) {
	.site-shell { flex-direction: column; }
	.site-nav-toggle-btn { display: flex; align-items: center; justify-content: center; }
	.site-sidebar {
		position: fixed;
		inset: 0 auto 0 0;
		width: 82%;
		max-width: 320px;
		min-height: 100vh;
		background: var(--color-page-bg);
		transform: translateX(-100%);
		transition: transform 0.35s ease;
		z-index: 19;
		overflow-y: auto;
	}
	body.nav-open .site-sidebar { transform: translateX(0); }
	.site-logo { padding-top: 4.5em; }
	.entry-headline { font-size: 1.4em; }
	.site-header-headline { text-align: center; padding: 0 5%; }
	.site-title { font-size: 1.7em; }
}

@media all and (max-width: 480px) {
	:root { --content-pad-left: 1.25em; --content-pad-right: 1.25em; }
	.info-box { padding: 1.25em; }
}

/* print */
@media print {
	.site-sidebar, .site-nav-toggle-btn { display: none; }
	.site-shell { display: block; }
}
