/*
  tuscheteam.de footer, variant "brand left like zencnc" (decision E22), proportions "footer 1" of the layout preview.
  Every value comes from a footer that already exists:
  - WordPress footer (Astra footer-adv): background #004f66, white text, Roboto.
  - Astro footer.css of this project (removed with this footer): column gap 40px, breakpoints 921 / 600, dotted white
    focus outline, Trustindex box 150 x 145px and its tooltip rule.
  - Astra token --ast-global-color-6 (#e2e8f0, 7.4:1 on #004f66) for secondary text.
  - From zencnc.com: the brand column left of the link columns, uppercase column titles, 64 / 36px padding, line pitch
    1.6, a 1px divider rgba(255,255,255,.14) above the legal row.
  Edge: the inner box is one box with symmetric padding. Its width is --tt-edge-w, which every page can set; the default is
  the page container (--tt-page-width, else the Astro --shell, else 1100px) minus a 24px gutter on each side. The narrow
  WordPress pages set --tt-edge-w and --tt-edge-pad in wp-content/custom/tt-wp.css (the 1100px row with 20px text inset).
  Selectors start with .site-footer.tt-footer so that Astra rules (a:hover red, h2 40px, list margins) lose.
*/
.site-footer.tt-footer {
  background: #004f66;
  color: #fff;
  padding: 64px 0 36px;
  font: 400 17px/20.4px Roboto, sans-serif;
}

.site-footer.tt-footer .tt-footer__inner {
  box-sizing: border-box;
  width: var(--tt-edge-w, min(calc(100% - 48px), var(--tt-page-width, var(--shell, 1100px))));
  max-width: none;
  margin-inline: auto;
  padding-inline: var(--tt-edge-pad, 0px);
}

.site-footer.tt-footer p,
.site-footer.tt-footer ul,
.site-footer.tt-footer li,
.site-footer.tt-footer h2 {
  margin: 0;
  padding: 0;
  color: #fff;
  font: 400 17px/20.4px Roboto, sans-serif;
  list-style: none;
}

.site-footer.tt-footer a,
.site-footer.tt-footer a:visited {
  color: #fff;
  text-decoration: none;
}

.site-footer.tt-footer a:hover,
.site-footer.tt-footer a:focus-visible {
  color: #fff;
  text-decoration: underline;
}

.site-footer.tt-footer :focus-visible {
  outline: 2px dotted #fff;
  outline-offset: 4px;
}

/* Brand column on the left, the three link columns on the right */
.site-footer.tt-footer .tt-footer__top {
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) minmax(0, 3fr);
  column-gap: 40px;
  row-gap: 40px;
  align-items: start;
}

.site-footer.tt-footer .tt-footer__logo {
  display: block;
  width: 223px;
  max-width: 100%;
  margin-bottom: 20px;
}

.site-footer.tt-footer .tt-footer__logo img {
  display: block;
  width: 223px;
  max-width: 100%;
  height: auto;
}

.site-footer.tt-footer .tt-footer__line {
  max-width: 32ch;
  margin-bottom: 20px;
  color: #e2e8f0;
  font: 400 16px/1.6 Roboto, sans-serif;
}

.site-footer.tt-footer .tt-footer__address {
  max-width: 32ch;
  margin-bottom: 20px;
  color: #e2e8f0;
  font: 400 16px/1.6 Roboto, sans-serif;
}

.site-footer.tt-footer .tt-footer__contact {
  margin-bottom: 20px;
  font: 400 16px/1.6 Roboto, sans-serif;
}

.site-footer.tt-footer .tt-footer__contact a {
  display: inline-block;
  padding-block: 2px;
}

.site-footer.tt-footer .tt-footer__social {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Square 96px icons (linkedin-square.png, xing-square.png): the 24px box is the visible icon, so 12px is the visible gap. */
.site-footer.tt-footer .tt-footer__social a {
  display: flex;
  flex: none;
  align-items: center;
  width: 24px;
  height: 24px;
}

.site-footer.tt-footer .tt-footer__social img {
  display: block;
  width: 24px;
  height: 24px;
}

.site-footer.tt-footer .tt-footer__trust {
  display: flex;
  justify-content: flex-start;
  margin-top: 40px;
  min-width: 0;
}

.site-footer.tt-footer .tt-footer__trust-box {
  position: relative;
  width: 150px;
  min-height: 145px;
}

/* A badge that never rendered (blocked, offline) leaves an empty reserved box; wp-content/custom/tt-footer.js marks it. */
.site-footer.tt-footer .tt-footer__trust.tt-footer__trust--empty {
  display: none;
}

/* The vendor's widget container carries a 25px left margin that pushes the badge off the column edge. */
.site-footer.tt-footer .tt-footer__trust-box .ti-widget-container {
  margin-left: 0 !important;
}

.site-footer.tt-footer .tt-footer__trust-box iframe,
.site-footer.tt-footer .tt-footer__trust-box > div {
  max-width: 100%;
}

.site-footer.tt-footer .tt-footer__trust-link {
  position: absolute;
  inset: 0;
  z-index: 999;
  display: block;
}

/* Link columns: Leistungen, Ratgeber, Flurkarten */
.site-footer.tt-footer .tt-footer__links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 40px;
  row-gap: 40px;
  align-items: start;
}

.site-footer.tt-footer h2.tt-footer__title {
  margin: 0 0 20px;
  color: #e2e8f0;
  font: 700 16px/1.4 Roboto, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-footer.tt-footer .tt-footer__col li {
  margin: 0 0 10px;
  line-height: 1.6;
}

.site-footer.tt-footer .tt-footer__col a {
  display: inline-block;
  padding-block: 0;
  line-height: 1.6;
}

.site-footer.tt-footer .tt-footer__legal li a {
  display: inline-block;
  padding-block: 2px;
}

/* Legal row, separated by one divider */
.site-footer.tt-footer .tt-footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 40px;
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.site-footer.tt-footer .tt-footer__legal p {
  color: #e2e8f0;
}

.site-footer.tt-footer .tt-footer__legal ul {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 24px;
  margin-right: auto;
}

.site-footer.tt-footer .tt-footer__cta {
  display: inline-block;
  padding-block: 2px;
  font-weight: 400;
}

/* The vendor's centred 220px tooltip otherwise extends past the page edge (rule from the Astro footer). */
@media (min-width: 922px) and (max-width: 1140px) {
  .site-footer.tt-footer .tt-footer__trust-box .ti-widget .ti-disclaimer {
    left: auto !important;
    right: 0 !important;
    transform: none !important;
  }
}

@media (max-width: 1140px) {
  .site-footer.tt-footer .tt-footer__top,
  .site-footer.tt-footer .tt-footer__links {
    column-gap: 34px;
  }
  /* Legal row: the copyright line, the four links and "Angebot anfordern" need 899 px; at 1024 px the row is 976 px wide and
     two 40 px gaps pushed the button into a third line. */
  .site-footer.tt-footer .tt-footer__legal {
    column-gap: 28px;
  }
}

/* Tablet: brand block above the link columns, Trustindex box beside it */
@media (max-width: 921px) {
  .site-footer.tt-footer {
    padding: 52px 0 32px;
  }
  .site-footer.tt-footer .tt-footer__top {
    grid-template-columns: minmax(0, 1fr);
  }
  .site-footer.tt-footer .tt-footer__brand {
    display: grid;
    grid-template-columns: 260px 150px;
    column-gap: 40px;
    justify-content: start;
  }
  .site-footer.tt-footer .tt-footer__brand > * {
    grid-column: 1;
  }
  .site-footer.tt-footer .tt-footer__trust {
    grid-column: 2;
    grid-row: 1 / span 5;
    margin-top: 0;
  }
}

@media (max-width: 700px) {
  .site-footer.tt-footer .tt-footer__brand {
    display: block;
  }
  .site-footer.tt-footer .tt-footer__trust {
    margin-top: 30px;
  }
  .site-footer.tt-footer .tt-footer__links {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 30px;
  }
}

@media (max-width: 600px) {
  .site-footer.tt-footer .tt-footer__trust-box .ti-widget .ti-disclaimer {
    left: 0 !important;
    right: auto !important;
    transform: none !important;
  }
  .site-footer.tt-footer {
    padding: 44px 0 28px;
  }
  .site-footer.tt-footer .tt-footer__top {
    row-gap: 30px;
  }
  .site-footer.tt-footer .tt-footer__legal {
    margin-top: 36px;
  }
  .site-footer.tt-footer .tt-footer__legal ul {
    gap: 3px 20px;
  }
}

/* Trustindex slider inside the page content (not the footer badge): its hidden tooltips and tab items reach past the right edge
   of the viewport and added 4 px of horizontal scroll at 360 px. Clipping the track on the x axis removes that; y stays visible. */
.ti-reviews-container-wrapper {
  overflow-x: clip;
}

/* Dropdown of the Astro header (src/components/Header.astro, .services-links). With Flurkarten the dropdown has 9 entries;
   the 81px rows (49px line height) did not fit a 600px viewport. Rows of about 41px at desktop, sub-links of 15px on
   the mobile menu (they were 10.9px). The WordPress pages get the same values from wp-content/custom/tt-wp.css. */
@media (min-width: 922px) {
  html .site-header .services-links a {
    padding: 8px 17px;
    line-height: 1.4;
  }
}
@media (max-width: 921px) {
  html .site-header .services-links a {
    padding: 12px 0 12px 10px;
    font-size: 15px;
    line-height: 1.4;
  }
}
