/* Общие ячейки заголовков. Уровень h1–h3 выбирается по структуре страницы. */
.section-heading {
  --section-padding-inline: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 10px;
  padding: 4px var(--section-padding-inline) 10px;
  /* Фигуры 4×4 px без углов; соседний ряд сдвинут на 4 px по обеим осям. */
  background-image:
    conic-gradient(at 2px 4px, transparent 75%, #000 0),
    conic-gradient(at 4px 2px, transparent 75%, #000 0),
    conic-gradient(at 2px 4px, transparent 75%, #000 0),
    conic-gradient(at 4px 2px, transparent 75%, #000 0);
  background-size: 8px 8px;
  background-position: 1px 0, 0 1px, 5px 4px, 4px 5px;
}

.section-title {
  min-width: 0;
  margin: 0;
  color: var(--section-title-color, #e7d9c6);
  font: 700 30px/1.2 var(--font-section-title);
  text-align: left;
  text-transform: none;
  overflow-wrap: anywhere;
}

.section-heading--subheading {
  justify-content: center;
}

.section-heading--subheading .section-title {
  font-size: 20px;
  text-align: center;
}

/* Полоса измеряется по своей ячейке, включая вложенные колонки. */
.section-rule {
  position: relative;
  container-type: inline-size;
}

.section-rule::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  width: 6px;
  height: calc(100cqw + 2 * var(--section-padding-inline, 0px));
  background: #0d0d0d url("../../../assets/shell-edge.png") left top / 6px auto repeat-y;
  transform: rotate(-90deg);
  transform-origin: top left;
  transition: none;
  pointer-events: none;
}

.section-rule--top::after { top: 6px; }

.section-column-rule { position: relative; }
.section-column-rule::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0 auto 0 -3px;
  width: 6px;
  background: #0d0d0d url("../../../assets/shell-edge.png") left top / 6px auto repeat-y;
  pointer-events: none;
}

@media (max-width: 680px) {
  .section-title { font-size: 28px; }
}
