/* ==========================================================================
   Praxis am Ebertpark – Template für Joomla 6 (klassische Variante)
   Originalgetreuer Nachbau des YOOtheme-Warp-Templates von 2019:
   Kopfband mit Slider und Logo-Kasten, links Navigation / Sprechzeiten /
   Aktuelles, rechts Inhalt. Schriften: Dosis (Navigation, Überschriften),
   Titillium (Text) – beide lokal. Farben wie im Original-CSS (theme.css).
   ========================================================================== */

:root {
	--ep-primary: #4579a5;      /* Überschriften, aktive Navigation (Original) */
	--ep-primary-dark: #2f5a82;
	--ep-nav: #9a7863;          /* Navigation (Original: Braun) */
	--ep-logo: #8da8bd;         /* Logo-Kasten */
	--ep-hours: #6f8fb2;        /* Sprechzeiten in der Seitenleiste */
	--ep-accent: #f39200;       /* „URLAUB:“ usw. */
	--ep-text: #1a1a1a;
	--ep-muted: #8c8c8c;
	--ep-bg: #ffffff;
	--ep-band: #e6e6dc;
	--ep-footer-text: #8a8174;
	--ep-line: #d4d4d4;
	--ep-open: #2e7d4f;
	--ep-font: "Titillium", "Titillium Web", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--ep-font-head: "Dosis", "Titillium", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--ep-max: 1130px;
	--ep-side: 274px;
	--ep-gap: 29px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body.ep {
	margin:0;
	font-family: var(--ep-font);
	font-size:16.8px;
	line-height:24px;
	color: var(--ep-text);
	background: var(--ep-bg);
}

img { max-width: 100%; height: auto; }
a { color: var(--ep-primary); text-underline-offset: .15em; }
a:hover { color: var(--ep-primary-dark); }
:focus-visible { outline: 2px solid var(--ep-primary); outline-offset: 2px; }
strong, b { font-weight: 600; }

.ep-wrap { width: 100%; max-width: var(--ep-max); margin:0 auto; }

.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;
}

.ep-skip { position: absolute; left: -999px; top: 0; z-index: 100; background: var(--ep-primary); color: #fff; padding: .6rem 1rem; }
.ep-skip:focus { left: 0; }

/* ---------- Kopfband mit Slider ---------- */
.ep-band { background: var(--ep-band); }
.ep-band > .ep-wrap { position: relative; }
.ep-brand__logo { display: block; }

.ep-slider { position: relative; overflow: hidden; }
.ep-slider__track { position: relative; }
.ep-slider__slide { margin: 0; position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease; }
.ep-slider__slide:first-child { position: relative; opacity: 1; } /* bestimmt die Höhe, sichtbar ohne JS */
.ep-slider.is-ready .ep-slider__slide:first-child:not(.is-active) { opacity: 0; }
.ep-slider__slide.is-active { opacity: 1; }
.ep-slider__slide picture { display: block; width: 100%; height: 100%; }
.ep-slider__slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ep-slider__slide:first-child img { height: auto; }
.ep-slider__btn {
	position: absolute; top: 50%; transform: translateY(-50%);
	width: 36px; height: 36px; border: 0; border-radius: 50%;
	background: rgba(255, 255, 255, .75); color: var(--ep-text);
	font-size: 1.3rem; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .2s;
}
.ep-slider:hover .ep-slider__btn, .ep-slider__btn:focus-visible { opacity: 1; }
.ep-slider__btn--prev { left: 10px; }
.ep-slider__btn--next { right: 10px; }
.ep-slider__dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 7px; margin: 0; padding: 0; list-style: none; opacity: 0; transition: opacity .2s; }
.ep-slider:hover .ep-slider__dots, .ep-slider:focus-within .ep-slider__dots { opacity: 1; }
.ep-slider__dots button { width: 10px; height: 10px; padding: 0; border-radius: 50%; border: 2px solid #fff; background: transparent; cursor: pointer; }
.ep-slider__dots button[aria-current="true"] { background: #fff; }
.ep-slider--single .ep-slider__btn, .ep-slider--single .ep-slider__dots { display: none; }
@media (prefers-reduced-motion: reduce) { .ep-slider__slide { transition: none; } }

/* Logo-Kasten über dem Kopfbild (deckt den im Foto eingebrannten Kasten ab; Blätter animiert) */
.ep-logo {
	position: absolute; z-index: 5; top: 0;
	left: 16.55%; width: 21.4%;
	line-height: 0; display: block;
}
.ep-logo svg { display: block; width: 100%; height: auto; }
.ep-logo .ep-leaf { transform-box: fill-box; transform-origin: 50% 100%; }
html:not(.ep-leaf-seen) .ep-logo .ep-leaf { animation: ep-leaf-grow 1.1s cubic-bezier(.22, 1.45, .4, 1) both; }
html:not(.ep-leaf-seen) .ep-logo .ep-leaf--l { animation-delay: .3s; --leaf-tilt: -28deg; }
html:not(.ep-leaf-seen) .ep-logo .ep-leaf--r { animation-delay: .6s; --leaf-tilt: 28deg; }
@keyframes ep-leaf-grow {
	0%   { transform: scale(0) rotate(var(--leaf-tilt, 0deg)); opacity: 0; }
	35%  { opacity: 1; }
	100% { transform: scale(1) rotate(0); opacity: 1; }
}
.ep-logo:hover .ep-leaf--l { animation: ep-leaf-sway 1.2s ease-in-out; }
.ep-logo:hover .ep-leaf--r { animation: ep-leaf-sway 1.2s ease-in-out .1s reverse; }
@keyframes ep-leaf-sway { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-7deg); } 70% { transform: rotate(5deg); } }

/* Telefonnummer im Kopfbild anklickbar (unsichtbarer Link über dem braunen Feld) */
.ep-tel {
	position: absolute; z-index: 5; right: 0; bottom: 0;
	width: 27.6%; height: 11.2%;
	border-radius: 4px 0 0 0;
	transition: background-color .2s, box-shadow .2s;
}
.ep-tel:hover { background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .45); }
.ep-tel:focus-visible { outline: 3px solid #f0a040; outline-offset: -3px; }
@media (max-width: 760px) { .ep-tel { height: 16%; width: 32%; } } /* größere Tippfläche */

/* ---------- Grundraster: links Navigation + Seitenleiste, rechts Inhalt ---------- */
.ep-layout {
	display: grid;
	grid-template-columns: var(--ep-side) minmax(0, 1fr);
	grid-template-areas:
		"nav  main"
		"side main";
	grid-template-rows: auto 1fr;
	column-gap:var(--ep-gap);
	padding-top:24px;
	padding-bottom:60px;
	align-items: start;
}
.ep-navarea { grid-area: nav; }
.ep-content { grid-area: main; min-width: 0; }
.ep-sidebar { grid-area: side; }
.ep-content:focus { outline: none; }

/* ---------- Navigation (senkrecht, wie Original: Dosis, Braun, aktiv Blau) ---------- */
.ep-nav ul { list-style: none; margin:0; padding:0; }
.ep-nav > ul > li, .ep-nav .mod-menu > li { position: relative; border-top: 1px solid var(--ep-line); border-bottom: 1px solid var(--ep-line); }
.ep-nav > ul > li + li, .ep-nav .mod-menu > li + li { margin-top:-1px; }
.ep-nav a, .ep-nav .nav-header, .ep-nav .separator, .ep-nav .mod-menu__heading {
	display: block;
	padding:8.4px 48px 7.2px 14.4px;
	color: var(--ep-nav);
	text-decoration: none;
	font-family: var(--ep-font-head);
	font-weight: 400;
	font-size:30px;
	line-height:37.2px;
	text-transform: uppercase;
	transition: color .15s;
}
.ep-nav a:hover, .ep-nav a:focus-visible { color: var(--ep-primary); }
.ep-nav li.current > a, .ep-nav li.active > a { color: var(--ep-primary); }

/* Joomla-6-Knopf zum Aufklappen → Pfeil wie im Original (‹ zu, ⌄ offen) */
.ep-nav .mod-menu__toggle-sub {
	position: absolute; top: 0; right: 0;
	width: 48px; height: 53px; margin:0; padding:0;
	display: flex; align-items: center; justify-content: center;
	background: transparent; border: 0; cursor: pointer;
	color: var(--ep-nav); font: 400 31px/1 var(--ep-font-head);
}
.ep-nav .mod-menu__toggle-sub [class*="icon-"] { display: none; }
.ep-nav .mod-menu__toggle-sub::before { content: "‹"; display: block; transition: transform .2s; }
.ep-nav .mod-menu__toggle-sub[aria-expanded="true"]::before { transform: rotate(-90deg); }
.ep-nav .mod-menu__toggle-sub:hover, .ep-nav .mod-menu__toggle-sub:focus-visible { color: var(--ep-primary); }

/* Unterpunkte: aufklappbar (Akkordeon) wie im Original */
.ep-nav .mod-menu__sub, .ep-nav li > ul { display: none; background: #f4f4f4; border-top: 1px solid #d8d8d8; }
.ep-nav .mod-menu__sub[aria-hidden="false"], .ep-nav .mod-menu__sub.show-menu,
.ep-nav li.ep-sub-open > ul { display: block; }
.ep-nav li > ul li { border-bottom: 1px solid #d8d8d8; }
.ep-nav li > ul li:last-child { border-bottom: 0; }
.ep-nav li > ul a { font-size:24px; line-height:36px; padding:3.6px 14.4px 3.6px 26.4px; color: #9c7862; text-transform: none; }
.ep-nav li > ul li.current > a, .ep-nav li > ul li.active > a { color: #9c7862; }
.ep-nav li > ul a:hover, .ep-nav li > ul a:focus-visible { color: var(--ep-primary); }

.ep-navtoggle { display: none; }

/* ---------- Inhalt ---------- */
.ep-content h1, .ep-article__title {
	font-family: var(--ep-font-head);
	font-size:31.2px;
	font-weight: 400;
	line-height:1.2;
	text-transform: uppercase;
	color: var(--ep-primary);
	margin:4.8px 0 16.8px;
}
.ep-content h2 {
	/* wie Original: kleine Zwischenüberschrift in Versalien, Braun, mit feiner Linie darunter */
	font-family: var(--ep-font);
	font-size:15.6px;
	font-weight: 400;
	line-height:20.4px;
	letter-spacing: .03em;
	text-transform: uppercase;
	color: var(--ep-nav);
	margin:26.4px 0 14.4px;
	padding-bottom:12px;
	border-bottom: 1px solid #e4e4e4;
}
.ep-content h2:has(+ .ep-hours) { border-bottom: 0; padding-bottom:0; margin-bottom:4.8px; }
.ep-content h3 { font-family: var(--ep-font-head); font-weight: 500; font-size:20.4px; color: var(--ep-primary); margin:24px 0 7.2px; }
.ep-content p { margin:0 0 16.8px; }
.ep-content ul { padding-left:1.2rem; }
.ep-lead { font-size:inherit; }
.ep-sign { font-style: normal; }

.ep-teamlinks { list-style: none; padding:0 !important; margin:1.2rem 0; border-top: 1px solid var(--ep-line); }
.ep-teamlinks li { border-bottom: 1px solid var(--ep-line); }
.ep-teamlinks a { display: block; padding:.5rem 0; text-decoration: none; font-family: var(--ep-font-head); font-size:22.8px; text-transform: uppercase; color: var(--ep-nav); }
.ep-teamlinks a:hover { color: var(--ep-primary); }
.ep-teamlinks a::after { content: " ›"; }

/* Vita wie Original: zwischen zwei feinen Linien, klein, alles in Braun */
.ep-content h2:has(+ .ep-vita), .ep-content .ep-vita-title {
	margin:21.6px 0 2.4px; padding:16.8px 0 0; border-top: 1px solid var(--ep-line); border-bottom: 0;
	font-family: var(--ep-font); font-size:15.6px; line-height:20.4px; font-weight: 400; letter-spacing: .03em;
	color: var(--ep-nav); text-transform: uppercase;
}
.ep-vita { width: 100%; border-collapse: collapse; margin:0 0 28.8px; font-size:16.2px; line-height:22.8px; color: var(--ep-nav); border-bottom: 1px solid var(--ep-line); }
.ep-vita th, .ep-vita td { text-align: left; vertical-align: top; padding:4.8px 0; font-weight: 400; color: var(--ep-nav); }
.ep-vita tr:first-child th, .ep-vita tr:first-child td { padding-top:9.6px; }
.ep-vita tr:last-child th, .ep-vita tr:last-child td { padding-bottom:19.2px; }
.ep-vita th { white-space: nowrap; width: 116px; padding-right:24px; }

.ep-note { background: var(--ep-band); padding:.8rem 1rem; margin:1.2rem 0; }
.ep-alert { color: #b42318; font-weight: 600; margin:1.2rem 0; text-transform: uppercase; }
.ep-alert a { color: inherit; }
.ep-address { font-style: normal; line-height:1.45; margin-bottom:1em; }

/* Sprechzeiten (Tabellen) */
.ep-hours { border-collapse: collapse; }
.ep-hours caption { text-align: left; }
.ep-hours th, .ep-hours td { padding:0 1.1rem 0 0; text-align: left; font-weight: 400; }
.ep-content .ep-hours { font-family: var(--ep-font-head); font-size:18px; line-height:18px; color: #222; text-transform: uppercase; margin-bottom:14.4px; }
.ep-content .ep-hours thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.ep-content .ep-hours th, .ep-content .ep-hours td { padding:0 1.1em 0 0; border: 0; white-space: nowrap; }
.ep-content .ep-hours th { width: 2.6em; }
.ep-content .ep-hours td + td:not(.is-closed)::before { content: "& "; }
.ep-content .ep-hours td.is-closed { color: inherit; }
.ep-hours td.is-closed { color: var(--ep-muted); }
.ep-hours tr.is-today th, .ep-hours tr.is-today td { font-weight: 600; }

/* FAQ – zurückhaltend im Stil der Seite */
.ep-faq { margin-top:2.2rem; }
.ep-faq-item { border-bottom: 1px solid var(--ep-line); }
.ep-faq-item summary { cursor: pointer; padding:.5rem 1.8rem .5rem 0; position: relative; list-style: none; color: var(--ep-text); }
.ep-faq-item summary::-webkit-details-marker { display: none; }
.ep-faq-item summary::after { content: "+"; position: absolute; right: .2rem; top: .3rem; font-size:1.15rem; color: var(--ep-primary); }
.ep-faq-item[open] summary::after { content: "–"; }
.ep-faq-item > div { padding:0 0 .8rem; }
.ep-faq-item > div p:last-child { margin-bottom:0; }

/* ---------- Seitenleiste (links unter der Navigation) ---------- */
.ep-sidebar { display: grid; gap:40.8px; margin-top:36px; font-size:15.6px; line-height:1.45; }
.ep-box__title { margin:0 0 12px; font-family: var(--ep-font-head); font-weight: 400; font-size:28.8px; text-transform: uppercase; color: var(--ep-primary); }
.ep-box__title picture { display: block; }
.ep-box__title img { display: block; max-width: 100%; height: auto; }

/* Sprechzeiten wie Original: „MO  8 - 13  & 15 - 18“ in Dosis, Blau */
.ep-box--sprechzeiten .ep-hours { font-family: var(--ep-font-head); font-size:19.8px; line-height:24px; letter-spacing: .02em; color: var(--ep-hours); text-transform: uppercase; }
.ep-box--sprechzeiten .ep-hours th { width: 3.4em; padding-right:.6em; }
.ep-box--sprechzeiten .ep-hours td { padding-right:.7em; white-space: nowrap; }
.ep-box--sprechzeiten .ep-hours td + td:not(.is-closed)::before { content: "& "; }
.ep-box--sprechzeiten .ep-hours td.is-closed { color: var(--ep-hours); }
.ep-box--sprechzeiten .ep-hours tr.is-today th,
.ep-box--sprechzeiten .ep-hours tr.is-today td { color: var(--ep-primary); font-weight: 500; }

/* Anzeige „Jetzt geöffnet“ (aus Sprechzeiten, Urlaub in „Aktuelles“ und Feiertagen RLP) */
.ep-open { margin:12px 0 0; font-family: var(--ep-font-head); font-size:16.8px; line-height:1.3; color: var(--ep-hours); text-transform: uppercase; display: flex; gap:.45em; align-items: baseline; }
.ep-open[hidden] { display: none; }
.ep-open__dot { flex: none; width: 11px; height: 11px; border-radius: 50%; background: #b9b9b9; transform: translateY(-1px); }
.ep-open.is-open { color: var(--ep-open); }
.ep-open.is-open .ep-open__dot { background: var(--ep-open); animation: ep-pulse 2.4s ease-out infinite; }
.ep-open.is-off .ep-open__dot { background: var(--ep-accent); }
.ep-open a { color: inherit; }
@keyframes ep-pulse { 0% { box-shadow: 0 0 0 0 rgba(46, 125, 79, .45); } 70%, 100% { box-shadow: 0 0 0 7px rgba(46, 125, 79, 0); } }

.ep-box--aktuell p { margin:0 0 .7rem; }
.ep-aktuell-item { margin-bottom:1.4rem; }
.ep-aktuell-item:last-child { margin-bottom:0; }
.ep-aktuell-title { color: var(--ep-accent); font-weight: 600; text-transform: uppercase; margin-bottom:.45rem !important; }
.ep-aktuell-item a { color: var(--ep-text); }
.ep-box--bottom { text-align: left; }

/* ---------- Fußzeile (Kasten in Seitenbreite, drei Spalten) ---------- */
.ep-footer { background: var(--ep-band); color: var(--ep-footer-text); font-size:14.4px; line-height:1.55; text-transform: uppercase; letter-spacing: .02em; }
.ep-footer__inner { display: grid; grid-template-columns: repeat(3, 1fr); gap:1.2rem 2rem; padding:1.4rem 1.4rem 1.6rem; }
.ep-footer__col--right, .ep-footer__col--right > div { display: contents; }
.ep-footer p, .ep-footer ul { margin:0 0 .1rem; padding:0; list-style: none; }
.ep-footer a { color: var(--ep-accent); text-decoration: none; }
.ep-footer a:hover { text-decoration: underline; }
.ep-copy { margin-top:.1rem !important; }
.ep-copy a { color: inherit; }
.ep-copy a:hover { color: var(--ep-accent); }

.ep-totop { text-align: center; margin: .8rem 0 2rem; }
.ep-totop a { color: var(--ep-muted); }

/* Anruf-Button (nur Smartphone) */
.ep-callbtn { display: none; }

/* ---------- Responsiv ---------- */
@media (max-width: 1190px) {
	.ep-layout, .ep-footer { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 980px) {
	:root { --ep-side: 220px; --ep-gap: 22px; }
	body.ep { font-size: 15px; line-height: 19px; }
	.ep-nav a, .ep-nav .nav-header, .ep-nav .separator { font-size: 24px; line-height: 30px; }
	.ep-content h1, .ep-article__title { font-size: 27px; }
}

@media (max-width: 760px) {
	body.ep { font-size: 16px; line-height: 1.5; }
	.ep-content p { margin-bottom: 1em; }
	.ep-layout {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas: "nav" "main" "side";
		grid-template-rows: auto;
		padding-top: 0;
	}
	.ep-navarea { margin: 0 -16px 18px; background: #fff; border-bottom: 1px solid var(--ep-line); }
	.ep-navtoggle {
		display: flex; align-items: center; gap: .7rem; width: 100%;
		min-height: 52px; padding: 0 16px;
		background: none; border: 0;
		font: 400 22px/1 var(--ep-font-head); color: var(--ep-nav); text-transform: uppercase; cursor: pointer;
	}
	.ep-navtoggle[aria-expanded="true"] { color: var(--ep-primary); }
	.ep-navtoggle__bars, .ep-navtoggle__bars::before, .ep-navtoggle__bars::after { display: block; width: 22px; height: 2px; background: currentColor; position: relative; content: ""; transition: transform .2s, background-color .2s; }
	.ep-navtoggle__bars::before { position: absolute; top: -7px; }
	.ep-navtoggle__bars::after { position: absolute; top: 7px; }
	.ep-navtoggle[aria-expanded="true"] .ep-navtoggle__bars { background: transparent; }
	.ep-navtoggle[aria-expanded="true"] .ep-navtoggle__bars::before { transform: translateY(7px) rotate(45deg); }
	.ep-navtoggle[aria-expanded="true"] .ep-navtoggle__bars::after { transform: translateY(-7px) rotate(-45deg); }
	.ep-nav { display: none; }
	.is-open .ep-nav { display: block; }
	.ep-nav > ul > li:last-child, .ep-nav .mod-menu > li:last-child { border-bottom: 0; }
	.ep-nav a, .ep-nav .nav-header, .ep-nav .separator { font-size: 22px; line-height: 28px; padding: 10px 56px 9px 16px; }
	.ep-nav .mod-menu__toggle-sub { width: 56px; height: 48px; font-size: 28px; }
	.ep-nav li > ul a { font-size: 19px; padding: 10px 16px 9px 32px; }
	.ep-content h1, .ep-article__title { font-size: 24px; }
	.ep-vita, .ep-content h2:has(+ .ep-vita), .ep-content h2 { font-size: 15px; line-height: 21px; }
	.ep-vita th { width: 84px; padding-right: 14px; }
	.ep-content .ep-hours { font-size: 17px; line-height: 22px; }
	.ep-sidebar { margin-top: 36px; font-size: 14px; gap: 30px; }
	.ep-box--sprechzeiten .ep-hours { font-size: 17px; line-height: 24px; }
	.ep-open { font-size: 15px; }
	.ep-footer__inner { grid-template-columns: 1fr; }
	body.ep { padding-bottom: 64px; }
	.ep-callbtn {
		display: flex; align-items: center; justify-content: center; gap: .5rem;
		position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
		min-height: 56px; padding: .75rem 1rem;
		background: var(--ep-primary); color: #fff; text-decoration: none; font-weight: 600;
		box-shadow: 0 -2px 10px rgba(0, 0, 0, .15);
	}
}

@media (prefers-reduced-motion: reduce) {
	html:not(.ep-leaf-seen) .ep-logo .ep-leaf, .ep-logo:hover .ep-leaf, .ep-open.is-open .ep-open__dot { animation: none !important; }
}

@media print {
	.ep-navarea, .ep-band, .ep-callbtn, .ep-skip, .ep-totop, .ep-open { display: none !important; }
	.ep-layout { display: block; }
}
