/* RESET & BASIS */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box; /* EXTREM WICHTIG: Padding wird nicht zur Breite addiert */
}

*,
::after,
::before {
  box-sizing: inherit;
}

@font-face {
  font-family: "Suisse-Intl-Mono-Thin";
  src:
    url("../fonts/Suisse-Intl-Mono-Thin.woff2") format("woff2"),
    url("../fonts/Suisse-Intl-Mono-Thin.woff") format("woff");
  font-weight: thin;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Suisse-Intl-Regular";
  src:
    url("../fonts/Suisse-Intl-Regular.woff2") format("woff2"),
    url("../fonts/Suisse-Intl-Regular.woff") format("woff");
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Suisse-Intl";
  src:
    url("../fonts/Suisse-Intl.woff2") format("woff2"),
    url("../fonts/Suisse-Intl.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Suisse-Intl-Light";
  src:
    url("../fonts/Suisse-Intl-Light.woff2") format("woff2"),
    url("../fonts/Suisse-Intl-Light.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Suisse-Intl-SemiBold";
  src:
    url("../fonts/Suisse-Intl-SemiBold.woff2") format("woff2"),
    url("../fonts/Suisse-Intl-SemiBold.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Suisse-Intl-Medium";
  src:
    url("../fonts/Suisse-Intl-Medium.woff2") format("woff2"),
    url("../fonts/Suisse-Intl-Medium.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Swiss-721-Light-BT";
  src:
    url("../fonts/Swiss-721-Light-BT.woff2") format("woff2"),
    url("../fonts/Swiss-721-Light-BT.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Menlo Regular";
  src:
    url("../fonts/Menlo Regular.woff2") format("woff2"),
    url("../fonts/Menlo Regular.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

body {
  background: transparent;
  font-family: "Swiss-721-Light-BT", normal; /* Später deine Hausschrift */
  font-size: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
  color: #000;
  line-height: 15px;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%; /* Verhindert autom. Vergrößern auf iOS */
  -moz-text-size-adjust: 100%; /* Für Firefox Mobile */
  text-size-adjust: 100%; /* Standard */
}

/* 1. Alle Module verstecken */
.mod {
  display: none !important;
}

/* Den Footer von der allgemeinen "Ausblenden"-Regel befreien */
footer.mod.mod-footer {
  display: block !important; /* Erzwingt die Anzeige, auch wenn .mod vorhanden ist */
  position: relative;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 25px; /* Deine gewünschte Höhe */
  background: #fff;
  z-index: 2500;
  opacity: 1 !important;
  visibility: visible !important;
}

.mod-header {
  position: relative;
  display: block;
  width: 100%; /* Geht über die volle Breite */
  height: 50px;
  z-index: 2000; /* Bleibt immer ganz oben auf der Ebene */
}

.mod-header nav {
  padding: 5px 10px 10px 10px; /* Innenabstand für die Navigation, damit sie nicht direkt am Rand klebt */
}

.mod-header nav ul li {
  display: inline-block;
  padding: 0 10px;
  text-transform: lowercase;
}

.mod-header__inner {
  position: fixed; /* Fixiert die Navigation am oberen Rand */
  margin: 0;
  top: 0;
  left: 0;
  overflow: hidden;
  height: 46px;
  width: 100%;
  background: #fff;
  gap: 30px; /* Erzeugt den Abstand zwischen den Wörtern */
}

.mod-header nav ul li:first-child {
  padding-left: 0;
}

.nav-item {
  text-decoration: none; /* Entfernt Unterstreichung */
  display: block;
  color: #000000; /* Macht den Text schwarz */
  text-transform: lowercase; /* Alles in Großbuchstaben */
  font-size: 34px; /* Setzt eine saubere Größe */
  line-height: 36px;
  font-family:
    "Suisse-Intl-Light", normal; /* Monospaced Font für die Navigation */
}

.js-logo {
  position: relative;
  display: inline-block;
  font-family: "Suisse-Intl-Medium", normal;
  text-transform: none; /* Spezieller Font für das Logo */
  font-size: 34px;
  line-height: 36px;
  padding-right: 0; /* Kein Abstand nach rechts, damit es bündig mit der No. Spalte ist */
}

.js-logo span {
  transition: opacity 0.5s ease-in-out;
  /* Wichtig: Beide müssen an derselben Stelle starten */
  display: inline-block;
}

.logo-site {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0; /* Startzustand: unsichtbar */
}

.logo-zeit {
  opacity: 1; /* Startzustand: sichtbar */
}

/* Der "raumsite" Zustand */
.js-logo.is-site-mode .logo-zeit {
  opacity: 0;
}

.js-logo.is-site-mode .logo-site {
  opacity: 1;
}

/* 2. NUR das Modul mit der aktiven Klasse zeigen */
.mod.h-state--active {
  display: block !important;
  opacity: 1;
  background-color: white; /* Hier kein Gelb mehr nötig, wenn es läuft */
  z-index: 2000; /* Sicherstellen, dass es über allem anderen liegt */
  top: 0;
  left: 0;
}

.h-page-container {
  display: block;
  padding-bottom: 30px; /* Optional: Platz für einen Footer, falls du einen haben möchtest */
  flex: 1 0 auto;
}

/* DAS GRID */
.mod-grid {
  display: flex;
  flex-wrap: wrap;
  padding: 0; /* Dein fester Rand links und rechts */
  margin: 0;
  width: 100%;
  line-height: 15px;
  outline: 0;
  transition: opacity 0.25s ease-in-out;
  will-change: opacity, display;
}

.mod-grid__inner {
  display: flex;
  flex-wrap: wrap;
  -webkit-box-align: start;
  align-items: flex-start;
  -webkit-box-pack: center;
  justify-content: center;
  padding: 0 20px 5px; /* Optional: Innenabstand für die Bilder, damit sie nicht direkt am Rand kleben */
  text-align: center;
}

/* DAS EINZELNE PROJEKT (Der Container) */
.mod-grid__item {
  position: relative;
  display: block;
  /* padding: 0% 0%; */
  margin: 8vw 0 3vw;
  padding-left: 45px; /* Platz für die Nummer links */
  text-align: left;
  flex-direction: column;
  align-items: flex-start; /* Bild klebt immer links in seiner Spalte */
  box-sizing: border-box;
}
/* Das erste Element im Grid soll keinen Abstand nach oben haben */
.mod-grid__item:first-of-type {
  margin-top: 0 !important;
}

.h-item-lg {
  width: 66.666%;
}

.h-item-md {
  width: 33.333%;
}

/* Die Padding-Klassen (Beispiele - du kannst die Werte anpassen) */
/* Hier kannst du steuern, ob die Bilder eher links, rechts oder mittig sitzen */
.h-item-padding-1 {
  padding-left: 45px;
  margin: 10px 0;
}
.h-item-padding-2 {
  margin-top: 6vw;
}
.h-item-padding-3 {
  padding-right: 3%;
  margin: 8vw 0 3vw;
}
.h-item-padding-4 {
  padding-right: 2.5%;
  margin-top: 12vw;
}
.h-item-padding-5 {
  margin-top: 4vw;
  margin-bottom: 2vw;
}

.mod-grid__item.h-item-padding-lg-portrait {
  padding-left: 12%;
  padding-right: 12%;
}

.mod-grid__item figure {
  position: relative;
  display: block;
  height: auto;
  width: 100%;
  margin: 0;
  font-size: 0; /* Entfernt den kleinen Abstand unter Bildern */
}

.mod-grid__item__link {
  position: relative;
  display: block;
  text-align: left;
  text-decoration: none; /* Entfernt den Unterstrich */
  color: inherit; /* Übernimmt die Farbe vom Elternelement (Schwarz) */
}

.mod-grid__item figcaption {
  position: relative;
  display: block;
  top: -1px;
  z-index: 1;
  width: 100%;
  margin: 0;
  padding: 3px;
  border: 0;
  outline: 0;
  background: #fff;
  font-family: "Courier", monospace;
  font-size: 16px;
  line-height: 17px;
}

.mod-grid__item__no {
  position: absolute;
  top: 1px;
  left: -45px;
  width: 40px;
  font-family: "Courier", monospace;
  font-size: 14px;
  line-height: 15px;
  text-align: right;
}

/* 1. Grundzustand der Info-Leiste */
.mod-grid__info {
  background-color: transparent; /* Startzustand */
  color: #000; /* Schwarze Schrift auf weißem Grund */
}

/* 2. Der Hover-Zustand */
/* Wenn man über den Artikel fährt, ändert sich die Info-Leiste darin */
.mod-grid__item:hover .mod-grid__info {
  box-shadow: inset 0 -1px 0 0 #000;
}

/* DER WRAPPER (Bild + Text) */
.h-img-container {
  position: relative;
  width: 100%;
  height: auto;
  overflow: hidden;
  display: block;
  box-sizing: inherit;
}

.h-img-container img {
  display: block;
  width: 100%;
  max-width: 100%; /* Bild passt sich der Spalte an */
  height: auto;
  object-fit: contain;
}

.project-info {
  margin-top: 15px;
  font-size: 13px;
  line-height: 1.4;
}

.mod-project-list {
  padding: 5px 10px; /* Platz für Header/Footer und dein 10px Raster */
  max-width: 100%;
  font-family: "Suisse-Intl-SemiBold", normal;
  font-size: 16px;
}

.js-table {
  width: 100%;
  border-collapse: collapse;
  line-height: 1.4;
  text-align: left;
  font-size: 16px;
}

/* Tabellenkopf */
.js-table thead th {
  border-top: 1px solid #000;
  border-top: #000 2px solid;
  font-family: "Suisse-Intl-SemiBold", normal;
  text-transform: capitalize;
  font-weight: normal;
  font-size: 18px;
  line-height: 19px;
}

.mod-project-list table thead th {
  padding: 10px 10px 15px 0;
  border-top: 1px solid #000;
}

/* Grundzustand der sortierbaren Header */
th.sortable {
  cursor: pointer;
  position: relative;
  padding-right: 20px !important; /* Platz für den Pfeil */
  user-select: none;
}

/* Der Pfeil (unsichtbar im Normalzustand) */
th.sortable::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 35%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  opacity: 0; /* Versteckt, wenn nicht aktiv */
  transition:
    opacity 0.2s,
    transform 0.2s;
}

/* Wenn die Spalte aktiv sortiert wird: Pfeil zeigen */
th.sortable.is-active::after {
  opacity: 1;
}

/* Pfeil nach OBEN (aufsteigend) */
th.sortable.is-asc::after {
  border-bottom: 5px solid #000; /* Kleines Dreieck nach oben */
  border-top: none;
}

/* Pfeil nach UNTEN (absteigend) */
th.sortable.is-desc::after {
  border-top: 5px solid #000; /* Kleines Dreieck nach unten */
  border-bottom: none;
}

/* Hover-Effekt zur Unterstützung */
th.sortable:hover {
  color: #000;
}

.mod-project-list table tbody tr.h-row-project {
  font-family: "Courier", monospace;
  font-size: 17px;
  line-height: 19px px;
}

.mod-project-list table tbody tr td {
  padding: 3px 10px 15px 0;
  border-top: 1px solid #000;
}

.mod-project-list table thead th.h-col-1 {
  width: 3%;
  min-width: 45px;
}
.mod-project-list table thead th.h-col-2 {
  width: 22.5%;
}
.mod-project-list table thead th.h-col-3 {
  width: 5%;
}
.mod-project-list table thead th.h-col-4 {
  width: 13%;
}
.mod-project-list table thead th.h-col-5 {
  width: 13%;
}
.mod-project-list table thead th.h-col-6 {
  width: 8%;
}
.mod-project-list table thead th.h-col-7 {
  width: 23%;
  text-align: left;
}
.mod-project-list table thead th.h-col-7:after {
  right: 0;
}
.mod-project-list table thead th.h-col-8 {
  width: 7%;
  text-align: center;
}
.mod-project-list table thead th.h-col-8:after {
  right: 0;
}
.mod-project-list table thead th.h-col-9 {
  width: 7%;
  text-align: center;
}

.mod-project-list table tbody td.h-col-1 {
  width: 3%;
  min-width: 45px;
}
.mod-project-list table tbody td.h-col-2 {
  width: 22.5%;
}
.mod-project-list table tbody td.h-col-3 {
  width: 5%;
}
.mod-project-list table tbody td.h-col-4 {
  width: 13%;
}
.mod-project-list table tbody td.h-col-5 {
  width: 13%;
}
.mod-project-list table tbody td.h-col-6 {
  width: 8%;
}
.mod-project-list table tbody td.h-col-7 {
  width: 23%;
}
.mod-project-list table tbody td.h-col-7:after {
  right: 0;
}
.mod-project-list table tbody td.h-col-8 {
  width: 7%;
  text-align: center;
  font-size: 22px;
}
.mod-project-list table tbody td.h-col-8:after {
  right: 0;
}
.mod-project-list table tbody td.h-col-9 {
  width: 7%;
  text-align: center;
  font-size: 22px;
}

.awards-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.awards-list li {
  padding-left: 0;
}

/* Tabellenzeilen */
.js-table tbody td {
  border-top: 1px solid #000000;
  cursor: pointer;
  vertical-align: top;
}

/* Hover-Effekt: Ganze Zeile invertieren wie im Grid */
.mod-project-list table tbody tr.h-row-project:hover td {
  background-color: #000;
  color: #cfcfcf;
}

/* Die Galerie-Zeile */
.h-row-gallery td {
  border-top: 0 !important; /* Keine Linie über der Galerie */
  background-color: #ffffff; /* Dezenter Hintergrund zum Absetzen */
}

.gallery-gap {
  width: 3%;
  min-width: 45px;
  border-top: 0;
  padding: 3px 5px 15px 0;
}

.thumbnail-container {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.list-thumbnail {
  width: auto;
  height: 150px;
  cursor: pointer;
  overflow: hidden;
  background: #eee;
}

.list-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: fill; /* Schneidet die Thumbnails sauber zu */
}

/* .list-thumbnail:hover img {
}

/* --- DESKTOP DEFAULTS --- */
.p-year-mobile,
.p-place-mobile,
.p-auslobung-mobile,
.h-col-mobile-thumb {
  display: none; /* Auf Desktop verstecken */
}

@media (max-width: 1536px) {
  /* 1. Unnötige Spalten und Elemente ausblenden */
  .h-col-8,
  .h-col-9 {
    display: none !important;
  }
}

@media (max-width: 1294px) {
  /* 1. Unnötige Spalten und Elemente ausblenden */
  .h-col-5,
  .h-col-6 {
    display: none !important;
  }
}

/* --- MOBILE OPTIMIERUNG (760px) --- */
@media (max-width: 760px) {
  .mod-project-list {
    padding-left: 10px;
    padding-right: 10px;
    width: 100vw;
    box-sizing: border-box;
    overflow-x: hidden; /* Verhindert das seitliche Wackeln */
  }

  .js-table {
    table-layout: fixed;
    width: 100% !important;
    border-collapse: collapse;
  }

  .mod-project-list table tbody td.h-col-2 {
    /* 1. Sprache beachten: Der Browser braucht <html lang="de"> */
    hyphens: auto;
    -webkit-hyphens: auto; /* Für Safari */
    -ms-hyphens: auto; /* Für alte Internet Explorer/Edge */

    /* 2. "Erzwinge" den Umbruch bei extrem langen Wörtern, 
       die nicht im Wörterbuch stehen */
    overflow-wrap: break-word;
    word-wrap: break-word;

    /* 3. Optional: Damit der Text nicht zu "zerfressen" aussieht */
    text-align: left;
    width: auto !important;
    /* Kein min-width hier, damit sie wirklich schrumpfen kann */
  }

  /* 1. Unnötige Spalten und Elemente ausblenden */
  .desktop-only,
  .mod-project-list table thead, /* Header auf Mobile meistens zu Platzraubend */
  .h-col-3, .h-col-4, .h-col-5, .h-col-6, .h-col-7, .h-col-8, .h-col-9 {
    display: none !important;
  }

  /* 2. Die verbleibenden Elemente zeigen */
  .p-year-mobile,
  .p-place-mobile,
  .p-auslobung-mobile {
    display: inline;
  }

  .p-title,
  .p-year-mobile,
  .p-place-mobile {
    font-size: 14px !important;
    line-height: 15px !important;
  }

  .h-col-mobile-thumb {
    display: table-cell !important;
    text-align: right;
    vertical-align: middle;
    min-height: 120px;
    width: 140px !important;
  }

  .h-col-mobile-thumb img {
    min-height: 120px;
    width: 140px !important;
    object-fit: cover;
    display: block;
    margin-left: auto;
  }

  .mod-project-list table tbody tr td {
    padding: 5px 5px 5px 0 !important;
    border-top: 1px solid #000;
  }

  /* 3. Spaltenbreiten für 3-Spalten-Layout anpassen */
  .mod-project-list table tbody td.h-col-1 {
    text-align: right;
    width: 30px;
    padding-right: 10px !important;
  }

  .desktop-only,
  thead {
    display: none !important;
  }
}

/* Der äußere Wrap */
.info-wrapper {
  padding: 0px 10px 100px 10px; /* Links bündig mit deiner No. Spalte */
  width: auto;
  display: flex;
  font-family: "Swiss-721-Light-BT", normal;
  flex-direction: column;
  gap: 40px; /* Vertikaler Abstand zwischen den 4 Blöcken */
}

/* .info-block {}}

/* Gemeinsame Basis für alle Sektionen */
.info-section {
  display: grid;
  padding: 10px 0px 10px 0px; /* Innenabstand für die Sektionen, damit sie nicht direkt am Rand kleben */
  border-top: #000 2px solid;
  gap: 15px; /* Horizontaler Abstand zwischen den Textblöcken */
  width: 100%;
}

.info-title {
  margin-bottom: 4px;
  font-family: "Suisse-Intl-Medium", monospace;
  text-transform: none;
  font-size: 15px;
  line-height: 1.1;
}
/* Spezifisch: Büro & Kontakt (2 Spalten) */
.info-section--buero {
  grid-template-columns: 1fr 1fr;
}

.info-content-text {
  padding: 0;
  font-family: "Swiss-721-Light-BT", normal;
  line-height: 1.4;
  font-size: 14px;
}

.info-content-text a {
  color: inherit;
  text-decoration: none;
}

/* Spezifisch: Team (3 Spalten) */
.info-section--team {
}

.team-grid {
  display: flex;
  /* grid-template-columns: repeat(3, 1fr); /* 3 Spalten */
  gap: 80px;
  width: 100%;
}

.team-member {
  display: flex;
  max-width: 460px;
  flex-direction: column;
}

.team-img-wrap {
  margin: 0;
}

.team-name {
  font-family: "Courier", monospace; /* Technischer Look für CV-Daten */
  margin-top: 4px;
  font-size: 17px;
}

.team-role {
  font-family:
    "Swiss-721-Light-BT", monospace; /* Technischer Look für CV-Daten */
  font-size: 14px;
  text-transform: none;
  margin-bottom: 10px;
  color: #666;
}

.team-text {
  font-family:
    "Swiss-721-Light-BT", monospace; /* Technischer Look für CV-Daten */
  font-size: 14px;
  line-height: 1.4;
  color: #333;
}

/* Team-Bilder */
.team-member img {
  width: 100%;
  height: auto;
  margin-bottom: 10px;
  object-fit: cover;
}

@media (max-width: 1246px) {
  .team-grid {
    display: block !important;
    gap: 0px;
  }

  .team-member {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    flex-direction: column;
    max-width: none !important;
  }

  .team-img-wrap {
    max-width: 460px;
  }
  .team-member-info {
    align-items: left;
  }
}

/* --- MOBILE ANPASSUNG --- */
@media (max-width: 760px) {
  .info-wrapper {
    padding: 20px 10px 40px 10px;
    gap: 40px;
  }

  /* Auf Mobile alles untereinander (1 Spalte) */
  .info-section--buero,
  .info-section--team {
    grid-template-columns: 1fr;
  }

  .team-grid {
    display: grid;
    grid-template-columns: 1fr; /* 3 Spalten */
    width: 100%;
  }

  .team-member {
    display: grid;
    grid-template-columns: 1fr;
    flex-direction: column;
    margin-bottom: 35px;
  }
}

/* Die Lightbox als Modul */
.mod-lightbox.h-state--active {
  display: block !important;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100dvh;
  background: #ffffff;
  z-index: 3000;
}

.mod-lightbox__inner {
  position: relative;
  width: 100%;
  height: 100%;
}

.mod-lightbox__counter {
  position: absolute;
  top: 5px;
  left: 10px;
  font-family: "Courier", monospace;
  font-size: 14px;
  line-height: 16px;
}

.mod-lightbox__caption {
  position: absolute;
  bottom: 5px;
  left: 10px;
  font-family: "Courier", monospace;
  font-size: 14px;
  line-height: 16px;
}

.js-image-tag {
  position: absolute;
  bottom: 30px;
  right: 10px; /* Versetzt zum Counter */
  font-family: "Courier", monospace;
  font-size: 14px;
  text-align: right;
  z-index: 7500;
}

.slideshow-viewport {
  position: relative;
  height: 100%;
  width: 100%;
  overflow: hidden;
}

.mod-lightbox__info-inner::-webkit-scrollbar,
.mod-lightbox__info-expanded-inner::-webkit-scrollbar,
.mod-lightbox__info-expanded::-webkit-scrollbar,
.slideshow-viewport::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

/* Counter & Caption (Oben fixiert) */
.js-counter {
  font-family: "Courier", monospace;
  text-align: right;
}

.js-caption {
  position: absolute;
  left: 50%;
  bottom: 5px;
  width: 100%;
  font-family: "Courier", monospace;
  font-size: 14px;
  line-height: 16px;
  padding: 0 10px;
  text-align: center;
  transform: translateX(-50%);
}

.close-button {
  display: block;
  position: absolute;
  top: 5px;
  right: 10px;
  width: 30px;
  height: 30px;
  z-index: 10000; /* Muss höher sein als die Bilder in der Slideshow */
  color: #000;
  cursor: pointer;
}

.close-button::before,
.close-button::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px; /* Die Dicke der Linie - Architekten mögen es dünn! */
  background-color: #000;
  transition: transform 0.3s ease;
}

/* Eine Linie 45 Grad drehen */
.close-button::before {
  transform: rotate(45deg);
}

/* Die andere -45 Grad drehen */
.close-button::after {
  transform: rotate(-45deg);
}

/* Die Slideshow (Die digitale Schiene) */
.mod-lightbox__slideshow {
  position: absolute;
  top: 50px;
  right: 10px;
  bottom: 50px;
  left: 10px;
  overflow: hidden;
  scroll-snap-type: x mandatory; /* Wichtig für das Einrasten der Bilder */
  -webkit-overflow-scrolling: touch;
  /* Versteckt die Scrollbar für Chrome, Safari und Opera */
  scrollbar-width: none; /* Firefox */
}

.mod-lightbox__slideshow::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

/* Die Schiene (Rail) - Hier liegen die Bilder nebeneinander */
.mod-lightbox__rail {
  position: relative;
  display: block;
  height: 100%;
  width: 100%;
  background-color: #fff;
}

/* We still need the padding for the whitespace you wanted */
.mod-lightbox__slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0px;
  box-sizing: border-box;
  pointer-events: none;
}

.mod-lightbox__slide[style*="opacity: 1"] {
  pointer-events: auto;
}

.mod-lightbox__slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.mod-lightbox__btn {
  position: absolute;
  top: 0;
  height: 100%;
  width: 50%;
  background: none;
  border: none;
  outline: none;
  z-index: 6500; /* Unter CLOSE, aber über dem Bild */
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.js-prev {
  left: 0;
  cursor:
    url('data:image/svg+xml;utf8,<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20 5L10 15L20 25" stroke="black" stroke-width="1"/></svg>')
      15 15,
    w-resize;
  z-index: 10000 !important;
}

.js-next {
  right: 0;
  cursor:
    url('data:image/svg+xml;utf8,<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 5L20 15L10 25" stroke="black" stroke-width="1"/></svg>')
      15 15,
    e-resize; /* Ost-Pfeil */
  z-index: 10000 !important;
}

:root {
  --info-bar-height: 25px; /* Hier definierst du die Höhe der schmalen Leiste */
  --side-padding: 10px;
}

/* Standard für Fotos: Schieben */
.mod-lightbox__slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 40px;
  box-sizing: border-box;

  /* NEU: Basis für den Fade-Effekt */
  opacity: 0;
  will-change: transform;
  transform-origin: center center;
}

/* Spezialzustand für Pläne: Verblassen statt Schieben */
.mod-lightbox__slide.is-plan {
  /* Wenn Pläne aufeinanderfolgen, bleiben sie an Ort und Stelle (X=0) */
}

.mod-lightbox__info {
  display: flex;
  position: absolute;
  flex-direction: column;
  max-height: calc(
    100vh - 120px
  ); /* 60px = Abstand von oben und unten (je 30px) */
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  background-color: #fff;
  border-top: #000 2px solid;
  z-index: 10000;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* Momentum-Scrolling auf iOS */
  /* Jetzt funktioniert die Rechnung, weil die Variable oben definiert ist */
  transition: transform 0.35s ease;
  transform: translateY(calc(100% - var(--info-bar-height)));
}

.mod-lightbox__info-inner {
  position: relative;
  box-sizing: border-box;
  padding: 5px var(--side-padding) 10px var(--side-padding);
  height: 100%;
}

.mod-lightbox.h-info-active .mod-lightbox__info {
  transform: translateY(0);
}

/* --- DIE REDUCED LEISTE (Trigger) --- */
.mod-lightbox__info-reduced {
  height: var(--info-bar-height);
  min-height: var(--info-bar-height);
  display: block;
  box-sizing: border-box;
  align-items: center;
  padding: 5px 10px 0px 10px;
  top: 0;
  left: 0;
  right: 0;
  cursor: pointer;
  overflow: hidden;
  transition: opacity 0.3s ease;
  position: absolute;
  width: 100%;
  background: #ffffff; /* Damit man den Inhalt dahinter nicht durchsieht */
  z-index: 8000;
}

.mod-lightbox__info-reduced p {
  padding-right: 30px; /* Platz für den Close-Button */
  white-space: nowrap; /* Verhindert Zeilenumbruch */
  overflow: hidden; /* Schneidet Text ab, der zu lang ist */
  text-overflow: ellipsis; /* Fügt "..." am Ende hinzu */
  font-family: "Courier", normal;
  font-size: 14px;
  line-height: 15px;
}

/* NEU: Wenn die Box offen ist, verschwindet der Inhalt der Leiste */
.mod-lightbox.h-info-active .mod-lightbox__info-reduced {
  opacity: 0;
  pointer-events: none;
}

/* --- DER EXPANDED INHALT --- */
.mod-lightbox__info-expanded {
  overflow-y: auto;
  width: 100%;
  scrollbar-width: none; /* Firefox */
}

.mod-lightbox__info-expanded-inner {
  max-width: 100%;
  display: grid;
  flex-direction: column;
  grid-template-columns: 1fr 2fr; /* Tabelle links schmal, Text rechts breit */
  gap: 10px;
  max-width: 100%;
  align-items: start;
  margin: 0 auto;
  scrollbar-width: none; /* Firefox */
}

/* Gestaltung der Tabelle (Details) */
.mod-lightbox__info-table {
  width: 100%;
  display: flex;
  font-family: "Swiss-721-Light-BT", normal;
  font-size: 13px;
  flex-direction: column;
}

.info-row {
  display: grid;
  grid-template-columns: 150px 1fr; /* Festes Maß für Labels, Rest für Text */
  min-width: 460px;
  gap: 10px;
  padding: 1px 0; /* Minimaler Abstand zwischen den Zeilen */
  border: none !important; /* Absolut keine Linien */
  font-family: "Swiss-721-Light-BT", normal;
  font-size: 15px;
  line-height: 1.4;
  text-align: left;
}

.info-label {
  color: #000; /* Oder #999, falls du es etwas dezenter willst */
  text-transform: capitalize;
  font-family: "Suisse-Intl-SemiBold", normal;
}

/* Gestaltung der Beschreibung */
.mod-lightbox__info-description {
  display: block;
  column-count: 2;
  column-gap: 30px; /* Abstand zwischen den Textspalten */
  column-fill: balance;
  align-self: start;
  height: auto;
  margin-bottom: 0px; /* Mehr Abstand nach unten, damit es nicht so gedrängt wirkt */
  padding-right: 70px; /* Platz für den Close-Button */
  max-width: 1246px; /* Optional: Beschränkung der Breite für bessere Lesbarkeit */
  font-family: "Suisse-Intl-SemiBold", normal;
  font-size: 15px;
  line-height: 1.2;
  text-align: left;
}

.mod-lightbox__info-description p {
  display: block !important;
  flex-grow: 0 !important;
  font-size: 15px;
  margin-bottom: 1.5em !important;
  break-inside: avoid-column;
  line-height: auto !important;
}

.mod-lightbox__info-description p:last-child {
  margin-bottom: 0; /* Verhindert unnötige n Platz am Ende */
}

.js-info-title {
  top: 0;
}

/* Schließen-Button innerhalb der Info-Box (das kleine Kreuz) */
.js-info-close {
  position: absolute;
  z-index: 8500;
  top: 0;
  right: 10px;
  width: 30px;
  height: 24px;
  display: block;
  cursor: pointer;
  pointer-events: none;
}

/* Wenn die Box ausgeklappt ist... */
.mod-lightbox.h-info-active .js-info-close {
  /* ...wird der Button klickbar, um die Box zu schließen */
  pointer-events: auto;
}

.js-info-close::before,
.js-info-close::after {
  content: "";
  position: absolute;
  top: 50%; /* Vertikal zentrieren im 15px Container */
  width: 18px; /* Etwas kürzer, damit sie sich in der Mitte sauber treffen */
  height: 1px; /* Deine Linienstärke */
  background-color: #000;
  transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
  transform-origin: center center;
  display: block;
}

/* Linke Seite des Pfeils */
.js-info-close::before {
  left: 0;
  transform: translateY(-50%) rotate(-45deg);
}

/* Rechte Seite des Pfeils */
.js-info-close::after {
  right: 0;
  transform: translateY(-50%) rotate(45deg);
}

.mod-lightbox.h-info-active .js-info-close::before {
  transform: translateY(-50%) rotate(45deg);
}

.mod-lightbox.h-info-active .js-info-close::after {
  transform: translateY(-50%) rotate(-45deg);
}

.info-content-text {
  display: block;
  font-size: 14px;
}

.mod-footer {
  text-align: left;
  padding: 0;
  margin: 0;
  display: block;
  position: relative;
  flex-shrink: 0;
  z-index: 2500;
}

.mod-footer__inner {
  left: 0;
  bottom: 0;
  max-height: 25px;
  background-color: #fff;
  font-family: "Suisse-Intl-Regular", normal;
  z-index: 2000;
  width: 100%;
  font-size: 12px;
  line-height: 14px;
}

.mod-footer__content {
  border-top: #000 0px solid;
  padding: 5px 10px;
  color: #000;
}

.mod-footer__content p {
  overflow: hidden; /* Schneidet Text ab, der zu lang ist */
  text-overflow: ellipsis; /* Fügt "..." am Ende hinzu */
  white-space: nowrap; /* Verhindert Zeilenumbruch */
}

.mod-footer__content a {
  color: inherit;
  text-decoration: none;
}

@media (max-width: 1246px) {
  .mod-lightbox__info-description {
    display: grid;
    grid-template-columns: 1fr !important; /* Einspaltig für die Beschreibung */
    padding-right: 70px; /* Platz für den Close-Button */
    max-width: 800px; /* Optional: Beschränkung der Breite für bessere Lesbarkeit */
    text-align: left;
  }
}

@media (max-width: 760px) {
  .mod-header {
    height: 100px;
  }

  .mod-header__inner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px !important;
    font-size: 28px !important;
    line-height: 30px !important;
    overflow: hidden;
    transition: height 0.6s cubic-bezier(0.19, 1, 0.22, 1);
    will-change: height;
  }

  /* Die Klasse, die den Header versteckt */
  .h-nav-hidden {
    height: 0 !important;
  }

  .mod-header nav ul li {
    display: block !important; /* Ändert die Navigation auf vertikal */
    padding: 0;
  }

  .nav-item {
    font-size: 28px !important; /* Vergrößert die Schriftgröße für bessere Lesbarkeit auf dem Handy */
    line-height: 30px !important;
  }

  /* 1. Jedes Projekt nimmt die volle Breite ein */
  .mod-grid__item {
    width: 100% !important;
    padding: 0 !important; /* Entfernt den Zufall und das Portrait-Padding */
    margin: 10px 0 !important; /* Gleichmäßiger Abstand zwischen den Projekten */
  }

  /* 2. Hochformat-Bilder auf dem Handy wieder groß machen */
  /* (Auf dem schmalen Schirm wäre 60% Breite viel zu klein) */
  .mod-grid__item.h-item-padding-lg-portrait .h-img-container,
  .mod-grid__item.h-item-padding-lg-portrait .mod-grid__info {
    max-width: 100% !important;
    margin-left: 0 !important;
  }

  /* 3. Den inneren Container des Grids anpassen */
  .mod-grid__inner {
    padding-left: 45px !important; /* Ein fester Seitenrand für das Handy */
  }

  .mod-grid__item figcaption {
    font-size: 14px; /* Etwas größer für bessere Lesbarkeit auf dem Handy */
    line-height: 15px;
  }

  /* Den Counter für Mobile vielleicht etwas kleiner oder anders positionieren */
  .js-counter {
    top: 10px;
    left: 10px;
  }

  .mod-lightbox__info-expanded-inner {
    grid-template-columns: 1fr; /* Untereinander auf schmalen Schirmen */
    gap: 20px;
  }
  .mod-lightbox__slide {
    padding: 0 0px !important;
  }

  .info-row {
    grid-template-columns: 150 px 1fr;
    gap: 2px;
    margin-bottom: 10px;
  }

  .info-label {
    color: #000; /* Oder #999, falls du es etwas dezenter willst */
  }

  /* --- DIE BESCHREIBUNG (js-info-description) --- */
  .mod-lightbox__info-description {
    width: 100% !important;
    padding: 0px !important; /* Platz für den Close-Button */
    text-align: left;
    font-size: 11px; /* Etwas größer für Lesbarkeit */
    line-height: 1.1;
    max-width: 800px; /* Optional: Text nicht zu breit laufen lassen für Lesbarkeit */
  }
}

/* Speziell für Querformat oder sehr niedrige Fenster */
@media (max-height: 500px) and (orientation: landscape) {
  /* 1. Den Rahmen der Slideshow vergrößern */
  .mod-lightbox__slideshow {
    top: 10px; /* Halbiert den oberen Rand */
    bottom: var(--info-bar-height); /* Reduziert den unteren Rand */
    left: 10px;
    right: 10px;
  }

  /* 2. Die UI-Elemente näher an den Rand schieben */
  .js-counter {
    top: 5px;
    left: 10px;
  }

  .close-button {
    top: 5px;
    right: 10px;
  }

  .js-caption {
    bottom: 5px; /* Caption rückt näher an die Unterkante */
    font-size: 10px; /* Schrift minimal verkleinern */
  }
}

/* Diese Regel gilt nur für Geräte mit Touchscreen (Smartphones/Tablets) */
@media (pointer: coarse) {
  .mod-lightbox__btn {
    display: none; /* Auf dem Handy nur Wischen erlauben */
  }

  .slideshow-viewport {
    overflow: hidden;
    position: relative;
    height: 100%;
    width: 100%;
  }
}

/* Diese Regel gilt für Geräte mit Maus (auch wenn das Fenster schmal gezogen wird) */
@media (pointer: fine) {
  .mod-lightbox__btn {
    display: block; /* Am Rechner immer Klick-Buttons anzeigen */
  }
}
