/* =============================================================================
   SHARED — blocks used by both the Things to Do index and every attraction page
   (season strip, cabin matcher, guide-post row). One definition, two page types.
   ========================================================================== */
.td-kicker{
  margin:0 0 var(--space-sm);
  font-family:var(--font-body);
  font-size:11px;font-weight:var(--fw-bold);
  letter-spacing:var(--track-kicker);text-transform:uppercase;
  color:var(--rust-deep);
}

/* ---------------------------------------------------------------------------
   SEASONS
   Four columns of character, no dates and no numbers. A season is the one
   piece of planning information about a place that cannot go out of date.
   --------------------------------------------------------------------------- */
.td-seasons{
  background:var(--cream-warm);
  color:var(--ink);
  padding-block:clamp(44px,5vw,78px);
}
.td-seasons.is-dark{background:var(--band);color:var(--cream)}
.td-seasons.is-dark .td-kicker{color:var(--accent)}
.td-seasons-head{max-width:620px}
.td-seasons h2{
  margin:0;
  font-family:var(--font-display);
  font-size:clamp(25px,2.6vw,38px);
  line-height:1.12;
  font-weight:var(--fw-medium);
  color:#153d31;
}
.td-seasons.is-dark h2{color:#fff}
.td-season-list{
  list-style:none;margin:clamp(24px,2.8vw,40px) 0 0;padding:0;
  display:grid;grid-template-columns:minmax(0,1fr);
  gap:clamp(18px,2vw,28px);
}
.td-season-list li{
  padding-top:clamp(14px,1.6vw,20px);
  border-top:1px solid rgba(40,52,38,.18);
}
.td-seasons.is-dark .td-season-list li{border-top-color:rgba(183,200,150,.26)}
.td-season-list h3{
  margin:0;
  font-family:var(--font-body);
  font-size:11px;font-weight:var(--fw-bold);
  letter-spacing:var(--track-kicker);text-transform:uppercase;
  color:var(--sage);
}
.td-seasons.is-dark .td-season-list h3{color:var(--accent)}
.td-season-list p{
  margin:var(--space-sm) 0 0;
  font-family:var(--font-body);
  font-size:14px;line-height:var(--lh-body);
  color:var(--ink-soft);
}
.td-seasons.is-dark .td-season-list p{color:rgba(245,240,230,.78)}

/* ---------------------------------------------------------------------------
   CABIN MATCHER
   The point of the whole section. Everything above it is a reason to come;
   this is the only block that turns one into a booking, so it is the one that
   carries the outbound links.
   --------------------------------------------------------------------------- */
.td-cabins{
  background:var(--cream);
  color:var(--ink);
  padding-block:clamp(44px,5vw,78px);
}
.td-cabins-head{max-width:700px}
.td-cabins h2{
  margin:0;
  font-family:var(--font-display);
  font-size:clamp(25px,2.6vw,38px);
  line-height:1.12;
  font-weight:var(--fw-medium);
  color:#153d31;
}
.td-cabins-why{
  margin:clamp(12px,1.4vw,18px) 0 0;
  max-width:62ch;
  font-family:var(--font-body);
  font-size:clamp(15px,1.15vw,17px);
  line-height:var(--lh-body);
  color:var(--ink-soft);
}
/* ---------------------------------------------------------------------------
   THE CABIN CARDS

   These were a text list: a name, a town, an occupancy and a link. They now
   carry the cabin's own photograph, its "best for" line and the one sentence
   that describes it - all read from the same cabdata the cabins page uses, so
   the two cannot say different things about the same house.

   auto-fit, not auto-fill: this block shows five cabins on the Explore page
   and two or three on a guide, and empty tracks would leave the shorter rows
   hanging off to one side.

   The palette is the cabins page's, not the home rail's: .td-cabins sits on
   cream on all thirteen pages that carry it, so the card is a white panel
   with forest and rust type rather than white type over a dark one.
   --------------------------------------------------------------------------- */
.tc-grid{
  list-style:none;
  display:grid;
  /* The track has a MAXIMUM, not 1fr. This block shows five cabins on the
     Explore page, three on a cabin page and two on some guides; with 1fr the
     two-card row stretched each card to 650px and a 4:3 photograph that wide
     made the pair look like a different component. Capped, they stay the
     size they are on every page and pack to the left. */
  /* A fixed column count per breakpoint, not auto-fit.

     auto-fit decides how many tracks fit from the track's own size, and this
     block carries a different number of cards on different pages - five on
     the Explore index, three on a cabin page, two on some guides. Every
     auto-fit variant traded one of those off against another: a 1fr maximum
     stretched the two-card row to 650px a card, and a fixed maximum wide
     enough to look right broke the five into 4 + 1 with one stranded
     underneath.

     Counting the columns instead fixes both. Five tracks at the top end
     means five cabins sit on one line, and a page with two cards fills the
     first two tracks at exactly the same width and leaves the rest empty. */
  grid-template-columns:minmax(0,1fr);
  gap:clamp(14px,1.6vw,22px);
  margin:clamp(28px,3.2vw,46px) 0 0;padding:0;
}
.tc-card{
  display:flex;flex-direction:column;
  border:1px solid rgba(40,52,38,.14);
  border-radius:var(--r-card);
  overflow:hidden;
  background:var(--white);
  transition:transform .45s var(--ease-out),border-color .35s ease,box-shadow .35s ease;
}
.tc-media{
  position:relative;display:block;
  aspect-ratio:4 / 3;
  overflow:hidden;
  background:#e8e2d6;
}
.tc-media img{
  display:block;width:100%;height:100%;
  object-fit:cover;
  transition:transform 1.2s var(--ease-out);
}
.tc-town{
  position:absolute;z-index:2;left:12px;bottom:12px;
  padding:6px 11px 5px;
  background:rgba(8,22,16,.82);
  border-radius:var(--r-ctl);
  font-family:var(--font-body);
  font-size:9.5px;font-weight:var(--fw-bold);
  letter-spacing:var(--track-kicker);text-transform:uppercase;
  color:#fff;
}
.tc-body{
  display:flex;flex-direction:column;flex:1 1 auto;
  padding:clamp(14px,1.6vw,20px);
}
.tc-bestfor{
  margin:0 0 7px;
  font-family:var(--font-body);
  font-size:9.5px;font-weight:var(--fw-bold);
  letter-spacing:var(--track-kicker);text-transform:uppercase;
  color:var(--rust-deep);
}
.tc-card h3{
  margin:0;
  font-family:var(--font-display);
  font-size:clamp(19px,1.5vw,23px);
  line-height:var(--lh-snug);font-weight:var(--fw-medium);
  color:var(--forest);
}
.tc-card h3 a{color:inherit}
.tc-meta{
  display:flex;align-items:center;flex-wrap:wrap;gap:9px;
  margin:9px 0 0;
  font-family:var(--font-body);
  font-size:11px;font-weight:var(--fw-semi);
  letter-spacing:.05em;text-transform:uppercase;
  color:var(--ink-soft);
}
.tc-meta i{width:3px;height:3px;border-radius:var(--r-round);background:var(--sage);flex:0 0 auto}
/* Three lines reserved so the "see the cabin" line sits level across a row
   whatever the sentence does. The same reasoning as the home rail's cards -
   and the same refusal to clamp: a truncated description is worse than a
   20px gap. */
.tc-short{
  margin:11px 0 0;
  font-family:var(--font-body);
  font-size:13px;line-height:1.55;
  color:var(--ink-soft);
  min-height:calc(3 * 1.55em);
  min-height:3lh;
}
.tc-more{
  display:inline-flex;align-items:center;gap:9px;
  margin-top:auto;padding-top:clamp(12px,1.4vw,16px);
  font-family:var(--font-body);
  font-size:10.5px;font-weight:var(--fw-bold);
  letter-spacing:var(--track-label);text-transform:uppercase;
  color:var(--rust-deep);
}
.tc-more svg{
  width:20px;height:8px;flex:0 0 auto;
  fill:none;stroke:currentColor;stroke-width:1.6;
  stroke-linecap:round;stroke-linejoin:round;
  transition:transform .35s var(--ease-out);
}

/* ---------------------------------------------------------------------------
   GUIDE POSTS
   --------------------------------------------------------------------------- */
.td-posts{
  background:var(--cream-warm);
  color:var(--ink);
  padding-block:clamp(40px,4.4vw,68px);
  border-top:1px solid rgba(40,52,38,.10);
}
.td-posts-head{max-width:620px}
.td-posts h2{
  margin:0;
  font-family:var(--font-display);
  font-size:clamp(23px,2.3vw,32px);
  line-height:1.14;
  font-weight:var(--fw-medium);
  color:#153d31;
}
/* ---------------------------------------------------------------------------
   THE GUIDE POSTS

   Titles and a tag before; now the post's own photograph, excerpt, date and
   reading time - all lifted out of blog.html at build time, so a post edited
   on the blog is edited here. Same card language as the cabin cards above:
   white panel on the band's cream, photograph on top, a badge over it.
   --------------------------------------------------------------------------- */
.tp-grid{
  list-style:none;
  display:grid;grid-template-columns:minmax(0,1fr);
  gap:clamp(14px,1.6vw,22px);
  margin:clamp(26px,3vw,42px) 0 0;padding:0;
}
.tp-card{
  display:flex;flex-direction:column;
  border:1px solid rgba(40,52,38,.14);
  border-radius:var(--r-card);
  overflow:hidden;
  background:var(--white);
  transition:transform .45s var(--ease-out),border-color .35s ease,box-shadow .35s ease;
}
.tp-media{
  position:relative;display:block;
  aspect-ratio:16 / 10;
  overflow:hidden;
  background:#e8e2d6;
}
.tp-media img{
  display:block;width:100%;height:100%;
  object-fit:cover;
  transition:transform 1.2s var(--ease-out);
}
.tp-tag{
  position:absolute;z-index:2;left:12px;top:12px;
  padding:6px 11px 5px;
  background:rgba(8,22,16,.82);
  border-radius:var(--r-ctl);
  font-family:var(--font-body);
  font-size:9.5px;font-weight:var(--fw-bold);
  letter-spacing:var(--track-kicker);text-transform:uppercase;
  color:#fff;
}
.tp-body{
  display:flex;flex-direction:column;flex:1 1 auto;
  padding:clamp(16px,1.8vw,22px);
}
.tp-card h3{
  margin:0;
  font-family:var(--font-display);
  font-size:clamp(19px,1.5vw,23px);
  line-height:var(--lh-snug);font-weight:var(--fw-medium);
  color:var(--forest);
  /* Two lines reserved: three of these titles wrap and two do not, and the
     excerpt below them would otherwise start at two different heights in the
     same row. */
  min-height:calc(2 * 1.2em);
  min-height:2lh;
}
.tp-card h3 a{color:inherit;transition:color .25s ease}
.tp-excerpt{
  margin:10px 0 0;
  font-family:var(--font-body);
  font-size:13.5px;line-height:1.55;
  color:var(--ink-soft);
  min-height:calc(3 * 1.55em);
  min-height:3lh;
}
.tp-meta{
  display:flex;align-items:center;flex-wrap:wrap;gap:9px;
  margin:auto 0 0;padding-top:clamp(12px,1.4vw,16px);
  font-family:var(--font-body);
  font-size:11px;font-weight:var(--fw-semi);
  letter-spacing:.04em;text-transform:uppercase;
  color:var(--ink-soft);
}
.tp-meta i{width:3px;height:3px;border-radius:var(--r-round);background:var(--sage);flex:0 0 auto}

@media (min-width:600px){
  .tp-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (min-width:1000px){
  .tp-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
.td-link{
  display:inline-flex;align-items:center;gap:10px;
  margin-top:clamp(22px,2.4vw,32px);
  padding-bottom:4px;
  border-bottom:1px solid rgba(139,55,29,.34);
  font-family:var(--font-body);
  font-size:12px;font-weight:var(--fw-bold);
  letter-spacing:var(--track-label);text-transform:uppercase;
  color:var(--rust-deep);
  transition:border-color .25s ease;
}
.td-link svg{
  width:22px;height:9px;flex:0 0 auto;
  fill:none;stroke:currentColor;stroke-width:1.6;
  stroke-linecap:round;stroke-linejoin:round;
  transition:transform .3s var(--ease-out);
}

/* --------------------------------------------------------------------------- */
@media (min-width:640px){
  .td-season-list{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (min-width:1000px){
  .td-season-list{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media (hover:hover) and (pointer:fine){
  .tc-card:hover{
    transform:translateY(-4px);
    border-color:rgba(40,52,38,.3);
    box-shadow:0 14px 30px rgba(20,38,28,.12);
  }
  .tc-card:hover .tc-media img{transform:scale(1.06)}
  .td-link:hover{border-bottom-color:currentColor}
  .tp-card:hover{
    transform:translateY(-4px);
    border-color:rgba(40,52,38,.3);
    box-shadow:0 14px 30px rgba(20,38,28,.12);
  }
  .tp-card:hover .tp-media img{transform:scale(1.06)}
  .tp-card h3 a:hover{color:var(--rust-deep)}
}
@media (prefers-reduced-motion:reduce){
  .tc-card,.tc-media img,.tc-more svg,.td-link svg,
  .tp-card,.tp-media img,.tp-card h3 a{transition:none}
  .tc-card:hover{transform:none}
  .tc-card:hover .tc-media img{transform:none}
  .tp-card:hover{transform:none}
  .tp-card:hover .tp-media img{transform:none}
}

@media (min-width:561px){
  .tc-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (min-width:760px){
  .tc-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
/* Five across only from 1400px. At 1180 five tracks come out at 205px a
   card, which is narrower than the three-column layout one breakpoint below
   it - the row gets tighter as the window gets wider, which is the wrong way
   round. Below this the five cabins sit 3 + 2. */
@media (min-width:1400px){
  .tc-grid{grid-template-columns:repeat(5,minmax(0,1fr))}
}

/* ---------------------------------------------------------------------------
   CABIN SLIDER (the Explore index only - cabin_cards(..., slider=True))
   The same cards in a sideways track: three in view on a desktop, two on a
   tablet, one and a peek on a phone. scroll-snap does the moving, so a
   swipe, a trackpad and the arrow buttons all land on a card edge; with
   scripting off it is still a plain scrollable row. Each card carries every
   photograph of its cabin, crossfaded by cabin-slider.js every three
   seconds with the cabins page's move.
   --------------------------------------------------------------------------- */
.tc-slider-head{
  display:flex;align-items:flex-end;justify-content:space-between;gap:var(--space-lg);
  max-width:none;
}
.tc-slider-head > div:first-child{max-width:700px}
.tc-ctrl{display:flex;gap:10px;flex:0 0 auto}
.tc-ctrl[hidden]{display:none}
.tc-btn{
  width:46px;height:46px;
  display:inline-flex;align-items:center;justify-content:center;
  border:1px solid rgba(40,52,38,.24);border-radius:var(--r-round);
  background:var(--white);color:var(--forest);cursor:pointer;
  transition:background .25s ease,color .25s ease,border-color .25s ease,opacity .25s ease;
}
.tc-btn svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.tc-btn:disabled{opacity:.35;cursor:default}
.tc-btn[hidden]{display:none}
.tc-btn:focus-visible{outline:2px solid var(--rust-deep);outline-offset:3px}

.tc-slider{margin-top:clamp(26px,3vw,42px)}
.tc-track{
  --tc-per:3;
  list-style:none;margin:0;padding:4px 2px 18px;
  display:flex;gap:clamp(14px,1.6vw,22px);
  overflow-x:auto;scroll-snap-type:x mandatory;scroll-behavior:smooth;
  overscroll-behavior-x:contain;
  scrollbar-width:none;-webkit-overflow-scrolling:touch;
}
.tc-track::-webkit-scrollbar{display:none}
.tc-track:focus-visible{outline:2px solid var(--rust-deep);outline-offset:4px}
.tc-slide{
  flex:0 0 calc((100% - (var(--tc-per) - 1) * clamp(14px,1.6vw,22px)) / var(--tc-per));
  scroll-snap-align:start;
}
@media (max-width:999px){.tc-track{--tc-per:2}}
@media (max-width:620px){.tc-track{--tc-per:1.15}}

/* every photograph stacked; the current one on top, the outgoing one held
   underneath until the fade is done - the cabins page's two classes */
.tc-slide .tc-media{aspect-ratio:4/3}
.tc-shots{position:absolute;inset:0;display:block}
.tc-shots img{
  position:absolute;inset:0;width:100%;height:100%;object-fit:cover;
  opacity:0;transform:scale(1.06);
  transition:opacity .8s ease,transform 4s cubic-bezier(.22,.61,.36,1);
}
.tc-shots img.is-prev{opacity:1;z-index:1}
.tc-shots img.is-cur{opacity:1;z-index:2;transform:scale(1)}
.tc-dots{
  position:absolute;z-index:3;right:12px;bottom:14px;
  display:flex;gap:5px;
}
.tc-dots i{width:6px;height:6px;border-radius:var(--r-round);background:rgba(255,255,255,.5);transition:background .3s ease,width .3s ease}
.tc-dots i.is-cur{width:16px;border-radius:3px;background:rgba(255,255,255,.95)}
.tc-slide .tc-town{z-index:3}
/* hover zoom fights the crossfade's own settle, so the slider has none */
.tc-slide:hover .tc-media img{transform:none}
.tc-slide:hover .tc-media img.is-cur{transform:scale(1)}

.tc-pager{display:flex;justify-content:center;gap:8px;margin-top:6px}
.tc-pager[hidden]{display:none}
.tc-pager button{
  width:10px;height:10px;padding:0;border:0;border-radius:var(--r-round);
  background:rgba(40,52,38,.22);cursor:pointer;
  transition:background .25s ease,width .25s ease;
}
.tc-pager button[aria-current="true"]{width:26px;border-radius:5px;background:var(--rust-deep)}
.tc-pager button:focus-visible{outline:2px solid var(--rust-deep);outline-offset:3px}
@media (hover:hover) and (pointer:fine){
  .tc-btn:hover:not(:disabled){background:var(--forest);border-color:var(--forest);color:#fff}
}
@media (max-width:620px){
  .tc-slider-head{flex-direction:column;align-items:flex-start}
}
@media (prefers-reduced-motion:reduce){
  .tc-track{scroll-behavior:auto}
  .tc-shots img{transition:opacity .6s ease;transform:none}   /* still changes, as a fade with no zoom */
  .tc-pager button,.tc-dots i,.tc-btn{transition:none}
}
