/* =====================================================================
   FITCOM — Knowledge Hub  ·  assets/css/hub.css  (v4 — editorial, image-forward)
   Premium boutique-magazine layout on the fc-* design system.
   ===================================================================== */
:root{
  --hub-orange:#F6921E; --hub-orange-soft:#FFF1E2; --hub-orange-deep:#D9760F;
  --hub-cream:#FEF7ED; --hub-line:#EFE7DA; --hub-line-2:#E8E2D8;
  --hub-ink:#1A1A1A; --hub-muted:#7A736A; --hub-card:#FFFFFF;
  --hub-shadow:0 18px 50px rgba(40,28,10,.10);
  --hub-shadow-sm:0 6px 22px rgba(40,28,10,.07);
}

#hub{ padding-bottom:5rem; }

/* ---- Header — editorial masthead with search top-right --------------- */
.hub-head{
  display:grid; grid-template-columns:1fr auto; align-items:end;
  gap:1.5rem 2rem; padding:clamp(2.5rem,6vw,4.5rem) 0 clamp(1.75rem,3.5vw,2.75rem);
  border-bottom:1px solid var(--hub-line);
}
.hub-head__intro{ max-width:60ch; }
.hub-head .fc-eyebrow{
  color:var(--hub-orange); font-weight:700; letter-spacing:.14em;
  text-transform:uppercase; font-size:.78rem;
}
.hub-head h1{
  margin:.45em 0 .35em; font-size:clamp(2rem,4.4vw,3.1rem);
  line-height:1.08; letter-spacing:-.01em;
}
.hub-head .hub-lead{
  color:#5C564E; max-width:54ch; font-size:clamp(1rem,1.4vw,1.12rem); line-height:1.65;
}

.hub-head__search{ width:clamp(220px,24vw,310px); justify-self:end; }
.hub-search__wrap{ position:relative; }
.hub-search__wrap::before{
  content:""; position:absolute; left:1rem; top:50%; width:16px; height:16px;
  transform:translateY(-50%); opacity:.5; pointer-events:none;
  background:no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237A736A' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.3-4.3'/%3E%3C/svg%3E");
}
.hub-search{
  width:100%; padding:.85rem 1rem .85rem 2.6rem;
  border:1px solid var(--hub-line-2); border-radius:14px;
  font-size:.95rem; font-family:inherit; background:#fff;
  color:var(--hub-ink); transition:border-color .18s ease, box-shadow .18s ease;
}
.hub-search::placeholder{ color:#A79F94; }
.hub-search:focus{ outline:none; border-color:var(--hub-orange); box-shadow:0 0 0 4px rgba(246,146,30,.14); }

/* ---- E.A.R.N. ribbon -------------------------------------------------- */
.hub-earn{ display:flex; flex-wrap:wrap; gap:.55rem 1.5rem; margin:1.75rem 0 0; }
.hub-earn__pill{ display:flex; align-items:center; gap:.55rem; background:transparent; border:0; padding:0; font-size:.86rem; color:var(--hub-muted); font-weight:600; }
.hub-earn__b{ width:24px; height:24px; border-radius:50%; background:var(--hub-orange-soft); color:var(--hub-orange); font-weight:800; display:flex; align-items:center; justify-content:center; font-size:.74rem; }

/* ---- Featured — cinematic cover story -------------------------------- */
.hub-featured{
  position:relative; display:block; margin:clamp(2rem,4vw,3rem) 0;
  border-radius:26px; overflow:hidden; min-height:clamp(340px,42vw,460px);
  background:#2a2017; box-shadow:var(--hub-shadow); color:#fff;
  text-decoration:none; isolation:isolate;
}
.hub-featured__img{
  position:absolute; inset:0; z-index:-2; background-size:cover; background-position:center;
  background-image:
    radial-gradient(120% 120% at 80% 0%, rgba(255,255,255,.18), transparent 50%),
    linear-gradient(135deg,#F6921E 0%,#E0791A 55%,#C9650F 100%);
  transition:transform .7s cubic-bezier(.2,.7,.2,1);
}
.hub-featured:hover .hub-featured__img{ transform:scale(1.04); }
.hub-featured::after{
  content:""; position:absolute; inset:0; z-index:-1;
  background:linear-gradient(180deg, rgba(20,14,6,0) 30%, rgba(20,14,6,.40) 62%, rgba(20,14,6,.86) 100%);
}
.hub-featured__img::after{
  content:"E·A·R·N"; position:absolute; right:1.6rem; top:1.4rem;
  color:rgba(255,255,255,.55); font-weight:800; letter-spacing:.22em; font-size:.8rem;
}
.hub-featured__img.has-img::after{ display:none; }
.hub-featured__body{
  position:relative; z-index:1; max-width:60ch;
  padding:clamp(1.8rem,4vw,3.2rem); margin-top:auto;
  display:flex; flex-direction:column; height:100%; justify-content:flex-end;
}
.hub-featured__tag{
  align-self:flex-start; background:var(--hub-orange); color:#fff;
  font-size:.72rem; font-weight:800; text-transform:uppercase; letter-spacing:.08em;
  padding:.34rem .8rem; border-radius:999px; margin-bottom:1rem;
}
.hub-featured__body h2{ margin:0 0 .55rem; font-size:clamp(1.7rem,3.4vw,2.55rem); line-height:1.1; letter-spacing:-.01em; color:#fff; text-shadow:0 2px 20px rgba(0,0,0,.35); }
.hub-featured__body p{ color:rgba(255,255,255,.86); line-height:1.6; max-width:52ch; font-size:clamp(.95rem,1.3vw,1.08rem); margin:0; }
.hub-featured__more{ display:inline-flex; align-items:center; gap:.45rem; margin-top:1.4rem; color:#fff; font-weight:700; font-size:.98rem; }
.hub-featured__more::after{ content:"→"; transition:transform .2s ease; }
.hub-featured:hover .hub-featured__more::after{ transform:translateX(4px); }

/* ---- Filter bar — recessive, horizontal ------------------------------ */
.hub-shell{ display:block; }
.hub-rail{
  display:flex; flex-wrap:wrap; align-items:center; gap:.9rem 1.6rem;
  padding:1.1rem 0 1.4rem; margin-bottom:clamp(1.75rem,3vw,2.5rem);
  border-bottom:1px solid var(--hub-line);
}
.hub-rail .hub-search{ display:none; }
.hub-rail__group{ display:flex; align-items:center; gap:.7rem; }
.hub-rail__label{ font-size:.7rem; font-weight:700; text-transform:uppercase; letter-spacing:.1em; color:#A79F94; white-space:nowrap; }
.hub-chips{ display:flex; flex-wrap:wrap; gap:.45rem; }
.hub-chip{ cursor:pointer; border:1px solid var(--hub-line-2); background:#fff; color:#5C564E; border-radius:999px; padding:.42rem .95rem; font-size:.84rem; font-weight:600; transition:background .15s ease,color .15s ease,border-color .15s ease; user-select:none; }
.hub-chip:hover{ border-color:var(--hub-orange); color:var(--hub-ink); }
.hub-chip.is-on{ background:var(--hub-ink); border-color:var(--hub-ink); color:#fff; }
.hub-chip[data-count="0"]{ display:none; }

/* ---- Section heading ------------------------------------------------- */
.hub-gridhead{ display:flex; align-items:baseline; justify-content:space-between; margin:0 0 clamp(1.25rem,2.5vw,1.75rem); gap:1rem; }
.hub-gridhead h2{ font-size:clamp(1.2rem,2vw,1.5rem); margin:0; letter-spacing:-.01em; }
.hub-gridhead__count{ font-size:.84rem; color:#A79F94; font-weight:600; white-space:nowrap; }

/* ---- Card grid — image-led ------------------------------------------- */
.hub-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:clamp(1.4rem,2.6vw,2.2rem); align-items:stretch; }
.hub-card{
  position:relative; background:var(--hub-card); border:1px solid var(--hub-line);
  border-radius:20px; overflow:hidden; display:flex; flex-direction:column;
  text-decoration:none; color:inherit; box-shadow:var(--hub-shadow-sm);
  transition:transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.hub-card:hover{ transform:translateY(-4px); box-shadow:var(--hub-shadow); border-color:#E4D8C5; }
.hub-card__img{
  display:block; width:100%; aspect-ratio:16/10; background:var(--hub-cream) center/cover no-repeat;
  background-image:linear-gradient(135deg,#FFE6C7 0%,#F8CE9B 100%); position:relative;
}
.hub-card__img::after{ content:""; position:absolute; inset:0; background:linear-gradient(180deg, rgba(0,0,0,.10) 0%, transparent 28%); }
.hub-card:hover .hub-card__img{ filter:saturate(1.04); }
.hub-card__badges{ position:absolute; top:.85rem; left:.85rem; z-index:2; display:flex; flex-wrap:wrap; gap:.4rem; align-items:center; margin:0; }
.hub-badge{ font-size:.66rem; font-weight:800; text-transform:uppercase; letter-spacing:.05em; padding:.3rem .6rem; border-radius:999px; backdrop-filter:blur(6px); }
.hub-badge--topic{ background:rgba(255,255,255,.92); color:var(--hub-orange-deep); box-shadow:0 2px 8px rgba(0,0,0,.12); }
.hub-badge--type{ display:none; }
.hub-badge--lang{ background:rgba(26,26,26,.72); color:#fff; }
.hub-card__text{ padding:1.3rem 1.4rem 1.4rem; display:flex; flex-direction:column; flex:1; }
.hub-card h3{ font-size:1.1rem; margin:0 0 .5rem; line-height:1.32; letter-spacing:-.005em; }
.hub-card p{ color:#6B645B; font-size:.9rem; line-height:1.55; margin:0; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.hub-card__foot{ margin-top:auto; padding-top:1.05rem; font-size:.8rem; color:#A79F94; display:flex; justify-content:space-between; align-items:center; }
.hub-card__foot .read{ color:var(--hub-orange); font-weight:700; }
.hub-card__foot .read::after{ content:" →"; }

/* ---- FAQ cards — text-only, cream ------------------------------------ */
.hub-card.is-faq{ background:var(--hub-cream); border-color:#F0E3CF; box-shadow:none; }
.hub-card.is-faq .hub-card__img{ display:none; }
.hub-card.is-faq .hub-card__badges{ position:static; top:auto; left:auto; padding:1.3rem 1.4rem 0; }
.hub-card.is-faq .hub-card__badges::before{ content:"Q"; flex:0 0 auto; width:22px; height:22px; border-radius:7px; background:var(--hub-orange); color:#fff; font-weight:800; font-size:.74rem; display:inline-flex; align-items:center; justify-content:center; }
.hub-card.is-faq .hub-badge--topic{ background:#fff; box-shadow:none; }
.hub-card.is-faq .hub-card__text{ padding-top:.85rem; }
.hub-card.is-faq h3{ font-size:1.02rem; }
.hub-card.is-faq p{ -webkit-line-clamp:3; }

/* ---- Mobile ---------------------------------------------------------- */
.hub-filterbtn{ display:none; }
@media(max-width:760px){
  .hub-head{ grid-template-columns:1fr; align-items:start; }
  .hub-head__search{ width:100%; justify-self:stretch; }
  .hub-filterbtn{ display:inline-flex; align-items:center; gap:.5rem; background:var(--hub-ink); color:#fff; border:0; border-radius:999px; padding:.7rem 1.2rem; font-weight:600; font-size:.9rem; margin-bottom:1.1rem; cursor:pointer; }
  .hub-rail{ display:none; flex-direction:column; align-items:stretch; gap:1.1rem; background:#fff; border:1px solid var(--hub-line); border-radius:18px; padding:1.3rem; margin-bottom:1.4rem; }
  .hub-rail.is-open{ display:flex; }
  .hub-rail__group{ flex-direction:column; align-items:flex-start; gap:.55rem; }
  .hub-grid{ grid-template-columns:1fr; gap:1.4rem; }
  .hub-featured{ min-height:300px; }
}

/* ---- Empty + coming-soon -------------------------------------------- */
.hub-empty{ display:none; padding:3.5rem 1rem; text-align:center; color:#A79F94; grid-column:1/-1; font-size:1rem; }
.hub-empty.is-on{ display:block; }
.hub-soon{ background:var(--hub-cream); border:1px solid #F0E3CF; border-radius:18px; padding:1.3rem 1.6rem; color:#9a7b4f; font-size:.9rem; margin-top:clamp(2rem,4vw,3rem); line-height:1.6; }
