/*
 * Austauschbare Website-Bilder behalten immer ihre bestehende Layoutgroesse.
 * Hochaufloesende Uploads duerfen die vorgesehenen Flaechen nicht vergroessern;
 * auf schmalen Viewports werden sie nur proportional verkleinert.
 */
img {
  height: auto;
}

.brand img {
  width: min(100%, 205px);
  max-width: 205px;
  max-height: 58px;
}

.home-hero .hero-mark img {
  width: min(100%, 650px);
  max-width: 650px;
  height: auto;
}

.category-layout > img {
  width: min(100%, 650px);
  max-width: 650px;
  max-height: 510px;
  height: auto;
  justify-self: center;
  object-fit: contain;
}

.footer-brand img {
  width: min(100%, 290px);
  max-width: 290px;
  height: auto;
}

.hero-layout.hero-layout-single,
.category-layout.category-layout-single,
.hero-layout:not(:has(.hero-mark)),
.category-layout:not(:has(> img)) {
  grid-template-columns: minmax(0, 760px);
}

.mobility-subcard-visual img,
.world-visual.world-photo img,
.service-card-modern > img,
.project-card > img,
.ebike-model-visual img,
.ebike-gallery img,
.trailer-model-card > img,
.trailer-gallery img,
.mobility-detail-image img {
  max-width: 100%;
}

.world-visual.world-photo {
  inset: 0;
}

.world-visual.world-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.world-card.has-image:before {
  background: linear-gradient(to top, rgba(0, 0, 0, .97) 0%, rgba(0, 0, 0, .48) 52%, rgba(0, 0, 0, .12) 100%);
}

/* Mobility-Karten: kompakte Vorschau statt ungebremster Originalgroesse. */
.mobility-subgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}

.mobility-subcard {
  display: flex;
  min-width: 0;
  overflow: hidden;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.mobility-subcard-visual {
  position: relative;
  width: 100%;
  height: clamp(230px, 24vw, 330px);
  max-height: 330px;
  overflow: hidden;
  background: #0c0c0e;
}

.mobility-subcard-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.mobility-subcard-content {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(24px, 3vw, 38px);
}

.mobility-subcard-content .mobility-index {
  color: var(--red2);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.mobility-subcard-content h3 {
  margin: 12px 0 14px;
  font-size: clamp(2rem, 3.2vw, 3.25rem);
}

.mobility-subcard-content p {
  margin: 0 0 24px;
  color: var(--muted);
}

.mobility-subcard-content .card-link {
  margin-top: auto;
}

/* Inhaltsbilder bleiben kompakt; die volle Groesse gibt es nur in der Lightbox. */
.article-image {
  width: auto;
  max-width: 100%;
  max-height: min(680px, 72vh);
  margin-inline: auto;
  object-fit: contain;
}

[data-lightbox] {
  cursor: zoom-in;
}

[data-lightbox]:focus-visible {
  outline: 3px solid var(--red2);
  outline-offset: 4px;
}

body.image-lightbox-open {
  overflow: hidden;
}

.image-lightbox[hidden] {
  display: none;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 58px);
  background: rgba(0, 0, 0, .94);
  backdrop-filter: blur(8px);
}

.image-lightbox figure {
  display: grid;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  place-items: center;
}

.image-lightbox img {
  width: auto;
  height: auto;
  max-width: min(1500px, 92vw);
  max-height: 86vh;
  object-fit: contain;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .65);
}

.image-lightbox figcaption {
  max-width: min(900px, 90vw);
  margin-top: 12px;
  color: #d1d1d5;
  font-size: .82rem;
  text-align: center;
}

.image-lightbox-close {
  position: fixed;
  top: max(18px, env(safe-area-inset-top));
  right: max(18px, env(safe-area-inset-right));
  z-index: 10001;
  display: grid;
  width: 52px;
  height: 52px;
  padding: 0;
  place-items: center;
  color: #fff;
  background: rgba(16, 16, 18, .92);
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 50%;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.image-lightbox-close:hover,
.image-lightbox-close:focus-visible {
  color: #080808;
  background: var(--red2);
  border-color: var(--red2);
}

/* Düsenspeed Hero – responsive Korrektur */
@media (max-width: 1050px) {
  .home-hero .hero-mark {
    display: none !important;
  }

  .home-hero .hero-copy {
    width: 100%;
    max-width: 760px;
  }
}

@media (max-width: 860px) {
  .mobility-subgrid {
    grid-template-columns: 1fr;
  }

  .mobility-subcard-visual {
    height: clamp(220px, 52vw, 360px);
    max-height: 360px;
  }
}

@media (max-width: 680px) {
  .brand img {
    max-width: 175px;
  }

  .category-layout > img {
    max-width: 100%;
    max-height: 390px;
  }

  .footer-brand img {
    max-width: 240px;
  }

  .mobility-subgrid {
    gap: 18px;
  }

  .mobility-subcard-visual {
    height: clamp(190px, 58vw, 280px);
    max-height: 280px;
  }

  .mobility-subcard-content {
    padding: 22px 20px 26px;
  }

  .image-lightbox {
    padding: 68px 12px 18px;
  }

  .image-lightbox img {
    max-width: 96vw;
    max-height: 80vh;
  }

  .image-lightbox-close {
    width: 46px;
    height: 46px;
    font-size: 1.75rem;
  }

  .home-hero {
    min-height: 100svh;
    height: auto;
  }

  .home-hero .hero-layout {
    min-width: 0;
    padding-top: 104px;
    padding-bottom: 32px;
  }

  .home-hero .hero-copy,
  .home-hero .hero-copy h1,
  .home-hero .hero-copy .lead {
    min-width: 0;
    max-width: 100%;
  }

  .home-hero .hero-copy h1 {
    font-size: clamp(3rem, 16.5vw, 4.5rem);
    letter-spacing: -0.04em;
  }

  .home-hero .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .home-hero .hero-actions .btn {
    width: 100%;
  }

  .home-hero .hero-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 36px;
    padding-top: 20px;
  }

  .home-hero .hero-facts span {
    min-width: 0;
    font-size: 0.56rem;
    letter-spacing: 0.04em;
  }

  .home-hero .hero-facts strong {
    font-size: 0.72rem;
  }

  .home-hero .scroll-cue {
    display: none;
  }
}

@media (max-width: 380px) {
  .home-hero .hero-copy h1 {
    font-size: clamp(2.75rem, 15.5vw, 3.7rem);
  }

  .home-hero .hero-copy .lead {
    font-size: 0.98rem;
  }
}
