/* ---------------------------------------------------------------
   Mobile image fixes - martynwhite.co (11 Jul 2026)
   1. Single images: figure had an explicit width:860px so it could not
      shrink. min() lets it shrink but keeps the 860px desktop cap.
   2. Kadence galleries: masonry JS not loading; items stuck at a fixed
      width with max-width:none. Forced to stack.
      NB: the gallery <ul> has a -5px negative margin that cancels the
      5px item padding. Do NOT zero it, or gallery images end up 10px
      narrower than the single images.
   --------------------------------------------------------------- */

figure.wp-block-image,
.entry-content figure.wp-block-image,
.wp-block-post-content figure.wp-block-image {
  width: auto !important;
  max-width: min(100%, 860px) !important;
}

figure.wp-block-image img,
.entry-content figure.wp-block-image img {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
}

@media (max-width: 767px) {
  .kb-gallery-ul,
  ul[class*="kb-gallery"] {
    display: flex !important;
    flex-wrap: wrap !important;
  }
  .kb-gallery-ul .kadence-blocks-gallery-item,
  ul[class*="kb-gallery"] .kadence-blocks-gallery-item {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
  }
  .kb-gallery-type-masonry { height: auto !important; }
  .kb-gallery-ul .kb-gallery-image-contain,
  .kb-gallery-ul .kadence-blocks-gallery-intrinsic,
  .kb-gallery-ul .kb-gal-image-radius,
  .kb-gallery-ul figure,
  .kb-gallery-ul img,
  ul[class*="kb-gallery"] img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .kb-gallery-ul,
  ul[class*="kb-gallery"] {
    display: flex !important;
    flex-wrap: wrap !important;
  }
  .kb-gallery-ul .kadence-blocks-gallery-item,
  ul[class*="kb-gallery"] .kadence-blocks-gallery-item {
    width: 50% !important;
    max-width: 50% !important;
    flex: 0 0 50% !important;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
  }
  .kb-gallery-type-masonry { height: auto !important; }
  .kb-gallery-ul .kb-gallery-image-contain,
  .kb-gallery-ul .kb-gal-image-radius,
  .kb-gallery-ul img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
  }
}

/* Rebecca Moses homepage/archive thumbnail: keep head in frame on wide cards (21 Jul 2026) */
.post-6382 .wp-block-post-featured-image img {
  object-position: 50% 12%;
}


/* FAQ block redesign concept — editorial numbered list (preview, 20 Aug 2026) */
.rank-math-block { margin: 8px 0 0; }
.rank-math-list { border-top: 2px solid rgba(50,66,92,0.18); counter-reset: faq; }
.rank-math-list-item { padding: 30px 0; border-bottom: 1px solid rgba(50,66,92,0.18); counter-increment: faq; }
.rank-math-question {
  font-family: 'Inter', sans-serif !important;
  font-weight: 500 !important;
  font-size: 21px !important;
  line-height: 1.4 !important;
  color: rgb(50,66,92) !important;
  margin: 0 0 12px !important;
  letter-spacing: normal !important;
}
.rank-math-question::before {
  content: '0' counter(faq) '\2014';
  font-family: Cormorant, serif;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 1px;
  color: rgba(50,66,92,0.5);
  margin-right: 10px;
  font-size: 0.85em;
}
.rank-math-answer, .rank-math-answer p {
  font-family: 'Libre Franklin', sans-serif !important;
  font-weight: 300 !important;
  font-size: 18px !important;
  line-height: 28px !important;
  color: rgb(50,66,92) !important;
  max-width: 640px;
  margin: 0 !important;
}