/*
 * Revio Guides — what main.css and docs.css of the landing do not have:
 * 1. Guide layout and side card   2. Content of the block editor   3. List of guides   4. Breadcrumbs   5. Mobile
 */

/* 1. Guide layout and side card --------------------------------------------- */
.guide {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	gap: 56px;
	align-items: start;
	padding-block: 48px 24px;
}

.guide__content {
	max-width: 760px;
}

.guide__content > :first-child {
	margin-top: 0;
}

.guide-aside {
	position: sticky;
	top: calc(var(--header-height) + 24px);
	display: grid;
	gap: 14px;
	padding: 24px;
	border: 1px solid var(--line);
	border-radius: var(--r-lg);
	background: var(--surface);
	box-shadow: var(--shadow-sm);
}

.guide-aside__text {
	font-size: 15px;
	color: var(--muted);
}

.guide-aside__list {
	display: grid;
	gap: 8px;
	font-size: 14px;
}

.guide-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.doc .guide-actions a,
.guide-aside .btn {
	text-decoration: none;
}


/* 2. Content of the block editor --------------------------------------------- */
.doc h2 {
	margin-top: 56px;
}

.doc figure,
.doc .wp-block-image {
	margin: 28px 0 0;
}

.doc .wp-block-image img,
.doc figure img {
	width: 100%;
	height: auto;
	border: 1px solid var(--line);
	border-radius: var(--r-md);
	box-shadow: var(--shadow-sm);
}

/* Screenshots of the landing are 1440×960: keep the space before they load. */
.doc img[src*="-1440.webp"] {
	aspect-ratio: 3 / 2;
}

.doc figcaption,
.doc .wp-element-caption {
	margin-top: 10px;
	font-size: 14px;
	color: var(--muted);
}

.doc blockquote {
	margin: 24px 0 0;
	padding: 4px 0 4px 20px;
	border-left: 3px solid var(--accent);
	color: var(--muted);
}

.doc .wp-block-table {
	margin: 24px 0 0;
	overflow-x: auto;
}

.doc .wp-block-table table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
}

.doc .wp-block-table th,
.doc .wp-block-table td {
	padding: 10px 12px;
	border-bottom: 1px solid var(--line);
	text-align: left;
	vertical-align: top;
}

.doc .wp-block-table th {
	background: var(--soft);
	font-weight: 600;
}

.doc ol {
	list-style: decimal;
}

.doc hr {
	margin: 40px 0 0;
	border: 0;
	border-top: 1px solid var(--line);
}

/* 3. List of guides --------------------------------------------------------- */
.guide-list-wrap {
	padding-block: 48px 24px;
}

.guide-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
	gap: 20px;
}

.guide-card {
	position: relative;
	display: grid;
	align-content: start;
	gap: 10px;
	padding: 24px;
	border: 1px solid var(--line);
	border-radius: var(--r-lg);
	background: var(--surface);
	box-shadow: var(--shadow-sm);
	transition: border-color 0.15s, transform 0.15s;
}

.guide-card:hover {
	border-color: var(--accent);
	transform: translateY(-2px);
}

.guide-card__title {
	font-family: var(--font-heading);
	font-size: 21px;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.015em;
}

.guide-card__title a {
	color: inherit;
	text-decoration: none;
}

/* The whole card is the link. */
.guide-card__title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.guide-card__text {
	color: var(--muted);
}

.guide-card__meta,
.guide-empty {
	font-size: 14px;
	color: var(--muted);
}

.guide-pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 32px;
}

.guide-pagination .page-numbers {
	padding: 8px 14px;
	border: 1px solid var(--line);
	border-radius: 10px;
	text-decoration: none;
	color: var(--text);
}

.guide-pagination .current {
	border-color: var(--accent);
	background: var(--accent-soft);
	color: var(--accent-ink);
}

/* 4. Breadcrumbs ------------------------------------------------------------- */
.guide-crumbs {
	margin-bottom: 18px;
	font-size: 14px;
	color: var(--muted);
}

.guide-crumbs a {
	color: inherit;
}

/* 5. Mobile ------------------------------------------------------------------ */
@media (max-width: 960px) {
	.guide {
		grid-template-columns: minmax(0, 1fr);
		gap: 40px;
	}

	.guide-aside {
		position: static;
	}
}
