/* smooth-scroll */
/* In-page links (#…) scroll smoothly there, unless the visitor asks for less motion */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* blog-cards */
/* Blog overview: a post with no featured image (WordPress leaves has-post-thumbnail off its list item)
   is a light yellow card with its text inside, as on the old site; one with an image is unchanged */
.wp-block-post:not(.has-post-thumbnail) .blog-card {
  background-color: var(--mcg-color-surface-accent);
  padding: 40px 30px;
}
.wp-block-post:not(.has-post-thumbnail) .blog-card-image {
  display: none;
}

/* pagination */
/* Page numbers under a post list (Figma, Blog overview): the circled arrows (the theme's icons)
   instead of the words "Previous" and "Next", 30px from the numbers; the numbers plain with a "|"
   between them, the page being shown bold */
.wp-block-query-pagination {
  column-gap: 30px;
}

.wp-block-query-pagination-previous,
.wp-block-query-pagination-next {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 0; /* the words, hidden */
}

.wp-block-query-pagination-previous::before,
.wp-block-query-pagination-next::after {
  content: "";
  display: inline-block;
  width: 34px;
  height: 34px;
  background-repeat: no-repeat;
  background-size: contain;
}

.wp-block-query-pagination-previous::before {
  background-image: url("/wp-content/themes/vonblock-builder-theme/assets/icons/pagination-previous.svg");
}

.wp-block-query-pagination-next::after {
  background-image: url("/wp-content/themes/vonblock-builder-theme/assets/icons/pagination-next.svg");
}

.wp-block-query-pagination-numbers {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0;
}

.wp-block-query-pagination-numbers .page-numbers {
  color: inherit;
  text-decoration: none;
}

.wp-block-query-pagination-numbers .page-numbers + .page-numbers::before {
  content: "|";
  display: inline-block;
  margin-inline: 0.4em;
  font-weight: 400;
}

.wp-block-query-pagination-numbers .page-numbers.current {
  font-weight: 700;
}

.wp-block-query-pagination-numbers a.page-numbers:is(:hover, :focus-visible) {
  text-decoration: underline;
}

/* long-words */
/* In a post, a word with no room to break (a long URL, a tracking snippet, a long compound word)
   breaks where it has to instead of running past the screen; anything that fits is left as it
   is. On phones headings also hyphenate, so a long word in a big heading splits with a hyphen
   (weightless: a heading that says otherwise in its own styles wins, as the homepage hero does) */
.wp-block-post-content {
  overflow-wrap: break-word;
}

@container (max-width: 768px) {
  :where(.wp-block-post-content) :is(h1, h2, h3, h4, h5, h6),
  :where(.mcg-typo-h1, .mcg-typo-h1-service, .mcg-typo-h1-profile, .mcg-typo-h1-case-study) {
    hyphens: auto;
  }
}

/* link-hover-accent */
/* A block with the composite class link-hover-accent: its links turn the accent colour on hover */
.link-hover-accent a:hover {
  color: var(--mcg-color-accent);
}

/* no-underline */
/* A link (or a block around links) with the class no-underline: no underline */
.no-underline {
  text-decoration: none;
}

/* featured-image-fill */
/* A post's featured image fills the box it is given (the cards' image column) */
figure.wp-block-post-featured-image {
  height: 100%;
}

figure.wp-block-post-featured-image img {
  height: 100%;
}

/* blog-card-media */
/* A blog card's picture box (the pattern "Blog"): the image at its own proportions in the middle
   (not filling the box, as "featured-image-fill" makes featured images do elsewhere), and the
   post's title when the post has no featured image, and only then */
.blog-card-media figure.wp-block-post-featured-image,
.blog-card-media figure.wp-block-post-featured-image img {
  height: auto;
}

.blog-card-media:has(.wp-block-post-featured-image img) .blog-card-media-title {
  display: none;
}

/* The title in the box keeps its words whole ("E-Commerce" split as "E-Com-merce" on phones) */
.blog-card-media .blog-card-media-title {
  hyphens: manual;
}

/* The case study cards (box with the class blog-card-media-cover): the picture fills the box,
   cropped, anchored at the left, where the case study images have the client's logo */
.blog-card-media-cover figure.wp-block-post-featured-image {
  align-self: stretch;
  width: 100%;
  height: 100%;
}

.blog-card-media-cover figure.wp-block-post-featured-image :is(a, img) {
  display: block;
  width: 100%;
  height: 100%;
}

.blog-card-media-cover figure.wp-block-post-featured-image img {
  object-fit: cover;
  object-position: 0% 50%;
}

/* profile-content */
/* A long team profile (the member's own blocks in the template single-team_member, Figma "Team
   Page Long"): 60px between its parts, the text's spacing, the photos' credits. Where a part sits
   and how wide is utility classes; the boxes are the composite classes profile-box and
   profile-box-outline */
.kloos-profile-content {
  padding-bottom: 60px;
}

.kloos-profile-content > * {
  margin-block: 60px 0;
}

.kloos-profile-content :is(h2, h3, p, ul) {
  margin-block: 0;
}

.kloos-profile-content p + p {
  margin-top: 20px;
}

/* Side by side (a fact's year and text): their gap, no margin */
.kloos-profile-content .mcg-display-flex > p + p {
  margin-top: 0;
}

.kloos-profile-content :is(h2, h3) + :is(p, ul) {
  margin-top: 25px;
}

.kloos-profile-content p a {
  color: inherit;
  text-decoration: underline;
}

.kloos-profile-content ul {
  padding-left: 0;
  list-style: none;
}

.kloos-profile-content li + li {
  margin-top: 14px;
}

.kloos-profile-content .wp-block-image {
  margin-bottom: 0;
}

.kloos-profile-content .wp-block-image img {
  display: block;
  width: 100%;
  height: auto;
}

.kloos-profile-content .wp-block-image figcaption {
  margin: 10px 0 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 130%;
  color: var(--mcg-color-text-muted);
  text-align: left;
}

/* Phones: two lists one after the other make one yellow box (Figma MOBILE) */
@container (max-width: 768px) {
  .kloos-profile-content .profile-box-outline + .profile-box-outline {
    margin-top: 0;
  }
}

/* service-hero-tall */
/* A service page's hero on phones as in Figma ("Leistungsseite SEO mobile"): a taller photo (the
   person on its right), the quote 132px down, the button 31px from the bottom. At least 500px
   high, and no higher than its words and button need (user; Figma's 375 / 524 grew with the
   screen). Only where the page's phone photo leaves room for the quote: the class
   service-hero-tall beside service-hero */
@container (max-width: 768px) {
  .service-hero.service-hero-tall {
    aspect-ratio: auto;
    min-height: 500px;
    background-position: center right;
  }

  .service-hero-tall .service-hero-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
    box-sizing: border-box;
    padding-top: 132px;
    padding-bottom: 31px;
  }
}

/* info-box */
/* A box with the composite class info-box: its list bullets line up with the heading */
.info-box ul {
  padding-left: 1em;
}

/* menu-active-case-studies */
.post-type-archive-case_study .kloos-site-menu .kloos-menu-nav a[href$="/case-studies/"],
.single-case_study .kloos-site-menu .kloos-menu-nav a[href$="/case-studies/"] { color: var(--mcg-color-accent); }

/* page-404-responsive */
@media (max-width: 1024px) { .kloos-404-num { font-size: 130px !important; } }
@media (max-width: 767px) { .kloos-404-num { font-size: 96px !important; line-height: 1; } }

