/* ==========================================================================
   Praxis am Ebertpark – Template-Stylesheet (Joomla 4.4 / 5 / 6)
   Nachbau des Joomla-3-Designs, ohne Warp / UIkit / jQuery.
   ========================================================================== */

/* Schriften (aus dem alten Template übernommen)
   -------------------------------------------------------------------------- */
@font-face { font-family: "Dosis"; src: url("../fonts/dosis-300.woff") format("woff"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Dosis"; src: url("../fonts/dosis-400.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Dosis"; src: url("../fonts/dosis-500.woff") format("woff"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Titillium Text"; src: url("../fonts/titillium-300.woff") format("woff"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Titillium Text"; src: url("../fonts/titillium-400.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Titillium Text"; src: url("../fonts/titillium-600.woff") format("woff"); font-weight: 600; font-style: normal; font-display: swap; }

/* Design-Variablen
   -------------------------------------------------------------------------- */
:root {
	--pae-primary: #4579a5;   /* Überschriften, aktive Menüpunkte */
	--pae-accent:  #9a7863;   /* Menüpunkte, Telefon-Feld */
	--pae-logo:    #7f9fbb;   /* Logo-Feld */
	--pae-text:    #3b3b3b;
	--pae-muted:   #7a7a7a;
	--pae-line:    #dcdcdc;
	--pae-soft:    #f4f4f4;
	--pae-sand:    #e6e6dc;
	--pae-dark:    #232323;
	--pae-footer:  #111111;

	--pae-font-head: "Dosis", "Trebuchet MS", Arial, sans-serif;
	--pae-font-body: "Titillium Text", "Segoe UI", Arial, sans-serif;

	--pae-container: 1200px;
	--pae-gutter: clamp(1rem, 3vw, 2rem);
	--pae-radius: 4px;
}

/* Basis
   -------------------------------------------------------------------------- */
html { scroll-behavior: smooth; overflow-y: scroll; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body.site {
	margin: 0;
	background: #fff;
	color: var(--pae-text);
	font-family: var(--pae-font-body);
	font-size: 1.0625rem;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

.site img { max-width: 100%; height: auto; }

.site a { color: var(--pae-primary); text-decoration: none; }
.site a:hover { text-decoration: underline; text-underline-offset: 0.15em; }
.site :focus-visible { outline: 3px solid var(--pae-accent); outline-offset: 2px; }

.site h1, .site h2, .site h3, .site h4, .site h5, .site h6 {
	margin: 1.6em 0 0.6em;
	font-family: var(--pae-font-head);
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: 0.01em;
	color: var(--pae-primary);
}
.site h1 { font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.4rem); text-transform: uppercase; }
.site h2 { font-size: clamp(1.5rem, 1.15rem + 1vw, 2rem); text-transform: uppercase; }
.site h3 { font-size: 1.5rem; }
.site h4 { font-size: 1.25rem; }
.site h5, .site h6 { font-size: 1.05rem; }
.site :is(h1, h2, h3, h4):first-child { margin-top: 0; }

.site p, .site ul, .site ol, .site table, .site blockquote { margin: 0 0 1em; }
.site hr { border: 0; border-top: 1px solid var(--pae-line); opacity: 1; margin: 2rem 0; }

.container {
	box-sizing: border-box;
	width: 100%;
	max-width: var(--pae-container);
	margin-inline: auto;
	padding-inline: var(--pae-gutter);
}

.skip-link {
	position: absolute; left: 1rem; top: -100px; z-index: 2000;
	padding: 0.6rem 1rem; background: var(--pae-primary); color: #fff !important;
}
.skip-link:focus { top: 1rem; }

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

/* Menü-Symbol (drei Striche)
   -------------------------------------------------------------------------- */
.icon-btn {
	display: inline-flex; align-items: center; justify-content: center;
	width: 44px; height: 44px; padding: 0;
	border: 0; border-radius: var(--pae-radius);
	background: transparent; color: inherit; cursor: pointer;
}
.icon-btn__bars,
.icon-btn__bars::before,
.icon-btn__bars::after {
	display: block; width: 22px; height: 2px; background: currentColor; content: "";
}
.icon-btn__bars { position: relative; }
.icon-btn__bars::before { position: absolute; top: -7px; }
.icon-btn__bars::after  { position: absolute; top: 7px; }

/* Obere Leiste (Position "menu" / "search") – nur wenn belegt
   -------------------------------------------------------------------------- */
.topbar {
	position: sticky; top: 0; z-index: 900;
	background: #fff;
	box-shadow: 0 1px 0 var(--pae-line);
}
.topbar__inner { display: flex; align-items: center; gap: 1rem; min-height: 56px; }
.topbar__menu { flex: 1; }
.topbar .icon-btn { color: var(--pae-accent); }

.topbar .mod-menu { display: flex; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.topbar .mod-menu > li { position: relative; }
.topbar .mod-menu > li > a,
.topbar .mod-menu > li > span {
	display: block; padding: 0.9rem 1rem;
	font-family: var(--pae-font-head); font-weight: 500; font-size: 1.05rem;
	text-transform: uppercase; letter-spacing: 0.03em;
	color: var(--pae-accent); text-decoration: none;
}
.topbar .mod-menu > li > a:hover,
.topbar .mod-menu > li.active > a,
.topbar .mod-menu > li.current > a { background: #faf0df; color: #4e2818; }
.topbar .mod-menu__sub {
	display: none; position: absolute; left: 0; top: 100%; z-index: 10;
	min-width: 220px; margin: 0; padding: 0.4rem 0; list-style: none;
	background: #f5f5f5; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}
.topbar .mod-menu > li:hover > .mod-menu__sub,
.topbar .mod-menu > li:focus-within > .mod-menu__sub { display: block; }
.topbar .mod-menu__sub a { display: block; padding: 0.4rem 1rem; color: var(--pae-text); }

/* Header mit Bild, Logo-Feld und Telefonnummer
   -------------------------------------------------------------------------- */
.hero {
	position: relative;
	overflow: hidden;
	background: linear-gradient(135deg, #eef2f6 0%, #dfe7ee 55%, #efe9e3 100%);
}
.hero--full    { height: clamp(300px, 56vw, 680px); }
.hero--compact { height: clamp(180px, 22vw, 280px); }
.hero--none    { background: none; }

.hero__media,
.hero__media > *,
.slides { position: absolute; inset: 0; }

.slides__item {
	position: absolute; inset: 0;
	width: 100%; height: 100%; max-width: none;
	object-fit: cover;
	opacity: 0;
	transition: opacity 1.2s ease;
}
.slides__item.is-active { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .slides__item { transition: none; } }

.hero__overlay { position: relative; height: 100%; pointer-events: none; }
.hero__overlay > * { pointer-events: auto; }

/* Logo-Feld: hängt oben links im Bild, wie im Original */
.brand {
	position: absolute; top: 0; left: var(--pae-gutter);
	z-index: 2;
}
.hero--none .brand { position: relative; left: 0; display: inline-block; }

.brand__link,
.brand__module {
	display: block;
	padding: 1.4rem 1.6rem 1.2rem;
	background: color-mix(in srgb, var(--pae-logo) 90%, transparent);
	color: #fff !important;
	text-decoration: none !important;
}
.brand__module a { color: #fff; }
.brand__link--text { text-align: center; }
.brand__line1 {
	display: block;
	font-family: var(--pae-font-head); font-weight: 300;
	font-size: clamp(2.2rem, 1.6rem + 2.4vw, 3.6rem);
	line-height: 0.95; letter-spacing: 0.02em; text-transform: uppercase;
}
.brand__line2 {
	display: block; margin-top: 0.35rem;
	font-family: var(--pae-font-head); font-weight: 300;
	font-size: clamp(1rem, 0.75rem + 1vw, 1.55rem);
	line-height: 1.1; letter-spacing: 0.02em; text-transform: uppercase;
}
.brand__image { display: block; max-height: 140px; width: auto; }

/* Punkte der Slideshow: oben rechts */
.slides__dots {
	position: absolute; top: 1.25rem; right: var(--pae-gutter); z-index: 3;
	display: flex; gap: 0.6rem; margin: 0; padding: 0; list-style: none;
}
.slides__dot {
	width: 14px; height: 14px; padding: 0;
	border: 2px solid rgba(255, 255, 255, 0.9); border-radius: 50%;
	background: rgba(255, 255, 255, 0.45);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
	cursor: pointer;
}
.slides__dot[aria-current="true"] { background: #fff; }

/* Telefonnummer: unten rechts */
.phone {
	position: absolute; right: 0; bottom: 0; z-index: 3;
	display: inline-flex; align-items: center; gap: 0.75rem;
	padding: 0.35rem 1.4rem 0.35rem 0.9rem;
	border-top-left-radius: 12px;
	background: color-mix(in srgb, var(--pae-accent) 85%, transparent);
	color: #fff !important; text-decoration: none !important;
	font-family: var(--pae-font-head); font-weight: 400;
	font-size: clamp(1.4rem, 1rem + 1.6vw, 2.4rem);
	letter-spacing: 0.04em; line-height: 1.3;
}
.phone__icon {
	width: 1.15em; height: 1.15em; padding: 0.2em;
	border: 2px solid rgba(255, 255, 255, 0.85); border-radius: 50%;
	fill: #fff; box-sizing: border-box; flex: none;
}
.phone:hover .phone__label { text-decoration: underline; text-underline-offset: 0.12em; }

.icon-btn--hero {
	position: absolute; top: 0.75rem; right: var(--pae-gutter); z-index: 4;
	background: color-mix(in srgb, var(--pae-logo) 90%, transparent); color: #fff;
}
.slides__dots ~ .icon-btn--hero { top: 3rem; }

/* Mittelteil: linke Spalte (Menü) + Inhalt
   -------------------------------------------------------------------------- */
.middle {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0 clamp(1.5rem, 4vw, 3.5rem);
	padding-top: 1.5rem;
	padding-bottom: 3rem;
}
.main { min-width: 0; padding-top: 0.75rem; }
.main:focus { outline: none; }

@media (min-width: 960px) {
	.has-sidebar-a .middle { grid-template-columns: minmax(220px, 26%) minmax(0, 1fr); }
	.has-sidebar-b .middle { grid-template-columns: minmax(0, 1fr) minmax(200px, 24%); }
	.has-sidebar-a.has-sidebar-b .middle { grid-template-columns: minmax(200px, 24%) minmax(0, 1fr) minmax(180px, 22%); }

	.sidebar--a {
		padding-right: 1.25rem;
		box-shadow: 10px 0 12px -12px rgba(0, 0, 0, 0.35);
	}
}

.sidebar .panel + .panel { margin-top: 2rem; }

/* Seitenmenü: große Dosis-Schrift, braun, aktiv blau – wie im Original */
.sidebar .mod-menu,
.drawer .mod-menu { display: block; margin: 0; padding: 0; list-style: none; }
.sidebar .mod-menu > li > a,
.sidebar .mod-menu > li > span {
	display: block;
	padding: 0.35rem 0.75rem 0.2rem 1rem;
	border-bottom: 1px solid var(--pae-primary);
	font-family: var(--pae-font-head); font-weight: 400;
	font-size: clamp(1.45rem, 1.1rem + 0.9vw, 1.9rem);
	line-height: 1.35; text-transform: uppercase;
	color: var(--pae-accent);
	text-decoration: none;
	transition: color 0.15s ease;
}
.sidebar .mod-menu > li > a:hover,
.sidebar .mod-menu > li.active > a,
.sidebar .mod-menu > li.current > a { color: var(--pae-primary); }

.sidebar .mod-menu__sub { margin: 0; padding: 0 0 0 0.9rem; list-style: none; }
.sidebar .mod-menu__sub a {
	display: block; padding: 0.25rem 0.75rem 0.15rem 1rem;
	border-bottom: 1px solid #d8d8d8; background: var(--pae-soft);
	font-family: var(--pae-font-head); font-size: 1.3rem; text-transform: uppercase;
	color: var(--pae-accent);
}
.sidebar .mod-menu__sub a:hover,
.sidebar .mod-menu__sub .current > a { color: var(--pae-primary); text-decoration: none; }

/* Mobil: Seitenmenü auf- und zuklappbar */
.sidebar__toggle { display: none; }
@media (max-width: 959.98px) {
	.js .sidebar__toggle {
		display: flex; align-items: center; gap: 0.9rem;
		width: 100%; padding: 0.75rem 1rem; margin-bottom: 1rem;
		border: 0; border-radius: var(--pae-radius);
		background: var(--pae-primary); color: #fff; cursor: pointer;
		font-family: var(--pae-font-head); font-size: 1.25rem; text-transform: uppercase; letter-spacing: 0.04em;
	}
	.js .sidebar--a .sidebar__content { display: none; margin-bottom: 1.5rem; }
	.js .sidebar--a.is-open .sidebar__content { display: block; }
	.sidebar--b { margin-top: 2.5rem; }
}

/* Modul-Panels & Blöcke (top-a … bottom-f)
   -------------------------------------------------------------------------- */
.panel__title { font-size: 1.7rem; }

.block { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.block__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
	gap: 2rem clamp(1.5rem, 3vw, 2.5rem);
}
.main__top { margin-bottom: 2rem; }
.main__bottom { margin-top: 2.5rem; }

.block--top-a { background: var(--pae-sand); }

.block--bottom-b {
	background: #f0f0f0 url("../images/bg.jpg") center / cover no-repeat;
	text-align: center;
}
.block--bottom-c,
.block--bottom-e {
	background: #141411 url("../images/pattern.png") repeat;
	color: #fff;
}
.block--bottom-d {
	background: #1b1b1b url("../images/contact_bg.jpg") center / cover no-repeat fixed;
	color: #fff; text-align: center;
}
@media (hover: none), (max-width: 959.98px) {
	.block--bottom-d { background-attachment: scroll; }   /* iOS kann kein "fixed" */
}
.block--bottom-a .block__grid,
.block--bottom-f .block__grid { gap: 0; }

:is(.block--top-a, .block--bottom-b, .block--bottom-c, .block--bottom-d, .block--bottom-e) .panel__title {
	position: relative; padding-bottom: 0.6rem; margin-bottom: 1.4rem; text-align: center;
}
:is(.block--top-a, .block--bottom-b, .block--bottom-c, .block--bottom-d, .block--bottom-e) .panel__title::after {
	content: ""; position: absolute; left: 50%; bottom: 0;
	width: 48px; height: 3px; transform: translateX(-50%);
	background: color-mix(in srgb, var(--pae-primary) 35%, #fff);
}
:is(.block--bottom-c, .block--bottom-d, .block--bottom-e) :is(h1, h2, h3, h4, .panel__title) { color: #fff; }
:is(.block--bottom-c, .block--bottom-d, .block--bottom-e) a { color: #fff; text-decoration: underline; }

/* Inhalte aus com_content
   -------------------------------------------------------------------------- */
.site .page-header { margin: 0 0 1rem; padding: 0; border: 0; }
.site .page-header h1, .site .page-header h2 { margin-top: 0; }
.site .article-info { margin-bottom: 1.25rem; color: var(--pae-muted); font-size: 0.9rem; }
.site .article-info dd { display: inline-block; margin: 0 1rem 0 0; }
.site .blog-item + .blog-item,
.site .items-row + .items-row { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--pae-line); }
.site .readmore .btn { margin-top: 0.5rem; }
.site figure { margin: 0 0 1.25rem; }
.site figcaption { color: var(--pae-muted); font-size: 0.9rem; }
.site table:not([class]) { border-collapse: collapse; width: 100%; }
.site table:not([class]) :is(td, th) { padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--pae-line); text-align: left; }
.site blockquote { padding-left: 1.25rem; border-left: 3px solid var(--pae-accent); font-style: italic; }

/* Brotkrumen */
.site .mod-breadcrumbs__wrapper { margin-bottom: 1.25rem; }
.site .breadcrumb {
	display: inline-flex; flex-wrap: wrap; margin: 0; padding: 0.55rem 1.2rem;
	list-style: none;
	border: 1px solid rgba(213, 216, 222, 0.6); border-radius: 5px; background: #fff;
	font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.03em; color: #9a9ca3;
}
.site .breadcrumb-item + .breadcrumb-item::before { padding: 0 0.5rem; color: #c0c2c8; }

/* Buttons, Formulare, Blätterfunktion */
.site .btn-primary,
.site .uk-button-primary {
	--bs-btn-bg: var(--pae-primary);
	--bs-btn-border-color: var(--pae-primary);
	--bs-btn-hover-bg: color-mix(in srgb, var(--pae-primary) 82%, #000);
	--bs-btn-hover-border-color: color-mix(in srgb, var(--pae-primary) 82%, #000);
	background-color: var(--pae-primary); border-color: var(--pae-primary); color: #fff;
}
.site .btn-primary:hover,
.site .btn-primary:focus-visible { background-color: color-mix(in srgb, var(--pae-primary) 82%, #000); border-color: color-mix(in srgb, var(--pae-primary) 82%, #000); color: #fff; }
.site .btn-secondary { background-color: var(--pae-accent); border-color: var(--pae-accent); color: #fff; }

.site .form-control:focus,
.site .form-select:focus {
	border-color: var(--pae-primary);
	box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--pae-primary) 25%, transparent);
}
.site .pagination { --bs-pagination-color: var(--pae-primary); --bs-pagination-active-bg: var(--pae-primary); --bs-pagination-active-border-color: var(--pae-primary); }
.site .page-link { color: var(--pae-primary); }
.site .page-item.active .page-link { background-color: var(--pae-primary); border-color: var(--pae-primary); color: #fff; }

/* Fußzeile
   -------------------------------------------------------------------------- */
.footer {
	background: var(--pae-footer);
	color: #b9b9b9;
	text-align: center;
	font-size: 0.95rem;
}
.footer__inner { position: relative; padding-top: 2.75rem; padding-bottom: 2rem; }
.footer a { color: #fff; }
.footer .panel + .panel { margin-top: 1.5rem; }
.footer :is(h1, h2, h3, h4) { color: #fff; }
.footer .mod-menu { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.25rem 1.25rem; margin: 0; padding: 0; list-style: none; }

.to-top {
	position: absolute; top: 0; left: 50%;
	display: grid; place-items: center;
	width: 44px; height: 44px;
	transform: translate(-50%, -50%);
	border-radius: 50%;
	background: var(--pae-primary); color: #fff !important;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.to-top svg { width: 22px; height: 22px; }
.to-top:hover { background: color-mix(in srgb, var(--pae-primary) 82%, #000); }

/* Seitliche Punkt-Navigation (Position "smoothscroll")
   -------------------------------------------------------------------------- */
.dotnav-bar { display: none; }
@media (min-width: 1200px) {
	.dotnav-bar {
		display: block; position: fixed; right: 20px; top: 50%; z-index: 800;
		transform: translateY(-50%);
	}
	.dotnav-bar ul { margin: 0; padding: 0; list-style: none; }
	.dotnav-bar li + li { margin-top: 0.5rem; }
	.dotnav-bar a {
		display: block; width: 12px; height: 12px; overflow: hidden; text-indent: -999px;
		border: 2px solid var(--pae-primary); border-radius: 50%; background: #fff;
	}
	.dotnav-bar a:hover, .dotnav-bar .current > a { background: var(--pae-primary); }
}

/* Ausklapp-Panels (Positionen "offcanvas" und "sidepanel")
   -------------------------------------------------------------------------- */
.drawer {
	position: fixed; top: 0; bottom: 0;
	width: min(320px, 86vw); max-width: none; height: 100%; max-height: none;
	margin: 0; padding: 3.5rem 1.25rem 2rem;
	border: 0; overflow-y: auto;
	background: var(--pae-footer); color: #fff;
}
.drawer--right { left: auto; right: 0; }
.drawer--left  { left: 0; right: auto; }
.drawer::backdrop { background: rgba(0, 0, 0, 0.55); }
.drawer[open] { animation: drawer-in-right 0.25s ease-out; }
.drawer--left[open] { animation-name: drawer-in-left; }
@keyframes drawer-in-right { from { transform: translateX(100%); } }
@keyframes drawer-in-left  { from { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .drawer[open] { animation: none; } }

.drawer__close {
	position: absolute; top: 0.5rem; right: 0.75rem;
	width: 44px; height: 44px; border: 0; background: none;
	color: #fff; font-size: 2rem; line-height: 1; cursor: pointer;
}
.drawer a { color: #fff; }
.drawer .mod-menu a {
	display: block; padding: 0.6rem 0.5rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.12);
	font-family: var(--pae-font-head); font-size: 1.3rem; text-transform: uppercase; text-decoration: none;
}
.drawer .mod-menu .current > a { color: color-mix(in srgb, var(--pae-primary) 45%, #fff); }
.drawer .mod-menu__sub { padding-left: 1rem; list-style: none; }
.drawer .panel__title { color: #fff; font-size: 1.3rem; }

/* Mobile Feinheiten
   -------------------------------------------------------------------------- */
@media (max-width: 639.98px) {
	.brand__link, .brand__module { padding: 0.9rem 1rem 0.8rem; }
	.brand__image { max-height: 90px; }
	.phone { padding: 0.25rem 0.9rem 0.25rem 0.6rem; border-top-left-radius: 8px; }
	.slides__dots { top: auto; bottom: 4.2rem; }
}

/* Fehler- und Offline-Seite
   -------------------------------------------------------------------------- */
.status-page { min-height: 100vh; display: flex; flex-direction: column; }
.status-page .hero { flex: none; }
.status-page__body { flex: 1; padding-block: 3rem 4rem; }
.status-page__code {
	margin: 0; font-family: var(--pae-font-head); font-weight: 300;
	font-size: clamp(4rem, 10vw, 7rem); line-height: 1; color: var(--pae-logo);
}
.status-page__form { max-width: 380px; }
.status-page__form label { display: block; margin: 1rem 0 0.25rem; }
.status-page__form input:not([type="hidden"]) { width: 100%; }

/* Druckansicht
   -------------------------------------------------------------------------- */
@media print {
	.topbar, .hero__media, .slides__dots, .phone, .sidebar, .to-top, .dotnav-bar, .drawer, .skip-link { display: none !important; }
	.hero { height: auto !important; background: none; }
	.brand { position: static; }
	.middle { display: block; }
}

/* Bild-Modus "Bilder vollständig zeigen" (Bilder mit eingebautem Logo/Text)
   -------------------------------------------------------------------------- */
.hero--boxed {
	width: 100%;
	max-width: var(--pae-container);
	height: auto !important;
	margin-inline: auto;
	aspect-ratio: var(--pae-hero-ratio, 1200 / 506);
}
.hero--boxed.hero--none { aspect-ratio: auto; }
