/**
 * Modern site footer — newsletter band + photo background + 4-column grid
 */

.foot--modern {
  --foot-red: #cc0607;
  --foot-ink: #ffffff;
  --foot-muted: rgba(255, 255, 255, 0.72);
  --foot-line: rgba(255, 255, 255, 0.14);
  --foot-shell: 1280px;
  position: relative;
  color: var(--foot-ink);
  background: #12161c;
}

/* Keep wave transition above footer */
.foot--modern::before {
  z-index: 0;
}

/* ------------------------------------------------------------------ Newsletter / Powermail (backend col. 1, footer page UID 17) */
.foot--modern .footer_contact.foot-newsletter {
  position: relative;
  z-index: 2;
  background: #373737;
  padding: 28px 0 32px;
}

.foot--modern .foot-newsletter__inner {
  width: 92%;
  max-width: var(--foot-shell);
  margin: 0 auto;
}

.foot--modern .footer_contact .tx-powermail {
  background: #fff;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
  padding: clamp(28px, 4vw, 48px) clamp(24px, 4vw, 56px);
  transform: translateY(0);
  border-radius: 4px;
  color: #1a1a1a;
}

.foot--modern .footer_contact .tx-powermail .powermail_fieldset {
  margin-top: 0;
}

.foot--modern .footer_contact .tx-powermail .powermail_label {
  display: none;
}

.foot--modern .footer_contact .tx-powermail input[type="submit"],
.foot--modern .footer_contact .tx-powermail button[type="submit"] {
  background: var(--foot-red) !important;
  border-color: var(--foot-red) !important;
  border-radius: 6px;
  font-weight: 700;
  letter-spacing: 0.02em;
  min-width: 140px;
}

.foot--modern .footer_contact .tx-powermail .powermail_fieldwrap_datenschutzerklaerung .checkbox {
  color: #6a6a6a;
  font-size: 13px;
  line-height: 1.45;
}

/* Direktkontakt text beside newsletter form (dark band) */
.foot--modern .footer_contact,
.foot--modern .footer_contact p,
.foot--modern .footer_contact li,
.foot--modern .footer_contact address {
  color: rgba(255, 255, 255, 0.88);
}

.foot--modern .footer_contact h1,
.foot--modern .footer_contact h2,
.foot--modern .footer_contact h3,
.foot--modern .footer_contact h4,
.foot--modern .footer_contact h5,
.foot--modern .footer_contact strong {
  color: #fff;
}

/* Contact links/icons on dark footer surfaces */
.foot--modern .footer_contact .phone,
.foot--modern .footer_contact .whatsapp,
.foot--modern .footer_contact .mail,
.foot--modern .footer_contact .fax,
.foot--modern .footer_contact a.phone,
.foot--modern .footer_contact a.whatsapp,
.foot--modern .footer_contact a.mail,
.foot--modern .footer_contact a.fax,
.foot--modern .foot-main .phone,
.foot--modern .foot-main .whatsapp,
.foot--modern .foot-main .mail,
.foot--modern .foot-main .fax,
.foot--modern .foot-main a.phone,
.foot--modern .foot-main a.whatsapp,
.foot--modern .foot-main a.mail,
.foot--modern .foot-main a.fax {
  color: #fff !important;
  font-weight: 600;
}

.foot--modern .footer_contact .phone a,
.foot--modern .footer_contact .whatsapp a,
.foot--modern .footer_contact .mail a,
.foot--modern .footer_contact .fax a,
.foot--modern .foot-main .phone a,
.foot--modern .foot-main .whatsapp a,
.foot--modern .foot-main .mail a,
.foot--modern .foot-main .fax a {
  color: #fff !important;
}

.foot--modern .footer_contact .phone:hover,
.foot--modern .footer_contact .whatsapp:hover,
.foot--modern .footer_contact .mail:hover,
.foot--modern .footer_contact .fax:hover,
.foot--modern .footer_contact a.phone:hover,
.foot--modern .footer_contact a.whatsapp:hover,
.foot--modern .footer_contact a.mail:hover,
.foot--modern .footer_contact a.fax:hover,
.foot--modern .foot-main .phone:hover,
.foot--modern .foot-main .whatsapp:hover,
.foot--modern .foot-main .mail:hover,
.foot--modern .foot-main .fax:hover,
.foot--modern .foot-main a.phone:hover,
.foot--modern .foot-main a.whatsapp:hover,
.foot--modern .foot-main a.mail:hover,
.foot--modern .foot-main a.fax:hover,
.foot--modern .footer_contact .phone a:hover,
.foot--modern .footer_contact .whatsapp a:hover,
.foot--modern .footer_contact .mail a:hover,
.foot--modern .footer_contact .fax a:hover,
.foot--modern .foot-main .phone a:hover,
.foot--modern .foot-main .whatsapp a:hover,
.foot--modern .foot-main .mail a:hover,
.foot--modern .foot-main .fax a:hover {
  color: rgba(255, 255, 255, 0.82) !important;
}

.foot--modern .footer_contact .whatsapp::before,
.foot--modern .foot-main .whatsapp::before {
  background: url("../Images/whatsapp.svg") no-repeat center left / contain !important;
}

.foot--modern .footer_contact .phone::before,
.foot--modern .foot-main .phone::before {
  background: url("../Images/phone.svg") no-repeat center left / contain !important;
}

.foot--modern .footer_contact .mail::before,
.foot--modern .foot-main .mail::before {
  filter: brightness(0) invert(1);
}

.foot--modern .footer_contact .fax::before,
.foot--modern .foot-main .fax::before {
  filter: brightness(0) invert(1);
}

/* ------------------------------------------------------------------ Main band with RTW photo */
.foot--modern .footer_cont.foot-main {
  position: relative;
  overflow: hidden;
  background: #0d1117;
  padding: 0;
}

.foot--modern .foot-main__bg {
  position: absolute;
  inset: 0;
  background-color: #0d1117;
  background-image:
    linear-gradient(180deg, rgba(6, 9, 14, 0.97) 0%, rgba(6, 9, 14, 0.82) 22%, rgba(6, 9, 14, 0.45) 55%, rgba(6, 9, 14, 0.72) 100%),
    linear-gradient(90deg, rgba(6, 9, 14, 0.98) 0%, rgba(6, 9, 14, 0.9) 24%, rgba(6, 9, 14, 0.55) 48%, rgba(6, 9, 14, 0.15) 72%, rgba(6, 9, 14, 0.05) 100%),
    url("../Images/footer-bg-rtw.png");
  background-position: center top, center center, 82% 42%;
  background-size: cover, cover, cover;
  background-repeat: no-repeat;
  filter: saturate(0.8) contrast(1.04);
}

.foot--modern .foot-main__scrim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 70% at 0% 0%, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.45) 42%, transparent 72%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.12) 45%, rgba(0, 0, 0, 0.5) 100%);
  pointer-events: none;
}

.foot--modern .foot-main__inner {
  position: relative;
  z-index: 1;
  width: 92%;
  max-width: var(--foot-shell);
  margin: 0 auto;
  padding: 40px 0 28px;
}

.foot--modern .foot-grid {
  display: grid;
  grid-template-columns: minmax(200px, 1.05fr) minmax(180px, 1.1fr) minmax(160px, 0.95fr) minmax(140px, 0.75fr);
  gap: clamp(20px, 3vw, 36px);
  align-items: start;
}

.foot--modern .foot-heading {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
}

.foot--modern .foot-heading::after {
  content: "";
  display: block;
  width: 42px;
  height: 2px;
  margin-top: 10px;
  background: var(--foot-red);
}

.foot--modern .foot-heading--spaced {
  margin-top: 28px;
}

.foot--modern .foot-heading--after-logo {
  margin-top: 18px;
}

/* Brand column: logo + contact (phone in newsletter band above) */
.foot--modern .foot-col--brand {
  max-width: 280px;
}

.foot--modern .foot-col--brand .foot-social {
  margin-top: 16px;
}

.foot--modern .foot-col--domains .foot-network {
  grid-template-columns: minmax(0, 1fr);
  gap: 8px 16px;
}

/* Brand logo */
.foot--modern .foot-brand {
  display: inline-block;
  text-decoration: none;
  color: inherit;
}

.foot--modern .foot-brand__logo {
  display: block;
  width: auto;
  max-width: min(220px, 100%);
  height: auto;
  object-fit: contain;
}

.foot--modern .foot-brand:hover .foot-brand__logo,
.foot--modern .foot-brand:focus .foot-brand__logo {
  opacity: 0.92;
}

/* Partner logos from backend (footer page col. 2) */
.foot--modern .foot-partners {
  display: flex;
  flex-wrap: wrap;
  gap: 28px clamp(20px, 3vw, 36px);
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.45;
  color: var(--foot-muted);
}

.foot--modern .foot-partners > .frame,
.foot--modern .foot-partners > .ce-textpic {
  flex: 1 1 150px;
  max-width: calc(33.333% - 24px);
  min-width: 130px;
  margin: 0;
}

.foot--modern .foot-partners > .frame:only-child {
  flex-basis: 100%;
  max-width: 100%;
}

.foot--modern .foot-partners .ce-gallery .ce-row {
  display: flex;
  flex-wrap: wrap;
  gap: 28px clamp(20px, 3vw, 36px);
  align-items: flex-start;
}

.foot--modern .foot-partners .ce-gallery .ce-column {
  flex: 1 1 150px;
  max-width: calc(33.333% - 24px);
  min-width: 130px;
}

.foot--modern .foot-partners p {
  margin: 0 0 14px;
}

.foot--modern .foot-partners a {
  color: inherit;
  text-decoration: none;
}

.foot--modern .foot-partners a:hover,
.foot--modern .foot-partners a:focus {
  color: #fff;
}

.foot--modern .foot-partners img {
  display: block;
  width: auto;
  max-width: min(180px, 100%);
  height: auto;
  max-height: 56px;
  object-fit: contain;
  object-position: left center;
  margin: 0 0 10px;
}

.foot--modern .foot-partners .ce-gallery,
.foot--modern .foot-partners .ce-row,
.foot--modern .foot-partners .ce-column {
  margin: 0;
}

.foot--modern .foot-partners .ce-gallery figure {
  margin: 0 0 10px;
}

/* Movaid: short caption only (backend text may be longer) */
.foot--modern .foot-partners .ce-textpic:has(img[src*="movaid" i]) .ce-bodytext p,
.foot--modern .foot-partners .ce-textpic:has(a[href*="movaid" i]) .ce-bodytext p,
.foot--modern .foot-partners figure:has(img[src*="movaid" i]) + .ce-bodytext p,
.foot--modern .foot-partners p:has(a[href*="movaid" i]):not(:has(img)) {
  font-size: 0;
  line-height: 0;
  color: transparent;
}

.foot--modern .foot-partners .ce-textpic:has(img[src*="movaid" i]) .ce-bodytext p::after,
.foot--modern .foot-partners .ce-textpic:has(a[href*="movaid" i]) .ce-bodytext p::after,
.foot--modern .foot-partners figure:has(img[src*="movaid" i]) + .ce-bodytext p::after,
.foot--modern .foot-partners p:has(a[href*="movaid" i]):not(:has(img))::after {
  content: "Sicherheit und Qualitätsmanagement";
  display: block;
  font-size: 13px;
  line-height: 1.45;
  color: var(--foot-muted);
}

/* No external-link icons in footer */
.foot--modern a[href*="//"]::before {
  content: none !important;
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  min-width: 0 !important;
  margin: 0 !important;
  background: none !important;
}

/* Network / domains */
.foot--modern .foot-network,
.foot--modern .foot-contact-list,
.foot--modern .footnavmenu--modern {
  list-style: none;
  margin: 0;
  padding: 0;
}

.foot--modern .foot-network {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 20px;
}

.foot--modern .foot-network li + li,
.foot--modern .foot-contact-list li + li {
  margin-top: 10px;
}

.foot--modern .foot-network a,
.foot--modern .foot-contact-link,
.foot--modern .footnavmenu--modern a {
  color: var(--foot-muted);
  text-decoration: none;
  font-size: 15px;
  line-height: 1.45;
  transition: color 0.2s ease;
}

.foot--modern .foot-network a:hover,
.foot--modern .foot-network a:focus,
.foot--modern .foot-contact-link:hover,
.foot--modern .foot-contact-link:focus,
.foot--modern .footnavmenu--modern a:hover,
.foot--modern .footnavmenu--modern a:focus {
  color: #fff;
}

.foot--modern .foot-address {
  font-style: normal;
  font-size: 15px;
  line-height: 1.5;
  color: var(--foot-muted);
}

.foot--modern .foot-address__appointment {
  display: inline;
  color: var(--foot-muted);
}

.foot--modern .foot-address strong {
  color: #fff;
  font-weight: 600;
}

.foot--modern .foot-address sup {
  font-size: 0.62em;
}

/* Social + WhatsApp */
.foot--modern .foot-social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
}

.foot--modern .foot-social__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--foot-line);
  border-radius: 50%;
  color: #fff;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 18px 18px;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.foot--modern .foot-social__link--facebook {
  background-image: url("../Images/icon-facebook-footer.svg");
}

.foot--modern .foot-social__link--instagram {
  background-image: url("../Images/icon-instagram-footer.svg");
}

.foot--modern .foot-social__link:hover,
.foot--modern .foot-social__link:focus {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
}

.foot--modern .foot-social__link--facebook:hover,
.foot--modern .foot-social__link--facebook:focus,
.foot--modern .foot-social__link--instagram:hover,
.foot--modern .foot-social__link--instagram:focus {
  opacity: 0.92;
}

.foot--modern .foot-social__link--whatsapp {
  width: auto;
  height: 36px;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 4.8 / 1;
  padding: 0;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  background-image: url("../Images/footer-whatsapp.png");
  background-repeat: no-repeat;
  background-position: center left;
  background-size: contain;
}

.foot--modern .foot-social__link--whatsapp:hover,
.foot--modern .foot-social__link--whatsapp:focus {
  background-color: transparent;
  transform: translateY(-1px);
  opacity: 0.9;
}

/* Info nav from backend menu (page UID footerNavPageUid) */
.foot--modern .footnavmenu--modern li + li {
  margin-top: 10px;
}

.foot--modern .footnavmenu--modern .subnav {
  display: none;
}

/* Copyright bar */
.foot--modern .foot-copy {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--foot-line);
  padding: 14px 0 18px;
}

.foot--modern .foot-copy__inner {
  width: 92%;
  max-width: var(--foot-shell);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.foot--modern .foot-copy__legal,
.foot--modern .foot-copy__claim {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.55);
}

.foot--modern .foot-copy__claim {
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

/* Hide legacy footer chrome */
.foot--modern .hza,
.foot--modern .footnav__title {
  display: none !important;
}

.foot--modern .foot-newsletter address {
  display: none;
}

/* Backend footer col. 2 (UID 17) may still ship legacy headings/address — template provides these */
.foot--modern .foot-partners address,
.foot--modern .foot-col--nav address {
  display: none !important;
}

.foot--modern .foot-partners :is(h1, h2, h3, h4, .ce-headline, .frame-type-header) {
  display: none !important;
}

/* Legacy text-only address block before partner logos in col. 2 */
.foot--modern .foot-partners > :is(.frame, .ce-textpic, .textmedia):first-child:not(:has(img)) {
  display: none !important;
}

/* Info nav: partner logos belong in the partners column only */
.foot--modern .footnavmenu--modern > li:has(> a img),
.foot--modern .footnavmenu--modern > li:has(> a .nav-img) {
  display: none !important;
}

/* ------------------------------------------------------------------ Impressum contact supplement (page UID 21) */
.impressum-contact {
  max-width: 920px;
  margin: 48px auto 0;
  padding: 32px 28px;
  background: #f7f7f7;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
}

.impressum-contact__title {
  margin: 0 0 24px;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a1a;
}

.impressum-contact__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.impressum-contact__label {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #cc0607;
}

.impressum-contact__text,
.impressum-contact__links {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: #333;
}

.impressum-contact__links {
  list-style: none;
  padding: 0;
}

.impressum-contact__links li + li {
  margin-top: 6px;
}

.impressum-contact a {
  color: #1a1a1a;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.impressum-contact a:hover,
.impressum-contact a:focus {
  color: #cc0607;
}

@media screen and (max-width: 1024px) {
  .foot--modern .foot-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px 28px;
  }

  .foot--modern .foot-col--brand {
    grid-column: 1 / -1;
    max-width: none;
  }

  .foot--modern .foot-partners > .frame,
  .foot--modern .foot-partners > .ce-textpic {
    max-width: calc(50% - 14px);
  }

  .foot--modern .foot-partners > .frame:only-child,
  .foot--modern .foot-partners .ce-gallery .ce-column {
    max-width: calc(50% - 14px);
  }

  .impressum-contact__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media screen and (max-width: 640px) {
  .foot--modern .footer_contact.foot-newsletter {
    padding: 22px 0 24px;
  }

  .foot--modern .foot-main__inner {
    padding: 28px 0 20px;
  }

  .foot--modern .foot-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .foot--modern .foot-col--brand {
    grid-column: auto;
  }

  .foot--modern .foot-brand__logo {
    max-width: 160px;
  }

  .foot--modern .foot-heading--after-logo {
    margin-top: 14px;
  }

  .foot--modern .foot-address__appointment {
    display: inline !important;
  }

  .foot--modern .foot-partners > :is(.frame, .ce-textpic, .textmedia),
  .foot--modern .foot-partners > .ce-textpic,
  .foot--modern .foot-partners .ce-gallery .ce-column {
    flex-basis: 100%;
    max-width: 100%;
  }

  .foot--modern .foot-network {
    grid-template-columns: 1fr;
  }

  .foot--modern .foot-copy__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .impressum-contact {
    margin-top: 32px;
    padding: 24px 20px;
  }

  .impressum-contact__grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .foot--modern .foot-brand__ring,
  .foot--modern .foot-social__link,
  .foot--modern .foot-network a,
  .foot--modern .foot-contact-link,
  .foot--modern .footnavmenu--modern a {
    transition: none;
  }
}
