/* ==========================================================================
   JIJ Blog Archive (archive page + single posts)
   Loads after the theme's /jij-home/style.css (navigation, footer, buttons, colors, fonts).
   Everything here is scoped to the plugin's templates so it cannot leak into the theme.
   ========================================================================== */

/* Shadows: kept light and soft on purpose. */
.jij-blog-template {
  --jij-shadow-sm: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px -18px rgba(15,23,42,.18);
  --jij-shadow-md: 0 2px 4px rgba(15,23,42,.05), 0 18px 32px -22px rgba(15,23,42,.28);
}

/* ---------- Page chrome ---------- */
/* Logged-in editors see the admin bar; keep the sticky menu below it. */
.jij-blog-template.admin-bar .jij-nav { top: 32px; }
@media (max-width: 782px) { .jij-blog-template.admin-bar .jij-nav { top: 46px; } }
@media (max-width: 600px) { .jij-blog-template.admin-bar .jij-nav { top: 0; } }

/* Menu item for this page stays underlined, like the hover state. */
.jij-blog-template .jij-nav__link[aria-current="page"]::after { transform: scaleX(1); }

.jij-blog-template .jij-skip {
  position: absolute; left: 16px; top: -120px; z-index: 100; padding: 14px 20px; border-radius: 12px;
  background: var(--jij-gold); color: #000; font: 700 15px/1 var(--jij-font-ui); text-decoration: none;
}
.jij-blog-template .jij-skip:focus { top: 16px; }

/* Theme button styles (uppercase, letter-spacing) shouldn't reach the shared footer form. */
.jij-blog-template .jij-footer__submit { text-transform: none; letter-spacing: 0; }

/* Neutralise theme element styles inside the archive (theme CSS loads first, so these win ties). */
.jij-blog [hidden] { display: none !important; }
:where(.jij-bhero, .jij-blog) :is(h1, h2, h3, h4, p, ul, ol, li, form, fieldset, figure) { margin: 0; padding: 0; }
:where(.jij-blog) :is(ul, ol) { list-style: none; }
:where(.jij-blog) li { border: 0; }
:where(.jij-blog) a { color: inherit; text-decoration: none; }
:where(.jij-blog) a:hover, :where(.jij-blog) a:focus, :where(.jij-blog) a:visited { text-decoration: none; }

/* ---------- Hero ---------- */
.jij-bhero { position: relative; isolation: isolate; overflow: hidden; background: var(--jij-navy); padding-block: 104px; }
.jij-bhero::before {
  content: ""; position: absolute; z-index: -1; right: -140px; top: -140px; width: 580px; height: 580px; border-radius: 50%;
  background: rgba(37,99,235,.22); filter: blur(80px);
}
.jij-bhero__shape { position: absolute; z-index: -1; top: -10%; bottom: -10%; left: 64%; width: 60%; background: var(--jij-blue-link); opacity: .1; transform: skewX(12deg); }
.jij-bhero .jij-bhero__inner { max-width: 900px; }
.jij-bhero .jij-bhero__eyebrow {
  font-family: var(--jij-font-ui); font-weight: 700; font-size: 15px; line-height: 1.4; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--jij-gold);
}
.jij-bhero .jij-bhero__title {
  margin-top: 18px; font-family: var(--jij-font-ui); font-weight: 700; font-size: clamp(40px, 4.2vw, 72px);
  line-height: 1.05; letter-spacing: -0.045em; color: var(--jij-white);
}
.jij-bhero .jij-bhero__title em { font-style: italic; font-weight: 600; color: var(--jij-gold); }
.jij-bhero .jij-bhero__intro { margin-top: 24px; max-width: 680px; font-size: 20px; line-height: 31px; color: var(--jij-hero-text); }

/* ---------- Section + filter bar ---------- */
.jij-blog { position: relative; isolation: isolate; background: var(--jij-light); color: var(--jij-navy); padding-block: 40px 112px; }
.jij-blog__filters-wrap { position: relative; z-index: 2; }
.jij-blog .jij-blog__filters {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 20px 24px;
  background: #fff; border: 1px solid rgba(15,23,42,.07); border-radius: 24px;
  box-shadow: var(--jij-shadow-sm);
}

.jij-blog .jij-blog__tablist { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 3px; margin: -3px; }
.jij-blog .jij-blog__tablist::-webkit-scrollbar { display: none; }
.jij-blog .jij-blog__tablist.is-scrollable { -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent); mask-image: linear-gradient(90deg, #000 82%, transparent); padding-right: 40px; }
.jij-blog .jij-blog__tablist.is-scrollable.is-end { -webkit-mask-image: none; mask-image: none; }
.jij-blog .jij-blog__tab {
  display: inline-flex; align-items: center; height: 42px; padding: 0 18px; border-radius: 999px;
  background: var(--jij-light-2); color: var(--jij-navy); font-family: var(--jij-font-ui); font-weight: 600; font-size: 15px; line-height: 1;
  white-space: nowrap; transition: background-color .15s ease, color .15s ease;
}
.jij-blog .jij-blog__tab:hover { background: #e2e8f0; }
.jij-blog .jij-blog__tab.is-active { background: var(--jij-navy); color: #fff; }
.jij-blog .jij-blog__tab:focus-visible { outline: 3px solid var(--jij-blue); outline-offset: 2px; }

.jij-blog .jij-blog__form { display: flex; flex-wrap: wrap; gap: 12px; }
.jij-blog .jij-blog__filters > * { min-width: 0; }
.jij-blog .jij-blog__search { position: relative; display: flex; flex: 1 1 340px; min-width: 0; }
.jij-blog .jij-blog__search-icon { position: absolute; left: 16px; top: 50%; display: flex; color: var(--jij-muted-2); transform: translateY(-50%); pointer-events: none; }
.jij-blog .jij-blog__input,
.jij-blog .jij-blog__select,
.jij-blog .jij-wnews__input,
.jij-blog .jij-wsearch__input {
  width: 100%; min-width: 0; height: 50px; margin: 0; border: 1px solid #cbd5e1; border-radius: 12px; background-color: #fff;
  box-shadow: none; font-family: var(--jij-font-ui); font-size: 16px; line-height: 1.2; color: var(--jij-navy);
  text-transform: none; letter-spacing: 0; -webkit-appearance: none; appearance: none;
}
.jij-blog .jij-blog__input { flex: 1; padding: 0 108px 0 46px; }
.jij-blog .jij-blog__input::placeholder,
.jij-blog .jij-wnews__input::placeholder,
.jij-blog .jij-wsearch__input::placeholder { color: #64748b; opacity: 1; }
.jij-blog .jij-blog__input:focus,
.jij-blog .jij-blog__select:focus,
.jij-blog .jij-wnews__input:focus,
.jij-blog .jij-wsearch__input:focus { outline: none; border-color: var(--jij-blue); box-shadow: 0 0 0 3px rgba(13,110,210,.18); }
.jij-blog .jij-blog__search-btn,
.jij-blog .jij-wsearch__btn {
  position: absolute; top: 5px; right: 5px; bottom: 5px; margin: 0; padding: 0 18px; border: 0; border-radius: 9px;
  background: var(--jij-navy); color: #fff; font-family: var(--jij-font-ui); font-weight: 700; font-size: 14px; line-height: 1;
  text-transform: none; letter-spacing: 0; cursor: pointer; transition: background-color .15s ease;
}
.jij-blog .jij-blog__search-btn:hover,
.jij-blog .jij-wsearch__btn:hover { background: var(--jij-blue-btn); }
.jij-blog .jij-blog__search-btn:focus-visible,
.jij-blog .jij-wsearch__btn:focus-visible { outline: 3px solid var(--jij-gold); outline-offset: 2px; }
.jij-blog .jij-blog__select-wrap { position: relative; flex: 0 1 200px; min-width: 0; }
.jij-blog .jij-blog__select {
  padding: 0 42px 0 16px; font-weight: 500; font-size: 15px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; background-size: 14px;
}
.jij-blog .jij-blog__apply {
  height: 50px; padding: 0 22px; border: 0; border-radius: 12px; background: var(--jij-gold); color: #000;
  font-family: var(--jij-font-ui); font-weight: 700; font-size: 15px; text-transform: none; letter-spacing: 0; cursor: pointer;
}

/* ---------- Layout ---------- */
.jij-blog__layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; margin-top: 36px; }
.jij-blog__layout--full { grid-template-columns: minmax(0, 1fr); }
.jij-blog.is-loading [data-jij-blog-swap="results"] { opacity: .45; pointer-events: none; transition: opacity .2s ease; }

/* Result count, filter chips */
.jij-blog .jij-blog__head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; min-height: 36px; margin-bottom: 22px; scroll-margin-top: 120px; }
.jij-blog .jij-blog__count { margin-right: 4px; font-family: var(--jij-font-ui); font-weight: 600; font-size: 15px; line-height: 1.4; color: var(--jij-slate); }
.jij-blog .jij-blog__count:focus { outline: none; }
.jij-blog .jij-blog__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.jij-blog .jij-blog__chip {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px 0 14px; border: 1px solid #cbd5e1; border-radius: 999px;
  background: #fff; color: var(--jij-navy); font-family: var(--jij-font-ui); font-weight: 600; font-size: 14px; line-height: 1;
  transition: border-color .15s ease;
}
.jij-blog .jij-blog__chip:hover { border-color: var(--jij-navy); }
.jij-blog .jij-blog__chip .jij-bicon { width: 14px; height: 14px; color: var(--jij-muted-2); }
.jij-blog .jij-blog__clear { font-family: var(--jij-font-ui); font-weight: 700; font-size: 14px; color: var(--jij-blue-link); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Cards ---------- */
.jij-blog .jij-blog__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.jij-blog__layout--full .jij-blog__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.jij-blog .jij-bcard {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border: 1px solid rgba(15,23,42,.07); border-radius: 20px; box-shadow: var(--jij-shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.jij-blog .jij-bcard:hover { transform: translateY(-3px); box-shadow: var(--jij-shadow-md); }
.jij-blog .jij-bcard:focus-within,
.jij-blog .jij-bfeat:focus-within { outline: 3px solid var(--jij-blue); outline-offset: 3px; }
.jij-blog .jij-bcard__media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #1e293b; }
.jij-blog .jij-bcard__media > img { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; transition: transform .45s ease; }
.jij-blog .jij-bcard:hover .jij-bcard__media > img { transform: scale(1.04); }
.jij-blog .jij-bcard__ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, #1e293b 0%, #0f172a 60%, #020617 100%); }
.jij-blog .jij-bcard__ph img { display: block; width: 64px; height: auto; max-width: none; opacity: .9; }
.jij-blog .jij-bcard__tag {
  position: absolute; left: 14px; top: 14px; z-index: 1; padding: 7px 11px; border-radius: 999px;
  background: rgba(2,6,23,.72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); color: #fff;
  font-family: var(--jij-font-ui); font-weight: 700; font-size: 11px; line-height: 1; letter-spacing: 1.1px; text-transform: uppercase;
}
.jij-blog .jij-bcard__body { display: flex; flex-direction: column; flex: 1; padding: 22px 24px 24px; }
.jij-blog .jij-bcard__meta { display: flex; flex-wrap: wrap; gap: 6px; font-family: var(--jij-font-ui); font-weight: 500; font-size: 13px; line-height: 1.4; color: var(--jij-muted-2); }
.jij-blog .jij-bcard__title {
  margin-top: 10px; font-family: var(--jij-font-display); font-weight: 700; font-size: 21px; line-height: 1.3; letter-spacing: 0; color: var(--jij-navy);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.jij-blog .jij-bcard__title a,
.jij-blog .jij-bfeat__title a { color: inherit; }
/* The title link covers the whole card, so the entire card is one link. */
.jij-blog .jij-bcard__title a::after,
.jij-blog .jij-bfeat__title a::after { content: ""; position: absolute; inset: 0; z-index: 2; }
.jij-blog .jij-bcard__title a:focus-visible,
.jij-blog .jij-bfeat__title a:focus-visible { outline: none; }
.jij-blog .jij-bcard__excerpt {
  margin-top: 12px; font-size: 16px; line-height: 25px; color: var(--jij-slate);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.jij-blog .jij-bcard__more { display: inline-flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 20px; font-family: var(--jij-font-ui); font-weight: 700; font-size: 15px; line-height: 24px; color: var(--jij-blue-link); }
.jij-blog .jij-bcard__more .jij-bicon,
.jij-blog .jij-bfeat__more .jij-bicon { width: 16px; height: 16px; transition: transform .15s ease; }
.jij-blog .jij-bcard:hover .jij-bcard__more .jij-bicon,
.jij-blog .jij-bfeat:hover .jij-bfeat__more .jij-bicon { transform: translateX(3px); }

/* Featured post */
.jij-blog .jij-bfeat {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); margin-bottom: 28px; overflow: hidden;
  background: #fff; border: 1px solid rgba(15,23,42,.07); border-radius: 24px; box-shadow: var(--jij-shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.jij-blog .jij-bfeat:hover { transform: translateY(-3px); box-shadow: var(--jij-shadow-md); }
.jij-blog .jij-bfeat__media { position: relative; min-height: 360px; overflow: hidden; background: #1e293b; }
.jij-blog .jij-bfeat__media > img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; transition: transform .45s ease; }
.jij-blog .jij-bfeat:hover .jij-bfeat__media > img { transform: scale(1.03); }
.jij-blog .jij-bfeat__body { display: flex; flex-direction: column; justify-content: center; padding: 40px 44px; }
.jij-blog .jij-bfeat__badges { display: flex; flex-wrap: wrap; gap: 8px; }
.jij-blog .jij-bfeat__badge,
.jij-blog .jij-bfeat__type { padding: 7px 12px; border-radius: 999px; font-family: var(--jij-font-ui); font-weight: 700; font-size: 11px; line-height: 1; letter-spacing: 1.1px; text-transform: uppercase; }
.jij-blog .jij-bfeat__badge { background: var(--jij-gold); color: #000; }
.jij-blog .jij-bfeat__type { background: var(--jij-light-2); color: var(--jij-navy); }
.jij-blog .jij-bfeat__title { margin-top: 18px; font-family: var(--jij-font-display); font-weight: 700; font-size: clamp(26px, 2.1vw, 34px); line-height: 1.2; color: var(--jij-navy); }
.jij-blog .jij-bfeat__excerpt {
  margin-top: 14px; font-size: 17px; line-height: 27px; color: var(--jij-slate);
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.jij-blog .jij-bfeat .jij-bcard__meta { margin-top: 18px; }
.jij-blog .jij-bfeat__more {
  display: inline-flex; align-items: center; align-self: flex-start; gap: 10px; min-height: 50px; margin-top: 24px; padding: 0 24px; border-radius: 12px;
  background: var(--jij-gold); color: #000; font-family: var(--jij-font-ui); font-weight: 700; font-size: 16px; line-height: 24px; transition: background-color .15s ease;
}
.jij-blog .jij-bfeat:hover .jij-bfeat__more { background: #ffc233; }

/* Pagination */
.jij-blog .jij-blog__pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-top: 44px; }
.jij-blog .jij-blog__pglist { display: flex; flex-wrap: wrap; gap: 6px; }
.jij-blog .jij-blog__pg {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; height: 44px; padding: 0 12px;
  border: 1px solid #cbd5e1; border-radius: 12px; background: #fff; color: var(--jij-navy);
  font-family: var(--jij-font-ui); font-weight: 700; font-size: 15px; line-height: 1; transition: border-color .15s ease, background-color .15s ease;
}
.jij-blog a.jij-blog__pg:hover { border-color: var(--jij-navy); }
.jij-blog .jij-blog__pg.is-current { border-color: var(--jij-navy); background: var(--jij-navy); color: #fff; }
.jij-blog .jij-blog__pg--step { padding: 0 16px; }
.jij-blog .jij-blog__gap { display: inline-flex; align-items: center; height: 44px; padding: 0 4px; font-weight: 700; color: var(--jij-muted-2); }

/* Nothing found */
.jij-blog .jij-blog__empty {
  display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 64px 24px; text-align: center;
  background: #fff; border: 1px dashed #cbd5e1; border-radius: 24px;
}
.jij-blog .jij-blog__empty .jij-bicon { width: 44px; height: 44px; color: var(--jij-muted); }
.jij-blog .jij-blog__empty h3 { font-family: var(--jij-font-display); font-weight: 700; font-size: 24px; line-height: 1.3; color: var(--jij-navy); }
.jij-blog .jij-blog__empty p { max-width: 420px; font-size: 17px; line-height: 26px; color: var(--jij-slate); }
.jij-blog .jij-blog__empty .jij-btn { margin-top: 8px; }

/* ---------- Sidebar ---------- */
.jij-blog .jij-blog__sidebar { display: grid; gap: 24px; align-content: start; }
.jij-blog .jij-widget {
  position: relative; isolation: isolate; overflow: hidden; padding: 28px;
  background: #fff; border: 1px solid rgba(15,23,42,.07); border-radius: 20px; box-shadow: var(--jij-shadow-sm);
  color: var(--jij-navy); font-family: var(--jij-font-ui); font-size: 15px; line-height: 1.5;
}
.jij-blog .jij-widget__title,
.jij-blog .jij-widget .wp-block-heading,
.jij-blog .jij-widget .wp-block-search__label {
  display: block; margin: 0 0 18px; font-family: var(--jij-font-display); font-weight: 700; font-size: 20px; line-height: 1.25; letter-spacing: 0; color: inherit;
}
.jij-blog .jij-widget__title::after { content: ""; display: block; width: 38px; height: 2px; margin-top: 12px; background: var(--jij-gold); }

/* WordPress blocks and classic widgets that aren't JIJ widgets */
.jij-blog .jij-widget.widget_block:has(> .wp-block-heading:only-child) { padding: 0 4px; margin-bottom: -10px; background: none; border: 0; box-shadow: none; }
.jij-blog .jij-widget.widget_block:has(> .wp-block-heading:only-child) .wp-block-heading { margin: 0; }
.jij-blog .jij-widget:not(.jij-w) p { color: var(--jij-slate); line-height: 1.6; }
.jij-blog .jij-widget:not(.jij-w) p + p { margin-top: 12px; }
.jij-blog .jij-widget:not(.jij-w) p:not(.wp-block-tag-cloud) a { color: var(--jij-blue-link); text-decoration: underline; text-underline-offset: 3px; }
.jij-blog .jij-widget:not(.jij-w) img { max-width: 100%; height: auto; border-radius: 12px; }
.jij-blog .jij-widget:not(.jij-w) ul,
.jij-blog .jij-widget:not(.jij-w) ol { margin: 0; padding: 0; list-style: none; }
.jij-blog .jij-widget:not(.jij-w) li { padding: 10px 0; border-top: 1px solid #e2e8f0; }
.jij-blog .jij-widget:not(.jij-w) li:first-child { padding-top: 0; border-top: 0; }
.jij-blog .jij-widget:not(.jij-w) li:last-child { padding-bottom: 0; }
.jij-blog .jij-widget:not(.jij-w) li li { padding-left: 14px; }
.jij-blog .jij-widget:not(.jij-w) li a { font-weight: 500; color: var(--jij-navy); transition: color .15s ease; }
.jij-blog .jij-widget:not(.jij-w) li a:hover { color: var(--jij-blue-link); }
.jij-blog .jij-widget .wp-block-latest-posts__post-date,
.jij-blog .jij-widget .post-date { display: block; margin-top: 2px; font-size: 13px; color: var(--jij-muted-2); }
.jij-blog .jij-widget .wp-block-search__inside-wrapper { display: flex; gap: 8px; padding: 0; border: 0; }
.jij-blog .jij-widget :is(.wp-block-search__input, .search-field) {
  flex: 1; width: 100%; min-width: 0; height: 48px; margin: 0; padding: 0 14px; border: 1px solid #cbd5e1; border-radius: 12px;
  background: #fff; box-shadow: none; font-family: var(--jij-font-ui); font-size: 16px; color: var(--jij-navy);
}
.jij-blog .jij-widget :is(.wp-block-search__button, .search-submit) {
  height: 48px; margin: 0; padding: 0 18px; border: 0; border-radius: 12px; background: var(--jij-navy); color: #fff;
  font-family: var(--jij-font-ui); font-weight: 700; font-size: 15px; text-transform: none; letter-spacing: 0; cursor: pointer;
}
.jij-blog .jij-widget :is(.tagcloud, .wp-block-tag-cloud) { display: flex; flex-wrap: wrap; gap: 8px; }

/* Lists of filter links (Browse by Type / Year) */
.jij-blog .jij-wlist li + li { border-top: 1px solid #e2e8f0; }
.jij-blog .jij-wlist__link {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0;
  font-weight: 500; font-size: 15px; color: var(--jij-navy); transition: color .15s ease;
}
.jij-blog .jij-wlist li:first-child .jij-wlist__link { padding-top: 2px; }
.jij-blog .jij-wlist li:last-child .jij-wlist__link { padding-bottom: 0; }
.jij-blog .jij-wlist__link:hover,
.jij-blog .jij-wlist__link.is-active { color: var(--jij-blue-link); }
.jij-blog .jij-wlist__link.is-active { font-weight: 700; }
.jij-blog .jij-wcount {
  display: inline-flex; flex: none; align-items: center; justify-content: center; min-width: 30px; height: 24px; padding: 0 9px; border-radius: 999px;
  background: var(--jij-light-2); color: var(--jij-slate); font-size: 12px; font-weight: 700; transition: background-color .15s ease, color .15s ease;
}
.jij-blog .jij-wlist__link.is-active .jij-wcount { background: var(--jij-navy); color: #fff; }
.jij-blog .jij-wlist--years { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; }
.jij-blog .jij-wlist--years li { border-top: 1px solid #e2e8f0; }
.jij-blog .jij-wlist--years li:nth-child(-n+2) { border-top: 0; }
.jij-blog .jij-wlist--years li .jij-wlist__link { padding: 11px 0; }
.jij-blog .jij-wlist--years li:nth-child(-n+2) .jij-wlist__link { padding-top: 2px; }

/* Popular topics (and the core Tag Cloud) */
.jij-blog .jij-wtags { display: flex; flex-wrap: wrap; gap: 8px; }
.jij-blog .jij-wtags__link,
.jij-blog .jij-widget :is(.tagcloud, .wp-block-tag-cloud) a {
  display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 999px; background: var(--jij-light-2); color: var(--jij-navy);
  font-family: var(--jij-font-ui); font-weight: 600; font-size: 14px !important; line-height: 1; text-decoration: none; transition: background-color .15s ease, color .15s ease;
}
.jij-blog .jij-wtags__link:hover,
.jij-blog .jij-widget :is(.tagcloud, .wp-block-tag-cloud) a:hover { background: #e2e8f0; }
.jij-blog .jij-wtags__link.is-active { background: var(--jij-navy); color: #fff; }

/* Featured posts list */
.jij-blog .jij-wposts { display: grid; gap: 16px; }
.jij-blog .jij-wposts__link { display: flex; align-items: center; gap: 14px; }
.jij-blog .jij-wposts__thumb { display: flex; flex: none; align-items: center; justify-content: center; width: 72px; height: 72px; overflow: hidden; border-radius: 12px; background: #1e293b; }
.jij-blog .jij-wposts__thumb img { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.jij-blog .jij-wposts__thumb img.is-ph { width: 34px; height: auto; object-fit: contain; }
.jij-blog .jij-wposts__title {
  font-weight: 700; font-size: 15px; line-height: 1.35; color: var(--jij-navy); transition: color .15s ease;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.jij-blog .jij-wposts__link:hover .jij-wposts__title { color: var(--jij-blue-link); }
.jij-blog .jij-wposts time { display: block; margin-top: 4px; font-size: 13px; color: var(--jij-muted-2); }

/* Call to action box */
.jij-blog .jij-widget--cta { padding: 32px 28px; }
.jij-blog .jij-widget--navy { background: var(--jij-navy); border-color: rgba(255,255,255,.08); color: #fff; }
.jij-blog .jij-widget--navy::before { content: ""; position: absolute; z-index: -1; top: -20%; bottom: -20%; left: 58%; width: 80%; background: var(--jij-blue-link); opacity: .16; transform: skewX(12deg); }
.jij-blog .jij-widget--gold { background: var(--jij-gold); border-color: transparent; color: #000; }
.jij-blog .jij-widget--gold .jij-widget__title::after { background: var(--jij-navy); }
.jij-blog .jij-wcta__text { font-family: var(--jij-font-body); font-size: 17px; line-height: 27px; }
.jij-blog .jij-widget--navy .jij-wcta__text { color: var(--jij-hero-text); }
.jij-blog .jij-widget--light .jij-wcta__text { color: var(--jij-slate); }
.jij-blog .jij-wcta__btn { width: 100%; min-height: 52px; margin-top: 22px; }
.jij-blog .jij-widget--navy .jij-wcta__btn,
.jij-blog .jij-widget--light .jij-wcta__btn { background: var(--jij-gold); color: #000; }
.jij-blog .jij-widget--navy .jij-wcta__btn:hover,
.jij-blog .jij-widget--light .jij-wcta__btn:hover { background: #ffc233; }
.jij-blog .jij-widget--gold .jij-wcta__btn { background: var(--jij-navy); color: #fff; }
.jij-blog .jij-widget--gold .jij-wcta__btn:hover { background: var(--jij-blue-btn); }
.jij-blog .jij-wcta__btn .jij-bicon { width: 16px; height: 16px; }

/* Newsletter + search widgets */
.jij-blog .jij-wtext { font-size: 15px; line-height: 23px; color: var(--jij-slate); }
.jij-blog .jij-wnews { position: relative; display: grid; gap: 10px; margin-top: 16px; }
.jij-blog .jij-wnews__input { padding: 0 16px; }
.jij-blog .jij-wnews__btn {
  height: 48px; margin: 0; padding: 0 16px; border: 0; border-radius: 12px; background: var(--jij-blue-btn); color: #fff;
  font-family: var(--jij-font-ui); font-weight: 700; font-size: 16px; line-height: 1; text-transform: none; letter-spacing: 0; cursor: pointer;
  transition: background-color .15s ease;
}
.jij-blog .jij-wnews__btn:hover { background: #1d4ed8; }
.jij-blog .jij-wsearch { position: relative; display: flex; }
.jij-blog .jij-wsearch__input { padding: 0 54px 0 16px; }
.jij-blog .jij-wsearch__btn { display: flex; align-items: center; justify-content: center; width: 42px; padding: 0; }

/* Password-protected archive page */
.jij-blog--locked { padding-top: 64px; }
.jij-blog .jij-blog__locked { max-width: 560px; padding: 32px; background: #fff; border-radius: 20px; font-family: var(--jij-font-ui); color: var(--jij-navy); }
.jij-blog .jij-blog__locked p + p { margin-top: 14px; }
.jij-blog .jij-blog__locked input[type="password"] { height: 44px; margin-top: 6px; padding: 0 12px; border: 1px solid #cbd5e1; border-radius: 10px; }
.jij-blog .jij-blog__locked input[type="submit"] { height: 44px; padding: 0 18px; border: 0; border-radius: 10px; background: var(--jij-gold); color: #000; font-weight: 700; text-transform: none; cursor: pointer; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .jij-blog__layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; }
  .jij-blog .jij-bfeat__body { padding: 32px; }
}
@media (max-width: 1024px) {
  .jij-blog .jij-bfeat { grid-template-columns: 1fr; }
  .jij-blog .jij-bfeat__media { min-height: 0; aspect-ratio: 16 / 9; }
  .jij-blog__layout--full .jij-blog__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .jij-blog__layout { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .jij-blog .jij-blog__sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}
@media (max-width: 640px) {
  .jij-bhero { padding-block: 64px; }
  .jij-bhero .jij-bhero__intro { font-size: 17px; line-height: 27px; }
  .jij-blog { padding-block: 24px 72px; }
  .jij-blog .jij-blog__filters { padding: 14px; gap: 14px; border-radius: 20px; }
  .jij-blog .jij-blog__tab { height: 40px; padding: 0 16px; font-size: 14px; }
  .jij-blog .jij-blog__search { flex-basis: 100%; }
  .jij-blog .jij-blog__select-wrap { flex: 1 1 calc(50% - 6px); }
  .jij-blog__layout { margin-top: 28px; }
  .jij-blog .jij-blog__grid { grid-template-columns: 1fr; gap: 20px; }
  .jij-blog .jij-blog__sidebar { grid-template-columns: 1fr; }
  .jij-blog .jij-bfeat__body { padding: 24px; }
  .jij-blog .jij-bfeat__more { align-self: stretch; justify-content: center; }
  .jij-blog .jij-blog__pg--step span {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
  }
  .jij-blog .jij-blog__pg--step { padding: 0 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .jij-blog .jij-bcard, .jij-blog .jij-bfeat, .jij-blog .jij-bcard__media > img, .jij-blog .jij-bfeat__media > img { transition: none; }
  .jij-blog .jij-bcard:hover, .jij-blog .jij-bfeat:hover { transform: none; }
  .jij-blog .jij-bcard:hover .jij-bcard__media > img, .jij-blog .jij-bfeat:hover .jij-bfeat__media > img { transform: none; }
}

/* ==========================================================================
   Single post ("resource") layout
   ========================================================================== */

/* Header: same gradient as the archive header, category in gold, title in white. */
.jij-bhero.jij-bhero--post { padding-block: 88px 92px; }
.jij-bhero--post .jij-bhero__inner { max-width: 1000px; }
.jij-bhero--post .jij-bhero__eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.jij-bhero--post .jij-bhero__eyebrow a { color: inherit; text-decoration: none; }
.jij-bhero--post .jij-bhero__eyebrow a:hover,
.jij-bhero--post .jij-bhero__eyebrow a:focus-visible { text-decoration: underline; text-underline-offset: 4px; }
.jij-bhero--post .jij-bhero__sep { font-weight: 400; opacity: .55; }
.jij-bhero--post .jij-bhero__title { margin-top: 16px; font-size: clamp(32px, 3.4vw, 54px); line-height: 1.1; letter-spacing: -0.03em; text-wrap: balance; }
.jij-bhero--post .jij-bhero__title--long { font-size: clamp(28px, 2.7vw, 42px); line-height: 1.15; }
.jij-bhero .jij-bhero__meta {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px;
  font-family: var(--jij-font-ui); font-weight: 500; font-size: 15px; line-height: 1.5; color: var(--jij-hero-text);
}

/* Body: light background, reading-width column. */
.jij-blog.jij-post { padding-block: 64px 0; }
.jij-post .jij-post__article { max-width: 760px; margin-inline: auto; }
.jij-post .jij-post__lead { margin: 0 0 40px; text-align: center; }
.jij-post .jij-post__lead-img { display: inline-block; width: auto; max-width: 100%; height: auto; border-radius: 16px; box-shadow: var(--jij-shadow-sm); }
.jij-post .jij-post__lead--portrait .jij-post__lead-img { max-width: min(100%, 440px); }

.jij-post .jij-post__content { font-family: var(--jij-font-body); font-size: 18px; line-height: 1.75; color: #1e293b; overflow-wrap: break-word; }
.jij-post .jij-post__content:focus { outline: none; }
.jij-post .jij-post__content::after { content: ""; display: table; clear: both; }
.jij-post .jij-post__content > * + * { margin-top: 1.2em; }
.jij-post .jij-post__content :is(h2, h3, h4, h5, h6) {
  font-family: var(--jij-font-display); font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; text-transform: none; color: var(--jij-navy);
}
.jij-post .jij-post__content > :is(h2, h3, h4, h5, h6) { margin-top: 1.8em; }
.jij-post .jij-post__content > :is(h2, h3, h4, h5, h6):first-child { margin-top: 0; }
.jij-post .jij-post__content > :is(h2, h3, h4, h5, h6) + * { margin-top: .7em; }
.jij-post .jij-post__content h2 { font-size: 30px; }
.jij-post .jij-post__content h3 { font-size: 24px; }
.jij-post .jij-post__content h4 { font-size: 20px; }
.jij-post .jij-post__content :is(h5, h6) { font-size: 18px; }
.jij-post .jij-post__content :is(strong, b) { font-weight: 700; }
.jij-post .jij-post__content a { color: var(--jij-blue-link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.jij-post .jij-post__content a:hover { color: var(--jij-navy); }
.jij-post .jij-post__content :is(ul, ol) { padding-left: 1.4em; }
.jij-post .jij-post__content ul { list-style: disc; }
.jij-post .jij-post__content ol { list-style: decimal; }
.jij-post .jij-post__content li + li,
.jij-post .jij-post__content li > :is(ul, ol) { margin-top: .45em; }
.jij-post .jij-post__content li::marker { color: var(--jij-blue-link); }
.jij-post .jij-post__content blockquote {
  margin-block: 1.8em; padding: 6px 0 6px 24px; border-left: 3px solid var(--jij-gold);
  font-size: 21px; line-height: 1.6; font-style: italic; color: var(--jij-navy);
}
.jij-post .jij-post__content blockquote p + p { margin-top: .8em; }
.jij-post .jij-post__content hr { height: 0; margin-block: 2.4em; border: 0; border-top: 1px solid rgba(15,23,42,.14); }
.jij-post .jij-post__content img { max-width: 100%; height: auto; border-radius: 12px; }
.jij-post .jij-post__content :is(figure, .wp-caption) { max-width: 100%; margin-block: 2em; }
.jij-post .jij-post__content .aligncenter { margin-inline: auto; text-align: center; }
.jij-post .jij-post__content :is(img.aligncenter, .aligncenter img) { display: block; margin-inline: auto; }
.jij-post .jij-post__content .alignleft { float: left; max-width: 48%; margin: .35em 1.6em 1em 0; }
.jij-post .jij-post__content .alignright { float: right; max-width: 48%; margin: .35em 0 1em 1.6em; }
.jij-post .jij-post__content :is(figcaption, .wp-caption-text) {
  margin-top: 10px; font-family: var(--jij-font-ui); font-size: 14px; line-height: 1.5; text-align: center; color: var(--jij-muted-2);
}
.jij-post .jij-post__content iframe { display: block; width: 100%; max-width: 100%; border: 0; border-radius: 12px; }
.jij-post .jij-post__content :is(iframe[src*="youtube"], iframe[src*="youtu.be"], iframe[src*="vimeo"]) { height: auto; aspect-ratio: 16 / 9; }
.jij-post .jij-post__content :is(audio, video) { display: block; width: 100%; }
.jij-post .jij-post__content table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 16px; line-height: 1.5; }
.jij-post .jij-post__content :is(th, td) { padding: 10px 12px; border: 1px solid rgba(15,23,42,.14); text-align: left; vertical-align: top; }
.jij-post .jij-post__content th { font-family: var(--jij-font-ui); font-weight: 700; background: rgba(255,255,255,.6); }
.jij-post .jij-post__content pre { overflow-x: auto; padding: 16px; border-radius: 12px; background: #fff; font-size: 15px; }
.jij-post .jij-post__content .jij-subtitle { font-family: var(--jij-font-ui); font-size: 20px; line-height: 1.5; color: var(--jij-navy); }

/* Buttons and galleries carried over from the old page builder content. */
.jij-post .jij-post__content .wp-block-button { margin-top: 1.6em; }
.jij-post .jij-post__content .wp-block-button__link {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 10px 26px; border-radius: 12px;
  background: var(--jij-gold); color: #000; font-family: var(--jij-font-ui); font-weight: 700; font-size: 16px; line-height: 1.3;
  text-align: center; text-decoration: none; transition: background-color .15s ease;
}
.jij-post .jij-post__content .wp-block-button__link:hover { background: #ffc233; color: #000; }
.jij-post .jij-post__content :is(.wp-block-gallery, .gallery) { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.jij-post .jij-post__content :is(.wp-block-gallery.columns-2, .gallery-columns-2) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.jij-post .jij-post__content :is(.wp-block-gallery, .gallery) :is(figure, .gallery-item) { margin: 0; }
.jij-post .jij-post__content :is(.wp-block-gallery, .gallery) img { width: 100%; height: 100%; aspect-ratio: 1; object-fit: cover; }
.jij-post .jij-post__content .gallery br { display: none; }

/* Report downloads (advocacy materials). */
.jij-post .jij-post__content ul.jij-downloads { display: grid; gap: 12px; padding: 0; list-style: none; }
.jij-post .jij-post__content ul.jij-downloads li { margin: 0; }
.jij-post .jij-post__content ul.jij-downloads a {
  display: flex; align-items: center; gap: 14px; padding: 14px 18px; border: 1px solid rgba(15,23,42,.08); border-radius: 14px;
  background: #fff; box-shadow: var(--jij-shadow-sm); color: var(--jij-navy);
  font-family: var(--jij-font-ui); font-weight: 600; font-size: 16px; line-height: 1.4; text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.jij-post .jij-post__content ul.jij-downloads a::before {
  content: ""; flex: none; width: 40px; height: 40px; border-radius: 10px;
  background: var(--jij-navy) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 3v5h5M9 13h6M9 17h4'/%3E%3C/svg%3E") center / 20px no-repeat;
}
.jij-post .jij-post__content ul.jij-downloads a::after {
  content: ""; flex: none; width: 20px; height: 20px; margin-left: auto;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23285ad1' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11M7 10l5 5 5-5M5 20h14'/%3E%3C/svg%3E") center / 20px no-repeat;
}
.jij-post .jij-post__content ul.jij-downloads a:hover { border-color: var(--jij-blue-link); box-shadow: var(--jij-shadow-md); color: var(--jij-navy); }

/* Password-protected posts and multi-page posts. */
.jij-post .post-password-form { padding: 28px; border-radius: 20px; background: #fff; font-family: var(--jij-font-ui); font-size: 16px; color: var(--jij-navy); }
.jij-post .post-password-form p + p { margin-top: 14px; }
.jij-post .post-password-form input[type="password"] { height: 44px; margin-top: 6px; padding: 0 12px; border: 1px solid #cbd5e1; border-radius: 10px; }
.jij-post .post-password-form input[type="submit"] { height: 44px; padding: 0 18px; border: 0; border-radius: 10px; background: var(--jij-gold); color: #000; font-weight: 700; text-transform: none; cursor: pointer; }
.jij-post .jij-post__pages { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; font-family: var(--jij-font-ui); font-weight: 600; }

/* Topics under the post. */
.jij-post .jij-post__topics { margin-top: 48px; padding-top: 28px; border-top: 1px solid rgba(15,23,42,.1); }
.jij-post .jij-post__topics-title { margin-bottom: 14px; font-family: var(--jij-font-ui); font-weight: 700; font-size: 13px; line-height: 1.4; letter-spacing: 1.2px; text-transform: uppercase; color: var(--jij-muted-2); }
.jij-post .jij-post__topics .jij-wtags__link { background: #fff; }
.jij-post .jij-post__topics .jij-wtags__link:hover { background: var(--jij-light-2); }

/* More of the same kind. */
.jij-post .jij-post__wide { max-width: 1240px; }
.jij-post .jij-post__more { margin-top: 80px; padding-top: 64px; border-top: 1px solid rgba(15,23,42,.08); }
.jij-post .jij-post__more-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; margin-bottom: 28px; }
.jij-post .jij-post__kicker { font-family: var(--jij-font-ui); font-weight: 700; font-size: 14px; line-height: 1.4; letter-spacing: 1.3px; text-transform: uppercase; color: var(--jij-blue-link); }
.jij-post .jij-post__more-title { margin-top: 8px; font-family: var(--jij-font-display); font-weight: 700; font-size: clamp(28px, 2.4vw, 36px); line-height: 1.2; color: var(--jij-navy); }
.jij-post .jij-post__all { display: inline-flex; align-items: center; gap: 8px; font-family: var(--jij-font-ui); font-weight: 700; font-size: 16px; line-height: 24px; color: var(--jij-blue-link); }
.jij-post .jij-post__all .jij-bicon { width: 16px; height: 16px; transition: transform .15s ease; }
.jij-post .jij-post__all:hover .jij-bicon { transform: translateX(3px); }
.jij-post .jij-post__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Closing band: donate, or back to all resources. */
.jij-post .jij-post__next { padding-block: 64px 96px; }
.jij-post .jij-post__band {
  position: relative; isolation: isolate; overflow: hidden; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px 48px;
  padding: 44px 48px; border-radius: 24px; background: var(--jij-navy); color: #fff;
}
.jij-post .jij-post__band::before {
  content: ""; position: absolute; z-index: -1; top: -30%; bottom: -30%; left: 62%; width: 70%;
  background: var(--jij-blue-link); opacity: .16; transform: skewX(12deg);
}
.jij-post .jij-post__band-text { max-width: 560px; }
.jij-post .jij-post__band-title { font-family: var(--jij-font-display); font-weight: 700; font-size: clamp(26px, 2.2vw, 32px); line-height: 1.2; color: #fff; }
.jij-post .jij-post__band-text p { margin-top: 10px; font-family: var(--jij-font-body); font-size: 17px; line-height: 27px; color: var(--jij-hero-text); }
.jij-post .jij-post__band-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.jij-post .jij-post__band-actions .jij-btn { min-height: 54px; }
.jij-post .jij-post__band-actions .jij-bicon { width: 16px; height: 16px; }

@media (max-width: 1024px) {
  .jij-post .jij-post__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jij-post .jij-post__grid > :nth-child(3) { display: none; }
}
@media (max-width: 640px) {
  .jij-bhero.jij-bhero--post { padding-block: 56px 60px; }
  .jij-blog.jij-post { padding-top: 40px; }
  .jij-post .jij-post__lead { margin-bottom: 28px; }
  .jij-post .jij-post__content { font-size: 17px; line-height: 1.7; }
  .jij-post .jij-post__content h2 { font-size: 25px; }
  .jij-post .jij-post__content h3 { font-size: 21px; }
  .jij-post .jij-post__content blockquote { padding-left: 18px; font-size: 19px; }
  .jij-post .jij-post__content :is(.alignleft, .alignright) { float: none; max-width: 100%; margin: 1.2em auto; }
  .jij-post .jij-post__content :is(.wp-block-gallery, .gallery) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jij-post .jij-post__more { margin-top: 56px; padding-top: 48px; }
  .jij-post .jij-post__grid { grid-template-columns: 1fr; }
  .jij-post .jij-post__grid > :nth-child(3) { display: flex; }
  .jij-post .jij-post__next { padding-block: 48px 72px; }
  .jij-post .jij-post__band { padding: 32px 24px; }
  .jij-post .jij-post__band-actions,
  .jij-post .jij-post__band-actions .jij-btn { width: 100%; }
}
