.cmb-map-shell {
  --cmb-map-height: 620px;
  --cmb-accent: #1fa367;
  --cmb-area-fill: #1fa367;
  --cmb-area-stroke: #0f6b43;
  position: relative;
  width: 100%;
  margin: clamp(28px, 5vw, 64px) 0;
  color: #17231f;
}

.cmb-map-frame {
  position: relative;
  min-height: min(var(--cmb-map-height), 78vh);
  border-radius: clamp(20px, 4vw, 34px);
  overflow: hidden;
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--cmb-accent) 20%, transparent), transparent 34%),
    #edf4f0;
  border: 1px solid rgba(15, 107, 67, .18);
  box-shadow:
    0 24px 70px rgba(9, 44, 31, .16),
    inset 0 1px 0 rgba(255,255,255,.85);
}

.cmb-map-style-minimal .cmb-map-frame {
  border-radius: 16px;
  box-shadow: none;
}

.cmb-map-style-glass .cmb-map-frame {
  border: 1px solid rgba(255,255,255,.45);
  background: rgba(255,255,255,.42);
  backdrop-filter: blur(12px);
}

.cmb-map-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-height: min(var(--cmb-map-height), 78vh);
}

.cmb-map-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  z-index: 2;
  color: #456057;
  font-size: 14px;
  background: linear-gradient(135deg, #f5faf7, #e8f3ed);
  transition: opacity .24s ease, visibility .24s ease;
}

.cmb-map-loading span {
  width: 40px;
  height: 40px;
  display: block;
  border: 3px solid rgba(31, 163, 103, .18);
  border-top-color: var(--cmb-accent);
  border-radius: 50%;
  animation: cmbSpin 1s linear infinite;
}

.cmb-map-ready .cmb-map-loading {
  opacity: 0;
  visibility: hidden;
}

@keyframes cmbSpin {
  to { transform: rotate(360deg); }
}

.cmb-pin-wrap {
  background: transparent;
  border: 0;
}

.cmb-pin {
  --pin-color: #1fa367;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 64px;
  transform-origin: bottom center;
  transition: transform .2s ease;
  filter: drop-shadow(0 10px 16px rgba(0,0,0,.22));
}

.cmb-pin:hover {
  transform: translateY(-6px) scale(1.05);
}

.cmb-pin-pulse {
  position: absolute;
  left: 50%;
  bottom: 7px;
  width: 24px;
  height: 10px;
  background: color-mix(in srgb, var(--pin-color) 38%, transparent);
  border-radius: 999px;
  transform: translateX(-50%);
  filter: blur(2px);
  animation: cmbPinShadow 2s ease-in-out infinite;
}

.cmb-pin::before {
  content: "";
  position: absolute;
  inset: 9px 8px 15px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--pin-color) 22%, transparent);
  animation: cmbPinPulse 2s ease-in-out infinite;
}

.cmb-pin img {
  position: relative;
  z-index: 2;
  width: 48px;
  height: 58px;
  object-fit: contain;
}

@keyframes cmbPinPulse {
  0%, 100% { transform: scale(.92); opacity: .34; }
  50% { transform: scale(1.3); opacity: .12; }
}

@keyframes cmbPinShadow {
  0%, 100% { transform: translateX(-50%) scale(.9); opacity: .5; }
  50% { transform: translateX(-50%) scale(1.25); opacity: .25; }
}

.cmb-leaflet-popup .leaflet-popup-content-wrapper {
  padding: 0;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(9, 44, 31, .22);
}

.cmb-leaflet-popup .leaflet-popup-content {
  width: 340px !important;
  max-width: calc(100vw - 56px);
  margin: 0;
}

.cmb-leaflet-popup .leaflet-popup-tip {
  box-shadow: 0 12px 24px rgba(9, 44, 31, .15);
}

.cmb-popup {
  background: #fff;
  color: #17231f;
  overflow: hidden;
}

.cmb-popup-image {
  margin: 0;
  height: 170px;
  overflow: hidden;
  background: #edf4f0;
}

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

.cmb-popup-body {
  padding: 20px;
}

.cmb-popup h3 {
  margin: 0 0 6px;
  font-size: 20px;
  line-height: 1.25;
  color: #12251e;
}

.cmb-popup-subtitle {
  margin: 0 0 12px;
  color: var(--cmb-accent);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .02em;
}

.cmb-popup-content {
  color: #40534c;
  font-size: 14px;
  line-height: 1.62;
}

.cmb-popup-content > :first-child { margin-top: 0; }
.cmb-popup-content > :last-child { margin-bottom: 0; }

.cmb-popup-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 16px;
  padding: 10px 15px;
  border-radius: 999px;
  background: var(--cmb-accent);
  color: #fff !important;
  font-weight: 800;
  text-decoration: none !important;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--cmb-accent) 28%, transparent);
  transition: transform .18s ease, box-shadow .18s ease;
}

.cmb-popup-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px color-mix(in srgb, var(--cmb-accent) 36%, transparent);
}

.cmb-popup-template-minimal .cmb-popup-image {
  height: 120px;
}

.cmb-popup-template-glass {
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(12px);
}

.cmb-fit-control button {
  width: 30px;
  height: 30px;
  border: 0;
  background: #fff;
  color: #19362b;
  cursor: pointer;
  font-weight: 800;
  font-size: 16px;
  line-height: 30px;
}

.cmb-fit-control button:hover {
  background: #f2f8f5;
}

.cmb-map-shell .leaflet-control-zoom a,
.cmb-map-shell .leaflet-bar a,
.cmb-map-shell .leaflet-bar button {
  color: #19362b;
}

.cmb-map-shell .leaflet-container {
  font-family: inherit;
}

@media (max-width: 768px) {
  .cmb-map-shell {
    --cmb-map-height: 520px;
  }

  .cmb-map-frame,
  .cmb-map-canvas {
    min-height: min(var(--cmb-map-height), 75vh);
  }

  .cmb-leaflet-popup .leaflet-popup-content {
    width: 292px !important;
  }

  .cmb-popup-image {
    height: 140px;
  }

  .cmb-popup-body {
    padding: 16px;
  }
}

/* Premium fullscreen marker experience */
.cmb-map-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 16px;
}

.cmb-map-filters button {
  border: 1px solid rgba(15, 107, 67, .18);
  background: #fff;
  color: #19362b;
  border-radius: 999px;
  padding: 9px 14px;
  cursor: pointer;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(9, 44, 31, .07);
  transition: transform .18s ease, border-color .18s ease, background .18s ease, color .18s ease;
}

.cmb-map-filters button:hover,
.cmb-map-filters button.is-active {
  transform: translateY(-1px);
  border-color: var(--cmb-accent);
  background: var(--cmb-accent);
  color: #fff;
}

button.cmb-pin,
.cmb-pin button {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.cmb-pin:focus-visible {
  outline: 3px solid rgba(31, 163, 103, .35);
  outline-offset: 4px;
  border-radius: 999px;
}

.cmb-modal-lock {
  overflow: hidden !important;
}

.cmb-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .24s ease, visibility .24s ease;
}

.cmb-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.cmb-modal-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 10% 0%, rgba(31, 163, 103, .28), transparent 34%),
    rgba(4, 18, 13, .72);
  backdrop-filter: blur(12px);
}

.cmb-modal-stage {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100vw - 40px));
  max-height: min(900px, calc(100vh - 40px));
  display: grid;
}

.cmb-modal-card {
  position: relative;
  width: 100%;
  max-height: min(900px, calc(100vh - 40px));
  overflow: hidden;
  border-radius: clamp(22px, 4vw, 38px);
  background: #ffffff;
  color: #17231f;
  box-shadow:
    0 36px 120px rgba(0, 0, 0, .42),
    inset 0 1px 0 rgba(255,255,255,.8);
  transform: translateY(18px) scale(.985);
  transition: transform .28s ease;
}

.cmb-modal.is-open .cmb-modal-card {
  transform: translateY(0) scale(1);
}

.cmb-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 3;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  color: #14251f;
  cursor: pointer;
  font-size: 30px;
  line-height: 1;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 32px rgba(0,0,0,.18);
  transition: transform .18s ease, background .18s ease;
}

.cmb-modal-close:hover {
  transform: rotate(90deg) scale(1.04);
  background: #fff;
}

.cmb-modal-layout {
  display: grid;
  grid-template-columns: minmax(320px, .95fr) minmax(0, 1.05fr);
  min-height: min(760px, calc(100vh - 40px));
  max-height: min(900px, calc(100vh - 40px));
}

.cmb-modal-hero {
  position: relative;
  margin: 0;
  height: 100%;
  min-height: 460px;
  overflow: hidden;
  background: #e8f3ed;
}

.cmb-modal-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 52%, rgba(0,0,0,.32));
  pointer-events: none;
}

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

.cmb-modal-hero-empty {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 36% 32%, color-mix(in srgb, var(--pin-color) 40%, transparent), transparent 26%),
    linear-gradient(135deg, #ecf7f1 0%, #d9ede4 100%);
}

.cmb-modal-hero-empty span {
  width: 124px;
  height: 124px;
  display: block;
  border-radius: 50%;
  background: color-mix(in srgb, var(--pin-color) 22%, transparent);
  box-shadow:
    0 0 0 28px color-mix(in srgb, var(--pin-color) 8%, transparent),
    0 20px 60px color-mix(in srgb, var(--pin-color) 24%, transparent);
}

.cmb-modal-body {
  overflow: auto;
  padding: clamp(34px, 5vw, 64px);
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--pin-color) 45%, #b7c8c0) transparent;
}

.cmb-modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.cmb-modal-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--pin-color) 14%, transparent);
  color: color-mix(in srgb, var(--pin-color) 74%, #10251d);
  font-weight: 900;
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.cmb-modal-body h2 {
  margin: 0 0 10px;
  color: #0f211a;
  font-size: clamp(32px, 4.2vw, 58px);
  line-height: .98;
  letter-spacing: -.045em;
}

.cmb-modal-subtitle {
  margin: 0 0 24px;
  color: color-mix(in srgb, var(--pin-color) 78%, #17231f);
  font-size: clamp(16px, 1.4vw, 20px);
  font-weight: 800;
}

.cmb-modal-content {
  color: #384d45;
  font-size: clamp(16px, 1.08vw, 18px);
  line-height: 1.78;
}

.cmb-modal-content > :first-child { margin-top: 0; }
.cmb-modal-content > :last-child { margin-bottom: 0; }

.cmb-modal-content img {
  max-width: 100%;
  height: auto;
  border-radius: 18px;
}

.cmb-modal-content iframe,
.cmb-modal-content video {
  max-width: 100%;
  border-radius: 18px;
}

.cmb-modal-content blockquote {
  margin: 28px 0;
  padding: 20px 24px;
  border-left: 4px solid var(--pin-color);
  border-radius: 16px;
  background: #f4faf7;
}

.cmb-modal-content-empty {
  color: #74847e;
  font-style: italic;
}

.cmb-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.cmb-modal-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 20px;
  border-radius: 999px;
  background: var(--pin-color);
  color: #fff !important;
  font-weight: 900;
  text-decoration: none !important;
  box-shadow: 0 16px 38px color-mix(in srgb, var(--pin-color) 30%, transparent);
  transition: transform .18s ease, box-shadow .18s ease;
}

.cmb-modal-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 46px color-mix(in srgb, var(--pin-color) 42%, transparent);
}

.cmb-modal-template-glass {
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,.5);
}

.cmb-modal-template-minimal {
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0,0,0,.34);
}

@media (max-width: 900px) {
  .cmb-modal-stage {
    width: min(100vw - 20px, 760px);
    max-height: calc(100vh - 20px);
  }

  .cmb-modal-card,
  .cmb-modal-layout {
    max-height: calc(100vh - 20px);
  }

  .cmb-modal-layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .cmb-modal-hero {
    min-height: 220px;
    height: 34vh;
  }

  .cmb-modal-body {
    padding: 28px;
    max-height: calc(66vh - 20px);
  }
}

@media (max-width: 560px) {
  .cmb-modal-stage {
    width: 100vw;
    max-height: 100vh;
  }

  .cmb-modal-card {
    width: 100vw;
    max-height: 100vh;
    border-radius: 0;
  }

  .cmb-modal-layout {
    max-height: 100vh;
  }

  .cmb-modal-close {
    top: 12px;
    right: 12px;
  }

  .cmb-modal-hero {
    height: 32vh;
    min-height: 190px;
  }

  .cmb-modal-body {
    padding: 24px 20px 34px;
    max-height: 68vh;
  }
}

/* Interaction model v1.2: desktop hover label + mobile preview gate */
.cmb-marker-tooltip {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.cmb-marker-tooltip::before {
  display: none;
}

.cmb-marker-label-card {
  min-width: 140px;
  max-width: 240px;
  padding: 10px 13px;
  border-radius: 16px;
  background: rgba(255,255,255,.96);
  color: #11251d;
  box-shadow:
    0 18px 45px rgba(9, 44, 31, .18),
    inset 0 1px 0 rgba(255,255,255,.9);
  border: 1px solid rgba(15, 107, 67, .14);
  text-align: center;
  backdrop-filter: blur(10px);
}

.cmb-marker-label-card strong {
  display: block;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 900;
}

.cmb-marker-label-card span {
  display: block;
  margin-top: 3px;
  color: #5d7068;
  font-size: 12px;
  line-height: 1.25;
  font-weight: 700;
}

.cmb-marker-preview-popup .leaflet-popup-content-wrapper {
  padding: 0;
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(9, 44, 31, .28);
}

.cmb-marker-preview-popup .leaflet-popup-content {
  margin: 0;
  width: auto !important;
}

.cmb-marker-preview-popup .leaflet-popup-tip {
  background: #fff;
  box-shadow: 0 12px 28px rgba(9, 44, 31, .16);
}

.cmb-marker-preview {
  min-width: 248px;
  padding: 16px;
  color: #17231f;
}

.cmb-marker-preview-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.cmb-marker-preview-head img,
.cmb-marker-preview-dot {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: block;
  object-fit: contain;
  border-radius: 14px;
  background: color-mix(in srgb, var(--pin-color) 13%, #fff);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pin-color) 18%, transparent);
}

.cmb-marker-preview-dot {
  border-radius: 50%;
  background: var(--pin-color);
}

.cmb-marker-preview-head strong {
  display: block;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 900;
  color: #10251d;
}

.cmb-marker-preview-head span {
  display: block;
  margin-top: 3px;
  color: #5d7068;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 700;
}

.cmb-preview-open {
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  background: var(--pin-color);
  color: #fff;
  cursor: pointer;
  font-weight: 900;
  box-shadow: 0 14px 34px color-mix(in srgb, var(--pin-color) 30%, transparent);
  transition: transform .18s ease, box-shadow .18s ease;
}

.cmb-preview-open:active {
  transform: scale(.98);
}

/* More generous fullscreen modal for heavy project content */
.cmb-modal-stage {
  width: min(1500px, calc(100vw - 32px));
  height: min(980px, calc(100vh - 32px));
  max-height: calc(100vh - 32px);
}

.cmb-modal-card {
  height: 100%;
  max-height: 100%;
}

.cmb-modal-layout {
  height: 100%;
  min-height: 0;
  max-height: none;
  grid-template-columns: minmax(360px, 42%) minmax(0, 58%);
}

.cmb-modal-hero {
  height: 100%;
  min-height: 0;
}

.cmb-modal-body {
  min-height: 0;
  max-height: 100%;
  overflow: auto;
}

@media (max-width: 900px) {
  .cmb-modal-stage {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
  }

  .cmb-modal-card,
  .cmb-modal-layout {
    max-height: 100vh;
    height: 100vh;
  }

  .cmb-modal-card {
    border-radius: 0;
  }

  .cmb-modal-layout {
    grid-template-columns: 1fr;
    grid-template-rows: 32vh 1fr;
  }

  .cmb-modal-hero {
    height: 32vh;
    min-height: 190px;
  }

  .cmb-modal-body {
    height: 100%;
    max-height: none;
  }
}

@media (hover: none), (pointer: coarse), (max-width: 768px) {
  .cmb-marker-tooltip {
    display: none;
  }

  .cmb-pin:hover {
    transform: none;
  }
}

/* v1.3 — Clean frontend: visitors see only the map and the markers */
.cmb-map-shell.cmb-map-clean {
  width: 100%;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.cmb-map-shell.cmb-map-clean .cmb-map-frame {
  min-height: min(var(--cmb-map-height), 78vh);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}

.cmb-map-shell.cmb-map-clean .cmb-map-canvas,
.cmb-map-shell.cmb-map-clean .leaflet-container {
  background: transparent;
}

.cmb-map-shell.cmb-map-clean .cmb-map-loading {
  background: transparent;
  color: transparent;
  pointer-events: none;
}

.cmb-map-shell.cmb-map-clean .cmb-map-loading span {
  width: 30px;
  height: 30px;
  border-width: 2px;
}

.cmb-map-shell.cmb-map-clean .leaflet-control-container,
.cmb-map-shell.cmb-map-clean .leaflet-control-attribution,
.cmb-map-shell.cmb-map-clean .leaflet-control-zoom,
.cmb-map-shell.cmb-map-clean .leaflet-control-scale,
.cmb-map-shell.cmb-map-clean .cmb-fit-control,
.cmb-map-shell.cmb-map-clean .cmb-map-filters {
  display: none !important;
}

.cmb-map-shell.cmb-map-clean .leaflet-pane,
.cmb-map-shell.cmb-map-clean .leaflet-tile-pane,
.cmb-map-shell.cmb-map-clean .leaflet-map-pane {
  border: 0;
}

@media (max-width: 768px) {
  .cmb-map-shell.cmb-map-clean {
    --cmb-map-height: 520px;
  }
}

/* v1.4 — Silhouette/cutout mode: hide everything outside the painted area */
.cmb-map-area-cutout {
  position: absolute;
  inset: 0;
  z-index: 450;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.cmb-map-area-cutout-enabled .leaflet-tile-pane,
.cmb-map-area-cutout-enabled .leaflet-overlay-pane {
  will-change: clip-path;
}

.cmb-map-area-cutout-enabled.cmb-map-clean .leaflet-container,
.cmb-map-area-cutout-enabled.cmb-map-clean .cmb-map-frame,
.cmb-map-area-cutout-enabled.cmb-map-clean .cmb-map-canvas {
  background: transparent !important;
}

.cmb-map-area-cutout-enabled.cmb-map-clean .leaflet-marker-pane,
.cmb-map-area-cutout-enabled.cmb-map-clean .leaflet-tooltip-pane,
.cmb-map-area-cutout-enabled.cmb-map-clean .leaflet-popup-pane {
  z-index: 600;
}
