@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%; }
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: -9999px;
  top: 0;
  z-index: 100;
  background: #fff;
  padding: 8px 14px;
  border: 1px solid var(--line);
}
.skip-link:focus { left: 8px; 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; }

.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; }
.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; }
.floatLeft { float: left; margin: 0 18px 12px 0; }
.floatLeftMehr { float: left; margin-left: 15px; }
.floatLeftMehr a { color: var(--accent-dark); text-decoration: none; }
.floatLeftMehr a:hover { text-decoration: underline; }

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

a.inlinePDFBtn > img { border: 0; margin: 0; padding: 0; vertical-align: bottom; }

/* --- 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); }
#leistung3 { background-image: url(img/leistungen/3.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) {
  .site-header { height: auto; }
  .brand-logo { height: auto; width: clamp(200px, 62vw, 280px); }
  .hero { display: 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,
  .floatLeft { 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);
}

