/**
 * Styles for the [subpages_grid] shortcode.
 */

.subpages-grid {
	--sg-accent: #82027e;
	--sg-columns: repeat(auto-fit, minmax(260px, 1fr));
	--sg-accent-soft: #f6e9f5;
	--sg-accent-soft: color-mix(in srgb, var(--sg-accent) 10%, white);
	--sg-accent-dark: #5c015a;
	--sg-accent-dark: color-mix(in srgb, var(--sg-accent) 80%, black);

	display: grid;
	grid-template-columns: var(--sg-columns);
	gap: 20px;
	margin: 24px 0;
}

.subpages-grid .sg-card {
	background: #fff;
	border: 1px solid #e8e4ee;
	border-radius: 14px;
	box-shadow: 0 1px 2px rgba(28, 43, 69, .05), 0 8px 24px -12px rgba(28, 43, 69, .18);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform .15s ease;
}

.subpages-grid .sg-card:hover {
	transform: translateY(-2px);
}

.subpages-grid .sg-card-head {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px 18px;
	border-bottom: 1px solid #e8e4ee;
}

.subpages-grid .sg-icon {
	flex: 0 0 auto;
	width: 34px;
	height: 34px;
	border-radius: 9px;
	background: var(--sg-accent-soft);
	color: var(--sg-accent);
	display: flex;
	align-items: center;
	justify-content: center;
}

.subpages-grid .sg-icon svg {
	width: 17px;
	height: 17px;
}

.subpages-grid .sg-title {
	margin: 0;
	font-size: 16px;
	font-weight: 650;
	line-height: 1.3;
}

.subpages-grid .sg-title a {
	color: #1c2b45;
	text-decoration: none;
}

.subpages-grid .sg-title a:hover {
	color: var(--sg-accent);
}

.subpages-grid .sg-count {
	margin-left: auto;
	font-size: 12px;
	color: #6b7086;
	font-variant-numeric: tabular-nums;
	flex: 0 0 auto;
}

.subpages-grid .sg-list {
	list-style: none;
	margin: 0;
	padding: 6px 8px;
}

.subpages-grid .sg-list li {
	margin: 0;
}

.subpages-grid .sg-list a {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 9px 12px;
	border-radius: 8px;
	color: #3c4257;
	text-decoration: none;
	font-size: 14.5px;
	transition: background .12s ease, color .12s ease, padding-left .12s ease;
}

.subpages-grid .sg-list a:hover {
	background: var(--sg-accent-soft);
	color: var(--sg-accent-dark);
	padding-left: 16px;
}

.subpages-grid .sg-dot {
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: #e8e4ee;
	flex: 0 0 auto;
	transition: background .12s ease;
}

.subpages-grid .sg-list a:hover .sg-dot {
	background: var(--sg-accent);
}

.subpages-grid .sg-arrow {
	margin-left: auto;
	opacity: 0;
	transform: translateX(-4px);
	transition: opacity .12s ease, transform .12s ease;
	color: var(--sg-accent);
	font-size: 13px;
}

.subpages-grid .sg-list a:hover .sg-arrow {
	opacity: 1;
	transform: translateX(0);
}

@media (max-width: 520px) {
	.subpages-grid {
		gap: 14px;
	}
}
