/* Top-menu Places catalogue (encyclopaedic place history — not profile visit Places) */

#places.bodySection,
#places.bodySection.visible {
  min-height: 100vh;
  min-height: 100dvh;
  --placesInk: #2c3340;
  --placesTeal: #5c9120;
  background:
    radial-gradient(ellipse 95% 55% at 50% 28%, rgba(232, 210, 175, 0.14) 0%, transparent 58%),
    radial-gradient(ellipse 125% 78% at 50% -12%, rgba(255, 255, 255, 0.92) 0%, transparent 52%),
    radial-gradient(ellipse 68% 44% at 92% 8%, rgba(255, 236, 214, 0.28) 0%, transparent 42%),
    linear-gradient(172deg, #fffefb 0%, #f7f4ee 42%, #eef3ef 70%, #e9e2d6 100%);
  color: var(--placesInk, #2c3340);
}

#places .placesCatalogueBrowse[hidden],
#places .placesCatalogueDetail[hidden] {
  display: none !important;
}

#places.is-detail .placesCatalogueBrowse {
  display: none !important;
}

#places.is-detail .placesCatalogueMapBlock {
  display: none;
}

#places.is-detail .placesCatalogueDetail {
  display: block !important;
}

.placesCataloguePage {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 2rem) clamp(0.85rem, 3vw, 1.5rem) 3rem;
  box-sizing: border-box;
}

#places .placesCatalogueHero,
.placesCatalogueHero {
  margin-bottom: 1.35rem;
  text-align: left;
  max-width: 42rem;
}

#places .placesCatalogueHeading,
.placesCatalogueHeading {
  margin: 0 0 0.45rem;
  font-family: "DM Sans", "Segoe UI", system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
  letter-spacing: 0.1em;
  line-height: 1.18;
  text-transform: uppercase;
  font-feature-settings: "kern" 1, "liga" 1;
  color: #2c3340 !important;
  -webkit-text-fill-color: #2c3340;
  text-shadow: none;
}

#places .placesCatalogueIntro,
.placesCatalogueIntro {
  margin: 0;
  width: 100%;
  max-width: 38em;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: clamp(0.98rem, 2vw, 1.12rem);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.45;
  color: #5c9120 !important;
  -webkit-text-fill-color: #5c9120;
}

.placesCatalogueMapBlock {
  margin: 0 0 1.1rem;
}

.placesCatalogueMap {
  width: 100%;
  height: min(52vh, 420px);
  min-height: 260px;
  border-radius: 12px;
  overflow: hidden;
  background:
    linear-gradient(160deg, #d7e8f2 0%, #eef4f0 45%, #f4efe6 100%);
  box-shadow: inset 0 0 0 1px rgba(40, 60, 50, 0.12);
}

.placesCatalogueMapFallback {
  margin: 0;
  padding: 1.25rem 1.4rem;
  color: #3d4a44;
  font-size: 0.95rem;
  line-height: 1.5;
}

.placesCatalogueMapHint {
  margin: 0.55rem 0 0;
  font-size: 0.9rem;
  color: rgba(31, 58, 46, 0.7);
}

.placesCatalogueToolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 0.85rem;
  align-items: center;
  margin: 1rem 0 0.75rem;
}

.placesCatalogueFilters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.placesCatalogueFilterBtn {
  appearance: none;
  border: 1px solid rgba(60, 90, 75, 0.22);
  background: rgba(255, 255, 255, 0.7);
  color: #2d4a3a;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
}

.placesCatalogueFilterBtn.is-active,
.placesCatalogueFilterBtn[aria-selected="true"] {
  background: #2d6a4f;
  border-color: #2d6a4f;
  color: #fff;
}

.placesCatalogueSearch {
  flex: 1 1 180px;
  min-width: 0;
  max-width: 280px;
  box-sizing: border-box;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(60, 90, 75, 0.28);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.85);
  font: inherit;
  font-size: 0.9rem;
  color: #1f3a2e;
}

.placesCatalogueStatus {
  min-height: 1.2em;
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  color: rgba(31, 58, 46, 0.7);
}

.placesCatalogueStatus.is-loading { color: #3a6b52; }
.placesCatalogueStatus.is-error { color: #8b3a3a; }
.placesCatalogueStatus.is-ok { color: #2d6a4f; }

.placesCatalogueGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: 0.85rem;
}

.placesCataloguePager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1rem;
  margin: 1.25rem 0 0.5rem;
}

.placesCataloguePager[hidden] {
  display: none !important;
}

.placesCataloguePagerLabel {
  font-size: 0.9rem;
  color: rgba(31, 58, 46, 0.78);
  min-width: 7rem;
  text-align: center;
}

.placesCataloguePagerBtn {
  appearance: none;
  border: 1px solid rgba(60, 90, 75, 0.28);
  background: rgba(255, 255, 255, 0.85);
  color: #2d4a3a;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.45rem 0.9rem;
  border-radius: 10px;
  cursor: pointer;
}

.placesCataloguePagerBtn:hover:not(:disabled),
.placesCataloguePagerBtn:focus-visible:not(:disabled) {
  border-color: #2d6a4f;
  color: #2d6a4f;
  outline: none;
}

.placesCataloguePagerBtn:disabled {
  opacity: 0.45;
  cursor: default;
}

.placesCatalogueCard {
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: 0;
  border: 1px solid rgba(60, 90, 75, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  overflow: hidden;
  cursor: pointer;
  font: inherit;
  color: inherit;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.placesCatalogueCard:hover,
.placesCatalogueCard:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(30, 60, 45, 0.12);
  outline: none;
}

.placesCatalogueCardMedia {
  display: block;
  aspect-ratio: 16 / 10;
  background: rgba(90, 130, 110, 0.1);
  overflow: hidden;
}

.placesCatalogueCardImg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.placesCatalogueCardImgPlaceholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(45, 106, 79, 0.45);
  font-size: 1.75rem;
}

.placesCatalogueCardBody {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.7rem 0.8rem 0.85rem;
}

.placesCatalogueCardLevel {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #3a6b52;
}

.placesCatalogueCardTitle {
  font-size: 1rem;
  line-height: 1.25;
  color: #173328;
}

.placesCatalogueCardPreview {
  font-size: 0.8rem;
  line-height: 1.4;
  color: rgba(31, 58, 46, 0.72);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.placesCatalogueEmpty {
  margin: 1.5rem 0;
  padding: 1.25rem;
  text-align: center;
  color: rgba(31, 58, 46, 0.7);
  background: rgba(255, 255, 255, 0.55);
  border-radius: 12px;
}

.placesCatalogueDetail {
  animation: placesCatalogueIn 0.28s ease both;
}

@keyframes placesCatalogueIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.placesCatalogueDetailBar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  margin: 0 0 1rem;
  padding: 0.65rem 0.15rem 0.75rem;
  background: linear-gradient(180deg, rgba(247, 244, 238, 0.97) 60%, rgba(247, 244, 238, 0.82) 100%);
  border-bottom: 1px solid rgba(60, 90, 75, 0.12);
}

.placesCatalogueCrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.45rem;
  min-width: 0;
  font-size: 0.92rem;
}

.placesCatalogueCrumbLink {
  appearance: none;
  border: 0;
  background: transparent;
  color: #2d6a4f;
  font: inherit;
  font-weight: 700;
  padding: 0.15rem 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.placesCatalogueCrumbLink:hover,
.placesCatalogueCrumbLink:focus-visible {
  color: #1b4332;
  outline: none;
}

.placesCatalogueCrumbSep {
  color: rgba(40, 60, 50, 0.45);
  font-weight: 600;
}

.placesCatalogueCrumbCurrent {
  color: #173328;
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: min(52vw, 28rem);
}

.placesCatalogueBackBtn {
  appearance: none;
  border: 1px solid rgba(60, 90, 75, 0.28);
  background: rgba(255, 255, 255, 0.92);
  color: #2d4a3a;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.45rem 0.85rem;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
}

.placesCatalogueBackBtn:hover,
.placesCatalogueBackBtn:focus-visible {
  border-color: #2d6a4f;
  color: #2d6a4f;
  outline: none;
}

.placesCatalogueDetailFooter {
  margin: 1.5rem 0 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(60, 90, 75, 0.14);
}

.placesCatalogueDetailTitle {
  margin: 0 0 0.75rem;
  font-family: "DM Sans", "Segoe UI", system-ui, sans-serif;
  font-size: clamp(1.25rem, 2.8vw, 1.55rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #2c3340 !important;
  -webkit-text-fill-color: #2c3340;
}

.placesCatalogueDetailLevel {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #3a6b52;
}

.placesCatalogueHeroImgWrap {
  margin: 0 0 1rem;
  width: 100%;
  border-radius: 0;
  overflow: hidden;
  max-height: min(42vh, 420px);
  background: rgba(90, 130, 110, 0.1);
}

.placesCatalogueHeroImg {
  width: 100%;
  height: 100%;
  max-height: min(42vh, 420px);
  object-fit: cover;
  display: block;
}

.placesCatalogueGallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.45rem;
  margin: 0 0 1rem;
  width: 100%;
}

.placesCatalogueGalleryItem {
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(90, 130, 110, 0.1);
}

.placesCatalogueGalleryItem img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.placesCatalogueDetailExtract {
  margin: 0 0 1.25rem;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  font-size: 1.05rem;
  line-height: 1.7;
  color: #24352c;
}

.placesCatalogueDetailBody {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

.placesCatalogueCiteList {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  width: 100%;
  font-size: 0.82rem;
  color: rgba(40, 60, 50, 0.72);
}

.placesCatalogueCiteList a {
  color: #2d6a4f;
}

.placesCatalogueDetailEmpty,
.placesCatalogueDetailLoading {
  margin: 1rem 0;
  color: rgba(31, 58, 46, 0.72);
}

.placesCatalogueDetailActions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.placesCatalogueBtn {
  appearance: none;
  border: 1px solid rgba(60, 90, 75, 0.28);
  background: rgba(255, 255, 255, 0.85);
  color: #2d4a3a;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.55rem 0.9rem;
  border-radius: 10px;
  cursor: pointer;
}

.placesCatalogueBtnPrimary {
  background: #2d6a4f;
  border-color: #2d6a4f;
  color: #fff;
}

.placesCatalogueBtnDanger {
  background: transparent;
  border-color: rgba(139, 58, 58, 0.45);
  color: #8b3a3a;
}

.placesCatalogueBtnDanger:hover,
.placesCatalogueBtnDanger:focus-visible {
  background: rgba(139, 58, 58, 0.08);
  border-color: #8b3a3a;
  color: #8b3a3a;
  outline: none;
}

.placesCatalogueKeptNote {
  font-size: 0.85rem;
  font-weight: 600;
  color: #2d6a4f;
}

.placesCatalogueLoginHint {
  margin: 0;
  flex: 1 1 100%;
  font-size: 0.85rem;
  color: rgba(31, 58, 46, 0.7);
}

/* Link-out chips on profile Places */
.memoryPlaceExploreLink {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.45rem;
  padding: 0.28rem 0.55rem;
  border: 1px solid rgba(60, 90, 75, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #2d6a4f;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.memoryPlaceExploreLink:hover,
.memoryPlaceExploreLink:focus-visible {
  background: rgba(45, 106, 79, 0.1);
  outline: none;
}

.memoryCountriesExploreRow {
  margin: 0.35rem 0 0.85rem;
}

.memoryCountriesExploreBtn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  appearance: none;
  border: 1px solid rgba(60, 90, 75, 0.28);
  background: rgba(255, 255, 255, 0.88);
  color: #2d6a4f;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 650;
  padding: 0.5rem 0.85rem;
  border-radius: 10px;
  cursor: pointer;
}

.memoryCountriesExploreBtn:hover,
.memoryCountriesExploreBtn:focus-visible {
  background: rgba(45, 106, 79, 0.1);
  outline: none;
}

@media (max-width: 767px) {
  .placesCataloguePage {
    padding: 0.85rem 0.75rem 2.5rem;
  }

  .placesCatalogueMap {
    height: min(42vh, 320px);
    min-height: 220px;
  }

  .placesCatalogueToolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .placesCatalogueSearch {
    max-width: none;
  }

  .placesCatalogueFilters {
    width: 100%;
  }

  .placesCatalogueFilterBtn {
    flex: 1 1 auto;
    text-align: center;
  }

  .placesCatalogueGrid {
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
  }

  .placesCatalogueCardPreview {
    -webkit-line-clamp: 2;
  }

  .placesCatalogueGallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .placesCatalogueHeroImgWrap,
  .placesCatalogueHeroImg {
    max-height: 200px;
  }
}

@media (max-width: 420px) {
  .placesCatalogueGrid {
    grid-template-columns: 1fr;
  }
}

/* Slightly tighter top-menu icons when Places is present (6 items) */
@media screen and (max-width: 767px) {
  .menu img[alt="Places"],
  .menu a[data-section="places"] img {
    max-height: 26px;
    height: 26px;
    width: 26px;
  }
}
