body {
  font-family: "Kiwi Maru", serif;
  background-color: #FFF;
  background-image: url('../img/011-subtle-light-patterns.jpg');
  background-repeat: repeat;
  width: 100%;
  height: 100vh;
  position: relative;
}

header .h3 {
  font-size: 1.5rem;
}

.header-panel {
  position: relative;
}

.header-menu-toggle {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 3rem;
  height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
}

.search-area .form-control {
  font-size: 1rem;

}
#world-name-filter.form-control {
  padding: .275rem .75rem .475rem .75rem;

}

.search-area .form-control::placeholder {
  font-size: 0.8rem !important;
  color:  rgba(0, 0, 0, 0.4)
}


.search-area .tagify {
  font-size: 0.8rem;
}

.search-area .search-field {
  margin-bottom: 0.75rem;
}

.list-sort-bar .list-sort-select {
  max-width: 27rem;
  min-width: 18rem;
  width: auto;
  font-size: 0.9rem;
}

.back-to-top-btn {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1030;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.back-to-top-btn:focus-visible {
  outline: 2px solid #0d6efd;
  outline-offset: 2px;
}

@media screen and (max-width: 459px) {
  .back-to-top-btn {
    right: 0.75rem;
    bottom: 0.75rem;
    width: 2.5rem;
    height: 2.5rem;
  }
}

main,
.list-sort-bar {
  display: grid;
  gap: 15px;
  grid-template-columns: repeat(auto-fill, calc(16.66% - 50px));
  justify-content: center;
}

main {
  grid-template-rows: masonry;
  grid-auto-flow: row;
}

.list-sort-bar-row {
  grid-column: 1 / -1;
}

.list-sort-bar-row > .list-sort-controls {
  width: 100%;
}

.world-list-sentinel {
  grid-column: 1 / -1;
  width: 100%;
  height: 4px;
  margin: 0;
  padding: 0;
  pointer-events: none;
}

.world-list-more-hint {
  grid-column: 1 / -1;
  width: 100%;
}

.world-item {
  width: 100%;
  padding: 10px;
  cursor: pointer;
  background-color: #FFFFFF;
  border-radius: 5px;
  box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.2);
  border: 1px solid #E0E0E0;
}

.world-item .btn {
  font-size: 0.8rem;
}
.world-item .badge {
  font-size: 0.7rem;
}
.world-item-image {
  width: 100%;
  position: relative;
}

.world-item-image img {
  width: 100%;
  height: auto;
  display: block;
}

.world-item-thumb--clickable {
  cursor: pointer;
}

.world-item .world-item-gallery-btn {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.28rem 0.48rem;
  min-height: 1.85rem;
  font-size: 0.72rem;
  line-height: 1;
  border-radius: 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.32);
  opacity: 0.92;
}

.world-item .world-item-gallery-btn:hover {
  opacity: 1;
}

.world-item .world-item-gallery-btn .fa-images {
  font-size: 0.95rem;
}

.world-item-gallery-btn-count {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  min-width: 1em;
  text-align: center;
}

.world-item-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  color: #FFFFFF;
  padding: 7px 5px;
}

.world-item-badges-categories,
.world-item-badges-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-width: 100%;
}


footer {
  width: 100%;
  padding-top: 20px;
  color: #222;
}

/* Image gallery modal (light theme) */
.vr-gallery-modal {
  background-color: #fff;
  color: #212529;
  border: 1px solid #dee2e6;
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.08);
}

/* Fit entire modal within viewport height (short screens / landscape phones) */
.vr-gallery-modal-dialog {
  max-height: calc(100vh - 1rem);
  max-height: calc(100dvh - 1rem);
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: stretch;
}

.vr-gallery-modal-dialog .modal-content {
  max-height: calc(100vh - 1rem);
  max-height: calc(100dvh - 1rem);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1 1 auto;
  min-height: 0;
}

.vr-gallery-modal-dialog .modal-header,
.vr-gallery-modal-dialog .modal-footer {
  flex-shrink: 0;
}

.vr-gallery-modal-dialog .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.vr-gallery-modal-dialog .modal-body > .position-relative {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.vr-gallery-modal-dialog .gallery-main {
  flex: 1 1 auto;
  min-height: 0;
}

.vr-gallery-modal-dialog .gallery-main-img {
  max-height: 100%;
  max-width: 100%;
}

.vr-gallery-modal-dialog .modal-body > .gallery-thumbs-wrap {
  flex-shrink: 0;
}

@media screen and (max-height: 560px) {
  .vr-gallery-modal-dialog .gallery-main {
    padding: 0.45rem 2.25rem;
  }

  .vr-gallery-modal-dialog .modal-header {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }

  .vr-gallery-modal-dialog .modal-footer {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }

  .vr-gallery-modal-dialog .gallery-thumbs-wrap {
    padding: 0.45rem 0.35rem;
  }
}

.vr-gallery-modal .modal-header {
  background-color: #fafafa;
  border-bottom-color: #dee2e6;
}

.vr-gallery-modal-footer {
  background-color: #fafafa;
  border-top-color: #dee2e6;
}

.gallery-main {
  min-height: 42vh;
  background: #fafafa;
  padding: 1rem 3.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-main-img {
  max-width: 100%;
  max-height: min(72vh, 900px);
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Full-height tap targets; circle is visual only */
.gallery-nav-hit {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  width: min(4.75rem, 26vw);
  min-width: 3.25rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.15s ease;
}

.gallery-nav-hit--prev {
  left: 0;
  justify-content: flex-start;
  padding-left: 0.35rem;
}

.gallery-nav-hit--next {
  right: 0;
  justify-content: flex-end;
  padding-right: 0.35rem;
}

.gallery-nav-hit:hover {
  background-color: rgba(0, 0, 0, 0.04);
}

.gallery-nav-hit:focus {
  outline: none;
}

.gallery-nav-hit:focus-visible .gallery-nav-face {
  outline: 2px solid #0d6efd;
  outline-offset: 2px;
}

.gallery-nav-face {
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid #dee2e6;
  background-color: #fff;
  color: #343a40;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  opacity: 0.95;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.gallery-nav-hit:hover .gallery-nav-face {
  opacity: 1;
  background-color: #f8f9fa;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
}

.gallery-thumbs-wrap {
  display: flex;
  align-items: stretch;
  gap: 0.35rem;
  background: #f8f9fa;
  border-top: 1px solid #e9ecef;
  padding: 0.65rem 0.5rem;
}

.gallery-thumbs-column {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.gallery-thumbs-page-btn {
  flex: 0 0 auto;
  align-self: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid #dee2e6;
  border-radius: 50%;
  background-color: #fff;
  color: #495057;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}

.gallery-thumbs-page-btn:hover:not(:disabled) {
  background-color: #f8f9fa;
}

.gallery-thumbs-page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.gallery-thumbs-page-indicator {
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.gallery-thumbs {
  display: flex;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0.5rem;
  overflow: hidden;
}

.gallery-thumb {
  flex: 0 0 auto;
  width: 76px;
  height: 56px;
  padding: 0;
  border: 2px solid #e9ecef;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  opacity: 0.88;
  transition: opacity 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.gallery-thumb:hover {
  opacity: 1;
  border-color: #ced4da;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.gallery-thumb.active {
  border-color: #0d6efd;
  opacity: 1;
  box-shadow: 0 0 0 1px rgba(13, 110, 253, 0.25);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media screen and (max-width: 991px) {
  .gallery-main {
    padding: 1rem 3.35rem;
    min-height: 36vh;
  }

  .gallery-main-img {
    max-height: min(62vh, 720px);
  }

  .gallery-nav-face {
    width: 2.35rem;
    height: 2.35rem;
  }

  .gallery-nav-hit {
    width: min(4.25rem, 30vw);
    min-width: 3rem;
  }
}

@media screen and (max-width: 1899px) {
	main,
  .list-sort-bar {
    grid-template-columns: repeat(auto-fill, calc(20% - 40px));
    gap: 15px;
  }
}


@media screen and (min-width: 1079px) {
  .search-area {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
  }

  .search-area .search-field {
    margin-bottom: 0;
  }
}

@media screen and (max-width: 1279px) {
	main,
  .list-sort-bar {
    grid-template-columns: repeat(auto-fill, calc(25% - 30px));
    gap: 10px;
  }
}
@media screen and (max-width: 991px) {
	main,
  .list-sort-bar {
    grid-template-columns: repeat(auto-fill, calc(33.33% - 20px));
    gap: 10px;
  }
}

@media screen and (max-width: 767px) {
	main,
  .list-sort-bar {
    grid-template-columns: repeat(auto-fill, calc(50% - 10px));
    gap: 10px;
  }

  .list-sort-bar .list-sort-controls {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 0.5rem;
  }

  .list-sort-bar .list-sort-select {
    width: 100%;
    max-width: none;
    min-width: 0;
  }
}

@media screen and (max-width: 459px) {
	main,
  .list-sort-bar {
    grid-template-columns: repeat(auto-fill, 100%);
    gap: 10px;
  }
  header .h3 {
    font-size: 1.25rem;
    padding-right: 3rem;
  }

  /* .header-menu-toggle {
    top: 1.25rem;
    top: 1.25rem;
    width: 2.5rem;
    height: 2.5rem;

  } */
}