/* text-image (v1-welcome), TOC (v1-toc), links-block (v1-quick-links) */

/* ---------- text-image: контентная карточка ---------- */
/* Важно: ширины колонок у темы посчитаны через calc(50% - 2rem) + margin,
   поэтому gap на __content не добавляем - колонки поедут. */

html body .v1-welcome__info {
  background: var(--sa-card);
  border: 1px solid var(--sa-line);
  border-radius: var(--sa-r-lg);
  padding: clamp(18px, 2.2vw, 28px);
  box-shadow: var(--sa-e1);
  transition: border-color var(--sa-mid) var(--sa-ease), box-shadow var(--sa-mid) var(--sa-ease);
}

html body .v1-welcome__info:hover {
  border-color: var(--sa-line-strong);
  box-shadow: var(--sa-e2);
}

html body .v1-welcome__info > h2,
html body .v1-welcome__info > h3 {
  margin-top: 0;
  margin-bottom: var(--sa-s-2);
}

/* подзаголовки третьего уровня внутри текста получают свой ритм */
html body .v1-welcome__info h3 {
  margin-top: var(--sa-s-4);
  color: var(--sa-text);
}

/* ---------- TOC: панель оглавления ---------- */

html body .v1-toc {
  background: linear-gradient(180deg, var(--sa-surface) 0%, var(--sa-card) 100%);
  border: 1px solid var(--sa-line);
  border-radius: var(--sa-r-lg);
  padding: var(--sa-s-3) var(--sa-s-4);
  box-shadow: var(--sa-e1);
}

html body .v1-toc__title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sa-text-dim);
  margin: 0;
}

html body .v1-toc__menu {
  counter-reset: sa-toc;
  margin-top: var(--sa-s-2);
  display: grid;
  gap: 2px;
}

html body .v1-toc__menu-item {
  counter-increment: sa-toc;
  border-radius: var(--sa-r-sm);
  transition: background-color var(--sa-fast) var(--sa-ease);
}

html body .v1-toc__menu-item:hover { background: rgba(255, 255, 255, 0.04); }

html body .v1-toc__menu-item__link {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 9px 10px;
  min-height: 44px;
  color: var(--sa-text-muted);
  text-decoration: none;
  font-size: 15px;
  transition: color var(--sa-fast) var(--sa-ease);
}

html body .v1-toc__menu-item__link::before {
  content: counter(sa-toc, decimal-leading-zero);
  flex: none;
  color: var(--sa-accent);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  opacity: 0.85;
}

html body .v1-toc__menu-item__link:hover { color: var(--sa-text); }

html body .v1-toc__button {
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--sa-r-sm);
}

/* ---------- links-block: плитки перехода ---------- */

html body .v1-quick-links__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--sa-s-2);
}

html body .v1-quick-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sa-s-2);
  min-height: 56px;
  padding: 14px 16px;
  background: var(--sa-card);
  border: 1px solid var(--sa-line);
  border-radius: var(--sa-r-md);
  transition: transform var(--sa-mid) var(--sa-ease),
              border-color var(--sa-mid) var(--sa-ease),
              background-color var(--sa-mid) var(--sa-ease);
}

html body .v1-quick-link:hover {
  transform: translateY(-2px);
  background: var(--sa-card-hover);
  border-color: rgba(45, 224, 28, 0.35);
}

html body .v1-quick-link__title {
  color: var(--sa-text);
  font-weight: 600;
  font-size: 15px;
}

html body .v1-quick-link svg {
  flex: none;
  color: var(--sa-accent);
  transition: transform var(--sa-mid) var(--sa-ease);
}

html body .v1-quick-link:hover svg { transform: translateX(3px); }

/* ссылка растягивается на всю плитку - кликается вся карточка */
html body .v1-quick-link__link {
  position: absolute;
  inset: 0;
  font-size: 0;
  color: transparent;
  border-radius: inherit;
}

@media (prefers-reduced-motion: reduce) {
  html body .v1-quick-link:hover { transform: none; }
  html body .v1-quick-link:hover svg { transform: none; }
}

/* в испанском заголовки плиток не пишутся с Заглавной Каждого Слова */
html body .v1-quick-link__title { text-transform: none; }
