/* ==========================================================================
   Mountain Estate WordPress theme additions (blog browser, guide extras,
   cookie banner, helpers). Uses the tokens from main.css.
   ========================================================================== */

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.link-btn { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 3px; opacity: .8; }
.link-btn:hover { opacity: 1; }
.logo__img { max-height: 44px; width: auto; }
.page-crumbs { padding-top: calc(var(--header-h) + 28px); }
.footer-social { margin-top: 16px; font-size: .92rem; }
.footer-social a { text-decoration: none; }
.member__photo { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.hero__eyebrow a { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.4); }
.hero__eyebrow a:hover { border-color: #fff; }

/* Dark-section helpers that the static build did inline */
.section--dark .callout { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.15); border-left-color: #fff; color: rgba(255,255,255,.85); }
.feat--zones { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.1); }
.feat--zones .feat__item { background: var(--ink); }
.feat--zones .feat__item p { color: rgba(255,255,255,.7); }
.section--dark .feat--zones .feat__item:hover { background: #1b1d21; }

/* ---------- Guides browser ---------- */
.gbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; margin-bottom: 18px; }
.gbar__search { position: relative; flex: 1 1 320px; display: flex; align-items: center; }
.gbar__search > .i { position: absolute; left: 16px; color: var(--muted); pointer-events: none; }
.gbar__search input {
  width: 100%; min-height: 54px; padding: 0 46px 0 48px; font: inherit; font-size: 1rem; color: var(--ink);
  border: 1px solid var(--line-2); border-radius: 999px; background: #fff; transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none; appearance: none;
}
.gbar__search input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(17,18,20,.06); }
.gbar__search input::-webkit-search-cancel-button { display: none; }
.gbar__clear { position: absolute; right: 10px; width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--fill); color: var(--ink); }
.gbar__clear .i { width: 16px; height: 16px; }
.gbar__sort select {
  min-height: 54px; padding: 0 44px 0 18px; font: inherit; font-size: .95rem; color: var(--ink); border: 1px solid var(--line-2); border-radius: 999px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111214' stroke-width='1.8'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 16px center / 16px;
  -webkit-appearance: none; appearance: none; cursor: pointer;
}
.gbar--404 { max-width: 520px; margin: 26px auto 0; }

.gchips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; margin-bottom: 26px; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent); mask-image: linear-gradient(90deg, #000 92%, transparent); }
.gchips::-webkit-scrollbar { display: none; }
.gchip {
  flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line-2);
  text-decoration: none; font-size: .93rem; font-weight: 500; color: var(--ink); background: #fff; transition: background .2s, color .2s, border-color .2s;
}
.gchip span { font-size: .75rem; font-weight: 600; padding: 2px 7px; border-radius: 999px; background: var(--fill); color: var(--muted); }
.gchip:hover { border-color: var(--ink); }
.gchip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.gchip.is-active span { background: rgba(255,255,255,.16); color: #fff; }

.gresults { position: relative; transition: opacity .25s; }
.gbrowse.is-loading .gresults { opacity: .45; pointer-events: none; }
.gresults__count { font-size: .9rem; color: var(--muted); margin-bottom: 18px; }
.guides--featured { margin-bottom: 18px; grid-template-columns: 1fr !important; }
.guide--featured { display: grid; }
.guide--featured h3 { font-size: clamp(1.4rem, 2.6vw, 2rem); }
.gempty { text-align: center; padding: 56px 20px; border: 1px dashed var(--line-2); border-radius: var(--r-lg); }
.gempty > .i { width: 40px; height: 40px; margin: 0 auto 14px; color: var(--muted); }
.gempty p { color: var(--muted); max-width: 46ch; margin-left: auto; margin-right: auto; }
.gempty .actions { justify-content: center; }

.gpager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 40px; }
.gpager .page-numbers, .gpager .nav-links > * {
  min-width: 44px; height: 44px; padding: 0 12px; display: inline-grid; place-items: center; border-radius: 999px; border: 1px solid var(--line-2);
  text-decoration: none; color: var(--ink); font-weight: 600; font-size: .95rem; background: #fff;
}
.gpager .page-numbers.current { background: var(--ink); border-color: var(--ink); color: #fff; }
.gpager a.page-numbers:hover { border-color: var(--ink); }
.gpager .dots { border: 0; background: none; }
.gpager .nav-links { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }

/* ---------- Guide page ---------- */
.prose-wrap--single { grid-template-columns: 1fr !important; justify-items: center; }
.prose-wrap--single .prose { width: 100%; }
.keypoints { margin: 0 0 2em; padding: 24px 26px; border-radius: var(--r-lg); background: var(--fill); border: 1px solid var(--line); }
.keypoints__title { display: flex; align-items: center; gap: 8px; font-size: .8rem !important; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink) !important; margin-bottom: 14px; }
.prose .keypoints ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.prose .keypoints li { display: flex; gap: 12px; margin: 0; padding: 0; color: var(--ink); font-weight: 500; line-height: 1.5; }
.keypoints li .i { flex: none; width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: var(--ink); color: #fff; margin-top: 2px; }
.article-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 2.4em; font-size: .92rem; }
.article-tags .i { width: 18px; height: 18px; color: var(--muted); }
.prose .article-tags a { padding: 5px 12px; border-radius: 999px; background: var(--fill); text-decoration: none; font-weight: 500; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 1.6em; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.share__label { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-right: 6px; }
.share__label .i { width: 16px; height: 16px; }
.prose .share a, .share button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; font-size: .88rem; font-weight: 600; color: var(--ink); text-decoration: none; }
.share button .i { width: 16px; height: 16px; }
.prose .share a:hover, .share button:hover { border-color: var(--ink); }
.share button.is-copied { background: var(--ink); color: #fff; border-color: var(--ink); }
.author-box { display: flex; gap: 18px; align-items: flex-start; margin-top: 2em; padding: 24px; border: 1px solid var(--line); border-radius: var(--r-lg); }
.author-box__av { flex: none; width: 64px; height: 64px; border-radius: 50%; overflow: hidden; background: var(--ink); color: #fff; display: grid; place-items: center; --logo-snow: var(--ink); }
.author-box__av img { width: 100%; height: 100%; object-fit: cover; }
.author-box__av .logo__mark { width: 36px; height: 36px; }
.prose .author-box__by { font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 2px; }
.author-box strong { display: block; color: var(--ink); font-size: 1.05rem; margin-bottom: 4px; }
.prose .author-box p:last-child { margin: 0; font-size: .95rem; color: var(--muted); }

/* ---------- Search results ---------- */
.search-list { display: grid; gap: 12px; margin-top: 10px; }
.search-list a { display: grid; gap: 4px; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; transition: border-color .2s, transform .3s var(--ease-out); }
.search-list a:hover { border-color: var(--ink); transform: translateY(-2px); }
.search-list strong { color: var(--ink); font-size: 1.12rem; }
.search-list span:last-child { color: var(--muted); font-size: .95rem; }
.search-list__type { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* ---------- Cookie banner ---------- */
.cookie {
  position: fixed; left: 16px; bottom: 16px; z-index: 90; max-width: 440px; padding: 18px 20px; border-radius: var(--r-lg);
  background: var(--ink); color: rgba(255,255,255,.86); box-shadow: 0 24px 60px -24px rgba(0,0,0,.5); font-size: .92rem;
  transform: translateY(20px); opacity: 0; transition: transform .5s var(--ease-out), opacity .5s;
}
.cookie.is-in { transform: none; opacity: 1; }
.cookie p { margin: 0 0 14px; }
.cookie a { color: #fff; }
.cookie__actions { display: flex; gap: 8px; justify-content: flex-end; }
.cookie .btn--line { --fg: #fff; --bd: rgba(255,255,255,.35); }
.cookie .btn:not(.btn--line) { --bg: #fff; --fg: var(--ink); --bd: #fff; }

@media (min-width: 900px) {
  .guide--featured { grid-template-columns: 1.4fr 1fr; }
  .guide--featured .guide__img { aspect-ratio: auto; min-height: 340px; }
  .guide--featured .guide__body { padding: 36px; justify-content: center; }
}
@media (max-width: 640px) {
  .gbar__sort { flex: 1 1 100%; }
  .gbar__sort select { width: 100%; }
  .cookie { right: 16px; max-width: none; bottom: 88px; }
}
