.layout-photo-map {
  background: #0f1418;
}

.layout-photo-map .site-inner {
  float: none;
  max-width: none;
  width: 100%;
  background: #0f1418;
}

.layout-photo-map .photo-map-main {
  min-height: calc(100vh - 90px);
  padding-top: 90px;
}

.layout-photo-map .photo-map-content {
  min-height: calc(100vh - 90px);
}

.photo-map-intro {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 500;
  max-width: min(520px, calc(100% - 2rem));
  padding: 1rem 1.1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(8px);
}

.photo-map-intro p {
  margin: 0;
  color: #24313a;
  line-height: 1.55;
}

.photo-map-intro p + p {
  margin-top: 0.55rem;
}

.photo-map-shell {
  position: relative;
  min-height: calc(100vh - 90px);
  margin: 0;
  background: #0f1418;
}

.photo-map-canvas {
  height: calc(100vh - 90px);
  min-height: 620px;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  border: 0;
}

.photo-map-marker {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  border: 3px solid #fff;
  background-size: cover;
  background-position: center;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.photo-map-marker:hover,
.photo-map-marker.is-active {
  transform: scale(1.14);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.36);
}

.photo-map-cluster {
  position: relative;
  width: 66px;
  height: 66px;
  border-radius: 20px;
  border: 3px solid rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
  background: #dbe6ee;
}

.photo-map-cluster-previews {
  display: grid;
  width: 100%;
  height: 100%;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  overflow: hidden;
  border-radius: 17px;
}

.photo-map-cluster-size-1 .photo-map-cluster-previews {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
}

.photo-map-cluster-size-2 .photo-map-cluster-previews {
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: 1fr;
}

.photo-map-cluster-size-3 .photo-map-cluster-previews {
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
}

.photo-map-cluster-preview {
  display: block;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.photo-map-cluster-count {
  position: absolute;
  right: -5px;
  bottom: -5px;
  min-width: 27px;
  height: 27px;
  padding: 0 0.45rem;
  border-radius: 999px;
  background: #18252e;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.28);
}

.photo-map-post-marker {
  position: relative;
  width: 33px;
  height: 33px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  border: 2px solid #fff;
  background: #e86d24;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
}

.photo-map-post-marker::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
}

.photo-map-post-popup {
  max-width: 260px;
}

.photo-map-post-popup img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  border-radius: 10px;
  margin-bottom: 0.7rem;
}

.photo-map-post-popup h3 {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.35;
}

.photo-map-post-popup h3 a {
  color: #1f2d36;
}

.photo-map-post-popup a {
  font-weight: 700;
}

.photo-map-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0.85rem 0 0;
}

.photo-map-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: #f3f5f7;
  color: #2d3b45;
  font-size: 0.92rem;
}

.has-photo-map.layout-post:not(.home) .site-inner {
  float: left;
  width: 50%;
}

.has-photo-map.layout-post .photo-map-entry-media {
  left: auto;
  right: 0;
  width: 50%;
}

.has-photo-map.layout-post .photo-map-entry-media .photo-map-shell,
.has-photo-map.layout-post .photo-map-entry-media .photo-map-canvas {
  height: 100%;
  min-height: 100%;
}

.has-photo-map.layout-post .photo-map-entry-media .photo-map-shell {
  margin: 0;
}

.has-photo-map.layout-post .photo-map-entry-media .leaflet-top {
  top: 90px;
}

.has-photo-map.layout-post.has-post-thumbnail:not(.home):not(.single-format-image):not(.page-template-eventbrite-index) .entry-header {
  background: rgba(0, 0, 0, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  bottom: 0;
  color: rgba(255, 255, 255, 0.7);
  left: 50%;
  padding: 0 6rem 6rem;
  position: fixed;
  text-align: left;
  width: 50%;
  z-index: 450;
}

.has-photo-map.layout-post.has-post-thumbnail:not(.home):not(.single-format-image):not(.page-template-eventbrite-index) .entry-header h1,
.has-photo-map.layout-post.has-post-thumbnail:not(.home):not(.single-format-image):not(.page-template-eventbrite-index) .entry-header a {
  color: #fff;
}

.has-photo-map.layout-post.has-post-thumbnail:not(.single-format-image):not(.page-template-eventbrite-index) .entry-posted .posted-info {
  float: none;
}

.has-photo-map.layout-post .entry-posted {
  border-top-color: #e0e0e0;
}

.has-photo-map.layout-post .photo-map-post .entry-content {
  padding-top: 3rem;
}

.has-photo-map.layout-post .photo-map-post .entry-content::before {
  display: none;
}

.has-photo-map.layout-post .photo-map-post > .entry-footer {
  max-width: 72%;
  margin: 0 auto;
}

body.photo-viewer-open {
  overflow: hidden;
}

.photo-viewer {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  background: rgba(5, 10, 14, 0.94);
  color: #fff;
}

.photo-viewer.is-open {
  display: grid;
}

.photo-viewer-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 5rem;
    min-height: 0;
    height: 100%;
}

.photo-viewer-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
}

.photo-viewer-button {
  position: absolute;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.16s ease, transform 0.16s ease;
}

.photo-viewer-button:hover,
.photo-viewer-button:focus {
  background: rgba(255, 255, 255, 0.24);
  outline: none;
  transform: scale(1.04);
}

.photo-viewer-close {
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  font-size: 1.8rem;
  line-height: 1;
}

.photo-viewer-prev,
.photo-viewer-next {
  top: 50%;
  width: 54px;
  height: 54px;
  margin-top: -27px;
  font-size: 2.4rem;
}

.photo-viewer-prev {
  left: 1rem;
}

.photo-viewer-next {
  right: 1rem;
}

@media (max-width: 767px) {
  .layout-photo-map .site-header,
  .layout-photo-map .site-footer {
    display: none;
  }

  .layout-photo-map .site-inner,
  .layout-photo-map .photo-map-main,
  .layout-photo-map .photo-map-content {
    min-height: 100dvh;
  }

  .layout-photo-map .photo-map-main {
    padding-top: 0;
  }

  .photo-map-intro {
    top: 0.75rem;
    right: 0.75rem;
    max-width: none;
    padding: 0.8rem 0.9rem;
    border-radius: 14px;
  }

  .photo-map-intro p:nth-child(2) {
    display: none;
  }

  .photo-map-shell {
    min-height: 100dvh;
  }

  .photo-map-canvas {
    height: 100dvh;
    min-height: 100dvh;
    border-radius: 0;
  }

  .photo-map-marker {
    width: 48px;
    height: 48px;
    border-radius: 12px;
  }

  .photo-map-cluster {
    width: 58px;
    height: 58px;
    border-radius: 17px;
  }

  .photo-map-cluster-previews {
    border-radius: 14px;
  }

  .photo-map-cluster-count {
    min-width: 24px;
    height: 24px;
    font-size: 0.82rem;
  }

  .photo-map-post-marker {
    width: 30px;
    height: 30px;
  }

  .photo-map-post-marker::after {
    width: 11px;
    height: 11px;
    margin: -5.5px 0 0 -5.5px;
  }

  .photo-viewer-stage {
    padding: 0.75rem;
  }

  .photo-viewer-prev,
  .photo-viewer-next {
    width: 44px;
    height: 44px;
    margin-top: -22px;
    font-size: 2rem;
  }
}

@media only screen and (max-width: 960px) {
  .has-photo-map.layout-post:not(.home) .site-inner {
    float: none;
    width: 100%;
  }

  .has-photo-map.layout-post .photo-map-mobile-stage {
    --photo-map-mobile-map-height: clamp(560px, 82dvh, 760px);
    --photo-map-mobile-teaser-height: clamp(220px, 32dvh, 330px);
    min-height: calc(100dvh - 86px);
    padding-bottom: var(--photo-map-mobile-map-height);
    position: relative;
  }

  .has-photo-map.layout-post .photo-map-post .entry-inner {
    position: relative;
    z-index: 1;
  }

  .has-photo-map.layout-post.has-post-thumbnail:not(.home):not(.single-format-image):not(.page-template-eventbrite-index) .entry-header {
    background: transparent;
    border-top: 0;
    bottom: auto;
    color: inherit;
    left: auto;
    padding: 0 0 2rem;
    position: relative;
    text-align: center;
    width: auto;
  }

  .has-photo-map.layout-post.has-post-thumbnail:not(.home):not(.single-format-image):not(.page-template-eventbrite-index) .entry-header h1,
  .has-photo-map.layout-post.has-post-thumbnail:not(.home):not(.single-format-image):not(.page-template-eventbrite-index) .entry-header a {
    color: inherit;
  }

  .is-singular.has-photo-map.layout-post .photo-map-post .photo-map-entry-media {
    position: fixed;
    top: var(--photo-map-mobile-fixed-top, calc(100dvh - var(--photo-map-mobile-teaser-height)));
    bottom: auto;
    left: 0;
    right: 0;
    width: auto;
    margin: 0;
    z-index: 300;
  }

  .is-singular.has-photo-map.layout-post .photo-map-mobile-stage.is-photo-map-teaser-released .photo-map-entry-media {
    position: absolute;
    top: auto;
    bottom: 0;
  }

  .has-photo-map.layout-post .photo-map-entry-media .photo-map-shell,
  .has-photo-map.layout-post .photo-map-entry-media .photo-map-canvas {
    height: var(--photo-map-mobile-map-height);
    min-height: 0;
  }

  .has-photo-map.layout-post .photo-map-entry-media .leaflet-top {
    top: 0.75rem;
  }

  .has-photo-map.layout-post .photo-map-post > .entry-footer {
    order: 3;
    max-width: 100%;
    padding-left: 8%;
    padding-right: 8%;
  }
}

@media (max-width: 767px) {
  .has-photo-map.layout-post .photo-map-mobile-stage {
    --photo-map-mobile-map-height: 82dvh;
    --photo-map-mobile-teaser-height: clamp(96px, 18dvh, 150px);
  }

  .has-photo-map.layout-post .photo-map-entry-media .photo-map-shell,
  .has-photo-map.layout-post .photo-map-entry-media .photo-map-canvas {
    height: var(--photo-map-mobile-map-height);
    min-height: 0;
  }
}
