/*
 * Inhaltsabschnitte (Startseite und weitere Seiten)
 * Werte aus Figma: Startseite Desktop 63-17, Mobil 225-1947
 */

/* ------------------------------------------- Einleitung „Lero Spedition“ */

.intro {
  padding-block: clamp(2.5rem, calc(2.5rem + 34 * var(--fluid)), 74px) clamp(3rem, calc(3rem + 70 * var(--fluid)), 118px);
}

.intro__grid {
  display: grid;
  gap: 1.5rem 44px;
}

.intro__subline {
  margin-top: clamp(1rem, calc(1rem + 8 * var(--fluid)), 1.5rem);
  line-height: 1.25;
}

.intro__actions {
  margin-top: clamp(36px, calc(36px + 53 * var(--fluid)), 89px);
}

@media (max-width: 47.999em) {
  .intro__actions .btn {
    width: 100%;
  }
}

@media (min-width: 64em) {
  .intro__grid {
    grid-template-columns: minmax(0, 465fr) minmax(0, 972fr);
  }

  .intro__subline {
    line-height: 1.5;
  }
}

/* ------------------------------------------------ Logistik-Leistungen */

.services {
  padding-block: clamp(52px, calc(52px + 14 * var(--fluid)), 66px) clamp(3rem, calc(3rem + 59 * var(--fluid)), 107px);
  background: var(--color-surface);
}

.services__title {
  margin-bottom: clamp(3rem, calc(3rem + 20 * var(--fluid)), 68px);
}

.service-grid {
  display: grid;
  gap: 20px;
  padding: 0;
  list-style: none;
}

@media (min-width: 64em) {
  .service-grid {
    grid-template-columns: 1fr 1fr;
    gap: 50px 44px;
  }
}

.service-card {
  --icon-scale: 0.693; /* mobil 104 px statt 150 px */
  position: relative;
  display: grid;
  grid-template-columns: 104px 1fr;
  min-height: 104px;
  color: inherit;
  text-decoration: none;
}

.service-card__icon {
  display: grid;
  place-items: center;
  background: var(--color-primary);
  border-radius: var(--radius) 0 0 var(--radius);
  transition: background-color var(--transition);
}

.service-card__icon img {
  width: calc(var(--icon-width) * var(--icon-scale));
  height: auto;
}

.service-card__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1rem 1.25rem;
  background: var(--color-white);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.service-card__title {
  font-size: var(--fs-title);
  font-weight: var(--fw-medium);
  line-height: 1.333;
  color: var(--color-muted);
  transition: color var(--transition);
}

.service-card__text {
  display: none;
}

.service-card__arrow {
  display: none;
}

/* Hover/Fokus = Figma-Zustand „Aktiv“: Icon-Fläche und Titel limettengrün, Pfeil rechts */
.service-card:hover .service-card__icon,
.service-card:focus-visible .service-card__icon {
  background: var(--color-accent);
}

.service-card:hover .service-card__title,
.service-card:focus-visible .service-card__title {
  color: var(--color-accent);
}

@media (min-width: 64em) {
  .service-card {
    --icon-scale: 1;
    grid-template-columns: 150px 1fr;
    min-height: 150px;
  }

  .service-card__body {
    justify-content: flex-start;
    padding: 20px 66px 16px 29px;
  }

  .service-card__text {
    display: block;
    margin-top: 6px;
    font-size: var(--fs-body);
    line-height: 1.417;
    letter-spacing: -0.01em;
  }

  .service-card__arrow {
    position: absolute;
    top: 50%;
    right: 25px;
    display: block;
    width: 40px;
    height: auto;
    opacity: 0;
    translate: -8px -50%;
    transition: opacity var(--transition), translate var(--transition);
  }

  .service-card:hover .service-card__arrow,
  .service-card:focus-visible .service-card__arrow {
    opacity: 1;
    translate: 0 -50%;
  }
}

/* ---------------------------------------------- Teaser „Ein Blick ins Lager“ */

.media-teaser {
  padding-bottom: clamp(3rem, calc(3rem + 55 * var(--fluid)), 103px);
}

.media-teaser__grid {
  display: grid;
  gap: 1.25rem 47px;
}

.media-teaser__media {
  position: relative;
  margin-inline: calc(var(--gutter) * -1); /* mobil randlos */
}

.media-teaser__image {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
}

.media-teaser__badge {
  position: absolute;
  top: 20px;
  left: var(--gutter);
  z-index: 2;
  min-width: 167px;
  padding: 17px;
  font-size: var(--fs-body);
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--color-white);
  background: var(--color-muted);
  border-radius: var(--radius);
}

.media-teaser__badge span {
  display: block;
  font-weight: var(--fw-light);
  color: rgb(255 255 255 / 0.7);
  letter-spacing: -0.05em;
}

.media-teaser__overline {
  font-size: var(--fs-subline);
  line-height: 1.5;
  color: var(--color-muted);
}

.media-teaser__title {
  margin-top: 0.25rem;
}

.media-teaser__text {
  margin-top: clamp(1rem, calc(1rem + 21 * var(--fluid)), 37px);
}

.media-teaser__actions {
  margin-top: 2.5rem;
}

@media (max-width: 47.999em) {
  .media-teaser__actions .btn {
    width: 100%;
  }
}

@media (min-width: 64em) {
  .media-teaser {
    padding-top: 83px;
  }

  .media-teaser__grid {
    grid-template-columns: minmax(0, 591fr) minmax(0, 842fr);
    align-items: start;
  }

  /* Bild 464 px, um 127 px eingerückt; das Info-Feld ragt links heraus */
  .media-teaser__media {
    margin-inline: 0;
    padding-left: 127px;
    margin-top: 18px;
  }

  .media-teaser__badge {
    top: 20px;
    left: 0;
    min-width: 211px;
    padding: 21px 24px;
    line-height: 1.333;
  }

  .media-teaser__overline {
    line-height: 2.333;
  }
}

/* Slideshow (Swiper) mit Punkten (Figma: Slider_Punkte) */
.slideshow {
  position: relative;
}

.slideshow .swiper {
  overflow: hidden;
}

.slideshow:not(.is-ready) .swiper-slide:not(:first-child) {
  display: none;
}

.slideshow .slideshow__dots {
  position: static;
  display: flex;
  justify-content: center;
  gap: 19px;
  margin-top: 18px;
}

.slideshow__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  background: var(--color-muted-50);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.slideshow__dot.is-active {
  background: var(--color-accent);
}

@media (min-width: 64em) {
  .slideshow .slideshow__dots {
    gap: 28px;
    margin-top: 26px;
  }

  .slideshow__dot {
    width: 12px;
    height: 12px;
  }
}

/* ------------------------------------------------------ Lero in Zahlen */

.stats {
  padding-block: clamp(35px, calc(35px + 42 * var(--fluid)), 77px) clamp(65px, calc(65px + 32 * var(--fluid)), 97px);
  color: var(--color-white);
  background: var(--color-primary);
}

.stats__title {
  font-size: var(--fs-h2);
  line-height: 1.5;
}

.stats__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 20px;
  margin-top: clamp(16px, calc(16px + 71 * var(--fluid)), 87px);
  padding: 0;
  list-style: none;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat__value {
  font-size: var(--fs-number);
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.stat__value--short {
  display: inline;
}

/* Mobil „14 K“ statt „14.000“; die lange Zahl bleibt für Screenreader lesbar */
.stat__value--long {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.stat__label {
  order: 3;
  padding-top: 17px;
  font-size: var(--fs-title);
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--color-muted);
  overflow-wrap: break-word;
  hyphens: auto;
}

/* Weiße Linie zwischen Zahl und Beschriftung */
.stat::after {
  content: "";
  order: 2;
  height: 3px;
  margin-top: 17px;
  background: var(--color-white);
}

@media (min-width: 64em) {
  .stats__grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
  }

  .stat__value--short {
    display: none;
  }

  .stat__value--long {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
  }

  .stat::after {
    margin-top: 38px;
  }

  .stat__label {
    padding-top: 11px;
  }
}

/* ------------------------------------------------- „Mehr lesen“ (mobil) */

/* Nur mit JavaScript einklappen; ohne JS ist alles sichtbar */
.read-more__toggle {
  display: none;
}

@media (max-width: 63.999em) {
  .js .read-more:not(.is-expanded) .read-more__content {
    display: none;
  }

  .js .read-more__toggle {
    display: inline;
    margin-top: 0.25rem;
    padding: 0;
    font-size: var(--fs-body);
    color: var(--color-primary);
    text-decoration: underline;
    background: none;
    border: 0;
    cursor: pointer;
  }

  .js .read-more.is-expanded .read-more__toggle {
    display: none;
  }
}

/* ------------------------------------- Bildband mit Vorschau (Über uns) */

.peek-slideshow .swiper-slide {
  transition: opacity var(--transition);
}

.peek-slideshow img {
  width: 100%;
  height: auto;
  aspect-ratio: 533 / 464;
  object-fit: cover;
}

.peek-slideshow .slideshow__dots {
  margin-top: 20px;
}

@media (min-width: 64em) {
  .peek-slideshow .swiper-slide:not(.swiper-slide-active) {
    opacity: 0.5;
  }
}

/* ------------------------------------------------------------- Team */

.team {
  background: var(--color-surface);
}

.team__inner {
  padding-block: clamp(3rem, calc(3rem + 108 * var(--fluid)), 156px) clamp(3rem, calc(3rem + 127 * var(--fluid)), 175px);
  text-align: center;
}

.team__title {
  max-width: 22em;
  margin-inline: auto;
}

.team__text {
  max-width: 718px;
  margin: clamp(1rem, calc(1rem + 45 * var(--fluid)), 61px) auto 0;
}

.team-card {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.team-card img {
  width: 210px;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
}

.team-card__department {
  font-size: var(--fs-footer);
  line-height: 1.25;
  color: var(--color-muted);
  text-transform: uppercase;
}

.team-card__name {
  font-size: var(--fs-title);
  line-height: 1;
}

.team-card__role {
  font-size: var(--fs-body);
  font-weight: var(--fw-light);
  line-height: 1.25;
}

/* Karussell (mobil): eine Person pro Ansicht, Pfeile links/rechts, Punkte darunter */
.carousel {
  position: relative;
  margin-top: 2.5rem;
}

.carousel__track {
  display: grid;
  grid-auto-columns: 100%;
  grid-auto-flow: column;
  padding: 0;
  overflow-x: auto;
  list-style: none;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.carousel__track::-webkit-scrollbar {
  display: none;
}

.carousel__track > li {
  scroll-snap-align: center;
}

.carousel__button {
  position: absolute;
  top: 105px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--color-muted);
  background: none;
  border: 0;
  cursor: pointer;
  translate: 0 -50%;
}

.carousel__button svg {
  width: 14px;
  height: 26px;
  stroke: currentColor;
}

.carousel__button--prev {
  left: -12px;
}

.carousel__button--next {
  right: -12px;
}

.carousel__button:disabled {
  opacity: 0.3;
  cursor: default;
}

.carousel__dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 2rem;
}

.carousel__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  background: var(--color-muted-50);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.carousel__dot[aria-current="true"] {
  background: var(--color-accent);
}

/* Ohne JavaScript keine Steuerelemente */
html:not(.js) .carousel__button,
html:not(.js) .carousel__dots {
  display: none;
}

@media (min-width: 64em) {
  .carousel {
    margin-top: 127px;
  }

  .carousel__track {
    grid-template-columns: repeat(5, 212px);
    grid-auto-flow: row;
    justify-content: center;
    gap: 146px 44px;
    overflow: visible;
  }

  .carousel__button,
  .carousel__dots {
    display: none;
  }
}

/* ------------------------------------------------ Zertifikate und Partner */

.certificates {
  padding-block: clamp(3rem, calc(3rem + 102 * var(--fluid)), 150px) clamp(3rem, calc(3rem + 124 * var(--fluid)), 172px);
}

.certificates__text {
  max-width: 718px;
  margin-top: clamp(1.5rem, calc(1.5rem + 39 * var(--fluid)), 63px);
}

.partner-logos {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 2rem;
  padding: 0;
  list-style: none;
}

.partner-logos li + li {
  padding-left: 24px;
  border-left: 1px solid var(--color-muted-50);
}

.partner-logos img {
  height: auto;
}

.certificates__downloads-title {
  margin-top: clamp(2.5rem, calc(2.5rem + 36 * var(--fluid)), 76px);
  margin-bottom: 1rem;
}

.download-list {
  display: grid;
  column-gap: 44px;
  padding: 0;
  list-style: none;
}

@media (min-width: 64em) {
  .download-list {
    grid-template-columns: 1fr 1fr;
    grid-auto-flow: column;
    grid-template-rows: repeat(3, auto);
  }
}

.download-list a {
  display: flex;
  align-items: center;
  gap: clamp(1rem, calc(1rem + 25 * var(--fluid)), 41px);
  min-height: 82px;
  padding: 0.75rem 0 0.75rem clamp(0px, calc(26 * var(--fluid)), 26px);
  font-size: var(--fs-body);
  line-height: 1.3;
  color: var(--color-muted);
  text-decoration: none;
  border-bottom: 1px solid var(--color-muted-50);
  transition: color var(--transition);
}

.download-list a::before {
  content: "";
  flex: none;
  width: 33px;
  height: 40px;
  background: currentColor;
  -webkit-mask: url("../icons/download-arrow.svg") center / contain no-repeat;
  mask: url("../icons/download-arrow.svg") center / contain no-repeat;
}

.download-list a:hover,
.download-list a:focus-visible {
  color: var(--color-primary);
}

/* ------------------------------------- Leistungen im Detail (abwechselnd) */

.service-details {
  padding-block: clamp(2rem, calc(2rem + 64 * var(--fluid)), 96px) clamp(3rem, calc(3rem + 52 * var(--fluid)), 100px);
  background: var(--color-surface);
}

.service-details__list {
  display: grid;
  gap: clamp(3.5rem, calc(3.5rem + 44 * var(--fluid)), 100px);
  padding-block: 0;
  list-style: none;
}

.service-detail {
  --icon-size: clamp(70px, calc(70px + 50 * var(--fluid)), 120px);
  display: grid;
  gap: 1.25rem 44px;
  scroll-margin-top: 2rem;
}

/* Bild mit Icon-Fläche, die oben aus dem Bild herausragt */
.service-detail__media {
  position: relative;
  padding-top: calc(var(--icon-size) / 3);
}

.service-detail__media img {
  width: 100%;
  height: auto;
  aspect-ratio: 464 / 440;
  object-fit: cover;
  object-position: var(--focus, center);
  border-radius: var(--radius);
}

.service-detail__icon {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: var(--icon-size);
  height: var(--icon-size);
  background: var(--color-primary);
  border-radius: var(--radius);
}

.service-detail__icon img {
  width: auto;
  height: calc(var(--icon-size) * 0.667);
  aspect-ratio: auto;
  border-radius: 0;
}

.service-detail__title {
  font-size: var(--fs-title);
  font-weight: var(--fw-medium);
  line-height: 1.333;
  color: var(--color-primary);
}

.service-detail__text {
  margin-top: 14px;
}

.service-detail__text p + p,
.service-detail__text > div {
  margin-top: 1.5em;
}

@media (min-width: 64em) {
  .service-detail {
    grid-template-columns: 464px minmax(0, 934px);
    align-items: start;
  }

  .service-detail__body {
    padding-top: 97px;
  }

  .service-detail__text {
    line-height: 1.417;
  }

  .service-detail__text p + p,
  .service-detail__text > div {
    margin-top: 1.417em;
  }

  /* Gerade Einträge: Text links, Bild rechts, Icon an der rechten Ecke */
  .service-detail--reverse {
    grid-template-columns: minmax(0, 978px) 464px;
    justify-content: space-between;
  }

  .service-detail--reverse .service-detail__media {
    order: 2;
  }

  .service-detail--reverse .service-detail__icon {
    right: 0;
    left: auto;
  }
}

/* ---------------------------------------------- Stellenanzeigen (Akkordeon) */

.jobs {
  padding-bottom: clamp(3rem, calc(3rem + 72 * var(--fluid)), 120px);
}

.jobs__title {
  margin-bottom: clamp(1rem, calc(1rem + 26 * var(--fluid)), 42px);
}

.job {
  border-bottom: 1px solid var(--color-muted-50);
}

.job[open] {
  background: rgb(189 189 217 / 0.05);
}

.job__summary {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: clamp(1rem, calc(1rem + 4 * var(--fluid)), 20px) clamp(0px, calc(20 * var(--fluid)), 20px);
  font-size: var(--fs-body);
  line-height: 1.5;
  list-style: none;
  cursor: pointer;
}

.job__summary::-webkit-details-marker {
  display: none;
}

.job__title {
  display: block;
  font-size: inherit;
  font-weight: var(--fw-regular);
  transition: color var(--transition);
}

.job[open] .job__title,
.job__summary:hover .job__title {
  color: var(--color-primary);
}

.job__meta {
  display: block;
  color: var(--color-muted);
}

.job__chevron {
  width: clamp(24px, calc(24px + 17 * var(--fluid)), 41px);
  height: auto;
  color: var(--color-muted);
  transition: rotate var(--transition);
}

.job[open] .job__chevron {
  rotate: 180deg;
}

.job__body {
  max-width: 975px;
  padding: 0.5rem clamp(0px, calc(20 * var(--fluid)), 20px) 2.5rem;
}

.job__body h3 {
  margin-top: 1.5em;
  font-size: inherit;
  font-weight: var(--fw-medium);
}

.job__body ul {
  padding-left: 1.5em;
}

.job__body a {
  color: var(--color-primary);
}

.job__body > p + p {
  margin-top: 1.5em;
}

.job__body > ul + p {
  margin-top: 1.5em;
}

/* ------------------------------------------------- Karte (Kontakt) */

.map {
  position: relative;
  height: clamp(320px, calc(320px + 180 * var(--fluid)), 500px);
  background:
    linear-gradient(115deg, transparent 46%, rgb(255 255 255 / 0.9) 46.4%, rgb(255 255 255 / 0.9) 47.6%, transparent 48%),
    linear-gradient(160deg, transparent 18%, rgb(189 214 240 / 0.6) 18.5%, rgb(189 214 240 / 0.6) 23%, transparent 23.5%),
    #f1f1f5;
}

.map__canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* Hellgraue Karte wie im Figma-Entwurf; nur die Kacheln, nicht die Markierung */
.map .leaflet-tile-pane {
  filter: grayscale(0.85) brightness(1.06) contrast(0.92);
}

.map__consent {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 1rem;
  height: 100%;
  padding: 1.5rem var(--gutter);
  text-align: center;
}

.map.is-loaded .map__consent {
  display: none;
}

.map__pin {
  width: 30px;
  height: auto;
  color: var(--color-primary);
}

.map__text {
  max-width: 34rem;
  font-size: var(--fs-small);
  line-height: 1.5;
  color: #444;
}

.map__text a {
  color: var(--color-primary);
}

.map__marker {
  display: grid;
  place-items: center;
  background: var(--color-accent);
  border: 3px solid var(--color-white);
  border-radius: 50%;
  box-shadow: 0 2px 6px rgb(0 0 0 / 0.25);
}

.map__marker svg {
  width: 20px;
  height: 20px;
  fill: var(--color-primary);
}
