.interactive-map { display: block; width: 100%; margin: 0 auto; }
.interactive-map > svg { width: 100%; height: auto; display: block; }
.interactive-map [id$="-hover"] { opacity: 0; transition: opacity .15s ease; pointer-events: none; }
.interactive-map [id$="-hit"] { cursor: pointer; }

/* Islands & Reef reuses its hover group as the hit target, so override the
   catch-all hover rules: it stays visible at rest (matching the blotches'
   original opacity) and accepts pointer events. */
.interactive-map #ir-islands-and-reef-hover { opacity: 0.5; pointer-events: auto; cursor: pointer; }
.interactive-map #ir-islands-and-reef-hover * { cursor: pointer; }

/* These decorative layers paint AFTER the blotches in DOM order (SVG paint
   order is DOM order; CSS can't reorder it). Stop them intercepting clicks
   meant for the blotches and multiply-blend them so the active blotch colour
   can show through where they overlap. */
.interactive-map [id="map-2 1"],
.interactive-map #texture-top,
.interactive-map #texture-bottom {
  pointer-events: none;
  /* mix-blend-mode: multiply; */
}

/* ── Popup modal ─────────────────────────────────────────────── */
.im-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.6);
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.im-modal-backdrop.is-open { display: flex; }
html.im-modal-lock { overflow: hidden; }

.im-modal-content {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
}

.im-modal-close {
  all: unset;
  position: absolute;
  top: 3px;
  right: 3px;
  z-index: 2;
  cursor: pointer;
  line-height: 0;
  width: 32px;
}

.im-card {
  position: relative;
  padding: 10px;
  background-color: #f2efea;
  border-radius: 4px;
  box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.15);
}

.im-card__image-wrap {
  width: 100%;
  aspect-ratio: 399 / 188;
  overflow: hidden;
}
.im-card__image-wrap--empty { background: #d4c9b8; }
.im-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.im-card__content { padding: 10px; }

.im-modal-backdrop .im-card__title,
h2.im-card__title {
  color: #1b2822;
  font-family: 'Lovelo', sans-serif;
  font-size: 25px;
  font-weight: 900;
  line-height: normal;
  margin: 0 0 8px;
}

.im-card__description {
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #1b2822;
  line-height: 20px;
  margin: 0 0 16px;
}
.im-card__description p { margin: 0 0 8px; }
.im-card__description p:last-child { margin-bottom: 0; }

.im-card__pills {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.im-card__pills .im-card__pill {
  display: inline-block;
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #1b2822;
  border: 1.125px solid rgba(27, 40, 34, 0.9);
  border-radius: 15.268px;
  padding: 4px 10px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.im-card__pill:hover { background: #1b2822; color: #f5efe6; }

#markers {
  pointer-events: none;
}

/* ── Mobile carousel + inline card ──────────────────────────── */
.im-mobile { display: none; }
@media (max-width: 768px) {
  #heading, #BURNETT\ HEADS, #BUNDABERG, #BARGARA, #CHILDERS, #GIN\ GIN, #MOUNT\ PERRY, #BIGGENDEN, #GAYNDAH, #MUNDUBBERA, #EIDSVOLD, #MONTO, #CANIA\ GORGEâ€¨NATIONAL\ PARK, #MON\ REPOS, #ELLIOTT\ HEADS, #WOODGATE\ BEACH, #MOORE\ PARK, #Vector_2, #Vector_3, #Vector_4, #Vector_5, #Vector_6, #Vector_7, #Vector_8, #Vector_9, #Vector_10, #Vector_11, #Vector_12, #Ellipse\ 5, #Ellipse\ 6, #Ellipse\ 7, #Ellipse\ 8, #Ellipse\ 9, #Group\ 85, #Vector\ 5, #ROCKHAMPTONâ€¨\&\ GLADSTONE, #Group\ 112, #Vector\ 5_2, #BRISBANE, #Vector_13, #Vector_14 {
    display: none;
  }

  .interactive-map > svg {
    transform: scale(1.2);
    position: relative;
    right: 10vw;
  }
  .im-mobile {
    display: block;
    padding: 0 24px 32px;
    background: #f8f5ee;
  }

  #texture-bottom * {
    fill: #f8f5ee;
  }

  /* Scale each marker around its own centre. `transform-box: fill-box` is
     required so transform-origin resolves against the element's bounding box
     rather than the SVG viewport's 0,0 — otherwise pins drift towards the
     canvas centre as they scale. */
  .interactive-map #markers > g {
    transform-box: fill-box;
    transform-origin: center;
    transform: scale(1.5);
  }

  .im-carousel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0 4px;
  }

  /* Wrapper collapses so prev/next become flex siblings of the viewport,
     letting flex `order` place them on either side. */
  .im-mobile .custom-deal-nav { display: contents; }

  .im-mobile .custom-deal-nav button {
    all: unset;
    box-sizing: border-box;
    cursor: pointer;
    flex: 0 0 auto;
    width: 68px;
    height: 48px;
    padding: 12px 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('https://www.bundabergregion.org/wp-content/uploads/2026/03/NAV-ARR-BACKIE-new.png') center / 100% no-repeat;
    transition: transform 0.15s;
  }
  .im-mobile .custom-deal-nav button:hover { transform: scale(0.95); }
  .im-mobile .custom-deal-nav .carousel-prev { order: 0; z-index: 2; position: relative; }
  .im-mobile .custom-deal-nav .carousel-next { order: 2; z-index: 1; position: relative; }
  .im-mobile .custom-deal-nav .arrow { display: block; width: 18px; height: auto; }
  .im-mobile .custom-deal-nav .arrow.left { transform: scaleX(-1); }

  .im-mobile .im-carousel__viewport { order: 1; }

  .im-carousel__viewport {
    position: relative;
    flex: 1 1 auto;
    overflow: hidden;
  }
  .im-carousel__viewport::before,
  .im-carousel__viewport::after {
    /* content: ''; */
    position: absolute;
    top: 0;
    bottom: 0;
    width: 24px;
    pointer-events: none;
    z-index: 1;
  }
  .im-carousel__viewport::before {
    left: 0;
    background: linear-gradient(90deg, #f8f5ee 0%, rgba(248, 245, 238, 0) 100%);
  }
  .im-carousel__viewport::after {
    right: 0;
    background: linear-gradient(270deg, #f8f5ee 0%, rgba(248, 245, 238, 0) 100%);
  }

  .im-carousel__track {
    list-style: none;
    margin: 0;
    padding: 0 24px;
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .im-carousel__track::-webkit-scrollbar { display: none; }

  .im-carousel__item {
    flex: 0 0 auto;
    list-style: none;
  }
  .im-carousel__track .im-carousel__button {
    all: unset;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 11px;
    line-height: 1.2;
    letter-spacing: 0.02em;
    color: rgba(27, 40, 34, 0.55);
    text-transform: uppercase;
    white-space: nowrap;
    padding: 6px 2px;
    transition: color 0.15s;
    background-color: transparent;
  }
  .im-carousel__button:hover { color: #1b2822; }
  .im-carousel__item--active .im-carousel__button {
    color: #1b2822;
    font-weight: 700;
  }

  .im-carousel__indicator {
    display: flex;
    justify-content: center;
    color: #1b2822;
    padding: 6px 0 12px;
  }

  .im-inline-card {
    max-width: 480px;
    margin: 0 auto;
  }
  /* The shared .im-card paper styling already provides background, padding,
     shadow, image, title, description, and pill styles. No duplication needed. */

  /* Hide the modal backdrop on mobile so the inline card is the primary surface.
     The JS only opens the modal as a fallback when a region has no place data. */
  .im-modal-backdrop:not(.is-open) { display: none; }
}

@media (min-width: 769px) {
  .im-mobile { display: none !important; }
}