/*
  Compatibilita FSE: il markup del demo vive in header/main/footer,
  WordPress avvolge tutto in .wp-site-blocks.
*/

.wp-site-blocks {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  max-width: 100%;
  padding: 0;
}

.wp-site-blocks > main,
.wp-site-blocks > .wp-block-group {
  flex: 1 0 auto;
  width: 100%;
}

/*
  Sticky sul wrapper FSE, non su .site-header: il part e' un flex item
  alto quanto l'header, quindi position:sticky interno non resta in vista.
*/
.wp-site-blocks > .wp-block-template-part:has(.site-header) {
  position: sticky;
  top: 0;
  z-index: 50;
  overflow: visible;
}

.admin-bar .wp-site-blocks > .wp-block-template-part:has(.site-header),
.admin-bar .site-header {
  top: var(--wp-admin--admin-bar--height, 32px);
}

/* FSE: post-content sta tra main e le sezioni del demo. */
.wp-block-post-content {
  margin: 0;
  padding: 0;
  max-width: none;
}

.wp-block-post-content > .hero,
.wp-block-post-content > .note-hero,
.wp-block-post-content > .page-hero,
.wp-block-post-content > .section,
.wp-block-post-content > .wp-block-group.section {
  width: 100%;
  max-width: none;
}

.wp-block-post-content > section:nth-of-type(even) .eyebrow,
.wp-block-post-content > .wp-block-group.section:nth-of-type(even) .eyebrow {
  color: var(--land);
}

.wp-block-post-content > section:nth-of-type(even) .section-title em,
.wp-block-post-content > .wp-block-group.section:nth-of-type(even) .section-title em {
  color: var(--land);
}

.wp-block-post-content > section.blog-band--storie .eyebrow {
  color: var(--land);
}

.wp-block-post-content > section.blog-band--news .eyebrow {
  color: var(--sea);
}

.split > :not(.split__copy) .lead + .lead {
  margin-top: 16px;
}

/* Split media: Core avvolge l'img in figure con margin (demo: .media > img). */
.media .split-start,
.media .split-end,
.media .wp-block-image,
.media figure {
  margin: 0;
  width: 100%;
}

.media img {
  height: auto;
  max-width: none;
  display: block;
}

.wp-block-heading {
  margin: 0;
}

ul.wp-block-post-template.cards {
  list-style: none;
  margin: 0;
  padding: 0;
}

ul.wp-block-post-template.cards > li {
  margin: 0;
  min-width: 0;
  height: 100%;
}

.card figure.card__media,
.article figure.article__media {
  margin: 0;
}
