/**
 * Styling for the default fallback templates (singular.php, index.php, 404.php).
 *
 * These templates exist so posts, archives and 404s render with this theme's
 * header and footer instead of the parent block theme. They are deliberately
 * plain - the designed layouts (page-services-listing, post-blog-article, the
 * blog listings) are unaffected and keep their own stylesheets.
 *
 * Namespaced .a3-default-* so nothing here can reach a designed template.
 */

.a3-default-main {
	padding: 64px 0 96px;
}

.a3-default-article__title {
	font-size: 40px;
	line-height: 1.2;
	margin: 0 0 24px;
	max-width: 900px;
}

.a3-default-article__media {
	margin: 0 0 32px;
}

.a3-default-article__media img {
	width: 100%;
	height: auto;
	border-radius: 8px;
}

.a3-default-article__body {
	max-width: 820px;
}

/* Headings need a SIZE here, not just spacing.
 *
 * This file set margin and line-height and left font-size to whatever the
 * shared sheets say - which is 56px for an h2. Against the 40px page title
 * that inverts the hierarchy: every section heading in the body outranked the
 * name of the page. Measured on /privacy-policy/: h2 came out 56px/72.8 under
 * a 40px/48 title.
 *
 * The scale below sits under the title rather than over it, and stays in this
 * namespace so no designed template is touched. */
.a3-default-article__body :is(h2, h3, h4) {
	margin: 40px 0 12px;
	line-height: 1.3;
	font-weight: 700;
}

.a3-default-article__body h2 { font-size: 28px; }
.a3-default-article__body h3 { font-size: 22px; }
.a3-default-article__body h4 { font-size: 18px; }

.a3-default-article__body :is(h2, h3, h4):first-child {
	margin-top: 0;
}

/* Put the list markers back.
 *
 * global.css:86 resets `ul, ol { list-style: none }` - correct for the nav
 * chrome, wrong for prose. blog-article.css already re-states this for posts;
 * the default template needs its own copy, since a plain page never loads that
 * file. Without it a bulleted list renders as unmarked lines that are still
 * indented, which reads as broken rather than as a list. */
.a3-default-article__body :is(ul, ol) {
	list-style-position: outside;
	padding-left: 22px;
	margin: 0 0 16px;
}

.a3-default-article__body ul { list-style-type: disc; }
.a3-default-article__body ol { list-style-type: decimal; }
.a3-default-article__body ul ul { list-style-type: circle; }
.a3-default-article__body ol ol { list-style-type: lower-alpha; }

.a3-default-article__body li::marker {
	color: #71717a;
}

.a3-default-article__body p,
.a3-default-article__body li {
	line-height: 1.8;
	margin-bottom: 16px;
}

.a3-default-article__body img {
	max-width: 100%;
	height: auto;
	border-radius: 8px;
}

.a3-default-article__body :is(table, pre) {
	max-width: 100%;
	overflow-x: auto;
	display: block;
}

/* ---- listings ---- */

.a3-default-list__head {
	margin-bottom: 40px;
}

.a3-default-list__title {
	font-size: 36px;
	line-height: 1.2;
	margin: 0 0 8px;
}

.a3-default-list {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 32px;
}

.a3-default-card__media img {
	width: 100%;
	height: 200px;
	object-fit: cover;
	border-radius: 8px;
}

.a3-default-card__title {
	font-size: 20px;
	line-height: 1.35;
	margin: 16px 0 8px;
}

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

.a3-default-card__title a:hover {
	color: #f05a29;
}

.a3-default-pagination {
	margin-top: 56px;
}

.a3-default-pagination .page-numbers {
	display: inline-block;
	padding: 8px 14px;
	margin-right: 6px;
	border: 1px solid #e6e6e6;
	border-radius: 6px;
	text-decoration: none;
	color: inherit;
}

.a3-default-pagination .page-numbers.current {
	background: #f05a29;
	border-color: #f05a29;
	color: #fff;
}

/* ---- 404 ---- */

.a3-default-404 {
	padding: 80px 0;
	max-width: 640px;
}

.a3-default-404__title {
	font-size: 40px;
	margin: 0 0 12px;
}

@media (max-width: 991px) {
	.a3-default-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.a3-default-article__title { font-size: 32px; }
}

@media (max-width: 767px) {
	.a3-default-main { padding: 40px 0 64px; }
	.a3-default-list { grid-template-columns: 1fr; }
	.a3-default-article__title,
	.a3-default-404__title { font-size: 28px; }
}
