/* =====================================================
   Island Explorer (North / South Island pages)

   Single-screen layout:
     LEFT  : Interactive NZ map silhouette
     RIGHT : Detail card that updates on region hover/click
===================================================== */

/* Photo credit re-declared so this stylesheet works standalone. */
.photo-credit, .pc-link {
  position: absolute;
  z-index: 5;
  bottom: 12px;
  right: 12px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.78);
  padding: 6px 12px;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 4px;
  text-decoration: none;
  pointer-events: auto;
  cursor: pointer;
  transition: color 0.3s ease, background 0.3s ease;
}
.photo-credit:hover { color: var(--accent); background: rgba(0,0,0,0.85); }

/* =====================================================
   Explorer shell
===================================================== */

#island-explorer {
  position: relative;
  min-height: 100vh;
  padding: clamp(96px, 14vh, 140px) clamp(20px, 4vw, 36px) clamp(60px, 8vh, 90px);
  background:
    radial-gradient(ellipse at 80% 0%, rgba(15, 77, 47, 0.18) 0%, transparent 50%),
    var(--bg);
  overflow: hidden;
  isolation: isolate;
}

#island-explorer .ix-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--bg);
}
#island-explorer .ix-bg-layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.04);
  filter: blur(4px);
  transition:
    opacity 1.2s ease,
    filter 1.2s ease;
}
#island-explorer .ix-bg-layer.is-on {
  opacity: 0.7;
  filter: blur(0);
  animation: ixBgKen 18s ease-out forwards;
}
#island-explorer .ix-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse at 25% 40%, rgba(14,18,15,0.04) 0%, rgba(14,18,15,0.34) 62%, var(--bg) 100%),
    linear-gradient(180deg, rgba(14,18,15,0.38) 0%, rgba(14,18,15,0.56) 100%);
}
html[data-theme="light"] #island-explorer .ix-bg-layer.is-on {
  opacity: 0.66;
}
html[data-theme="light"] #island-explorer .ix-bg::after {
  background:
    radial-gradient(ellipse at 25% 40%, rgba(247,241,230,0.03) 0%, rgba(247,241,230,0.24) 62%, var(--bg) 100%),
    linear-gradient(180deg, rgba(247,241,230,0.28) 0%, rgba(247,241,230,0.46) 100%);
}
@keyframes ixBgKen {
  from { transform: scale(1.06); }
  to   { transform: scale(1); }
}

#island-explorer .ix-head {
  position: relative;
  z-index: 2;
  max-width: 1400px;
  margin: 0 auto clamp(28px, 4vh, 48px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  text-align: center;
}
#island-explorer .ix-eyebrow {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}
#island-explorer .ix-h {
  font-family: "Dream Avenue", serif;
  font-size: clamp(32px, 4.5vw, 60px);
  font-weight: 400;
  letter-spacing: -0.012em;
  line-height: 1.05;
  color: var(--fg);
  max-width: 24ch;
}
#island-explorer .ix-tag {
  font-size: clamp(13px, 1vw, 15px);
  color: var(--fg-muted);
  line-height: 1.6;
  max-width: 62ch;
}

#island-explorer .ix-stage {
  position: relative;
  z-index: 2;
  max-width: 1500px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(280px, 480px) 1fr;
  gap: clamp(28px, 4vw, 60px);
  align-items: start;
}

/* =====================================================
   Map column
===================================================== */

#island-explorer .ix-map-wrap {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
#island-explorer .ix-map {
  position: relative;
  width: 100%;
  aspect-ratio: 390 / 550;
  max-height: 80vh;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.5));
}
#island-explorer .ix-svg {
  width: 100%;
  height: 100%;
  display: block;
}
#island-explorer .ix-svg .region {
  fill: rgba(243, 236, 217, 0.10);
  stroke: rgba(10, 10, 10, 0.72);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  cursor: default;
  transition:
    fill   0.5s cubic-bezier(0.4, 0, 0.2, 1),
    stroke 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    filter 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
#island-explorer .ix-svg .ix-other-island {
  fill: rgba(243, 236, 217, 0.04);
  stroke: rgba(10, 10, 10, 0.42);
}
/* The OTHER island is one big clickable link to its dedicated page. */
#island-explorer .ix-svg .ix-other-link {
  fill: rgba(15, 77, 47, 0.18);
  stroke: rgba(15, 77, 47, 0.45);
  cursor: pointer;
}
#island-explorer .ix-svg:hover .ix-other-link,
#island-explorer .ix-svg .ix-other-link:hover,
#island-explorer .ix-svg .ix-other-link:focus-visible {
  fill: rgba(22, 98, 61, 0.55);
  stroke: rgba(22, 98, 61, 0.95);
  filter: drop-shadow(0 0 8px rgba(22, 98, 61, 0.55));
}
/* Whenever ANY other-island region is hovered, brighten ALL of them so
   the entire island reads as one link. */
#island-explorer .ix-map:has(.ix-other-link:hover) .ix-other-link,
#island-explorer .ix-map:has(.ix-other-link:focus-visible) .ix-other-link {
  fill: rgba(22, 98, 61, 0.55);
  stroke: rgba(22, 98, 61, 0.95);
  filter: drop-shadow(0 0 6px rgba(22, 98, 61, 0.5));
}

#island-explorer .ix-other-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 12px auto 0;
  padding: 10px 16px;
  align-self: center;
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent);
  border: 1px solid rgba(15, 77, 47, 0.55);
  background: rgba(15, 77, 47, 0.15);
  transition: background 0.3s ease, border-color 0.3s ease, padding 0.3s ease, color 0.3s ease;
}
#island-explorer .ix-other-cta strong { color: var(--accent-2); font-weight: 700; }
#island-explorer .ix-other-cta:hover {
  background: var(--forest);
  border-color: var(--accent);
  color: #fff;
  padding-right: 24px;
}
#island-explorer .ix-other-cta:hover strong { color: var(--accent-2); }
#island-explorer .ix-other-cta .btn-arrow { transition: transform 0.3s ease; }
#island-explorer .ix-other-cta:hover .btn-arrow { transform: translateX(4px); }
#island-explorer .ix-svg .ix-is-dest {
  fill: rgba(212, 163, 58, 0.18);
  stroke: rgba(10, 10, 10, 0.86);
  cursor: pointer;
}
#island-explorer .ix-svg .ix-is-dest:hover,
#island-explorer .ix-svg .ix-active {
  fill: var(--accent);
  stroke: rgba(10, 10, 10, 0.94);
  filter: drop-shadow(0 0 12px rgba(212, 163, 58, 0.7));
}
html[data-theme="light"] #island-explorer .ix-svg .region {
  fill: rgba(23, 20, 15, 0.035);
  stroke: rgba(23, 20, 15, 0.46);
}
html[data-theme="light"] #island-explorer .ix-svg .ix-other-island {
  fill: rgba(23, 20, 15, 0.02);
  stroke: rgba(23, 20, 15, 0.22);
}
html[data-theme="light"] #island-explorer .ix-svg .ix-other-link {
  fill: rgba(15, 77, 47, 0.12);
  stroke: rgba(15, 77, 47, 0.62);
}
html[data-theme="light"] #island-explorer .ix-svg:hover .ix-other-link,
html[data-theme="light"] #island-explorer .ix-svg .ix-other-link:hover,
html[data-theme="light"] #island-explorer .ix-svg .ix-other-link:focus-visible,
html[data-theme="light"] #island-explorer .ix-map:has(.ix-other-link:hover) .ix-other-link,
html[data-theme="light"] #island-explorer .ix-map:has(.ix-other-link:focus-visible) .ix-other-link {
  fill: rgba(15, 77, 47, 0.68);
  stroke: rgba(15, 77, 47, 0.98);
  filter: drop-shadow(0 0 7px rgba(15, 77, 47, 0.32));
}
html[data-theme="light"] #island-explorer .ix-svg .ix-is-dest {
  fill: rgba(15, 77, 47, 0.16);
  stroke: rgba(159, 117, 34, 0.9);
}
html[data-theme="light"] #island-explorer .ix-svg .ix-is-dest:hover,
html[data-theme="light"] #island-explorer .ix-svg .ix-active {
  fill: rgba(15, 77, 47, 0.72);
  stroke: rgba(159, 117, 34, 1);
  filter:
    drop-shadow(0 0 6px rgba(159, 117, 34, 0.42))
    drop-shadow(0 0 9px rgba(15, 77, 47, 0.28));
}
#island-explorer .ix-svg .region,
#island-explorer .ix-svg .region:focus,
#island-explorer .ix-svg .region:focus-visible,
#island-explorer .ix-svg .region:active {
  outline: none !important;
  -webkit-tap-highlight-color: transparent;
}
#island-explorer .ix-map-hint {
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-top: 4px;
}

/* =====================================================
   Detail card
===================================================== */

#island-explorer .ix-card {
  background: var(--panel-bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Subtle fade-up when the card content changes (region swap) */
@keyframes ixFresh {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
#island-explorer .ix-card.is-fresh .ix-card-body > * {
  animation: ixFresh 0.55s var(--ease-out) both;
}
#island-explorer .ix-card.is-fresh .ix-card-body > *:nth-child(1) { animation-delay: 0.00s; }
#island-explorer .ix-card.is-fresh .ix-card-body > *:nth-child(2) { animation-delay: 0.05s; }
#island-explorer .ix-card.is-fresh .ix-card-body > *:nth-child(3) { animation-delay: 0.10s; }
#island-explorer .ix-card.is-fresh .ix-card-body > *:nth-child(4) { animation-delay: 0.15s; }
#island-explorer .ix-card.is-fresh .ix-card-body > *:nth-child(5) { animation-delay: 0.20s; }
#island-explorer .ix-card.is-fresh .ix-card-body > *:nth-child(6) { animation-delay: 0.25s; }
#island-explorer .ix-card.is-fresh .ix-card-body > *:nth-child(7) { animation-delay: 0.30s; }

#island-explorer .ix-card.is-pulse {
  box-shadow: 0 0 0 2px rgba(212, 163, 58, 0.55);
}

#island-explorer .ix-card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #111;
}
/* Slideshow container: each .ix-slide is layered on top, only the
   `.is-on` one is visible. Soft fade between slides. */
#island-explorer .ix-slides {
  position: absolute;
  inset: 0;
}
#island-explorer .ix-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.1s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}
#island-explorer .ix-slide.is-on {
  opacity: 1;
  /* Gentle Ken-Burns runs only on the currently visible slide. */
  animation: ixSlideKen 7s ease-out forwards;
}
@keyframes ixSlideKen {
  from { transform: scale(1.05); }
  to   { transform: scale(1.0); }
}
/* Pagination dots, bottom-right corner of the media area. */
#island-explorer .ix-dots {
  position: absolute;
  z-index: 4;
  bottom: 12px;
  right: 12px;
  display: flex;
  gap: 6px;
  padding: 6px 8px;
  background: rgba(14, 18, 15, 0.55);
  border-radius: 999px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
#island-explorer .ix-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s var(--ease-out);
}
#island-explorer .ix-dot:hover { background: rgba(255, 255, 255, 0.7); }
#island-explorer .ix-dot.is-on {
  background: var(--accent);
  transform: scale(1.2);
}
#island-explorer .ix-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(0deg, rgba(14, 18, 15, 0.85) 0%, rgba(14, 18, 15, 0) 55%);
  pointer-events: none;
}
#island-explorer .ix-card-hover {
  position: absolute;
  z-index: 2;
  left: 22px;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #fff;
}
#island-explorer .ix-card-no {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}
#island-explorer .ix-card-region {
  font-family: "Dream Avenue", serif;
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 400;
  letter-spacing: -0.012em;
  line-height: 1.0;
}

#island-explorer .ix-card-body {
  padding: clamp(24px, 2.8vw, 38px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
#island-explorer .ix-card-eyebrow {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}
#island-explorer .ix-card-title {
  font-family: "Dream Avenue", serif;
  font-size: clamp(26px, 2.8vw, 38px);
  font-weight: 400;
  letter-spacing: -0.012em;
  line-height: 1.0;
  color: var(--fg);
}
#island-explorer .ix-card-tag {
  font-size: 14px;
  font-style: italic;
  color: var(--accent-2);
  line-height: 1.5;
}
#island-explorer .ix-card-intro {
  font-size: clamp(14px, 1.1vw, 16px);
  color: var(--fg-muted);
  line-height: 1.65;
}

#island-explorer .ix-card-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
#island-explorer .ix-card-meta h4 {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 6px;
}
#island-explorer .ix-card-meta p {
  font-size: 13px;
  color: var(--fg-muted);
  line-height: 1.55;
}

#island-explorer .ix-card-spots h4 {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 12px;
}
#island-explorer .ix-card-spots ul {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
#island-explorer .ix-card-spots li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: start;
}
#island-explorer .ix-card-spots .ixs-bullet {
  color: var(--accent);
  font-weight: 700;
  line-height: 1.4;
  font-size: 14px;
}
#island-explorer .ix-card-spots strong {
  display: block;
  font-weight: 700;
  font-size: 14px;
  color: var(--fg);
  letter-spacing: 0.005em;
  margin-bottom: 2px;
}
#island-explorer .ix-card-spots p {
  font-size: 12.5px;
  color: var(--fg-muted);
  line-height: 1.55;
}

#island-explorer .ix-card-cta {
  margin-top: 4px;
  display: flex;
  justify-content: flex-start;
}

/* =====================================================
   Responsive: stack map above card on narrow viewports.
===================================================== */

@media (max-width: 960px) {
  #island-explorer .ix-stage {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  #island-explorer .ix-map-wrap {
    position: static;
  }
  #island-explorer .ix-map {
    max-width: 360px;
    margin: 0 auto;
  }
  #island-explorer .ix-card-meta {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}
