/* Core block styles. Loaded twice on purpose — into the front-end chain in
   inc/enqueue-scripts.php and into the editor via add_editor_style() — so the
   two cannot drift apart. .btn is not a block; it shares the rule and matches
   nothing in the editor. */

.wp-block-button__link,
.btn {
  position: relative;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

/* --------- Sections --------- */

/* Two plain sections in a row would stack both paddings into one oversized
   gap. A section with its own background keeps its padding — there the gap is
   the coloured band itself. */
.is-style-section:not(.has-background) + .is-style-section:not(.has-background) {
  padding-top: 0;
}

/* --------- List --------- */

/* A list follows its lead-in sentence closely; the block gap between other
   blocks would read as a paragraph break. */
.is-layout-constrained > .wp-block-list,
.is-layout-flow > .wp-block-list {
  margin-block-start: 0.75rem;
}

/* Tiles are grey by default; on a grey section they would vanish. */
.has-surface-background-color .is-style-tiles li {
  background-color: var(--wp--preset--color--base);
}

@media screen and (max-width: 640px) {
  .wp-block-list.is-style-tiles {
    gap: var(--wp--preset--spacing--20);
  }
}

/* --------- Cover (page banners) --------- */

/* The overlays are deliberately light (theme.json gradients), so the white
   heading gets a soft shadow to stay readable on bright photos. */
.wp-block-cover .wp-block-heading {
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.35),
    0 0 24px rgba(0, 0, 0, 0.35);
}

/* --------- File (documents list) --------- */

/* One row = one link: the File block with its Download button switched off
   and the name opening the PDF in a new tab. The whole row is the link. */
.wp-block-file {
  margin: 0;
  font-size: var(--wp--preset--font-size--normal);
}

.wp-block-file > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--wp--preset--spacing--30);
  padding: 14px var(--wp--preset--spacing--40);
  border-radius: 8px;
  background-color: var(--wp--preset--color--surface);
  color: var(--wp--preset--color--contrast);
  font-size: var(--wp--preset--font-size--medium);
  text-decoration: none;
  transition: color 0.2s ease;
}

.wp-block-file > a::after {
  content: "";
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  background-color: var(--wp--preset--color--secondary);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M9 1h6v6h-2V4.4L7.7 9.7 6.3 8.3 11.6 3H9V1zM1 3h5v2H3v8h8v-3h2v5H1V3z'/%3E%3C/svg%3E") no-repeat center / contain;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M9 1h6v6h-2V4.4L7.7 9.7 6.3 8.3 11.6 3H9V1zM1 3h5v2H3v8h8v-3h2v5H1V3z'/%3E%3C/svg%3E") no-repeat center / contain;
}

.wp-block-file > a:hover,
.wp-block-file > a:focus-visible {
  color: var(--wp--preset--color--primary);
}
