/* Scoped improvements: prevent edge-to-edge route cards and readable difficulty chips. */
.v5-routes{box-sizing:border-box;width:min(100% - 48px,1320px)!important;max-width:1320px!important;margin-inline:auto!important;padding-inline:0!important}
.v5-route-photo-hero .container,.v5-simple-hero .container{box-sizing:border-box;width:min(100% - 48px,1320px)!important;max-width:1320px!important;margin-inline:auto!important}
.v5-route-grid{min-width:0}.v5-route-grid>*{min-width:0}
.v5-route-level,.route-difficulty{display:inline-flex;align-items:center;border-radius:999px;padding:5px 11px;font-size:12px;font-weight:750;letter-spacing:.02em}
.v5-route-level.easy,.route-difficulty.easy{background:#e1f5e9;color:#17623c}
.v5-route-level.medium,.route-difficulty.medium{background:#fff1d6;color:#885300}
.v5-route-level.hard,.route-difficulty.hard{background:#ffe4e1;color:#a32b23}
.v5-route-level.unknown,.route-difficulty.unknown{background:#e8ebef;color:#454d5b}
@media(max-width:700px){.v5-routes,.v5-route-photo-hero .container,.v5-simple-hero .container{width:calc(100% - 32px)!important}}
.category-filters{display:flex;flex-wrap:wrap;gap:10px;margin:0 auto 24px;max-width:1320px;padding:0 24px}
.category-filters a{display:inline-flex;border:1px solid #ccd6d2;border-radius:999px;padding:10px 17px;text-decoration:none;color:#193a32;background:#fff;font-weight:650}
.category-filters a.active{background:#165941;color:#fff;border-color:#165941}

/* Route detail: consistent editorial gutters across desktop, tablet and mobile. */
.v5-hike-detail .v5-route-photo-hero .container,
.v5-hike-detail .breadcrumb,
.v5-hike-detail .v5-route-detail,
.v5-route-detail.container {
 box-sizing:border-box!important;width:calc(100% - 64px)!important;
 max-width:1320px!important;margin-left:auto!important;margin-right:auto!important;
 padding-left:0!important;padding-right:0!important;
}
.v5-hike-detail .v5-route-facts,.v5-hike-detail .v5-hike-layout{min-width:0}
.v5-hike-detail .v5-hike-layout>*{min-width:0}
@media(max-width:760px){.v5-hike-detail .v5-route-photo-hero .container,.v5-hike-detail .breadcrumb,.v5-hike-detail .v5-route-detail,.v5-route-detail.container{width:calc(100% - 32px)!important}}
/* Equal-size responsive cards with animated FLIP reordering. No uneven masonry heights. */
.category-filters button{font:inherit;cursor:pointer;display:inline-flex;border:1px solid #ccd6d2;border-radius:999px;padding:10px 17px;color:#193a32;background:#fff;font-weight:650;transition:background .2s,color .2s,border-color .2s}
.category-filters button.active{background:#165941;color:#fff;border-color:#165941}
.animated-category-grid{align-items:stretch!important}
.animated-category-grid>a{height:100%;box-sizing:border-box;min-width:0}
.animated-category-grid .o33-image,.animated-category-grid .c33-card-photo{aspect-ratio:16/10;overflow:hidden}
.animated-category-grid .o33-image img,.animated-category-grid .c33-card-photo img{width:100%;height:100%;object-fit:cover}
.animated-category-grid .o33-body,.animated-category-grid .c33-card-body{height:100%;box-sizing:border-box}
.animated-category-grid [hidden]{display:none!important}
@media(prefers-reduced-motion:reduce){.animated-category-grid>a{animation:none!important;transition:none!important}}

.animated-category-grid .c33-event-card,.animated-category-grid .o33-card{display:flex!important;flex-direction:column;min-height:100%}
.animated-category-grid .c33-card-body,.animated-category-grid .o33-body{flex:1}
.animated-category-grid .o33-body{display:flex;flex-direction:column}
.animated-category-grid .o33-body strong{margin-top:auto}

/* Hidden cards must override the grid card display:flex!important rule. */
.animated-category-grid > .c33-event-card[hidden],
.animated-category-grid > .o33-card[hidden]{display:none!important}

/* FIX: filter hidden state overrides the equal-height flex layout. */
.animated-category-grid > a[hidden],
.animated-category-grid > .o33-card[hidden],
.animated-category-grid > .c33-event-card[hidden] {display:none!important;}


/* V5.7.10 — Square, uncropped media and rounded cards for events/offers. */
.animated-category-grid > .c33-event-card,
.animated-category-grid > .o33-card {
  border-radius: 18px;
  overflow: hidden;
  isolation: isolate;
}
.animated-category-grid .c33-card-photo,
.animated-category-grid .o33-image {
  aspect-ratio: 1 / 1;
  height: auto;
  width: 100%;
  overflow: hidden;
  background: #f3f1ec;
}
.animated-category-grid .c33-card-photo img,
.animated-category-grid .o33-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
/* Prevent the hover zoom from cropping square artwork. */
.animated-category-grid > .c33-event-card:hover .c33-card-photo img,
.animated-category-grid > .o33-card:hover .o33-image img {
  transform: none;
}

/* Uniform rows retain the approved square artwork and rounded corners. */
.animated-category-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:1fr;gap:24px}
.animated-category-grid .o33-image,.animated-category-grid .c33-card-photo{flex-shrink:0}
.animated-category-grid h2{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;overflow-wrap:anywhere}
.animated-category-grid .o33-body>p,.animated-category-grid .c33-card-body p{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}
.category-grid-status{max-width:1320px;margin:24px auto}.category-grid-status:empty{display:none}
.v5-route-facts{overflow-wrap:anywhere}.v5-route-facts>div{min-width:0}
.v5-hike-detail img{max-width:100%}
@media(max-width:1000px){.animated-category-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.animated-category-grid{grid-template-columns:minmax(0,1fr)}.v5-hike-detail .v5-route-photo-hero h1{font-size:clamp(36px,10vw,60px);overflow-wrap:anywhere}}

/* V5.19: fluid itinerary pages, shared gutters and readable editorial columns. */
body.layout-fluid .v5-routes,
body.layout-fluid .v5-route-detail.container,
body.layout-fluid .v5-hike-detail .v5-route-detail,
body.layout-fluid .v5-hike-detail .breadcrumb,
body.layout-fluid .v5-route-photo-hero .container,
body.layout-fluid .v5-simple-hero .container{
 width:100%!important;max-width:none!important;margin-inline:0!important;
 padding-inline:var(--page-gutter,40px)!important;box-sizing:border-box!important;
}
.layout-fluid .v5-route-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;align-items:stretch}
.layout-fluid .v5-route-card{border-radius:24px;min-width:0;height:100%;box-sizing:border-box;overflow:hidden;background:#fff;box-shadow:0 6px 28px #14241b09;transition:transform .22s,box-shadow .22s}
.layout-fluid .v5-route-card:hover{transform:translateY(-4px);box-shadow:0 12px 32px #14241b16}
.layout-fluid .v5-route-card img{display:block;width:100%;aspect-ratio:16/10;object-fit:cover;height:auto}
.layout-fluid .v5-route-card h2{font-size:clamp(22px,2vw,30px);line-height:1.15;overflow-wrap:anywhere}
.layout-fluid .v5-route-card.hike{padding:0 0 24px;display:flex;flex-direction:column;gap:12px}
.layout-fluid .v5-route-card.hike>:not(img){margin-inline:24px;margin-block:0}
.layout-fluid .v5-route-card.hike>.v5-route-level{align-self:start;margin-top:8px}
.layout-fluid .v5-hike-layout{grid-template-columns:minmax(0,1.6fr) minmax(260px,.75fr);gap:clamp(28px,5vw,90px)}
.layout-fluid .v5-hike-layout>article>p,.layout-fluid .v5-hike-layout>article>ul{max-width:78ch}
.layout-fluid .v5-route-facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:16px}
@media(min-width:1900px){.layout-fluid .v5-route-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:1000px){.layout-fluid .v5-route-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.layout-fluid .v5-hike-layout{grid-template-columns:minmax(0,1fr)}}
@media(max-width:620px){.layout-fluid .v5-route-grid,.layout-fluid .v5-route-facts{grid-template-columns:minmax(0,1fr)}.layout-fluid .v5-route-card{width:100%}}
@media(prefers-reduced-motion:reduce){.layout-fluid .v5-route-card{transition:none}.layout-fluid .v5-route-card:hover{transform:none}}
