/**
 * components.css – eigene Komponenten der TGS-Website
 * (Kontakt-FAB, Back-to-Top-Scroll-Ring). Flat-Style, keine Inline-Styles.
 *
 * Feste Buttons (überschneidungsfrei):
 *   - unten rechts : Back-to-Top (animierter Scroll-Ring)
 *   - unten mitte  : Kontakt-FAB
 *   - unten links  : Compliance-Guardian (eigenständiges Widget, eigenes Styling)
 */

/* ===========================================================================
   Kontakt-FAB (aufklappbarer Kontaktbutton) – unten mittig
   =========================================================================== */
.contact-fab {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 24px;
  z-index: 1060;
}

.contact-fab-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: #1f2a44;
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
  display: grid;
  place-items: center;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.contact-fab-toggle:hover {
  transform: scale(1.05);
  background: #16203a;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .24);
}
.contact-fab-toggle svg {
  /* Beide Icons liegen in derselben Grid-Zelle und werden von
     place-items:center sauber zentriert (kein position:absolute). */
  grid-area: 1 / 1;
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: opacity .25s, transform .25s;
}
.contact-fab-toggle .cfab-open { opacity: 1; transform: rotate(0); }
.contact-fab-toggle .cfab-close-icon { opacity: 0; transform: rotate(-90deg); }
.contact-fab.is-open .cfab-open { opacity: 0; transform: rotate(90deg); }
.contact-fab.is-open .cfab-close-icon { opacity: 1; transform: rotate(0); }

.contact-fab-panel {
  position: absolute;
  left: 50%;
  bottom: 76px;
  width: 320px;
  max-width: calc(100vw - 48px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .28);
  overflow: hidden;
  transform-origin: bottom center;
  transform: translateX(-50%) translateY(12px) scale(.92);
  opacity: 0;
  pointer-events: none;
  transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), opacity .25s;
}
.contact-fab-panel[hidden] { display: none; }
.contact-fab.is-open .contact-fab-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0) scale(1);
}

.contact-fab-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  font-weight: 700;
  color: #fff;
  background: #1f2a44;
}
.contact-fab-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  opacity: .8;
}
.contact-fab-close:hover { opacity: 1; }

.contact-fab-links { padding: 8px; }
.contact-fab-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  text-decoration: none;
  color: #1f2a44;
  transition: background .2s, transform .2s;
}
.contact-fab-item:hover { background: #f3f6fc; transform: translateX(4px); }
.contact-fab-item strong { display: block; font-size: .95rem; }
.contact-fab-item small { color: #6b7280; font-size: .8rem; }

.contact-fab-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: #eef1f6;
  color: #1f2a44;
}
.contact-fab-icon svg { width: 20px; height: 20px; fill: currentColor; }
.cfab-phone,
.cfab-whatsapp,
.cfab-email,
.cfab-form { background: #eef1f6; color: #1f2a44; }

/* ===========================================================================
   Back-to-Top mit Scroll-Fortschritts-Ring (dezente Gamification) – unten rechts
   =========================================================================== */
/* Back-to-Top vollständig neu aufgebaut: rund, zentriertes Icon,
   mit umlaufendem Scroll-Fortschritts-Ring. Überschreibt das
   eckige Template-Styling (border-radius:4px) komplett. */
#scroll-top.scroll-top {
  --scroll-progress: 0;
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1060;
  width: 52px;
  height: 52px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background-color: #1f2a44;
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: opacity .4s, visibility .4s, background .2s ease, transform .2s ease;
}
#scroll-top.scroll-top:hover {
  background-color: #16203a;
  transform: translateY(-2px);
}
#scroll-top.scroll-top i {
  color: #ffffff;
  font-size: 24px;
  line-height: 1;
}
/* Umlaufender Fortschritts-Ring (im Uhrzeigersinn) */
#scroll-top.scroll-top::before {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: conic-gradient(#ffffff calc(var(--scroll-progress) * 1%), rgba(255, 255, 255, .22) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
  transition: background .12s linear;
  pointer-events: none;
}

/* Sanfte, organische Hover-Animation für Links (Herzschlag) */
@media (hover: hover) {
  .navmenu a:hover,
  .footer-links a:hover {
    animation: linkPulse .6s ease;
  }
}
@keyframes linkPulse {
  0%, 100% { transform: scale(1); }
  40% { transform: scale(1.06); }
}

/* Der Compliance-Guardian (unten links) ist ein eigenständiges Widget und
   bringt sein eigenes Styling mit (assets/js/compliance-guardian.js). */

/* --- Mobile: kompakter, weiterhin überschneidungsfrei --- */
@media (max-width: 575px) {
  .contact-fab { bottom: 16px; }
  #scroll-top.scroll-top { right: 14px; bottom: 16px; }
  .contact-fab-toggle { width: 54px; height: 54px; }
}

/* Lesbare Textbreite für rechtliche Unterseiten */
.legal-page .main { padding-top: 40px; }
.legal-narrow { max-width: 820px; }
.legal-page h3 { margin-top: 1.6rem; }

/* ===========================================================================
   Google-Bewertungen (Sektion "Das sagen unsere Kunden")
   =========================================================================== */

/* Übersicht über der Slider-Karte: Google-Logo, Schnitt, Sterne, Anzahl */
.reviews-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 30px;
  padding: 14px 22px;
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 88%);
  border-radius: 999px;
  background: var(--surface-color);
  width: fit-content;
  margin-inline: auto;
}
.reviews-summary .reviews-brand {
  font-size: 1.25rem;
  color: var(--heading-color);
}
.reviews-summary .reviews-score {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
  color: var(--heading-color);
}
.reviews-summary .reviews-stars {
  display: inline-flex;
  gap: 3px;
}
.reviews-summary .reviews-stars i {
  color: #ffc107;
  font-size: 0.95rem;
}
.reviews-summary .reviews-count {
  font-size: 0.9rem;
  color: color-mix(in srgb, var(--default-color), transparent 35%);
}

/* Initialen-Avatar statt Stockfoto – echte Rezensent:innen ohne Fremdbild */
.testimonials .testimonial-avatar {
  display: grid;
  place-items: center;
  width: 80px;
  height: 80px;
  margin: 0 auto 15px;
  border-radius: 50%;
  background: #1f2a44;
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: .5px;
  border: 4px solid color-mix(in srgb, var(--accent-color), transparent 70%);
  box-shadow: 0 5px 15px rgba(0, 0, 0, .1);
  transition: all .3s ease;
}
.testimonials .testimonial-item:hover .testimonial-avatar {
  transform: scale(1.05);
}

/* Rezension ohne Text: kein Zitat-Look, dezent zurückgenommen */
.testimonials .testimonial-body p.testimonial-no-comment {
  font-style: normal;
  color: color-mix(in srgb, var(--default-color), transparent 45%);
}
.testimonials .testimonial-body p.testimonial-no-comment::before,
.testimonials .testimonial-body p.testimonial-no-comment::after {
  content: none;
}

@media (max-width: 1199px) {
  .testimonials .testimonial-avatar {
    width: 70px;
    height: 70px;
    font-size: 1.35rem;
  }
}

@media (max-width: 767px) {
  .testimonials .testimonial-avatar {
    width: 64px;
    height: 64px;
    font-size: 1.25rem;
    margin-bottom: 12px;
  }
  .reviews-summary { border-radius: 18px; }
}

/* ==========================================================================
   Zielgruppen-Tabs: groessere, besser lesbare Tab-Leiste
   ========================================================================== */
.tabs .tabs-wrapper {
  max-width: 1240px;
}

.tabs .tabs-header .nav-tabs {
  padding: 10px;
}

.tabs .tabs-header .nav-tabs .nav-link .tab-content-preview {
  gap: 18px;
  padding: 24px 26px;
}

.tabs .tabs-header .nav-tabs .nav-link .tab-content-preview .tab-number {
  width: 52px;
  height: 52px;
}

.tabs .tabs-header .nav-tabs .nav-link .tab-content-preview .tab-number svg {
  width: 28px;
  height: 28px;
}

.tabs .tabs-header .nav-tabs .nav-link .tab-content-preview .tab-text h6 {
  margin: 0 0 5px 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
}

.tabs .tabs-header .nav-tabs .nav-link .tab-content-preview .tab-text small {
  font-size: 14px;
  line-height: 1.4;
  color: color-mix(in srgb, var(--default-color), transparent 25%);
}

@media (max-width: 1199px) {
  .tabs .tabs-header .nav-tabs .nav-link .tab-content-preview {
    gap: 14px;
    padding: 20px 18px;
  }
  .tabs .tabs-header .nav-tabs .nav-link .tab-content-preview .tab-number {
    width: 46px;
    height: 46px;
  }
  .tabs .tabs-header .nav-tabs .nav-link .tab-content-preview .tab-number svg {
    width: 25px;
    height: 25px;
  }
  .tabs .tabs-header .nav-tabs .nav-link .tab-content-preview .tab-text h6 {
    font-size: 16px;
  }
  .tabs .tabs-header .nav-tabs .nav-link .tab-content-preview .tab-text small {
    font-size: 13px;
  }
}

@media (max-width: 768px) {
  .tabs .tabs-header .nav-tabs .nav-link .tab-content-preview {
    padding: 18px 20px;
    gap: 14px;
  }
  .tabs .tabs-header .nav-tabs .nav-link .tab-content-preview .tab-number {
    width: 44px;
    height: 44px;
  }
  .tabs .tabs-header .nav-tabs .nav-link .tab-content-preview .tab-text h6 {
    font-size: 16px;
  }
  .tabs .tabs-header .nav-tabs .nav-link .tab-content-preview .tab-text small {
    font-size: 13px;
  }
}

/*--------------------------------------------------------------
# Abschnitts-Untertitel (Überschreibt main.css)
# Größerer, ruhiger gesetzter Fließtext unter der Section-Überschrift –
# damit sich der Einleitungssatz besser liest.
--------------------------------------------------------------*/
.section-title p {
  font-size: 19px;
  line-height: 1.7;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .section-title p {
    font-size: 17px;
    line-height: 1.65;
  }
}

/*--------------------------------------------------------------
# Header-Logo (Überschreibt main.css)
# Statt Icon + Schriftzug steht jetzt die komplette Wort-Bild-Marke
# als Grafik im Kopf – deshalb kein Abstand nach rechts mehr nötig.
--------------------------------------------------------------*/
.header .logo img {
  max-height: 64px;
  width: auto;
  margin-right: 0;
}

@media (max-width: 575px) {
  .header .logo img {
    max-height: 48px;
  }
}

/*--------------------------------------------------------------
# Sachverständigen-Nachweis (About-Section)
# Flacher Slate-Hinweis auf den TÜV-zertifizierten Gutachter –
# bewusst ohne Verlauf/Schatten, passend zur monochromen UI.
--------------------------------------------------------------*/
.about .content .credential-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-top: 28px;
  padding: 20px 24px;
  border: 1px solid #e2e8f0;
  border-left: 3px solid #1f2a44;
  border-radius: 6px;
  background: #f8fafc;
}

.about .content .credential-card .credential-icon {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: #eef1f6;
  color: #1f2a44;
}

.about .content .credential-card .credential-icon i {
  font-size: 20px;
  line-height: 1;
}

.about .content .credential-card .credential-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.about .content .credential-card .credential-body strong {
  font-size: 1rem;
  font-weight: 600;
  color: #1f2a44;
}

.about .content .credential-card .credential-body span {
  font-size: 0.95rem;
  line-height: 1.6;
  color: color-mix(in srgb, var(--default-color), transparent 25%);
}

@media (max-width: 575px) {
  .about .content .credential-card {
    padding: 18px 18px;
    gap: 14px;
  }
}

/* Datenschutz-Hinweis unter Formularen (Kontakt, Newsletter) */
.form-privacy-note {
  margin: 12px 0 16px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: color-mix(in srgb, var(--default-color), transparent 30%);
}

.form-privacy-note a {
  text-decoration: underline;
}

/* Hinweis zur Echtheit der Bewertungen (§ 5b Abs. 3 UWG) */
.reviews-disclaimer {
  max-width: 860px;
  margin: 24px auto 0;
  text-align: center;
  font-size: 0.85rem;
  line-height: 1.5;
  color: color-mix(in srgb, var(--default-color), transparent 35%);
}
