/* ==========================================
HOMEPAGE — BLOCK 03
EXPLORE JAPAN BY REGION
SCOPED STYLES
=========================================== */

#ja-home-regions {
  --ja-rmap-primary: #bb3421;
  --ja-rmap-primary-dark: #9f2b1c;
  --ja-rmap-secondary: #0b2c4f;
  --ja-rmap-accent: #d9b26f;
  --ja-rmap-body: #4f6474;
  --ja-rmap-border: #d9e2ec;
  --ja-rmap-bg: #f8f7f4;
  --ja-rmap-white: #ffffff;
  --ja-rmap-land: #d8edd4;
  --ja-rmap-land-hover: #efc6bc;
  --ja-rmap-land-active: #de7667;

  width: 100%;
  padding: 56px 0 60px;
  color: var(--ja-rmap-body);
  font-family: inherit;
}

#ja-home-regions,
#ja-home-regions * {
  box-sizing: border-box;
}


/* ==========================================
CONTAINER
=========================================== */

#ja-home-regions .ja-rmap-container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
}


/* ==========================================
HEADER
=========================================== */

#ja-home-regions .ja-rmap-header {
  max-width: 720px;
  margin: 0 0 30px;
}

#ja-home-regions .ja-rmap-eyebrow,
#ja-home-regions .ja-rmap-card-eyebrow {
  margin: 0 0 9px;
  color: var(--ja-rmap-primary);
  font-size: 11px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

#ja-home-regions .ja-rmap-header h2 {
  margin: 0;
  color: var(--ja-rmap-secondary);
  font-size: 38px;
  line-height: 1.16;
  font-weight: 700;
  letter-spacing: -0.6px;
}

#ja-home-regions .ja-rmap-intro {
  max-width: 620px;
  margin: 11px 0 0;
  color: var(--ja-rmap-body);
  font-size: 15px;
  line-height: 1.6;
}


/* ==========================================
DESKTOP GRID
MAP LEFT / CARD RIGHT
=========================================== */

#ja-home-regions .ja-rmap-explorer {
  display: grid;
  grid-template-columns: minmax(0, 1.68fr) minmax(310px, 0.78fr);
  grid-template-areas: "map card";
  gap: 34px;
  align-items: center;
}

#ja-home-regions .ja-rmap-map-column {
  grid-area: map;
  min-width: 0;
}

#ja-home-regions .ja-rmap-card-column {
  grid-area: card;
  min-width: 0;
}


/* ==========================================
MAP PANEL
=========================================== */

#ja-home-regions .ja-rmap-map-wrap {
  width: 100%;
  height: 590px;
  min-height: 590px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(217, 226, 236, 0.95);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(11, 44, 79, 0.05);
}

#ja-home-regions .ja-rmap-map-stage {
  width: 100%;
  height: 100%;
  min-height: 590px;
  position: relative;
}

#ja-home-regions .ja-rmap-svg--main {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}


/* ==========================================
PREFECTURES / REGION STATES
=========================================== */

#ja-home-regions .ja-rmap-prefecture {
  fill: var(--ja-rmap-land);
  stroke: #ffffff;
  stroke-width: 0.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  cursor: pointer;
  transition: fill 0.18s ease, opacity 0.18s ease;
}

#ja-home-regions .ja-rmap-prefecture.is-preview {
  fill: var(--ja-rmap-land-hover);
}

#ja-home-regions .ja-rmap-prefecture.is-active {
  fill: var(--ja-rmap-land-active);
}


/* ==========================================
REGION LABELS
=========================================== */

#ja-home-regions .ja-rmap-region-label {
  cursor: pointer;
  outline: none;
}

#ja-home-regions .ja-rmap-region-label text {
  fill: var(--ja-rmap-secondary);
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.96);
  stroke-width: 4px;
  stroke-linejoin: round;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  pointer-events: all;
  cursor: pointer;
  transition: fill 0.18s ease;
}

#ja-home-regions .ja-rmap-region-label.is-preview text,
#ja-home-regions .ja-rmap-region-label.is-active text,
#ja-home-regions .ja-rmap-region-label:focus-visible text {
  fill: var(--ja-rmap-primary);
}


/* ==========================================
CITY MARKERS
=========================================== */

#ja-home-regions .ja-rmap-city-link {
  cursor: pointer;
  text-decoration: none;
}

#ja-home-regions .ja-rmap-city-line {
  stroke: #a6b5bf;
  stroke-width: 0.8;
  opacity: 0.88;
  pointer-events: none;
}

#ja-home-regions .ja-rmap-city-ring {
  fill: #ffffff;
  stroke: #ffffff;
  stroke-width: 1.5;
  pointer-events: none;
}

#ja-home-regions .ja-rmap-city-dot {
  fill: var(--ja-rmap-primary);
  stroke: #ffffff;
  stroke-width: 1.2;
  pointer-events: none;
}

#ja-home-regions .ja-rmap-city-label {
  fill: #526776;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.98);
  stroke-width: 4px;
  stroke-linejoin: round;
  font-family: inherit;
  font-size: 10.8px;
  font-weight: 500;
  pointer-events: none;
}

#ja-home-regions .ja-rmap-city-link--primary .ja-rmap-city-label {
  fill: var(--ja-rmap-secondary);
  font-size: 12.5px;
  font-weight: 700;
}

#ja-home-regions .ja-rmap-city-link--featured .ja-rmap-city-label {
  fill: #243f59;
  font-size: 11.5px;
  font-weight: 700;
}

#ja-home-regions .ja-rmap-city-link:hover .ja-rmap-city-label,
#ja-home-regions .ja-rmap-city-link:focus .ja-rmap-city-label {
  fill: var(--ja-rmap-primary);
}

#ja-home-regions .ja-rmap-city-link:hover .ja-rmap-city-dot,
#ja-home-regions .ja-rmap-city-link:focus .ja-rmap-city-dot {
  fill: var(--ja-rmap-secondary);
}


/* ==========================================
OKINAWA INSET
=========================================== */

#ja-home-regions .ja-rmap-okinawa-inset {
  position: absolute;
  right: 20px;
  bottom: 22px;
  width: 142px;
  height: 108px;
  z-index: 3;
}

#ja-home-regions .ja-rmap-okinawa-button {
  width: 100%;
  height: 100%;
  position: relative;
  display: block;
  padding: 24px 6px 5px;
  overflow: hidden;
  border: 1px solid #e2e9ef;
  border-radius: 12px;
  background: rgba(255,255,255,0.96);
  box-shadow: 0 7px 20px rgba(11,44,79,0.08);
  cursor: pointer;
}

#ja-home-regions .ja-rmap-okinawa-title {
  position: absolute;
  top: 8px;
  left: 10px;
  z-index: 2;
  color: var(--ja-rmap-secondary);
  font-size: 11px;
  line-height: 1;
  font-weight: 700;
}

#ja-home-regions .ja-rmap-svg--okinawa {
  display: block;
  width: 100%;
  height: 100%;
}

#ja-home-regions .ja-rmap-okinawa-button.is-active {
  border-color: rgba(187,52,33,0.30);
  box-shadow: 0 8px 22px rgba(187,52,33,0.12);
}

#ja-home-regions .ja-rmap-okinawa-button.is-active .ja-rmap-prefecture,
#ja-home-regions .ja-rmap-okinawa-button:hover .ja-rmap-prefecture {
  fill: var(--ja-rmap-land-active);
}

#ja-home-regions .ja-rmap-okinawa-button.is-active .ja-rmap-okinawa-title,
#ja-home-regions .ja-rmap-okinawa-button:hover .ja-rmap-okinawa-title {
  color: var(--ja-rmap-primary);
}


/* ==========================================
TOOLTIP
=========================================== */

#ja-home-regions .ja-rmap-tooltip {
  position: absolute;
  z-index: 20;
  left: 0;
  top: 0;
  max-width: 190px;
  padding: 7px 10px;
  border-radius: 7px;
  background: rgba(11,44,79,0.94);
  color: #ffffff;
  font-size: 11px;
  line-height: 1.35;
  font-weight: 700;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(-9999px,-9999px,0);
  transition: opacity 0.12s ease;
}

#ja-home-regions .ja-rmap-tooltip.is-visible {
  opacity: 1;
}


/* ==========================================
MAP NOTE
=========================================== */

#ja-home-regions .ja-rmap-map-note {
  margin: 10px 0 0;
  color: #728492;
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}


/* ==========================================
REGION CARD
=========================================== */

#ja-home-regions .ja-rmap-card {
  width: 100%;
  overflow: visible;
  border: 1px solid rgba(217,226,236,0.95);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(11,44,79,0.08);
}

#ja-home-regions .ja-rmap-card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: visible;
  border-radius: 15px 15px 0 0;
  background: #edf3f7;
}

#ja-home-regions .ja-rmap-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 15px 15px 0 0;
}


/* CARD ARROWS */

#ja-home-regions .ja-rmap-arrow {
  position: absolute;
  top: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 50% !important;
  background: #ffffff !important;
  color: #0b2c4f !important;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(11, 44, 79, 0.25) !important;
  transform: translateY(-50%);
  z-index: 10;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

#ja-home-regions .ja-rmap-arrow--prev {
  left: -22px;
}

#ja-home-regions .ja-rmap-arrow--next {
  right: -22px;
}

#ja-home-regions .ja-rmap-arrow svg {
  width: 20px;
  height: 20px;
  display: block;
}

#ja-home-regions .ja-rmap-arrow path {
  fill: none !important;
  stroke: #0b2c4f !important;
  stroke-width: 3px !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  transition: stroke 0.2s ease !important;
}

#ja-home-regions .ja-rmap-arrow:hover {
  background: #bb3421 !important;
  border-color: #bb3421 !important;
  box-shadow: 0 10px 28px rgba(187, 52, 33, 0.4) !important;
  transform: translateY(-50%) scale(1.1) !important;
}

#ja-home-regions .ja-rmap-arrow:hover path {
  stroke: #ffffff !important;
}


/* CARD INDEX */

#ja-home-regions .ja-rmap-card-index {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 6px 9px;
  border-radius: 6px;
  background: rgba(11,44,79,0.88);
  color: #ffffff;
  font-size: 11px;
  line-height: 1;
  font-weight: 700;
}


/* CARD BODY */

#ja-home-regions .ja-rmap-card-body {
  padding: 23px 22px 24px;
}

#ja-home-regions .ja-rmap-card-body h3 {
  margin: 0;
  color: var(--ja-rmap-secondary);
  font-size: 24px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.3px;
}

#ja-home-regions #ja-rmap-card-description {
  margin: 11px 0 0;
  color: var(--ja-rmap-body);
  font-size: 14px;
  line-height: 1.6;
}


/* CARD CTA */

#ja-home-regions .ja-rmap-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 16px;
  color: var(--ja-rmap-primary);
  font-size: 13px;
  line-height: 1.4;
  font-weight: 700;
  text-decoration: none !important;
}

#ja-home-regions .ja-rmap-card-cta:hover {
  color: var(--ja-rmap-primary-dark);
  gap: 10px;
}

#ja-home-regions .ja-rmap-card-cta svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

#ja-home-regions .ja-rmap-card-cta path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}


/* ==========================================
MOBILE REGION SELECT
=========================================== */

#ja-home-regions .ja-rmap-mobile-control {
  display: none;
}


/* ==========================================
FULL EXPLORER LINK
=========================================== */

#ja-home-regions .ja-rmap-footer-link {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 17px;
  color: #718491;
  font-size: 12px;
  line-height: 1.5;
}

#ja-home-regions .ja-rmap-footer-link a {
  color: var(--ja-rmap-secondary);
  font-weight: 700;
  text-decoration: none !important;
}

#ja-home-regions .ja-rmap-footer-link a:hover {
  color: var(--ja-rmap-primary);
}


/* ==========================================
TABLET
=========================================== */

@media (max-width: 1024px) {

  #ja-home-regions .ja-rmap-explorer {
    grid-template-columns: minmax(0, 1.42fr) minmax(270px, 0.86fr);
    gap: 30px;
  }

  #ja-home-regions .ja-rmap-map-wrap {
    height: 530px;
    min-height: 530px;
  }

  #ja-home-regions .ja-rmap-map-stage {
    min-height: 530px;
  }
}


/* ==========================================
STACKED / SMALL TABLET
=========================================== */

@media (max-width: 820px) {

  #ja-home-regions {
    padding: 50px 0 54px;
  }

  #ja-home-regions .ja-rmap-explorer {
    grid-template-columns: 1fr;
    grid-template-areas:
      "card"
      "map";
    gap: 30px;
  }

  #ja-home-regions .ja-rmap-card-column {
    width: min(100%, 470px);
    margin: 0 auto;
  }

  #ja-home-regions .ja-rmap-mobile-control {
    display: block;
    margin-top: 15px;
  }

  #ja-home-regions .ja-rmap-mobile-control label {
    display: block;
    margin-bottom: 7px;
    color: var(--ja-rmap-secondary);
    font-size: 12px;
    font-weight: 700;
  }

  #ja-home-regions .ja-rmap-mobile-control select {
    width: 100%;
    min-height: 46px;
    padding: 0 13px;
    border: 1px solid var(--ja-rmap-border);
    border-radius: 9px;
    background: #ffffff;
    color: var(--ja-rmap-secondary);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
  }
}


/* ==========================================
MOBILE
=========================================== */

@media (max-width: 767px) {

  #ja-home-regions {
    padding: 46px 0 50px;
  }

  #ja-home-regions .ja-rmap-container {
    padding: 0 20px;
  }

  #ja-home-regions .ja-rmap-header {
    margin-bottom: 25px;
  }

  #ja-home-regions .ja-rmap-header h2 {
    font-size: 29px;
    line-height: 1.2;
  }

  #ja-home-regions .ja-rmap-intro {
    font-size: 14px;
  }

  #ja-home-regions .ja-rmap-card-column {
    padding: 0 12px;
  }

  #ja-home-regions .ja-rmap-card-body {
    padding: 21px 20px 22px;
  }

  #ja-home-regions .ja-rmap-map-column {
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  #ja-home-regions .ja-rmap-map-wrap {
    width: 650px;
    min-width: 650px;
    height: 600px;
    min-height: 600px;
  }

  #ja-home-regions .ja-rmap-map-stage {
    width: 650px;
    min-height: 600px;
  }

  #ja-home-regions .ja-rmap-map-note {
    width: 650px;
    min-width: 650px;
    text-align: left;
  }

  #ja-home-regions .ja-rmap-footer-link {
    display: block;
    margin-top: 15px;
  }

  #ja-home-regions .ja-rmap-footer-link a {
    display: inline-block;
    margin-top: 3px;
  }
}


/* ==========================================
REDUCED MOTION
=========================================== */

@media (prefers-reduced-motion: reduce) {
  #ja-home-regions *,
  #ja-home-regions *::before,
  #ja-home-regions *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}