.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: 0;
  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-panel {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  z-index: 510;
  width: min(390px, calc(100% - 2.5rem));
  max-height: calc(100% - 2.5rem);
  overflow: auto;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(10px);
}

.photo-map-panel-inner {
  padding: 1.25rem;
}

.photo-map-panel h1 {
  margin: 0.1rem 0 0.65rem;
  color: #17242d;
  font-size: clamp(1.75rem, 4vw, 2.55rem);
  line-height: 1.05;
}

.photo-map-panel h2 {
  margin: 1.15rem 0 0.4rem;
  color: #17242d;
  font-size: 1.05rem;
}

.photo-map-panel p {
  margin: 0 0 0.85rem;
  line-height: 1.5;
}

.photo-map-panel button,
.photo-map-floating-back {
  text-transform: none;
}

.photo-map-back,
.photo-map-floating-back {
  text-transform: uppercase;
}

.photo-map-trip-list {
  display: grid;
  gap: 0.7rem;
}

.photo-map-trip-card {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 0.75rem;
  width: 100%;
  padding: 0.65rem;
  border: 1px solid rgba(36, 49, 58, 0.1);
  border-radius: 0;
  background: #fff;
  color: #24313a;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(30, 43, 53, 0.08);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.photo-map-trip-card:hover,
.photo-map-trip-card:focus {
  border-color: rgba(232, 109, 36, 0.45);
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 15px 30px rgba(30, 43, 53, 0.13);
}

.photo-map-trip-card-image {
  display: block;
  width: 76px;
  height: 76px;
  border-radius: 0;
  background: #dbe6ee center / cover;
}

.photo-map-trip-card-body {
  display: grid;
  align-content: center;
  gap: 0.22rem;
  min-width: 0;
}

.photo-map-trip-card strong {
  color: #17242d;
  font-size: 1.02rem;
  line-height: 1.25;
}

.photo-map-trip-card span span {
  display: -webkit-box;
  overflow: hidden;
  color: #52616b;
  font-size: 0.9rem;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.photo-map-trip-card small {
  color: #7b8790;
  font-size: 0.78rem;
  font-weight: 700;
}

.photo-map-back {
  display: inline-flex;
  margin: 0 0 1rem;
  padding: .62em 1.62em;
  border: 0;
  border-radius: 0;
  background: #e7ae01;
  color: #fff;
  cursor: pointer;
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  line-height: 1;
}

.photo-map-back:hover,
.photo-map-back:focus {
  background: #17242d;
  outline: none;
}

.photo-map-floating-back {
  display: none;
}

.photo-map-post-list {
  margin: 1.8rem 0 0;
  padding-left: 2.15rem;
  line-height: 1.65;
}

.photo-map-post-list li + li {
  margin-top: 0.75rem;
}

.photo-map-trip-marker {
  position: relative;
  display: flex;
  align-items: flex-end;
  width: 172px;
  height: 108px;
  border: 4px solid #fff;
  border-radius: 0;
  background: #dbe6ee center / cover;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.32);
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.photo-map-trip-marker::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 16, 22, 0.08), rgba(8, 16, 22, 0.78));
}

.photo-map-trip-marker:hover {
  transform: scale(1.08);
  box-shadow: 0 22px 42px rgba(0, 0, 0, 0.38);
}

.photo-map-trip-marker span {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  padding: 0.65rem 0.75rem;
  background: linear-gradient(180deg, rgba(12, 21, 28, 0), rgba(12, 21, 28, 0.55));
  color: #fff;
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1.16;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.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: 0;
  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: 0;
  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: 0;
}

.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: 0;
  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: 0;
  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: 0;
  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: 0;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
}

.photo-viewer-button {
  position: absolute;
  border: 0;
  border-radius: 0;
  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: 0;
  }

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

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

  .photo-map-panel {
    display: none;
  }

  .photo-map-shell.is-trip-mode .photo-map-floating-back {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 520;
    display: inline-flex;
    padding: .62em 1.62em;
    border: 0;
    border-radius: 0;
    background: #e7ae01;
    color: #fff;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    line-height: 1;
  }

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

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

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

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

  .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;
  }
}
