html, body {
  overflow-x: hidden;
}

body {
  padding: 0;
  margin: 0;
  background: #f7f8fa;
  color: #1f2937;
}

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

img {
  max-width: 100%;
}

.site-wrap {
  padding: 24px;
}

.top-nav {
  border-radius: 0 !important;
  margin: 0 !important;
  width: 100%;
  overflow-x: hidden;
}

.top-nav .ui.container {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 4px;
  padding-bottom: 4px;
}

.top-nav .header.item {
  min-width: 0;
  white-space: normal;
}

.top-nav .right.menu {
  margin-left: auto !important;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.top-nav .item {
  white-space: nowrap;
}

.hero {
  background: linear-gradient(135deg, #1b1c1d 0%, #2d3142 100%);
  color: #fff;
  padding: 54px 0 42px 0;
  margin-bottom: 30px;
}

.hero .subtext {
  opacity: .92;
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 920px;
}

.hero-card {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  padding: 22px;
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 30px rgba(0,0,0,.15);
  width: 100%;
  max-width: 100%;
  overflow: visible;
}

.search-box form,
.search-box .ui.action.input,
.search-box .ui.action.input input {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

.search-box .ui.action.input {
  display: flex !important;
}

.search-box .ui.action.input input {
  flex: 1 1 auto !important;
}

.search-box .ui.action.input .button {
  flex: 0 0 auto !important;
}

.search-box .ui.action.input input {
  border-top-left-radius: 10px !important;
  border-bottom-left-radius: 10px !important;
}

.search-box .ui.action.input .button {
  border-top-right-radius: 10px !important;
  border-bottom-right-radius: 10px !important;
}
.search-box {
  overflow: visible !important;
}
.stats-bar {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.stats-pill {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.15);
  color: #fff;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: .95rem;
}

.gallery-section {
  margin-top: 6px;
}

.thumb {
  cursor: pointer;
  overflow: hidden;
  border-radius: 14px;
  background: #eaecef;
  box-shadow: 0 8px 22px rgba(0,0,0,.06);
}

.thumb img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform .15s ease;
  display: block;
}

.thumb:hover img {
  transform: scale(1.04);
}

.gallery-card {
  background: #fff;
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
  height: 100%;
}

.name-under {
  text-align: center;
  margin-top: 10px;
  font-size: .98em;
  opacity: .88;
  word-break: break-word;
  min-height: 24px;
}

#modalImage {
  max-width: 100%;
  max-height: 75vh;
  display: block;
  margin: 0 auto;
  border-radius: 12px;
}

.counter {
  text-align: center;
  margin-top: 10px;
  font-size: .95em;
  opacity: .75;
}

.lb-controls {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}

.page-counter {
  text-align: center;
  margin-top: 18px;
  opacity: .75;
}

.footer {
  margin-top: 50px;
  background: #1b1c1d;
  color: rgba(255,255,255,.88);
  padding: 36px 0 26px 0;
}

.footer h4,
.footer h5 {
  color: #fff;
}

.footer a {
  color: rgba(255,255,255,.88);
}

.footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-meta {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: .95rem;
  opacity: .9;
}

@media (max-width: 991px) {
  .top-nav .ui.container {
    flex-direction: column;
    align-items: stretch;
  }

  .top-nav .header.item {
    justify-content: center;
    text-align: center;
  }

  .top-nav .right.menu {
    width: 100%;
    margin-left: 0 !important;
    justify-content: center;
  }
}

@media (max-width: 767px) {
  .site-wrap {
    padding: 14px;
  }

  .hero {
    padding: 30px 0 24px 0;
    margin-bottom: 20px;
  }

  .hero .ui.grid > .column {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
  }

  .hero h1.ui.header {
    font-size: 1.9rem !important;
    line-height: 1.2;
  }

  .hero .subtext {
    font-size: .98rem;
    line-height: 1.55;
  }

  .hero-card {
    padding: 14px;
    border-radius: 14px;
  }

  .stats-bar {
    gap: 8px;
  }

  .stats-pill {
    font-size: .88rem;
    padding: 8px 12px;
  }

  .search-box .ui.action.input {
    width: 100% !important;
  }

  .ui.stackable.four.column.grid.gallery-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    margin-left: -6px !important;
    margin-right: -6px !important;
  }

  .ui.stackable.four.column.grid.gallery-grid > .column {
    display: block !important;
    width: 50% !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
    padding-top: 6px !important;
    padding-bottom: 6px !important;
  }

  .gallery-card {
    padding: 8px;
    border-radius: 12px;
  }

  .thumb {
    border-radius: 10px;
  }

  .thumb img {
    height: 210px;
  }

  .name-under {
    margin-top: 8px;
    font-size: .9em;
    min-height: 20px;
  }

  .lb-controls {
    flex-direction: column;
  }

  .lb-controls .ui.button {
    width: 100%;
  }

  .pagination-wrapper {
    overflow-x: hidden;
  }

  .ui.pagination.menu {
    display: flex;
    justify-content: center;
    flex-wrap: nowrap;
  }

  .ui.pagination.menu .page-num {
    display: none;
  }

  .ui.pagination.menu .page-num.active {
    display: inline-flex;
  }
}

@media (max-width: 420px) {
  .site-wrap {
    padding: 10px;
  }

  .thumb img {
    height: 185px;
  }

  .top-nav .right.menu .item {
    padding-left: .75em !important;
    padding-right: .75em !important;
    font-size: .92rem;
  }
}




.hero-filter-form {
  width: 100%;
}

.hero-filter-line {
  margin-bottom: 10px;
}

.hero-search-input,
.hero-filter-sort-line {
  width: 100%;
}

.hero-search-input {
  display: flex !important;
  align-items: stretch !important;
}

.hero-filter-sort-line {
  display: flex;
  align-items: stretch;
  gap: 0;
}

/* EXAKT gleiche Höhe für beide Leisten */
.hero-search-input input,
.hero-search-input .hero-filter-btn,
.hero-filter-select .ui.dropdown,
.hero-filter-btn {
  height: 46px !important;
  min-height: 46px !important;
  box-sizing: border-box;
}

/* Suchleiste */
.hero-search-input input {
  border-top-left-radius: 10px !important;
  border-bottom-left-radius: 10px !important;
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

/* Gemeinsame Button-Optik */
.hero-filter-btn {
  width: 58px !important;
  min-width: 58px !important;
  max-width: 58px !important;
  margin: 0 !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
  border-top-right-radius: 10px !important;
  border-bottom-right-radius: 10px !important;
}

/* Sort-Zeile */
.hero-filter-select {
  flex: 1 1 auto;
  min-width: 0;
}

.hero-filter-select .ui.dropdown {
  width: 100% !important;
  border-top-left-radius: 10px !important;
  border-bottom-left-radius: 10px !important;
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  display: flex !important;
  align-items: center !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  padding-left: 1em !important;
  padding-right: 2.5em !important;
}

/* Text im Dropdown vertikal sauber mittig */
.hero-filter-select .ui.dropdown > .text,
.hero-filter-select .ui.dropdown > .default.text {
  line-height: normal !important;
}

/* Icon im Dropdown richtig mittig */
.hero-filter-select .ui.dropdown > .dropdown.icon {
  top: 50% !important;
  transform: translateY(-50%) !important;
  margin-top: 0 !important;
}

/* Reset */
.hero-filter-reset {
  text-align: right;
  margin-top: 6px;
}

@media (max-width: 767px) {
  .hero-search-input input,
  .hero-search-input .hero-filter-btn,
  .hero-filter-select .ui.dropdown,
  .hero-filter-btn {
    height: 44px !important;
    min-height: 44px !important;
  }

  .hero-filter-btn {
    width: 54px !important;
    min-width: 54px !important;
    max-width: 54px !important;
  }
}


@media (max-width: 767px) {
  .hero-filter-form .hero-filter-line {
    margin-bottom: 10px;
  }

  .hero-filter-form .hero-search-input input,
  .hero-filter-form .hero-search-input .hero-filter-btn,
  .hero-filter-form .hero-filter-select .ui.dropdown,
  .hero-filter-form .hero-filter-btn {
    height: 44px !important;
    min-height: 44px !important;
  }

  /* Suchzeile bleibt kompakt */
  .hero-filter-form .hero-search-input {
    display: flex !important;
    width: 100%;
  }

  .hero-filter-form .hero-search-input input {
    flex: 1 1 auto;
    min-width: 0;
  }

  .hero-filter-form .hero-search-input .hero-filter-btn {
    width: 52px !important;
    min-width: 52px !important;
    max-width: 52px !important;
  }

  /* Sortierung mobil untereinander */
  .hero-filter-form .hero-filter-sort-line {
    display: block !important;
  }

  .hero-filter-form .hero-filter-select {
    width: 100%;
    margin-bottom: 8px;
  }

  .hero-filter-form .hero-filter-select .ui.dropdown {
    width: 100% !important;
    border-radius: 10px !important;
  }

  .hero-filter-form .hero-filter-sort-line .hero-filter-btn {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    border-radius: 10px !important;
  }

  .hero-filter-form .hero-filter-reset {
    text-align: center;
    margin-top: 8px;
  }
}

.lb-title {
  text-align: center;
  margin-top: 8px;
  font-weight: 600;
  font-size: 1rem;
  opacity: .9;
}