@charset "utf-8";

/* ==========================================================================
   endo-Revitalzentrum - modern, responsive stylesheet
   Same brand identity (logo, teal-grey palette, hero photos) rebuilt as a
   fluid, mobile-first layout. Content-page class names are preserved so the
   ~100 existing pages keep working; only the shared shell markup changed.
   ========================================================================== */

:root {
  --brand: #586a6f;        /* primary brand grey-teal (nav, headings) */
  --ink: #39454a;          /* body text - high contrast on white */
  --muted: #6f7f84;        /* footer, secondary text */
  --accent: #7d97a0;       /* hover states */
  --accent-dark: #4f6b74;  /* links, active accents */
  --line: #cdd8de;         /* hairlines / borders */
  --bg: #e8edf1;           /* page background */
  --card: #ffffff;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  --maxw: 980px;
  --header-h: clamp(120px, 19vw, 242px);
}

/* --- reset / base ------------------------------------------------------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { height: 100%; -webkit-text-size-adjust: 100%; }
/* Safety net: never allow a stray element to widen the page and pin content to
   the edge / open dead space on mobile. Belt-and-suspenders alongside the
   per-element caps below. */
html, body { overflow-x: hidden; }
body {
  font-family: Verdana, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}
img { border: 0; }
a { color: var(--accent-dark); }

.skip-link {
  position: absolute;
  left: 8px;
  top: -60px;              /* parked ABOVE the viewport (vertical offset only) so it can
                              never widen the page - a left:-9999px park creates a ~10000px
                              off-canvas box that pins content to one edge on mobile */
  z-index: 100;
  background: #fff;
  padding: 8px 14px;
  border: 1px solid var(--line);
  transition: top 0.15s ease;
}
.skip-link:focus { top: 8px; }

/* --- page container ----------------------------------------------------- */
.page {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 10px 12px 28px;
}

/* --- header (logo + hero photos) --------------------------------------- */
.site-header {
  display: flex;
  align-items: stretch;
  gap: 9px;                /* logo → center: thin strip of page bg, as on the original */
  height: var(--header-h);
  overflow: hidden;
}
.brand { flex: 0 0 auto; display: block; }
.brand-logo { display: block; height: 100%; width: auto; }
.hero { flex: 1 1 auto; display: flex; gap: 10px; min-width: 0; }
.hero-img { display: block; height: 100%; }
.hero-c { flex: 0 0 auto; width: auto; }
.hero-r { flex: 1 1 auto; width: auto; min-width: 0; object-fit: cover; }

/* --- top navigation ----------------------------------------------------- */
.topnav {
  background: var(--brand);
  border-radius: var(--radius);
  margin-top: 10px;
  overflow: hidden;
}
.topnav-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
}
.topnav-link {
  display: block;
  padding: 10px 18px;
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border-left: 1px solid rgba(255, 255, 255, 0.14);   /* thin divider between items */
}
.topnav-list li:first-child .topnav-link { border-left: 0; }
.topnav-link:hover,
.topnav-link:focus { background: var(--accent); }
.topnav-link.is-active { background: rgba(255, 255, 255, 0.16); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 14px 18px;
  background: transparent;
  border: 0;
  color: #fff;
  font: bold 15px/1 Verdana, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  cursor: pointer;
}
.nav-toggle-icon {
  position: relative;
  display: inline-block;
  width: 22px;
  height: 2px;
  background: #fff;
}
.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  background: #fff;
}
.nav-toggle-icon::before { top: -7px; }
.nav-toggle-icon::after { top: 7px; }

/* --- main layout (content + sidebar) ----------------------------------- */
.layout { margin-top: 20px; }
.content {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 24px;
}
.content::after { content: ""; display: block; clear: both; }
.sidebar { margin-top: 20px; }

@media (min-width: 720px) {
  .layout {
    display: grid;
    grid-template-columns: 286px minmax(0, 1fr);
    gap: 26px;
    align-items: start;
  }
  .sidebar { grid-column: 1; grid-row: 1; margin-top: 0; }
  .content { grid-column: 2; grid-row: 1; }
}

/* --- sidebar cards ------------------------------------------------------ */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  margin-bottom: 20px;
  overflow-wrap: break-word;
}
.sidebar .card:last-child { margin-bottom: 0; }
.card-heading {
  display: block;
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: bold;
  line-height: 1.3;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--brand);
  overflow-wrap: break-word;
}
.card-media { display: block; width: 100%; height: auto; border-radius: 4px; margin-bottom: 10px; }

.contactSideBar,
.teaserSideBar,
.teaserSideBarNews {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  overflow-wrap: break-word;
}
.contactSideBar p,
.teaserSideBar p { margin-bottom: 12px; }
.contactSideBar a { color: var(--accent-dark); }
.teaserSideBarNews p { white-space: pre-line; margin-bottom: 12px; }
.someaMehr { text-align: right; margin-bottom: 0; }
.someaMehr a { font-weight: bold; color: var(--accent-dark); text-decoration: none; }
.someaMehr a:hover { text-decoration: underline; }

/* --- content typography ------------------------------------------------- */
.headline { padding: 4px 0 14px; }
.headline h1,
.headline h2,
.headline > p {
  color: var(--brand);
  font-weight: bold;
  line-height: 1.3;
  margin: 0;
}
.headline h1 { font-size: 23px; }
.headline h2 { font-size: 18px; }
.headline > p { font-size: 19px; margin-bottom: 10px; }
.headlinetext {
  font-weight: bold;
  color: var(--brand);
  margin-bottom: 10px;
}
p.headline2 { font-weight: bold; margin-bottom: 6px; }
/* Content sub-heading (18px, bold, brand). Replaces the legacy hack of typing
   literal spaces between letters ("L I P Ö D E M"), which wrapped oddly. */
.subHeading {
  font-size: 18px;
  font-weight: bold;
  color: var(--brand);
  line-height: 1.3;
  margin-bottom: 8px;
}

.mainText {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink);
  text-align: left;
  hyphens: auto;
  -webkit-hyphens: auto;
  overflow-wrap: break-word;
}
.hyphenate { hyphens: auto; -webkit-hyphens: auto; }
.mainText p { margin-bottom: 16px; }
/* Restore list indentation stripped by the global `* { padding: 0 }` reset:
   without a padding-left, `outside` bullet markers hang left of the content box.
   Scoped to .content so nav/sidebar lists (their own list-style rules) are
   untouched. */
.content ul,
.content ol { margin: 0 0 16px; padding-left: 1.5em; }
.content li { margin-bottom: 4px; }
.mainText img { max-width: 100%; height: auto; }
.mainText a,
.mainText p a {
  color: #1c2224;
  text-decoration: underline;
}
.mainText a:hover,
.mainText p a:hover { color: var(--accent-dark); }

.content img { max-width: 100%; height: auto; }
/* Safety net: cap embedded media to the container so it can never force
   horizontal scroll on narrow screens (preventive - none today). */
.content iframe,
.content embed,
.content object,
.content video,
.content table { max-width: 100%; }
.content iframe { height: auto; }
/* Safety net: some legacy pages hard-code inline pixel widths (e.g.
   style="width:500px") that would overflow narrow screens. max-width caps
   them to the container without disturbing their desktop width. */
.content [style*="width"] { max-width: 100%; }
.boldText { font-weight: bold; }
.horLineGrey { border-bottom: 1px solid var(--line); margin: 14px 0; }

.weiterButton { text-align: right; padding: 6px 0 10px; }
.weiterButton a {
  font-weight: bold;
  color: var(--accent-dark);
  text-decoration: none;
}
.weiterButton a:hover,
.weiterButton a:focus { text-decoration: underline; }

.floatRight { float: right; margin: 0 0 16px 20px; }

.paddingBottom { padding-bottom: 8px; }
.paddingRight { padding-right: 8px; }
.paddingTop { padding-top: 8px; }

/* --- home page two-column intro (index.html only) ---------------------- */
.homeSpalte1,
.homeSpalte2 { box-sizing: border-box; }
.homeSpalte2 img { margin: 5px 0 10px; }
@media (min-width: 620px) {
  .homeSpalte1,
  .homeSpalte2 { float: left; width: 50%; }
  .homeSpalte1 { padding-right: 26px; }
}

/* --- Leistungen image tiles (leistungen.html only) --------------------- */
div.leistungImg {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding-bottom: 10px;
}
a.leistungImg {
  display: block;
  width: auto;
  flex: 1 1 180px;
  max-width: 240px;
  aspect-ratio: 201 / 136;
  background-repeat: no-repeat;
  background-position: 0 0;
  background-size: 100% 200%;   /* each 201×136 sprite state fills the box width */
  border-radius: 4px;
}
a.leistungImg:hover { background-position: 0 100%; }
#leistung1 { background-image: url(img/leistungen/1.jpg); }
#leistung2 { background-image: url(img/leistungen/2.jpg); }
#leistung4 { background-image: url(img/leistungen/4.jpg); }
#leistung5 { background-image: url(img/leistungen/5.jpg); }
#leistung6 { background-image: url(img/leistungen/6.jpg); }
#leistung7 { background-image: url(img/leistungen/7.jpg); }

/* --- footer ------------------------------------------------------------- */
.footer {
  clear: both;
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  text-align: right;
  font-size: 13px;
  color: var(--muted);
}
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* --- mobile: collapse header photos + switch nav to a toggle ----------- */
@media (max-width: 640px) {
  /* Stack the logo over a slim, full-width hero banner so the header keeps its
     eye candy on phones. The wide per-page photo (.hero-r) is cropped to a
     short band; the square .hero-c is dropped to keep the composition clean. */
  .site-header {
    height: auto;
    flex-direction: column;
    gap: 12px;
  }
  .brand-logo { height: auto; width: clamp(200px, 62vw, 280px); }
  .hero {
    display: block;
    position: relative;
    width: 100%;
    height: clamp(92px, 27vw, 140px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
  }
  .hero-c { display: none; }
  .hero-r {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }
  /* Soft brand-toned gradient at the foot of the banner for a little depth. */
  .hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(88, 106, 111, 0) 52%, rgba(57, 69, 74, 0.22) 100%);
    pointer-events: none;
  }
  .nav-toggle { display: flex; }
  .topnav-panel { display: none; }
  .topnav-panel.is-open { display: block; }
  .topnav-list { flex-direction: column; }
  .topnav-link { border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.16); }
  .topnav-list li:first-child .topnav-link { border-top: 0; }
  .content { padding: 18px 16px; }
  .floatRight { float: none; display: block; margin: 0 0 16px; }
}

/* --- Impressionen gallery ---------------------------------------------- */
/* Responsive thumbnail grid for the photo gallery (kontakt/impressionen).
   auto-fill keeps ~3 columns on desktop, 2 on tablet, 1 on narrow phones.
   Portrait photos (723x964) are cropped to a card-shaped thumbnail via
   object-fit: cover; click-through opens the full-resolution image. */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(180px, 100%), 1fr));
  gap: 16px;
  margin-top: 18px;
}
.gallery-item {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.gallery-item img {
  display: block;
  width: 100%;
  height: 260px;
  object-fit: cover;
}
.gallery-item:hover,
.gallery-item:focus {
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.16);
  transform: translateY(-2px);
}



/* ==========================================================================
   Sidebar section navigation (left "accordion"), rebuilt as real-text links.
   Markup comes from the `sidenav` filter in .eleventy.js:
     nav.card-menu > ul.sidenav > li.sidenav-item
       > a.sidenav-l1 [+ ul.sidenav-sub > li > a (+ nested ul.sidenav-sub)]
   ========================================================================== */

.card-menu {
  padding: 6px 0;
  overflow: hidden;
}

.sidenav,
.sidenav-sub {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidenav-item { border-top: 1px solid var(--line); }
.sidenav-item:first-child { border-top: 0; }

/* Level 1 - section headings */
.sidenav-l1 {
  display: block;
  padding: 11px 18px;
  color: var(--brand);
  font-size: 14px;
  font-weight: bold;
  line-height: 1.35;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
}
.sidenav-l1:hover,
.sidenav-l1:focus { background: #eef2f4; }
.sidenav-l1.is-active { color: var(--accent-dark); background: #eef2f4; }

/* Levels 2 and 3 - expanded child links */
.sidenav-sub { padding: 2px 0 8px; }
.sidenav-sub a {
  display: block;
  padding: 6px 18px 6px 24px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.4;
  text-decoration: none;
  overflow-wrap: break-word;
}
.sidenav-sub a:hover,
.sidenav-sub a:focus { color: var(--accent-dark); background: #f2f5f6; }
.sidenav-sub li.is-active > a { font-weight: bold; color: var(--accent-dark); }

/* Level 3 - nested one step deeper */
.sidenav-sub .sidenav-sub { padding: 0 0 4px; }
.sidenav-sub .sidenav-sub a { padding-left: 36px; font-size: 13px; }


.lexikon_top {
	clear: both;
	width: 100%;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 6px 12px;
	border-bottom: 1px solid #c1cdd5;
	padding-bottom: 8px;
	padding-top: 24px;
}
.lexikon_header {
	clear: left;
	float: left;
	line-height: 0px;
	font-size: 0px;
}
.lexikon_header .lexikonTitle {
	margin: 0;
	font-size: 22px;
	line-height: 1.3;
	font-weight: bold;
	color: var(--brand, #586a6f);
}
.lexikon_letters {
	display: flex;
	flex-wrap: wrap;
	gap: 2px;
	justify-content: flex-end;
}
.lexLetter {
	display: inline-block;
	min-width: 22px;
	padding: 1px 5px;
	text-align: center;
	font-size: 13px;
	font-weight: bold;
	line-height: 1.5;
	color: var(--brand, #586a6f);
	text-decoration: none;
	text-transform: uppercase;
	border-radius: 3px;
}
.lexLetter:hover,
.lexLetter:focus {
	color: #fff;
	background: var(--accent, #7d97a0);
}
.lexLetter.is-current {
	color: #fff;
	background: var(--accent-dark, #4f6b74);
}

.lexikonIndex {
	float: left;
	padding-right: 15px;
	padding-top: 8px;
	padding-bottom: 9px;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 14px;
	text-align: justify;
	line-height: 19px;
	letter-spacing: -0.02em;
 	word-spacing: -0.1em;
}
.lexikonIndex a {;
	color: #141718;
	text-decoration: none;
	padding: 2px;
}
.lexikonIndex a:hover {
	color: #ffffff;
	background-color: #91a1aa;
}
.lexikonText {
	float: left;
	clear: left;
	padding-top: 0px;
	padding-bottom: 13px;
	width: 100%;
}
.lexikonBackButton {
	float: left;
	clear: left;
	width: 100%;
	text-align: left;
	padding-top: 8px;
	padding-bottom: 15px;
	padding-right: 10px;
}
.lexikonBackButton a {
	font-weight: bold;
	color: var(--accent-dark, #4f6b74);
	text-decoration: none;
}
.lexikonBackButton a:hover,
.lexikonBackButton a:focus {
	text-decoration: underline;
}
.lexikonBackLine {
	float: left;
	width: 100%;
	height: 14px;
	border-bottom: 1px solid #c1cdd5;
}



/* Team-member rows: a fixed-ish portrait column beside a flexible bio column,
   collapsing to a single stacked column on narrow screens. Mirrors the
   flexbox + custom-property approach used in style.css - no floats, no fixed
   pixel widths on the text column. */
.teamMember {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  border-top: 1px solid var(--line, #cdd8de);
  padding: 16px 0;
}
.teamMember-portrait { flex: 0 0 auto; }
.teamMember-portrait img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}
.teamMember-body { flex: 1 1 0; min-width: 0; }
p.headlineTeam {
  font-weight: bold;
  margin: 0 0 10px;
  color: var(--brand, #586a6f);
}

/* Narrow screens: stack the portrait above the bio instead of overflowing. */
@media (max-width: 640px) {
  .teamMember { flex-direction: column; gap: 12px; }
}
