/* Разделите на витрината: легендата на картата, възможностите, ролите, стъпките, въпросите (заявката и
   политиката са в site-request.css). Номерата в кръг са номерата на разделите от чертежа. */

.secnum {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--fg);
  color: var(--bg);
  font-family: var(--font-cond);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1;
}

/* Легендата: разделите на картата и полетата им — в три колони, разделени с тънка линия. */
.legend__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 0 40px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.legend__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 14px;
  align-items: start;
  align-content: start;
  padding: 20px 0 22px;
  border-top: 1px solid var(--line);
}

.legend__item h3 {
  align-self: center;
  font-size: 1.125rem;
}

.legend__item p {
  grid-column: 2;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--muted);
}

/* Възможностите: икона в квадрат с рамка, заглавие, кратък текст. Без карти и сенки. */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 44px 40px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature {
  display: grid;
  gap: 10px;
  align-content: start;
}

.feature .icon {
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1.5px solid var(--fg);
  border-radius: var(--radius);
}

.feature h3 {
  margin-top: 6px;
  font-size: 1.1875rem;
}

.feature p {
  color: var(--muted);
}

/* Ролите: таблица в черния раздел. Номерът е нивото от roles.ts — бутон на етаж, като в кабината. */
.matrix {
  width: 100%;
  border-collapse: collapse;
}

.matrix th,
.matrix td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--bar-line);
  text-align: center;
}

.matrix thead th {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--bar-muted);
  vertical-align: bottom;
}

.matrix th[scope='row'],
.matrix thead th:first-child {
  text-align: left;
}

.matrix th[scope='row'] {
  font-weight: 600;
}

.matrix .icon {
  width: 22px;
  height: 22px;
  stroke-width: 2.25;
}

.matrix__no {
  color: var(--bar-muted);
}

.level {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-right: 12px;
  border: 1.5px solid var(--bar-fg);
  border-radius: 50%;
  font-family: var(--font-cond);
  font-size: 0.875rem;
  font-weight: 600;
}

@media (max-width: 759px) {
  .matrix thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .matrix tr {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 12px;
    padding: 16px 0;
    border-bottom: 1px solid var(--bar-line);
  }

  .matrix th,
  .matrix td {
    padding: 0;
    border: 0;
    text-align: left;
  }

  .matrix th[scope='row'] {
    grid-column: 1 / -1;
    margin-bottom: 4px;
  }

  .matrix td {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
  }

  .matrix td::after {
    content: attr(data-label);
    color: var(--bar-muted);
  }

  .matrix .icon {
    width: 18px;
    height: 18px;
  }
}

/* Стъпките: номерата са спирки, линията между тях — шахтата (на телефон тя е отвесна). */
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.step {
  position: relative;
  display: grid;
  gap: 10px;
  align-content: start;
  scroll-margin-top: 80px;
}

.step__n {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 2px solid var(--fg);
  border-radius: var(--radius);
  background: var(--bg);
  font-family: var(--font-cond);
  font-size: 1.375rem;
  font-weight: 600;
}

.step:not(:last-child)::before {
  content: '';
  position: absolute;
  top: 24px;
  left: 48px;
  right: -32px;
  border-top: 2px solid var(--fg);
}

.step h3 {
  font-size: 1.1875rem;
}

.step p {
  color: var(--muted);
}

@media (max-width: 899px) {
  .steps {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .step {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 4px 18px;
  }

  .step__n {
    grid-row: span 2;
  }

  .step:not(:last-child)::before {
    top: 48px;
    bottom: -28px;
    left: 23px;
    right: auto;
    border-top: 0;
    border-left: 2px solid var(--fg);
  }
}

/* Въпросите: въпросът е заглавие, отговорът е първото изречение — видими, без разгъване. */
.faq {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
  gap: 0 48px;
}

.faq__item {
  padding: 22px 0 24px;
  border-top: 1px solid var(--line);
}

.faq__q {
  font-size: 1.1875rem;
}

.faq__a {
  margin-top: 8px;
  color: var(--muted);
}
