.single-article {
  .container {
    h1 {
      margin-block: 0 0.5em;
      font-size: 60px;
      line-height: 100%;
      letter-spacing: -0.025em;
      text-wrap: balance;

      @media (max-width: 1024px) {
        font-size: 40px;
        line-height: 40px;
      }
    }

    .excerpt {
      max-width: 60%;
      margin-bottom: 80px;
      font-size: 22px;
      font-style: italic;

      @media (max-width: 1024px) {
        max-width: none;
        margin-bottom: 50px;
      }
    }

    .post-video {
      margin-bottom: 40px;

      .cta {
        display: flex;
        gap: 16px;

        @media (max-width: 1024px) {
          flex-direction: column;
          align-items: center;
        }
      }
    }

    .featured_image {
      margin-bottom: 40px;

      @media (max-width: 1024px) {
        margin-left: -20px;
        margin-right: -20px;
        border-radius: 0;
      }

      img {
        width: 100%;
        height: auto;
        border-radius: 5px;
        border: 1px solid var(--c-gray-900);

        @media (max-width: 1024px) {
          border-left: none;
          border-right: none;
          border-radius: 0;
        }
      }
    }

    a {
      text-decoration: underline;

      &:hover {
        color: var(--c-gray-900);
        text-decoration: none;
      }
    }

    ul {
      li {
        margin: 16px 0;
      }
    }

    ol {
      li {
        margin: 8px 0;
      }
    }

    h5 {
      margin: 0.6em 0 0.6em 0.2em;
      font-size: var(--fs-3xl);
      line-height: 90%;
      letter-spacing: -2.25px;
      white-space: nowrap;

      @media (max-width: 1024px) {
        white-space: normal;
      }
    }

    .cta {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin: 2.4em 0;

      a {
        text-decoration: none;
      }
    }

    .wp-block-embed {
      position: relative;
      z-index: 2;
    }

    .viewer-holder {
      width: 200%;

      @media (max-width: 1024px) {
        width: 100%;
      }
    }

    .wp-block-table {
      width: 200%;

      @media (max-width: 1024px) {
        width: 100%;
      }
    }
    .wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image) {
      @media (max-width: 1024px) {
        width: 100%;
      }
    }
    .wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image) img {
      flex: none;
      height: auto;
      @media (max-width: 1024px) {
        border: 1px solid var(--c-gray-900);
        border-radius: 5px;
      }
    }
    .wp-block-gallery {
      width: 200%;
      margin: 2em 0;
      align-items: start;
      @media (max-width: 1024px) {
        width: 100%;
        flex-direction: column;
      }
      figcaption {
        fmargin: 8px 0 0;
        font-size: var(--fs-xs);
        font-style: italic;
        line-height: 145%;
        letter-spacing: 0.02em;
        text-align: left;
        text-box-trim: trim-start;
        text-box-edge: cap alphabetic;
      }
    }

    blockquote {
      position: relative;
      width: 100%;
      margin: 32px 0 8px;
      padding: 0;
      font-size: var(--fs-md);
      font-family: var(--ff-secondary);
      font-style: italic;
      font-weight: 300;
      line-height: 1.15;
      background-color: #fffaee;
      border: none;
      z-index: 2;

      p {
        line-height: 1.15; !important;
      }

      cite {
        display: block;
        margin-top: 10px;
        font-family: var(--ff-primary);
        font-weight: 400;
        font-size: var(--fs-sm);
        font-style: normal;
        letter-spacing: normal;
        line-height: 1.4;
        strong {
          letter-spacing: normal;
        }
      }
    }

    .wp-block-image {
      @media (max-width: 1024px) {
        margin-left: -20px;
        margin-right: -20px;
        border-radius: 0;
      }

      img {
        @media (max-width: 1024px) {
          border-left: none;
          border-right: none;
          border-radius: 0;
          box-shadow: none;
        }
      }

      figcaption {
        @media (max-width: 1024px) {
          margin: 0.8em 20px 0;
        }
      }

      &.overboard {
        position: relative;
        width: 1200px;
        z-index: 3;

        @media screen and (max-width: 1366px) {
          width: 1120px;
        }

        @media screen and (max-width: 1280px) {
          width: 1005px;
        }

        @media screen and (max-width: 1024px) {
          width: auto;
        }
      }
    }

    .wp-block-embed {
      width: 200%;
      border-radius: var(--br-md);
      overflow: hidden;
      margin-bottom: 16px;

      @media (max-width: 1024px) {
        border-radius: 0;
        width: 100vw;
        margin-inline: -20px;
      }
    }

    .article-content {
      max-width: 50%;
      position: relative;
      line-height: 27px;

      @media (max-width: 1024px) {
        max-width: none;
      }

      pre {
        all: unset;
        display: block;
        padding: var(--p-lg);
        font-family: var(--ff-primary);
        background-color: var(--c-orange-100);
        border-radius: var(--br-md);
        white-space: pre-wrap;
        margin-top: var(--tag-spacing);
        padding-top: 16px;
        border-top: 1px solid var(--c-gray-900);
        font-size: var(--fs-sm);
        line-height: 180%;
      }

      .author {
        display: flex;
        gap: 6px;
        margin-bottom: var(--section-spacing-md);
        font-size: 14px;

        time {
          color: rgba(0, 0, 0, 0.2);
        }
      }

      .author-block {
        margin-top: 80px;
        margin-bottom: 40px;
        border: 1px solid #181818;
        border-radius: 5px;

        .author-block-wrapper {
          display: flex;
          flex-direction: column;

          .author-info {
            &.mobile {
              display: none;
              padding: 23px;
              border-bottom: 1px solid var(--c-gray-900);

              @media (max-width: 768px) {
                display: flex;
                flex-direction: column;
                align-items: center;
                text-align: center;
              }

              .author-avatar {
                width: 108px;
                height: 108px;
                margin-bottom: 10px;
                background-color: #ded9cd;
                border-radius: 50%;
                border: 1px solid var(--c-gray-900);
                overflow: hidden;
                flex-shrink: 0;

                img {
                  width: 100%;
                  height: 100%;
                  object-fit: cover;
                  border: none;
                  border-radius: 0;
                }
              }

              .author-name {
                font-size: 20px;
                font-weight: 700;
              }
            }
          }
        }

        .author-block-top {
          padding: 30px;
          border-bottom: 1px solid #181818;

          .author-label {
            display: inline-block;
            border: 1px solid #181818;
            border-radius: 3px;
            padding: 6px 14px;
            font-size: 14px;
            text-transform: uppercase;
            margin-bottom: 24px;
            line-height: 1;
            background: transparent;
          }

          .author-bio {
            font-size: 18px;
            line-height: 1.4;
            font-style: italic;

            p {
              margin: 0;
              line-height: inherit;
            }
          }
        }

        .author-block-bottom {
          padding: 24px 30px;
          display: flex;
          align-items: center;
          justify-content: space-between;
          gap: 20px;
          flex-wrap: wrap;

          @media (max-width: 768px) {
            flex-direction: column;
            align-items: center;
          }

          .author-info {
            display: flex;
            align-items: center;
            gap: 16px;
            flex: 1;

            @media (max-width: 768px) {
              display: none;
            }

            .author-avatar {
              width: 60px;
              height: 60px;
              background-color: #ded9cd;
              border-radius: 50%;
              border: 1px solid var(--c-gray-900);
              overflow: hidden;
              flex-shrink: 0;

              img {
                width: 100%;
                height: 100%;
                object-fit: cover;
                border: none;
                border-radius: 0;
              }
            }

            .author-details {
              .author-name {
                font-weight: 600;
                font-size: 18px;
                line-height: 1.2;
                margin-bottom: 4px;
                color: var(--c-gray-900);
              }

              .author-title {
                font-size: 18px;
                color: var(--c-gray-900);
                line-height: 1.2;
              }
            }
          }

          .author-actions {
            display: flex;
            align-items: center;
            gap: 12px;
            flex-wrap: wrap;

            @media (max-width: 768px) {
              flex-direction: column;
            }

            .linkedin {
              @media (max-width: 768px) {
                order: 2;
              }
            }

            .btn {
              padding: 10px 14px;
              text-decoration: none;

              &.btn-transparent {
                @media (max-width: 768px) {
                  order: 1;
                }

                &:hover {
                  color: var(--c-white);
                }
              }

              &.btn-secondary {
                @media (max-width: 768px) {
                  order: 3;
                }
              }
            }
          }
        }
      }

      p {
        line-height: 27px;
      }

      .toc_wrapper {
        .toc {
          display: flex;
          flex-wrap: wrap;
          gap: 8px;
          margin-bottom: 64px;

          a {
            padding: 8px 14px;
            font-size: var(--fs-sm);
            text-decoration: none;
            line-height: 1.2;
            border: 1px solid var(--c-gray-900);
            border-radius: 3px;

            &:hover {
              background: var(--c-gray-900);
              color: var(--c-gray-25);
            }
          }
        }
      }

      h2 {
        font-size: 45px;
        line-height: 45px;
        margin-top: 64px;

        @media (max-width: 768px) {
          font-size: 24px;
          line-height: 28.8px;
        }
      }

      h2 {
        margin: 64px 0 16px;
        scroll-margin-top: 120px;
        font-size: 45px;
        font-weight: 700;
        line-height: 100%;

        strong {
          line-height: 100%;
        }
      }
      h3 {
        margin: 32px 0 8px;
        font-size: var(--fs-lg);
        line-height: 1.15;
      }
    }
  }

  .viewer-holder {
    position: relative;
    height: 800px;
    margin: 50px 0;

    @media (max-width: 1024px) {
      height: 600px;
    }

    x-fibbl-layer-content {
      background-color: transparent;
    }

    fibbl-layer {
      display: flex;
      flex-wrap: wrap;

      @media (max-width: 768px) {
        flex-direction: column;
      }
    }

    button {
      height: 36px;
      margin: 0 10px;
      padding: 4px 12px;
      color: var(--c-gray-900);
      font-family: var(--ff-secondary);
      border: 1px solid transparent;
      border-radius: 14px;
      white-space: nowrap;

      @media (max-width: 768px) {
        margin: 0 4px;
      }

      &:hover {
        color: var(--c-gray-900);
      }

      &.fibbl-active {
        color: var(--c-gray-900);
        font-size: 16px;
        border-color: var(--c-gray-900);
      }
    }
  }
}

.horizontal-slides {
  overflow-x: hidden;
  padding-bottom: 60px;

  .container {
    .horizontal_slides {
      display: block;
      padding-bottom: 0;
      overflow-x: hidden;
      width: 100vw;
      overflow: visible;

      @media (max-width: 1024px) {
        display: block;
      }

      .swiper-wrapper {
        .swiper-slide {
          height: auto;
          width: 392px;
          border-radius: 5px;
          box-shadow: none;
          transition:
            filter 0.3s ease,
            box-shadow 0.3s ease;
          background: #fffaee;

          /* The outline sits above the image instead of being a border,
             so fading it out on hover leaves no light gap around the
             image. It stacks above the image's tint layer (z-index 2). */
          &::after {
            content: '';
            position: absolute;
            inset: 0;
            z-index: 3;
            border: 1px solid #181818;
            border-radius: inherit;
            pointer-events: none;
            transition: opacity 0.3s ease;
          }

          @media (max-width: 1024px) {
            min-height: 268px;
            width: 268px;
          }

          .video_wrapper {
            position: relative;
            width: 100%;
            padding-top: 68%;
            overflow: hidden;
            border-top-left-radius: 5px;
            border-top-right-radius: 5px;
            overflow: hidden;

            iframe {
              position: absolute;
              top: 0;
              left: 0;
              width: 100%;
              height: 100%;
              border: 0;
              filter: grayscale(100%);
              transition: filter 0.3s ease;
            }

            &::after {
              content: '';
              position: absolute;
              top: 0;
              left: 0;
              right: 0;
              bottom: 0;
              background-color: #ffd672;
              opacity: 0.12;
              pointer-events: none;
              z-index: 2;
              border-top-left-radius: 32px;
              border-top-right-radius: 32px;
              transition: all 0.3 ease;
            }

            &.has-thumbnail {
              .video_thumbnail {
                position: absolute;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                background-color: black;

                img {
                  width: 100%;
                  height: 100%;
                  object-fit: cover;
                  display: block;
                  transition:
                    filter 0.3s ease,
                    transform 0.4s ease;
                  filter: grayscale(100%);
                }

                .custom_play_button {
                  position: absolute;
                  top: 50%;
                  left: 50%;
                  transform: translate(-50%, -50%);
                  border: none;
                  background: none;
                  cursor: pointer;
                  transition: transform 0.2s ease;

                  &:hover {
                    transform: translate(-50%, -50%) scale(1.05);
                  }
                }
              }
            }

            figure {
              position: absolute;
              top: 0;
              left: 0;
              width: 100%;
              height: 100%;
              border: 0;
              filter: grayscale(100%);
              transition: filter 0.3s ease;

              a {
                display: block;
                width: 100%;
                height: 100%;

                img {
                  width: 100%;
                  height: 100%;
                  object-fit: cover;
                  display: block;
                  filter: grayscale(100%);
                  transition: transform 0.4s ease;
                }
              }
            }
          }

          /* Zoom the card image slightly on hover, like the
             "Visit our customers" band. */
          @media (hover: hover) and (prefers-reduced-motion: no-preference) {
            &:hover .video_wrapper img {
              transform: scale(1.08);
            }
          }

          &:hover,
          &.active {
            box-shadow:
              52.6425px 64.8282px 33.1453px rgba(0, 0, 0, 0.01),
              29.7332px 36.5573px 28.271px rgba(0, 0, 0, 0.03),
              13.1606px 16.0852px 20.9595px rgba(0, 0, 0, 0.04),
              3.41201px 3.89944px 11.6983px rgba(0, 0, 0, 0.05);

            &::after {
              opacity: 0;
            }

            iframe {
              filter: grayscale(0%);
            }

            .video_wrapper {
              .video_thumbnail {
                img {
                  filter: grayscale(0%);
                }
              }

              &::after {
                content: '';
                position: absolute;
                top: 0;
                left: 0;
                right: 0;
                bottom: 0;
                background-color: #ffd672;
                opacity: 0;
                pointer-events: none;
                z-index: 2;
                border-top-left-radius: 32px;
                border-top-right-radius: 32px;
              }
            }

            figure {
              filter: grayscale(0%);

              a {
                display: block;
                width: 100%;
                height: 100%;

                img {
                  filter: grayscale(0%);
                }
              }
            }
          }

          .item_bottom {
            padding: 13px 20px 30px 20px;

            @media (max-width: 1024px) {
              padding: 0px 14px 18px 14px;
            }

            h5 {
              color: #4e463f;
              font-size: var(--fs-lg);
              margin-block: 0 10px;
              line-height: 1;

              @media (max-width: 1024px) {
                margin-block: 8px;
              }
            }

            .desc {
              color: #7c7064;
              font-size: 14px;
              font-family: 'Inter';
              display: -webkit-box;
              -webkit-box-orient: vertical;
              -webkit-line-clamp: 3;
              overflow: hidden;
              text-overflow: ellipsis;

              @media (max-width: 768px) {
                font-size: 12px;
              }
            }
          }
        }
      }
    }
  }
}
