/* ---------------------------------------------------------------------------
   Komponenten: Ueberschriften-Balken, Service-Boxen, Kacheln, Reiter,
   Akkordeon, Galerie, Referenzen, Social-Icons
   Alle interaktiven Elemente kommen ohne JavaScript aus.
   --------------------------------------------------------------------------- */

/* --- Headline (Ueberschrift mit gruenem Balken) -------------------------- */

.headline {
  display: block;
  margin: 10px 0 25px;
  border-bottom: 1px dotted var(--color-dotted);
}

/* Orientierungssatz direkt unter der Seitenueberschrift (Aenderungsplan Punkt 6).
   Der negative obere Abstand holt ihn an die Ueberschrift heran, deren
   .headline bereits 25px nach unten setzt. */
.seiten-hinweis {
  margin: -18px 0 25px;
  color: var(--color-muted);
}

.headline h2,
.headline h3,
.headline h4 {
  display: inline-block;
  margin: 0 0 -2px;
  padding-bottom: 5px;
  border-bottom: 2px solid var(--color-primary);
}

.headline h2 { font-size: 22px; }

/* --- Service-Boxen (Content / Coding / Consulting) ----------------------- */

.service {
  overflow: hidden;
  margin-bottom: 10px;
  padding: 15px 15px 10px;
}

.service a {
  display: flex;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.service a:hover {
  text-decoration: none;
}

.service-icon {
  flex: 0 0 auto;
  padding: 10px;
  color: var(--color-primary);
  transition: transform 0.4s ease-in-out;
}

.service-icon svg {
  width: 35px;
  height: 35px;
  display: block;
}

.service a:hover .service-icon {
  transform: scale(1.15);
}

.service .desc {
  padding: 0 15px;
  overflow: hidden;
}

.service .desc h2 {
  font-size: 22px;
  margin-bottom: 8px;
}

.service a:hover .desc h2 {
  color: var(--color-primary);
}

/* --- Kacheln (Themen) ---------------------------------------------------- */

.thumbnail-style {
  padding: 7px;
  margin-bottom: 20px;
  border: 1px solid var(--color-border);
  background: #fff;
}

.thumbnail-style h3 {
  margin: 6px 0 8px;
  font-size: 18px;
}

.thumbnail-style h3 a {
  color: var(--color-heading);
}

.thumbnail-style h3 a:hover {
  color: var(--color-primary);
  text-decoration: none;
}

.thumbnail-style .caption {
  padding: 10px 8px 0;
}

.thumbnail-img {
  overflow: hidden;
}

.thumbnail-img img {
  width: 100%;
  transition: transform 0.4s ease-in-out;
}

.thumbnail-style:hover .thumbnail-img img {
  transform: scale(1.1);
}

.thumbnail-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 8px;
}

/* --- Reiter ohne JavaScript (Radio-Technik) ------------------------------ */

.tabs {
  margin-bottom: 20px;
}

.tabs > input[type='radio'] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tab-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  border-bottom: 1px solid #ddd;
  margin-bottom: 20px;
}

.tab-labels label {
  cursor: pointer;
  padding: 10px 15px;
  margin-bottom: -1px;
  border: 1px solid transparent;
  border-radius: 4px 4px 0 0;
  color: var(--color-primary);
  font-size: 14px;
}

.tab-labels label:hover {
  background: #f5f5f5;
}

.tab-panel {
  display: none;
}

/* Aktiver Reiter: Position der Radios entspricht der Reihenfolge der Panels */
.tabs > input:nth-of-type(1):checked ~ .tab-labels label:nth-of-type(1),
.tabs > input:nth-of-type(2):checked ~ .tab-labels label:nth-of-type(2),
.tabs > input:nth-of-type(3):checked ~ .tab-labels label:nth-of-type(3) {
  background: #fff;
  border-color: #ddd #ddd #fff;
  color: var(--color-text);
  cursor: default;
}

.tabs > input:nth-of-type(1):checked ~ .tab-content > .tab-panel:nth-of-type(1),
.tabs > input:nth-of-type(2):checked ~ .tab-content > .tab-panel:nth-of-type(2),
.tabs > input:nth-of-type(3):checked ~ .tab-content > .tab-panel:nth-of-type(3) {
  display: block;
}

/* Tastaturbedienung sichtbar machen */
.tabs > input:focus-visible ~ .tab-labels label {
  outline: 2px solid var(--color-primary-dark);
  outline-offset: 2px;
}

/* --- Akkordeon (natives details/summary) --------------------------------- */

.accordion {
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 10px;
  background: #fff;
}

.accordion > summary {
  cursor: pointer;
  padding: 10px 15px;
  background: #f5f5f5;
  border-bottom: 1px solid transparent;
  color: var(--color-primary);
  font-size: 14px;
  list-style: none;
  position: relative;
  padding-right: 35px;
}

.accordion > summary::-webkit-details-marker {
  display: none;
}

.accordion > summary::after {
  content: '';
  position: absolute;
  right: 15px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -6px;
  border-right: 2px solid var(--color-primary);
  border-bottom: 2px solid var(--color-primary);
  transform: rotate(45deg);
  transition: transform 0.2s ease-in-out;
}

.accordion[open] > summary {
  border-bottom-color: #ddd;
}

.accordion[open] > summary::after {
  transform: rotate(-135deg);
  margin-top: -2px;
}

.accordion .panel-body {
  padding: 15px;
}

.accordion .panel-body > :last-child {
  margin-bottom: 0;
}

/* --- Bildergalerie (Scroll-Snap statt Karussell) ------------------------- */

.galerie {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 10px;
  scrollbar-width: thin;
}

.galerie figure {
  flex: 0 0 100%;
  scroll-snap-align: start;
  margin: 0;
  position: relative;
}

.galerie img {
  width: 100%;
  display: block;
}

.galerie figcaption {
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 12px;
  padding: 8px 10px;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
}

.galerie-hinweis {
  font-size: 12px;
  color: var(--color-muted);
  margin-top: 5px;
}

/* --- Referenzen ---------------------------------------------------------- */

.clients {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  list-style: none;
  margin: 0 0 30px;
  padding: 0;
}

.clients img {
  width: 144px;
  height: 144px;
  object-fit: contain;
  /* Original arbeitete mit zwei Bilddateien je Logo (Graustufe + Farbe) */
  filter: grayscale(1);
  opacity: 0.85;
  transition: filter 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.clients a:hover img,
.clients a:focus-visible img {
  filter: grayscale(0);
  opacity: 1;
}

/* --- Social-Icons -------------------------------------------------------- */

.social-icons {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.social-icons a:hover {
  background: var(--color-primary);
}

.social-icons svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* --- Kontaktkasten / Aufzaehlungen --------------------------------------- */

.list-unstyled {
  list-style: none;
  padding: 0;
}

.list-check li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 6px;
}

.list-check li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  width: 5px;
  height: 9px;
  border-right: 2px solid var(--color-primary);
  border-bottom: 2px solid var(--color-primary);
  transform: rotate(45deg);
}

.portrait {
  float: right;
  margin: 0 0 15px 20px;
  max-width: 245px;
}

/* --- Hinweiskasten und Zitat -------------------------------------------- */

.hinweis-box {
  background: var(--color-primary-pale);
  border-left: 3px solid var(--color-primary);
  padding: 12px 15px;
  margin: 15px 0;
}

.hinweis-box > :last-child {
  margin-bottom: 0;
}

.zitat {
  margin: 15px 0;
  padding: 10px 15px;
  border-left: 3px solid var(--color-primary);
  background: #f9f9f9;
  font-style: italic;
}

.zitat p {
  margin-bottom: 5px;
}

.zitat footer {
  font-size: 12px;
  font-style: normal;
  color: var(--color-muted);
}

/* --- Themen-Seite -------------------------------------------------------- */

.portfolio-item {
  padding-bottom: 30px;
  margin-bottom: 30px;
  border-bottom: 1px dotted var(--color-dotted);
}

.portfolio-item:last-child {
  border-bottom: 0;
}

.portfolio-item .galerie figure {
  flex: 0 0 100%;
}

.einzelbild {
  margin: 0;
}

.tags {
  font-size: 12px;
  color: var(--color-muted);
}

.tags::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  background: var(--color-primary);
  clip-path: polygon(0 40%, 60% 0, 100% 0, 100% 40%, 40% 100%, 0 60%);
  vertical-align: middle;
}

.dropcap {
  display: inline-block;
  padding: 2px 8px;
  margin-right: 6px;
  border-radius: 3px;
  background: var(--color-heading);
  color: #fff;
  font-weight: 600;
}

/* --- Referenzen-Seite ---------------------------------------------------- */

.kunde {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 20px;
  padding-bottom: 25px;
  margin-bottom: 25px;
  border-bottom: 1px dotted var(--color-dotted);
  scroll-margin-top: 20px;
}

.kunde > img {
  width: 100px;
  height: auto;
}

.kunde h3 {
  margin-top: 0;
}

.fakten {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: 12px;
  color: var(--color-muted);
}

.fakten li {
  position: relative;
  padding-left: 12px;
}

.fakten li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-primary);
}

.kunden-logos {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.kunden-logos img {
  width: 80px;
  height: auto;
}

@media (max-width: 767px) {
  .kunde {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .portrait {
    float: none;
    margin: 0 0 15px;
  }
}
