/* ==========================================================================
   Modo Optometry Refresh: post body and post index
   --------------------------------------------------------------------------
   Loaded by single.php and archive.php after main.css (handle mor-post).

   main.css resets the elements a long-form article needs: `p { margin: 0 }`,
   `ul, ol { list-style: none; padding: 0 }`, `h1..h6 { margin: 0 }`. Those
   resets are right for the service templates, whose copy is all in classed
   blocks, and wrong for the_content(), which is plain HTML. This file gives
   the plain elements the values the theme already uses elsewhere:

     paragraph   .mor-rich-text__content p    15px / 1.8, rgba(10,10,10,.75)
     h3, h4      .mor-rich-text__content h3   serif, 22px, uppercase
     list        .mor-rich-text__content ul   disc, 24px indent
     table       .mor-comparison__*           brand header row, 15px cells,
                                              alternate rows #faf7f1
     callout     .mor-insurance__note         4px brand left border
     column      .mor-rich-text__inner        768px max width

   Nothing here touches a .mor-* class main.css already styles.
   ========================================================================== */

/* --- Body column ---------------------------------------------------------- */

.mor-post {
	background-color: #fff;
	padding: 48px 0 64px;
}

@media (min-width: 640px) {
	.mor-post {
		padding: 64px 0 96px;
	}
}

.mor-post__inner {
	max-width: 768px;
	margin: 0 auto;
}

.mor-post__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
	margin-bottom: 32px;
	font-family: var(--font-sans);
	font-size: 13px;
	line-height: 20px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.2em;
	color: rgba(10, 10, 10, 0.55);
}

/* --- Text ----------------------------------------------------------------- */

.mor-post-body {
	font-family: var(--font-sans);
	font-size: 15px;
	line-height: 1.8;
	color: rgba(10, 10, 10, 0.75);
}

@media (min-width: 768px) {
	.mor-post-body {
		font-size: 17px;
	}
}

.mor-post-body p {
	margin: 0 0 20px;
}

.mor-post-body strong {
	color: var(--color-fg);
}

.mor-post-body a {
	color: var(--color-brand);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.mor-post-body a:hover {
	color: var(--color-fg);
}

/* --- Headings: the theme's serif, uppercase, as on the section headings --- */

.mor-post-body h2,
.mor-post-body h3,
.mor-post-body h4 {
	font-family: var(--font-serif);
	font-weight: 400;
	text-transform: uppercase;
	letter-spacing: 0.025em;
	color: var(--color-fg);
}

.mor-post-body h2 {
	font-size: 30px;
	line-height: 1.1;
	margin: 48px 0 16px;
}

.mor-post-body h3 {
	font-size: 22px;
	line-height: 1.2;
	margin: 32px 0 12px;
}

.mor-post-body h4 {
	font-size: 18px;
	line-height: 1.3;
	margin: 24px 0 8px;
}

@media (min-width: 768px) {
	.mor-post-body h2 {
		font-size: 36px;
	}
	.mor-post-body h3 {
		font-size: 26px;
	}
}

.mor-post-body h2:first-child,
.mor-post-body h3:first-child {
	margin-top: 0;
}

/* --- Lists ---------------------------------------------------------------- */

.mor-post-body ul,
.mor-post-body ol {
	margin: 0 0 20px;
	padding-left: 24px;
}

.mor-post-body ul {
	list-style: disc;
}

.mor-post-body ol {
	list-style: decimal;
}

.mor-post-body li {
	margin-bottom: 6px;
}

.mor-post-body li > ul,
.mor-post-body li > ol {
	margin-top: 6px;
	margin-bottom: 0;
}

/* --- Tables: the comparison-table look ------------------------------------ */

.mor-post-body .mor-table-wrap {
	overflow-x: auto;
	margin: 0 0 24px;
	border: 1px solid rgba(10, 10, 10, 0.15);
	background-color: #fff;
}

.mor-post-body table {
	width: 100%;
	border-collapse: collapse;
	text-align: left;
	margin: 0 0 24px;
	font-size: 15px;
	line-height: 26px;
}

.mor-post-body .mor-table-wrap table {
	margin: 0;
	min-width: 560px;
}

/* A bare table (no wrapper) still scrolls sideways on a phone instead of
   breaking the column. */
.mor-post-body > table {
	display: block;
	overflow-x: auto;
	border: 1px solid rgba(10, 10, 10, 0.15);
}

.mor-post-body th,
.mor-post-body td {
	padding: 14px 18px;
	vertical-align: top;
	border-top: 1px solid rgba(10, 10, 10, 0.1);
}

.mor-post-body thead th {
	background-color: var(--color-brand);
	color: #fff;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.2em;
	font-size: 11px;
	line-height: 18px;
	border-top: 0;
}

.mor-post-body tbody th {
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-size: 13px;
	line-height: 20px;
	color: #020618;
}

.mor-post-body tbody tr:nth-child(even) {
	background-color: #faf7f1;
}

.mor-post-body caption {
	caption-side: bottom;
	padding: 8px 0 0;
	font-size: 13px;
	line-height: 20px;
	color: rgba(10, 10, 10, 0.55);
	text-align: left;
}

/* --- Figures: inline SVG charts and images -------------------------------- */

.mor-post-body figure {
	margin: 32px 0;
	padding: 0;
}

.mor-post-body figure svg,
.mor-post-body figure img {
	display: block;
	width: 100%;
	height: auto;
	max-width: 100%;
}

.mor-post-body figure.mor-chart {
	padding: 24px;
	border: 1px solid rgba(10, 10, 10, 0.15);
	background-color: #fff;
}

.mor-post-body figure.mor-chart svg {
	font-family: var(--font-sans);
}

.mor-post-body figcaption {
	margin-top: 12px;
	font-size: 13px;
	line-height: 20px;
	color: rgba(10, 10, 10, 0.55);
}

.mor-post-body figcaption a {
	color: inherit;
}

/* --- Blockquote and callout ---------------------------------------------- */

.mor-post-body blockquote {
	margin: 24px 0;
	padding: 20px 24px;
	border-left: 4px solid var(--color-brand);
	background-color: #faf7f1;
	color: #020618cc;
}

.mor-post-body blockquote p:last-child {
	margin-bottom: 0;
}

.mor-post-body hr {
	border: 0;
	border-top: 1px solid rgba(10, 10, 10, 0.1);
	margin: 40px 0;
}

/* ==========================================================================
   Post index (archive.php): the card grid, built from the values of
   .mor-related-services__card and .mor-related-services__title in main.css.
   main.css has no rules for .mor-blog-index at all, which is why the
   category page today renders as unstyled text.
   ========================================================================== */

.mor-blog-index {
	padding: 48px 0 64px;
}

@media (min-width: 640px) {
	.mor-blog-index {
		padding: 64px 0 96px;
	}
}

.mor-blog-index__posts {
	display: grid;
	grid-template-columns: 1fr;
	gap: 24px;
}

@media (min-width: 768px) {
	.mor-blog-index__posts {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1024px) {
	.mor-blog-index__posts {
		grid-template-columns: repeat(3, 1fr);
	}
}

.mor-blog-index__post {
	display: flex;
	flex-direction: column;
	padding: 24px;
	border: 1px solid #02061826;
	background-color: #fff;
	transition: border-color 200ms, box-shadow 200ms;
}

@media (min-width: 768px) {
	.mor-blog-index__post {
		padding: 32px;
	}
}

.mor-blog-index__post:hover {
	border-color: var(--color-brand);
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.mor-blog-index__post-thumb {
	margin: -24px -24px 20px;
	overflow: hidden;
}

@media (min-width: 768px) {
	.mor-blog-index__post-thumb {
		margin: -32px -32px 24px;
	}
}

.mor-blog-index__post-thumb img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.mor-blog-index__post-title {
	font-family: var(--font-serif);
	font-weight: 400;
	font-size: 24px;
	letter-spacing: 0.025em;
	line-height: 1.15;
	color: var(--color-fg);
	margin-bottom: 8px;
}

@media (min-width: 768px) {
	.mor-blog-index__post-title {
		font-size: 30px;
		line-height: 36px;
	}
}

.mor-blog-index__post-title a:hover {
	color: var(--color-brand);
}

.mor-blog-index__post-meta {
	font-size: 13px;
	line-height: 20px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.2em;
	color: rgba(10, 10, 10, 0.55);
	margin-bottom: 16px;
}

.mor-blog-index__post-excerpt {
	flex: 1 1 auto;
	font-size: 15px;
	line-height: 28px;
	color: rgba(10, 10, 10, 0.65);
	margin-bottom: 24px;
}

.mor-blog-index__post .mor-btn--sm {
	padding: 12px 24px;
	align-self: flex-start;
}

.mor-blog-index__empty {
	font-size: 15px;
	line-height: 28px;
	color: rgba(10, 10, 10, 0.65);
}

.mor-blog-index__pagination {
	margin-top: 48px;
	display: flex;
	justify-content: center;
}

.mor-blog-index__pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.mor-blog-index__pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	padding: 10px 14px;
	border: 1px solid var(--color-brand);
	color: var(--color-brand);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.2em;
	text-transform: uppercase;
}

.mor-blog-index__pagination .page-numbers.current,
.mor-blog-index__pagination .page-numbers:hover {
	background-color: var(--color-brand);
	color: #fff;
}
