/* ef11 page title: see title.twig. The heading takes the h1 of the type scale. */
/* The text column of the grid (css/utils/text-measure.pcss), from 1024px. */
@media (min-width: 64rem) {
  .ef-title__inner {
    max-width: var(--text-measure);
  }
}

.ef-title--center {
  text-align: center;
}

.ef-title--center .ef-title__inner {
  margin-inline: auto;
}

.ef-title__kicker {
  margin-bottom: 1rem;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-link);
}

/* h1 to intro (Figma "01 - Base"): 24px, desktop 32px. */
.ef-title__lead {
  margin-top: 1.5rem;
}

@media (min-width: 64rem) {
  .ef-title__lead {
    margin-top: 2rem;
  }
}

/* Inside an area (grid_1_region, grid_2_regions …) the title is a section title: the area brings colour, air and container. */
:where([data-component-id*=":grid_"]) .ef-title {
  padding-block: 0;
}

:where([data-component-id*=":grid_"]) .ef-title > .container {
  max-width: none;
  margin-inline: 0;
  padding-inline: 0;
}

/* A title further down in an area (h3 group, e.g. "Ergänzende Technik für Profis") opens a new group: more air than the block gap above it. */
[data-component-id*=":grid_"] > .grid > * > * + .ef-title {
  margin-top: 1.5rem;
}

@media (min-width: 64rem) {
  [data-component-id*=":grid_"] > .grid > * > * + .ef-title {
    margin-top: 2rem;
  }
}

/* The area already sets the title to the text column; a second
   --text-measure would take a percentage of that and break the heading early. */
[data-component-id*=":grid_"] .ef-title__inner {
  max-width: none;
}

/* Icon top right (e.g. the logo of a formula): beside the text from 768px, above it on phones. */
.ef-title__icon {
  width: 4.5rem;
  height: 4.5rem;
  margin-bottom: 1.5rem;
}

.ef-title__icon :where(div, picture, article, a) {
  width: 100%;
  height: 100%;
}

.ef-title__icon img {
  width: 100%;
  height: 100% !important;
  object-fit: contain;
}

@media (min-width: 48rem) {
  .ef-title__with-icon {
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
  }

  .ef-title__icon {
    flex: none;
    width: 7.5rem;
    height: 7.5rem;
    margin-bottom: 0;
  }
}

/* A section title with only a kicker (group heading of the jump navigation,
   Figma "Übersichtsseite Leistungen/Lösungen"): Archivo ExtraBold 14/28 in the
   heading colour, not in spaced capitals. */
.ef-section-title:not(:has(.ef-title__heading)) .ef-title__kicker {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.875rem;
  line-height: 1.75rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--color-heading);
}
