/* Go There Media — Japan Travel Guide Stylesheet v2 (with Embedded Photos & Lightbox) */
:root {
  --bg: #faf9f6;
  --surface: #ffffff;
  --surface-alt: #f3f0ea;
  --text: #1c1917;
  --text-muted: #57534e;
  --accent: #b91c1c;
  --accent-dark: #991b1b;
  --accent-soft: #fef2f2;
  --indigo: #1e3a5f;
  --indigo-soft: #eff6ff;
  --border: #e7e5e4;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 6px 20px rgba(0,0,0,0.08);
  --radius: 12px;
  --max-width: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.68;
  font-size: 16.5px;
}

/* Header & Navigation */
.site-header {
  background: var(--indigo);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.brand-badge {
  background: var(--accent);
  color: #fff;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.nav-links {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  align-items: center;
}
.nav-links a {
  color: rgba(255,255,255,0.88);
  text-decoration: none;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.nav-links a:hover, .nav-links a.active {
  background: rgba(255,255,255,0.16);
  color: #fff;
}
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff;
  padding: 0.4rem 0.7rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
}

/* Hero Banner */
.hero {
  background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 55%, #7f1d1d 100%);
  color: #fff;
  padding: 3rem 1.25rem 2.75rem;
  border-bottom: 4px solid var(--accent);
}
.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}
.hero-kicker {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.85rem, 3.6vw, 2.75rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
}
.hero p {
  margin: 0 0 1.35rem;
  max-width: 780px;
  color: rgba(255,255,255,0.92);
  font-size: 1.06rem;
}

/* Search Bar */
.search-box {
  position: relative;
  max-width: 560px;
}
.search-box input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.6rem;
  border-radius: 10px;
  border: none;
  font-size: 0.98rem;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  outline: none;
}
.search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: #78716c;
  pointer-events: none;
}
.search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  color: var(--text);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.22);
  max-height: 360px;
  overflow-y: auto;
  z-index: 200;
  display: none;
}
.search-results.open { display: block; }
.search-result-item {
  display: block;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
}
.search-result-item:hover { background: var(--surface-alt); }
.search-result-title { font-weight: 700; color: var(--indigo); font-size: 0.95rem; }
.search-result-snippet { font-size: 0.84rem; color: var(--text-muted); margin-top: 0.2rem; }

/* Page Layout with Sidebar TOC */
.page-layout {
  max-width: var(--max-width);
  margin: 2rem auto 4rem;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2.25rem;
  align-items: start;
}
.toc-sidebar {
  position: sticky;
  top: 4.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem;
  box-shadow: var(--shadow-sm);
  max-height: calc(100vh - 6rem);
  overflow-y: auto;
}
.toc-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 0 0 0.65rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--border);
}
.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.toc-list li { margin-bottom: 0.35rem; }
.toc-list a {
  display: block;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.89rem;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  transition: all 0.15s;
}
.toc-list a:hover {
  background: var(--indigo-soft);
  color: var(--indigo);
  font-weight: 600;
}

/* Main Content Cards & Typography */
.content-area { min-width: 0; }
.section-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-sm);
  scroll-margin-top: 5rem;
}
.section-card h2 {
  margin-top: 0;
  color: var(--indigo);
  font-size: 1.55rem;
  border-bottom: 2px solid var(--surface-alt);
  padding-bottom: 0.55rem;
  margin-bottom: 1.1rem;
}
.section-card h3 {
  color: var(--accent-dark);
  font-size: 1.18rem;
  margin-top: 1.5rem;
  margin-bottom: 0.6rem;
}
.section-card p { margin: 0 0 1rem; }
.section-card ul {
  padding-left: 1.35rem;
  margin: 0 0 1.15rem;
}
.section-card li {
  margin-bottom: 0.7rem;
}
.section-card a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 500;
}
.section-card a:hover {
  color: var(--indigo);
}

/* Callout Boxes */
.callout {
  background: var(--surface-alt);
  border-left: 4px solid var(--indigo);
  padding: 1.1rem 1.3rem;
  border-radius: 0 10px 10px 0;
  margin-bottom: 1.5rem;
}
.callout.highlight {
  background: var(--accent-soft);
  border-left-color: var(--accent);
}
.callout-title {
  font-weight: 700;
  color: var(--indigo);
  margin-bottom: 0.4rem;
  display: block;
}
.callout.highlight .callout-title { color: var(--accent-dark); }

/* Embedded Google Doc Photo Cards & Galleries */
.doc-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin: 1rem 0 1.35rem;
}
.doc-photo-card {
  margin: 1rem 0 1.35rem;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  max-width: 680px;
}
.doc-photo-grid .doc-photo-card {
  margin: 0;
  max-width: none;
}
.doc-photo-card img {
  width: 100%;
  max-height: 440px;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
  transition: transform 0.2s ease;
}
.doc-photo-card img:hover {
  transform: scale(1.015);
}
.doc-photo-card figcaption {
  padding: 0.55rem 0.85rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.doc-photo-card.photo-missing {
  display: none;
}

/* Lightbox Overlay */
.lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  cursor: zoom-out;
}
.lightbox-modal.open { display: flex; }
.lightbox-inner {
  max-width: 92vw;
  max-height: 90vh;
  text-align: center;
}
.lightbox-inner img {
  max-width: 100%;
  max-height: 82vh;
  border-radius: 8px;
  box-shadow: 0 10px 35px rgba(0,0,0,0.6);
}
.lightbox-caption {
  color: #f5f5f4;
  margin-top: 0.65rem;
  font-size: 0.95rem;
}

/* YouTube Thumbnail Embed Cards */
.yt-embed-card {
  margin: 1.1rem 0 1.35rem;
  background: #111827;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  max-width: 680px;
}
.yt-facade {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  cursor: pointer;
  overflow: hidden;
  background: #000;
}
.yt-facade img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease, opacity 0.25s ease;
  opacity: 0.92;
}
.yt-facade:hover img {
  transform: scale(1.02);
  opacity: 1;
}
.yt-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 48px;
  background: rgba(220, 38, 38, 0.92);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.45);
  transition: background 0.15s, transform 0.15s;
}
.yt-facade:hover .yt-play-btn {
  background: #ef4444;
  transform: translate(-50%, -50%) scale(1.07);
}
.yt-play-btn svg {
  width: 26px;
  height: 26px;
  fill: #fff;
  margin-left: 3px;
}
.yt-caption {
  padding: 0.65rem 1rem;
  background: #1f2937;
  color: #f3f4f6;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.yt-caption a {
  color: #93c5fd !important;
  text-decoration: none !important;
  font-size: 0.82rem;
  white-space: nowrap;
}
.yt-iframe-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
}
.yt-iframe-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Quick Nav Grid on Home */
.region-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0 1.75rem;
}
.region-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
  text-decoration: none !important;
  color: var(--text) !important;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.region-tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--indigo);
}
.region-tile h3 {
  margin: 0 0 0.4rem;
  color: var(--indigo);
  font-size: 1.1rem;
}
.region-tile p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  background: #1c1917;
  color: #d6d3d1;
  padding: 2.25rem 1.25rem;
  font-size: 0.9rem;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
}
.site-footer a { color: #fca5a5; }

/* Responsive */
@media (max-width: 900px) {
  .page-layout {
    grid-template-columns: 1fr;
  }
  .toc-sidebar {
    position: static;
    max-height: none;
  }
  .nav-toggle { display: inline-block; }
  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-top: 0.5rem;
  }
  .nav-links.open { display: flex; }
  .section-card { padding: 1.3rem 1.2rem; }
}
