/* =========================
   Travel Hero
========================= */

.travel-header {
  padding: 0 0 24px;
}

.travel-header__home {
  display: inline-flex;
  text-decoration: underline;
}

.main {
  box-sizing: border-box;
  width: 100%;
  overflow-x: hidden;
}

.travel-hero {
  box-sizing: border-box;
  width: 100%;
  min-height: 420px;
  height: min(65vh, 620px);
  background-image: url("../img/travel/travel_kyusyu.jpg");
  background-size: cover;
  background-position: center;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.travel-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.travel-hero__inner {
  box-sizing: border-box;
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 clamp(24px, 6vw, 56px);
  color: #fff;
}

.travel-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(36px, 7vw, 48px);
  line-height: 1.1;
  letter-spacing: 0;
}

.travel-hero p {
  max-width: 520px;
  margin: 0;
  font-size: 16px;
  line-height: 1.8;
  opacity: 0.9;
  overflow-wrap: anywhere;
}

.travel-hero p span {
  display: block;
}

/* =========================
   Section
========================= */

.travel-list {
  margin: clamp(48px, 8vw, 80px) 0 0;
}

.travel-contents {
  box-sizing: border-box;
  width: min(100%, 900px);
  max-width: 900px;
  margin: 0 auto;
}

.travel-list .section-title {
  margin: 0 0 24px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e5e7eb;
  font-size: 1.8rem;
}

.travel-card-list {
  display: grid;
  width: 100%;
  gap: 16px;
}

.travel-card {
  box-sizing: border-box;
  min-width: 0;
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  overflow-wrap: anywhere;
}

.travel-card.is-active {
  border-color: #7ad3c0;
  box-shadow: 0 8px 18px rgba(21, 128, 116, 0.16);
}

.travel-card__header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
}

.travel-card__title {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.4;
}

.travel-card__status {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e7f5f2;
  color: #158074;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.travel-card__meta {
  margin: 0 0 10px;
  color: #555;
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-line;
}

.travel-card__summary {
  margin: 0;
  line-height: 1.8;
}

.travel-card__link {
  display: inline-flex;
  align-items: center;
  margin-top: 12px;
  color: #007bff;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.travel-card__link:hover {
  color: #0056b3;
  text-decoration: underline;
}

/* =========================
   Travel Map
========================= */

.travel-map {
  box-sizing: border-box;
  width: 100%;
  position: relative;
  z-index: 2;
  margin-top: clamp(48px, 8vw, 80px);
  padding: 64px clamp(12px, 4vw, 24px);
  transform-origin: center center;
  background: #f7f7f7;
  overflow: hidden;
}

.map-wrapper {
  width: min(100%, 900px);
  margin: 0 auto;
  height: auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow: hidden;
}

.japan-map {
  width: min(100%, 800px);
  height: auto;
  max-width: 100%;
  transform-origin: center top;
  display: block;
}

.travel-map .section-title {
  text-align: center;
}

.japan-map .map-land {
  fill: #fff;
  stroke: #666;
  stroke-width: 1;
  transition: fill 0.2s ease, stroke 0.2s ease, transform 0.2s ease;
}

.japan-map .map-land.is-visited {
  fill: #7ad3c0;
}

.japan-map .map-land.is-active {
  fill: #158074;
  stroke: #0f5f56;
}

.japan-map .map-land.is-visited:hover {
  fill: #158074;
  transform: scale(1.002);
  cursor: pointer;
}
/* =========================
   Popup
========================= */

.popup {
  box-sizing: border-box;
  position: absolute;
  display: none; /* 初期状態では非表示 */
  background-color: white;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  font-family: Arial, sans-serif;
  max-width: min(280px, calc(100vw - 32px));
}

.popup h3 {
  margin: 0;
  font-size: 16px;
  color: #333;
}

.popup p {
  margin: 6px 0 0;
  color: #555;
  font-size: 13px;
}

.popup a {
  color: #158074;
  text-decoration: none;
}

.popup a:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .travel-hero {
    min-height: 420px;
    height: min(62vh, 560px);
    background-position: center top;
  }

  .travel-hero__inner {
    justify-content: flex-end;
    padding: 0 24px 56px;
  }

  .travel-hero h1 {
    font-size: 40px;
  }

  .travel-hero p {
    max-width: 100%;
    font-size: 15px;
  }

  .travel-map {
    padding: 48px 12px;
  }

  .travel-list .section-title {
    font-size: 1.5rem;
  }

  .travel-card__header {
    flex-direction: column;
    gap: 8px;
  }

  .map-wrapper {
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .japan-map {
    flex: 0 0 187.5%;
    width: 187.5%;
    max-width: none;
  }

  .popup {
    width: max-content;
  }
}
