.ftem-map-wrap {
  width: 100%;
}

.ftem-map-wrap .ftem-map-toolbar {
  display: grid !important;
  gap: 14px !important;
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid #d8e4ee;
  border-radius: 10px;
  background: #f8fbff;
}

.ftem-map-wrap .ftem-map-toolbar__search {
  display: flex !important;
}

.ftem-map-wrap .ftem-map-toolbar__controls {
  display: grid !important;
  gap: 12px !important;
}

.ftem-map-wrap .ftem-map-search {
  width: 320px;
  max-width: 100%;
}

.ftem-map-wrap .ftem-map-toolbar input.ftem-map-search,
.ftem-map-wrap .ftem-map-toolbar select.ftem-map-radius,
.ftem-map-wrap .ftem-map-toolbar button.ftem-map-locate {
  appearance: none !important;
  -webkit-appearance: none !important;
  font: inherit !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  line-height: 1.2 !important;
  box-sizing: border-box !important;
}

.ftem-map-wrap .ftem-map-toolbar input.ftem-map-search {
  display: block !important;
  width: min(420px, 100%) !important;
  min-height: 46px !important;
  margin: 0 !important;
  padding: 12px 16px !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 999px !important;
  background: #ffffff !important;
  color: #0f172a !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06) !important;
  outline: none !important;
}

.ftem-map-wrap .ftem-map-toolbar input.ftem-map-search::placeholder {
  color: #64748b !important;
  opacity: 1 !important;
}

.ftem-map-wrap .ftem-map-meta {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
  justify-content: flex-start !important;
}

.ftem-map-wrap .ftem-map-location-tools {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
  flex: 1 1 auto !important;
}

.ftem-map-wrap .ftem-map-count {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 34px !important;
  padding: 6px 12px !important;
  border-radius: 999px !important;
  background: #e8f1fb !important;
  color: #1d4f85 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
}

.ftem-map-wrap .ftem-map-toolbar select.ftem-map-radius {
  width: auto !important;
  min-width: 190px !important;
  max-width: 220px !important;
  min-height: 42px !important;
  margin: 0 !important;
  padding: 10px 40px 10px 14px !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 999px !important;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
  color: #0f172a !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06) !important;
  cursor: pointer !important;
}

.ftem-map-wrap .ftem-map-toolbar button.ftem-map-locate {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 42px !important;
  margin: 0 !important;
  padding: 10px 14px !important;
  border: 1px solid #93c5fd !important;
  border-radius: 999px !important;
  background: #eff6ff !important;
  color: #1d4f85 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  box-shadow: none !important;
  cursor: pointer !important;
}

.ftem-map-wrap .ftem-map-toolbar button.ftem-map-locate:hover,
.ftem-map-wrap .ftem-map-toolbar button.ftem-map-locate:focus {
  background: #dbeafe !important;
  color: #1e40af !important;
}

.ftem-map-wrap .ftem-map-location-status {
  display: inline-flex !important;
  align-items: center !important;
  font-size: 12px !important;
  color: #47637c !important;
}

.ftem-map-wrap .ftem-map-legend {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
}

.ftem-map-wrap .ftem-legend-item {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 4px 8px !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  text-decoration: none !important;
}

.ftem-map-wrap .ftem-legend-item span:not(.dashicons) {
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #475569 !important;
  line-height: 1.2 !important;
}

.ftem-map-wrap .ftem-legend-item:hover {
  background: #f1f5f9 !important;
}

.ftem-map {
  width: 100%;
  min-height: 420px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  margin-top: 20px;
}

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

.ftem-pin {
  width: 36px;
  height: 36px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
}

.ftem-pin .dashicons {
  transform: rotate(45deg);
  color: #fff;
  font-size: 18px;
  line-height: 1;
}

.ftem-popup img {
  width: 100%;
  max-width: 220px;
  display: block;
  border-radius: 6px;
  margin-bottom: 8px;
}

.ftem-popup h4 {
  margin: 0 0 6px;
  font-size: 15px;
}

.ftem-popup p {
  margin: 0 0 8px;
  font-size: 13px;
}

.ftem-popup a {
  font-weight: 600;
  text-decoration: none;
}

.leaflet-popup-content-wrapper {
  border-radius: 20px;
  overflow: visible;
  background: transparent;
  box-shadow: none;
  border: 0;
}

.leaflet-popup-content {
  margin: 0;
}

.leaflet-popup-close-button {
  top: -12px !important;
  right: -12px !important;
  width: 32px !important;
  height: 32px !important;
  padding: 0 !important;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.98) !important;
  color: #0f172a !important;
  font-size: 24px !important;
  font-weight: 700;
  line-height: 28px !important;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.22);
}

.leaflet-popup-close-button:hover,
.leaflet-popup-close-button:focus {
  background: #ffffff !important;
  color: #134e4a !important;
}

.leaflet-popup-tip-container {
  display: none;
}

.ftem-popup-card {
  min-width: 280px;
  max-width: 320px;
  padding: 18px 20px;
  backdrop-filter: saturate(130%) blur(1px);
  color: #fff;
  border: 0;
  border-radius: 16px;
}

.ftem-popup-card h4 {
  color: #fff;
  margin: 0 0 14px;
  font-size: 30px;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

a.ftem-popup-btn,
.ftem-map-wrap a.ftem-popup-btn,
.ftem-popup-btn {
  display: inline-block;
  margin: 0 0 14px;
  padding: 8px 16px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #ffffff !important;
  text-decoration: none;
  font-weight: 700;
}

.ftem-popup-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 10px;
}

.ftem-popup-stat {
  border-radius: 10px;
  padding: 8px;
}

.ftem-popup-stat span {
  display: block;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.9);
}

.ftem-popup-stat strong {
  display: block;
  margin-top: 2px;
  font-size: 18px;
  line-height: 1;
  color: #fff;
}

.ftem-popup-row {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 10px;
  margin-top: 8px;
}

.ftem-popup-row span {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
}

.ftem-popup-row strong {
  font-size: 15px;
  color: #fff;
  font-weight: 700;
  line-height: 1.25;
}

.ftem-member {
  max-width: 1100px;
  margin: 24px auto 48px;
  padding: 18px 16px;
  background: linear-gradient(180deg, #f8fcff 0%, #ffffff 40%);
  border-radius: 16px;
}

.ftem-member__header {
  margin-bottom: 16px;
}

.ftem-member__header h1 {
  margin: 14px 0 0;
  color: #12263f;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.1;
}

.ftem-member__back {
  display: inline-block;
  border: 2px solid #2673dd;
  color: #1d5bb0;
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
  padding: 8px 16px;
  background: #eef6ff;
}

.ftem-member__top-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 14px;
}

.ftem-member__section {
  padding: 16px;
  border: 1px solid #d8e4ee;
  border-radius: 14px;
  background: #fff;
}

.ftem-member__section h3 {
  margin: 0 0 10px;
  color: #13395f;
  font-size: 1.1rem;
}

.ftem-member__section p {
  margin: 0 0 8px;
}

.ftem-member__social ul {
  margin: 0;
  padding-left: 18px;
}

.ftem-member__social li {
  margin-bottom: 6px;
}

.ftem-member__cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 14px 0 22px;
}

.ftem-member__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 14px 0;
}

.ftem-stat-card {
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(20, 60, 100, 0.08);
}

.ftem-stat-card h4 {
  margin: 0;
  color: #173b5f;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.ftem-stat-card__value {
  margin: 10px 0 0;
  font-size: clamp(2.2rem, 4.8vw, 3.6rem);
  line-height: 0.95;
  font-weight: 900;
  color: #08233f;
  text-shadow: 0 3px 0 rgba(255, 255, 255, 0.4);
}

.ftem-stat-card--mint {
  background: linear-gradient(140deg, #ccffe0 0%, #8ff0c5 100%);
}

.ftem-stat-card--yellow {
  background: linear-gradient(140deg, #fff5a5 0%, #ffd560 100%);
}

.ftem-stat-card--blue {
  background: linear-gradient(140deg, #c8e7ff 0%, #8ec8ff 100%);
}

.ftem-stat-card--program {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.ftem-stat-card--program .ftem-stat-card__value {
  font-size: 1.2rem;
  line-height: 1.2;
  text-shadow: none;
}

.ftem-program-chip {
  --ftem-program-accent: #2e7d32;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 320px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6), 0 10px 24px rgba(18, 38, 63, 0.08);
}

.ftem-program-chip__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 68px;
  width: 68px;
  height: 68px;
  border-radius: 20px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.84) 100%);
  box-shadow: 0 8px 20px rgba(18, 38, 63, 0.08);
}

.ftem-program-chip__icon img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  display: block;
}

.ftem-program-chip__fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--ftem-program-accent);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.ftem-program-chip__text {
  display: block;
  color: #0f2e4b;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.15;
}

.ftem-program-chip__content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.ftem-program-chip__eyebrow {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #47637c;
}

.ftem-program-chip__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ftem-program-mini-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: #21405d;
  font-size: 0.84rem;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(33, 64, 93, 0.08);
}

.ftem-info-card {
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(20, 60, 100, 0.08);
}

.ftem-info-card h4 {
  margin: 0 0 10px;
  color: #102d4d;
  font-size: 1.02rem;
}

.ftem-info-card p,
.ftem-info-card li {
  font-size: 0.98rem;
}

.ftem-info-card ul {
  margin: 0;
  padding-left: 18px;
}

.ftem-info-card--mint {
  background: #e9f9ef;
}

.ftem-info-card--yellow {
  background: #fff9db;
}

.ftem-info-card--blue {
  background: #e6f1ff;
}

.ftem-info-card--peach {
  background: #ffeede;
}

.ftem-info-card--lavender {
  background: #f1ecff;
}

.ftem-member__gallery {
  margin: 0 0 16px;
}

.ftem-member-gallery {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid #d9e7f1;
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(71, 155, 135, 0.14), transparent 26%),
    linear-gradient(145deg, #fbfdff 0%, #edf5fb 100%);
  box-shadow: 0 18px 40px rgba(10, 35, 60, 0.08);
}

.ftem-member-gallery__stage {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  padding: 0;
  border: 0;
  border-radius: 18px;
  overflow: hidden;
  background: #d7e4ee;
  cursor: zoom-in;
}

.ftem-member-gallery__stage:focus-visible,
.ftem-member-gallery__thumb:focus-visible,
.ftem-member-gallery__close:focus-visible,
.ftem-member-gallery__nav:focus-visible {
  outline: 3px solid rgba(19, 78, 74, 0.45);
  outline-offset: 3px;
}

.ftem-member-gallery__stage-image,
.ftem-member-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 180ms ease;
}

.ftem-member-gallery__stage:hover .ftem-member-gallery__stage-image,
.ftem-member-gallery__thumb:hover img {
  transform: scale(1.03);
}

.ftem-member-gallery__stage-chip,
.ftem-member-gallery__stage-count,
.ftem-member-gallery__lightbox-count {
  position: absolute;
  z-index: 1;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #12324a;
  font-weight: 700;
  box-shadow: 0 14px 32px rgba(10, 35, 60, 0.16);
}

.ftem-member-gallery__stage-chip {
  left: 16px;
  bottom: 16px;
  padding: 10px 14px;
  font-size: 0.95rem;
}

.ftem-member-gallery__stage-count {
  top: 16px;
  right: 16px;
  padding: 8px 12px;
  font-size: 0.9rem;
}

.ftem-member-gallery__thumbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.ftem-member-gallery__thumb {
  position: relative;
  padding: 0;
  border: 0;
  border-radius: 16px;
  overflow: hidden;
  background: #d7e4ee;
  aspect-ratio: 4 / 3;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(10, 35, 60, 0.12);
}

.ftem-member-gallery__thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 3px solid transparent;
  border-radius: 16px;
  transition: border-color 180ms ease, background-color 180ms ease;
}

.ftem-member-gallery__thumb:hover::after {
  background: rgba(255, 255, 255, 0.08);
}

.ftem-member-gallery__thumb.is-active::after {
  border-color: #167a72;
}

.ftem-member-gallery__lightbox[hidden] {
  display: none !important;
}

body.ftem-member-gallery-open {
  overflow: hidden;
}

.ftem-member-gallery__lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.ftem-member-gallery__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(8, 15, 26, 0.84);
  cursor: pointer;
}

.ftem-member-gallery__dialog {
  position: relative;
  z-index: 1;
  width: min(92vw, 1100px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ftem-member-gallery__lightbox-image {
  display: block;
  max-width: 100%;
  max-height: 84vh;
  width: auto;
  height: auto;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
}

.ftem-member-gallery__close,
.ftem-member-gallery__nav {
  position: absolute;
  z-index: 2;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #102a43;
  cursor: pointer;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
}

.ftem-member-gallery__close {
  top: 16px;
  right: 16px;
  font-size: 30px;
  line-height: 48px;
}

.ftem-member-gallery__nav {
  top: 50%;
  transform: translateY(-50%);
  font-size: 34px;
  line-height: 48px;
}

.ftem-member-gallery__nav--prev {
  left: 16px;
}

.ftem-member-gallery__nav--next {
  right: 16px;
}

.ftem-member-gallery__lightbox-count {
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  padding: 8px 14px;
  font-size: 0.95rem;
}

.ftem-member__content {
  margin-top: 10px;
}

@media (max-width: 900px) {
  .ftem-member__stats {
    grid-template-columns: 1fr;
  }

  .ftem-member__cards {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  .ftem-map-search {
    width: 100%;
  }

  .ftem-member {
    border-radius: 0;
    padding: 12px;
  }

  .ftem-member__top-grid {
    grid-template-columns: 1fr;
  }

  .ftem-member__cards {
    grid-template-columns: 1fr;
  }

  .ftem-member-gallery {
    padding: 14px;
    border-radius: 18px;
  }

  .ftem-member-gallery__stage {
    aspect-ratio: 4 / 3;
  }

  .ftem-member-gallery__lightbox {
    padding: 12px;
  }

  .ftem-member-gallery__close,
  .ftem-member-gallery__nav {
    width: 42px;
    height: 42px;
    line-height: 42px;
  }

  .ftem-member-gallery__close {
    top: 10px;
    right: 10px;
    font-size: 28px;
  }

  .ftem-member-gallery__nav {
    font-size: 28px;
  }

  .ftem-member-gallery__nav--prev {
    left: 8px;
  }

  .ftem-member-gallery__nav--next {
    right: 8px;
  }

  .ftem-member-gallery__lightbox-count {
    bottom: 10px;
  }

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