/* === Section style (.is-style-section) === */

/* Top border line (primary color, from Figma) */
.is-style-section {
  border-top: 1px solid var(--wp--preset--color--primary);
}

/* --- Section title: typography + full width --- */

/* Sectiontitle is scoped to sections only (not a global heading style).
   Class is applied by the section block variation (src/section/variation.js). */
.is-style-section > .is-style-text-sectiontitle {
  max-width: none;
  font-family: var(--wp--preset--font-family--noah);
  font-size: var(--wp--preset--font-size--large);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1;
  color: var(--wp--preset--color--secondary);
}

/* --- Section content (prose) spacing --- */

/* Figma: padding 24px 36px, gap 16px, left-aligned */
.is-style-section > .is-style-lfdk-prose {
  padding-block: var(--wp--preset--spacing--50);
}

/* --- Heading shift (content area) --- */

/* H3 inside section → visual H2 (Noah Head 900, 2XL/2.5rem) */

/* Exclude headings with explicit block style variations (e.g. label, sectiontitle) */
.is-style-section h3.wp-block-heading:not([class*="is-style-text-"]) {
  font-family: var(--wp--preset--font-family--noah-head);
  font-size: var(--wp--preset--font-size--xx-large);
  font-weight: 900;
  line-height: 1;
  text-transform: none;
}

/* H4 inside section → visual H3 (Noah 700, XL/2.25rem) */
.is-style-section h4.wp-block-heading:not([class*="is-style-text-"]) {
  font-family: var(--wp--preset--font-family--noah);
  font-size: var(--wp--preset--font-size--x-large);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

/* === Hinweis style (.is-style-hinweis) === */

/* Grey text, small blockGap, first paragraph is bold lead at M size */

.is-style-hinweis {
  color: var(--wp--preset--color--contrast-1);
  padding-top: var(--wp--preset--spacing--30);
}

.is-style-hinweis.is-layout-flow > * {
  margin-block-start: 12px;
  margin-block-end: 0;
}

.is-style-hinweis > p:first-child {
  font-weight: 700;
  font-size: var(--wp--preset--font-size--medium);
  line-height: 1.4;
  max-width: var(--wp--style--global--wide-size);
}

.is-style-hinweis > p:not(:first-child) {
  font-size: var(--wp--preset--font-size--small);
}

/* Label/value pairs: bold-only paragraphs act as labels with no gap below */
.is-style-hinweis > p:not(:first-child):has(> strong:first-child:last-child) {
  font-weight: 700;
  margin-block-end: 0;
}

/* Value paragraph after a label: no gap above */
.is-style-hinweis > p:not(:first-child):has(> strong:first-child:last-child) + p {
  margin-block-start: 0;
}

/* === Download style (.is-style-download) === */

/* Primary-colored lead paragraph, small text body */

.is-style-download.is-layout-flow > * {
  margin-block-start: 0;
  margin-block-end: 0;
}

/* 12px gap before file block */
.is-style-download.is-layout-flow > .wp-block-file {
  margin-block-start: 12px;
}

.is-style-download > p:first-child {
  font-weight: 700;
  color: var(--wp--preset--color--primary);
}

.is-style-download > p:not(:first-child) {
  font-size: var(--wp--preset--font-size--small);
}

/* Hide filename link (title is in lead paragraph) */
.is-style-download .wp-block-file > a:not(.wp-block-file__button) {
  display: none;
}

/* Download file button: outlined, primary color, with download icon */

/* Specificity must beat WP core .wp-block-file * + .wp-block-file__button */
.is-style-download .wp-block-file .wp-block-file__button {
  margin-left: 0;
  text-decoration: none;
  background: transparent;
  border: 1px solid var(--wp--preset--color--primary);
  color: var(--wp--preset--color--primary);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: var(--wp--preset--font-size--small);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.is-style-download .wp-block-file .wp-block-file__button:hover {
  background-color: color-mix(in srgb, var(--wp--preset--color--primary) 8%, transparent);
}

/* Download icon via CSS pseudo-element */
.is-style-download .wp-block-file .wp-block-file__button::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  background-color: currentcolor;
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11.75 7.375V11.375C11.75 11.4745 11.7105 11.5698 11.6402 11.6402C11.5698 11.7105 11.4745 11.75 11.375 11.75H0.375C0.275544 11.75 0.180161 11.7105 0.109835 11.6402C0.0395088 11.5698 0 11.4745 0 11.375V7.375C0 7.27554 0.0395088 7.18016 0.109835 7.10983C0.180161 7.03951 0.275544 7 0.375 7C0.474456 7 0.569839 7.03951 0.640165 7.10983C0.710491 7.18016 0.75 7.27554 0.75 7.375V11H11V7.375C11 7.27554 11.0395 7.18016 11.1098 7.10983C11.1802 7.03951 11.2755 7 11.375 7C11.4745 7 11.5698 7.03951 11.6402 7.10983C11.7105 7.18016 11.75 7.27554 11.75 7.375ZM5.61 7.64C5.68031 7.71023 5.77562 7.74967 5.875 7.74967C5.97438 7.74967 6.06969 7.71023 6.14 7.64L8.64 5.14C8.70624 5.06891 8.7423 4.97489 8.74059 4.87774C8.73887 4.78059 8.69952 4.6879 8.63081 4.61919C8.5621 4.55048 8.46941 4.51113 8.37226 4.50941C8.27511 4.5077 8.18109 4.54376 8.11 4.61L6.25 6.46937V0.375C6.25 0.275544 6.21049 0.180161 6.14017 0.109835C6.06984 0.0395088 5.97446 0 5.875 0C5.77554 0 5.68016 0.0395088 5.60984 0.109835C5.53951 0.180161 5.5 0.275544 5.5 0.375V6.46937L3.64 4.61C3.56891 4.54376 3.47489 4.5077 3.37774 4.50941C3.28059 4.51113 3.1879 4.55048 3.11919 4.61919C3.05048 4.6879 3.01113 4.78059 3.00941 4.87774C3.0077 4.97489 3.04376 5.06891 3.11 5.14L5.61 7.64Z' fill='black'/%3E%3C/svg%3E");
  mask-size: contain;
  mask-repeat: no-repeat;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11.75 7.375V11.375C11.75 11.4745 11.7105 11.5698 11.6402 11.6402C11.5698 11.7105 11.4745 11.75 11.375 11.75H0.375C0.275544 11.75 0.180161 11.7105 0.109835 11.6402C0.0395088 11.5698 0 11.4745 0 11.375V7.375C0 7.27554 0.0395088 7.18016 0.109835 7.10983C0.180161 7.03951 0.275544 7 0.375 7C0.474456 7 0.569839 7.03951 0.640165 7.10983C0.710491 7.18016 0.75 7.27554 0.75 7.375V11H11V7.375C11 7.27554 11.0395 7.18016 11.1098 7.10983C11.1802 7.03951 11.2755 7 11.375 7C11.4745 7 11.5698 7.03951 11.6402 7.10983C11.7105 7.18016 11.75 7.27554 11.75 7.375ZM5.61 7.64C5.68031 7.71023 5.77562 7.74967 5.875 7.74967C5.97438 7.74967 6.06969 7.71023 6.14 7.64L8.64 5.14C8.70624 5.06891 8.7423 4.97489 8.74059 4.87774C8.73887 4.78059 8.69952 4.6879 8.63081 4.61919C8.5621 4.55048 8.46941 4.51113 8.37226 4.50941C8.27511 4.5077 8.18109 4.54376 8.11 4.61L6.25 6.46937V0.375C6.25 0.275544 6.21049 0.180161 6.14017 0.109835C6.06984 0.0395088 5.97446 0 5.875 0C5.77554 0 5.68016 0.0395088 5.60984 0.109835C5.53951 0.180161 5.5 0.275544 5.5 0.375V6.46937L3.64 4.61C3.56891 4.54376 3.47489 4.5077 3.37774 4.50941C3.28059 4.51113 3.1879 4.55048 3.11919 4.61919C3.05048 4.6879 3.01113 4.78059 3.00941 4.87774C3.0077 4.97489 3.04376 5.06891 3.11 5.14L5.61 7.64Z' fill='black'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
}

/* --- Screen-reader-only heading --- */
.is-style-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
