/* Resource content typography */
.single-resource .resource-content h2.wp-block-heading {
  margin-top: 30px;
  margin-bottom: 12px;
  font-family: var(--wp--preset--font-family--host-grotesk, 'Host Grotesk');
  font-size: var(--wp--preset--font-size--heading-m);
  font-weight: 700;
  line-height: 105%;
  letter-spacing: 0.3px;
}

.single-resource .resource-content h3.wp-block-heading {
  margin-top: 24px;
  margin-bottom: 12px;
  font-family: var(--wp--preset--font-family--host-grotesk, 'Host Grotesk');
  font-size: var(--wp--preset--font-size--heading-s);
  font-weight: 700;
  line-height: 105%;
}

.single-resource .resource-content h4.wp-block-heading {
  margin-top: 24px;
  margin-bottom: 12px;
  font-family: var(--wp--preset--font-family--host-grotesk, 'Host Grotesk');
  font-size: var(--wp--preset--font-size--heading-xs);
  font-weight: 700;
  line-height: 105%;
}

.single-resource .resource-content p.wp-block-paragraph {
  margin-top: 12px;
}

.resource-infographic-image img {
  cursor: zoom-in;
}

.resource-lightbox {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 40px 24px 80px;
  box-sizing: border-box;
  overflow: auto;
  background: transparent;
  border: 0;
}

.resource-lightbox::backdrop {
  background: rgba(26, 23, 23, 0.82);
}

.resource-lightbox__inner {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  min-height: 100%;
}

.resource-lightbox__image {
  display: block;
  width: auto;
  height: auto;
  max-width: calc(100vw - 80px);
  max-height: none;
  object-fit: contain;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.resource-lightbox__close {
  position: fixed;
  z-index: 100002;
  top: 16px;
  right: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: #1a1717;
  background: #fff;
  border: 0;
  border-radius: 50%;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.resource-lightbox__close:hover {
  background: #f2f2e8;
}

body.resource-lightbox-is-open {
  overflow: hidden;
}

/*
 * Keep the HTML Resource PDF card above the Columns block's decorative
 * overlay so the front-end download link remains clickable.
 */
.single-resource .wp-block-column:has(.resource-html-pdf-download),
.single-resource .resource-html-pdf-download,
.single-resource .resource-html-pdf-download .wp-block-button,
.single-resource .resource-html-pdf-download .wp-block-button__link {
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

.single-resource .wp-block-columns:has(.resource-html-pdf-download)::before,
.single-resource .wp-block-columns:has(.resource-html-pdf-download)::after {
  pointer-events: none;
}

/* Keep the HTML Resource table of contents above the Columns overlay. */
.single-resource .wp-block-column:has(.blog-table-container),
.single-resource .blog-table-container,
.single-resource .blog-table-expanded,
.single-resource .blog-table-list,
.single-resource .blog-table-list a,
.single-resource .full-open {
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

.single-resource .wp-block-columns:has(.blog-table-container)::before,
.single-resource .wp-block-columns:has(.blog-table-container)::after {
  pointer-events: none;
}

/*
 * Keep the Infographic block inside the Content Group,
 * but visually pull it up into the Hero area on desktop.
 */
@media (min-width: 991px) {
  .single-resource:has(.resource-infographic-image) .wp-block-post-title {
    width: 100%;
    max-width: 560px;
    margin-left: 0 !important;
    margin-right: auto !important;
  }

  .single-resource .resource-infographic-image {
    --infographic-overlap: 180px;
    position: relative;
    z-index: 2;
    width: 560px;
    margin-left: auto;
    transform: translateY(calc(-1 * var(--infographic-overlap)));
    margin-bottom: calc(-1 * var(--infographic-overlap));
  }

  .single-resource .resource-infographic-image img {
    display: block;
    width: 100%;
    height: auto;
  }
}

@media (max-width: 990px) {
  .resource-lightbox {
    padding: 24px 12px 60px;
  }

  .resource-lightbox__image {
    max-width: calc(100vw - 24px);
  }
}

/* PDF Resource sticky Marketo form */
@media (min-width: 991px) {
  .single-resource .resource-pdf-form-column {
    margin-top: -100px;
  }

  .single-resource .resource-pdf-form-column > .wp-block-group {
    top: 124px !important;
    z-index: 1;
  }
}

/* Move form slightly lower when a custom book cover is selected */
@media (min-width: 991px) {
  .single-resource.resource-has-custom-book-cover .resource-pdf-form-column {
    margin-top: -60px;
  }
}

/* HTML Resource gated content */
.single-resource .resource-content-gate {
  position: relative;
  isolation: isolate;
}

/* Crop long gated articles to the Figma preview height while locked. */
.single-resource .resource-content-gate.is-locked {
  height: 620px;
  min-height: 564px;
  overflow: hidden;
}

/*
 * Soften the horizontal edge where the blurred preview meets the content
 * column. The locked container still clips the long article vertically.
 */
.single-resource .resource-content-gate.is-locked::before {
  content: '';
  position: absolute;
  z-index: 2;
  inset: 0 auto 0 0;
  width: 32px;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    var(--wp--preset--color--secondary-white, #fff) 0%,
    rgba(255, 255, 255, 0) 100%
  );
}

.single-resource .resource-content-gate__locked-content {
  filter: blur(5px);
  opacity: 0.75;
  pointer-events: none;
  user-select: none;
  transition: filter 220ms ease, opacity 220ms ease;
}

.single-resource .resource-content-gate__overlay {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 50px 24px 100px;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.08) 45%,
    var(--wp--preset--color--secondary-white, #fff) 100%
  );
}

.single-resource .resource-content-gate__form-card {
  box-sizing: border-box;
  width: min(100%, 470px);
  padding: 40px 45px 50px;
  pointer-events: auto;
  background: #fff;
  border-top: 8px solid
    var(--color-yellow, var(--wp--preset--color--secondary-yellow, #f2cc29));
  border-radius: 0 0 10px 10px;
  box-shadow: 0 5px 15px 0 rgba(0, 0, 0, 0.12),
    0 15px 35px 0 rgba(103, 110, 118, 0.08);
}

.single-resource
  .resource-content-gate__form-card
  .acf-marketo-form--resource-gate {
  width: 100%;
  min-height: 0;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
}

.single-resource .resource-content-gate__form-card .acf-marketo-form__title {
  margin-bottom: 16px;
  font-family: var(--wp--preset--font-family--host-grotesk, 'Host Grotesk');
  font-size: var(--wp--preset--font-size--body-l, 18px);
  font-weight: 700;
  line-height: 1.2;
}

.single-resource
  .resource-content-gate.is-unlocked
  .resource-content-gate__locked-content {
  filter: none;
  opacity: 1;
  pointer-events: auto;
  user-select: auto;
}

.single-resource .resource-content-gate.is-unlocked {
  height: auto;
  min-height: 0;
  overflow: visible;
}

.single-resource
  .resource-content-gate.is-unlocked
  .resource-content-gate__overlay {
  display: none;
}

/*
 * Add these classes to the outer Author and Table of contents Groups in the
 * Resource - HTML template. They react only while a content gate is locked.
 */
.single-resource:has(.resource-content-gate.is-locked)
  .resource-content-gate-author {
  display: none !important;
}

.single-resource:has(.resource-content-gate.is-locked)
  .resource-content-gate-toc
  .blog-table-list
  a,
.single-resource:has(.resource-content-gate.is-locked)
  .resource-content-gate-toc
  .blog-table-list
  a:hover,
.single-resource:has(.resource-content-gate.is-locked)
  .resource-content-gate-toc
  .blog-table-list
  a
  .link-text,
.single-resource:has(.resource-content-gate.is-locked)
  .resource-content-gate-toc
  .blog-table-list
  a:hover
  .link-text,
.single-resource:has(.resource-content-gate.is-locked)
  .resource-content-gate-toc
  .blog-table-list
  li:hover
  a
  .link-text {
  color: var(--wp--preset--color--secondary-grey, #a6a391) !important;
}

.single-resource:has(.resource-content-gate.is-locked)
  .resource-content-gate-toc
  .blog-table-list
  a {
  opacity: 0.65;
}

.single-resource:has(.resource-content-gate.is-locked)
  .resource-content-gate-toc
  .blog-table-list,
.single-resource:has(.resource-content-gate.is-locked)
  .resource-content-gate-toc
  .blog-table-list
  li,
.single-resource:has(.resource-content-gate.is-locked)
  .resource-content-gate-toc
  .blog-table-list
  a {
  pointer-events: none;
  cursor: default;
}

.single-resource:has(.resource-content-gate.is-locked)
  .resource-content-gate-toc
  .blog-table-list
  a {
  text-decoration: none;
}

/* Remove the active scroll indicator while the TOC links are inactive. */
.single-resource:has(.resource-content-gate.is-locked)
  .resource-content-gate-toc
  .blog-table-list
  li.selected
  a::before {
  display: none;
}

.single-resource:has(.resource-content-gate.is-locked)
  .resource-content-gate-toc
  .blog-table-list
  li.selected
  a,
.single-resource:has(.resource-content-gate.is-locked)
  .resource-content-gate-toc
  .blog-table-list
  li.selected
  a
  * {
  font-weight: 400 !important;
}

/* The Figma design keeps the full-TOC control active while gated. */
.single-resource:has(.resource-content-gate.is-locked)
  .resource-content-gate-toc
  .full-open {
  position: relative;
  z-index: 2;
  color: var(--wp--preset--color--primary-purple, #6329c2);
  opacity: 1;
  pointer-events: auto;
  cursor: pointer;
}

@media (max-width: 990px) {
  .single-resource:has(.resource-content-gate.is-locked)
    .resource-content-gate-toc {
    display: none !important;
  }
}

@media (max-width: 600px) {
  .single-resource .resource-content-gate.is-locked {
    height: 480px;
    min-height: 480px;
  }

  .single-resource .resource-content-gate__overlay {
    padding: 24px 12px;
  }

  .single-resource .resource-content-gate__form-card {
    padding: 24px 18px 20px;
  }
}
/* Hide the PDF download card while the HTML Resource is locked. */
.single-resource:has(.resource-content-gate.is-locked)
  .resource-html-pdf-download {
  display: none !important;
}
/* Resource content CTA background */
.single-resource .resource-content .cta-custom.cta2-block {
  background-image: url('/wp-content/uploads/2026/09/inline-resource-cta-block-bg.svg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

/* Remove the original left/right decorative shapes */
.single-resource .resource-content .cta2-block::before,
.single-resource .resource-content .cta2-block::after {
  display: none;
  content: none;
}

/* HTML Resource: background shapes behind the default book cover */
@media (min-width: 991px) {
  .single-resource.resource-template-resource-html:not(
      .resource-has-custom-book-cover
    )
    .resource-book-cover-image {
    position: relative;
    z-index: 0;
    overflow: visible;
    isolation: isolate;
  }

  .single-resource.resource-template-resource-html:not(
      .resource-has-custom-book-cover
    )
    .resource-book-cover-image::before {
    content: '';

    position: absolute;
    z-index: -1;

    top: -210px;
    right: -350px;
    width: 910px;
    height: 1023px;

    background-image: url('/wp-content/uploads/2026/09/Resource-bookcover-background-blobs.png');
    background-repeat: no-repeat;
    background-position: top right;
    background-size: contain;

    pointer-events: none;
  }

  .single-resource.resource-template-resource-html:not(
      .resource-has-custom-book-cover
    )
    .resource-book-cover-image
    img {
    position: relative;
    z-index: 1;
  }
}
