/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Add padding to elements with background color */
.has-background,
[class*="wp-block-"][class*="is-style-section-"],
.wp-block-cover {
  padding: var(--wp--custom--global--spacing--padding--background);
  border-radius: var(--wp--custom--global--border--radius--base);
}

/* Prevent adjacent alignfull blocks from having a margin-top */
.wp-site-blocks > *,
.is-root-container.wp-site-blocks > *,
.alignfull + .alignfull {
  margin-top: 0;
}

/* Prevent padding from affecting the layout */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Add stretched link class name */
.has-stretched-link {
  position: relative;
}

.has-stretched-link a:not(.wp-element-button):before {
  content: "";
  display: block;
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* Make gradients compatible with small screens */
@media (max-width: 782px) {
  .wp-block-cover.has-custom-content-position.is-position-bottom-center
    .wp-block-cover__background.has-dark-to-transparent-gradient-background,
  .wp-block-cover.has-custom-content-position.is-position-bottom-center
    .wp-block-cover__background.has-transparent-to-dark-gradient-background {
    background: linear-gradient(
      to top,
      rgba(0, 0, 0, 1),
      rgba(0, 0, 0, 0)
    ) !important;
  }
  .wp-block-cover:not(.has-custom-content-position)
    .wp-block-cover__background.has-dark-to-transparent-gradient-background,
  .wp-block-cover:not(.has-custom-content-position)
    .wp-block-cover__background.has-transparent-to-dark-gradient-background {
    background: transparent !important;
  }
}