/* =========================
   ADMIN BAR
========================= */

.account-masthead {
  background-color: #c9dee8 !important;
  min-height: 24px !important;
  height: 24px !important;
  padding: 0 !important;
}

.account-masthead a,
.account-masthead .text,
.account-masthead i {
  color: #000000 !important;
}

.account-masthead ul,
.account-masthead li {
  height: 24px !important;
  line-height: 24px !important;
  display: flex !important;
  align-items: center !important;
}

.account-masthead li + li {
  border-left: 1px solid rgba(0, 59, 73, 0.2) !important;
}

.account-masthead .user-image {
  display: none !important;
}

/* Hover/Fokus: lesbar halten */
.account-masthead li:hover,
.account-masthead li:focus-within {
  background-color: #cfe5ee !important;
}

.account-masthead a:hover,
.account-masthead a:focus,
.account-masthead a:hover i,
.account-masthead a:focus i {
  background-color: #cfe5ee !important;
  color: #000000 !important;
  text-decoration: none !important;
}

.account-masthead a {
  transition: background-color 0.15s ease, color 0.15s ease;
}



/* =========================
   HEADER
========================= */

.masthead {
  background-color: #e6f2f7 !important;
  min-height: 130px !important;
  height: 130px !important;
  padding: 0 !important;
  overflow: visible !important;
}

.masthead .container,
.masthead .navbar {
  height: 130px !important;
  min-height: 130px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  display: flex !important;
  align-items: center !important;
}

.masthead .logo {
  height: 130px !important;
  display: flex !important;
  align-items: center !important;
}

.masthead .logo img,
.masthead img.custom-logo {
  height: 220px !important;
  max-height: none !important;
  width: auto !important;
  display: block !important;
}

.masthead .navbar-nav li a,
.masthead .main-navbar a {
  color: #000000 !important;
  font-weight: 600 !important;
}

.masthead .navbar-nav li a:hover,
.masthead .navbar-nav li.active a,
.masthead .navbar-nav li.active a:hover {
  background-color: #cfe5ee !important;
  color: #000000 !important;
}

.masthead input {
  border: 1px solid #b5d3df !important;
  color: #000000 !important;
}


/* =========================
   STARTSEITE / HERO
========================= */

.lhs-hero {
  background: linear-gradient(to bottom, #e6f2f7, #ffffff);
  padding: 40px 0 20px 0;
  margin-bottom: 20px;
}

.lhs-hero h1 {
  font-size: 32px;
  font-weight: 600;
  color: #000000;
  margin-bottom: 10px;
}

.lhs-hero p {
  font-size: 16px;
  color: #000000;
  margin-bottom: 20px;
}

.lhs-hero p:last-child {
  margin-bottom: 0;
}

.lhs-hero-search {
  display: flex;
  max-width: 500px;
}

.lhs-hero-search input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #b5d3df;
  border-right: none;
  border-radius: 4px 0 0 4px;
}

.lhs-hero-search button {
  padding: 10px 16px;
  background-color: #006fae;
  color: #ffffff;
  border: none;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
}

.lhs-hero-search button:hover {
  background-color: #005b8f;
}


/* =========================
   START-KACHELN
========================= */

.lhs-start-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.lhs-start-card {
  display: block;
  padding: 20px;
  background-color: #ffffff;
  border: 1px solid #dce9ef;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.lhs-start-card:hover {
  border-color: #9fc3d1;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.lhs-start-card h2 {
  font-size: 18px;
  color: #000000;
  margin-bottom: 8px;
}

.lhs-start-card p {
  font-size: 14px;
  color: #000000;
}


/* =========================
   AKTUELLE DATENSAETZE STARTSEITE
========================= */

.lhs-datasets {
  margin-bottom: 60px;
}

.lhs-datasets h2 {
  font-size: 22px;
  color: #000000;
  margin-bottom: 20px;
}

.lhs-dataset-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.lhs-dataset-card {
  display: flex !important;
  align-items: center !important;
  gap: 24px !important;
  min-height: 115px !important;
  background-color: #ffffff !important;
  border: 1px solid #b8d6e3 !important;
  border-left: 6px solid #006fae !important;
  border-radius: 8px !important;
  padding: 22px 32px 22px 18px !important;
  box-shadow: 0 2px 8px rgba(0, 59, 73, 0.08) !important;
  overflow: hidden !important;
}

.lhs-dataset-symbol {
  width: 155px !important;
  height: auto !important;
  flex: 0 0 155px !important;
  opacity: 0.42 !important;
  display: block !important;
  margin-left: 0 !important;
}

.lhs-dataset-content {
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

.lhs-dataset-card h3 {
  font-size: 20px !important;
  margin-bottom: 12px !important;
}

.lhs-dataset-card h3 a {
  color: #006fae !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}

.lhs-dataset-card h3 a:hover {
  text-decoration: underline !important;
}

.lhs-dataset-card p {
  font-size: 16px !important;
  color: #000000 !important;
  line-height: 1.45 !important;
  max-width: none !important;
  margin-bottom: 0 !important;
}


/* =========================
   FOOTER INKL. TEILEN
========================= */

.lhs-footer {
  background-color: #c9dee8 !important;
  color: #000000 !important;
  padding: 24px 0 28px 0 !important;
  border-top: 1px solid #b5d3df !important;
}

.lhs-footer-top,
.lhs-footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px;
}

.lhs-footer-top {
  margin-bottom: 34px;
}

.lhs-share-title {
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: 14px;
  color: #000000;
  margin-bottom: 12px;
}

.lhs-share-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.lhs-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 105px;
  padding: 8px 14px;
  color: #ffffff !important;
  border-radius: 5px;
  font-weight: 700;
  text-decoration: none !important;
}

.lhs-share-btn.facebook { background: #3b5998; }
.lhs-share-btn.twitter { background: #000000; }
.lhs-share-btn.pinterest { background: #c50022; }
.lhs-share-btn.mail { background: #666666; }

.lhs-share-actions a,
.lhs-footer-links a {
  color: #006fae !important;
  font-weight: 600;
  text-decoration: none;
}

.lhs-share-actions a:hover,
.lhs-footer-links a:hover {
  text-decoration: underline;
}

.lhs-footer-left {
  align-self: flex-end;
  font-size: 14px;
  line-height: 1.5;
}

.lhs-footer-right {
  text-align: right;
}

.lhs-social strong {
  color: #000000;
  font-weight: 700;
}

.lhs-social-icons {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
  gap: 18px;
}

.lhs-social-icons img {
  width: 28px;
  height: 28px;
  display: block;
}

.lhs-footer-links {
  margin-top: 18px;
  display: flex;
  gap: 24px;
  justify-content: flex-end;
  flex-wrap: wrap;
}


/* =========================
   STANDARD-SEITE / IMPRESSUM
========================= */

.lhs-page-content {
  background: #ffffff;
  border: 1px solid #dce9ef;
  border-radius: 8px;
  padding: 32px;
  margin-bottom: 50px;
}

.lhs-page-content h1 {
  color: #000000;
  margin-bottom: 24px;
}

.lhs-page-content h2 {
  color: #000000;
  font-size: 20px;
  margin-top: 28px;
  margin-bottom: 10px;
}

.lhs-page-content p {
  color: #000000;
  line-height: 1.6;
}

.lhs-page-content a {
  color: #006fae;
  font-weight: 600;
}


/* =========================
   DATENSATZ-SEITE
========================= */

.btn-primary,
.btn.btn-primary {
  background-color: #006fae !important;
  border-color: #006fae !important;
  color: #ffffff !important;
  font-weight: 600 !important;
}

.btn-primary:hover,
.btn.btn-primary:hover {
  background-color: #005b8f !important;
  border-color: #005b8f !important;
  color: #ffffff !important;
}

.facet-count {
  background: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  color: #000000 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
}

body:not(.homepage) .dataset-heading a {
  color: #006fae !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}

body:not(.homepage) .dataset-heading a:hover {
  text-decoration: underline !important;
}

body:not(.homepage) .dataset-content {
  color: #000000 !important;
}

body:not(.homepage) .secondary .module {
  background: transparent !important;
  border: none !important;
  border-bottom: 1px solid #e3eef3 !important;
}

body:not(.homepage) .secondary .module-heading {
  background: transparent !important;
  color: #000000 !important;
  font-weight: 700 !important;
  border: none !important;
}

body:not(.homepage) .search-form {
  background: transparent !important;
  border: none !important;
}

body:not(.homepage) .wrapper {
  background: #ffffff !important;
  border: none !important;
  box-shadow: none !important;
}

body:not(.homepage) .toolbar {
  background: transparent !important;
  border: none !important;
}


/* =========================
   DATENSATZ-SEITE - VERFEINERUNG
========================= */

body:not(.homepage) .wrapper {
  border-radius: 10px !important;
  overflow: hidden !important;
}

body:not(.homepage) .secondary {
  background: #f7fbfd !important;
  border-right: 1px solid #dce9ef !important;
}

body:not(.homepage) .secondary .module {
  padding: 0 !important;
  margin: 0 !important;
}

body:not(.homepage) .secondary .module-heading {
  padding: 14px 18px !important;
  border-bottom: 1px solid #dce9ef !important;
  background: #eef7fb !important;
}

body:not(.homepage) .secondary .nav-item a,
body:not(.homepage) .secondary .module-content {
  padding-left: 18px !important;
  padding-right: 18px !important;
}

body:not(.homepage) .facet-count {
  background: none !important;
  color: #000000 !important;
  font-size: 12px !important;
  margin-left: 4px !important;
}

body:not(.homepage) .primary {
  padding: 28px 36px !important;
}

body:not(.homepage) .search-form {
  margin-bottom: 22px !important;
}

body:not(.homepage) .dataset-content {
  font-size: 15px !important;
  line-height: 1.5 !important;
}

body:not(.homepage) .dataset-resources .badge {
  background: #006fae !important;
  color: #ffffff !important;
  border-radius: 4px !important;
  padding: 4px 7px !important;
}


/* =========================
   FILTER-AKKORDEON DATENSATZSEITE
========================= */

body:not(.homepage) .lhs-facet-module {
  margin: 0 !important;
  padding: 0 !important;
  border-bottom: 1px solid #b7d9e8 !important;
}

body:not(.homepage) .lhs-facet-details {
  padding: 0 !important;
}

body:not(.homepage) .lhs-facet-summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 18px !important;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #000000 !important;
  font-weight: 700 !important;
  background: #f7fbfd !important;
}

body:not(.homepage) .lhs-facet-summary::-webkit-details-marker {
  display: none;
}

body:not(.homepage) .lhs-facet-title {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

body:not(.homepage) .lhs-facet-toggle::after {
  content: "+";
  width: 20px;
  height: 20px;
  border: 1px solid #7fb5ca;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #000000;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

body:not(.homepage) .lhs-facet-details[open] .lhs-facet-toggle::after {
  content: "-";
}

body:not(.homepage) .lhs-facet-body {
  padding: 0 18px 14px 18px !important;
  background: #f7fbfd !important;
}

body:not(.homepage) .lhs-facet-list {
  margin: 0 !important;
  padding: 0 !important;
}

body:not(.homepage) .lhs-facet-item a {
  display: flex !important;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0 !important;
  color: #000000 !important;
  border-bottom: 1px solid #dce9ef !important;
}

body:not(.homepage) .lhs-facet-item:last-child a {
  border-bottom: none !important;
}

body:not(.homepage) .lhs-facet-item a:hover {
  color: #006fae !important;
  background: transparent !important;
}

body:not(.homepage) .lhs-facet-item.active a {
  font-weight: 700 !important;
  color: #006fae !important;
}

body:not(.homepage) .lhs-facet-footer {
  margin: 10px 0 0 0 !important;
  padding: 0 !important;
  border-top: none !important;
}

body:not(.homepage) .lhs-facet-footer a {
  color: #006fae !important;
  font-weight: 700 !important;
}

body:not(.homepage) .lhs-facet-empty {
  padding: 0 0 14px 0 !important;
  color: #000000 !important;
  border: none !important;
}


/* =========================
   AKTIVER FILTER - KORREKTUR
========================= */

body:not(.homepage) .lhs-facet-item.active,
body:not(.homepage) .lhs-facet-item.active a {
  background: #e6f2f7 !important;
  color: #000000 !important;
}

body:not(.homepage) .lhs-facet-item.active a {
  border-left: 4px solid #006fae !important;
  padding: 10px 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
}

body:not(.homepage) .lhs-facet-item.active .item-label {
  color: #000000 !important;
  font-weight: 700 !important;
  white-space: normal !important;
  line-height: 1.35 !important;
}

body:not(.homepage) .lhs-facet-item.active .facet-count {
  color: #000000 !important;
  font-weight: 600 !important;
}

body:not(.homepage) .lhs-facet-item.active .facet-close {
  color: #006fae !important;
  margin-left: 8px !important;
}

body:not(.homepage) .lhs-facet-item.active .facet-close i {
  color: #006fae !important;
}

body:not(.homepage) .lhs-facet-item.active a::before,
body:not(.homepage) .lhs-facet-item.active a::after {
  display: none !important;
}


/* =========================
   DATENSATZ-LISTE WIE STARTSEITE
========================= */

body:not(.homepage) .dataset-item {
  position: relative !important;
  display: block !important;
  min-height: 105px !important;
  background: #ffffff !important;
  border: 1px solid #b8d6e3 !important;
  border-left: 6px solid #006fae !important;
  border-radius: 8px !important;
  padding: 22px 32px 22px 120px !important;
  margin-bottom: 20px !important;
  box-shadow: 0 2px 8px rgba(0, 59, 73, 0.08) !important;
  overflow: hidden !important;
}

body:not(.homepage) .dataset-item::before {
  content: "";
  position: absolute;
  left: 24px;
  top: 50%;
  width: 80px;
  height: 50px;
  transform: translateY(-50%);
  background-image: url("/img/bgdb_sym.png");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center left;
  opacity: 0.35;
}

body:not(.homepage) .dataset-item:hover {
  border-color: #006fae !important;
  box-shadow: 0 5px 14px rgba(0, 59, 73, 0.12) !important;
  background: #ffffff !important;
}

body:not(.homepage) .dataset-content {
  position: relative !important;
  z-index: 2 !important;
}

body:not(.homepage) .dataset-heading {
  margin-bottom: 10px !important;
}

body:not(.homepage) .dataset-heading a {
  font-size: 20px !important;
  color: #006fae !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}

body:not(.homepage) .dataset-heading a:hover {
  text-decoration: underline !important;
}

body:not(.homepage) .dataset-content div,
body:not(.homepage) .dataset-content p {
  font-size: 16px !important;
  color: #000000 !important;
  line-height: 1.45 !important;
}

body:not(.homepage) .dataset-resources {
  margin-top: 12px !important;
}


/* =========================
   ORGANISATIONEN - FINAL FIX
   Abstand + rechte Kennzahlen sauber
========================= */

/* Container */
#organization-search-form ~ .media-grid,
#organization-search-form ~ * .media-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 20px !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
}

/* Item */
#organization-search-form ~ .media-grid .media-item,
#organization-search-form ~ * .media-grid .media-item {
  position: relative !important;
  float: none !important;
  width: 100% !important;
  max-width: none !important;
  min-height: 120px !important;

  display: grid !important;
  grid-template-columns: 120px minmax(260px, 1fr) 180px !important;
  grid-template-rows: auto auto !important;
  column-gap: 24px !important;
  row-gap: 4px !important;
  align-items: center !important;
  box-sizing: border-box !important;

  background: #ffffff !important;
  border: 1px solid #b8d6e3 !important;
  border-left: 6px solid #006fae !important;
  border-radius: 8px !important;
  padding: 22px 26px !important;
  margin: 0 !important;
  box-shadow: 0 2px 8px rgba(0, 59, 73, 0.08) !important;
  overflow: hidden !important;
}

/* Logo */
#organization-search-form ~ .media-grid .media-image,
#organization-search-form ~ * .media-grid .media-image {
  grid-column: 1 !important;
  grid-row: 1 / span 2 !important;
  width: 105px !important;
  max-width: 105px !important;
  max-height: 85px !important;
  justify-self: center !important;
  align-self: center !important;
  margin: 0 !important;
  float: none !important;
}

/* Titel */
#organization-search-form ~ .media-grid .media-heading,
#organization-search-form ~ * .media-grid .media-heading {
  grid-column: 2 !important;
  grid-row: 1 !important;
  margin: 0 !important;

  font-size: 20px !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  color: #006fae !important;

  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
}

/* Beschreibung */
#organization-search-form ~ .media-grid .media-description,
#organization-search-form ~ * .media-grid .media-description {
  grid-column: 2 !important;
  grid-row: 2 !important;
  margin: -2px 0 0 0 !important;

  font-size: 14px !important;
  line-height: 1.35 !important;
  color: #000000 !important;

  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
}

/* Kennzahlen rechts */
#organization-search-form ~ .media-grid .count,
#organization-search-form ~ * .media-grid .count {
  grid-column: 3 !important;
  grid-row: auto !important;

  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 4px 0 4px 20px !important;
  border-left: 1px solid #d6e6ee !important;
  text-align: left !important;

  font-size: 14px !important;
  line-height: 1.35 !important;
  font-weight: 400 !important;
  color: #000000 !important;

  white-space: nowrap !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
}

/* beide Kennzahlen mittig als Block ausrichten */
#organization-search-form ~ .media-grid .count:first-of-type,
#organization-search-form ~ * .media-grid .count:first-of-type {
  grid-row: 1 !important;
  align-self: end !important;
}

#organization-search-form ~ .media-grid .count:last-of-type,
#organization-search-form ~ * .media-grid .count:last-of-type {
  grid-row: 2 !important;
  align-self: start !important;
}

/* CKAN <br> entfernen */
#organization-search-form ~ .media-grid br,
#organization-search-form ~ * .media-grid br {
  display: none !important;
}

/* Klickfläche */
#organization-search-form ~ .media-grid .media-view,
#organization-search-form ~ * .media-grid .media-view {
  position: absolute !important;
  inset: 0 !important;
  z-index: 5 !important;
}

/* Hover */
#organization-search-form ~ .media-grid .media-item:hover,
#organization-search-form ~ * .media-grid .media-item:hover {
  border-color: #006fae !important;
  box-shadow: 0 5px 14px rgba(0, 59, 73, 0.12) !important;
}



/* =========================
   GRUPPEN - STABIL (FINAL)
========================= */

#group-search-form + .media-grid,
#group-search-form ~ .media-grid,
#group-search-form ~ * .media-grid,
.primary .module-content #group-search-form ~ .media-grid {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
}

#group-search-form + .media-grid .media-item,
#group-search-form ~ .media-grid .media-item,
#group-search-form ~ * .media-grid .media-item,
.primary .module-content #group-search-form ~ .media-grid .media-item {
  position: relative !important;
  float: none !important;
  width: 100% !important;
  max-width: none !important;
  min-height: 110px !important;
  display: grid !important;
  grid-template-columns: 120px minmax(260px, 1fr) 150px !important;
  grid-template-rows: auto auto !important;
  column-gap: 24px !important;
  row-gap: 4px !important;
  align-items: center !important;
  box-sizing: border-box !important;

  background: #ffffff !important;
  border: 1px solid #b8d6e3 !important;
  border-left: 6px solid #006fae !important;
  border-radius: 8px !important;
  padding: 20px 26px !important;
  margin: 0 0 20px 0 !important;
  box-shadow: 0 2px 8px rgba(0, 59, 73, 0.08) !important;
  overflow: hidden !important;
}

#group-search-form ~ .media-grid .media-image,
#group-search-form ~ * .media-grid .media-image {
  grid-column: 1 !important;
  grid-row: 1 / span 2 !important;
  width: 105px !important;
  max-width: 105px !important;
  height: 70px !important;
  max-height: 70px !important;
  object-fit: cover !important;
  border-radius: 4px !important;
  justify-self: center !important;
  align-self: center !important;
  margin: 0 !important;
  float: none !important;
}

#group-search-form ~ .media-grid .media-heading,
#group-search-form ~ * .media-grid .media-heading {
  grid-column: 2 !important;
  grid-row: 1 !important;
  margin: 0 !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  color: #006fae !important;
}

#group-search-form ~ .media-grid .media-description,
#group-search-form ~ * .media-grid .media-description {
  grid-column: 2 !important;
  grid-row: 2 !important;
  margin: -2px 0 0 0 !important;
  font-size: 14px !important;
  line-height: 1.35 !important;
  color: #000000 !important;
}

#group-search-form ~ .media-grid .count,
#group-search-form ~ * .media-grid .count {
  grid-column: 3 !important;
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  padding-left: 18px !important;
  border-left: 1px solid #d6e6ee !important;
  text-align: left !important;
  font-size: 14px !important;
  line-height: 1.35 !important;
  font-weight: 400 !important;
  color: #000000 !important;
}

#group-search-form ~ .media-grid br,
#group-search-form ~ * .media-grid br {
  display: none !important;
}

#group-search-form ~ .media-grid .media-view,
#group-search-form ~ * .media-grid .media-view {
  position: absolute !important;
  inset: 0 !important;
  z-index: 5 !important;
}

/* Abstand zwischen Gruppen entfernen */
#group-search-form ~ .media-grid,
#group-search-form ~ * .media-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 20px !important;
}

#group-search-form ~ .media-grid .media-item,
#group-search-form ~ * .media-grid .media-item {
  margin: 0 !important;
  clear: none !important;
}

/* Benutzerprofil: Gruppen-Tab sauber als gleichmäßiges Kartenraster */
body.user-read .primary .module-content .media-grid,
body.user-read .primary .module-content .media-grid {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: stretch !important;
  gap: 16px !important;
  margin: 0 !important;
  padding: 16px !important;
  list-style: none !important;
}

body.user-read .primary .module-content .media-grid .media-item {
  float: none !important;
  width: 232px !important;
  min-height: 380px !important;
  margin: 0 !important;
  padding: 14px !important;
  box-sizing: border-box !important;
}

body.user-read .primary .module-content .media-grid .media-image {
  width: 100% !important;
  height: 140px !important;
  object-fit: cover !important;
  border-radius: 4px !important;
}

body.user-read .primary .module-content .media-grid .media-heading {
  min-height: 58px !important;
  margin-top: 12px !important;
}

body.user-read .primary .module-content .media-grid .media-description {
  min-height: 88px !important;
  overflow: hidden !important;
}

body.user-read .primary .module-content .media-grid br {
  display: none !important;
}

body.user-read .primary .module-content .media-grid .count {
  display: block !important;
  margin-top: 6px !important;
}

/* Benutzerprofil: Gruppen-Tab getrennt von der Haupt-Gruppenübersicht */
.lhs-user-profile-groups .media-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 232px) !important;
  gap: 16px !important;
  align-items: start !important;
  justify-content: start !important;
  margin: 0 !important;
  padding: 16px !important;
  list-style: none !important;
}

.lhs-user-profile-groups .media-grid .media-item {
  float: none !important;
  width: 232px !important;
  min-height: 390px !important;
  height: 390px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

.lhs-user-profile-groups .media-grid .media-image {
  width: 100% !important;
  height: 140px !important;
  object-fit: cover !important;
}

.lhs-user-profile-groups .media-grid br {
  display: none !important;
}

/* Benutzerprofil: Organisationen-Tab getrennt von der Haupt-Organisationsübersicht */
.lhs-user-profile-organizations .media-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 232px) !important;
  gap: 16px !important;
  align-items: start !important;
  justify-content: start !important;
  margin: 0 !important;
  padding: 16px !important;
  list-style: none !important;
}

.lhs-user-profile-organizations .media-grid .media-item {
  float: none !important;
  width: 232px !important;
  height: 430px !important;
  min-height: 430px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

.lhs-user-profile-organizations .media-grid .media-image {
  width: 100% !important;
  height: 120px !important;
  object-fit: cover !important;
}

.lhs-user-profile-organizations .media-grid .media-heading {
  min-height: 62px !important;
}

.lhs-user-profile-organizations .media-grid .media-description {
  min-height: 116px !important;
  max-height: 116px !important;
  overflow: hidden !important;
}

.lhs-user-profile-organizations .media-grid br {
  display: none !important;
}

.lhs-user-profile-organizations .media-grid .count {
  display: block !important;
  margin-top: 6px !important;
}

/* Mobile Navigation: Hamburger-Menü sichtbar und stabil darstellen */
@media (max-width: 991.98px) {

  .masthead {
    position: relative !important;
    z-index: 20 !important;
  }

  .masthead .navbar {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
  }

  .masthead .logo img,
  .masthead img.custom-logo {
    max-width: 260px !important;
    height: auto !important;
  }

  .masthead .navbar-toggler {
    display: block !important;
    margin-left: auto !important;
    border: 1px solid rgba(0, 111, 174, 0.35) !important;
    background: rgba(255,255,255,0.92) !important;
    color: #000000 !important;
    padding: 10px 12px !important;
    border-radius: 6px !important;
  }

  .masthead .navbar-toggler .fa,
  .masthead .navbar-toggler span {
    color: #000000 !important;
  }

  .masthead .main-navbar {
    flex-basis: 100% !important;
    width: 100% !important;
    margin-top: 16px !important;
    background: #ffffff !important;
    border: 1px solid rgba(0, 111, 174, 0.18) !important;
    border-radius: 10px !important;
    box-shadow: 0 8px 24px rgba(0, 63, 92, 0.16) !important;
    padding: 14px !important;
  }

  .masthead .main-navbar.collapse:not(.show) {
    display: none !important;
  }

  .masthead .main-navbar.collapse.show,
  .masthead .main-navbar.collapsing {
    display: block !important;
  }

  .masthead .navbar-nav {
    display: block !important;
    width: 100% !important;
    margin: 0 0 14px 0 !important;
    padding: 0 !important;
  }

  .masthead .navbar-nav li {
    display: block !important;
    width: 100% !important;
    margin: 0 0 8px 0 !important;
  }

  .masthead .navbar-nav li a,
  .masthead .main-navbar a {
    display: block !important;
    width: 100% !important;
    padding: 12px 14px !important;
    background: #eaf6fb !important;
    color: #000000 !important;
    border-radius: 7px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
  }

  .masthead .navbar-nav li.active a,
  .masthead .navbar-nav li a:hover,
  .masthead .main-navbar a:hover {
    background: #0077b6 !important;
    color: #ffffff !important;
  }

  .masthead .site-search {
    display: flex !important;
    width: 100% !important;
    margin: 6px 0 0 0 !important;
  }

  .masthead .site-search input {
    width: 100% !important;
    min-width: 0 !important;
  }

  .masthead .site-search button {
    flex: 0 0 auto !important;
  }
}

/* Mobile Footer: Anordnung analog saarbruecken.de, Farben im LHS-Open-Data-Stil */
@media (max-width: 767.98px) {

  .lhs-footer {
    padding: 22px 18px 30px 18px !important;
    text-align: center !important;
  }

  .lhs-footer .container {
    width: 100% !important;
    max-width: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .lhs-footer-top,
  .lhs-footer-bottom {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 22px !important;
  }

  .lhs-footer-top {
    margin-bottom: 28px !important;
  }

  .lhs-share-title {
    text-align: left !important;
    width: 100% !important;
    font-size: 15px !important;
    margin-bottom: 16px !important;
  }

  .lhs-share-buttons {
    justify-content: flex-start !important;
    gap: 18px !important;
    width: 100% !important;
  }

  .lhs-share-btn {
    min-width: 44px !important;
    width: 44px !important;
    height: 44px !important;
    padding: 0 !important;
    justify-content: center !important;
    font-size: 0 !important;
    border-radius: 6px !important;
  }

  .lhs-share-btn::first-letter {
    font-size: 24px !important;
  }

  .lhs-share-actions {
    width: 100% !important;
    text-align: left !important;
    font-size: 16px !important;
  }

  .lhs-footer-bottom::before,
  .lhs-footer-right::before,
  .lhs-footer-right::after {
    content: "" !important;
    display: block !important;
    width: 38px !important;
    height: 4px !important;
    background: #003b49 !important;
    margin: 4px auto 22px auto !important;
  }

  .lhs-footer-right {
    order: 1 !important;
    text-align: center !important;
    width: 100% !important;
  }

  .lhs-footer-left {
    order: 2 !important;
    align-self: center !important;
    text-align: center !important;
    font-size: 15px !important;
    margin-top: 18px !important;
  }

  .lhs-footer-links {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    align-items: center !important;
    justify-content: center !important;
    margin-top: 0 !important;
    margin-bottom: 24px !important;
    font-size: 17px !important;
  }

  .lhs-social {
    margin-top: 0 !important;
    text-align: center !important;
  }

  .lhs-social strong {
    display: block !important;
    margin-bottom: 12px !important;
    font-size: 16px !important;
  }

  .lhs-social-icons {
    justify-content: center !important;
    gap: 18px !important;
    margin-top: 0 !important;
  }

  .lhs-social-icons img {
    width: 30px !important;
    height: 30px !important;
  }
}

/* Mobile Footer: Teilen-Buttons mit sichtbaren Symbolen */
@media (max-width: 767.98px) {
  .lhs-share-title {
    text-align: center !important;
  }

  .lhs-share-buttons {
    justify-content: center !important;
  }

  .lhs-share-btn {
    font-size: 0 !important;
    color: transparent !important;
    position: relative !important;
  }

  .lhs-share-btn.facebook::before {
    content: "f";
    font-size: 30px;
    color: #fff;
    font-weight: 700;
    line-height: 1;
  }

  .lhs-share-btn.twitter::before {
    content: "𝕏";
    font-size: 26px;
    color: #fff;
    font-weight: 700;
    line-height: 1;
  }

  .lhs-share-btn.pinterest::before {
    content: "p";
    font-size: 28px;
    color: #fff;
    font-weight: 700;
    line-height: 1;
  }

  .lhs-share-btn.mail::before {
    content: "✉";
    font-size: 24px;
    color: #fff;
    font-weight: 700;
    line-height: 1;
  }

  .lhs-share-actions {
    text-align: center !important;
  }
}

/* Share-Buttons: echte Icon-Darstellung */
.lhs-share-btn.whatsapp { background: #43b642; }

.lhs-share-btn i,
.lhs-share-btn strong {
  font-size: 20px !important;
  line-height: 1 !important;
  color: #fff !important;
}

@media (max-width: 767.98px) {
  .lhs-share-btn span {
    display: none !important;
  }

  .lhs-share-btn i,
  .lhs-share-btn strong {
    font-size: 26px !important;
  }

  .lhs-share-btn.mail i {
    font-size: 23px !important;
  }
}

/* Korrektur: alte mobile Pseudo-Icons deaktivieren */
@media (max-width: 767.98px) {
  .lhs-share-btn.facebook::before,
  .lhs-share-btn.twitter::before,
  .lhs-share-btn.whatsapp::before,
  .lhs-share-btn.pinterest::before,
  .lhs-share-btn.mail::before {
    content: none !important;
    display: none !important;
  }

  .lhs-share-btn {
    color: #ffffff !important;
    font-size: 0 !important;
  }

  .lhs-share-btn i,
  .lhs-share-btn strong {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #ffffff !important;
  }
}

/* Finale Korrektur Share-Buttons: keine FontAwesome-Brand-Glyphen */
.lhs-share-btn::before,
.lhs-share-btn::after {
  content: none !important;
  display: none !important;
}

.lhs-share-btn.whatsapp {
  background: #43b642 !important;
}

.lhs-share-btn .lhs-share-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #ffffff !important;
  font-size: 22px !important;
  line-height: 1 !important;
  font-weight: 700 !important;
}

.lhs-share-btn .lhs-share-label {
  color: #ffffff !important;
}

@media (max-width: 767.98px) {
  .lhs-share-btn .lhs-share-label {
    display: none !important;
  }

  .lhs-share-btn .lhs-share-icon {
    font-size: 28px !important;
  }

  .lhs-share-actions {
    text-align: center !important;
  }
}

/* Final: Share-Buttons mit stabilen SVG-Icons */
.lhs-share-btn::before,
.lhs-share-btn::after {
  content: none !important;
  display: none !important;
}

.lhs-share-btn svg {
  width: 22px !important;
  height: 22px !important;
  fill: #ffffff !important;
  display: block !important;
  flex: 0 0 auto !important;
}

.lhs-share-btn.whatsapp {
  background: #43b642 !important;
}

@media (max-width: 767.98px) {
  .lhs-share-btn span {
    display: none !important;
  }

  .lhs-share-btn svg {
    width: 28px !important;
    height: 28px !important;
  }
}

/* Mobile: Organisationen- und Gruppen-Karten nicht abschneiden */
@media (max-width: 767.98px) {
  #organization-search-form ~ .media-grid,
  #organization-search-form ~ * .media-grid,
  #group-search-form ~ .media-grid,
  #group-search-form ~ * .media-grid {
    display: block !important;
    width: 100% !important;
    padding: 0 !important;
  }

  #organization-search-form ~ .media-grid .media-item,
  #organization-search-form ~ * .media-grid .media-item,
  #group-search-form ~ .media-grid .media-item,
  #group-search-form ~ * .media-grid .media-item {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    padding: 18px !important;
    margin: 0 0 18px 0 !important;
    box-sizing: border-box !important;
  }

  #organization-search-form ~ .media-grid .media-image,
  #organization-search-form ~ * .media-grid .media-image,
  #group-search-form ~ .media-grid .media-image,
  #group-search-form ~ * .media-grid .media-image {
    display: block !important;
    width: 100% !important;
    max-width: 190px !important;
    height: auto !important;
    margin: 0 0 14px 0 !important;
    object-fit: contain !important;
  }

  #organization-search-form ~ .media-grid .media-heading,
  #organization-search-form ~ * .media-grid .media-heading,
  #group-search-form ~ .media-grid .media-heading,
  #group-search-form ~ * .media-grid .media-heading {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 0 !important;
    white-space: normal !important;
    overflow: visible !important;
    word-break: normal !important;
    overflow-wrap: anywhere !important;
    line-height: 1.25 !important;
  }

  #organization-search-form ~ .media-grid .media-description,
  #organization-search-form ~ * .media-grid .media-description,
  #group-search-form ~ .media-grid .media-description,
  #group-search-form ~ * .media-grid .media-description {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    white-space: normal !important;
    overflow: visible !important;
    overflow-wrap: anywhere !important;
  }
}

/* Kontaktformular Open Data */
.lhs-contact-page,
.lhs-contact-thanks {
  max-width: 900px;
}

.lhs-contact-page h1,
.lhs-contact-thanks h1 {
  color: #000000;
  margin-bottom: 0.6em;
}

.lhs-contact-page .lead {
  font-size: 1.18em;
  color: #000000;
  margin-bottom: 1em;
}

.lhs-contact-form {
  margin-top: 2em;
  background: #f7fbfd;
  border: 1px solid #cfe3ef;
  border-radius: 8px;
  padding: 24px;
}

.lhs-contact-form label {
  font-weight: 700;
  color: #000000;
}

.lhs-contact-form .required {
  color: #b00020;
}

.lhs-contact-form textarea {
  resize: vertical;
}

.lhs-captcha {
  background: #ffffff;
  border-left: 4px solid #0076b6;
  padding: 14px 18px;
  margin-top: 1.5em;
}

#contact-counter {
  float: right;
  font-weight: 700;
}

/* YAML Check */

.lhs-yaml-check-page {
  max-width: 1100px;
}

.lhs-yaml-status-box {
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 24px;
}

.yaml-success {
  background: #eaf7ea;
  border: 2px solid #3f9b45;
}

.yaml-error {
  background: #fff0f0;
  border: 2px solid #c53a3a;
}

.lhs-yaml-item {
  padding: 18px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.yaml-item-error {
  background: #fff4f4;
  border-left: 6px solid #c53a3a;
}

.yaml-item-warning {
  background: #fffbe9;
  border-left: 6px solid #c99800;
}

.lhs-yaml-item pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: #ffffff;
  padding: 12px;
  border-radius: 4px;
}

.yaml-running {
  background: #e6f7ff;
  border: 2px solid #0076b6;
}

/* YAML-Typen */

.lhs-yaml-table td,
.lhs-yaml-table th {
  vertical-align: middle;
}

.lhs-yaml-type {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 600;
}

.lhs-yaml-type-zentrale-konfiguration {
  background: #ddefff;
  color: #005b9a;
}

.lhs-yaml-type-organisation {
  background: #efe4ff;
  color: #5c2e91;
}

.lhs-yaml-type-datensatz {
  background: #e7f8e7;
  color: #237a23;
}

.lhs-yaml-item h3 {
  margin-top: 0;
}

.lhs-yaml-item p {
  margin-bottom: 10px;
}


/* Datensätze dürfen nur über den YAML-Editor angelegt werden */
.page_primary_action a[href="/dataset/new"] {
    display: none !important;
}


/* Bearbeitung nur auf Datensatz-Seiten ausblenden; Organisationen/Gruppen bleiben bearbeitbar */
body.package .page-header .content_action,
body.dataset .page-header .content_action {
    display: none !important;
}

/* Split Header Logos: LHS links, OpenData rechts */
.masthead .logo.lhs-header-left-logo {
  flex: 0 0 auto !important;
  height: 130px !important;
  display: flex !important;
  align-items: center !important;
  margin-right: 34px !important;
}

.masthead img.lhs-logo-left {
  height: 98px !important;
  width: auto !important;
  max-height: 98px !important;
  display: block !important;
}

.masthead .main-navbar {
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

.masthead .lhs-header-nav-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 34px !important;
  width: 100% !important;
}

.masthead .lhs-header-main-navigation {
  flex: 1 1 auto !important;
  display: flex !important;
  justify-content: center !important;
}

.masthead .lhs-header-main-navigation .nav {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  margin: 0 !important;
}

.masthead .lhs-header-right-logo {
  flex: 0 0 auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  margin-left: 18px !important;
}

.masthead .lhs-header-right-logo img {
  height: 62px !important;
  width: auto !important;
  max-height: 62px !important;
  display: block !important;
}

@media (max-width: 991.98px) {
  .masthead .logo.lhs-header-left-logo {
    height: 130px !important;
    min-height: 130px !important;
    margin-right: 0 !important;
    display: flex !important;
    align-items: center !important;
  }

  .masthead img.lhs-logo-left {
    height: 72px !important;
    max-height: 72px !important;
  }

  .masthead .lhs-header-nav-row {
    display: block !important;
    width: 100% !important;
  }

  .masthead .lhs-header-main-navigation {
    display: block !important;
    width: 100% !important;
  }

  .masthead .lhs-header-main-navigation .nav {
    display: block !important;
    width: 100% !important;
  }

  .masthead .lhs-header-right-logo {
    justify-content: center !important;
    margin: 14px 0 4px 0 !important;
  }

  .masthead .lhs-header-right-logo img {
    height: 48px !important;
    max-height: 48px !important;
  }
}

/* Split Header Logos Feinjustierung: Suche vor OpenData-Logo, OpenData ganz rechts */
.masthead .main-navbar {
  display: flex !important;
  align-items: center !important;
  flex: 1 1 auto !important;
  gap: 24px !important;
}

.masthead .lhs-header-nav-row {
  display: contents !important;
}

.masthead .lhs-header-main-navigation {
  order: 1 !important;
  flex: 1 1 auto !important;
  justify-content: center !important;
}

.masthead .site-search {
  order: 2 !important;
  flex: 0 0 auto !important;
  margin: 0 !important;
}

.masthead .lhs-header-right-logo {
  order: 3 !important;
  flex: 0 0 auto !important;
  margin-left: 22px !important;
  margin-right: 0 !important;
}

.masthead .lhs-header-right-logo img {
  height: 62px !important;
  max-height: 62px !important;
  width: auto !important;
}

/* Header-Breite an Inhaltsraster ausrichten */
.masthead .container {
  max-width: 1180px !important;
  width: 100% !important;
}

.masthead .main-navbar {
  width: 100% !important;
}

.masthead .lhs-header-right-logo {
  margin-left: 18px !important;
  margin-right: 0 !important;
  transform: translateX(0) !important;
}

/* Header OpenData-Logo optisch an rechte Inhaltskante schieben */
.masthead .lhs-header-right-logo {
  transform: translateX(90px) !important;
}

/* Nur CKAN-Datensatz-Bearbeiten ausblenden; Organisationen/Gruppen/Ressourcen bleiben bearbeitbar */
.page-header .content_action a[href*="/dataset/edit/"] {
  display: none !important;
}

/* Datensatzdetail: Ressourcen-Aktionen klarer darstellen */
.resource-list .resource-item {
  position: relative !important;
  padding-right: 260px !important;
}

.resource-list .resource-item .lhs-resource-actions {
  position: absolute !important;
  right: 0 !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  display: flex !important;
  gap: 8px !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
}

.resource-list .resource-item .lhs-resource-actions .btn {
  white-space: nowrap !important;
  font-weight: 600 !important;
}

.resource-list .resource-item .lhs-resource-action-preview {
  background-color: #0077b6 !important;
  border-color: #0077b6 !important;
  color: #ffffff !important;
}

.resource-list .resource-item .lhs-resource-action-download {
  background-color: #ffffff !important;
  border-color: #b8d6e3 !important;
  color: #000000 !important;
}

.resource-list .resource-item .lhs-resource-admin-actions .btn {
  background-color: #eef6fa !important;
  border-color: #b8d6e3 !important;
  color: #000000 !important;
}

@media (max-width: 767.98px) {
  .resource-list .resource-item {
    padding-right: 0 !important;
  }

  .resource-list .resource-item .lhs-resource-actions {
    position: static !important;
    transform: none !important;
    margin-top: 12px !important;
    flex-wrap: wrap !important;
  }
}

/* Mobile Header: Burger-Position stabil halten */
@media (max-width: 991.98px) {
  .masthead .navbar {
    position: relative !important;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    width: 100% !important;
    flex: 1 1 100% !important;
  }

  .masthead .navbar-toggler {
    position: absolute !important;
    top: 20px !important;
    right: 0 !important;
    left: auto !important;
    z-index: 30 !important;
    margin: 0 !important;
  }

  .masthead .main-navbar {
    flex: 0 0 100% !important;
    width: 100% !important;
  }

  .masthead .main-navbar.collapse:not(.show) {
    display: none !important;
  }

  .masthead .main-navbar.collapse.show,
  .masthead .main-navbar.collapsing {
    display: block !important;
  }
}


/* Mobile OpenData-Logo zwischen LHS-Logo und Burger */
.lhs-header-mobile-right-logo {
  display: none !important;
}

@media (max-width: 991.98px) {
  .masthead .lhs-header-right-logo {
    display: none !important;
  }

  .masthead .lhs-header-mobile-right-logo {
    display: flex !important;
    position: absolute !important;
    top: 26px !important;
    right: 68px !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 25 !important;
  }

  .masthead .lhs-header-mobile-right-logo img {
    display: block !important;
    height: 52px !important;
    max-height: 52px !important;
    width: auto !important;
  }
}

/* Desktop-OpenData-Logo in der mobilen Navigation sicher ausblenden */
@media (max-width: 991.98px) {
  .masthead .main-navbar .lhs-header-right-logo {
    display: none !important;
  }
}

/* Header-Suche Desktop: kompakter an Menüleiste anpassen */
@media (min-width: 992px) {
  .masthead .site-search {
    align-items: center !important;
  }

  .masthead .site-search input#field-sitewide-search {
    height: 38px !important;
    min-height: 38px !important;
    padding: 6px 10px !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
    box-sizing: border-box !important;
  }

  .masthead .site-search button {
    width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
}

/* Datensatzseite: Überschrift über dem Filterbereich */
.lhs-dataset-filter-heading {
  width: 100% !important;
  padding: 13px 18px !important;
  margin: 0 !important;
  text-align: center !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  line-height: 1.3 !important;
  color: #000000 !important;
  background: #eef7fb !important;
  border-bottom: 1px solid #b7d9e8 !important;
  box-sizing: border-box !important;
}

/* Desktop-Header: mehr Freiraum unterhalb der Logos */
@media (min-width: 992px) {
  .masthead {
    height: 150px !important;
    min-height: 150px !important;
  }
}

/* =========================================================
   LHS BASIC AUTH SWITCH
========================================================= */

.account-masthead .lhs-basic-auth-switch,
.account-masthead .lhs-basic-auth-form {
  display: flex;
  align-items: stretch;
}

.account-masthead .lhs-basic-auth-form {
  margin: 0;
  padding: 0;
}

.account-masthead .lhs-basic-auth-toggle {
  display: flex;
  align-items: center;
  justify-content: center;

  min-width: 34px;

  margin: 0;
  padding: 0 10px;

  border: 0;
  background: transparent;

  color: inherit;
  font: inherit;

  cursor: pointer;
  line-height: inherit;
}

.account-masthead .lhs-basic-auth-toggle:hover,
.account-masthead .lhs-basic-auth-toggle:focus {
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

.account-masthead .lhs-basic-auth-toggle:disabled {
  cursor: not-allowed;
  opacity: 0.75;
}

.account-masthead .lhs-basic-auth-dot {
  font-size: 13px;
}

.account-masthead .lhs-basic-auth-dot.is-protected {
  color: #d9534f !important;
}

.account-masthead .lhs-basic-auth-dot.is-public {
  color: #2e8b57 !important;
}

/* Interner Sicherheitszustand: keine dritte Ampelfarbe anzeigen */
.account-masthead .lhs-basic-auth-dot.is-unknown {
  display: none !important;
}



/* ==========================================================
   LHS DATASET THEMENBEREICHE - GLEICHE KARTENHOEHE

   Gilt gezielt für die Themenbereich-Karten innerhalb der
   Datensatzansicht. Pro Zeile bestimmt die höchste Karte
   automatisch die Höhe aller Karten dieser Zeile.
   ========================================================== */

.primary .module-content form > .media-grid {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: stretch !important;
}

.primary .module-content form > .media-grid > .media-item {
  float: none !important;
  align-self: stretch !important;
}


/* ==========================================================
   LHS HEADER DESKTOP NOWRAP 20260828

   Desktop-Navigation stabil in einer Zeile halten.
   Mobile Navigation unter 992 px bleibt unverändert.
   ========================================================== */

@media (min-width: 992px) {

  .masthead .main-navbar {
    flex-wrap: nowrap !important;
    gap: 16px !important;
  }

  .masthead .lhs-header-main-navigation {
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }

  .masthead .lhs-header-main-navigation .nav {
    display: flex !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    gap: 2px !important;
  }

  .masthead .lhs-header-main-navigation .nav > li {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
  }

  .masthead .lhs-header-main-navigation .nav > li > a {
    white-space: nowrap !important;
  }

  .masthead .site-search {
    flex: 0 1 190px !important;
    width: 190px !important;
    min-width: 145px !important;
  }

  .masthead .site-search input#field-sitewide-search {
    width: 100% !important;
    min-width: 0 !important;
  }

  .masthead .logo.lhs-header-left-logo {
    margin-right: 22px !important;
  }

  .masthead .lhs-header-right-logo {
    margin-left: 12px !important;
  }
}


/*
 * Mittlere Desktopbreiten:
 * etwas kompakter, ohne Schriftgröße oder Logos zu verändern.
 */
@media (min-width: 992px) and (max-width: 1199.98px) {

  .masthead .main-navbar {
    gap: 10px !important;
  }

  .masthead .logo.lhs-header-left-logo {
    margin-right: 14px !important;
  }

  .masthead .lhs-header-main-navigation .nav {
    gap: 0 !important;
  }

  .masthead .lhs-header-main-navigation .nav > li > a {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  .masthead .site-search {
    flex-basis: 155px !important;
    width: 155px !important;
    min-width: 130px !important;
  }

  .masthead .lhs-header-right-logo {
    margin-left: 8px !important;
  }
}
