/* ==========================================================================
   tpl_thelake – TheLake-WebService
   Aufbau: 1. Schriften  2. Tokens + Bausteine  3. Seitengerüst  4. Joomla-Elemente
           5. Unterseiten-Bausteine  6. Responsive
   ========================================================================== */

/* ---------- 1. Schriften (lokal, OFL-Lizenz, Latin-Subset) ---------- */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
  src: url("../fonts/fraunces.woff2") format("woff2");
}
@font-face {
  font-family: "Nunito Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/nunito-sans.woff2") format("woff2");
}

/* ==========================================================================
   2. Tokens + Bausteine (Startseite und allgemein)
   ========================================================================== */

:root {
  --tl-navy: #120D4D;
  --tl-ink: #1A1830;
  --tl-text: #3B3950;
  --tl-muted: #5A5870;
  --tl-lake: #2C6E86;
  --tl-lake-light: #9FD3E0;
  --tl-mist: #D9E4E6;
  --tl-sand: #F7F5F0;
  --tl-line: #DDD8CC;
  --tl-card-line: #E4E0D6;
  --tl-white: #FFFFFF;
  --tl-font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --tl-font-body: "Nunito Sans", "Nunito Regular", "Segoe UI", Helvetica, Arial, sans-serif;
  --tl-radius-l: 28px;
  --tl-radius-m: 22px;
  --tl-radius-s: 12px;
  --tl-pad-x: clamp(20px, 6.5vw, 96px);
}

/* ---------- Basis ---------- */
.tl-page {
  background: var(--tl-sand);
  color: var(--tl-ink);
  font-family: var(--tl-font-body);
  font-size: 17px;
  line-height: 1.6;
}
.tl-page *,
.tl-page *::before,
.tl-page *::after { box-sizing: border-box; }

.tl-wrap {
  max-width: 1440px;
  margin: 0 auto;
  padding-left: var(--tl-pad-x);
  padding-right: var(--tl-pad-x);
}

.tl-page h1,
.tl-page h2 {
  font-family: var(--tl-font-display);
  font-weight: 600;
  color: var(--tl-navy);
  margin: 0;
  letter-spacing: normal;
  text-transform: none;
}
.tl-page h1 { font-size: clamp(38px, 4.6vw, 64px); line-height: 1.05; }
.tl-page h2 { font-size: clamp(30px, 3.1vw, 44px); line-height: 1.15; }
.tl-page h3 {
  font-family: var(--tl-font-body);
  font-size: 22px;
  font-weight: 700;
  color: var(--tl-navy);
  margin: 0;
  text-transform: none;
}
.tl-page p { margin: 0; color: var(--tl-text); }

.tl-eyebrow {
  display: block;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tl-lake);
  margin-bottom: 12px;
}

.tl-section { padding-top: clamp(64px, 8vw, 120px); }
.tl-section-head { max-width: 720px; margin-bottom: 48px; }
.tl-section-head--split {
  max-width: none;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

/* ---------- Links & Buttons ---------- */
.tl-page a { color: var(--tl-navy); }
.tl-page a:hover { color: var(--tl-lake); }

.tl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 14px 30px;
  border-radius: 999px;
  font-family: var(--tl-font-body);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.2;
  text-decoration: none !important;
  border: 2px solid transparent;
  transition: background-color .2s, color .2s, border-color .2s;
  cursor: pointer;
}
.tl-page .tl-btn--primary { background: var(--tl-navy); color: var(--tl-white); border-color: var(--tl-navy); }
.tl-page .tl-btn--primary:hover { background: var(--tl-lake); border-color: var(--tl-lake); color: var(--tl-white); }
.tl-page .tl-btn--outline { background: transparent; color: var(--tl-navy); border-color: var(--tl-navy); }
.tl-page .tl-btn--outline:hover { background: var(--tl-navy); color: var(--tl-white); }
.tl-page .tl-btn--light { background: var(--tl-lake-light); color: var(--tl-navy); border-color: var(--tl-lake-light); }
.tl-page .tl-btn--light:hover { background: var(--tl-white); border-color: var(--tl-white); color: var(--tl-navy); }

.tl-textlink { font-weight: 700; text-decoration: none !important; }

.tl-page a:focus-visible,
.tl-page button:focus-visible,
.tl-page input:focus-visible,
.tl-page textarea:focus-visible {
  outline: 3px solid var(--tl-lake);
  outline-offset: 3px;
}

/* ---------- 1. Hero ---------- */
.tl-hero {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  padding-top: clamp(56px, 7vw, 104px);
  padding-bottom: clamp(48px, 6vw, 96px);
}
.tl-hero__text { display: flex; flex-direction: column; gap: 28px; }
.tl-hero__lead { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.55; max-width: 560px; }
.tl-hero__actions { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; }
.tl-hero__media { position: relative; min-height: 420px; }
.tl-hero__media img {
  position: absolute;
  inset: 0 0 0 40px;
  width: calc(100% - 40px);
  height: 100%;
  object-fit: cover;
  border-radius: var(--tl-radius-l);
  background: var(--tl-mist);
}
.tl-hero__badge {
  position: absolute;
  left: 0;
  bottom: 40px;
  background: var(--tl-white);
  border-radius: 18px;
  padding: 20px 26px;
  box-shadow: 0 12px 32px rgba(18, 13, 77, .12);
  display: flex;
  flex-direction: column;
}
.tl-hero__badge strong {
  font-family: var(--tl-font-display);
  font-size: 36px;
  font-weight: 600;
  color: var(--tl-navy);
  line-height: 1;
}
.tl-hero__badge span { font-size: 15px; color: var(--tl-muted); }

/* ---------- 2. Vertrauensleiste ---------- */
.tl-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--tl-line);
  border-bottom: 1px solid var(--tl-line);
  margin: 0;
  padding: 0;
  list-style: none;
}
.tl-facts li { padding: 32px 0; display: flex; flex-direction: column; gap: 4px; }
.tl-facts li + li { padding-left: 40px; border-left: 1px solid var(--tl-line); }
.tl-facts strong {
  font-family: var(--tl-font-display);
  font-size: 34px;
  font-weight: 600;
  color: var(--tl-navy);
  line-height: 1.2;
}
.tl-facts span { color: var(--tl-muted); }

/* ---------- 3. Leistungen ---------- */
.tl-services {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}
.tl-service {
  background: var(--tl-white);
  border: 1px solid var(--tl-card-line);
  border-radius: var(--tl-radius-m);
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.tl-service svg { width: 40px; height: 40px; stroke: var(--tl-lake); }
.tl-service .tl-textlink { margin-top: auto; }
.tl-page .tl-service--dark { background: var(--tl-navy); border-color: var(--tl-navy); }
.tl-page .tl-service--dark h3 { color: var(--tl-white); }
.tl-page .tl-service--dark p { color: #DCDAF0; }
.tl-page .tl-service--dark svg { stroke: var(--tl-lake-light); }
.tl-page .tl-service--dark .tl-textlink { color: var(--tl-lake-light); }
.tl-services__more { margin-top: 28px !important; color: var(--tl-muted) !important; font-size: 16px; }

/* ---------- 4. Joomla-Band ---------- */
.tl-band {
  margin-top: clamp(56px, 6vw, 80px);
  background: var(--tl-mist);
  border-radius: var(--tl-radius-l);
  padding: clamp(32px, 4vw, 56px) clamp(28px, 4.5vw, 64px);
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}
.tl-band__text { display: flex; flex-direction: column; gap: 14px; }
.tl-page .tl-band h2 { font-size: clamp(28px, 2.6vw, 38px); }
.tl-page .tl-band p { color: #2F3A48; }
.tl-band__action { display: flex; justify-content: flex-end; }

/* ---------- 5. Referenzen ---------- */
.tl-refs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}
.tl-ref { display: flex; flex-direction: column; gap: 14px; }
.tl-ref__img {
  display: block;
  aspect-ratio: 16 / 11;
  width: 100%;
  object-fit: cover;
  border-radius: 18px;
  background: var(--tl-card-line);
}
.tl-ref__tag {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--tl-lake);
}
.tl-ref h3 a { text-decoration: none; color: var(--tl-navy); }
.tl-ref h3 a:hover { color: var(--tl-lake); }

/* ---------- 6. Über mich ---------- */
.tl-about {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.tl-about__text { display: flex; flex-direction: column; gap: 18px; }
.tl-quote {
  margin: 0;
  background: var(--tl-white);
  border: 1px solid var(--tl-card-line);
  border-radius: var(--tl-radius-m);
  padding: 44px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.tl-quote svg { width: 36px; height: 36px; stroke: var(--tl-lake); }
.tl-quote blockquote {
  margin: 0;
  padding: 0;
  border: 0;
  font-family: var(--tl-font-display);
  font-size: 24px;
  line-height: 1.45;
  color: var(--tl-navy);
}
.tl-quote figcaption { color: var(--tl-muted); font-size: 15px; }

/* ---------- 7. Ablauf ---------- */
.tl-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  counter-reset: tl-step;
}
.tl-steps li {
  counter-increment: tl-step;
  border-top: 3px solid var(--tl-navy);
  padding-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tl-steps li::before {
  content: "0" counter(tl-step);
  font-family: var(--tl-font-display);
  font-size: 30px;
  font-weight: 600;
  color: var(--tl-lake);
  line-height: 1.2;
}
.tl-steps strong { font-size: 20px; color: var(--tl-navy); }
.tl-steps span { color: var(--tl-text); }

/* ---------- 8. Kontakt ---------- */
.tl-contact {
  margin-top: clamp(56px, 6vw, 80px);
  margin-bottom: clamp(56px, 6vw, 80px);
  background: var(--tl-navy);
  border-radius: var(--tl-radius-l);
  padding: clamp(32px, 5vw, 72px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(32px, 5vw, 72px);
}
.tl-contact__text { display: flex; flex-direction: column; gap: 20px; }
.tl-page .tl-contact h2 { color: var(--tl-white); }
.tl-page .tl-contact p { color: #DCDAF0; font-size: 19px; }
.tl-contact__direct { display: flex; flex-direction: column; gap: 10px; font-size: 19px; font-weight: 700; }
.tl-page .tl-contact__direct a { color: var(--tl-white); text-decoration: none; }
.tl-page .tl-contact__direct a + a { color: var(--tl-lake-light); }

/* Formular: greift für eigenes HTML-Formular UND für Joomla-Kontaktformular /
   Formular-Erweiterungen, die innerhalb von .tl-contact__form ausgegeben werden. */
.tl-contact__form { color: #DCDAF0; }
.tl-contact__form label,
.tl-contact__form .control-label,
.tl-contact__form .form-label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #DCDAF0;
  margin-bottom: 6px;
}
.tl-contact__form input[type="text"],
.tl-contact__form input[type="email"],
.tl-contact__form input[type="tel"],
.tl-contact__form textarea,
.tl-contact__form .form-control {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: var(--tl-radius-s);
  padding: 12px 16px;
  font-family: var(--tl-font-body);
  font-size: 16px;
  color: var(--tl-ink);
  background: var(--tl-white);
  margin-bottom: 18px;
}
.tl-contact__form textarea { min-height: 140px; resize: vertical; }
.tl-contact__form button[type="submit"],
.tl-contact__form .btn-primary {
  background: var(--tl-lake-light);
  color: var(--tl-navy);
  border: 0;
  border-radius: 999px;
  padding: 16px 32px;
  font-weight: 700;
  font-size: 17px;
  cursor: pointer;
}
.tl-contact__form button[type="submit"]:hover,
.tl-contact__form .btn-primary:hover { background: var(--tl-white); }
.tl-contact__form a { color: var(--tl-lake-light); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .tl-services,
  .tl-refs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tl-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 800px) {
  .tl-hero,
  .tl-band,
  .tl-about,
  .tl-contact,
  .tl-services,
  .tl-refs { grid-template-columns: minmax(0, 1fr); }

  .tl-hero__media { min-height: 320px; order: -1; }
  .tl-hero__media img { inset: 0; width: 100%; }
  .tl-hero__badge { left: 16px; bottom: 16px; }

  .tl-facts { grid-template-columns: minmax(0, 1fr); }
  .tl-facts li { padding: 20px 0; }
  .tl-facts li + li { padding-left: 0; border-left: 0; border-top: 1px solid var(--tl-line); }

  .tl-band__action { justify-content: flex-start; }
  .tl-service,
  .tl-quote { padding: 28px; }
}

@media (max-width: 520px) {
  .tl-steps { grid-template-columns: minmax(0, 1fr); }
  .tl-hero__actions .tl-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .tl-btn { transition: none; }
}

/* ==========================================================================
   3. Seitengerüst
   ========================================================================== */

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body.tl-page { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
.tl-page img { max-width: 100%; height: 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;
}

.tl-skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--tl-navy); color: var(--tl-white) !important;
  padding: 12px 20px; border-radius: 999px; font-weight: 700;
  text-decoration: none;
}
.tl-skip:focus { top: 12px; }

.tl-container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding-left: var(--tl-pad-x);
  padding-right: var(--tl-pad-x);
}

/* ---------- Header ---------- */
.tl-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 245, 240, .96);
  border-bottom: 1px solid var(--tl-line);
  backdrop-filter: blur(6px);
}
.tl-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 84px;
}

.tl-brand {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  text-decoration: none !important;
  flex-shrink: 0;
}
.tl-brand img { max-height: 52px; width: auto; }
.tl-brand__name {
  font-family: var(--tl-font-display);
  font-size: 24px;
  font-weight: 600;
  color: var(--tl-navy);
}
.tl-brand__tagline {
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--tl-muted);
  margin-top: 4px;
}

/* Navigation (Joomla mod_menu) */
.tl-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}
.tl-nav ul { list-style: none; margin: 0; padding: 0; }
.tl-nav > ul,
.tl-nav .mod-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}
.tl-nav li { position: relative; }
.tl-nav a,
.tl-nav .nav-header,
.tl-nav .mod-menu__heading,
.tl-nav .mod-menu__separator {
  display: block;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 16px;
  color: var(--tl-ink);
  text-decoration: none;
  border-radius: 999px;
  cursor: pointer;
}
.tl-nav a:hover { color: var(--tl-lake); }
.tl-nav li.current > a,
.tl-nav li.active > a,
.tl-nav li.active > .nav-header,
.tl-nav li.active > .mod-menu__heading { color: var(--tl-navy); background: var(--tl-mist); }

/* Untermenü (z. B. Leistungen) */
.tl-nav li.parent > a::after,
.tl-nav li.parent > .nav-header::after,
.tl-nav li.parent > .mod-menu__heading::after {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  margin-left: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-3px) rotate(45deg);
}
.tl-nav li > ul {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  min-width: 280px;
  padding: 10px;
  background: var(--tl-white);
  border: 1px solid var(--tl-card-line);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(18, 13, 77, .12);
}
.tl-nav li:hover > ul,
.tl-nav li:focus-within > ul { display: block; }
.tl-nav li > ul a { border-radius: 10px; font-weight: 600; }
.tl-nav li > ul a:hover { background: var(--tl-sand); }

.tl-nav__phone { white-space: nowrap; min-height: 46px; padding: 10px 22px; font-size: 16px; }

/* Burger */
.tl-navtoggle {
  display: none;
  width: 48px; height: 48px;
  border: 0; border-radius: 12px;
  background: transparent;
  cursor: pointer;
  position: relative;
}
.tl-navtoggle__bars,
.tl-navtoggle__bars::before,
.tl-navtoggle__bars::after {
  position: absolute;
  left: 12px;
  width: 24px; height: 2px;
  background: var(--tl-navy);
  content: "";
  transition: transform .2s, opacity .2s;
}
.tl-navtoggle__bars { top: 23px; }
.tl-navtoggle__bars::before { top: -8px; left: 0; }
.tl-navtoggle__bars::after { top: 8px; left: 0; }
.tl-navtoggle[aria-expanded="true"] .tl-navtoggle__bars { background: transparent; }
.tl-navtoggle[aria-expanded="true"] .tl-navtoggle__bars::before { transform: translateY(8px) rotate(45deg); }
.tl-navtoggle[aria-expanded="true"] .tl-navtoggle__bars::after { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hauptbereich ---------- */
.tl-main { flex: 1 0 auto; }
.tl-content { padding-top: clamp(40px, 6vw, 88px); padding-bottom: 24px; }
.tl-top, .tl-bottom { padding: 24px 0; }

/* Startseite: Beitrag ohne Rahmen, volle Breite */
.is-home .tl-main .item-page,
.is-home .tl-main .com-content-article { max-width: none; margin: 0; padding: 0; }
.is-home .tl-main .page-header,
.is-home .tl-main .article-info { display: none; }

/* Unterseiten: Fließtext auf angenehme Zeilenlänge */
.tl-content .item-page { max-width: 820px; }
.tl-content .item-page:has(.tl-wide) { max-width: none; }

.tl-content h1,
.tl-content .page-header h1,
.tl-content .page-header h2 {
  font-family: var(--tl-font-display);
  font-weight: 600;
  color: var(--tl-navy);
  font-size: clamp(34px, 3.8vw, 52px);
  line-height: 1.1;
  margin: 0 0 20px;
}
.tl-content h2 {
  font-family: var(--tl-font-display);
  font-weight: 600;
  color: var(--tl-navy);
  font-size: clamp(26px, 2.4vw, 34px);
  line-height: 1.2;
  margin: 48px 0 16px;
}
.tl-content h3 {
  font-size: 21px;
  font-weight: 700;
  color: var(--tl-navy);
  margin: 32px 0 10px;
}
.tl-content p { margin: 0 0 16px; }
.tl-content ul:not([class]),
.tl-content ol:not([class]) { padding-left: 22px; margin: 0 0 20px; }
.tl-content ul:not([class]) li { margin-bottom: 6px; }
.tl-content ul:not([class]) li::marker { color: var(--tl-lake); }
.tl-content p a,
.tl-content li a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.tl-content table { border-collapse: collapse; width: 100%; margin: 24px 0; }
.tl-content th, .tl-content td { border-bottom: 1px solid var(--tl-line); padding: 10px 12px; text-align: left; }

/* Beitrags-Metadaten dezent */
.article-info { font-size: 14px; color: var(--tl-muted); margin-bottom: 20px; }
.article-info dd { margin: 0; display: inline; }

/* ---------- Kontakt-Abschluss (vom Template ausgegeben) ---------- */
.tl-cta-wrap { padding-bottom: 8px; }

/* ---------- Footer ---------- */
.tl-footer {
  border-top: 1px solid var(--tl-line);
  padding: 36px 0;
  color: var(--tl-muted);
  font-size: 15px;
}
.tl-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  align-items: center;
  justify-content: space-between;
}
.tl-footer p { margin: 0; color: var(--tl-muted); }
.tl-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.tl-footer a { color: var(--tl-muted); text-decoration: none; }
.tl-footer a:hover { color: var(--tl-navy); text-decoration: underline; }

/* ---------- Fehlerseite ---------- */
.tl-error-box { padding: clamp(64px, 10vw, 140px) 0; max-width: 720px; }
.tl-error-code {
  font-family: var(--tl-font-display);
  font-size: clamp(80px, 12vw, 160px);
  font-weight: 600;
  color: var(--tl-mist);
  line-height: 1;
}

/* ==========================================================================
   4. Joomla-Elemente (Meldungen, Formulare, Blätterfunktion, Buttons)
   ========================================================================== */

#system-message-container { margin: 0 0 24px; }
joomla-alert, .alert {
  display: block;
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 16px;
  background: var(--tl-white);
  border: 1px solid var(--tl-card-line);
  border-left-width: 1px;
}
joomla-alert[type="success"], .alert-success { background: #E6F2EC; border-color: #B9D9C7; }
joomla-alert[type="danger"], joomla-alert[type="error"], .alert-danger { background: #F8E6E4; border-color: #E5BDB8; }
joomla-alert[type="warning"], .alert-warning { background: #FBF1DE; border-color: #EBD3A2; }

.btn, button.btn, input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 26px;
  border-radius: 999px;
  font-family: var(--tl-font-body);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
  border: 2px solid var(--tl-navy);
  background: var(--tl-white);
  color: var(--tl-navy);
  cursor: pointer;
  text-decoration: none;
}
.btn-primary, button.btn-primary, input[type="submit"] {
  background: var(--tl-navy);
  color: var(--tl-white);
}
.btn:hover, .btn-primary:hover, input[type="submit"]:hover {
  background: var(--tl-lake);
  border-color: var(--tl-lake);
  color: var(--tl-white);
}

/* Formulare allgemein (Kontaktformular Joomla, Suche, Login) */
.tl-page form .control-group { margin-bottom: 18px; }
.tl-page form label,
.tl-page form .control-label label,
.tl-page form .form-label { display: block; font-weight: 600; margin-bottom: 6px; }
.tl-page form input[type="text"],
.tl-page form input[type="email"],
.tl-page form input[type="tel"],
.tl-page form input[type="password"],
.tl-page form input[type="search"],
.tl-page form input[type="url"],
.tl-page form select,
.tl-page form textarea,
.tl-page .form-control,
.tl-page .form-select {
  width: 100%;
  max-width: 640px;
  min-height: 50px;
  padding: 12px 16px;
  border: 1px solid var(--tl-line);
  border-radius: var(--tl-radius-s);
  background: var(--tl-white);
  font-family: var(--tl-font-body);
  font-size: 16px;
  color: var(--tl-ink);
}
.tl-page form textarea { min-height: 150px; }
.tl-page form input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--tl-navy); vertical-align: middle; margin-right: 8px; }
.tl-page .invalid, .tl-page form .form-control-danger { border-color: #B3261E !important; }
.tl-page .form-control-feedback, .tl-page .invalid-feedback { color: #B3261E; font-size: 14px; }
.tl-page .star { color: #B3261E; }

/* Im dunklen Kontaktbereich keine Rahmen */
.tl-contact__form input[type="text"],
.tl-contact__form input[type="email"],
.tl-contact__form input[type="tel"],
.tl-contact__form textarea { border: 0; max-width: none; }
.tl-contact__form .btn,
.tl-contact__form input[type="submit"] { background: var(--tl-lake-light); border-color: var(--tl-lake-light); color: var(--tl-navy); }
.tl-contact__form .btn:hover { background: var(--tl-white); border-color: var(--tl-white); }
.tl-contact__form .control-label label,
.tl-contact__form legend { color: #DCDAF0; }
.tl-contact__form legend { font-size: 15px; }

/* Blätterfunktion */
.pagination { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 32px 0; }
.pagination .page-link {
  display: block; min-width: 44px; padding: 10px 14px; text-align: center;
  border-radius: 999px; border: 1px solid var(--tl-line); text-decoration: none; color: var(--tl-navy);
}
.pagination .active .page-link { background: var(--tl-navy); color: var(--tl-white); border-color: var(--tl-navy); }

/* Bildklassen aus den alten Beiträgen */
.bildVoll { display: block; width: 100%; height: auto; margin: 0 0 20px 0; }
.bildDrittelrechts { display: block; float: right; width: 40%; height: auto; margin: 0 0 30px 45px; }
.bildHalb { display: block; float: right; width: 50%; height: auto; margin: 4px 0 20px 25px; }
.bildDrittellinks { display: block; float: left; width: 30%; height: auto; margin: 4px 25px 20px 0; }
.bildBuch { display: block; float: right; width: 10%; height: auto; margin: 0 25px 10px 0; }

/* TZ Portfolio+ Referenzen: Grundgerüst, falls die Komponente kein eigenes Grid lädt */
.tpp-addon-vote { display: none !important; }
.tl-content .uk-button-primary.tp-item-readmore {
  background: var(--tl-navy); color: var(--tl-white); border: 2px solid var(--tl-navy);
  border-radius: 999px; padding: 10px 22px; font-weight: 700; text-decoration: none; display: inline-block;
}
.tl-content .uk-button-primary.tp-item-readmore:hover { background: var(--tl-lake); border-color: var(--tl-lake); }
.tl-content .tp-item-title.uk-card-title { font-size: 18px; line-height: 1.3; margin: 12px 0 8px; }

/* ==========================================================================
   5. Unterseiten-Bausteine
   ========================================================================== */
/* ---------- Bausteine für Unterseiten ---------- */

/* Seitenkopf: Oberzeile + H1 + Einleitung */
.tl-pagehead { max-width: 820px; margin: 0 0 40px; }
.tl-pagehead .tl-eyebrow { margin-bottom: 14px; }
.tl-pagehead h1 { margin-bottom: 18px; }
.tl-lead {
  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.55;
  color: var(--tl-text);
}

/* Fließtext-Block */
.tl-prose { max-width: 760px; }

/* Zwei- oder Dreispalter mit Karten (z. B. Pakete, Leistungen) */
.tl-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin: 32px 0;
}
.tl-card {
  background: var(--tl-white);
  border: 1px solid var(--tl-card-line);
  border-radius: var(--tl-radius-m);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tl-card h3 { margin: 0; }
.tl-card p { margin: 0; }
.tl-card__price {
  font-family: var(--tl-font-display);
  font-size: 30px;
  font-weight: 600;
  color: var(--tl-navy);
  line-height: 1.2;
}
.tl-card ul { margin: 6px 0 0; padding-left: 20px; }
.tl-card--accent { background: var(--tl-navy); border-color: var(--tl-navy); }
.tl-card--accent h3,
.tl-card--accent .tl-card__price { color: var(--tl-white); }
.tl-card--accent p,
.tl-card--accent li { color: #DCDAF0; }

/* Checkliste */
.tl-checklist { list-style: none; margin: 20px 0; padding: 0; }
.tl-checklist li {
  position: relative;
  padding-left: 32px;
  margin-bottom: 10px;
}
.tl-checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .45em;
  width: 18px;
  height: 10px;
  border-left: 2px solid var(--tl-lake);
  border-bottom: 2px solid var(--tl-lake);
  transform: rotate(-45deg);
}

/* Hinweisband (z. B. Joomla 3) – nutzt .tl-band aus Teil 1 */
.tl-band--inline { margin: 40px 0; }

/* Kontakt-Abschluss am Ende jeder Unterseite (Modul) */
.tl-cta {
  margin: clamp(48px, 6vw, 80px) 0;
  background: var(--tl-navy);
  border-radius: var(--tl-radius-l);
  padding: clamp(28px, 4vw, 56px);
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
}
.tl-cta h2 { color: var(--tl-white); margin: 0 0 10px; font-size: clamp(26px, 2.4vw, 34px); }
.tl-cta p { color: #DCDAF0; margin: 0; }
.tl-cta__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }
.tl-cta .tl-btn--outline { color: var(--tl-white); border-color: var(--tl-white); }
.tl-cta .tl-btn--outline:hover { background: var(--tl-white); color: var(--tl-navy); }

/* FAQ mit <details> */
.tl-faq details {
  border-bottom: 1px solid var(--tl-line);
  padding: 18px 0;
}
.tl-faq summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--tl-navy);
  font-size: 18px;
  list-style-position: outside;
}
.tl-faq details p { margin-top: 10px; }

@media (max-width: 800px) {
  .tl-cta { grid-template-columns: minmax(0, 1fr); }
  .tl-cta__actions { justify-content: flex-start; }
}

/* ==========================================================================
   6. Responsive – Seitengerüst
   ========================================================================== */
@media (max-width: 1024px) {
  .tl-navtoggle { display: block; }
  .tl-nav {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 16px var(--tl-pad-x) 28px;
    background: var(--tl-sand);
    border-bottom: 1px solid var(--tl-line);
    box-shadow: 0 16px 32px rgba(18, 13, 77, .08);
    max-height: calc(100vh - 84px);
    overflow-y: auto;
  }
  .tl-nav.is-open { display: flex; }
  .tl-nav > ul, .tl-nav .mod-menu { flex-direction: column; align-items: stretch; gap: 2px; }
  .tl-nav a, .tl-nav .nav-header, .tl-nav .mod-menu__heading { padding: 14px 12px; font-size: 18px; border-radius: 12px; }
  .tl-nav li > ul {
    display: block; position: static; min-width: 0;
    box-shadow: none; border: 0; background: transparent; padding: 0 0 0 16px;
  }
  .tl-nav li > ul a { font-size: 16px; font-weight: 600; }
  .tl-nav li.parent > a::after, .tl-nav li.parent > .nav-header::after, .tl-nav li.parent > .mod-menu__heading::after { display: none; }
  .tl-nav__phone { align-self: flex-start; }
}

@media (max-width: 800px) {
  .tl-content .item-page { max-width: none; }
  .bildDrittelrechts, .bildHalb, .bildDrittellinks { float: none; width: 100%; margin: 0 0 20px 0; }
  .tl-footer__inner { flex-direction: column; align-items: flex-start; }
}

@media print {
  .tl-header, .tl-footer, .tl-cta-wrap, .tl-navtoggle { display: none !important; }
  body.tl-page { background: #fff; }
}

/* Überschriften innerhalb von Bausteinen ohne Abstand nach oben */
.tl-content .tl-band h2,
.tl-content .tl-contact h2,
.tl-content .tl-pagehead h1,
.tl-content .tl-card h3 { margin-top: 0; }
.tl-content .tl-contact { margin-top: 40px; }

/* ==========================================================================
   Kontaktseite (Override com_contact) – Joomla-Formular im dunklen Bereich
   ========================================================================== */
.tl-contactpage .tl-lead p { margin: 0 0 10px; }
.tl-contactpage .tl-contact { margin-top: 48px; }
.tl-contact__form form { margin: 0; }
.tl-contact__form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.tl-contact__form legend { display: none; }
.tl-contact__form .control-group { margin-bottom: 18px; }
.tl-contact__form .control-label { margin-bottom: 6px; }
.tl-contact__form .control-label label { color: #DCDAF0; font-weight: 600; font-size: 15px; }
.tl-contact__form .field-spacer { margin-bottom: 8px; }
.tl-contact__form .field-spacer label,
.tl-contact__form .field-spacer .spacer { font-size: 14px; color: #B9B6D6; font-weight: 400; }
.tl-contact__form .star,
.tl-contact__form .red { color: var(--tl-lake-light) !important; }
.tl-contact__form input[type="text"],
.tl-contact__form input[type="email"],
.tl-contact__form textarea,
.tl-contact__form .form-control {
  width: 100%;
  max-width: none;
  border: 2px solid transparent;
  border-radius: var(--tl-radius-s);
  background: var(--tl-white);
}
.tl-contact__form .form-control:focus { border-color: var(--tl-lake-light); outline: none; }
.tl-contact__form textarea { min-height: 160px; }
.tl-contact__form .form-check,
.tl-contact__form .checkbox { color: #DCDAF0; font-size: 15px; }
.tl-contact__form .form-check-input { accent-color: var(--tl-lake-light); }
.tl-contact__form a { color: var(--tl-lake-light); }
.tl-contact__form .invalid,
.tl-contact__form .form-control.invalid { border-color: #FFB4A8 !important; }
.tl-contact__form .form-control-feedback,
.tl-contact__form .invalid-feedback,
.tl-contact__form label.invalid { color: #FFB4A8 !important; }
.tl-contact__form button[type="submit"],
.tl-contact__form .btn-primary {
  background: var(--tl-lake-light);
  border: 2px solid var(--tl-lake-light);
  color: var(--tl-navy);
  border-radius: 999px;
  min-height: 52px;
  padding: 14px 32px;
  font-weight: 700;
  font-size: 17px;
}
.tl-contact__form button[type="submit"]:hover,
.tl-contact__form .btn-primary:hover { background: var(--tl-white); border-color: var(--tl-white); color: var(--tl-navy); }
.tl-contactpage .tl-card a { text-decoration: none; font-weight: 700; }
