/* ==========================================================================
   Resource Hub — hub home (hero, topic cards, topic sections + carousels) and
   topic hubs (/<category>/). Builds on archive.css.
   ========================================================================== */

/* hero */
.rh-hub-hero{position:relative;background:var(--rh-header);padding:84px 24px 76px;overflow:hidden}
.rh-hub-hero.has-img{background:linear-gradient(color-mix(in srgb,var(--rh-primary-deep) 78%,transparent),color-mix(in srgb,var(--rh-primary-deep) 88%,transparent)),var(--rh-hero-img) center/cover no-repeat}
.rh-hub-hero.has-img.overlay-light{background:linear-gradient(color-mix(in srgb,var(--rh-primary-deep) 35%,transparent),color-mix(in srgb,var(--rh-primary-deep) 50%,transparent)),var(--rh-hero-img) center/cover no-repeat}
.rh-hub-hero.has-img.overlay-none{background:var(--rh-primary-deep) var(--rh-hero-img) center/cover no-repeat}
.rh-hub-hero-in{max-width:860px;margin:0 auto;text-align:center;display:flex;flex-direction:column;align-items:center;position:relative}
.rh-hub-hero-pill{display:inline-block;background:rgba(255,255,255,.1);border-radius:100px;padding:8px 18px;color:rgba(255,255,255,.7);font-size:14px;margin:0}
.rh-hub-hero h1{color:#fff;font-size:clamp(34px,5.2vw,58px);line-height:1.08;font-weight:800;letter-spacing:-.02em;margin:18px 0}
.rh-hub-hero h1 span{background:var(--rh-accent-grad);-webkit-background-clip:text;background-clip:text;color:transparent}
.rh-hub-hero-text{color:rgba(255,255,255,.78);font-size:18px;line-height:1.6;max-width:680px;margin:0 0 30px}
.rh-hub-hero-btns{display:flex;gap:14px;flex-wrap:wrap;justify-content:center}
.rh-hub-hero .rh-btn{padding:15px 24px}

/* shared */
.rh-hub-body{padding-top:56px}
.rh-hub-h2{font-size:clamp(26px,3.2vw,36px);line-height:1.15;font-weight:800;letter-spacing:-.02em;color:var(--rh-primary);margin:0 0 22px}
.rh-hub-h2 a{color:var(--rh-primary)!important}
.rh-hub-h2 a:hover{color:var(--rh-accent)!important}
.rh-hub-sub{font-size:20px;font-weight:800;color:var(--rh-primary);margin:0 0 16px;letter-spacing:-.01em}
.rh-hub-intro{color:var(--rh-muted);font-size:16px;margin:-10px 0 0;max-width:720px;line-height:1.6}

/* topic cards */
.rh-hub-topics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
.rh-hub-topic{display:flex;flex-direction:column;background:#fff;border:1px solid var(--rh-line);border-radius:var(--rh-radius);box-shadow:var(--rh-shadow-sm);overflow:hidden;transition:transform .2s,box-shadow .2s,border-color .2s;color:var(--rh-ink)!important}
a.rh-hub-topic:hover{transform:translateY(-3px);box-shadow:var(--rh-shadow);border-color:var(--rh-accent-line)}
.rh-hub-topic-media{display:block;position:relative;aspect-ratio:16/8;overflow:hidden;background:var(--rh-soft)}
.rh-hub-topic-media>img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .4s}
a.rh-hub-topic:hover .rh-hub-topic-media>img{transform:scale(1.04)}
.rh-hub-topic-body{display:flex;flex-direction:column;padding:16px 18px 18px;flex:1}
.rh-hub-topic-title{font-size:20px;font-weight:800;color:var(--rh-primary);letter-spacing:-.01em;line-height:1.2}
.rh-hub-topic-blurb{font-size:14px;color:var(--rh-muted);line-height:1.5;margin:6px 0 12px;flex:1}
.rh-hub-topic-meta{display:flex;align-items:center;justify-content:space-between;font-size:13px;font-weight:700;color:var(--rh-accent);margin-top:auto;padding-top:8px}
.rh-hub-topic-meta .go{width:28px;height:28px;border-radius:50%;background:var(--rh-accent-grad);display:grid;place-items:center;color:var(--rh-on-accent)}
.rh-hub-topic-meta .go svg{width:10px;height:10px}
div.rh-hub-topic{opacity:.6}
div.rh-hub-topic .rh-hub-topic-meta{color:var(--rh-muted)}

/* topic sections */
.rh-hub-section{margin-top:72px}
.rh-hub-section-head{display:flex;justify-content:space-between;align-items:flex-end;gap:24px;margin-bottom:26px;padding-top:28px;border-top:1px solid var(--rh-line)}
.rh-hub-viewall{flex:none}
.rh-hub-featured{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;margin-bottom:40px}
.rh-hub-pin{position:relative}
.rh-hub-pin:after{content:"Featured";position:absolute;top:12px;left:12px;font-size:11px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:#fff;background:var(--rh-primary);padding:5px 10px;border-radius:999px}
.rh-hub-featured .rh-arch-pill,.rh-hub-cat .rh-arch-pill,.rh-hub-track .rh-arch-pill{display:none}
.rh-hub-featured .rh-arch-card-title{font-size:20px;line-height:1.28;font-weight:700}

/* carousel: 4 visible, scroll-snap, arrow buttons */
.rh-hub-carousel-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px}
.rh-hub-carousel-head .rh-hub-sub{margin:0}
.rh-hub-carousel-nav{display:flex;gap:8px}
.rh-hub-carousel-nav button{width:40px;height:40px;border-radius:50%;border:1.5px solid var(--rh-line);background:#fff;color:var(--rh-primary);font-size:18px;font-weight:700;cursor:pointer;transition:background .2s,border-color .2s}
.rh-hub-carousel-nav button:hover:not(:disabled){background:var(--rh-accent-grad);border-color:transparent;color:var(--rh-on-accent)}
.rh-hub-carousel-nav button:disabled{opacity:.35;cursor:default}
.rh-hub-track{display:grid;grid-auto-flow:column;grid-auto-columns:calc((100% - 3*20px)/4);gap:20px;overflow-x:auto;scroll-snap-type:x mandatory;scroll-behavior:smooth;padding:12px 2px 18px;scrollbar-width:none}
.rh-hub-track::-webkit-scrollbar{display:none}
.rh-hub-track>.rh-arch-card{scroll-snap-align:start}
.rh-hub-track .rh-arch-card-title{font-size:16.5px;font-weight:700}
.rh-hub-track .rh-arch-card-ex,.rh-hub-track .rh-arch-card-go{display:none}
.rh-hub-track .rh-arch-card-body{padding:14px 16px 16px}

/* topic hub */
.rh-hub-cat-head{max-width:780px;margin:0 0 22px}
.rh-hub-cat-money{margin:12px 0 0;font-weight:700}
.rh-hub-cat .rh-hub-section{margin-top:34px}
.rh-hub-cat .rh-hub-featured{margin-bottom:10px}

@media (max-width:1024px){
  .rh-hub-topics,.rh-hub-featured{grid-template-columns:repeat(2,minmax(0,1fr))}
  .rh-hub-track{grid-auto-columns:calc((100% - 20px)/2)}
}
@media (max-width:700px){
  .rh-hub-hero{padding:56px 16px 52px}
  .rh-hub-hero-text{font-size:16px}
  .rh-hub-topics{gap:12px}
  .rh-hub-topic-media{aspect-ratio:16/10}
  .rh-hub-topic-body{padding:12px 12px 14px}
  .rh-hub-topic-title{font-size:16px}
  .rh-hub-topic-blurb{display:none}
  .rh-hub-featured{grid-template-columns:1fr;gap:12px}
  .rh-hub-featured .rh-arch-card{flex-direction:row}
  .rh-hub-featured .rh-arch-card-media{width:36%;flex:none;aspect-ratio:auto;min-height:104px}
  .rh-hub-featured .rh-arch-card-body{padding:12px 14px}
  .rh-hub-featured .rh-arch-card-title{font-size:16px;margin:0 0 6px}
  .rh-hub-featured .rh-arch-card-ex,.rh-hub-featured .rh-arch-card-go{display:none}
  .rh-hub-pin:after{top:8px;left:8px;font-size:9.5px;padding:3px 7px}
  .rh-hub-section{margin-top:52px}
  .rh-hub-section-head{flex-direction:column;align-items:flex-start}
  .rh-hub-viewall{width:100%}
  .rh-hub-track{grid-auto-columns:82%}
}
