/* Startseite: "Karten"-Optik mit dezentem 3D-Effekt für die Inhaltsabschnitte */

#boxcontent article {
  box-sizing: border-box;
  background: #ffffef url("img/bg_pattern.gif");
  border-radius: 6px;
  padding: 26px 24px 30px;
  box-shadow: 0 10px 28px rgba(0,0,0,.14), 0 2px 6px rgba(0,0,0,.08);
  transition: transform .25s ease, box-shadow .25s ease;
}
#boxcontent article:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0,0,0,.18), 0 4px 10px rgba(0,0,0,.1);
}

#four_columns .img-item {
  box-sizing: border-box;
  background: #ffffef url("img/bg_pattern.gif");
  border-radius: 6px;
  padding: 30px 32px 34px;
  box-shadow: 0 10px 28px rgba(0,0,0,.14), 0 2px 6px rgba(0,0,0,.08);
}

#four_columns .img-item figure > a {
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,.2);
}

/* Startseite: gegliederte Unterabschnitte im "Wir bündeln Erfahrungen"-Bereich */
#four_columns .img-item .ib-section {
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid #e4dfd0;
}
#four_columns .img-item .ib-section:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
#four_columns .img-item .ib-section h3 {
  font-size: 19px;
  color: #1a1a1a;
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid #bf0000;
  display: inline-block;
}
#four_columns .img-item .ib-section p {
  text-align: left;
  line-height: 1.65;
  margin: 0 0 14px;
}
#four_columns .img-item .ib-with-media {
  display: flex;
  gap: 30px;
  align-items: flex-start;
  flex-wrap: wrap;
}
#four_columns .img-item .ib-map-link {
  flex: 0 0 220px;
  margin: 0;
}
#four_columns .img-item .ib-map-img {
  display: block;
  width: 100%;
  height: auto;
}
#four_columns .img-item .ib-media-text {
  flex: 1 1 320px;
  min-width: 260px;
}
#four_columns .img-item .ib-competencies {
  list-style: none;
  padding: 0;
  margin: 0 0 6px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 20px;
}
#four_columns .img-item .ib-competencies li {
  position: relative;
  padding-left: 18px;
  line-height: 1.5;
}
#four_columns .img-item .ib-competencies li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 7px;
  height: 7px;
  background: #bf0000;
  border-radius: 50%;
}
#four_columns .img-item .ib-btn-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
#four_columns .img-item .ib-btn,
#boxcontent .ib-btn {
  display: inline-block;
  background: #bf0000;
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: bold;
  padding: 10px 18px;
  border-radius: 24px;
  transition: background .2s ease, transform .2s ease;
}
#four_columns .img-item .ib-btn:hover,
#boxcontent .ib-btn:hover {
  background: #950000;
  transform: translateY(-1px);
}
#four_columns .img-item .ib-btn-outline {
  background: transparent;
  color: #bf0000;
  border: 1.5px solid #bf0000;
  padding: 8.5px 16.5px;
}
#four_columns .img-item .ib-btn-outline:hover {
  background: #bf0000;
  color: #fff;
}
#four_columns .img-item .ib-btn-logo {
  display: inline-flex;
  align-items: center;
  padding: 4px 6px;
  transition: transform .2s ease;
}
#four_columns .img-item .ib-btn-logo img {
  max-height: 55px;
  max-width: 160px;
  width: auto;
  height: auto;
  display: block;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.2));
}
#four_columns .img-item .ib-btn-logo:hover {
  transform: translateY(-2px);
}

@media (max-width: 915px) {
  #boxcontent article { padding: 22px 20px 26px; }
  #four_columns .img-item { padding: 24px 20px 28px; }
}

/* Banner "Bezahlmethoden am Automaten" unterhalb der Störungskarte, volle Breite in der Kartenreihe */
#boxcontent .ib-payment-banner {
  box-sizing: border-box;
  flex: 0 0 100%;
  background: #ffffef url("img/bg_pattern.gif");
  border-radius: 6px;
  border-top: 3px solid #bf0000;
  box-shadow: 0 10px 28px rgba(0,0,0,.14), 0 2px 6px rgba(0,0,0,.08);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}
#boxcontent .ib-payment-banner .ib-payment-label {
  font-size: 14px;
  font-weight: bold;
  color: #1a1a1a;
}
#boxcontent .ib-payment-icons {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
#boxcontent .ib-pay-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,.14);
  padding: 6px 10px;
  height: 28px;
}
#boxcontent .ib-pay-badge svg { display: block; height: 18px; width: auto; }
@media (max-width: 480px) {
  #boxcontent .ib-payment-banner { flex-direction: column; padding: 16px 18px; }
}

@media (max-width: 640px) {
  #four_columns .img-item .ib-with-media { flex-direction: column; }
  #four_columns .img-item .ib-map-link { flex: none; width: 100%; max-width: 280px; }
  #four_columns .img-item .ib-competencies { grid-template-columns: 1fr; }
}

/* Seitenkopf (index.html, AGB.html, Datenschutz.html, Impressum.html, Kontakt.html):
   Logo fest sichtbar (schwebend), Slogan-Texte laufen daneben - ueberdecken sich nicht mehr.
   Muss auf allen Seiten identisch sein, daher hier zentral statt pro Seite dupliziert. */
.container { max-width: 1200px; }
/* Grid statt Flexbox: bei Flex kollabierte die Textspalte (ihr einziger Inhalt ist
   absolut positioniert und hat daher keine eigene Breite), weil flex-grow das nicht
   zuverlaessig ausgleicht. Grid-Spuren mit minmax(0,1fr) sind dagegen immun. */
.ib-hero { display: grid; width: 100%; grid-template-columns: minmax(0, 1fr) 330px; column-gap: 34px; align-items: start; padding: 18px 0 14px; position: relative; box-sizing: border-box; }
.ib-hero-text { position: relative; min-height: 190px; }
.ib-hero-text #slider_content1,
.ib-hero-text #slider_content2,
.ib-hero-text #slider_content3 { position: absolute; top: 0; left: 0; width: 100%; }
.ib-hero-brand { display: flex; flex-direction: column; align-items: center; gap: 4px; padding-top: 6px; margin-top: -20px; }
/* Breite so begrenzt, dass das ueberstehende Logo nie rechts aus dem Fenster ragt (kein seitliches Scrollen) */
.ib-hero-logo { width: clamp(330px, calc(100vw - 900px), 545px); max-width: none; height: auto; animation: ib-hero-float 8.6s ease-in-out infinite; filter: drop-shadow(0 12px 20px rgba(0,0,0,.3)); will-change: transform; position: relative; z-index: 20; margin-top: -45px; }
.ib-hero-dtv { display: inline-block; transition: transform .15s ease; position: relative; z-index: 20; margin-top: -40px; }
.ib-hero-dtv:hover { transform: translateY(-3px); }
.ib-hero-dtv:active { transform: translateY(1px) scale(.97); transition: transform .06s ease; }
/* Schwebendes Logo: Schatten folgt der Bewegung - je hoeher das Logo, desto laenger, weicher und heller der Schatten */
@keyframes ib-hero-float {
  0%, 100% { transform: translateY(0);    filter: drop-shadow(0 10px 16px rgba(0,0,0,.54)); }
  50%      { transform: translateY(-8px); filter: drop-shadow(0 20px 30px rgba(0,0,0,.42)); }
}
@media (prefers-reduced-motion: reduce) { .ib-hero-logo { animation: none; } }

/* DTV-Logo <-> "Mehr Service #1"-Badge: alle 5 Sekunden sacht ueberblenden */
.ib-hero-swap { position: relative; width: 225px; height: 225px; }
.ib-hero-swap img { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); max-width: 100%; max-height: 100%; width: auto; height: auto; display: block; filter: drop-shadow(0 10px 16px rgba(0,0,0,.3)); }
.ib-hero-swap .ib-swap-b { max-width: 64%; max-height: 64%; }
.ib-hero-swap .ib-swap-a { animation: ib-swap-a 14s ease-in-out infinite; }
.ib-hero-swap .ib-swap-b { opacity: 0; animation: ib-swap-b 14s ease-in-out infinite; }
@keyframes ib-swap-a { 0%, 36% { opacity: 1; } 50%, 86% { opacity: 0; } 100% { opacity: 1; } }
@keyframes ib-swap-b { 0%, 36% { opacity: 0; } 50%, 86% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .ib-hero-swap .ib-swap-a, .ib-hero-swap .ib-swap-b { animation: none; }
  .ib-hero-swap .ib-swap-b { opacity: 0; }
}
#slides.ib-hero-slides-driver { position: absolute; top: 0; left: 0; opacity: 0; pointer-events: none; z-index: -1; }
/* Mobil: Kopf nur noch mit unserem Logo links und den Partner-Logos daneben (Slogan-Text entfaellt) */
@media (max-width: 700px) {
  .ib-hero { grid-template-columns: minmax(0, 1fr); padding: 12px 0 10px; }
  .ib-hero-text { display: none; }
  .ib-hero-brand { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; margin-top: 0; padding: 0 12px; }
  .ib-hero-logo { flex: 0 1 58%; width: 58%; max-width: none; min-width: 0; margin-top: 0; }
  .ib-hero-dtv { flex: none; margin-top: 0; }
  .ib-hero-swap { width: min(150px, 34vw); height: min(150px, 34vw); }
}

/* Alte, fuer die frühere Absolut-Positionierung gebaute Mobil-Regel ausser Kraft setzen -
   hat den kompletten Hero-Bereich unsichtbar nach oben verschoben. Das neue Flexbox-Layout
   braucht das nicht mehr. */
@media (max-width: 765px) {
  .container { top: auto; }
  header { height: auto; }
  header nav { position: static; margin-left: 0; }
}

/* Grauer Trennbalken: schmaler und weiter nach oben, damit DTV-Logo/Badge darueber schweben */
#spacer { height: 25px; margin-top: -85px; }
@media (max-width: 700px) { #spacer { margin-top: 0; } }

/* "Mehr lesen"-Link direkt im beige Textfeld anzeigen statt als eigene Zeile darunter */
#slider_content1 p .responsive_button,
#slider_content2 p .responsive_button,
#slider_content3 p .responsive_button {
  display: inline;
  color: inherit;
  font-weight: bold;
}
