/* ==========================================================
   Footer
   Sprint S-48.1: Grundstruktur und responsive Anordnung
   ========================================================== */

.site-footer {
  position: relative;
  margin-top: 0;
  padding: clamp(2.75rem, 5vw, 5rem) 0 0;
  background: linear-gradient(to bottom, rgb(249 247 237 / 96%), #fff);
  color: inherit;
}

.site-footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(14rem, 0.8fr);
  gap: clamp(2rem, 4vw, 5rem);
  align-items: start;
}

.site-footer__column,
.site-footer .region {
  min-width: 0;
}

.site-footer .footerblock {
  margin: 0;
}

.site-footer .footerblock + .footerblock {
  margin-top: 2rem;
}

.site-footer h2 {
  margin: 0 0 1rem;
  color: var(--color-heading, #07184f);
  font-size: 1.05rem;
  font-weight: var(--font-weight-heading, 600);
  line-height: 1.3;
}

.site-footer .standort p {
  position: relative;
  min-height: 1.5rem;
  margin: 0.55rem 0 0;
  padding-left: 1.8rem;
  line-height: 1.5;
}

.site-footer .standort p::before {
  position: absolute;
  top: 0.1rem;
  left: 0;
  width: 1rem;
  height: 1rem;
  background: currentColor;
  content: "";
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
}

.site-footer .standort .address::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 10c0 5-8 12-8 12S4 15 4 10a8 8 0 1 1 16 0Z'/%3E%3Ccircle cx='12' cy='10' r='2'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 10c0 5-8 12-8 12S4 15 4 10a8 8 0 1 1 16 0Z'/%3E%3Ccircle cx='12' cy='10' r='2'/%3E%3C/svg%3E");
}

.site-footer .standort .tel::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.8 19.8 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.12 4.18 2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.12.9.33 1.78.62 2.63a2 2 0 0 1-.45 2.11L8 9.73a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.85.29 1.73.5 2.63.62A2 2 0 0 1 22 16.92Z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.8 19.8 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.12 4.18 2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.12.9.33 1.78.62 2.63a2 2 0 0 1-.45 2.11L8 9.73a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.85.29 1.73.5 2.63.62A2 2 0 0 1 22 16.92Z'/%3E%3C/svg%3E");
}

.site-footer .standort .email::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14'/%3E%3Cpath d='m3 7 9 6 9-6'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14'/%3E%3Cpath d='m3 7 9 6 9-6'/%3E%3C/svg%3E");
}

.site-footer .standort .opening-hours::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E");
}

.site-footer .servicemenu .nav {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer .servicemenu .nav-link {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 0.45rem;
  padding: 0;
  color: inherit;
  text-decoration: none;
}

.site-footer .servicemenu .nav-link:hover,
.site-footer .servicemenu .nav-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.site-footer .servicemenu a[href*="/user/login"]::before {
  display: inline-block;
  width: 0.95rem;
  height: 0.95rem;
  background: currentColor;
  content: "";
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='10' width='14' height='10'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E");
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='10' width='14' height='10'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E");
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
}

.site-footer .logoblock {
  display: flex;
  justify-content: flex-start;
}

.site-footer .logoblock .site-branding__logo-link {
  display: flex;
  width: min(18rem, 90%);
  max-width: none;
  margin-inline: auto;
  align-items: center;
  justify-content: center;
}

.site-footer .logoblock .site-branding__logo {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
  max-height: none;
}

.site-footer .logoblock .site-branding__text {
  display: none;
}

.site-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: clamp(2.5rem, 5vw, 5rem);
  padding-block: 1.25rem 1.5rem;
  border-top: 1px solid rgb(7 24 79 / 10%);
  font-size: 0.95rem;
}

.site-footer__meta,
.site-footer__meta .region,
.site-footer__meta .block,
.site-footer__meta p {
  margin: 0;
}

.site-footer__back-to-top {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.4rem;
  color: inherit;
  font-weight: var(--font-weight-medium, 500);
  text-decoration: none;
}

.site-footer__back-to-top:hover,
.site-footer__back-to-top:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.site-footer__back-to-top-icon {
  line-height: 1;
  transition: transform 160ms ease;
}

.site-footer__back-to-top:hover .site-footer__back-to-top-icon,
.site-footer__back-to-top:focus-visible .site-footer__back-to-top-icon {
  transform: translateY(-0.15rem);
}

@media (prefers-reduced-motion: reduce) {
  .site-footer__back-to-top-icon {
    transition: none;
  }

  .site-footer__back-to-top:hover .site-footer__back-to-top-icon,
  .site-footer__back-to-top:focus-visible .site-footer__back-to-top-icon {
    transform: none;
  }
}

.site-footer__stripe {
  height: 0.3rem;
  background: linear-gradient(to right, var(--color-primary, #36752e), #64a55e, var(--color-primary, #36752e));
}

.site-footer__claim-wrap {
  padding-block: clamp(1.5rem, 3vw, 2.5rem);
  text-align: center;
}

.site-footer__claim {
  margin: 0;
  color: var(--color-primary, #36752e);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  font-weight: var(--font-weight-bold, 700);
  line-height: 1.4;
}

@media (min-width: 48rem) and (max-width: 74.99rem) {
  .site-footer__inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer__column:nth-child(3) {
    grid-column: 1 / -1;
  }

  .site-footer .region-footer-third {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2rem;
    align-items: end;
  }

  .site-footer .footerblock + .footerblock {
    margin-top: 0;
  }

  .site-footer .logoblock {
    justify-content: end;
  }
}

@media (max-width: 47.99rem) {
  .site-footer {
    margin-top: 0;
    padding-top: 2.5rem;
  }

  .site-footer__inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .site-footer__column {
    padding-bottom: 2rem;
    border-bottom: 1px solid rgb(7 24 79 / 10%);
  }

  .site-footer__column:last-child {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .site-footer .region-footer-third {
    display: grid;
    gap: 2rem;
  }

  .site-footer .logoblock {
    justify-content: center;
  }

  .site-footer .logoblock .site-branding__logo-link {
    width: min(9rem, 45vw);
  }

  .site-footer__bottom {
    align-items: flex-start;
    margin-top: 2.5rem;
  }
}

/* ==========================================================
   Sprint S-48.2:
   Service-Icons und kompaktere Footer-Anordnung
   ========================================================== */

.site-footer .servicemenu .nav-link::before {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  background: currentColor;
  content: "";
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
}

.site-footer .servicemenu a.kontakt {
  color: var(--color-primary, #36752e);
}

.site-footer .servicemenu a.kontakt::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14'/%3E%3Cpath d='m3 7 9 6 9-6'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14'/%3E%3Cpath d='m3 7 9 6 9-6'/%3E%3C/svg%3E");
}

.site-footer .servicemenu .impressum { color: #1f53bd; }
.site-footer .servicemenu .impressum::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8Z'/%3E%3Cpath d='M14 2v6h6'/%3E%3Cpath d='M8 13h8M8 17h6'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8Z'/%3E%3Cpath d='M14 2v6h6'/%3E%3Cpath d='M8 13h8M8 17h6'/%3E%3C/svg%3E");
}

.site-footer .servicemenu .datenschutz { color: #ef5b1d; }
.site-footer .servicemenu .datenschutz::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10Z'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10Z'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E");
}

.site-footer .servicemenu .barrierefreiheit { color: #a13ac2; }
.site-footer .servicemenu .barrierefreiheit::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='4' r='2'/%3E%3Cpath d='M4 8h16M12 6v14M8 20l4-8 4 8'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='4' r='2'/%3E%3Cpath d='M4 8h16M12 6v14M8 20l4-8 4 8'/%3E%3C/svg%3E");
}

.site-footer .servicemenu .intern { color: #3f4652; }
.site-footer .servicemenu .intern::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='10' width='14' height='10'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='10' width='14' height='10'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E");
}

@media (max-width: 47.99rem) {
  .site-footer .logoblock {
    justify-content: center;
    text-align: center;
  }

  .site-footer .logoblock .site-branding__logo-link {
    width: min(12rem, 58vw);
    margin-inline: auto;
  }
}

@media (min-width: 48rem) and (max-width: 74.99rem) {
  .site-footer__inner {
    width: min(58rem, calc(100% - 3rem));
    max-width: 58rem;
    margin-inline: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(2.5rem, 5vw, 4.5rem);
  }

  .site-footer__column:nth-child(3) {
    grid-column: 1 / -1;
  }

  .site-footer .region-footer-third {
    grid-template-columns: minmax(0, 1fr) minmax(11rem, 0.75fr);
    gap: clamp(2.5rem, 6vw, 5rem);
    align-items: center;
  }

  .site-footer .logoblock {
    justify-content: center;
  }

  .site-footer .logoblock .site-branding__logo-link {
    width: min(13rem, 30vw);
  }
}

@media (min-width: 75rem) {
  .site-footer__inner {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.15fr) minmax(21rem, 1.25fr);
    gap: clamp(2.5rem, 4vw, 5rem);
  }

  .site-footer .region-footer-third {
    display: grid;
    grid-template-columns: minmax(10rem, 0.8fr) minmax(10rem, 0.65fr);
    gap: clamp(2rem, 3vw, 4rem);
    align-items: center;
  }

  .site-footer .footerblock + .footerblock {
    margin-top: 0;
  }

  .site-footer .logoblock {
    justify-content: center;
  }

  .site-footer .logoblock .site-branding__logo-link {
    width: min(13rem, 100%);
  }
}

/* ==========================================================
   Sprint S-48.3:
   Footer als gleichwertiger Kachelbereich
   ========================================================== */

.site-footer {
  --footer-card-border: rgb(7 24 79 / 12%);
  --footer-card-padding: clamp(1.4rem, 2.4vw, 2.25rem);
  --footer-card-gap: clamp(1rem, 2vw, 1.5rem);
}

/*
 * Die drei Drupal-Spalten bleiben semantisch unverändert. Für das
 * visuelle Raster werden ihre neutralen Wrapper durchgereicht, sodass
 * die vier eigentlichen Blöcke als gleichwertige Grid-Elemente wirken.
 */
.site-footer__inner {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--footer-card-gap);
  align-items: stretch;
}

.site-footer__inner > .site-footer__column,
.site-footer__inner > .site-footer__column > .region {
  display: contents;
}

.site-footer .footerblock {
  box-sizing: border-box;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: var(--footer-card-padding);
  border: 1px solid var(--footer-card-border);
  background: rgb(255 255 255 / 54%);
  box-shadow: none;
}

.site-footer .footerblock + .footerblock {
  margin-top: 0;
}

.site-footer .logoblock {
  display: flex;
  min-height: 100%;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.site-footer .logoblock .site-branding__logo-link {
  width: min(15rem, 82%);
  margin-inline: auto;
}

.site-footer .logoblock .site-branding__logo {
  width: 100%;
  max-width: none;
}

/* Tablet: kompakte 2-x-2-Einheit. */
@media (min-width: 48rem) and (max-width: 74.99rem) {
  .site-footer__inner {
    width: min(60rem, calc(100% - 3rem));
    max-width: 60rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    margin-inline: auto;
  }

  .site-footer .footerblock {
    min-height: 18rem;
  }

  .site-footer .logoblock .site-branding__logo-link {
    width: min(18rem, 82%);
  }
}

/* Smartphone: vier Karten untereinander; Logo bewusst groß. */
@media (max-width: 47.99rem) {
  .site-footer__inner {
    width: min(100% - 2rem, 36rem);
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-inline: auto;
  }

  .site-footer__column {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .site-footer .footerblock {
    min-height: 0;
    padding: 1.35rem;
  }

  .site-footer .logoblock {
    min-height: 11rem;
  }

  .site-footer .logoblock .site-branding__logo-link {
    width: min(18rem, 82vw);
  }
}

/* Desktop: vier gleich große Kacheln in einer Reihe. */
@media (min-width: 75rem) {
  .site-footer__inner {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(1rem, 1.5vw, 1.5rem);
  }

  .site-footer .footerblock {
    min-height: 19rem;
  }

  .site-footer .logoblock .site-branding__logo-link {
    width: min(18rem, 84%);
  }
}

/* Kapitel 4, Sprint 3-C: Desktop-Footer kompakter anbinden. */
@media (min-width: 75rem) {
  .site-footer__inner.container {
    padding-block: 0;
  }
}
