/* ============================================================
   ULTRAISE BLOG
   Layered on top of the site stylesheet (/assets/styles.css),
   which supplies the tokens, header, footer, buttons and a11y widget.
   ============================================================ */

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--orange);
  color: var(--navy-900);
  font-weight: 700;
  padding: 12px 20px;
  border-radius: 0 0 12px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Minimal blog header ----------
   Just the logo linking home. Article readers came to read, not to be
   pitched, so there is no nav and no contact CTA up here. */
.blog-header .header-inner { height: 62px; justify-content: flex-start; }
.blog-header .brand-logo { height: 25px; }
.blog-header .nav-toggle { display: none !important; }

@media (max-width: 760px) {
  .blog-header .header-inner { height: 56px; }
  .blog-header .brand-logo { height: 22px; }
}

.container-narrow { max-width: 820px; }

/* ============================================================
   HERO
   ============================================================ */
.blog-hero {
  position: relative;
  padding: 66px 0 62px;
  text-align: center;
  background:
    radial-gradient(760px 300px at 50% 0%, rgba(255, 193, 7, .09), transparent 62%),
    linear-gradient(180deg, var(--navy-800), var(--navy-700));
  overflow: hidden;
}
.blog-hero .kicker { margin-bottom: 16px; }
.blog-hero .kicker a { color: inherit; }
.blog-hero h1 {
  font-size: clamp(30px, 4.4vw, 46px);
  line-height: 1.14;
  font-weight: 800;
  letter-spacing: -.6px;
  color: var(--white);
  max-width: 900px;
  margin: 0 auto;
}
.blog-hero-sub {
  margin: 18px auto 0;
  max-width: 640px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

/* Slim tapered orange rule. A solid tilt wedge (as used on the homepage) is
   for navy→orange transitions; here the hero meets navy, so a heavy wedge
   reads as a stray slash. */
.blog-hero-divider {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--orange) 24%, var(--orange) 76%, transparent);
  opacity: .5;
  pointer-events: none;
}

/* ============================================================
   BODY / LISTINGS
   ============================================================ */
.blog-body { padding: 56px 0 90px; }

/* ---------- Category chips ---------- */
.cat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 0 0 40px;
}
.cat-chip {
  padding: 9px 17px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--muted-soft);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.2;
  transition: color .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
}
.cat-chip:hover {
  color: var(--white);
  border-color: rgba(255, 193, 7, .5);
  background: rgba(255, 193, 7, .08);
}
.cat-chip.is-active {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--navy-900);
  font-weight: 700;
}

/* ---------- Shared card chrome ---------- */
.post-chip {
  align-self: flex-start;
  position: relative;
  z-index: 2;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: var(--orange);
  background: rgba(255, 193, 7, .1);
  border: 1px solid rgba(255, 193, 7, .25);
  padding: 5px 11px;
  border-radius: 999px;
  transition: background .2s, color .2s;
}
.post-chip:hover { background: var(--orange); color: var(--navy-900); }

.post-card-meta {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.post-card-fallback {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--navy-600), var(--navy-card));
  color: rgba(255, 193, 7, .28);
}
.post-card-fallback svg { width: 74px; height: 74px; }

/* ---------- Featured (latest) ---------- */
.post-featured {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background: var(--navy-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 30px;
  transition: border-color .3s, transform .3s, box-shadow .3s;
}
.post-featured:hover {
  border-color: rgba(255, 193, 7, .35);
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}
.post-featured-media {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--navy-600);
}
.post-featured-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease);
}
.post-featured:hover .post-featured-media img { transform: scale(1.04); }

.post-featured-body {
  padding: 34px 34px 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.post-featured-tags { display: flex; align-items: center; gap: 10px; }
.post-flag {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--navy-900);
  background: var(--orange);
  padding: 5px 11px;
  border-radius: 999px;
}
.post-featured-title { font-size: clamp(21px, 2.4vw, 27px); line-height: 1.28; font-weight: 800; }
.post-featured-title a { color: var(--white); }
.post-featured-title a::after { content: ""; position: absolute; inset: 0; }
.post-featured-excerpt { color: var(--muted-soft); font-size: 16px; line-height: 1.7; }

/* ---------- Grid ---------- */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--navy-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color .3s, transform .3s, box-shadow .3s;
}
.post-card:hover {
  border-color: rgba(255, 193, 7, .35);
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}
.post-card-media {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--navy-600);
}
.post-card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease);
}
.post-card:hover .post-card-media img { transform: scale(1.05); }

.post-card-body {
  padding: 22px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  flex: 1;
}
.post-card-title { font-size: 18.5px; line-height: 1.36; font-weight: 700; }
.post-card-title a { color: var(--white); }
/* Makes the whole card clickable; .post-chip sits above it via z-index. */
.post-card-title a::after { content: ""; position: absolute; inset: 0; }
.post-card-excerpt { color: var(--muted); font-size: 15px; line-height: 1.65; }

/* ---------- Pagination ---------- */
.blog-pagination { margin-top: 46px; }
.blog-pagination ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 0;
}
.blog-pagination a,
.blog-pagination span {
  display: grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  padding: 0 13px;
  border-radius: 13px;
  border: 1px solid var(--line-strong);
  color: var(--muted-soft);
  font-weight: 600;
  font-size: 15px;
  transition: color .2s, border-color .2s, background .2s;
}
.blog-pagination a:hover { color: var(--white); border-color: rgba(255, 193, 7, .5); background: rgba(255, 193, 7, .08); }
.blog-pagination .current { background: var(--orange); border-color: var(--orange); color: var(--navy-900); font-weight: 700; }
.blog-pagination .dots { border-color: transparent; }

/* ---------- Empty state ---------- */
.blog-empty {
  text-align: center;
  max-width: 520px;
  margin: 20px auto 0;
  padding: 54px 28px;
  background: var(--navy-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.blog-empty-icon {
  width: 62px; height: 62px;
  margin: 0 auto 20px;
  display: grid; place-items: center;
  border-radius: 18px;
  color: var(--orange);
  background: rgba(255, 193, 7, .1);
  border: 1px solid rgba(255, 193, 7, .22);
}
.blog-empty-icon svg { width: 28px; height: 28px; }
.blog-empty h2 { font-size: 23px; font-weight: 800; color: var(--white); margin-bottom: 10px; }
.blog-empty p { color: var(--muted); margin-bottom: 24px; }
.blog-empty-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.btn-ghost {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover { border-color: var(--orange); color: var(--orange); }

/* ============================================================
   ARTICLE
   ============================================================ */
.article-hero {
  padding: 54px 0 34px;
  text-align: center;
  background: linear-gradient(180deg, var(--navy-800), var(--navy-700));
}
.article-crumbs {
  display: flex;
  gap: 9px;
  justify-content: center;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
}
.article-crumbs a { color: var(--orange); }
.article-crumbs a:hover { color: var(--orange-bright); text-decoration: underline; }

.article-title {
  font-size: clamp(28px, 4.2vw, 44px);
  line-height: 1.16;
  font-weight: 800;
  letter-spacing: -.6px;
  color: var(--white);
}
.article-meta {
  margin-top: 16px;
  display: flex;
  gap: 9px;
  justify-content: center;
  align-items: center;
  color: var(--muted);
  font-size: 14.5px;
}

.article-body { padding-top: 34px; }

.article-figure {
  margin: 0 0 34px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
}
.article-figure img { width: 100%; height: auto; display: block; }

/* ---------- Article typography ----------
   Post bodies are Elementor-built and the Elementor global kit sets a dark
   text colour intended for a light page, which would be invisible on navy.
   These overrides win it back. */
.article-content { font-size: 17.5px; line-height: 1.85; }
.article-content,
.article-content p,
.article-content li,
.article-content td,
.article-content th,
.article-content span,
.article-content .elementor-widget-container,
.article-content .elementor-text-editor { color: var(--text) !important; }

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 { color: var(--white) !important; font-weight: 800; line-height: 1.25; }

.article-content h2 { font-size: clamp(23px, 2.8vw, 30px); margin: 46px 0 16px; letter-spacing: -.3px; }
.article-content h3 { font-size: clamp(19px, 2.2vw, 23px); margin: 34px 0 12px; }
.article-content h4 { font-size: 18px; margin: 26px 0 10px; }
.article-content p { margin-bottom: 22px; }

.article-content a { color: var(--orange) !important; text-decoration: underline; text-underline-offset: 3px; }
.article-content a:hover { color: var(--orange-bright) !important; }

.article-content ul,
.article-content ol { margin: 0 0 22px; padding-inline-start: 24px; }
.article-content ul li { list-style: disc; margin-bottom: 9px; }
.article-content ol li { list-style: decimal; margin-bottom: 9px; }
.article-content li::marker { color: var(--orange); }

.article-content img { border-radius: var(--radius); margin: 28px 0; height: auto; }
.article-content figure { margin: 28px 0; }
.article-content figcaption { color: var(--muted); font-size: 14px; text-align: center; margin-top: 10px; }

.article-content blockquote {
  border-inline-start: 3px solid var(--orange);
  padding: 4px 0 4px 20px;
  padding-inline-start: 20px;
  margin: 30px 0;
  color: var(--muted-soft) !important;
  font-size: 19px;
  font-style: italic;
}
.article-content blockquote p { color: var(--muted-soft) !important; }

.article-content code {
  background: var(--navy-900);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 7px;
  font-size: .9em;
}
.article-content pre {
  background: var(--navy-900);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  overflow-x: auto;
  margin: 26px 0;
}
.article-content pre code { background: none; border: 0; padding: 0; }

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 26px 0;
  display: block;
  overflow-x: auto;
}
.article-content th,
.article-content td { border: 1px solid var(--line); padding: 11px 14px; text-align: start; }
.article-content th { background: var(--navy-600); color: var(--white) !important; font-weight: 700; }

.article-content hr { border: 0; border-top: 1px solid var(--line); margin: 36px 0; }

.article-content iframe,
.article-content video { max-width: 100%; border-radius: var(--radius); margin: 26px 0; }

/* Elementor sections inside a post can carry light backgrounds — neutralise. */
.article-content .elementor-section,
.article-content .elementor-container,
.article-content .elementor-widget-wrap,
.article-content .elementor-column-wrap { background: transparent !important; }

/* ---------- Tags ---------- */
.article-tags { display: flex; flex-wrap: wrap; gap: 9px; margin: 36px 0 0; }
.article-tags a {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted-soft);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 6px 14px;
  transition: color .2s, border-color .2s;
}
.article-tags a:hover { color: var(--orange); border-color: rgba(255, 193, 7, .5); }

/* ---------- Prev / next ----------
   The blog deliberately has no contact CTA: readers are here to read, and
   the only onward paths offered are other articles or back to the index. */
.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 44px;
}
.article-nav-link {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 14px 16px;
  background: var(--navy-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .3s, transform .3s;
}
.article-nav-link:hover { border-color: rgba(255, 193, 7, .35); transform: translateY(-3px); }

/* "Next" mirrors the layout so the thumbnail hugs the outer edge. */
.article-nav-link.is-next { flex-direction: row-reverse; text-align: end; }

.article-nav-thumb {
  flex: 0 0 auto;
  width: 74px;
  height: 60px;
  border-radius: 11px;
  overflow: hidden;
  background: var(--navy-600);
  display: block;
}
.article-nav-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s var(--ease);
}
.article-nav-link:hover .article-nav-thumb img { transform: scale(1.06); }
.article-nav-thumb .post-card-fallback svg { width: 34px; height: 34px; }

.article-nav-text { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.article-nav-label { font-size: 12.5px; font-weight: 700; color: var(--orange); letter-spacing: .3px; }
.article-nav-title {
  font-size: 15.5px; font-weight: 600; color: var(--white); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-back { margin-top: 34px; text-align: center; }
.article-back a { color: var(--muted-soft); font-weight: 600; }
.article-back a:hover { color: var(--orange); }

.article-pagelinks { margin-top: 26px; color: var(--muted); font-weight: 600; }
.article-pagelinks a { color: var(--orange); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .post-featured { grid-template-columns: 1fr; }
  .post-featured-media { aspect-ratio: 16 / 8; }
  .post-featured-body { padding: 28px 26px 26px; }
}

@media (max-width: 760px) {
  .blog-hero { padding: 48px 0 46px; }
  .blog-hero-divider { height: 18px; }
  .blog-body { padding: 42px 0 70px; }

  .cat-chips { gap: 8px; margin-bottom: 30px; }
  .cat-chip { padding: 8px 14px; font-size: 13.5px; }

  .post-grid { grid-template-columns: 1fr; gap: 20px; }
  .post-card:hover, .post-featured:hover { transform: none; }

  .article-hero { padding: 40px 0 26px; }
  .article-content { font-size: 17px; }
  .article-nav { grid-template-columns: 1fr; }
  .article-nav-link.is-next { text-align: start; }
}

/* Respect the accessibility widget's "stop animations" setting. */
@media (prefers-reduced-motion: reduce) {
  .post-card, .post-featured, .post-card-media img, .post-featured-media img,
  .article-nav-link { transition: none !important; }
}
