/* Blog listing grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 36px);
  min-height: clamp(420px, 65vh, 680px); /* keeps the page height steady */
  align-content: start;
}

@media (max-width: 1100px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .blog-grid { grid-template-columns: 1fr; }
}

/* Section intro: gap between heading and paragraph */
.blog-page .mb-l .lead {
  margin-top: 18px;
}

/* Visually hidden, still available to screen readers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Individual blog card */
.blog-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 0;
  overflow: hidden;
  transition: border-color .35s var(--ease), box-shadow .35s var(--ease);
  text-decoration: none;
  color: var(--ink);
}

.blog-card:hover {
  border-color: var(--navy);
  box-shadow: 0 12px 40px rgba(44, 54, 84, .12);
}

.blog-card__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 1;
  flex: none;
  background: var(--sand);
}

.blog-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease-out);
}

.blog-card:hover .blog-card__media img {
  transform: scale(1.06);
}

.blog-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 18px 22px 22px;
}

.blog-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  min-height: 30px;
}

.blog-card__date {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--grey-2);
}

.blog-card__cat {
  font-family: var(--display);
  font-size: .68rem;
  letter-spacing: .08em;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--navy);
  background: rgba(44, 54, 84, .08);
  padding: 4px 10px;
  border-radius: 0;
}

.blog-card__title {
  font-family: var(--display);
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  font-weight: 400;
  letter-spacing: -.01em;
  line-height: 1.15;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.3em;
}

.blog-card__excerpt {
  font-size: .95rem;
  line-height: 1.55;
  color: var(--grey);
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card__body .btn {
  margin-top: auto;
  align-self: flex-start;
}

/* ============================================================
   LOAD MORE
   ============================================================ */

.spinner {
  display: inline-block;
  animation: spin .8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================================
   SINGLE POST PAGE
   ============================================================ */

.post-container {
  max-width: 920px;
}

.post__byline {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.post__byline--bar {
  gap: 18px 36px;
  margin: 0 0 clamp(28px, 3.5vw, 48px);
  padding: 0 0 26px;
  border-bottom: 1px solid var(--line);
}

.post__date {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}

.post__date svg {
  width: 40px;
  height: 40px;
  padding: 10px;
  flex: none;
  fill: var(--navy);
  background: rgba(44, 54, 84, .08);
  border-radius: 50%;
}

.post__date-value {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
}

.post__cat {
  margin-left: auto;
  font-family: var(--mono);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #fff;
  background: var(--navy);
  padding: 10px 20px;
  border-radius: 999px;
}

.post__author {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}

.post__avatar {
  display: block;
  width: 44px;
  height: 44px;
  flex: none;
  object-fit: contain;
  padding: 4px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.post__author-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.post__meta-label {
  font-family: var(--mono);
  font-size: .64rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--grey-2);
  line-height: 1;
}

.post__author-name {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
}

@media (max-width: 760px) {
  .post__byline--bar { gap: 16px 24px; }
  .post__cat { margin-left: 0; }
}

.post__content {
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--ink-80);
}

.post__content h2 {
  font-family: var(--display);
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  font-weight: 400;
  letter-spacing: -.015em;
  line-height: 1.18;
  margin: 44px 0 14px;
}

.post__content h3 {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: -.01em;
  margin: 26px 0 10px;
}

.post__content p { margin-bottom: 16px; }

.post__content ul,
.post__content ol {
  padding-left: 22px;
  margin-bottom: 16px;
}

.post__content li { margin-bottom: 8px; }

.post__content a {
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post__content a:hover { color: var(--navy-lift); }

.post__content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 24px 0;
}

.post__footer {
  margin-top: clamp(32px, 5vw, 64px);
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

/* ============================================================
   SHARE BUTTONS (outlined pills with brand icon)
   ============================================================ */

.post__share {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 20px;
  margin-top: clamp(32px, 4vw, 56px);
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.post__share-label {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--grey-2);
}

.post__share-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.share-btn {
  --c: var(--navy);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px 9px 14px;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  text-decoration: none;
  color: var(--c);
  background: transparent;
  border: 2px solid var(--c);
  border-radius: 999px;
  cursor: pointer;
  transition: background .3s var(--ease), color .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease);
}

.share-btn svg {
  width: 22px;
  height: 22px;
  flex: none;
  fill: currentColor;
}

.share-btn:hover,
.share-btn:focus-visible {
  background: var(--c);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .12);
}

.share-btn:focus-visible {
  outline: 2px solid var(--c);
  outline-offset: 3px;
}

.share-btn--facebook { --c: #1877f2; }
.share-btn--whatsapp { --c: #25d366; }
.share-btn--twitter  { --c: #1da1f2; }
.share-btn--copy     { --c: #2c3654; }

@media (max-width: 760px) {
  .post__share-links { gap: 10px; }
  .share-btn { padding: 8px 16px 8px 12px; font-size: .9rem; }
  .share-btn svg { width: 20px; height: 20px; }
}

/* Single post: keep placeholder hero text hidden until the real post data arrives */
html.post-loading .hero--page h1,
html.post-loading .hero--page .hero__eyebrow,
html.post-loading .hero--page .hero__lead,
html.post-loading .crumbs [aria-current] {
  visibility: hidden;
}

/* Hero with no featured image: plain navy, never another photo */
.hero--page .hero__media:empty {
  background: var(--navy);
}

/* Excerpt under the hero title */
.blog-page .hero__lead[hidden] { display: none; }
.hero--page .hero__lead {
  max-width: 60ch;
  opacity: .9;
}

/* ============================================================
   RELATED POSTS
   ============================================================ */

.related {
  padding: clamp(56px, 7vw, 100px) 0 clamp(72px, 9vw, 130px);

}

.related .related-grid {
  margin-top: clamp(28px, 3vw, 44px);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 36px);
}

@media (max-width: 1100px) {
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .related-grid { grid-template-columns: 1fr; }
}

.related-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 0;
  overflow: hidden;
  transition: border-color .35s var(--ease), box-shadow .35s var(--ease);
  text-decoration: none;
  color: var(--ink);
}

.related-card:hover {
  border-color: var(--navy);
  box-shadow: 0 12px 40px rgba(44, 54, 84, .12);
}

.related-card__media {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: var(--sand);
}

.related-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-card__body { padding: 20px 22px 24px; }

.related-card__title {
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 400;
  letter-spacing: -.01em;
  line-height: 1.2;
  margin-bottom: 8px;
}

.related-card__date {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--grey-2);
}

/* ============================================================
   RESPONSIVE FIXES
   ============================================================ */

@media (max-width: 760px) {
  .blog-card__body { padding: 16px 18px 20px; }
}

/* Breadcrumbs */
.crumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.75);
  margin-bottom: 18px;
}
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { color: #fff; }
.crumbs svg { width: 12px; height: 12px; flex: none; }


/* Bullet points for blog posts (draws its own dots) */
.post__content ul {
  list-style: none !important;
  margin: 0 0 1.4em !important;
  padding-left: 0 !important;
}

.post__content ul > li {
  position: relative !important;
  display: block !important;
  padding-left: 1.5em !important;
  margin-bottom: 0.5em !important;
}

.post__content ul > li::before {
  content: "" !important;
  position: absolute !important;
  left: 0.4em !important;
  top: 0.7em !important;
  width: 6px !important;
  height: 6px !important;
  border-radius: 50% !important;
  background: #2C3654 !important; /* dot colour, change to taste */
}

/* Numbered lists keep normal numbers */
.post__content ol {
  list-style: decimal outside !important;
  margin: 0 0 1.4em !important;
  padding-left: 1.6em !important;
}

.post__content ol > li {
  display: list-item !important;
  margin-bottom: 0.5em;
}

/* Breadcrumb: show the full title, wrap onto extra lines if needed */
.blog-page .crumbs {
  max-width: none !important;
  white-space: normal !important;
}

.blog-page .crumbs > span,
.blog-page .crumbs [aria-current] {
  display: inline !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  max-width: none !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  -webkit-line-clamp: unset !important;
}