/* =============================================================
   Travel-icious Destination Map — v2 (polaroid pins + sidebar)
   ============================================================= */

/* ── Outer wrapper ─────────────────────────────────────────── */
.ti-dest-wrap {
  display: flex;
  width: 100%;
  background: #FDFAF6;
  border: 1px solid #EAE3DA;
  font-family: 'Montserrat', 'Arial', sans-serif;
  overflow: hidden;
}

/* ── Sidebar ───────────────────────────────────────────────── */
.ti-dest-sidebar {
  width: 220px;
  flex-shrink: 0;
  border-right: 1px solid #EAE3DA;
  display: flex;
  flex-direction: column;
}

.ti-sidebar-toggle {
  display: block;
  width: 100%;
  padding: 0.9rem 1.25rem 0.6rem;
  font-family: inherit;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #A8998F;
  background: none;
  border: none;
  border-bottom: 1px solid #EAE3DA;
  cursor: default;
  text-align: left;
}

/* On mobile the toggle becomes a real button */
@media (max-width: 640px) {
  .ti-sidebar-toggle {
    cursor: pointer;
  }
  .ti-sidebar-toggle::after {
    content: ' ▾';
    transition: transform 0.2s;
    display: inline-block;
  }
  .ti-sidebar-toggle[aria-expanded="false"]::after {
    transform: rotate(-90deg);
  }
}

.ti-sidebar-list-wrap {
  flex: 1;
}

.ti-dest-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: dest-counter;
}

.ti-dest-list li {
  border-bottom: 1px solid #F0E9E1;
}

.ti-dest-list li a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 1.25rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #5A4E46;
  text-decoration: none;
  transition: color 0.18s, background 0.18s;
  line-height: 1.3;
}

.ti-dest-list li a:hover,
.ti-dest-list li a.is-active {
  color: var(--ti-accent, #C8A882);
  background: #FAF6F1;
}

.ti-list-icon {
  color: var(--ti-accent, #C8A882);
  font-size: 0.75rem;
  flex-shrink: 0;
  line-height: 1;
}

.ti-list-count {
  margin-left: auto;
  font-size: 0.58rem;
  font-weight: 600;
  color: #B0A59C;
  letter-spacing: 0;
}

/* ── Map container ─────────────────────────────────────────── */
.ti-dest-map-outer {
  flex: 1;
  min-width: 0;
}

.ti-dest-map-inner {
  position: relative;
  width: 100%;
}

#ti-dest-map {
  width: 100%;
  background: transparent;
}

/* Ghost pale map — override jsVectorMap SVG defaults */
.ti-dest-map-inner svg {
  display: block;
}

/* ── Pin overlay ───────────────────────────────────────────── */
.ti-pins {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}

/* Individual pin anchor */
.ti-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: all;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  z-index: 10;
  transition: filter 0.18s;
}

.ti-pin:hover {
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.22));
  z-index: 20;
}

/* Polaroid frame */
.ti-pin-photo {
  position: relative;
  width: 88px;
  height: 88px;
  background: #EDE8E3;
  border: 5px solid #fff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.16);
  overflow: visible; /* so badge can overlap */
  transform: rotate(-2deg);
  transition: transform 0.18s, box-shadow 0.18s;
}

.ti-pin:nth-child(even) .ti-pin-photo {
  transform: rotate(2deg);
}

.ti-pin:hover .ti-pin-photo {
  transform: rotate(0deg) translateY(-3px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}

.ti-pin-photo img,
.ti-pin-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ti-pin-placeholder {
  background: linear-gradient(135deg, #E8E0D6 0%, #D4C8BE 100%);
}

/* Numbered circle — bottom-left corner of the photo */
.ti-pin-num {
  position: absolute;
  bottom: -10px;
  left: -10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--ti-accent, #C8A882);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.18);
  z-index: 2;
  font-family: 'Montserrat', 'Arial', sans-serif;
}

/* Label below the photo */
.ti-pin-label {
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #7A6E67;
  text-align: center;
  margin-top: 0.5rem;
  white-space: nowrap;
  transition: color 0.18s;
  text-shadow: 0 1px 3px rgba(255,255,255,0.9);
}

.ti-pin:hover .ti-pin-label {
  color: var(--ti-accent, #C8A882);
}

/* Highlighted state (when sidebar item is hovered) */
.ti-pin.is-highlighted .ti-pin-photo {
  transform: rotate(0deg) translateY(-3px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}
.ti-pin.is-highlighted .ti-pin-label {
  color: var(--ti-accent, #C8A882);
}

/* ── jsVectorMap overrides ─────────────────────────────────── */
.jsvectormap-tip {
  display: none !important; /* map is decorative — no tooltips */
}

.jsvectormap-zoomin,
.jsvectormap-zoomout {
  display: none !important;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .ti-dest-sidebar {
    width: 190px;
  }
  .ti-pin-photo {
    width: 72px;
    height: 72px;
  }
  .ti-pin-label {
    font-size: 0.5rem;
  }
}

@media (max-width: 768px) {
  .ti-dest-sidebar {
    width: 160px;
  }
  .ti-pin-photo {
    width: 58px;
    height: 58px;
    border-width: 4px;
  }
  .ti-pin-num {
    width: 20px;
    height: 20px;
    font-size: 0.55rem;
    bottom: -8px;
    left: -8px;
  }
  .ti-pin-label {
    font-size: 0.45rem;
  }
  .ti-dest-list li a {
    font-size: 0.58rem;
    padding: 0.55rem 0.85rem;
  }
}

@media (max-width: 640px) {
  .ti-dest-wrap {
    flex-direction: column;
  }

  .ti-dest-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #EAE3DA;
  }

  .ti-sidebar-list-wrap {
    display: none;
    overflow: hidden;
  }

  .ti-sidebar-list-wrap.is-open {
    display: block;
  }

  .ti-dest-list {
    display: flex;
    flex-wrap: wrap;
  }

  .ti-dest-list li {
    width: 50%;
    border-right: 1px solid #F0E9E1;
  }

  #ti-dest-map {
    height: 260px !important;
  }

  .ti-pin-photo {
    width: 44px;
    height: 44px;
    border-width: 3px;
  }

  .ti-pin-num {
    width: 16px;
    height: 16px;
    font-size: 0.5rem;
    bottom: -6px;
    left: -6px;
  }

  .ti-pin-label {
    display: none;
  }
}
