/* =========================================================
   INHALTSVERZEICHNIS
   1.  CSS Custom Properties
   2.  Artikel / Blogbeiträge
   3.  Navigation – Hover-Effekte
   4.  Leistungsboxen
   5.  Responsive Container (Hero-Bereich)
   6.  Kontakt-Button
   7.  Footer
   8.  WhatsApp-Button
   9.  Back-to-Top-Button
   10. Social Media Icons
   11. Cookie-Banner (noscript)
   12. Cookie-Dialog (#cc_div)
   13. Consent-Trigger-Button
   14. Accessibility-Widget
   15. Sonstige Anpassungen
   16. Media Queries
   ========================================================= */


/* =========================================================
   1. CSS CUSTOM PROPERTIES
   ========================================================= */

:root {
  --primary-color: #23287c;
  --secondary-color: #007bff;
  --footer-bg-color: #f8f9fa;
  --btn-bg-color: #23287c;
  --btn-text-color: #fff;
  --btn-border-color: #000;
  --btn-hover-bg-color: #fff;
  --btn-hover-text-color: #000;
  --btn-hover-border-color: #000;
  --footer-text-color: #333;
  --footer-menu-hover-color: #007bff;
  --footer-padding: 20px;
  --box-gap: 10px;
  --box-border-radius: 10px;
  --box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
  --image-border-radius: 5px;
  --text-box-border-radius: 8px;
  --text-box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
}


/* =========================================================
   2. ARTIKEL / BLOGBEITRÄGE
   ========================================================= */

.featured-article-badge {
  display: none;
}

.article-list .article {
  border: none;
  margin-bottom: 0.1rem;
}

.article-title,
.article-header,
.share-buttons,
.article-share {
  display: none !important;
}


/* =========================================================
   3. NAVIGATION – NUR HOVER-EFFEKTE
   Logo, Header-Höhe, Abstände → ausschließlich im
   Helix Ultimate Backend einstellen (siehe Anleitung)
   ========================================================= */

/* Menü Hover – dezent aufgehellt */
.sp-megamenu-parent > li > a:hover,
.sp-megamenu-parent > li:hover > a,
.sp-megamenu-wrapper .sp-megamenu-parent > li > a:hover {
  background: transparent !important;
  color: #7ba7cc !important;
  -webkit-transition: color 0.2s ease !important;
  transition: color 0.2s ease !important;
}

/* Dropdown Hover */
.sp-dropdown li > a {
  -webkit-transition: color 0.2s ease;
  transition: color 0.2s ease;
}

.sp-dropdown li > a:hover,
.sp-dropdown li.active > a {
  background: transparent !important;
  color: #7ba7cc !important;
}

/* Logo Hover */
#sp-logo .logo a img {
  -webkit-transition: -webkit-filter 0.2s ease !important;
  transition: filter 0.2s ease !important;
}

#sp-logo .logo a:hover img,
#sp-logo .logo a:focus img {
  -webkit-filter: brightness(1.12) !important;
  filter: brightness(1.12) !important;
}

/* Broken-Image-Fix: Logo erst einblenden wenn geladen */
#sp-logo img.lazyload,
#sp-logo img:not([src]),
#sp-logo img[src=""] {
  opacity: 0 !important;
  visibility: hidden !important;
}

#sp-logo img.lazyloaded {
  opacity: 1 !important;
  visibility: visible !important;
  -webkit-transition: opacity 0.3s ease !important;
  transition: opacity 0.3s ease !important;
}

/* =========================================================
   4. LEISTUNGSBOXEN
   ========================================================= */

/* HINWEIS: .container wird NICHT gesetzt – überschreibt Bootstrap/Helix!
   Der Wrapper nutzt inline style="display:flex" direkt im HTML. */

.leistungsbox {
  flex: 1 1 calc(50% - 20px);
  margin: 5px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background-color: #ffffff;
  border-radius: var(--box-border-radius);
  box-shadow: var(--box-shadow);
  padding: 20px;
  transition: transform 0.3s, filter 0.3s, background-color 0.3s;
  position: relative;
}

.leistungsbox:hover {
  transform: scale(1.05);
  background-color: #f0f0f0;
}

.leistungsbox img {
  max-width: 100%;
  height: auto;
  border-radius: var(--image-border-radius);
  transition: transform 0.3s ease, filter 0.3s ease;
}

.leistungsbox img:hover {
  transform: scale(1.1);
  filter: brightness(1.2);
}

/* Pop-Up Text */
.popup-content {
  font-size: 18px;
  line-height: 1.6;
}

.popup-content h1,
.popup-content p {
  font-size: 20px;
}

/* Leistungsseite – Service-Items */
.container-fluid {
  background-color: rgba(255, 255, 255, 0.8);
  background-blend-mode: overlay;
}

.service-item {
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
}

.service-item:hover {
  transform: scale(1.05);
  background-color: rgba(255, 255, 255, 1);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* Modal */
#serviceModal .modal-dialog {
  max-width: 90%;
}

#serviceModalImage {
  max-height: 400px;
  object-fit: contain;
  border-radius: 8px;
}


/* =========================================================
   5. RESPONSIVE CONTAINER (HERO-BEREICH STARTSEITE)
   ========================================================= */

.responsive-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  padding: 20px;
  padding-top: 0;
  background-image: url('..//images/Gemaltes_Bild_Website_Banner.png');
  background-size: cover;
  background-position: center;
  background-color: rgba(255, 255, 255, 0.8);
  background-blend-mode: overlay;
  gap: 20px;
}

/* HINWEIS: .text-box wird NUR innerhalb von .responsive-container gesetzt,
   um Konflikte mit Helix-Template-Elementen zu vermeiden. */
.responsive-container .text-box {
  flex: 1;
  padding: 20px;
  text-align: left;
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--text-box-border-radius);
  box-shadow: var(--text-box-shadow);
}

.responsive-container .text-box h1 {
  font-size: 28px;
  color: #333;
  margin-top: auto;
}

.responsive-container .text-box h2 {
  font-size: 20px;
  line-height: 1.5;
  color: #555;
  margin-top: auto;
}

.image-box {
  flex: 1;
  text-align: center;
}

.image-box img {
  max-width: 100%;
  height: auto;
  border-radius: var(--image-border-radius);
}


/* =========================================================
   6. KONTAKT-BUTTON
   ========================================================= */

.kontakt-button {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 20px;
  font-size: 16px;
  color: var(--btn-text-color);
  background-color: var(--btn-bg-color);
  border: 2px solid var(--btn-border-color);
  border-radius: 5px;
  transition: color 0.3s, background-color 0.3s, border-color 0.3s;
  text-decoration: none !important;
}

.kontakt-button:hover {
  color: var(--btn-hover-text-color);
  background-color: var(--btn-hover-bg-color);
  border-color: var(--btn-hover-border-color);
}


/* =========================================================
   7. FOOTER
   ========================================================= */

.sp-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: stretch;
  padding: var(--footer-padding);
  background-color: var(--footer-bg-color);
}

.sp-footer .footer-box {
  flex: 0 0 50%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 10px;
  text-align: center;
}

.sp-footer .footer-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 15px;
  justify-content: flex-end;
}

.sp-footer .footer-menu ul li a {
  text-decoration: none;
  color: var(--footer-text-color);
  font-size: 20px;
  transition: color 0.3s ease;
}

.sp-footer .footer-menu li a:hover {
  color: var(--footer-menu-hover-color);
}

#sp-footer-custom {
  text-align: center;
  padding: 20px 0 10px 0;
  position: relative;
}

.footer-nav ul {
  list-style: none;
  padding: 0;
  margin: 0 0 10px 0;
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-nav ul li a {
  text-decoration: none !important;
  font-size: 0.9em;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.footer-nav ul li a:hover {
  opacity: 1;
}

.footer-login-item {
  display: block;
  position: fixed;
  bottom: 10px;
  right: 80px;
}

.footer-login-link {
  opacity: 0.5 !important;
  font-size: 0.8em !important;
  text-decoration: none !important;
}

.footer-login-link:hover {
  opacity: 0.8 !important;
}


/* =========================================================
   8. WHATSAPP-BUTTON
   ========================================================= */

a[href*="wa.me"] {
  transition: background-color 0.3s ease, transform 0.3s ease;
}

a[href*="wa.me"]:hover {
  background-color: #1ebe57;
  transform: scale(1.05);
  text-decoration: none;
}


/* =========================================================
   9. BACK-TO-TOP-BUTTON
   ========================================================= */

.sp-scroll-up {
  position: fixed;
  bottom: 135px !important;
  right: 1px !important;
  z-index: 999;
  background-color: #23287c !important;
  color: #fff;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
  opacity: 0.85;
  font-size: 2.4em;
  line-height: 1;
  padding-top: 2px;
  font-family: Arial, sans-serif !important;
  text-decoration: none !important;
}

.sp-scroll-up:hover {
  transform: scale(1.1);
  opacity: 1;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.5);
  background-color: #1a1f63 !important;
}

.sp-scroll-up::before {
  content: "";
}


/* =========================================================
   10. SOCIAL MEDIA ICONS
   ========================================================= */

.sp-social-icons a i,
.social-icons a i {
  font-size: 2.8em !important;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.sp-social-icons a:hover i,
.social-icons a:hover i {
  transform: scale(1.2);
  opacity: 0.8;
}

.social-inline-icons {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin: 20px 0;
}

.social-inline-icons a {
  text-decoration: none !important;
}

.social-inline-icons a i {
  font-size: 2.8em !important;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.social-inline-icons a:hover i {
  transform: scale(1.2);
  opacity: 0.8;
}


/* =========================================================
   11. COOKIE-BANNER (NOSCRIPT)
   ========================================================= */

.apd-noscript-cookie {
  position: fixed;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px);
  max-width: 900px;
  z-index: 99999;
}

.apd-noscript-cookie-inner {
  background: rgba(28, 28, 30, 0.96);
  backdrop-filter: blur(6px);
  color: #ffffff;
  border-radius: 14px;
  padding: 18px 24px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.2);
  font-size: 14px;
  line-height: 1.55;
  text-align: center;
}

.apd-noscript-cookie a {
  color: #7fd0ff;
  text-decoration: underline;
  font-weight: 500;
}

.apd-noscript-cookie a:hover {
  opacity: 0.85;
}


/* =========================================================
   12. COOKIE-DIALOG (#cc_div)
   ========================================================= */

#cc_div,
#cc_div * {
  color: #003c3f !important;
}

#cc_div a,
#cc_div a:visited {
  color: #003c3f !important;
  text-decoration: underline;
}

#cc_div svg,
#cc_div svg * {
  fill: #003c3f !important;
}

#cc_div #s-all-bn,
#cc_div #s-all-bn *,
#cc_div #c-p-bn,
#cc_div #c-p-bn * {
  color: #ffffff !important;
}


/* =========================================================
   13. CONSENT-TRIGGER-BUTTON
   ========================================================= */

.cc-trigger.cc-trigger-icon {
  bottom: 10px !important;
  right: 1px !important;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  border-radius: 50%;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  transform: scale(1);
}

.cc-trigger.cc-trigger-icon:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  transform: scale(1.07) !important;
}

.cc-trigger.cc-trigger-icon svg {
  width: 50px;
  height: 50px;
  display: block;
}

.cc-trigger.cc-trigger-icon svg path {
  fill: #ffffff;
}


/* =========================================================
   14. ACCESSIBILITY-WIDGET
   ========================================================= */

i._access-icon._access {
  position: fixed;
  bottom: 10px !important;
  left: 1px !important;
  z-index: 9999;
  width: 50px;
  height: 50px;
  background-color: #ffffff !important;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0 !important;
}

i._access-icon._access::before {
  content: "accessibility_new";
  font-family: "Material Icons Round", "Material Icons";
  font-size: 40px;
  line-height: 1;
  display: block;
  color: #23287c !important;
}

body:has(._access-menu:not(.close)) i._access-icon._access {
  top: 40%;
}

._access-menu,
._access-menu *,
._access-scrollbar,
._access-scrollbar * {
  color: #000000 !important;
}

._access-icon {
  position: fixed;
  bottom: 10px !important;
  left: 1px !important;
  z-index: 9999;
  width: 50px;
  height: 50px;
  background-color: #ffffff !important;
  color: #23287c !important;
  opacity: 1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

._access-icon i,
._access-icon svg {
  color: #23287c !important;
  fill: #23287c !important;
  font-size: 28px;
}


/* =========================================================
   15. SONSTIGE ANPASSUNGEN
   ========================================================= */

.modal-footer .btn-primary {
  position: relative !important;
  z-index: 1001;
}


/* =========================================================
   16. MEDIA QUERIES
   ========================================================= */

/* ── Tablet (769px – 991px) ── */
@media (min-width: 769px) and (max-width: 991px) {

  /* Abstand zwischen Header und Inhalt auf Tablet */
  .sp-page-body > *:first-child,
  #sp-main-body > *:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
}

/* ── Mobile (bis 768px) ── */
@media (max-width: 768px) {

  /* Abstand zwischen Header und Inhalt beseitigen */
  .sp-page-body,
  #sp-main-body,
  .body-innerwrapper {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  /* Erste Section/Beitrag direkt nach Header */
  .sppb-section:first-child,
  .sp-page-builder-section:first-child,
  .item-page,
  .blog {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  /* ── Hero Text-Box ── */
  .responsive-container {
    padding: 0 !important;
    margin: 0 !important;
    -webkit-flex-direction: column !important;
    flex-direction: column !important;
    -webkit-align-items: stretch !important;
    align-items: stretch !important;
    clear: both !important;
  }

  .responsive-container .text-box {
    -webkit-order: -1 !important;
    order: -1 !important;
    width: 100% !important;
    margin: 10px 0 0 0 !important;
    padding: 16px !important;
    border-radius: 12px !important;
    border: 1.5px solid rgba(35, 40, 124, 0.18) !important;
    -webkit-box-shadow: 0 4px 18px rgba(35, 40, 124, 0.13),
                        0 1.5px 6px rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 4px 18px rgba(35, 40, 124, 0.13),
                0 1.5px 6px rgba(0, 0, 0, 0.08) !important;
    background: rgba(255, 255, 255, 0.97) !important;
    position: relative !important;
    z-index: 1 !important;
    float: none !important;
    clear: both !important;
    -webkit-box-sizing: border-box !important;
    box-sizing: border-box !important;
  }

  .responsive-container .text-box h1 {
    font-size: 1.4rem;
    margin-bottom: 8px;
  }

  .responsive-container .text-box h2 {
    font-size: 1rem;
    margin-bottom: 12px;
  }

  .responsive-container .image-box {
    -webkit-order: 0 !important;
    order: 0 !important;
    width: 100% !important;
    text-align: center;
    padding: 10px 0;
  }

  /* ── Cookie-Banner ── */
  .apd-noscript-cookie {
    bottom: 15px;
    width: calc(100% - 20px);
  }

  .apd-noscript-cookie-inner {
    padding: 14px 16px;
    font-size: 13px;
  }

  /* ── Consent-Modal ── */
  .n3t-consent-modal {
    max-width: 700px;
  }

  .n3t-consent-buttons {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-wrap: nowrap;
    flex-wrap: nowrap;
    -webkit-justify-content: center;
    justify-content: center;
    gap: 10px;
  }

  /* ── Back-to-Top ── */
  .sp-scroll-up {
    bottom: 60px;
    right: 15px;
    width: 42px;
    height: 42px;
    font-size: 2em;
    padding-top: 1px;
  }

  /* ── Footer ── */
  .sp-footer {
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-align-items: stretch;
    align-items: stretch;
    padding: 10px;
  }

  .sp-footer .footer-box {
    -webkit-flex: 0 0 100%;
    flex: 0 0 100%;
    margin-bottom: 10px;
    text-align: center;
  }

  .sp-footer .footer-menu ul {
    -webkit-flex-direction: column;
    flex-direction: column;
    gap: 10px;
  }
}

/* ── Apple / iOS Safari Fixes ── */
@supports (-webkit-touch-callout: none) {

  /* Verhindert unerwünschtes Zoomen auf iOS */
  input, select, textarea {
    font-size: 16px !important;
  }

  /* Smooth Scrolling auf iOS */
  .modal-content,
  .offcanvas-menu {
    -webkit-overflow-scrolling: touch !important;
  }

  /* iOS Safe Area für Geräte mit Notch / Home-Indicator */
  #sp-header {
    padding-top: env(safe-area-inset-top);
  }

  .sp-scroll-up {
    bottom: calc(60px + env(safe-area-inset-bottom)) !important;
  }

  .cc-trigger.cc-trigger-icon {
    bottom: calc(5px + env(safe-area-inset-bottom)) !important;
  }

  i._access-icon._access,
  ._access-icon {
    bottom: calc(10px + env(safe-area-inset-bottom)) !important;
  }
}
