/*
 * Blog archives, single posts and workshops, workshop page, search and 404.
 * Mobile first: base styles are the smallest screen, min-width queries add the larger ones.
 */

.sm-blog,
.sm-404 {
	--sm-heading-pink: #f27790;
	--sm-script: "SM Allura", cursive;
	width: var(--sm-container);
	margin: 0 auto;
	padding: 16px 0 56px;
}

@media (min-width: 768px) {
	.sm-blog,
	.sm-404 {
		padding-top: 30px;
		padding-bottom: 80px;
	}
}

/* Headings ---------------------------------------------------------------- */

.sm-ribbon-title,
.sm-prose .back-pro {
	margin: 0 0 24px;
	background: url(../images/blog/promo-ribbon.png) center / contain no-repeat;
	color: #fff;
	font-size: 20px;
	font-weight: 300;
	line-height: 36px;
	text-align: center;
}

.sm-prose .back-pro p {
	margin: 0;
	color: #fff;
	font-size: inherit;
	font-weight: inherit;
}

.sm-blog__title {
	margin: 0 0 24px;
	font-size: 24px;
	line-height: 1.3;
	text-align: center;
}

.sm-blog__empty {
	text-align: center;
}

@media (min-width: 768px) {
	.sm-ribbon-title,
	.sm-prose .back-pro {
		margin-bottom: 30px;
		font-size: 30px;
		line-height: 52px;
	}
}

/* Post cards -------------------------------------------------------------- */

.sm-card-list {
	display: grid;
	gap: 40px;
	align-items: start;
}

.sm-card__media {
	display: block;
	overflow: hidden;
}

.sm-card__media img {
	display: block;
	width: 100%;
	height: auto;
	transition: transform 300ms;
}

.sm-card:hover .sm-card__media img {
	transform: scale(1.1);
}

.sm-card__title {
	margin: 18px 0 0;
	font-size: 18px;
	line-height: 1.4;
	text-transform: uppercase;
}

.sm-card__title a {
	color: #222;
	text-decoration: none;
}

.sm-card__title a:hover {
	color: var(--sm-ink);
}

.sm-card__date {
	display: block;
	margin-top: 22px;
	padding-bottom: 10px;
	border-bottom: 1px dashed #ddd;
	color: #acacac;
	font-size: 12px;
}

.sm-card__excerpt {
	margin-top: 10px;
	font-size: 14px;
	line-height: 1.8;
}

.sm-card__excerpt p {
	margin: 0;
}

@media (min-width: 768px) {
	.sm-card-list {
		grid-template-columns: repeat(2, 1fr);
		column-gap: 32px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sm-card__media img {
		transition: none;
	}

	.sm-card:hover .sm-card__media img {
		transform: none;
	}
}

/* Pager ------------------------------------------------------------------- */

.sm-pager {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	margin-top: 48px;
}

.sm-pager .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: #eddad3;
	box-shadow: 0 0 0 3px #f7eeeb;
	color: #fff;
	font-size: 14px;
	line-height: 1;
	text-decoration: none;
}

.sm-pager a.page-numbers:hover,
.sm-pager .page-numbers.current {
	background: #d5bdb4;
}

.sm-pager .page-numbers.dots {
	background: none;
	box-shadow: none;
	color: var(--sm-text);
}

.sm-pager .page-numbers:focus-visible {
	outline: 2px solid var(--sm-pink);
	outline-offset: 4px;
}

/* The workshop list's pager was a plain row of numbers on the old site. */
.sm-workshops ~ .sm-pager {
	gap: 6px;
}

.sm-workshops ~ .sm-pager .page-numbers {
	width: auto;
	height: auto;
	min-width: 12px;
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: var(--sm-text);
	font-size: 12px;
}

.sm-workshops ~ .sm-pager a.page-numbers:hover,
.sm-workshops ~ .sm-pager .page-numbers.current {
	background: none;
	color: var(--sm-pink);
}

/* Single post and workshop ------------------------------------------------ */

.sm-post__title {
	margin: 0 0 16px;
	color: var(--sm-heading-pink);
	font-size: 20px;
	line-height: 1.4;
}

.sm-post__title--plain {
	margin-bottom: 24px;
	color: var(--sm-text);
	font-size: 24px;
	text-transform: uppercase;
}

@media (min-width: 768px) {
	.sm-post__title--plain {
		font-size: 30px;
	}
}

.sm-prose {
	overflow-wrap: break-word;
}

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

.sm-prose p,
.sm-prose ul,
.sm-prose ol,
.sm-prose figure {
	margin: 0 0 1em;
}

.sm-prose img,
.sm-prose iframe,
.sm-prose video {
	max-width: 100%;
}

.sm-prose img {
	height: auto;
}

.sm-prose .alignleft {
	float: left;
	margin: 0 1em 1em 0;
}

.sm-prose .alignright {
	float: right;
	margin: 0 0 1em 1em;
}

.sm-prose .aligncenter {
	display: block;
	margin-inline: auto;
}

.sm-prose figcaption,
.sm-prose .wp-caption-text {
	font-size: 12px;
}

.sm-prose::after {
	content: "";
	display: table;
	clear: both;
}

/* Order details: the dashed rule, the pink wash behind them. */
.sm-contact-box {
	position: relative;
	margin-top: 32px;
	padding: 40px 0 24px;
	border-top: 1px dashed #ddd;
}

.sm-contact-box::before {
	content: "";
	position: absolute;
	inset: 8px auto 0 -16px;
	width: min(1125px, 100%);
	background: url(../images/blog/contact-wash.png) left bottom / contain no-repeat;
	opacity: 0.35;
	pointer-events: none;
}

.sm-contact-box > * {
	position: relative;
}

.sm-contact-box__title {
	margin: 0 0 4px;
	color: #f5a6b1;
	font-size: 14px;
	font-weight: 500;
}

.sm-contact-box p {
	margin: 0 0 6px;
	font-size: 14px;
	overflow-wrap: anywhere;
}

.sm-contact-box a {
	color: inherit;
	text-decoration: none;
}

/* Workshop page ----------------------------------------------------------- */

.sm-prose--centered {
	text-align: center;
}

.sm-prose #foll-txt {
	margin: 0;
	font-family: var(--sm-script);
	font-size: 56px;
	line-height: 1.2;
}

@media (min-width: 768px) {
	.sm-prose #foll-txt {
		font-size: 80px;
	}
}

.sm-workshops {
	padding-inline: 15px; /* the old list sat in a container inside the container (6px on tablets, where its columns were wider) */
	display: grid;
	gap: 56px;
	margin-top: 40px;
}

.sm-workshop {
	display: grid;
	gap: 24px;
}

.sm-workshop__media-col {
	max-width: 540px;
}

.sm-workshop__media {
	position: relative;
	display: block;
	overflow: hidden;
}

.sm-workshop__media img {
	display: block;
	width: 100%;
	height: auto;
	transition: transform 300ms ease-in-out;
}

.sm-workshop__media:hover img {
	transform: scale(1.1);
}

.sm-workshop__media.is-past::after {
	content: "";
	position: absolute;
	top: -30px;
	left: -30px;
	width: 175px;
	height: 150px;
	background: url(../images/blog/timeout.png) 0 5px / 180px no-repeat;
}

.sm-workshop__buttons {
	display: flex;
	gap: 8px;
	margin-top: 8px;
}

.sm-workshop__button {
	display: flex;
	flex: 1;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	background: #e2d9d2;
	color: #fff;
	font-size: 16px;
	text-decoration: none;
	transition: background-color var(--sm-transition);
}

.sm-workshop__button--register {
	background: #f5a6b1;
}

/*
 * A past workshop has only the "more pictures" link. The old template never gave that link its button class (an unset variable),
 * so the live site showed a plain bold link; only upcoming workshops had buttons.
 */
.sm-workshop__buttons--past .sm-workshop__button {
	flex: none;
	justify-content: flex-start;
	min-height: 0;
	background: none;
	color: #000;
	font-size: 12px;
	font-weight: 500;
}

.sm-workshop__buttons--past .sm-workshop__button:hover {
	background: none;
	color: var(--sm-pink);
}

.sm-workshop__button:hover {
	background: var(--sm-icon-hover);
	color: #fff;
}

.sm-workshop__button:focus-visible {
	outline: 2px solid var(--sm-pink);
	outline-offset: 2px;
}

.sm-workshop__title {
	margin: 0 0 16px;
	padding-bottom: 16px;
	border-bottom: 1px dashed #ecd9dd;
	color: var(--sm-heading-pink);
	font-size: 22px;
	line-height: 1.4;
}

.sm-workshop__details {
	margin: 0 0 16px;
	padding: 0;
	list-style: none;
}

.sm-workshop__details li {
	display: flex;
	padding-bottom: 5px;
	color: var(--sm-heading-pink);
	font-size: 16px;
}

.sm-workshop__label {
	flex: 0 0 100px;
}

.sm-workshop__value {
	color: var(--sm-text);
}

.sm-workshop__value::before {
	content: ":";
	margin-right: 15px;
	color: var(--sm-heading-pink);
}

.sm-workshop__excerpt p {
	margin: 0;
	font-size: 14px;
}

@media (min-width: 768px) {
	.sm-workshops {
		padding-inline: 6px;
	}

	.sm-workshop {
		grid-template-columns: 1fr 1fr;
		column-gap: 30px;
	}

	.sm-workshop__title {
		font-size: 24px;
	}

	.sm-workshop__media.is-past::after {
		top: -40px;
		left: -40px;
		width: 235px;
		height: 200px;
		background-position: -15px 0;
		background-size: auto;
	}
}

@media (min-width: 992px) {
	.sm-workshops {
		padding-inline: 15px;
	}

	.sm-workshop {
		column-gap: 45px;
	}
}

/* Search form and 404 ----------------------------------------------------- */

.sm-search-form {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 16px;
	margin: 0 0 24px;
}

.sm-search-form__field {
	width: min(270px, 100%);
	height: 40px;
	padding: 0 12px;
	border: 1px solid #e1e1e1;
	background: var(--sm-surface);
	color: var(--sm-text);
	font: inherit;
}

.sm-search-form__submit,
.sm-button {
	display: inline-block;
	height: 40px;
	padding: 0 28px;
	border: 0;
	background: #222;
	color: #fff;
	font: inherit;
	font-size: 14px;
	line-height: 40px;
	text-decoration: none;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color var(--sm-transition);
}

.sm-search-form__submit {
	padding: 0 28px;
	font-size: 13px;
}

.sm-button {
	letter-spacing: 2px;
}

.sm-search-form__submit:hover,
.sm-button:hover {
	background: var(--sm-ink);
	color: #fff;
}

.sm-search-form__field:focus-visible,
.sm-search-form__submit:focus-visible,
.sm-button:focus-visible {
	outline: 2px solid var(--sm-pink);
	outline-offset: 2px;
}

.sm-404 {
	padding-top: 40px;
	text-align: center;
}

.sm-404__code,
.sm-404__title {
	margin: 0;
	color: var(--sm-text);
	font-family: var(--sm-script);
	font-weight: 400;
	line-height: 1.1;
}

.sm-404__code {
	font-size: 56px;
}

.sm-404__title {
	font-size: 28px;
}

.sm-404__title::after {
	content: "";
	display: block;
	width: 50px;
	height: 3px;
	margin: 20px auto 24px;
	background: #e5e5e5;
}

.sm-404__text {
	margin: 0 0 32px;
	font-size: 15px;
}

@media (min-width: 768px) {
	.sm-404 {
		padding-top: 80px;
	}

	.sm-404__code {
		font-size: 70px;
	}

	.sm-404__title {
		font-size: 36px;
	}
}
