/* =========================================
   TRAVEL JOURNAL
   Inherits homepage styling from styles.css
   ========================================= */

/* =========================================
   1. TRAVEL THEME
   ========================================= */

.travel-page {
  --travel-blue: var(--accent, #0073bc);
  --travel-deep: #164f7b;
  --travel-soft: #edf6fb;
  --travel-line: #dbe9f1;
}

.travel-page h1 em,
.travel-page h2 em {
  color: var(--travel-blue);
}


/* =========================================
   2. TRAVEL INTRODUCTION
   ========================================= */

.travel-intro {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
  padding-top: 90px;
  padding-bottom: 90px;
}

.travel-intro-copy {
  max-width: 650px;
}

.travel-intro h1 {
  font-size: clamp(2.9rem, 5.5vw, 5.1rem);
  line-height: 1.13;
  letter-spacing: -0.05em;
  margin: 14px 0 25px;
}

.travel-intro p {
  line-height: 1.9;
  margin-bottom: 19px;
}

.travel-lead {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 600;
}

.travel-intro .btn {
  margin-top: 15px;
}


/* =========================================
   3. INTRODUCTION PHOTO
   ========================================= */

.travel-intro-photo {
  position: relative;
}

.travel-intro-photo img {
  display: block;
  width: 100%;
  height: 430px;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: 0 20px 50px #163b5926;
}

.travel-intro-photo span {
  position: absolute;
  bottom: -15px;
  left: -12px;
  background: #fff;
  padding: 13px 17px;
  border-radius: 12px;
  box-shadow: 0 9px 28px #163b591a;
  font-size: 0.85rem;
  font-weight: 700;
}


/* =========================================
   4. PAGE LAYOUT
   ========================================= */

.travel-layout {
  display: grid;
  grid-template-columns: 225px minmax(0, 1fr);
  gap: clamp(30px, 5vw, 75px);
  align-items: start;
  padding-bottom: 90px;
}

.travel-content {
  min-width: 0;
}


/* =========================================
   5. SIDE NAVIGATION
   ========================================= */

.travel-sidebar {
  position: sticky;
  top: 95px;
  max-height: calc(100vh - 115px);
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px 13px;
  border: 1px solid var(--travel-line);
  background: #f8fbfd;
  border-radius: 16px;
}

.travel-sidebar a {
  display: block;
  padding: 11px 13px;
  border-radius: 9px;
  text-decoration: none;
  color: inherit;
  font-size: 0.88rem;
  line-height: 1.5;
}

.travel-sidebar a:hover,
.travel-sidebar a.is-active {
  background: #e5f2fa;
  color: var(--travel-deep);
}

.travel-sidebar small {
  display: block;
  color: #647b8c;
  font-size: 0.76rem;
}

.sidebar-kicker {
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  color: var(--travel-deep);
  margin: 0 12px 8px;
}

.sidebar-subtitle {
  margin-top: 19px;
}

.travel-sidebar .sidebar-back {
  border-top: 1px solid var(--travel-line);
  border-radius: 0;
  margin-top: 18px;
  padding-top: 20px;
}


/* =========================================
   6. WORLD MAP
   ========================================= */

.map-section,
.journal-section,
.adventure {
  scroll-margin-top: 105px;
}

.map-section {
  padding: 20px 0 75px;
  border-bottom: 1px solid var(--travel-line);
}

.map-section h2,
.journal-section h2,
.travel-end h2 {
  font-size: clamp(2rem, 3.8vw, 3.2rem);
  line-height: 1.2;
  letter-spacing: -0.035em;
  margin: 13px 0 20px;
}

.map-section > p,
.journal-intro {
  max-width: 780px;
  line-height: 1.85;
  margin-bottom: 24px;
}

#travel-map {
  height: 460px;
  width: 100%;
  border-radius: 18px;
  border: 1px solid var(--travel-line);
  background: #dceef8;
  z-index: 0;
}

.map-caption {
  font-size: 0.83rem;
  color: #526c7d;
  margin: 14px 0 0 !important;
}

.map-dot {
  display: inline-block;
  background: #2686bd;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  margin-right: 6px;
}

.map-fallback {
  padding: 15px;
  background: #fff3e3;
  border-radius: 9px;
  margin-top: 12px;
}

.travel-map-popup {
  font-family: "Open Sans", sans-serif;
  min-width: 145px;
}

.travel-map-popup strong {
  font-family: "Poppins", sans-serif;
  font-size: 1rem;
}

.travel-map-popup a {
  display: block;
  margin-top: 9px;
  color: #006fae;
  text-decoration: underline;
}

.travel-map-popup small {
  display: block;
  margin-top: 7px;
  color: #536b7c;
}


/* =========================================
   7. TRAVEL STORIES
   ========================================= */

.journal-section {
  padding-top: 70px;
}

.adventure {
  padding: 55px 0 65px;
  border-bottom: 1px solid var(--travel-line);
}

.adventure-heading h3 {
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  margin: 9px 0;
}

.adventure-date {
  font-size: 0.9rem;
  color: var(--travel-deep);
  font-weight: 700;
  margin-bottom: 22px;
}


/* =========================================
   8. ADVENTURE COVER PHOTOS
   ========================================= */

.adventure-cover {
  display: block;
  position: relative;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  overflow: hidden;
  border-radius: 18px;
  text-align: left;
}

.adventure-cover img {
  display: block;
  width: 100%;
  height: clamp(240px, 37vw, 430px);
  object-fit: cover;
  transition: transform 0.3s ease;
}

.adventure-cover:hover img {
  transform: scale(1.035);
}

.adventure-cover:focus-visible {
  outline: 3px solid var(--travel-blue);
  outline-offset: 4px;
}

.photo-cue {
  position: absolute;
  bottom: 17px;
  right: 17px;
  color: #123d5c;
  background: #fff;
  padding: 12px 17px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 6px 22px #0002;
}


/* =========================================
   9. EXPANDABLE STORY TEXT
   ========================================= */

.adventure > p,
.story-extra p {
  line-height: 1.9;
  margin-top: 22px;
  max-width: 780px;
}

.story-extra p {
  margin-top: 16px;
}

.story-toggle {
  border: 1px solid var(--travel-blue);
  color: var(--travel-deep);
  border-radius: 100px;
  padding: 11px 21px;
  background: #fff;
  cursor: pointer;
  font: 600 0.9rem "Poppins", sans-serif;
  margin-top: 17px;
}

.story-toggle:hover {
  background: var(--travel-soft);
}


/* =========================================
   10. END OF TRAVEL JOURNAL
   ========================================= */

.travel-end {
  padding: 70px 0 20px;
}

.travel-end p {
  line-height: 1.8;
  margin-bottom: 25px;
}


/* =========================================
   11. PHOTO BOOK DIALOG
   ========================================= */

.photobook-dialog {
  position: fixed;
  inset: 0;
  width: min(1120px, 95vw);
  max-width: none;
  max-height: 94vh;
  border: 0;
  border-radius: 20px;
  padding: 0;
  background: #f8f5ef;
  color: #24394a;
  box-shadow: 0 24px 80px #001d3555;
}

.photobook-dialog::backdrop {
  background: #081f34c9;
}

.book-dialog-inner {
  padding: clamp(15px, 3vw, 30px);
}

.book-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 20px;
  margin-bottom: 18px;
}

.book-toolbar h2 {
  font-size: clamp(1.2rem, 2vw, 1.8rem);
  margin: 6px 0;
}

.book-close {
  border: 0;
  background: #e6ebed;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  cursor: pointer;
  font-size: 1.8rem;
}


/* =========================================
   12. PHOTO BOOK PAGES
   ========================================= */

.book-spread {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  background: #e4dfd6;
  padding: 8px;
  border-radius: 12px;
  box-shadow: inset 0 0 22px #6d5c4722;
  transform-origin: center;
}

.book-spread.turning {
  animation: pageflip 0.34s ease;
}

@keyframes pageflip {
  0% {
    transform: perspective(1200px) rotateY(0);
  }

  45% {
    transform: perspective(1200px) rotateY(-7deg);
    opacity: 0.75;
  }

  100% {
    transform: perspective(1200px) rotateY(0);
  }
}

.book-page {
  background: #fff;
  min-width: 0;
  min-height: 300px;
  margin: 0;
  padding: clamp(9px, 2vw, 20px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: inset 0 0 20px #ccc5b633;
}

.book-page img {
  width: 100%;
  height: min(48vh, 420px);
  object-fit: contain;
  background: #f1f4f5;
}

.book-page figcaption {
  text-align: center;
  font-size: 0.8rem;
  margin-top: 10px;
  color: #516477;
}

.book-page.is-empty {
  visibility: hidden;
}


/* =========================================
   13. PHOTO BOOK CONTROLS
   ========================================= */

.book-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(12px, 3vw, 35px);
  margin-top: 22px;
}

.book-controls button {
  border: 1px solid #a4bac9;
  border-radius: 100px;
  background: white;
  padding: 11px 20px;
  cursor: pointer;
  font-weight: 700;
}

.book-controls button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.book-hint {
  text-align: center;
  font-size: 0.77rem;
  color: #637786;
  margin: 13px 0 0;
}


/* =========================================
   14. TABLET
   ========================================= */

@media (max-width: 960px) {

  .travel-layout {
    grid-template-columns: 1fr;
  }

  .travel-sidebar {
    position: static;
    max-height: none;
    overflow-y: visible;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
  }

  .sidebar-kicker {
    width: 100%;
    margin: 4px 9px;
  }

  .sidebar-subtitle {
    margin-top: 10px;
  }

  .travel-sidebar a {
    font-size: 0.8rem;
  }

  .travel-sidebar small {
    display: inline;
    margin-left: 5px;
  }

  .travel-sidebar .sidebar-back {
    border: 0;
    margin: 0;
    padding: 10px;
  }

  .travel-intro {
    grid-template-columns: 1fr;
  }

  .travel-intro-photo {
    max-width: 560px;
  }

}


/* =========================================
   15. MOBILE
   ========================================= */

@media (max-width: 650px) {

  .travel-intro {
    padding-top: 45px;
    padding-bottom: 65px;
  }

  .travel-intro-photo img {
    height: 280px;
  }

  .travel-layout {
    padding-bottom: 55px;
  }

  #travel-map {
    height: 340px;
  }

  .journal-section {
    padding-top: 45px;
  }

  .adventure {
    padding: 40px 0;
  }

  .photo-cue {
    bottom: 10px;
    right: 10px;
    font-size: 0.78rem;
    padding: 10px 12px;
  }

  .photobook-dialog {
    width: 97vw;
    max-height: 96vh;
  }

  .book-spread {
    grid-template-columns: 1fr;
  }

  .book-page {
    min-height: 0;
  }

  .book-page img {
    height: min(48vh, 380px);
  }

  .book-page:nth-child(2) {
    display: none;
  }

  .book-controls button {
    padding: 9px 12px;
    font-size: 0.8rem;
  }

}


/* =========================================
   16. ACCESSIBILITY
   ========================================= */

@media (prefers-reduced-motion: reduce) {

  .adventure-cover img {
    transition: none;
  }

  .book-spread.turning {
    animation: none;
  }

}