/* ==========================================================================
   WALK VIEW
   ========================================================================== */

/* === 1) HERO =================================== */

:root{
  /* Overlay position (lower numbers = closer to bottom) */
  --walk-hero-lift: clamp(10px, 5vh, 80px);

  /* Walk title typography */
  --walk-title-size: clamp(26px, 6vw, 46px);
  --walk-letter-tight: -0.02em;
}

/* Walk hero as background image */
#walkHero.hero{
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 5;
  min-height: 360px;
  max-height: 80vh;
  background: #000 center 35% / cover no-repeat;
  border-bottom: 1px solid var(--border);
}

/* gradient scrim behind text */
#walkHero.hero::after{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(transparent 45%, rgba(0,0,0,.55) 100%);
  pointer-events: none;
  z-index: 0;
}

/* center the portrait hero on wide screens */
@media (min-width: 960px){
  #walkHero.hero{
    width: min(100%, 640px);
    margin: 0 auto;
  }
}

/* Overlay block (title + meta) positioned with a single variable */
#viewWalk #walkHero .hero-overlay{
  position: absolute;
  inset: 0;                    /* fill the hero */
  z-index: 1;                  /* above image/scrim */
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  padding-bottom: var(--walk-hero-lift);
}

/* Title: Quicksand, tall & tight, pure white, no shadow */
#viewWalk #walkHero .tagline{
  font-family: "Quicksand", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  font-weight: 700;
  font-size: var(--walk-title-size);
  line-height: 1.1;
  letter-spacing: var(--walk-letter-tight);
  color: #fff;
  text-shadow: none;
  margin: 0 0 .25rem 0;

  /* crisp rendering */
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-kerning: normal;
  font-synthesis: none;
}

/* Meta row directly under the title */
#viewWalk #walkHero .hero-meta{
  display: flex;
  gap: .5rem;
  margin-top: .25rem;
}

/* Chips (scoped to Walk hero only) */
#viewWalk #walkHero .hero-chip{
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .25rem .5rem;
  border-radius: 999px;
  background: rgba(0,0,0,.7);
  border: 1px solid rgba(255,255,255,.08);
  color: #fafafa;
  font-size: 15px;
  backdrop-filter: blur(2px);
}

#viewWalk #walkHero .chip-icon{
  flex: 0 0 auto;
  fill: currentColor;
  opacity: .9;
}


/* === 2) INTRO UNDER HERO (EXPANDABLE) =================================== */

.intro-area{
  position: relative;
  margin: 1rem 1.5rem 1rem;   /* doubled spacing around the block */
  cursor: pointer;
  outline: none;
}

.intro-title{
  text-align: center;
  margin: 2rem 0 1rem 0;      /* doubled space before & after headline */
  font-weight: 700;
  font-size: 1.1rem;
}

.intro-text{
  margin: 0;
  padding: 0 1.5rem;          /* doubled side padding for text */
  text-align: justify;        /* Blocksatz */
  text-justify: inter-word;
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  word-break: normal;
  color: var(--muted);
  line-height: 1.5;

  /* collapsed state: clamp to ~5 lines */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  overflow: hidden;
}

/* Soft fade aligned with the text padding (1.5rem each side) */
.intro-area::after{
  content: "";
  position: absolute;
  left: 1.5rem;
  right: 1.5rem;
  bottom: 0;
  height: 2.25rem;
  background: linear-gradient(
    180deg,
    rgba(17,17,17,0) 0%,
    rgba(17,17,17,.85) 70%,
    rgba(17,17,17,1) 100%
  );
  pointer-events: none;
  transition: opacity .2s ease;
}

/* Expanded: remove clamp + fade (ensure full flow) */
.intro-area.expanded .intro-text{
  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
}

.intro-area.expanded::after{
  opacity: 0;
}

/* No underline on focus/expand */
.intro-area:focus,
.intro-area:focus *{
  text-decoration: none;
}

@media (min-width: 960px){
  .intro-title{ font-size: 1.25rem; }
}


/* === 3) OVERVIEW → MAP → META STACK (SEAMLESS) =========================== */

/* Outer margin around the unified stack */
.overview-stack{
  margin: .75rem 0 1rem;
}

/* Top: Overview text — rounded top, no bottom border (merges into map) */
.overview-card{
  margin: 0;
  padding: 1rem 1.25rem;
  background: #141414;
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: .75rem .75rem 0 0;
  text-align: center;
}
.overview-title{
  margin: 0 0 .35rem 0;
  font-size: 1.1rem;
  font-weight: 700;
}
.overview-sub {
    /* Aligns the text to the left */
    text-align: left;

    /* Makes the \n in your JSON render as actual line breaks */
    white-space: pre-line;

    line-height: 1.5;
    color: #e0e0e0;
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

/* Middle: square map — no rounded corners; shares side borders */
.map.square{
  width: 100%;
  margin: 0;                  /* no gaps to keep it seamless */
  aspect-ratio: 1 / 1;
  height: auto;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-top: none;           /* merges into overview-card */
  border-bottom: none;        /* merges into meta-card */
  border-radius: 0;
  overflow: hidden;
}

/* Bottom: meta data — rounded bottom, no top border (merges into map) */
.meta-card{
  margin: 0;
  background: #141414;
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 .75rem .75rem;
  padding: .5rem .75rem;      /* spacing lives inside the card */
}

/* Meta rows (inside meta-card) */
.meta-card .walk-title{ margin-bottom: .25rem; }
.meta-block { display:flex; flex-direction:column; gap:.35rem; margin-top:.35rem; }
.meta-row   { display:flex; align-items:center; gap:.35rem; color:var(--muted); font-size:14px; }
.meta-icon  { flex-shrink:0; fill:currentColor; opacity:.85; }

/* Locations trigger row inside meta */
.stops-trigger{
  color: var(--text);
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}
.stops-trigger .left{
  display: inline-flex; align-items: center; gap: .35rem;
}
.stops-count{ font-weight: 400; }
.stops-label{ font-size: 14px; }
.stops-trigger .chev{ transition: transform .2s ease; }

/* Stops list */
.stops-list{ display:grid; gap:.4rem; margin-top:.5rem; }
.stop-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  background:#161616;
  border:1px solid #262626;
  border-radius:.5rem;
  padding:.5rem;
}

/* Optional width cap for the whole stack on wide screens */
@media (min-width: 960px){
  .overview-stack{ margin: 1rem auto 1.25rem; max-width: 960px; }
}


/* === 4) SIGHTS CAROUSEL (PHONE-OPTIMIZED) ================================ */

/* Section heading */
.ws-heading{
  margin: 1rem .75rem .5rem;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 700;
}

/* Carousel section wrapper */
.ws-section{ margin: 0; }

/* Centered wrapper with equal side space */
.ws-wrapper{
  position: relative;
  overflow: hidden;
  padding: 0 .75rem;          /* equal inset on both sides */
}

/* Track: scroll-snap + hidden scrollbar + centered feel */
.ws-track{
  display: flex;
  gap: .6rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 0 .75rem;          /* equal padding both sides */
  scroll-padding-left: .75rem;
  scroll-padding-right: .75rem;

  /* hide scrollbars */
  scrollbar-width: none;             /* Firefox */
  -ms-overflow-style: none;          /* IE/Edge */
}
.ws-track::-webkit-scrollbar{ display: none; }  /* WebKit */

/* Slide cards */
.ws-slide{
  scroll-snap-align: start;
  position: relative;
  background: #151515;
  border: 1px solid var(--border);
  border-radius: .75rem;
  min-width: 78%;                    /* show next card peeking */
  max-width: 420px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  cursor: pointer;
}

/* Image on top */
.ws-img{
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

/* Caption area under image — taller constant height; text hugs image */
.ws-cap{
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: .35rem;
  padding: .5rem .9rem;        /* smaller top padding so text sits close */
  text-align: center;
  min-height: 16rem;
  max-height: 16rem;
  overflow: hidden;
}

.ws-title{
  margin: 0;
  font-weight: 700;
  font-size: 1rem;
}
.ws-short{
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
  font-size: .95rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 12;      /* more lines to fill the taller box */
  overflow: hidden;
}

/* Dots (Instagram-like) */
.ws-dots{
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .4rem;
  padding: .5rem 0 .25rem;
}
.ws-dot{
  appearance: none;
  border: 0;
  padding: .35rem;             /* larger tap target */
  background: transparent;
  cursor: pointer;
  line-height: 0;
}
.ws-dot::before{
  content: "";
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #7a7a7a;
  opacity: .7;
  transition: width .18s ease, opacity .18s ease, background-color .18s ease;
}
.ws-dot.active::before{
  width: 18px;                 /* pill for active */
  background: #f5f5f5;
  opacity: .95;
}

/* Invisible edge click/tap zones for prev/next */
.ws-edge{
  position: absolute;
  top: 0;
  bottom: 0;
  width: 12vw;                 /* ~12% of viewport on each side */
  min-width: 48px;
  max-width: 120px;
  pointer-events: auto;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ws-edge-left{  left: 0; }
.ws-edge-right{ right: 0; }
.ws-edge:active{ background: rgba(255,255,255,.02); } /* optional press hint */


@media (min-width: 960px){
  .ws-heading{ font-size: 1.25rem; }
  .ws-slide{ min-width: 48%; }
  .ws-cap{ min-height: 18rem; max-height: 18rem; }
  .ws-short{ -webkit-line-clamp: 14; }
}


/* === 5) LEGACY/GENERAL (kept for compatibility) ========================= */

/* Meta row under hero (kept for any non-stack contexts) */
.walk-meta{ padding:.5rem .75rem; }
.walk-title{ font-weight:700; font-size:1.1rem; }

/* Old overview image container (unused in new stack, kept to avoid breakage) */
.overview{ padding:.5rem .75rem; }
.overview img{ width:100%; height:auto; border-radius:.75rem; border:1px solid var(--border); }

/* Generic map class (not used by .map.square in the stack) */
.map{ width:100%; height:320px; border-radius:.75rem; border:1px solid var(--border); margin:.5rem; }
.map.half{ height:45vh; }

/* ===== Page cap (phone-optimized on wide screens) ===== */
:root{
  --page-max: 640px;   /* tweak: 600–720px works nicely */
  --page-pad: 12px;    /* small safe gutter */
}

/* Cap each SPA view and center it */
.view{
  width: min(100%, var(--page-max));
  margin-inline: auto;                 /* center */
  padding-inline: var(--page-pad);     /* tiny gutter so nothing hugs the edge */
}

/* Remove double padding for components that already manage spacing edge-to-edge */
.view .overview-stack,
.view .ws-wrapper,
.view .intro-area{
  padding-inline: 0;
}


/* Meta card: section dividers between rows */
.meta-card .meta-block .meta-row{
  padding: .6rem 0;
  border-top: 1px solid var(--border);
  color: var(--muted);              /* unify row text/icon color */
}
.meta-card .meta-block .meta-row:first-child{
  border-top: none;                 /* no divider above the first row */
}

/* Make all meta icons the same color as text */
.meta-card .meta-row .meta-icon{
  color: currentColor;              /* ensures same tone as text */
  fill: currentColor;
  opacity: .85;
}

/* Locations trigger row inherits the same muted color (incl. pin) */
.meta-card .stops-trigger{
  color: var(--muted);
}

/* Stops list: no boxes, no separators between items; slightly smaller text */
.stops-list{
  display: grid;
  gap: .25rem;                      /* small vertical rhythm */
  margin-top: .35rem;
  font-size: 13px;                  /* a bit smaller than meta rows */
  color: var(--muted);              /* same family as meta */
}
.stop-item{
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;          /* remove box */
  border: none;                      /* remove box border */
  padding: .25rem 0;                 /* minimal padding */
}

/* Left side = plain text */
.stop-item strong{
  font-weight: 600;                  /* readable but not too heavy */
}

/* Distance text tone */
.stop-item span{
  color: var(--muted);
}

/* Clean chevron “open” button (no default .btn styling) */
.stop-open{
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  padding: .2rem .25rem;
  cursor: pointer;
}

/* Count not bold & consistent size */
.stops-count{
  font-weight: 400;                  /* not bold */
  font-size: 14px;
}

/* Chevron rotation animation retained */
.stops-trigger .chev{ transition: transform .2s ease; }

/* Stops list: plain lines, clickable whole row */
.stops-list{
  display: grid;
  gap: .25rem;
  margin-top: .35rem;
  font-size: 13px;                /* slightly smaller than meta */
  color: var(--muted);
}

.stop-item{
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;        /* no boxes */
  border: none;                    /* no separators between items */
  padding: .35rem 0;
  cursor: pointer;
  outline: none;
}

.stop-item:focus-visible{
  box-shadow: 0 0 0 2px rgba(128,238,192,.25) inset; /* subtle focus ring */
  border-radius: .35rem;
}

.stop-left strong{ font-weight: 600; }

.stop-right{
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

/* Distance tone and icon color unified with meta */
.stop-dist{ color: var(--muted); }

/* Ensure the pin uses the same color as other meta icons */
.stop-pin{
  color: currentColor;
  fill: currentColor;
  opacity: .85;
}

/* Count not bold */
.stops-count{ font-weight: 400; }

/* Wrap image + symbol */
.ws-media{
  position: relative;
  display: block;
}

/* Decorative play symbol */
.ws-symbol{
  position: absolute;
  right: .75rem;
  bottom: -18px;   /* overlap seam between image and caption */
  pointer-events: none; /* purely decorative */
}

.ws-symbol svg{
  width: 50px;   /* adjust to your liking */
  height: 50px;
}

.ws-footer{
  padding: 1rem 0rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #f5f5f5;
  background: #151515;
}

.meta-col{
  display: flex;
  flex-direction: column;
}

.meta-primary{
  font-size: 0.95rem;
  font-weight: normal;
  opacity: 0.9;
}

.meta-secondary{
  font-size: 0.9rem;
  opacity: 0.8;
}

/* Number badge in the carousel image */
.ws-num {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2; /* Above image, below symbol/play button */

  background-color: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-weight: 700;
  font-size: 14px;

  padding: 4px 10px;
  border-bottom-right-radius: 8px; /* Soft corner */
  pointer-events: none;
}

/* ==========================================================================
   ROUTE ROW (Blue Round Button + Text)
   ========================================================================== */

/* The Container (Link) */
.walk-route-row {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Aligns everything to the LEFT */
    gap: 16px;                   /* Space between button and text */

    width: 100%;                 /* Full width of the card */
    margin-top: 1.5rem;          /* Space from the description text */
    margin-bottom: 0.5rem;       /* Space before the map starts */

    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

/* The Round Button Circle */
.walk-route-row .route-icon-btn {
    width: 48px;
    height: 48px;

    /* VIVID BLUE BACKGROUND */
    background-color: #1a73e8;
    border: 1px solid rgba(0,0,0,0.1);
    color: #ffffff; /* White icon */

    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    transition: transform 0.2s ease, background-color 0.2s;
    flex-shrink: 0;
}

/* Icon Size */
.walk-route-row .route-icon-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* The Text Label */
.walk-route-row .route-label {
    font-weight: 700;
    font-size: 1rem;
    color: #f5f5f5; /* Bright text color */
    letter-spacing: 0.01em;
}

/* Interactions */
.walk-route-row:active .route-icon-btn {
    transform: scale(0.95);
    background-color: #155db5; /* Darker blue on press */
}

.walk-route-row:focus-visible {
    outline: none;
}
.walk-route-row:focus-visible .route-icon-btn {
    outline: 2px solid #80eec0;
    outline-offset: 2px;
}

/* =========================================
   UNLOCK SECTION
   ========================================= */

.unlock-container {
    padding: 24px 16px;
    background-color: var(--bg-primary);
    border-top: 1px solid var(--border-subtle);
}

.unlock-container.hidden {
    display: none;
}

.unlock-card {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    text-align: center;
}

.unlock-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.unlock-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.unlock-input-group {
    display: flex;
    gap: 8px;
    justify-content: center;
}

#walkTokenInput {
    flex: 1;
    max-width: 200px;
    padding: 10px 12px;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
}

#walkTokenInput:focus {
    outline: 2px solid var(--accent);
    border-color: transparent;
}

#walkUnlockBtn {
    padding: 10px 20px;
    border-radius: 8px;
    background-color: var(--accent);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: opacity 0.2s;
}

#walkUnlockBtn:active {
    opacity: 0.8;
}

.error-msg {
    color: #ff6b6b;
    font-size: 0.9rem;
    margin-top: 12px;
}

.success-msg {
    color: #51cf66;
    font-size: 0.9rem;
    margin-top: 12px;
}

/* Locked Overlay for Carousel Items */
.ws-slide.locked {
    position: relative;
    cursor: pointer;
}

.ws-slide.locked::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 33.33%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.7) 50%, transparent 100%);
    backdrop-filter: blur(3px);
    z-index: 5;
    pointer-events: none;
}

.locked-overlay-wrapper {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 33.33%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    pointer-events: none;
}

.locked-overlay-icon {
    color: white;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.locked-overlay-icon svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}


/* Buy Tour Section */
.buy-tour-section {
    text-align: center;
    margin-top: 16px;
}

.buy-tour-divider {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.buy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background-color: var(--accent); /* Change if needed based on design */
    color: var(--bg);
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s;
}

.buy-btn:hover {
    opacity: 0.9;
}
