/* ============================================================
   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; }

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

/* ---- hero ---- */
.fh-bg__hero {
  background:
    radial-gradient(58% 90% at 78% 42%, rgba(37, 99, 235, .28), transparent 62%),
    radial-gradient(40% 60% at 10% 100%, rgba(23, 41, 130, .45), transparent 70%),
    linear-gradient(135deg, #060D1F 0%, #0A1443 58%, #060D1F 100%);
  color: #fff;
  padding: clamp(40px, 5vw, 68px) 0 clamp(72px, 7vw, 104px);
  position: relative;
  overflow: hidden;
}
.fh-bg__hero::after {
  content: ''; position: absolute; inset: 0 0 0 55%;
  background-image: radial-gradient(rgba(147, 180, 255, .18) 1px, transparent 1.5px);
  background-size: 22px 22px;
  mask-image: linear-gradient(to left, rgba(0,0,0,.8), transparent);
  pointer-events: none;
}
.fh-bg__herogrid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(24px, 4vw, 64px); align-items: center; position: relative; z-index: 1; }
/* grid items default to min-width:auto — the nowrap chip row would blow the
   column out to its content width (clipped by the hero's overflow:hidden) */
.fh-bg__herocopy, .fh-bg__herovis { 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: .14em; text-transform: uppercase; color: #C7D4F5;
  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: 14px 0 14px; font-size: clamp(30px, 3.6vw, 52px); font-weight: 800; line-height: 1.12; letter-spacing: -.01em; }
.fh-bg__herocopy h1 em { font-style: normal; color: #3B82F6; }
.fh-bg__lede { margin: 0 0 22px; max-width: 460px; font-size: clamp(14px, 1.2vw, 16px); line-height: 1.65; color: #B8C2DC; }

.fh-bg__search { display: flex; max-width: 420px; background: #fff; border-radius: 12px; overflow: hidden; }
.fh-bg__search input {
  flex: 1; min-width: 0; height: 48px; border: 0; padding: 0 16px;
  font-size: 14.5px; color: var(--fh-ink); background: transparent; outline: none;
}
.fh-bg__search button {
  width: 52px; border: 0; cursor: pointer; display: grid; place-items: center;
  background: #2563EB; color: #fff;
}
.fh-bg__search button:hover { background: #1D4ED8; }
.fh-bg__search button svg { width: 18px; height: 18px; }

.fh-bg__topics { display: flex; align-items: center; gap: 12px; margin-top: 20px; 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: 30px; padding: 0 13px;
  border: 1px solid rgba(147, 180, 255, .32); 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; }
.fh-bg__chip.is-active { background: #2563EB; border-color: #2563EB; color: #fff; }

.fh-bg__herovis { position: relative; display: grid; place-items: center; }
.fh-bg__herovis img { max-width: min(100%, 470px); height: auto; position: relative; z-index: 1; filter: drop-shadow(0 30px 50px rgba(0, 0, 0, .5)); }
.fh-bg__ring {
  position: absolute; width: min(78%, 430px); aspect-ratio: 1;
  border-radius: 50%; border: 1px solid rgba(96, 140, 235, .35);
  box-shadow: 0 0 0 34px rgba(37, 99, 235, .07), 0 0 0 70px rgba(37, 99, 235, .04);
  background: radial-gradient(circle, rgba(37, 99, 235, .22), transparent 65%);
}

/* ---- trending strip (floats over hero bottom) ---- */
.fh-bg__trendwrap { margin-top: clamp(-72px, -5vw, -48px); position: relative; z-index: 2; }
.fh-bg__trend {
  display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 10px 26px;
  align-items: center;
  background: #fff; border: 1px solid var(--fh-border); border-radius: 16px;
  box-shadow: 0 18px 44px rgba(10, 20, 60, .12);
  padding: 22px 26px;
}
.fh-bg__trendintro { border-right: 1px solid var(--fh-border); padding-right: 22px; }
.fh-bg__trendlabel { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--fh-red); }
.fh-bg__trendlabel svg { width: 15px; height: 15px; }
.fh-bg__trendlabel svg + * { color: #2563EB; }
.fh-bg__trendintro h2 { margin: 8px 0 0; font-size: 19px; font-weight: 800; line-height: 1.3; color: var(--fh-ink); }
.fh-bg__trendlist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.fh-bg__trenditem { display: flex; gap: 12px; align-items: center; text-decoration: none; }
.fh-bg__trendthumb { position: relative; flex: none; width: 74px; height: 74px; border-radius: 12px; overflow: hidden; background: var(--fh-surface); }
.fh-bg__trendthumb img { width: 100%; height: 100%; object-fit: cover; }
.fh-bg__trendnum {
  position: absolute; top: -1px; left: -1px;
  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: 12px 4px 12px 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: var(--fh-ink);
}
.fh-bg__trenditem:hover .fh-bg__trendtitle { color: #2563EB; }
.fh-bg__trendmeta { display: block; margin-top: 4px; font-size: 12px; color: var(--fh-muted); }

/* ---- 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); }

/* ---- newsletter ---- */
.fh-bg__news { padding: clamp(30px, 4vw, 48px) 0 clamp(44px, 5vw, 64px); }
.fh-bg__newsgrid {
  display: grid; grid-template-columns: 84px minmax(0, 1fr) minmax(300px, 440px);
  gap: clamp(18px, 3vw, 34px); align-items: center;
  background: linear-gradient(120deg, #0A1024 0%, #101B46 100%);
  border-radius: 18px; padding: clamp(24px, 3vw, 38px) clamp(22px, 3.4vw, 44px);
  color: #fff;
}
.fh-bg__newsico {
  width: 84px; height: 84px; border-radius: 20px;
  display: grid; place-items: center;
  background: rgba(37, 99, 235, .18); color: #3B82F6;
}
.fh-bg__newsico svg { width: 38px; height: 38px; }
.fh-bg__newscopy h2 { margin: 0 0 6px; font-size: clamp(20px, 2.2vw, 26px); font-weight: 800; }
.fh-bg__newscopy p { margin: 0; font-size: 14px; line-height: 1.6; color: #B8C2DC; }
.fh-bg__newsrow { display: flex; gap: 10px; }
.fh-bg__newsrow input[type="email"] {
  flex: 1; min-width: 0; height: 48px; border: 0; border-radius: 10px;
  padding: 0 16px; font-size: 14px; color: var(--fh-ink);
}
.fh-bg__newsrow button {
  height: 48px; padding: 0 22px; border: 0; border-radius: 10px;
  background: #2563EB; color: #fff; font-size: 14.5px; font-weight: 700; cursor: pointer;
}
.fh-bg__newsrow button:hover:not(:disabled) { background: #1D4ED8; }
.fh-bg__newsrow button:disabled { opacity: .6; }
.fh-bg__hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.fh-bg__newsnote { margin: 9px 2px 0; font-size: 12px; color: #8FA0C7; }
.fh-bg__newsnote.is-ok { color: #4ADE80; }
.fh-bg__newsnote.is-err { color: #F87171; }

/* ---- 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: 1150px) {
  .fh-bg__trend { grid-template-columns: 1fr; }
  .fh-bg__trendintro { border-right: 0; border-bottom: 1px solid var(--fh-border); padding: 0 0 14px; }
  .fh-bg__trendintro h2 br { display: none; }
}
@media (max-width: 1024px) {
  .fh-bg__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fh-bg__herovis img { max-width: 360px; }
}
@media (max-width: 860px) {
  .fh-bg__herogrid { grid-template-columns: 1fr; }
  .fh-bg__herovis { order: 2; margin-top: 6px; }
  .fh-bg__herovis img { max-width: 300px; }
  .fh-bg__hero { padding-bottom: 84px; }
  .fh-bg__trendlist { grid-template-columns: 1fr; gap: 12px; }
  .fh-bg__newsgrid { grid-template-columns: 1fr; text-align: left; }
  .fh-bg__newsico { display: none; }
}
@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__newsrow { flex-direction: column; }
  .fh-bg__newsrow button { width: 100%; }
  .fh-bg__herovis img { max-width: 250px; }
}