/**
 * UNDERDOCK - Footer
 * 
 * Spezifikation:
 * - Hintergrund: UD Black (#1F1D1E)
 * - Höhe: Exakt 140px (Desktop)
 * - Links: Icons für WhatsApp, LinkedIn und Mail in 24px
 * - Mitte: Zentriert das Underdock Logo in 20px Höhe
 * - Rechts: Textlinks "IMPRESSUM" & "DATENSCHUTZ" in Inter Regular 16px, All Caps
 * - Identisch auf allen Unterseiten
 */
.footer {
  height: 140px;
  background-color: var(--ud-black);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  padding: 0 40px;
  margin: 0;
  position: relative;
  z-index: 5;
}

/* 1. Linke Spalte: Social & Mail Icons (24px) */
.footer__socials {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 28px;
}

.footer__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.footer__social-link:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.footer__social-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
}

/* 2. Mittlere Spalte: Zentriertes Underdock Logo (20px Höhe) */
.footer__logo-link {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.footer__logo-img {
  height: 20px;
  width: auto;
  display: block;
}

/* 3. Rechte Spalte: Impressum & Datenschutz Links (Inter Regular 12px, All Caps) */
.footer__legal {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 28px;
}

.footer__legal-link {
  font-family: var(--font-body);
  font-weight: 400; /* Inter Regular */
  font-size: 12px;
  line-height: 18px;
  text-transform: uppercase; /* All Caps */
  color: var(--ud-white);
  opacity: 0.7;
  text-decoration: none;
  transition: opacity 0.2s ease;
  white-space: nowrap;
}

.footer__legal-link:hover,
.footer__legal-link.is-active {
  opacity: 1;
}

/* Responsive Anpassung für Mobile */
@media (max-width: 768px) {
  .footer {
    height: auto;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 24px;
    padding: 36px 24px;
  }

  .footer__socials {
    justify-content: center;
    order: 2;
  }

  .footer__logo-link {
    order: 1;
  }

  .footer__legal {
    justify-content: center;
    order: 3;
  }
}

/* ====================================================
   WHATSAPP QR-CODE MODAL POPUP
   Spezifikation:
   - Popup mit Fade-in von unten
   - Text "Via WhatsApp<br>kontaktieren" in Vina Sans 77px (gemischte Schreibweise), UD White
   - QR-Code qrcode_whatsapp darunter in UD White
   - Frame mit pinkem Verlauf (max 490px Breite, shrink auf Mobile)
   - Padding: 30px oben/unten, 70px links/rechts
   - Struktur wie bei "Hohe Kosten" (struktur_folded_paper_350px_1.webp, Screen-Blend)
   - 10px Outline in UD White
   ==================================================== */
.whatsapp-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.whatsapp-modal.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.whatsapp-modal__backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.whatsapp-modal__frame {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 350px;
  height: auto; /* Spezifikation: Hug in der Höhe */
  padding: 45px 50px; /* Spezifikation: 45px oben/unten, 50px links/rechts */
  box-sizing: border-box;
  background: var(--gradient-pink);
  outline: 10px solid var(--ud-white);
  border-radius: 20px;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35);
  transform: translate3d(0, 40px, 0);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
}

.whatsapp-modal.is-active .whatsapp-modal__frame {
  transform: translate3d(0, 0, 0);
  opacity: 1;
}

/* Gefaltete Papierstruktur wie bei "Hohe Kosten" */
.whatsapp-modal__texture {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.75;
  z-index: 1;
  display: block;
}

.whatsapp-modal__close {
  position: absolute;
  top: 10px;
  right: 14px;
  z-index: 4;
  background: transparent;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: var(--ud-white);
  cursor: pointer;
  opacity: 0.8;
  padding: 4px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.whatsapp-modal__close:hover {
  opacity: 1;
  transform: scale(1.1);
}

.whatsapp-modal__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px; /* Spezifikation: Spacing 30px zwischen den Elementen */
  width: 100%;
}

.whatsapp-modal__text {
  font-family: var(--font-heading); /* Vina Sans */
  font-size: clamp(38px, 12vw, 55px); /* Spezifikation: 55px */
  line-height: 0.78; /* Auf X-Height zugeschnitten */
  text-box-trim: both;
  text-box-edge: ex alphabetic;
  text-align: center;
  color: var(--ud-white);
  margin: 0;
  padding: 0;
  display: block;
  text-transform: none; /* In gemischter Schreibweise nach Vorgabe */
  user-select: none;
}

.whatsapp-modal__qr {
  width: 250px;
  height: 250px;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  display: block;
}

@media (max-width: 360px) {
  .whatsapp-modal__frame {
    padding: 35px 20px;
  }
}

/* ====================================================
   DASHDOCK FLOATING TEASER ("Activate your brand - AI powered.")
   Spezifikation (analog zur alten Website):
   - Fixed unten rechts (bottom: 25px, right: 25px)
   - Weißes Badge (#FFFFFF), Box-Shadow 0 4px 8px rgba(0,0,0,0.08)
   - Desktop: 80x80px, border-radius 20px, klappt bei Hover nach links auf
   - Mobile (<= 809px): 70x70px, border-radius 15px, klappt bei Tap auf
   - Font: LexendDD
   - Erscheint nach dem Hero-Bereich und blendet vor dem Footer wieder aus
   ==================================================== */
.dashdock-teaser {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 90;
  display: block;
  width: 80px;
  height: 80px;
  padding: 0;
  box-sizing: border-box;
  background-color: #FFFFFF;
  border-radius: 20px;
  box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.08);
  font-family: var(--font-dashdock);
  cursor: pointer;
  user-select: none;
  overflow: hidden;
  opacity: 0;
  transform: translate3d(20px, 0, 0);
  pointer-events: none;
  transition:
    width 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.dashdock-teaser.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  pointer-events: auto;
}

.dashdock-teaser__stack {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 20px;
  width: max-content;
  height: 80px;
  padding: 10px 20px 10px 10px;
  box-sizing: border-box;
}

/* Ausgeklappter Zustand (Desktop am Seitenende & Mobile per Tap / Seitenende) */
.dashdock-teaser.is-expanded {
  width: var(--teaser-expanded-width, max-content);
}

.dashdock-teaser.is-expanded .dashdock-teaser__body {
  opacity: 1;
}

.dashdock-teaser__logo {
  position: relative;
  width: 60px;
  height: 60px;
  aspect-ratio: 1 / 1;
  flex: none;
  border-radius: 10px;
  overflow: hidden;
  z-index: 2;
}

.dashdock-teaser__logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: inherit;
}

.dashdock-teaser__logo-shadow {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  box-shadow:
    inset 0px 1px 2px 0px rgba(0, 0, 0, 0.02),
    inset 0px 2px 5px 0px rgba(0, 0, 0, 0.05);
  pointer-events: none;
}

.dashdock-teaser__body {
  display: flex;
  flex: none;
  flex-direction: row;
  align-items: center;
  gap: 40px;
  opacity: 0;
  white-space: nowrap;
  transition: opacity 0.25s ease;
}

.dashdock-teaser__text {
  font-family: var(--font-dashdock);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.2;
  color: #000000;
  margin: 0;
  white-space: nowrap;
}

.dashdock-teaser__btn {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  background-color: #000000;
  color: var(--ud-white, #F8F7F5);
  font-family: var(--font-dashdock);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.2;
  text-transform: uppercase;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 50px;
  white-space: nowrap;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
}

.dashdock-teaser__btn:hover {
  transform: scale(1.05);
}

.dashdock-teaser__btn:active {
  opacity: 0.75;
}

.dashdock-teaser__mobile-link {
  display: none;
}

/* Desktop: Aufklappen bei Hover / Tastatur-Fokus */
@media (min-width: 810px) {
  .dashdock-teaser:hover,
  .dashdock-teaser:focus-within {
    width: var(--teaser-expanded-width, max-content);
  }

  .dashdock-teaser:hover .dashdock-teaser__body,
  .dashdock-teaser:focus-within .dashdock-teaser__body {
    opacity: 1;
  }
}

/* Mobile (<= 809px): 70x70px, Aufklappen per Tap */
@media (max-width: 809px) {
  .dashdock-teaser {
    width: 70px;
    height: 70px;
    padding: 0;
    border-radius: 15px;
    cursor: pointer;
    max-width: calc(100vw - 32px);
  }

  .dashdock-teaser__stack {
    height: 70px;
    gap: 15px;
    padding: 5px 15px 5px 5px;
  }

  .dashdock-teaser.is-expanded {
    cursor: default;
  }

  .dashdock-teaser__logo {
    cursor: pointer;
  }

  .dashdock-teaser__body {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 2px;
  }

  .dashdock-teaser__btn {
    display: none;
  }

  .dashdock-teaser__mobile-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-dashdock);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.2;
    color: #000000;
    text-decoration: underline;
    transition: color 0.2s ease;
  }

  .dashdock-teaser__mobile-link:hover,
  .dashdock-teaser__mobile-link:active {
    color: var(--ud-green, #229C6C);
  }

  .dashdock-teaser__arrow {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    display: block;
  }
}
