/* Xabi travels
   Matches the original Wix site: white header bar, full-bleed misty photo hero with light
   centred type, mountain-photo bands, a sage-green blog area with white image-left cards. */

:root {
  --sage: #a9b6a4;
  --navy: #0f1f66;
  --ink: #2c3236;
  --mute: #7d8890;
  --faint: #a2abb2;
  --line: #dde2dc;
  --font: "Questrial", "Century Gothic", "Avenir Next", Avenir, "Segoe UI", sans-serif;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --card: 58.75rem;
  --header-h: 6.25rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

body { margin: 0; background: #fff; color: var(--ink); font: 1rem/1.7 var(--font); }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--navy); text-underline-offset: 0.18em; }
a:hover { color: #000; }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
h1, h2, h3 { margin: 0; font-weight: 400; line-height: 1.25; }
p { margin: 0 0 1em; }

.skip { position: absolute; left: -999px; top: 0; z-index: 30; padding: 0.5rem 1rem; background: #fff; color: #000; }
.skip:focus { left: 0; }

/* ---------- header ---------- */
.site-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.25rem 2rem; min-height: var(--header-h); padding: 0.75rem 3.8vw; background: #fff;
}
.wordmark { font-size: 1.45rem; line-height: 1.2; color: #1c1c1c; text-decoration: none; }
.wordmark:hover { color: #000; }
.site-header ul { display: flex; flex-wrap: wrap; gap: 0.1rem 1.35rem; margin: 0; padding: 0; list-style: none; }
.site-header nav a {
  display: inline-block; padding: 0.3rem 0; border-bottom: 1px solid transparent;
  font-size: 0.875rem; color: #2a2a2a; text-decoration: none;
}
.site-header nav a:hover, .site-header nav a[aria-current] { border-bottom-color: currentColor; }

/* ---------- hero ---------- */
.hero { position: relative; display: grid; place-items: center; min-height: max(28rem, calc(100vh - var(--header-h))); overflow: hidden; background: #6c7f78; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.hero::after { content: ""; position: absolute; inset: 0; background: rgba(15, 30, 30, 0.14); }
.hero h1 {
  position: relative; z-index: 1; max-width: 52rem; margin: 0; padding: 3rem var(--gutter);
  color: #fff; text-align: center; font-size: clamp(2.2rem, 2rem + 2.6vw, 4rem); line-height: 1.4;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.28); text-wrap: balance;
}

/* ---------- bands ---------- */
.band { position: relative; padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter); }
.band-title {
  margin: 0 0 clamp(1.5rem, 4vw, 2.75rem); text-align: center; color: #fff;
  font-size: clamp(2.2rem, 1.8rem + 2.4vw, 3.9rem); text-shadow: 0 1px 12px rgba(0, 0, 0, 0.22);
}
.band-title.dark { color: var(--ink); text-shadow: none; }
.band-sage { background: var(--sage); }
.band-white { background: #fff; }
.band-photo { background: #7d9585 center / cover no-repeat; }
@media (min-width: 62rem) and (hover: hover) { .band-photo { background-attachment: fixed; } }
.center { text-align: center; }
.narrow { max-width: 34rem; margin-inline: auto; text-align: center; }

/* itinerary tiles */
.tiles { display: grid; grid-template-columns: minmax(0, 348fr) minmax(0, 624fr); max-width: 60.75rem; height: 23.75rem; margin: 0 auto; background: #fff; }
.tile-photo { margin: 0; overflow: hidden; background: #2a2018; }
.tile-photo img { width: 100%; height: 100%; object-fit: cover; }
.tile-map { width: 100%; height: 100%; border: 0; background: #cfe3ea; z-index: 0; }
@media (max-width: 50rem) {
  .tiles { grid-template-columns: minmax(0, 1fr); height: auto; }
  .tile-photo { height: 14rem; }
  .tile-map { height: 22rem; }
}
.leaflet-container { font-family: var(--font); }

/* ---------- blog cards ---------- */
.blog { max-width: var(--card); margin: 0 auto; }
.blog-tools { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; color: #5d7468; font-size: 1rem; }
.blog-search { display: flex; align-items: center; margin: 0; }
.blog-search input {
  width: 0; padding: 0; border: 0; border-bottom: 1px solid transparent; background: transparent;
  color: #1f2a24; font: inherit; font-size: 0.9rem; transition: width 0.2s;
}
.blog-search:focus-within input, .blog-search input:not(:placeholder-shown) { width: 12rem; padding: 0.25rem 0.5rem; border-bottom-color: #5d7468; }
.blog-search input:focus-visible { outline: none; }
.blog-search button { display: grid; place-items: center; width: 2rem; height: 2rem; border: 0; background: none; color: #46594d; cursor: pointer; }

.cards { list-style: none; margin: 0; padding: 0; }
.card {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 22rem;
  margin: 0 0 2rem; background: #fff; border: 1px solid var(--line);
}
.card[hidden] { display: none; }
.card-img { display: block; min-height: 14rem; overflow: hidden; background: #889; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { display: flex; flex-direction: column; padding: 2.75rem 3rem 1.5rem; min-width: 0; }
.card h3 { margin: 1.25rem 0 0.9rem; font-size: 1.5rem; color: var(--navy); }
.card h3 a { color: inherit; text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.card-body > p { margin: 0; color: var(--faint); font-size: 0.95rem; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { margin-top: auto; min-height: 2.9rem; padding-top: 0.9rem; border-top: 1px solid #d8dde0; font-size: 0.75rem; }
.card-foot a { color: var(--mute); text-decoration: none; }
.card-foot a:hover { text-decoration: underline; }
@media (max-width: 45rem) {
  .card { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .card-img { height: 14rem; }
  .card-body { padding: 1.5rem 1.25rem 1rem; }
}

.byline { display: flex; align-items: center; gap: 0.7rem; }
.avatar { width: 2rem; height: 2rem; border-radius: 50%; object-fit: cover; background: var(--line); }
.byline .who { display: block; color: var(--mute); font-size: 0.75rem; line-height: 1.3; }
.byline .when { display: block; color: var(--mute); font-size: 0.75rem; line-height: 1.3; }
.byline .when span::before { content: "•"; margin: 0 0.45em; }
.no-results { padding: 2rem 0; text-align: center; color: #fff; }

/* ---------- forms ---------- */
.contact-card { max-width: 36rem; margin: 0 auto; padding: clamp(1.25rem, 4vw, 2.5rem); background: rgba(255, 255, 255, 0.94); }
.contact-card > p { text-align: center; }
.field { display: grid; gap: 0.3rem; margin-bottom: 1rem; }
.field label { font-size: 0.875rem; color: var(--mute); }
.field input, .field textarea { width: 100%; padding: 0.65rem 0.75rem; border: 1px solid #b9c2bc; border-radius: 0; background: #fff; color: var(--ink); font: inherit; }
.form-inline { display: flex; flex-wrap: wrap; gap: 1rem; align-items: end; justify-content: center; }
.form-inline .field { flex: 1 1 14rem; margin: 0; text-align: left; }
.btn { display: inline-block; padding: 0.7rem 2.2rem; border: 0; border-radius: 0; background: var(--navy); color: #fff; font: inherit; font-size: 1rem; text-decoration: none; cursor: pointer; }
.btn:hover { background: #000; color: #fff; }

/* ---------- footer ---------- */
.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; padding: 1.5rem 3.8vw; background: #fff; color: var(--mute); font-size: 0.875rem; }
.site-footer p { margin: 0; }
.site-footer ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin: 0; padding: 0; list-style: none; }
.site-footer a { color: var(--mute); }

/* ---------- post page ---------- */
.post-band { padding-top: clamp(1.5rem, 4vw, 3rem); }
.post-card { max-width: var(--card); margin: 0 auto; padding: clamp(1.25rem, 5vw, 3.5rem); background: #fff; border: 1px solid var(--line); }
.post-head h1 { margin: 1.25rem 0 2rem; color: var(--navy); font-size: clamp(2rem, 1.5rem + 2.6vw, 3.1rem); line-height: 1.15; text-wrap: balance; }
.post-body > p, .post-body > h2 { max-width: 44rem; margin-inline: auto; }
.post-body > p { margin-bottom: 1.3em; font-size: 1.0625rem; line-height: 1.8; color: #33393d; }
.post-body > h2 { margin-top: 2.5rem; margin-bottom: 1rem; color: var(--navy); font-size: 1.75rem; }
.post-body figure { margin: 2rem auto; text-align: center; }
.post-body figure > a { display: inline-block; max-width: 100%; }
.post-body figure img { width: auto; max-width: 100%; max-height: min(78vh, 44rem); margin-inline: auto; background: #e8ece8; }
figcaption { max-width: 38rem; margin: 0.6rem auto 0; color: var(--mute); font-size: 0.875rem; font-style: italic; line-height: 1.5; }

.gallery-block { margin: 2.5rem 0 0; }
.gallery-block > h2 { margin-bottom: 1.25rem; color: var(--navy); font-size: 1.75rem; text-align: center; }
.gallery { column-count: 2; column-gap: 0.75rem; }
@media (min-width: 44rem) { .gallery { column-count: 3; } }
.post-body .gallery figure { margin: 0 0 0.75rem; break-inside: avoid; }
.post-body .gallery figure > a { display: block; }
.post-body .gallery figure img { width: 100%; max-height: none; }
.gallery figcaption { margin: 0.3rem 0 0; font-size: 0.78rem; text-align: left; }

.comments { max-width: 44rem; margin: 3rem auto 0; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.comments h2 { margin-bottom: 1rem; font-size: 1.25rem; color: var(--ink); }
.comments ul { list-style: none; margin: 0; padding: 0; }
.comments li { padding: 1rem 0; border-top: 1px solid #eef1ee; }
.comments li:first-child { border-top: 0; padding-top: 0; }
.comments p { margin: 0; font-size: 0.95rem; line-height: 1.65; }
.c-meta { display: flex; flex-wrap: wrap; gap: 0 0.75rem; margin-bottom: 0.25rem !important; font-size: 0.8rem !important; color: var(--mute); }
.c-meta strong { font-weight: 400; color: var(--ink); }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; max-width: 44rem; margin: 3rem auto 0; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.post-nav a { display: block; color: var(--navy); text-decoration: none; font-size: 1.25rem; line-height: 1.25; }
.post-nav a:hover { text-decoration: underline; }
.post-nav small { display: block; margin-bottom: 0.2rem; color: var(--mute); font-size: 0.8rem; }
.post-nav .next { text-align: right; }

/* ---------- photo viewer ---------- */
.lb { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(10, 16, 14, 0.95); color: #fff; }
.lb::backdrop { background: rgba(10, 16, 14, 0.95); }
.lb[open] { display: grid; grid-template-columns: 4rem minmax(0, 1fr) 4rem; }
.lb figure { grid-column: 2; display: grid; grid-template-rows: minmax(0, 1fr) auto; place-items: center; margin: 0; padding: 1rem 0; min-height: 0; }
.lb img { max-width: 100%; max-height: calc(100vh - 7rem); object-fit: contain; }
.lb figcaption { margin: 0.75rem auto 0; color: #e3e9e5; text-align: center; font-style: normal; }
.lb button { border: 0; background: none; color: #fff; font: 400 2.75rem/1 var(--font); padding: 0.5rem; cursor: pointer; }
.lb button:hover { color: #cfe0d3; }
.lb button:focus-visible { outline-color: #fff; }
.lb-prev { grid-column: 1; grid-row: 1; align-self: center; }
.lb-next { grid-column: 3; grid-row: 1; align-self: center; }
.lb-close { position: fixed; top: 0.5rem; right: 0.75rem; }
@media (max-width: 40rem) { .lb[open] { grid-template-columns: 2.5rem minmax(0, 1fr) 2.5rem; } .lb button { font-size: 2rem; padding: 0.25rem; } }

/* Google My Maps embed: shift the iframe up so its title bar is cropped away */
.map-crop { position: relative; overflow: hidden; }
.map-crop iframe { position: absolute; left: 0; top: -3.75rem; width: 100%; height: calc(100% + 3.75rem); border: 0; }

/* Route map stop labels */
.tile-map.leaflet-container { background: #dfe9ee; }
.stop-overlay { position: absolute; inset: 0; z-index: 800; pointer-events: none; overflow: hidden; }
.stop-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.stop-lines line { stroke: #0f1f66; stroke-width: 1; opacity: 0.55; }
.stop-label { position: absolute; left: 0; top: 0; background: rgba(255,255,255,0.95); border-radius: 0.75rem; padding: 0 0.4rem; box-shadow: 0 1px 3px rgba(15,31,102,0.3); color: var(--navy); font: 600 0.68rem/1.45 var(--font); white-space: nowrap; }
.stop-label .fi { width: 1.1em; height: 0.8em; line-height: 1; margin-right: 0.15rem; vertical-align: -0.05em; border-radius: 1px; }

.site-footer .credits { flex: 1 0 100%; font-size: 0.75rem; opacity: 0.7; margin: 0; order: 3; }
.site-footer .credits a { color: inherit; }
