/* ==========================================================================
   Sheffield Walkers • Core Styles (mobile-first)
   ========================================================================== */

:root{
  --sw-gutter: 10px;
  --sw-wide: 1200px;
  --sw-narrow: 800px;
}

/* Page safety */
html, body { overflow-x: hidden; }

/* Sticky header helper (safe with WP admin bar) */
.is-sticky-header{ position: sticky; top: 0; z-index: 999; background: var(--wp--preset--color--base, #fff); }
.admin-bar .is-sticky-header{ top: 32px; }
@media (max-width: 782px){ .admin-bar .is-sticky-header{ top: 46px; } }

/* ==========================================================================
   Full-bleed + gutter system
   ========================================================================== */

/* Fallback: 100vw; Modern browsers: 100dvw avoids the right “bite”. */
.sw-bleed{
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  width: 100vw;
  max-width: 100vw;
  overflow-x: visible;
}
@supports (width: 100dvw){
  .sw-bleed{
    margin-left: calc(50% - 50dvw);
    margin-right: calc(50% - 50dvw);
    width: 100dvw;
    max-width: 100dvw;
  }
}

.sw-edge{
  box-sizing: border-box;
  padding-inline: var(--sw-gutter);
  width: 100%;
  margin-inline: 0;
}
@media (min-width: 900px){
  .sw-edge{
    max-width: calc(var(--sw-wide) + (var(--sw-gutter) * 2));
    margin-inline: auto;
  }
}

/* ==========================================================================
   Buttons (shared) + force apply to comment submit
   ========================================================================== */

.sw-btn{
  display:inline-block;
  padding:10px 16px;
  border-radius:9999px;
  border:1px solid #111;
  background:#111;
  color:#fff;
  font-weight:600;
  text-decoration:none;
  cursor:pointer;
  line-height:1;
  font-size:1rem;
}
.sw-btn:hover{ background:#000; }

.sw-btn.sw-btn--ghost{ background: transparent; color:#111; border-color:#111; }

/* Utility: button rows */
.sw-btnrow .sw-btn{ margin-right:10px; }
.sw-btnrow .sw-btn:last-child{ margin-right:0; }

/* Make the WP comment submit look IDENTICAL to .sw-btn */
.comment-form .submit,
input#submit,
.form-submit input[type="submit"]{
  -webkit-appearance:none; appearance:none;
  border-radius:9999px !important;
  padding:10px 16px !important;
  background:#111 !important;
  color:#fff !important;
  border:1px solid #111 !important;
  font-weight:600 !important;
  cursor:pointer !important;
  line-height:1 !important;
  font-size:1rem !important;
}
.comment-form .submit:hover,
input#submit:hover,
.form-submit input[type="submit"]:hover{ background:#000 !important; }

/* ==========================================================================
   Walk “card” (single and archive)
   ========================================================================== */

.sw-walk-card{
  box-sizing:border-box;
  margin:0;
  border-radius:12px;
  background:#fff;
  border:1px solid #e5e7eb;
  box-shadow:0 1px 4px rgba(0,0,0,.08);
  overflow:hidden;
  width:100%;
  max-width:100%;
}

/* containers only */
.sw-walk-card .sw-card__media,
.sw-walk-card .sw-card__body,
.sw-walk-card .sw-walk-map{
  box-sizing:border-box;
  width:100%;
  max-width:100%;
}

.sw-walk-card .sw-card__body{ padding:16px; }
.sw-walk-card .sw-card__title{ margin:0 0 .4rem 0; }
.sw-walk-card .sw-card__meta{
  display:flex; flex-wrap:wrap; gap:.5rem .6rem; align-items:center; margin:0 0 .4rem 0;
}
.sw-walk-card .sw-card__byline{ margin:0 0 .6rem 0; color:#444; }

.sw-walk-card .sw-card__media img.sw-hero{ display:block; width:100%; height:auto; }

/* responsive images in content only */
.sw-walk-card .sw-card__media img,
.sw-walk-card .sw-card__body img{
  width:100%; max-width:100%; height:auto;
}

/* Sections */
.sw-walk-card .sw-section{ margin-top:1rem; }
.sw-walk-card .sw-section h3{ margin:0 0 .5rem 0; font-size:1rem; font-weight:600; }
.sw-walk-card .sw-content{ line-height:1.6; }

/* Map container */
.sw-walk-card .sw-section--map .sw-walk-map{
  border-radius:12px;
  overflow:hidden;
  border:1px solid #e5e7eb;
}
.sw-walk-card .sw-walk-map .leaflet-container{ min-height:360px; }

/* Typical embeds */
.sw-walk-card video,
.sw-walk-card iframe,
.sw-walk-card .wp-block-embed{ max-width:100%; display:block; }

/* Long words */
.sw-card__title, .sw-card__body, .sw-content, .sw-section{ overflow-wrap:anywhere; word-break:break-word; }

/* --- Anchor “View Walk” button (Walks Archive cards) --- */
.sw-archive-card .sw-card__body{
  position: relative;
  display: flex; flex-direction: column;
  padding-bottom: calc(16px + 40px + 16px);
}
.sw-archive-card .sw-actions{
  position: absolute;
  left: 16px;
  bottom: 16px;
  margin: 0;
  padding: 0;
}
.sw-archive-card .sw-actions .sw-btn{ display: inline-block; }

/* ==========================================================================
   Contact / generic cards
   ========================================================================== */
.sw-contact-inner{ padding-inline:var(--sw-gutter); box-sizing:border-box; margin-inline:auto; display:block; }
.sw-contact-card{
  background:#fff; border-radius:12px; box-shadow:0 1px 4px rgba(0,0,0,.08);
  padding:20px; width:100%; max-width:100%; box-sizing:border-box;
}
.sw-contact-card .sw-input,
.sw-contact-card .sw-textarea,
.sw-contact-card input[type="text"],
.sw-contact-card input[type="email"],
.sw-contact-card textarea{ width:100%; max-width:100%; box-sizing:border-box; }
@media (min-width:900px){ .sw-contact-inner{ max-width: var(--sw-narrow); } }

/* ==========================================================================
   Events styles (unchanged essentials)
   ========================================================================== */
.single-tribe_events .tribe-events-event-image img,
.single-tribe_events .wp-block-post-featured-image img{ width:100%; height:auto; display:block; border-radius:12px; }
.single-tribe_events .tribe-events-single-event-description,
.single-tribe_events .tribe-common .tribe-tickets__rsvp-wrapper,
.single-tribe_events .tribe-events-cal-links{
  background:#fff; border:1px solid #e5e7eb; border-radius:12px; padding:16px 18px; margin:24px 0; box-shadow:0 1px 3px rgba(0,0,0,0.04);
}

/* Make the RSVP block span full card width */
.single-tribe_events .tribe-common .tribe-tickets__rsvp-wrapper{
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  margin: 24px 0;
}
.single-tribe_events .tribe-common .tribe-tickets__rsvp { width: 100%; }

/* Hide native "Details" meta group at the bottom */
.single-tribe_events .tribe-events-single .tribe-events-single-section.tribe-events-event-meta,
.single-tribe_events .tribe-events-single .tribe-events-meta-group-details{
  display: none !important;
}
.single-tribe_events .tribe-events-cal-links{ margin: 16px 0 8px; }

/* TEC Single — Header meta */
.single-tribe_events .sw-event-header-meta{ margin:6px 0 10px; }
.single-tribe_events .sw-event-header-meta .sw-meta-distance{
  display:block; font-weight:600; font-size:.95rem; margin-top:4px;
}
.single-tribe_events .sw-event-header-meta .sw-meta-author{
  margin-top:4px; font-size:.95rem; opacity:.9;
}

/* TEC Single — Button normaliser (scoped) */
.single-tribe_events a.sw-btn,
.single-tribe_events .sw-btn{
  display:inline-block; text-decoration:none; line-height:1.2;
  border-radius:9999px; padding:10px 14px; border:1px solid #111; background:#111; color:#fff;
}
.single-tribe_events a.sw-btn:hover,
.single-tribe_events .sw-btn:hover{ background:#000; }

.single-tribe_events a.sw-btn.sw-btn--ghost,
.single-tribe_events .sw-btn.sw-btn--ghost{ background:transparent; color:#111; border-color:#111; }

.single-tribe_events .sw-btnrow .sw-btn{ margin-right:10px; }
.single-tribe_events .sw-btnrow .sw-btn:last-child{ margin-right:0; }

/* ==========================================================================
   Role Pills
   ========================================================================== */
.sw-pill{ display:inline-block; padding:.22rem .6rem; border:1px solid #e5e7eb; border-radius:999px; font-size:.85rem; line-height:1; background:#f3f4f6; }
.sw-pill--leader{    background:#e8faf0; border-color:#bbf7d0; color:#065f46; }
.sw-pill--committee{ background:#eff6ff; border-color:#bfdbfe; color:#1e3a8a; }
.sw-pill--admin{     background:#f5f3ff; border-color:#ddd6fe; color:#4c1d95; }
.sw-pill--other{     background:#f3f4f6; border-color:#e5e7eb; color:#374151; }

.sw-pill.sw-status{ font-size:.85rem; line-height:1; padding:.22rem .6rem; display:inline-flex; align-items:center; white-space:nowrap; }

/* ==========================================================================
   TT25 compatibility for Single Walk
   ========================================================================== */
body.single-walk .wp-site-blocks,
body.single-walk .wp-site-blocks.has-global-padding { padding-left:0 !important; padding-right:0 !important; }
body.single-walk .wp-block-group.alignfull,
body.single-walk .wp-block-cover.alignfull,
body.single-walk .wp-block-columns.alignfull { padding-left:0 !important; padding-right:0 !important; }

body.single-walk .sw-walk-card { contain: layout paint; }

/* ==========================================================================
   Mobile typography tweaks + Starting Point layout
   ========================================================================== */
@media (max-width:480px){
  .sw-walk-card .sw-card__title { font-size:1.5rem; }
  .sw-walk-card .sw-card__meta  { font-size:.98rem; }
  .sw-pill { font-size:.9rem; padding:.28rem .7rem; }
  .sw-btn { font-size:1rem; }
}
.sw-starting-point .sw-actions { display:flex; gap:.6rem; flex-wrap:wrap; margin-top:.4rem; }
.sw-starting-point h3 { margin-bottom:.4rem; }

/* ---------- Header / Footer (unchanged essentials) ---------- */
.sw-site-header { position:relative; z-index:10; background:#fff; border-bottom:1px solid #e5e7eb; }
.sw-header-inner { display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:10px; padding:8px var(--sw-gutter); max-width:calc(var(--sw-wide) + (var(--sw-gutter) * 2)); margin:0 auto; }
@media (max-width:680px){ .sw-header-inner { grid-template-columns:auto 1fr auto; } }
.sw-brand img { height:40px; width:auto; display:block; }

.sw-site-footer { border-top:1px solid #e5e7eb; background:#fff; }
.sw-footer-inner { display:grid; grid-template-columns:1fr auto; gap:16px; padding:16px var(--sw-gutter); max-width:calc(var(--sw-wide) + (var(--sw-gutter) * 2)); margin:0 auto; }
@media (max-width:700px){ .sw-footer-inner { grid-template-columns:1fr; } }

/* ---------- Comments (avatars) ---------- */
.comment-list .avatar,
#comments .avatar,
.comment-author .avatar,
img.avatar{
  border-radius:9999px !important;
  width:40px !important;
  height:40px !important;
  object-fit:cover;
}

/* ---------- OS Map sizing ---------- */
.sw-section--map .sw-walk-map { display:block; }
.sw-section--map .sw-walk-map .leaflet-container {
  height:360px !important;
  max-height:60vh;
  display:block;
}
@media (min-width:768px){
  .sw-section--map .sw-walk-map .leaflet-container { height:420px !important; }
}

/* Elevation canvases */
.sw-section--map .sw-walk-map .elevation,
.sw-section--map .sw-walk-map .elevation-control,
.sw-section--map .sw-walk-map .osmap-elevation,
.sw-section--map .sw-walk-map .elevation-canvas{
  height:160px !important;
  max-height:35vh;
  margin-top:8px;
  display:block;
}

/* Prevent overlap */
.sw-section--map .sw-walk-map > * { position:relative; z-index:0; }

/* ==========================================================================
   Forms — ensure controls inherit site font (Inter)
   ========================================================================== */
.sw-contact-card,
.sw-ws-card,
.sw-form,
.sw-ws-form { font: inherit; }

.sw-contact-card input,
.sw-contact-card textarea,
.sw-contact-card button,
.sw-contact-card select,
.sw-ws-card input,
.sw-ws-card textarea,
.sw-ws-card button,
.sw-ws-card select {
  font: inherit;
  line-height: inherit;
}

/* ==========================================================================
   Walk Suggestions
   ========================================================================== */
.sw-ws-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}
.sw-ws-card { padding: 12px 14px; }
.sw-ws-card.is-completed { opacity: .6; filter: grayscale(1); }
.sw-ws-card-top {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}
.sw-ws-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: .95rem; color: #374151; }
.sw-ws-body { margin-top: 8px; line-height: 1.55; }
.sw-ws-support { margin-top: 10px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sw-ws-spacer { flex: 1 1 auto; }
.sw-ws-vote-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: .35rem .7rem;
  border-radius: 999px; border: 1px solid #d1d5db; background: #fff; line-height: 1; cursor: pointer;
}
.sw-ws-vote-btn[disabled]{ opacity:.6; cursor:default; }
.sw-ws-vote-btn.is-active{ border-color:#111827; box-shadow:0 0 0 1px #111827 inset; }
.sw-ws-complete-btn{
  padding:.42rem .85rem; border:1px solid #6b7280; background:#fff; border-radius:999px; cursor:pointer;
}
.sw-ws-complete-btn[disabled]{ cursor:default; opacity:.5; }
.sw-ws-emoji { font-size: 1rem; }
.sw-ws-vote-count { font-size: .95rem; }

/* ==========================================================================
   Attendance Manager (used by sw-attendance-manager.php)
   ========================================================================== */
.sw-attendance { margin: 0; }
.sw-picker { position: relative; display: inline-block; }
.sw-picker__button{
  display:inline-flex; align-items:center; justify-content:center;
  padding:12px 18px; min-height:48px; min-width:180px;
  background:#111; color:#fff; border:1px solid #111; border-radius:10px;
  font-weight:600; cursor:pointer; text-decoration:none;
}
.sw-picker__button:hover{ opacity:.95; }
.sw-attendance__select{
  position:absolute; inset:0; width:100%; height:100%;
  opacity:0; appearance:none; -webkit-appearance:none; cursor:pointer;
}
.sw-attendance__selected{ margin-top:12px; padding-top:6px; font-weight:600; font-size:1rem; line-height:1.35; color:#111; }
.sw-attendance__table-wrap{ width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch; margin-top:10px; }
.sw-attendance__table{ width:100%; border-collapse:collapse; }
.sw-attendance__table th, .sw-attendance__table td{ padding:.6rem .7rem; border-bottom:1px solid #e5e7eb; vertical-align:middle; }
.sw-attendance__table th{ text-align:left; font-weight:600; }
.sw-attendance__name a{ text-decoration:none; border-bottom:1px dotted #111; }
.sw-attendance__name a:hover{ border-bottom-style:solid; }
.sw-attendance__table th.sw-col-check,
.sw-attendance__table td.sw-col-check{ text-align:center; }
.sw-attendance__table td.sw-col-check .sw-checkin{ margin-left:auto; margin-right:auto; }
.sw-checkin{
  display:inline-flex; align-items:center; justify-content:center;
  width:36px; height:36px; border:1px solid #d1d5db; border-radius:8px; background:#fff; cursor:pointer; user-select:none;
}
.sw-checkin input[type='checkbox']{
  appearance: checkbox; -webkit-appearance: checkbox;
  transform:scale(1.35); accent-color:#111; width:20px; height:20px;
}
.sw-checkin:focus-within{ outline:3px solid #111; outline-offset:2px; }
.sw-attendance__muted{ color:#6b7280; }
.sw-attendance__toast{ margin:.5rem 0; font-size:.9rem; }
.sw-attendance__toast--ok{ color:#065f46; }
.sw-attendance__toast--err{ color:#991b1b; }
@media (max-width:480px){
  .sw-attendance__table th, .sw-attendance__table td{ padding:.55rem .5rem; }
  .sw-attendance__name a{ display:inline-block; padding-right:.25rem; }
}

/* ==========================================================================
   Walks Archive (used by sw-walks-archive.php)
   ========================================================================== */
.sw-archive-rail { position: relative; }
.sw-archive-container { display: grid; gap: 12px; }
.sw-archive-card .sw-card__body{ display:flex; flex-direction:column; }
.sw-archive-card .sw-actions{ margin-top:auto; padding-top:10px; }
.sw-archive-card .sw-actions .sw-btn{ display:inline-block; }

/* Desktop rail (tall enough) */
@media (min-width: 1024px) and (min-height: 801px){
  .sw-archive-container{
    display: flex;
    overflow-x: auto;
    gap: 16px;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-gutter: stable both-edges;
  }
  .sw-archive-container > .sw-walk-card{
    flex: 0 0 clamp(340px, 30vw, 420px);
    max-width: none;
    scroll-snap-align: start;
  }
  .sw-archive-card .sw-card__media img.sw-hero{
    height: 240px; object-fit: cover; width: 100%; display: block;
  }
  .sw-archive-card .sw-card__title{
    display:-webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow:hidden;
  }
  .sw-archive-card .sw-content--clamp{ -webkit-line-clamp: 2; }
}

/* Short desktop fallback: use a normal grid to avoid two-axis scroll */
@media (min-width: 1024px) and (max-height: 800px){
  .sw-archive-container{
    display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px;
  }
  .sw-archive-container > .sw-walk-card{ max-width: 100%; }
}

/* Paddles (desktop only; shown when rail actually scrolls) */
.sw-archive-nav{
  position:absolute; top:50%; transform:translateY(-50%);
  width:40px; height:40px;
  display:none; align-items:center; justify-content:center;
  border:1px solid #e5e7eb; border-radius:9999px;
  background:#fff; box-shadow:0 2px 8px rgba(0,0,0,.08);
  font-size:22px; line-height:1; cursor:pointer; user-select:none;
}
.sw-archive-prev{ left: -4px; }
.sw-archive-next{ right: -4px; }
.sw-archive-nav:hover{ background:#f9fafb; }

/* Only show paddles when: desktop & tall & rail overflows (JS toggles .is-scrollable) */
@media (min-width: 1024px) and (min-height: 801px){
  .sw-archive-rail.is-scrollable .sw-archive-nav{ display:inline-flex; }
}

/* Optional: subtle spacing for metrics inside the meta row */
.sw-card__meta .sw-metric { margin-right: .6rem; }

/* Clamp short descriptions by default (~3 lines on non-rail views) */
.sw-content--clamp {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Two-line meta for My Walks cards */
.sw-archive-card .sw-card__pub{
  display:flex; gap:.5rem; align-items:center; margin:0 0 .35rem;
}
.sw-archive-card .sw-card__stats{
  display:flex; flex-wrap:wrap; gap:.5rem .6rem; align-items:center; margin:0 0 .4rem;
}
.sw-archive-card .sw-card__stats .sw-metric{ white-space:nowrap; }

/* --- Pill size normalizer: make status = grade exactly --- */
.sw-pill.sw-pill--grade,
.sw-pill.sw-status,
.sw-pill{
  font-size: .85rem !important;
  line-height: 1 !important;
  padding: .22rem .6rem !important;
  border-radius: 9999px !important;
}
@media (max-width:480px){
  .sw-pill.sw-pill--grade,
  .sw-pill.sw-status,
  .sw-pill{
    font-size: .9rem !important;
    padding: .28rem .7rem !important;
  }
}

/* Hide ET small-CTA cost & stock spans everywhere (keeps RSVP link) */
.tribe-events-c-small-cta__price,
.tribe-events-c-small-cta__stock { display:none !important; }

/* TEC list (mobile): tighten title ↔ pill, add space pill ↔ metrics */
@media (max-width: 640px){
  .tribe-events .tribe-events-calendar-list__event .tribe-events-calendar-list__event-title,
  .tribe-events .tribe-events-calendar-list__event .tribe-common-h4{ margin-bottom: .35rem; }
  .tribe-events .tribe-events-calendar-list__event .sw-pill--grade{
    display: inline-flex; align-items: center; margin-top: 0; margin-bottom: .45rem;
  }
  .tribe-events .tribe-events-calendar-list__event .sw-evt__metrics{ margin-top: 0; }
}

/* ===== bbPress: header layout (logo | centered title | menu) ===== */
body.bbpress #is-sticky-header .wp-block-group.alignwide{
  display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:12px;
}
body.bbpress #is-sticky-header .wp-block-uagb-advanced-heading,
body.bbpress #is-sticky-header .wp-block-heading,
body.bbpress #is-sticky-header h1{
  margin:0; text-align:center; justify-self:center; line-height:1.1; font-weight:700;
  font-size:clamp(1.1rem, 3.8vw, 1.6rem);
}
body.bbpress #is-sticky-header .wp-block-uagb-image,
body.bbpress #is-sticky-header .wp-block-image,
body.bbpress #is-sticky-header .wp-block-site-logo{ justify-self:start; }
body.bbpress #is-sticky-header .wp-block-uagb-icon,
body.bbpress #is-sticky-header .wp-block-navigation__responsive-container-open{ justify-self:end; }
@media (max-width:420px){
  body.bbpress #is-sticky-header .wp-block-group.alignwide{ gap:10px; }
  body.bbpress #is-sticky-header h1{ font-size:clamp(1.05rem, 3.6vw, 1.45rem); }
}
#is-sticky-header{ position:sticky; top:0; z-index:50; }

/* ===== Single Walk: fix header alignment (logo | centered title | menu) ===== */
body.single-walk-php #is-sticky-header .wp-block-group.alignwide{
  display: grid !important; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
}
body.single-walk-php #is-sticky-header .wp-block-group.alignwide.is-layout-flex{ justify-content: unset !important; }
body.single-walk-php #is-sticky-header .wp-block-uagb-image,
body.single-walk-php #is-sticky-header .wp-block-image,
body.single-walk-php #is-sticky-header .wp-block-site-logo{ grid-column: 1; justify-self: start; }
body.single-walk-php #is-sticky-header .wp-block-uagb-advanced-heading,
body.single-walk-php #is-sticky-header .wp-block-heading,
body.single-walk-php #is-sticky-header h1{
  grid-column: 2; justify-self: center; text-align: center; margin: 0; line-height: 1.1; font-weight: 700;
  font-size: clamp(1.1rem, 3.8vw, 1.6rem);
}
body.single-walk-php #is-sticky-header .wp-block-uagb-icon,
body.single-walk-php #is-sticky-header .wp-block-navigation__responsive-container-open{ grid-column: 3; justify-self: end; }
body.single-walk-php #is-sticky-header .wp-block-uagb-icon a{
  display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 9999px;
}
@media (max-width:420px){
  body.single-walk-php #is-sticky-header .wp-block-group.alignwide{ gap: 10px; }
  body.single-walk-php #is-sticky-header h1{ font-size: clamp(1.05rem, 3.6vw, 1.45rem); }
}

/* =========================
   Header: fluid, mobile-responsive sizing
   ========================= */
#is-sticky-header .sw-header__title,
#is-sticky-header .wp-block-uagb-advanced-heading .uagb-heading-text,
#is-sticky-header .wp-block-heading,
#is-sticky-header h1 {
  font-size: clamp(1.0625rem, 4.2vw, 1.625rem);
  line-height: 1.1;
  font-weight: 700;
  margin: 0;
  text-wrap: balance;
}
#is-sticky-header .sw-header__logo img,
#is-sticky-header .wp-block-site-logo img,
#is-sticky-header .wp-block-image img { width: clamp(48px, 10vw, 80px) !important; height: auto !important; max-width: none !important; display: block; }
#is-sticky-header .sw-header__menu a,
#is-sticky-header .wp-block-uagb-icon a,
#is-sticky-header .wp-block-navigation__responsive-container-open{
  width: clamp(36px, 8vw, 44px); height: clamp(36px, 8vw, 44px);
  display: inline-flex; align-items: center; justify-content: center; border-radius: 9999px; line-height: 1;
}
#is-sticky-header .wp-block-uagb-icon .uagb-svg-wrapper,
#is-sticky-header .wp-block-uagb-icon svg,
#is-sticky-header .wp-block-navigation__responsive-container-open svg{
  width: clamp(18px, 4.2vw, 26px) !important; height: clamp(18px, 4.2vw, 26px) !important;
}
@media (max-width:640px){
  #is-sticky-header .wp-block-group.alignwide{ padding-top: 10px !important; padding-bottom: 10px !important; }
}

/* SW • Comms forms (leader + coordinator) */
.sw-contact-card form label { display: block; margin: 12px 0 4px; }
.sw-contact-card form select,
.sw-contact-card form input[type="text"],
.sw-contact-card form textarea { width: 100%; max-width: 100%; display: block; margin-bottom: 14px; }

/* ==========================================================================
   Homepage sections + hero (legacy scroll-snap layout)
   ========================================================================== */

/* Layout & spacing – now scoped so it only affects pages using .sw-sections */
.sw-sections { /* desktop gentle snap only (see media query below) */ }

.sw-sections .sw-section {
  position: relative;
  padding: 56px 16px;
}

@media (min-width: 768px){
  .sw-sections .sw-section {
    padding: 88px 24px;
  }
}

.sw-sections .sw-section > .wp-block-group,
.sw-sections .sw-section > .wp-block-columns {
  max-width: 1200px;
  margin-inline: auto;
}

/* Hero */
.sw-section--hero{
  position: relative; /* ensures absolute children (image/overlay) anchor to section */
  min-height: 70svh; display: grid; place-items: center; overflow: hidden; color: #fff;
}
.sw-section--hero::before{
  content:""; position:absolute; inset:0; z-index: 1;
  background: linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.25));
}
.hero__media{ position:absolute; inset:0; margin:0; z-index:0; }
.hero__media img{
  display:block;
  width:100% !important; height:100% !important; object-fit:cover !important;
  transform: scale(1.06); animation: sw-kenburns 14s ease-out forwards; will-change: transform;
}
@keyframes sw-kenburns{ 0%{ transform: scale(1.14); } 100%{ transform: scale(1.06); } }
.hero__content{ position: relative; z-index: 2; text-align: center; max-width: 800px; padding: 0 12px; }
.sw-hero__title{ line-height: 1.05; margin: 0 0 10px; }
.sw-hero__tag{ font-size: 1.05rem; opacity: .95; margin-bottom: 18px; }

/* Buttons small lift */
.wp-block-button .wp-block-button__link{ transition: transform .2s ease, box-shadow .2s ease; }
.wp-block-button .wp-block-button__link:hover{ transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.12); }

/* Events */
.sw-section--events h2{ margin-bottom: 16px; }
.sw-events__slot .tribe-common { /* TEC block wrapper hook if present */ }
.sw-link{ text-decoration: none; border-bottom: 1px solid currentColor; }

/* About grid */
.sw-about__grid{ row-gap: 12px; }
@media (min-width: 768px){ .sw-about__grid{ column-gap: 18px; } }
.sw-about__item{
  background: var(--wp--preset--color--base, #fff); border: 1px solid #eee; border-radius: 14px;
  padding: 16px 16px 12px; transition: transform .25s ease, box-shadow .25s ease;
}
.sw-about__item:hover{ transform: translateY(-3px); box-shadow: 0 10px 28px rgba(0,0,0,.08); }

/* On-scroll reveal (section + child stagger) */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal [data-reveal]{ opacity: 0; transform: translateY(10px); }
.reveal.is-visible [data-reveal]{ opacity: 1; transform: none; }
.reveal.is-visible [data-reveal]:nth-child(1){ transition: .35s ease .05s; }
.reveal.is-visible [data-reveal]:nth-child(2){ transition: .35s ease .15s; }
.reveal.is-visible [data-reveal]:nth-child(3){ transition: .35s ease .25s; }
.reveal.is-visible [data-reveal]:nth-child(4){ transition: .35s ease .35s; }

/* Desktop-only gentle scroll-snap (optional) */
@media (min-width: 1024px){
  .sw-sections{ scroll-snap-type: y proximity; }
  .sw-sections .sw-section{ scroll-snap-align: start; }
}

/* Motion accessibility */
@media (prefers-reduced-motion: reduce){
  .hero__media img{ animation: none; transform: none; }
  .reveal, .reveal [data-reveal]{ transition: none !important; opacity: 1 !important; transform: none !important; }
}

/* Make the hero truly edge-to-edge */
.sw-section--hero{ padding: 0; }                 /* remove section gutters */
.sw-section--hero.alignfull{ padding-left: 0; padding-right: 0; } /* defeat TT25 global padding on alignfull */

/* Constrain spacing to the inner content instead */
.sw-section--hero .hero__content{
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin-inline: auto;
  padding: 56px 16px;           /* was on the section before */
  text-align: center;
}
@media (min-width: 768px){
  .sw-section--hero .hero__content{ padding: 88px 24px; }
}

/* Ensure media + overlay span the whole hero, ignoring WP inline widths */
.sw-section--hero .hero__media{ position: absolute; inset: 0; margin: 0; z-index: 0; }
.sw-section--hero .hero__media img{
  display: block;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  transform: scale(1.06);
  animation: sw-kenburns 14s ease-out forwards;
  will-change: transform;
}

/* Gradient overlay sits above image, below content */
.sw-section--hero::before{
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.25));
}

/* Neutralise WP image sizing constraints inside the hero only */
.sw-section--hero .wp-block-image,
.sw-section--hero figure{ max-width: none !important; width: 100% !important; }

/* Keep hero overlays inside the hero only */
.sw-section--hero{ isolation: isolate; }            /* new stacking context */
.sw-section--hero::before{ z-index: 1; }            /* (already set) */

/* Make the Events section truly solid white and independent */
.sw-section--events{
  background: #fff;
  position: relative;
  z-index: 0;                                       /* establish context */
  isolation: isolate;                               /* stop bleed-through */
}

/* If you’re using Spectra shape dividers on the hero, keep them behind */
.sw-section--hero [class*="uagb-section__shape"]{
  z-index: 0 !important;
  pointer-events: none;
}

/* Directions buttons: better tap targets on mobile */
.sw-card--directions .sw-btnrow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;           /* space between buttons */
}

.sw-card--directions .sw-btnrow .sw-btn {
  line-height: 1.25;      /* tidy text box height */
}

@media (max-width: 520px) {
  .sw-card--directions .sw-btnrow .sw-btn {
    display: block;
    width: 100%;          /* stack full-width */
    padding: 0.9rem 1rem; /* comfy tap area */
  }
}

/* Directions buttons layout (TEC single event) */
.single-tribe_events .sw-card--directions p.sw-btnrow{
  display:flex !important;
  flex-wrap:wrap;
  gap:.75rem;         /* space between buttons */
  margin:0;           /* kill default <p> margins */
}

.single-tribe_events .sw-card--directions p.sw-btnrow a.sw-btn.button{
  text-align:center;
  line-height:1.25;
  /* keep side-by-side on wider screens */
  flex:0 1 auto;
}

/* Stack & make full-width on small screens */
@media (max-width:600px){
  .single-tribe_events .sw-card--directions p.sw-btnrow a.sw-btn.button{
    display:block !important;
    width:100% !important;
    flex:1 1 100% !important;
    padding:.9rem 1rem;       /* comfy tap target */
  }
}

/* ---------- Leaflet hardening (keep at end) ---------- */
.leaflet-container img,
.leaflet-pane img,
img.leaflet-tile{
  max-width:none !important;
  width:auto !important;
  height:auto !important;
}
.leaflet-pane { opacity:1 !important; background:transparent !important; }
.leaflet-tile-pane { z-index:200 !important; }
.leaflet-overlay-pane, .leaflet-marker-pane { z-index:300 !important; }
.leaflet-shadow-pane { z-index:150 !important; }

/* ==========================================================================
   Map Mobile Polish
   ========================================================================== */
@media (max-width: 640px){
  img.leaflet-marker-icon[src*="marker-icon"],
  img.leaflet-marker-icon[src*="/pin"],
  img.leaflet-marker-icon[src*="waypoint"]{ display: none !important; }

  .leaflet-marker-pane img[class*="position"],
  .leaflet-marker-pane img[class*="cursor"],
  .leaflet-marker-pane img[src*="position"],
  .leaflet-marker-pane img[src*="cursor"],
  .leaflet-marker-pane .position-marker,
  .leaflet-marker-pane .elevation-position,
  .leaflet-marker-pane .elevation-position-marker{
    display: block !important; opacity: 1 !important; visibility: visible !important;
  }
  .leaflet-overlay-pane svg,
  .leaflet-overlay-pane svg *{ display: initial !important; visibility: visible !important; opacity: 1 !important; }
  .leaflet-overlay-pane svg path.leaflet-interactive{ stroke: #000 !important; stroke-width: 4px !important; }
}

/* ==========================================================================
   Public Member Profile (used by sw-members-public.php)
   ========================================================================== */
.sw-dir-list { display:flex; flex-direction:column; gap:12px; }
.sw-profile-card { overflow:hidden; } /* relies on .sw-contact-card for card chrome */
.sw-profile-grid { display:grid; grid-template-columns:96px 1fr; gap:12px; align-items:start; }
.sw-profile-avatar { width:96px; height:96px; border-radius:9999px; object-fit:cover; display:block; }

.sw-profile-name { margin:0 0 2px 0; font-weight:700; font-size:1.25rem; }
.sw-profile-nickname { color:#6b7280; margin:2px 0 0; font-size:.95rem; }
.sw-profile-since { margin:8px 0 6px; font-size:.95rem; color:#374151; }
.sw-profile-pills { display:flex; gap:6px; flex-wrap:wrap; }

.sw-profile-section { margin-top:14px; }
.sw-profile-section h3 { margin:0 0 6px; font-size:1rem; font-weight:600; }
.sw-profile-about { line-height:1.6; }

.sw-profile-dl { margin:8px 0 0; display:grid; grid-template-columns:minmax(120px,160px) 1fr; gap:6px 12px; }
.sw-profile-dt { color:#374151; font-weight:600; }
.sw-profile-dd { margin:0; overflow-wrap:anywhere; word-break:break-word; }
.sw-profile-ice-note { font-size:.9rem; color:#6b7280; margin-top:6px; }


/* SW • Walk Suggestions — Response button */
.sw-ws-response-edit{
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid #111;
  background: #111;
  color: #fff;
  border-radius: 9999px;          /* oval */
  padding: .45rem .9rem;          /* “some padding” */
  font: inherit;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

.sw-ws-response-edit:hover{
  filter: brightness(1.08);
}

.sw-ws-response-edit:focus-visible{
  outline: 2px solid #111;
  outline-offset: 2px;
}

/* Optional: keep it visually aligned with the "Response" label */
.sw-ws-response-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

