/* JF site pages: Contact, Resources, Showcase, Team member, Single blog post, 404.
 * Plain CSS, no build step. Part of the same template system: the sections reuse the system's
 * components (Core's page hero and form card, Home's Blog Box, testimonial card, logo row, About
 * and CTA), styled by their own stylesheets. This file only lays out what is new, from the Figma
 * "Web Dev Template 2024" frames (1440 canvas, 1140 container):
 *   - text styles come from the shared classes (.h1-.h6, .jf-body-large, .jf-body-regular,
 *     .subheading, .button-text); no font sizes or font family here;
 *   - colours, radii, shadows and the gradient come from the Theme Styles variables;
 *   - spacing follows each frame's spacers; each section spaces itself from the one above
 *     (100px, 64px on phones), as in scss/layout/_spacing.scss. */

.jf-site-page {
  --jf-site-section: 100px;
  --jf-site-gradient: linear-gradient(135deg, var(--hero-gradient-start, var(--brand-color)) 0%, var(--hero-gradient-end, var(--accent-cta)) 100%);
  --jf-site-shadow: 4px 10px 44px rgba(0, 0, 0, 0.12); /* Figma "Box Shadow" */
  --jf-icons-roundness: 12px; /* Figma "Services Icons Roundness" (no Theme Styles field yet) */
}
@media (max-width: 767px) {
  .jf-site-page { --jf-site-section: 64px; }
}

/* Icon tile (Figma "Icon BG Large"): the brand colour at 12% behind a brand icon. */
.jf-site-page .jf-icon-tile {
  position: relative;
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: var(--jf-icons-roundness);
  color: var(--brand-color);
  isolation: isolate;
}
.jf-site-page .jf-icon-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--brand-color);
  opacity: 0.12;
}

/* The CTA closes these pages: the footer comes one rhythm below it. */
.jf-site-page .home-cta-section { padding-bottom: var(--jf-site-section); }
/* Lists that the next section spaces itself from. */
.jf-site-page .home-recent-posts-section { padding-bottom: 0; }

/* Page counter (Figma "BLOG PAGES COUNTER"). */
.jf-site-page .jf-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 64px; }
.jf-site-page .jf-pager .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--light-background);
  color: var(--paragraph-color);
  text-decoration: none;
}
.jf-site-page .jf-pager .page-numbers.current { background: var(--brand-color); color: #fff; }
.jf-site-page .jf-pager .page-numbers.dots { background: none; }
.jf-site-page .jf-pager .prev,
.jf-site-page .jf-pager .next { min-width: 24px; background: none; color: var(--heading-color); }
.jf-site-page .jf-pager .prev { margin-right: 8px; }
.jf-site-page .jf-pager .next { margin-left: 8px; }
@media (max-width: 767px) {
  .jf-site-page .jf-pager { margin-top: 40px; }
}

/* ---------- Contact (Figma "Contact") ---------- */
/* The form card row rises over the hero: 333px of it on the gradient, 64px under the hero text. */
.jf-contact-page .core-hero-section { padding-bottom: calc(64px + 333px); }
.jf-contact-page .jf-contact-cards { position: relative; z-index: 1; margin-top: -333px; }
.jf-contact-page .jf-contact-cards__row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--box-stroke-color);
  border-radius: var(--rounded-large);
  background: #fff;
  box-shadow: var(--jf-site-shadow);
}
.jf-contact-page .jf-contact-cards__row--single { grid-template-columns: minmax(0, 1fr); }
/* The system form card, inside the row: the row is the card. */
.jf-contact-page .jf-contact-cards__form.core-form-card {
  min-height: 524px;
  padding: 43px 64px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.jf-contact-page .jf-contact-cards__form .core-form-card-title { margin-bottom: 22px; }
.jf-contact-page .jf-contact-cards__map { position: relative; min-height: 524px; background: var(--light-background); }
.jf-contact-page .jf-contact-cards__map iframe { position: absolute; inset: 0; display: block; width: 100%; height: 100%; border: 0; }
.jf-contact-page .jf-contact-info { padding-top: 50px; }
.jf-contact-page .jf-contact-info__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 0; margin: 0; padding: 0; list-style: none; }
.jf-contact-page .jf-contact-info__item { display: flex; align-items: flex-start; gap: 20px; margin: 0; padding-right: 24px; }
.jf-contact-page .jf-contact-info__text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.jf-contact-page .jf-contact-info__phone { color: var(--brand-color); }
.jf-contact-page .jf-contact-info__text a { text-decoration: none; }
.jf-contact-page .jf-contact-info__text a:hover { text-decoration: underline; }
/* Figma: 64px spacers between the details, the logo row and About, and before the footer. */
.jf-contact-page .home-clients-slider-section { padding-top: 85px; }
.jf-contact-page .home-about-eyebrow-section { padding-top: 64px; }
.jf-contact-page .home-about-section { padding-bottom: 64px; }
@media (max-width: 1024px) {
  .jf-contact-page .jf-contact-info__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jf-contact-page .jf-contact-cards__form.core-form-card { padding: 40px; }
}
@media (max-width: 767px) {
  .jf-contact-page .core-hero-section { padding-bottom: calc(40px + 160px); }
  .jf-contact-page .jf-contact-cards { margin-top: -160px; }
  .jf-contact-page .jf-contact-cards__row { grid-template-columns: minmax(0, 1fr); }
  .jf-contact-page .jf-contact-cards__form.core-form-card { min-height: 0; padding: 28px 24px; }
  .jf-contact-page .jf-contact-cards__map { min-height: 320px; }
  .jf-contact-page .jf-contact-info { padding-top: 40px; }
  .jf-contact-page .jf-contact-info__grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .jf-contact-page .home-clients-slider-section { padding-top: 64px; }
}

/* ---------- Resources (Figma "Resources", "Case Studies", "Client Reviews") ---------- */
/* Chips under the hero title (Figma "Main Button"): 45px under the subtitle (the hero adds 12). */
.jf-resources-page .jf-resources-chips { margin-top: 33px; }
.jf-resources-page .jf-resources-chips__list { display: flex; flex-wrap: wrap; gap: 9px; margin: 0; padding: 0; list-style: none; }
.jf-resources-page .jf-resources-chips a.jf-resources-chips__chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-sizing: border-box;
  height: 44px;
  padding: 0 22px;
  border-radius: var(--cta-button-border-radius, 100px);
  background: rgba(255, 255, 255, 0.1);
  text-transform: none;
  white-space: nowrap;
  text-decoration: none;
}
/* Links take their colour from their parent (the system's a { color: inherit !important }). */
.jf-resources-page .jf-resources-chips__item { color: #fff; }
.jf-resources-page .jf-resources-chips__item.is-current { color: var(--heading-color); }
.jf-resources-page .jf-resources-chips a.jf-resources-chips__chip:hover { background: rgba(255, 255, 255, 0.2); }
.jf-resources-page .jf-resources-chips .is-current a.jf-resources-chips__chip { background: #fff; }
/* The Blog Box grid: rows 54px apart (Figma), columns as on the Home. */
.jf-resources-page .jf-resources .home-recent-posts-grid { row-gap: 54px; }
/* Reviews: three testimonial cards per row; rows 100px apart. */
.jf-resources-page .jf-reviews-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 100px 24px; }
.jf-resources-page .jf-reviews-grid__item { display: flex; min-width: 0; }
.jf-resources-page .jf-reviews-grid .jf-testimonial-card { display: flex; flex-direction: column; justify-content: space-between; gap: 24px; width: 100%; }
.jf-resources-page .jf-reviews-grid .testimonial-details img { flex: none; width: 64px; height: 64px; object-fit: cover; border-radius: 50%; }
.jf-resources-page .jf-reviews-grid .jf-testimonial-name,
.jf-resources-page .jf-reviews-grid .jf-testimonial-role { display: block; }
/* Every Resources page: the logo row 64px under the list (Figma, Reviews). */
.jf-resources-page .jf-resources ~ .home-clients-slider-section,
.elementor-element:has(.jf-resources) ~ .elementor-element .home-clients-slider-section { padding-top: 64px; }
@media (max-width: 1024px) {
  .jf-resources-page .jf-reviews-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px 24px; }
}
@media (max-width: 767px) {
  .jf-resources-page .jf-resources-chips { margin-top: 20px; }
  .jf-resources-page .jf-resources .home-recent-posts-grid { row-gap: 40px; }
  .jf-resources-page .jf-reviews-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
}

/* ---------- Showcase (Figma "Client Logos") ---------- */
.jf-showcase-page .jf-logo-wall { padding-top: var(--jf-site-section); }
.jf-showcase-page .jf-logo-wall__grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 44px 21px; margin: 0; padding: 0; list-style: none; }
.jf-showcase-page .jf-logo-wall__item { display: flex; align-items: center; justify-content: center; height: 100px; margin: 0; }
.jf-showcase-page .jf-logo-wall__img { display: block; max-width: 100%; max-height: 100px; width: auto; height: auto; object-fit: contain; }
@media (max-width: 1024px) {
  .jf-showcase-page .jf-logo-wall__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 575px) {
  .jf-showcase-page .jf-logo-wall__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
  .jf-showcase-page .jf-logo-wall__item { height: 80px; }
}

/* ---------- Team member (Figma "AUTHOR PROFILE") ---------- */
.jf-team-member-page .jf-profile { --jf-band: 293px; position: relative; }
.jf-team-member-page .jf-profile::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: var(--jf-band);
  background-color: var(--brand-color);
  background-image: var(--jf-site-gradient);
}
.jf-team-member-page .jf-profile .container { position: relative; }
.jf-team-member-page .jf-profile__grid { display: grid; grid-template-columns: minmax(0, 367fr) minmax(0, 709fr); column-gap: 64px; align-items: start; }
.jf-team-member-page .jf-profile__side { margin-top: 99px; }
.jf-team-member-page .jf-profile__photo { aspect-ratio: 1; overflow: hidden; border-radius: var(--rounded-large); background: var(--light-background); box-shadow: var(--jf-site-shadow); }
.jf-team-member-page .jf-profile__photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.jf-team-member-page .jf-profile__side { display: flex; flex-direction: column; gap: 32px; }
.jf-team-member-page .jf-profile__summary { margin: 0; }
.jf-team-member-page .jf-profile__links { display: flex; flex-direction: column; gap: 12px; margin: -8px 0 0; padding: 0; list-style: none; } /* 24px under the summary */
.jf-team-member-page .jf-profile__link,
.jf-team-member-page .jf-profile__link a { display: flex; align-items: center; gap: 10px; color: var(--brand-color); text-decoration: none; }
.jf-team-member-page .jf-profile__link svg { flex: none; }
.jf-team-member-page .jf-profile__link a:hover { text-decoration: underline; }
.jf-team-member-page .jf-profile__head { display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; box-sizing: border-box; min-height: var(--jf-band); padding: 40px 0 49px; }
.jf-team-member-page .jf-profile__about { margin: 32px 0 12px; }
.jf-team-member-page .jf-profile__bio > :last-child { margin-bottom: 0; }
/* Figma: 140px from the author's posts to the CTA. */
.jf-team-member-page .home-cta-section { padding-top: 140px; }
@media (max-width: 767px) {
  .jf-team-member-page .jf-profile { --jf-band: 240px; }
  .jf-team-member-page .jf-profile__grid { grid-template-columns: minmax(0, 1fr); }
  .jf-team-member-page .jf-profile__side,
  .jf-team-member-page .jf-profile__main { display: contents; }
  .jf-team-member-page .jf-profile__head { order: -2; padding-bottom: 32px; }
  .jf-team-member-page .jf-profile__photo { order: -1; width: min(280px, 100%); margin-top: 24px; }
  .jf-team-member-page .home-cta-section { padding-top: var(--jf-site-section); }
}

/* ---------- Single blog post (Figma "Single Blog") ---------- */
.jf-post-page .jf-post-title__crumbs { padding: 32px 0; background: var(--light-background); }
.jf-post-page .jf-post-title__list { display: flex; flex-wrap: wrap; align-items: center; margin: 0; padding: 0; list-style: none; }
.jf-post-page .jf-post-title__list li { display: inline-flex; align-items: center; }
.jf-post-page .jf-post-title__list a { color: inherit; text-decoration: none; }
.jf-post-page .jf-post-title__list a:hover { text-decoration: underline; }
.jf-post-page .jf-post-title__head { display: flex; flex-direction: column; gap: 20px; padding-top: var(--jf-site-section); }
.jf-post-page .jf-post-title__title,
.jf-post-page .jf-post-title__meta { margin: 0; }
.jf-post-page .jf-post-title__meta { display: flex; flex-wrap: wrap; gap: 0 12px; }
.jf-post-page .jf-post-title__author { color: var(--brand-color); }
.jf-post-page .jf-article__grid { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 64px; align-items: start; }
.jf-post-page .jf-article--aside .jf-article__grid { grid-template-columns: minmax(0, 696fr) minmax(0, 380fr); }
.jf-post-page .jf-article__main { display: flex; flex-direction: column; gap: 44px; min-width: 0; padding-top: 54px; }
.jf-post-page .jf-article__image { display: block; width: 100%; aspect-ratio: 696 / 473; object-fit: cover; border-radius: var(--rounded-large); }
.jf-post-page .jf-article__box { display: flex; flex-direction: column; gap: 12px; box-sizing: border-box; padding: 44px; border-radius: var(--rounded-large); background: var(--light-background); }
.jf-post-page .jf-article__box > p { margin: 0; }
.jf-post-page .jf-article__toc { margin: 0; padding-left: 22px; }
.jf-post-page .jf-article__toc li { margin: 0; }
.jf-post-page .jf-article__toc-item--l3 { margin-left: 16px !important; list-style: "- "; }
.jf-post-page .jf-article__toc li { color: var(--brand-color); }
.jf-post-page .jf-article__box--audio { padding: 32px 44px; }
.jf-post-page .jf-article__box--audio audio { display: block; width: 100%; }
.jf-post-page .jf-article__box--links { padding: 28px 44px; }
.jf-post-page .jf-article__box--links { gap: 8px; }
.jf-post-page .jf-article__links { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.jf-post-page .jf-article__links li { display: flex; align-items: center; gap: 8px; color: var(--brand-color); }
.jf-post-page .jf-article__links svg { flex: none; }
.jf-post-page .jf-article__author { flex-direction: row; align-items: flex-start; gap: 24px; padding: 32px; }
.jf-post-page .jf-article__author-img { flex: none; width: 116px; height: 116px; object-fit: cover; border-radius: 50%; background: #fff; }
.jf-post-page .jf-article__author-text { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.jf-post-page .jf-article__author-text p { margin: 0; }
.jf-post-page .jf-article__author-bio { margin-top: 8px !important; }
.jf-post-page .jf-article__more { text-decoration: none; }
.jf-post-page .jf-article__more-text { display: inline-flex; align-items: center; gap: 6px; color: var(--brand-color); }
.jf-post-page .jf-article__author .jf-article__more { margin-top: 20px; }
.jf-post-page .jf-article__more:hover { text-decoration: underline; }
/* The post body: blocks 44px apart, a heading 16px above its text (Figma). */
.jf-post-page .jf-article__body > * { margin-top: 0; margin-bottom: 0; }
.jf-post-page .jf-article__body > * + * { margin-top: 44px; }
.jf-post-page .jf-article__body > :is(h2, h3, h4) + * { margin-top: 16px; }
.jf-post-page .jf-article__body ul,
.jf-post-page .jf-article__body ol { padding-left: 22px; }
.jf-post-page .jf-article__body img { max-width: 100%; height: auto; border-radius: var(--rounded-large); }
.jf-post-page .jf-article__body blockquote:not(.wp-block-pullquote blockquote) { margin-left: 0; margin-right: 0; padding: 16px 0 16px 28px; border-left: 6px solid var(--brand-color); }
.jf-post-page .jf-article__body .wp-block-pullquote { padding: 44px 54px; border: 0; border-radius: var(--rounded-large); background: var(--light-background); text-align: center; }
.jf-post-page .jf-article__body .wp-block-pullquote blockquote { margin: 0; padding: 0; border: 0; }
.jf-post-page .jf-article__cta { box-sizing: border-box; border-radius: var(--rounded-medium); background-color: var(--brand-color); background-image: var(--jf-site-gradient); }
.jf-post-page .jf-article__cta p { margin: 0; }
.jf-post-page .jf-article__cta--large { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; min-height: 232px; padding: 44px; }
.jf-post-page .jf-article__cta--large .h3 { max-width: 442px; }
.jf-post-page .jf-article__cta--small { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 44px 32px; text-align: center; }
.jf-post-page .jf-article__cta--small .btn { margin-top: 12px; }
.jf-post-page .jf-article__aside { display: flex; flex-direction: column; gap: 40px; }
.jf-post-page .jf-article__aside-title { margin: 0 0 20px; }
.jf-post-page .jf-article__aside-posts { display: flex; flex-direction: column; gap: 20px; margin: 0; padding: 0; list-style: none; }
.jf-post-page .jf-article__aside-posts li { display: flex; align-items: flex-start; gap: 20px; }
.jf-post-page .jf-article__aside-img { flex: none; width: 100px; height: 100px; overflow: hidden; border-radius: var(--rounded-medium); background: var(--light-background); }
.jf-post-page .jf-article__aside-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.jf-post-page .jf-article__aside-text { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0; }
.jf-post-page .jf-article__aside-text a { text-decoration: none; }
.jf-post-page .jf-article__aside-text a:hover { text-decoration: underline; }
@media (max-width: 1024px) {
  .jf-post-page .jf-article--aside .jf-article__grid { grid-template-columns: minmax(0, 1fr); row-gap: 64px; }
}
@media (max-width: 767px) {
  .jf-post-page .jf-post-title__crumbs { padding: 20px 0; }
  .jf-post-page .jf-post-title__head { gap: 12px; }
  .jf-post-page .jf-article__main { gap: 32px; padding-top: 32px; }
  .jf-post-page .jf-article__body > * + * { margin-top: 32px; }
  .jf-post-page .jf-article__box,
  .jf-post-page .jf-article__box--audio,
  .jf-post-page .jf-article__box--links,
  .jf-post-page .jf-article__cta--large { padding: 24px; }
  .jf-post-page .jf-article__author { flex-direction: column; gap: 16px; }
}

/* ---------- 404 (Figma "404 Page") ---------- */
.jf-404-page .jf-404 { padding: 64px 0 200px; text-align: center; }
.jf-404-page .jf-404__inner { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.jf-404-page .jf-404__art { width: 374px; max-width: 100%; }
.jf-404-page .jf-404__svg,
.jf-404-page .jf-404__img { display: block; width: 100%; height: auto; }
.jf-404-page .jf-404__text { max-width: 696px; margin: 0; }
.jf-404-page .jf-404__btn { margin-top: 52px; }
@media (max-width: 767px) {
  .jf-404-page .jf-404 { padding: 40px 0 100px; }
  .jf-404-page .jf-404__btn { margin-top: 32px; }
}

/* Podcasts (Resources > Podcasts): a play button on the episode's image, as on the video sections. */
.jf-podcast-media {
  position: relative;
  display: block;
}
.jf-podcast-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 56px;
  height: 56px;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.35));
  transition: transform 0.2s ease;
}
.jf-podcast-play svg {
  width: 100%;
  height: 100%;
  fill: #fff;
}
.jf-podcast-media:hover .jf-podcast-play,
.jf-podcast-media:focus-visible .jf-podcast-play {
  transform: translate(-50%, -50%) scale(1.08);
}

/* Reviews pages: "Highlighted Video Testimonials" above the written reviews, two per row. */
.jf-resources-page .jf-video-testimonials { margin-bottom: 100px; }
.jf-resources-page .jf-video-testimonials__title { margin: 0 0 56px; }
.jf-resources-page .jf-video-testimonials__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px 30px; }
.jf-resources-page .jf-video-testimonials__item { min-width: 0; margin: 0; }
.jf-resources-page .jf-video-testimonials__media { overflow: hidden; aspect-ratio: 16 / 7; border-radius: var(--rounded-medium, 12px); background: var(--light-background, #f1f1f1); }
.jf-resources-page .jf-video-testimonials__img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.jf-resources-page .jf-video-testimonials__media:hover .jf-video-testimonials__img { transform: scale(1.03); }
.jf-resources-page .jf-video-testimonials__caption { display: flex; flex-direction: column; gap: 4px; margin-top: 16px; }
.jf-resources-page .jf-video-testimonials__name,
.jf-resources-page .jf-video-testimonials__role { display: block; margin: 0; }
@media (max-width: 767px) {
  .jf-resources-page .jf-video-testimonials { margin-bottom: 64px; }
  .jf-resources-page .jf-video-testimonials__title { margin-bottom: 32px; }
  .jf-resources-page .jf-video-testimonials__grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
}
