/* Foundation */

.jth-section {
  margin: var(--jth-space-4) 0;
}

.jth-section h2 {
  font-size: var(--jth-text-xl);
  color: var(--jth-ink);
  line-height: 1.3;
  margin-bottom: var(--jth-space-1);
}

.jth-section h3 {
  font-size: var(--jth-text-lg);
  color: var(--jth-ink);
  line-height: 1.3;
}

.jth-section p {
  font-size: var(--jth-text-base);
  color: var(--jth-muted);
  line-height: 1.7;
}

/* Foundation: section headings.
   Cocoon/WordPress sometimes adds a gray heading block style to top-level
   block headings. For the travel-guide sections, we want a lighter, more
   editorial look with the heading sitting directly in the flow. */
.jth-section > h2.wp-block-heading,
.home .entry-content > h2.wp-block-heading {
  margin: 0 0 var(--jth-space-1) !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--jth-ink-strong);
  font-size: var(--jth-text-xl);
  line-height: 1.25;
}

.home .entry-content > h2.wp-block-heading {
  margin-top: var(--jth-space-4) !important;
}

/* Foundation: contextual nav */

.jth-related-nav {
  border-top: 1px solid var(--jth-border);
  padding-top: var(--jth-space-2);
  margin-top: var(--jth-space-3);
  display: flex;
  flex-wrap: wrap;
  gap: var(--jth-space-1);
}

.jth-related-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 var(--jth-space-2);
  border: 1px solid var(--jth-border-soft);
  border-radius: var(--jth-radius);
  background: var(--jth-bg-panel);
  color: var(--jth-accent);
  text-decoration: none;
}

.jth-related-nav a:hover {
  border-color: var(--jth-accent);
  box-shadow: var(--jth-shadow-card);
}

.jth-article-footer {
  margin: var(--jth-space-4) 0 0;
  padding: var(--jth-space-2);
  border: 1px solid var(--jth-border-soft);
  border-radius: var(--jth-radius-lg);
  background: var(--jth-bg);
  box-shadow: var(--jth-shadow-card);
}

.jth-article-footer h2 {
  margin: 0 0 var(--jth-space-1);
  font-size: var(--jth-text-xl);
  color: var(--jth-ink-strong);
}

/* Foundation: curated article cards in Related guides. */
.jth-related-guides__articles {
  margin-top: var(--jth-space-3);
}

.jth-related-guides__cards {
  display: flex;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory;
  gap: var(--jth-space-1);
  padding: 0 0 var(--jth-space-1);
  -webkit-overflow-scrolling: touch;
}

.jth-related-guide-card {
  display: flex;
  flex-direction: column;
  flex: 0 0 min(300px, 82vw);
  min-width: 0;
  overflow: hidden;
  scroll-snap-align: start;
  border: 1px solid var(--jth-border-soft);
  border-radius: var(--jth-radius);
  background: var(--jth-bg-panel);
  color: var(--jth-ink);
  text-decoration: none;
  transition: var(--jth-transition);
}

.jth-related-guide-card:hover {
  border-color: var(--jth-accent);
  box-shadow: var(--jth-shadow-hover);
  transform: translateY(-1px);
}

.jth-related-guide-card__image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* Hotel recommendation cards reserve a stable image slot until licensed photos are connected. */
.jth-hotel-recommendation-card__image {
  display: flex;
  width: 100%;
  aspect-ratio: 16 / 9;
  align-items: center;
  justify-content: center;
  background: var(--jth-bg-panel);
  color: var(--jth-muted);
  font-size: var(--jth-text-sm);
}

.jth-hotel-recommendation-card__photo {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* Reusable image frame for property cards in prefecture hotel articles. */
.jth-hotel-card__image {
  display: flex;
  width: 100%;
  aspect-ratio: 16 / 9;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--jth-border-soft);
  background: var(--jth-photo-placeholder);
  color: var(--jth-ink);
  font-size: var(--jth-text-sm);
  font-weight: 600;
}

.jth-hotel-card__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.jth-hotel-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--jth-space-2);
}

.jth-hotel-cards--four-up {
  grid-template-columns: 1fr;
}

.jth-hotel-card {
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--jth-border-soft);
  border-radius: var(--jth-radius);
  background: var(--jth-bg-panel);
}

.jth-hotel-card__photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.jth-hotel-card__body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: var(--jth-space-2);
}

.jth-hotel-card > .jth-hotel-card__image {
  order: 2;
}

.jth-hotel-card__body {
  display: contents;
}

.jth-hotel-card__body h3 {
  order: 1;
  margin: 0;
  padding: var(--jth-space-2) var(--jth-space-2) 0;
  border: 0;
  background: transparent;
  color: var(--jth-ink);
  font-size: var(--jth-text-lg);
  line-height: 1.4;
}

.jth-hotel-card__booking-links {
  order: 3;
  display: flex;
  flex-wrap: wrap;
  gap: var(--jth-space-1);
  margin: 0;
  padding: var(--jth-space-2);
}

.jth-hotel-card__affiliate-disclosure {
  margin: var(--jth-space-2) 0 0;
  color: var(--jth-muted);
  font-size: var(--jth-text-sm);
  line-height: 1.5;
}

.jth-hotel-booking-button {
  display: inline-flex;
  min-height: 44px;
  flex: 1 1 120px;
  align-items: center;
  justify-content: center;
  padding: var(--jth-space-1) var(--jth-space-2);
  border: 1px solid var(--jth-accent);
  border-radius: var(--jth-radius);
  background: var(--jth-accent);
  color: #fff;
  font-size: var(--jth-text-sm);
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
  transition: var(--jth-transition);
}

.jth-hotel-booking-button:hover {
  border-color: var(--jth-accent-dark);
  background: var(--jth-accent-dark);
  color: #fff;
}

.jth-hotel-booking-button:focus-visible {
  outline: 3px solid var(--jth-accent-dark);
  outline-offset: 2px;
}

@media (min-width: 768px) {
  .jth-hotel-cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .jth-hotel-cards--four-up {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .jth-hotel-card {
    min-width: 0;
  }

  .jth-hotel-card__image {
    border-right: 0;
    border-bottom: 1px solid var(--jth-border-soft);
  }
}

.jth-related-guide-card__body {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: var(--jth-space-1) var(--jth-space-2);
}

.jth-related-guide-card__context {
  color: var(--jth-muted);
  font-size: var(--jth-text-sm);
}

.jth-related-guide-card__title {
  color: var(--jth-ink-strong);
  font-weight: 700;
  line-height: 1.35;
}

.jth-hotel-recommendation-card__image {
  padding: 8px;
  text-align: center;
}

/* Foundation: compact source note for researched articles.
   Keep this quieter than CTAs and theme-injected related guides. */
.jth-sources-checked {
  margin: var(--jth-space-3) 0 0;
  padding-top: var(--jth-space-1);
  border-top: 1px solid var(--jth-border-soft);
  color: var(--jth-muted);
  font-size: var(--jth-text-sm);
  line-height: 1.6;
}

.jth-sources-checked p {
  margin: 0;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}

.jth-sources-checked a {
  color: var(--jth-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Foundation: affiliate disclosure */

.jth-affiliate-disclosure {
  font-size: var(--jth-text-sm);
  color: var(--jth-muted);
  border-top: 1px solid var(--jth-border);
  padding-top: var(--jth-space-1);
  margin-top: var(--jth-space-3);
}

/* Article affiliate disclosure and context-led editorial links. */
.jth-article-affiliate-notice {
  margin: 0 0 var(--jth-space-2);
  color: var(--jth-muted);
  font-size: var(--jth-text-sm);
  line-height: 1.5;
}

.jth-article-affiliate-notice a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.jth-article-affiliate-cta {
  margin: var(--jth-space-3) 0;
}

/* Contextual affiliate CTAs share one panel style across article categories. */
.jth-article-affiliate-cta--stay,
.jth-article-affiliate-cta--panel {
  padding: var(--jth-space-2) var(--jth-space-3);
  border: 1px solid var(--jth-border-soft);
  border-left: 4px solid var(--jth-accent);
  border-radius: var(--jth-radius);
  background: var(--jth-bg-panel);
}

.entry-content .jth-article-affiliate-cta--stay > h2,
.entry-content .jth-article-affiliate-cta--panel > h2,
.entry-content .jth-article-affiliate-cta--panel > h3 {
  margin: 0 0 var(--jth-space-1);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--jth-ink-strong);
  font-size: var(--jth-text-lg);
  line-height: 1.4;
}

.jth-article-affiliate-cta--stay > p,
.jth-article-affiliate-cta--panel > p {
  margin: var(--jth-space-1) 0 0;
}

.jth-article-affiliate-cta--stay > .jth-article-affiliate-disclosure,
.jth-article-affiliate-cta--panel > .jth-article-affiliate-disclosure {
  margin-top: var(--jth-space-2);
}

.jth-article-affiliate-link {
  display: inline-block;
  padding: var(--jth-space-1) var(--jth-space-2);
  border-radius: var(--jth-radius);
  background: var(--jth-accent);
  color: #fff;
  text-decoration: none;
}

.jth-article-affiliate-link:hover,
.jth-article-affiliate-link:focus-visible {
  background: var(--jth-accent-dark);
  color: #fff;
}

.jth-article-affiliate-link {
  font-weight: 700;
  overflow-wrap: anywhere;
}

@media (max-width: 600px) {
  .jth-article-affiliate-cta--panel .jth-article-affiliate-link {
    display: flex;
    width: 100%;
    box-sizing: border-box;
    justify-content: center;
    text-align: center;
  }
}

.jth-article-affiliate-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 44px;
  max-width: 100%;
  padding: var(--jth-space-1) var(--jth-space-2);
  border: 1px solid var(--jth-accent);
  border-radius: var(--jth-radius);
  background: var(--jth-accent);
  color: #fff;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.jth-article-affiliate-button:hover,
.jth-article-affiliate-button:focus-visible {
  background: var(--jth-accent-dark);
  color: #fff;
}

.jth-article-affiliate-disclosure {
  margin: var(--jth-space-1) 0 0;
  color: var(--jth-muted);
  font-size: var(--jth-text-sm);
  line-height: 1.5;
}

@media (max-width: 600px) {
  .jth-article-affiliate-button {
    width: 100%;
  }
}
