/* ==========================================================================
   James Crafted — WordPress additions
   style.css is the HTML build unchanged; everything WordPress-specific lives here.
   ========================================================================== */

/* Admin bar: keep the menu panel below it */
.admin-bar .jc-menu.offcanvas { top: 32px; }
@media (max-width: 782px) { .admin-bar .jc-menu.offcanvas { top: 46px; } }

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  word-wrap: normal !important;
}

/* Hero wash: colour + opacity come from the Home fields */
.jc-hero .carousel-item::after { background: var(--jc-hero-wash, rgb(229 170 11 / .74)); }

/* Menu: WordPress renders the list inside the nav */
.jc-menu__nav ul { margin: 0; padding: 0; list-style: none; }

/* Blog category filter: links to category archives, loaded in place by blog-filter.js */
.jc-chip[aria-current="page"] { border-color: var(--jc-orange); background: var(--jc-orange); color: #fff; }
.jc-posts__results { transition: opacity .3s; }
.jc-posts__results[aria-busy="true"] { opacity: .4; pointer-events: none; }

/* style.css trimmed the space under the credibility section when the client logos came out.
   Switching the logo strip back on restores the roomier spacing it was designed with. */
.jc-cred--with-logos { padding-bottom: clamp(4rem, 15vw, 18rem); }
.jc-cred--with-logos .jc-cta { margin-top: clamp(3rem, 8.75vw, 10.5rem); }

/* Post share row: the "Link copied" status sits under the buttons instead of reserving width
   at the end of the row (style.css gives it min-width: 6rem, which pushed the icons off the right edge) */
.jc-share { position: relative; }
.jc-share__status {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 0;
  margin-top: .5rem;
  font-size: var(--fs-14);
  white-space: nowrap;
}

/* No tags on the left: centre the share row (and its status message) */
.jc-post-footer--share-only { justify-content: center; }
.jc-post-footer--share-only .jc-share__status { right: 50%; transform: translateX(50%); }

/* paginate_links() markup */
.jc-pagination .prev,
.jc-pagination .next { border: 2px solid var(--jc-ink-soft); }
.jc-pagination .dots { min-width: auto; padding-inline: .25rem; }

/* Case-study blocks not in the comps */
.jc-figure figcaption { margin-top: .75em; color: var(--jc-ink-soft); font-size: var(--fs-20); line-height: 1.5; }

.jc-grid-3,
.jc-grid-4 {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1rem, 3.1vw, 3.75rem);
}
@media (min-width: 576px) { .jc-grid-3, .jc-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 992px) {
  .jc-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .jc-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.jc-image-text {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.5rem, 5.73vw, 6.875rem);
}
@media (min-width: 768px) {
  .jc-image-text { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jc-image-text--right .jc-figure { order: 2; }
}

.jc-image-text__body,
.jc-text-block { font-size: var(--fs-25); font-weight: 300; line-height: 1.5; }
.jc-text-block--measure { max-width: 46rem; }
:is(.jc-image-text__body, .jc-text-block) .jc-label { margin-bottom: .75em; }
:is(.jc-image-text__body, .jc-text-block) > * + * { margin-top: 1em; }
:is(.jc-image-text__body, .jc-text-block) strong { font-weight: 700; }
:is(.jc-image-text__body, .jc-text-block) a { text-decoration: underline; text-decoration-color: var(--jc-orange); text-underline-offset: .2em; }

/* Post content from the block editor */
.jc-prose img { max-width: 100%; height: auto; }
.jc-prose .wp-block-image img { display: block; width: 100%; }
.jc-prose .alignwide { margin-inline: calc(50% - min(50vw - var(--gutter), 36rem)); max-width: none; }
.jc-prose .alignfull { margin-inline: calc(50% - 50vw + var(--gutter)); max-width: none; }
.jc-prose .wp-block-gallery { gap: clamp(1rem, 2vw, 2rem); }
.jc-prose .wp-element-caption { margin-top: .75em; color: var(--jc-ink-soft); font-size: .875em; line-height: 1.5; text-align: left; }
.jc-prose .wp-block-separator { border: 0; }
