/* ============================================================
   Fahavi — Blog page  (fahavi-blog.css)
   Loaded only on /blog/; depends on tokens in fahavi.css.
   ============================================================ */

.fahavi-blog .ct-container,
.fahavi-blog .ct-container-full { width: 100%; max-width: none; }
/* is-layout-constrained: width + max-width + !important margins (see CLAUDE.md) */
.fahavi-blog .entry-content > * { width: 100%; max-width: none !important; margin-inline: 0 !important; }
.fahavi-blog .entry-content { margin-top: 0; }
/* Blocksy pads the content area 60px — the dark hero must touch the header */
.fahavi-blog .ct-container-full, .fahavi-blog .ct-container { padding-top: 0; }

.fh-bg { background: #F3F5F9; }
.fh-bg__wrap { width: min(100% - clamp(32px, 4vw, 64px), 1440px); margin-inline: auto; }

/* ---- hero (v2: premium editorial redesign) ---- */
.fh-bg__hero {
  background:
    radial-gradient(50% 80% at 82% 20%, rgba(37, 99, 235, .22), transparent 62%),
    radial-gradient(38% 60% at 6% 96%, rgba(76, 29, 149, .25), transparent 70%),
    linear-gradient(140deg, #050B1E 0%, #0A1340 55%, #060D26 100%);
  color: #fff;
  padding: clamp(40px, 4.6vw, 72px) 0 clamp(28px, 3vw, 44px);
  position: relative;
  overflow: hidden;
}
.fh-bg__hero::after {
  content: ''; position: absolute; top: 40px; left: 44%; width: 150px; height: 90px;
  background-image: radial-gradient(rgba(147, 180, 255, .2) 1.4px, transparent 1.8px);
  background-size: 20px 20px; pointer-events: none;
}
.fh-bg__herogrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .96fr); gap: clamp(28px, 4.4vw, 76px); align-items: center; position: relative; z-index: 1; }
.fh-bg__herocopy, .fh-bg__feat { min-width: 0; }
.fh-bg__topics { max-width: 100%; }
.fh-bg__chips { min-width: 0; flex: 1 1 0; }

.fh-bg__eyebrow {
  display: inline-block; font-size: 12.5px; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: #7FA6FF;
  padding-top: 14px; position: relative;
}
.fh-bg__eyebrow::before { content: ''; position: absolute; top: 0; left: 0; width: 34px; height: 3px; border-radius: 2px; background: var(--fh-red); }
.fh-bg__herocopy h1 { margin: 16px 0 16px; font-size: clamp(32px, 3.9vw, 58px); font-weight: 800; line-height: 1.1; letter-spacing: -.015em; color: #fff; /* Blocksy's heading colour otherwise wins over inheritance */ }
.fh-bg__herocopy h1 em {
  font-style: normal;
  background: linear-gradient(92deg, #3B82F6 10%, #8B5CF6 85%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.fh-bg__lede { margin: 0 0 26px; max-width: 480px; font-size: clamp(14.5px, 1.25vw, 16.5px); line-height: 1.7; color: #B8C2DC; }

.fh-bg__search {
  display: flex; align-items: center; max-width: 520px;
  background: #fff; border-radius: 14px; padding: 5px 5px 5px 18px;
  box-shadow: 0 14px 34px rgba(2, 8, 30, .4);
}
.fh-bg__searchico { width: 19px; height: 19px; color: #6E7FAF; flex: none; }
.fh-bg__search input {
  flex: 1; min-width: 0; height: 48px; border: 0; padding: 0 12px;
  font-size: 15px; color: var(--fh-ink); background: transparent; outline: none;
}
.fh-bg__search button {
  width: 52px; height: 48px; flex: none; border: 0; border-radius: 10px; cursor: pointer;
  display: grid; place-items: center;
  background: linear-gradient(120deg, #3B82F6, #2563EB); color: #fff;
}
.fh-bg__search button:hover { filter: brightness(1.1); }
.fh-bg__search button svg { width: 19px; height: 19px; }

.fh-bg__topics { display: flex; align-items: center; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.fh-bg__topicslabel { font-size: 12.5px; font-weight: 700; color: #8FA0C7; white-space: nowrap; }
.fh-bg__chips { display: flex; gap: 8px; flex-wrap: wrap; }
.fh-bg__chip {
  display: inline-flex; align-items: center; min-height: 31px; padding: 0 14px;
  border: 1px solid rgba(147, 180, 255, .3); border-radius: 999px;
  font-size: 12.5px; font-weight: 600; color: #D6E0F7; text-decoration: none;
  background: rgba(255, 255, 255, .04);
}
.fh-bg__chip:hover { border-color: #3B82F6; color: #fff; background: rgba(59, 130, 246, .12); }
.fh-bg__chip.is-active { background: #2563EB; border-color: #2563EB; color: #fff; }

/* featured article card */
.fh-bg__feat {
  position: relative; display: block; border-radius: 20px; overflow: hidden;
  border: 1px solid rgba(120, 150, 230, .28);
  box-shadow: 0 24px 60px rgba(2, 8, 30, .55), 0 0 0 6px rgba(37, 99, 235, .06);
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}
.fh-bg__feat:hover { transform: translateY(-3px); box-shadow: 0 30px 70px rgba(2, 8, 30, .6), 0 0 0 6px rgba(37, 99, 235, .12); }
.fh-bg__featimg { width: 100%; height: clamp(340px, 30vw, 470px); object-fit: cover; display: block; }
.fh-bg__featstar {
  position: absolute; top: 20px; left: 20px;
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(76, 29, 149, .55); color: #F472B6;
  border: 1px solid rgba(244, 114, 182, .4);
  backdrop-filter: blur(6px);
}
.fh-bg__featstar svg { width: 22px; height: 22px; }
.fh-bg__featglass {
  position: absolute; left: 20px; bottom: 20px; right: 84px;
  max-width: 380px;
  background: rgba(6, 11, 31, .72);
  border: 1px solid rgba(120, 150, 230, .25);
  border-radius: 14px; padding: 16px 18px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.fh-bg__feateyebrow { display: block; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #F472B6; margin-bottom: 7px; }
.fh-bg__feattitle { display: block; font-size: clamp(16px, 1.4vw, 20px); font-weight: 800; line-height: 1.3; color: #fff; }
.fh-bg__featmeta { display: flex; align-items: center; gap: 9px; margin-top: 9px; font-size: 12.5px; color: #B8C2DC; }
.fh-bg__featmeta i { width: 4px; height: 4px; border-radius: 50%; background: #F472B6; }
.fh-bg__featarrow {
  position: absolute; right: 20px; bottom: 20px;
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .08); color: #fff;
  border: 1px solid rgba(255, 255, 255, .25);
  backdrop-filter: blur(6px);
  transition: background .15s;
}
.fh-bg__feat:hover .fh-bg__featarrow { background: #2563EB; border-color: #2563EB; }
.fh-bg__featarrow svg { width: 18px; height: 18px; }

/* ---- trending (v2: dark card continuing the hero) ---- */
.fh-bg__trendwrap { background: linear-gradient(180deg, #060D26 0%, #081130 100%); padding: 0 0 clamp(30px, 3.4vw, 46px); }
.fh-bg__trend {
  background: rgba(13, 22, 55, .75);
  border: 1px solid rgba(120, 150, 230, .2);
  border-radius: 18px;
  padding: 20px 24px 22px;
}
.fh-bg__trendhead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.fh-bg__trendlabel { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #fff; }
.fh-bg__trendlabel svg { width: 17px; height: 17px; color: var(--fh-red); }
.fh-bg__trendnav { display: flex; gap: 8px; }
.fh-bg__trendbtn {
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .06); color: #B8C2DC;
  border: 1px solid rgba(120, 150, 230, .25);
}
.fh-bg__trendbtn:hover { color: #fff; border-color: #3B82F6; }
.fh-bg__trendbtn--next { background: #2563EB; border-color: #2563EB; color: #fff; }
.fh-bg__trendbtn--next:hover { background: #1D4ED8; }
.fh-bg__trendbtn svg { width: 17px; height: 17px; }

.fh-bg__trendrow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.fh-bg__trenditem {
  display: flex; gap: 13px; align-items: center; text-decoration: none;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(120, 150, 230, .16);
  border-radius: 13px; padding: 13px 15px;
}
.fh-bg__trenditem:hover { border-color: rgba(59, 130, 246, .55); background: rgba(59, 130, 246, .07); }
.fh-bg__trenditem.is-off { display: none; }
.fh-bg__trendthumb { position: relative; flex: none; width: 78px; height: 78px; border-radius: 11px; overflow: hidden; background: #0A1024; }
.fh-bg__trendthumb img { width: 100%; height: 100%; object-fit: cover; }
.fh-bg__trendnum {
  position: absolute; top: 0; left: 0;
  min-width: 24px; height: 24px; padding: 0 5px;
  display: grid; place-items: center;
  background: #2563EB; color: #fff; font-size: 11px; font-weight: 800;
  border-radius: 11px 4px 11px 4px;
}
.fh-bg__trendbody { min-width: 0; }
.fh-bg__trendcat { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #6D9BFF; margin-bottom: 4px; }
.fh-bg__trendtitle {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 13.5px; font-weight: 700; line-height: 1.4; color: #fff;
}
.fh-bg__trenditem:hover .fh-bg__trendtitle { color: #9DBFFF; }
.fh-bg__trendmeta { display: flex; align-items: center; gap: 7px; margin-top: 6px; font-size: 11.5px; color: #8FA0C7; }
.fh-bg__trendmeta svg { width: 13px; height: 13px; flex: none; }
.fh-bg__trendmeta i { width: 3px; height: 3px; border-radius: 50%; background: #8FA0C7; }
/* ---- latest articles ---- */
.fh-bg__latest { padding: clamp(36px, 4vw, 54px) 0 8px; }
.fh-bg__latesthead { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.fh-bg__h2 { margin: 0; font-size: clamp(22px, 2.4vw, 28px); font-weight: 800; color: var(--fh-ink); padding-bottom: 10px; position: relative; }
.fh-bg__h2::after { content: ''; position: absolute; left: 0; bottom: 0; width: 46px; height: 3px; border-radius: 2px; background: #2563EB; }
.fh-bg__sort { display: flex; align-items: center; gap: 9px; }
.fh-bg__sort label { font-size: 13px; color: var(--fh-muted); font-weight: 600; }
.fh-bg__sort select {
  height: 38px; padding: 0 12px; font-size: 13.5px; font-weight: 600; color: var(--fh-ink);
  background: #fff; border: 1px solid var(--fh-border); border-radius: 9px;
}

.fh-bg__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.fh-bg__card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--fh-border); border-radius: 14px;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.fh-bg__card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(10, 20, 60, .1); }
.fh-bg__media { position: relative; display: block; }
.fh-bg__media img { width: 100%; height: clamp(180px, 15vw, 230px); object-fit: cover; display: block; transition: transform .35s ease; }
.fh-bg__card:hover .fh-bg__media img { transform: scale(1.04); }
.fh-bg__badge {
  position: absolute; top: 12px; left: 12px;
  padding: 5px 10px; border-radius: 7px;
  background: #2563EB; color: #fff;
  font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
}
.fh-bg__badge--alt { background: #7C3AED; }
.fh-bg__cardbody { display: flex; flex-direction: column; flex: 1; padding: 18px 20px 20px; }
.fh-bg__cardbody h3 { margin: 0 0 8px; font-size: 17px; font-weight: 800; line-height: 1.35; }
.fh-bg__cardbody h3 a {
  color: var(--fh-ink); text-decoration: none;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.fh-bg__cardbody h3 a:hover { color: #2563EB; }
.fh-bg__cardbody p {
  margin: 0 0 14px; font-size: 13.5px; line-height: 1.6; color: var(--fh-muted);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.fh-bg__meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: auto; padding-top: 4px; font-size: 12px; color: var(--fh-muted); }
.fh-bg__more { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 13.5px; font-weight: 700; color: #2563EB; text-decoration: none; }
.fh-bg__more:hover { gap: 9px; }

.fh-bg__none { text-align: center; padding: 50px 0; }
.fh-bg__none p { font-size: 15px; color: var(--fh-muted); margin: 0 0 10px; }
.fh-bg__none a { color: #2563EB; font-weight: 700; text-decoration: none; }

/* ---- pagination ---- */
.fh-bg__pager { display: flex; justify-content: center; gap: 8px; padding: 34px 0 8px; flex-wrap: wrap; }
.fh-bg__pgbtn {
  min-width: 40px; height: 40px; padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; border: 1px solid var(--fh-border); border-radius: 10px;
  font-size: 14px; font-weight: 700; color: var(--fh-ink); text-decoration: none;
}
.fh-bg__pgbtn:hover { border-color: #2563EB; color: #2563EB; }
.fh-bg__pgbtn.is-active { background: var(--fh-navy); border-color: var(--fh-navy); color: #fff; }
.fh-bg__pgdots { align-self: center; color: var(--fh-muted); }

/* ---- motion preferences ---- */
@media (prefers-reduced-motion: reduce) {
  .fh-bg__card, .fh-bg__media img { transition: none; }
  .fh-bg__card:hover { transform: none; }
  .fh-bg__card:hover .fh-bg__media img { transform: none; }
}

/* ---- responsive ---- */
@media (max-width: 1024px) {
  .fh-bg__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fh-bg__trendrow { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
}
@media (max-width: 860px) {
  .fh-bg__herogrid { grid-template-columns: 1fr; }
  .fh-bg__feat { order: 2; }
  .fh-bg__featimg { height: clamp(260px, 44vw, 360px); }
  .fh-bg__featglass { right: 20px; max-width: none; }
  .fh-bg__featarrow { display: none; }
  /* trending: horizontal swipe, all items visible, no pager */
  .fh-bg__trendnav { display: none; }
  .fh-bg__trendrow { display: flex; overflow-x: auto; gap: 12px; padding-bottom: 6px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .fh-bg__trendrow::-webkit-scrollbar { display: none; }
  .fh-bg__trenditem { flex: 0 0 300px; }
  .fh-bg__trenditem.is-off { display: flex; }
}
@media (max-width: 640px) {
  .fh-bg__grid { grid-template-columns: 1fr; }
  .fh-bg__media img { height: 210px; }
  .fh-bg__search { max-width: none; }
  .fh-bg__topics { align-items: flex-start; }
  .fh-bg__chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .fh-bg__chips::-webkit-scrollbar { display: none; }
  .fh-bg__chip { white-space: nowrap; }
  .fh-bg__trenditem { flex: 0 0 270px; }
}
