/**
 * Single Post — Table of Contents
 * -------------------------------------------------------
 * Índice lateral do artigo da Valore RH.
 *
 * Desktop:
 * - navegação lateral;
 * - destaque da seção ativa;
 * - visual leve e editorial.
 *
 * Tablet e mobile:
 * - bloco responsivo;
 * - leitura vertical;
 * - compatível com o comportamento do JavaScript atual.
 *
 * @package Valore_RH_Core
 * @since   1.0.0
 */

/* =====================================================
   TABLE OF CONTENTS
===================================================== */

.vr-toc {
	width: 100%;
	margin: 0;
	padding: 0 0 0 20px;
	background: transparent;
	border: 0;
	border-left: 1px solid #e5e7eb;
	border-radius: 0;
	box-shadow: none;
	font-family: "Poppins", sans-serif;
}

/* =====================================================
   HEADER
===================================================== */

.vr-toc__header {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 20px;
}

.vr-toc__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	font-size: 18px;
	line-height: 1;
	color: #c8102e;
}

.vr-toc__title {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 0.01em;
	color: #021627;
}

/* =====================================================
   LIST
===================================================== */

.vr-toc__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.vr-toc__list li {
	position: relative;
	margin: 0;
	padding: 0;
}

.vr-toc__list li + li {
	margin-top: 4px;
}

/* =====================================================
   LINKS
===================================================== */

.vr-toc__list a {
	position: relative;
	display: block;
	padding: 8px 10px 8px 0;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.55;
	text-decoration: none;
	color: #6b7280;
	transition:
		color 0.2s ease,
		transform 0.2s ease;
}

.vr-toc__list a::before {
	content: "";
	position: absolute;
	top: 10px;
	left: -21px;
	width: 3px;
	height: calc(100% - 20px);
	min-height: 18px;
	background: transparent;
	border-radius: 999px;
	transition:
		background-color 0.2s ease,
		height 0.2s ease;
}

.vr-toc__list a:hover {
	color: #c8102e;
	transform: translateX(3px);
}

.vr-toc__list a:focus-visible {
	outline: 3px solid rgba(200, 16, 46, 0.18);
	outline-offset: 4px;
	border-radius: 4px;
	color: #c8102e;
}

/* =====================================================
   ACTIVE ITEM
===================================================== */

.vr-toc__list li.is-active > a {
	font-weight: 700;
	color: #021627;
	transform: translateX(3px);
}

.vr-toc__list li.is-active > a::before {
	background: #c8102e;
}

/* =====================================================
   LEVEL 3
===================================================== */

.vr-toc__list li.vr-toc__level-3 a {
	padding-left: 14px;
	font-size: 13px;
	color: #7b8492;
}

.vr-toc__list li.vr-toc__level-3 a::before {
	left: -21px;
}

.vr-toc__list li.vr-toc__level-3 a:hover,
.vr-toc__list li.vr-toc__level-3.is-active > a {
	color: #021627;
}

/* =====================================================
   SCROLL
===================================================== */

html {
	scroll-behavior: smooth;
}

.vr-single-article__content h2,
.vr-single-article__content h3 {
	scroll-margin-top: 140px;
}

/* =====================================================
   TABLET
===================================================== */

@media (max-width: 1024px) {
	.vr-toc {
		margin: 0;
		padding: 24px 26px;
		background: #ffffff;
		border: 1px solid #e5e7eb;
		border-radius: 14px;
		box-shadow: 0 8px 28px rgba(2, 22, 39, 0.05);
	}

	.vr-toc__header {
	margin-bottom: 0;
    }

	.vr-toc__title {
		font-size: 18px;
	}

	.vr-toc__list a {
		padding: 8px 8px 8px 18px;
		font-size: 14px;
	}

	.vr-toc__list a::before {
		top: 9px;
		left: 0;
		height: calc(100% - 18px);
	}

	.vr-toc__list li.vr-toc__level-3 a {
		padding-left: 34px;
	}

	.vr-toc__list li.vr-toc__level-3 a::before {
		left: 16px;
	}
}

/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 767px) {
	.vr-toc {
		padding: 20px;
		border-radius: 12px;
	}

	.vr-toc__header {
		gap: 9px;
		margin-bottom: 16px;
	}

	.vr-toc__icon {
		font-size: 17px;
	}

	.vr-toc__title {
		font-size: 17px;
	}

	.vr-toc__list li + li {
		margin-top: 2px;
	}

	.vr-toc__list a {
		padding-top: 7px;
		padding-bottom: 7px;
		font-size: 13px;
		line-height: 1.5;
	}

	.vr-toc__list li.vr-toc__level-3 a {
		padding-left: 30px;
		font-size: 12px;
	}
}

/* =====================================================
   SMALL MOBILE
===================================================== */

@media (max-width: 480px) {
	.vr-toc {
		padding: 18px 16px;
	}

	.vr-toc__title {
		font-size: 16px;
	}

	.vr-toc__list a {
		padding-left: 16px;
	}

	.vr-toc__list li.vr-toc__level-3 a {
		padding-left: 28px;
	}
}

/* =====================================================
   TOGGLE
===================================================== */

.vr-toc__header {
	width: 100%;
	padding: 0;
	background: transparent;
	border: 0;
	text-align: left;
	cursor: default;
}

.vr-toc__toggle {
	display: none;
	align-items: center;
	justify-content: center;
	margin-left: auto;
	color: #021627;
	transition: transform 0.25s ease;
}

/* =====================================================
   TABLET / MOBILE COLLAPSE
===================================================== */

@media (max-width: 1024px) {
	.vr-toc__header {
		cursor: pointer;
	}

	.vr-toc__toggle {
		display: inline-flex;
	}

	.vr-toc__list {
		display: none;
		margin-top: 18px;
	}

	.vr-toc.is-open .vr-toc__list {
		display: block;
	}

	.vr-toc.is-open .vr-toc__toggle {
		transform: rotate(180deg);
	}
}