/*
 * Mato Blogi
 * Matches the Elementor pages: Roboto, brand red #B11D23, black text on the grey
 * site background, white rounded cards with a soft shadow (as on the front page).
 */
:root {
	--mato-red: #B11D23;
	--mato-red-hover: #DA291C;
	--mato-grey-text: #545454;
	--mato-radius: 10px;
	--mato-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
	--mato-shadow-hover: 0 12px 26px rgba(0, 0, 0, 0.16);
}

.mato-blogi {
	font-family: Roboto, "Helvetica Neue", Arial, sans-serif;
	color: #000;
	padding: 80px 0 90px;
}
.mato-blogi h1, .mato-blogi h2, .mato-blogi h3, .mato-blogi h4 {
	font-family: Roboto, "Helvetica Neue", Arial, sans-serif;
}
.mato-blogi__inner {
	max-width: 1120px;
	margin: 0 auto;
	padding: 0 10px;
	box-sizing: border-box;
}

/* Page head */
.mato-blogi__head { margin-bottom: 48px; }
.mato-blogi__eyebrow {
	margin: 0 0 14px;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.mato-blogi__eyebrow a { color: var(--mato-red); text-decoration: none; }
.mato-blogi__eyebrow a:hover { text-decoration: underline; }
.mato-blogi__title {
	margin: 0;
	font-size: 59px;
	line-height: 1.05;
	font-weight: 700;
	letter-spacing: -0.0415625em;
	color: var(--mato-red);
}
.mato-blogi__intro {
	max-width: 820px;
	margin: 24px 0 0;
	font-size: 21px;
	line-height: 1.5;
}
.mato-blogi__intro p { margin: 0 0 1em; }
.mato-blogi__intro p:last-child { margin-bottom: 0; }
.mato-blogi__empty { font-size: 18px; }

/* Cards */
.mato-cards {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 30px;
	margin: 0;
}
.mato-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: var(--mato-radius);
	box-shadow: var(--mato-shadow);
	overflow: hidden;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.mato-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--mato-shadow-hover);
}
.mato-card__media {
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: #eee;
}
.mato-card__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.mato-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 26px 28px 28px;
}
.mato-card__meta,
.mato-post__meta {
	margin: 0 0 10px;
	font-size: 15px;
	font-weight: 500;
	color: var(--mato-grey-text);
}
.mato-card__meta a,
.mato-post__meta a { color: var(--mato-grey-text); text-decoration: none; }
.mato-card__meta a:hover,
.mato-post__meta a:hover { color: var(--mato-red); }
.mato-meta__sep { margin: 0 8px; }
.mato-card__title {
	margin: 0 0 12px;
	font-size: 23px;
	line-height: 1.25;
	font-weight: 700;
	letter-spacing: -0.02em;
}
.mato-card__title a { color: #000; text-decoration: none; }
.mato-card__title a:hover,
.mato-card__title a:focus { color: var(--mato-red); }
.mato-card__excerpt {
	margin: 0 0 20px;
	font-size: 16px;
	line-height: 1.55;
	color: #222;
}
.mato-card__more {
	margin-top: auto;
	align-self: flex-start;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--mato-red);
	text-decoration: none;
	border-bottom: 2px solid transparent;
}
.mato-card__more:hover { border-bottom-color: var(--mato-red); }

/* Pagination */
.mato-pagination { margin: 50px 0 0; }
.mato-pagination ul.page-numbers {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-start;
	gap: 8px;
}
.mato-pagination li { margin: 0; }
.mato-pagination li > .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 46px;
	height: 46px;
	padding: 0 14px;
	box-sizing: border-box;
	font-size: 16px;
	font-weight: 700;
	color: var(--mato-red);
	background: #fff;
	border: 2px solid var(--mato-red);
	text-decoration: none;
}
.mato-pagination li > a.page-numbers:hover {
	background: var(--mato-red-hover);
	border-color: var(--mato-red-hover);
	color: #fff;
}
.mato-pagination li > .page-numbers.current { background: var(--mato-red); color: #fff; }
.mato-pagination li > .page-numbers.dots {
	background: transparent;
	border-color: transparent;
	color: var(--mato-grey-text);
}

/* Single post */
.mato-post__head { margin-bottom: 34px; }
.mato-post__meta { margin: 18px 0 0; }
.mato-post__hero { margin: 0 0 44px; }
.mato-post__hero-img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--mato-radius);
	box-shadow: var(--mato-shadow);
}
.mato-post__content {
	max-width: 820px;
	font-size: 18px;
	line-height: 1.65;
	color: #000;
}
.mato-post__content::after { content: ""; display: table; clear: both; }
.mato-post__content > * { margin: 0 0 1.25em; }
.mato-post__content > *:last-child { margin-bottom: 0; }
.mato-post__content h2 {
	margin: 1.6em 0 0.6em;
	font-size: 32px;
	line-height: 1.2;
	font-weight: 700;
	letter-spacing: -0.03em;
}
.mato-post__content h3 {
	margin: 1.5em 0 0.5em;
	font-size: 25px;
	line-height: 1.25;
	font-weight: 700;
}
.mato-post__content h4 {
	margin: 1.4em 0 0.5em;
	font-size: 21px;
	font-weight: 700;
}
.mato-post__content > h2:first-child,
.mato-post__content > h3:first-child { margin-top: 0; }
.mato-post__content a {
	color: var(--mato-red);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}
.mato-post__content a:hover { color: var(--mato-red-hover); }
.mato-post__content ul,
.mato-post__content ol { margin: 0 0 1.25em; padding: 0 0 0 1.4em; }
.mato-post__content li { margin: 0 0 0.4em; }
.mato-post__content li > ul,
.mato-post__content li > ol { margin: 0.4em 0 0; }
.mato-post__content img { max-width: 100%; height: auto; border-radius: var(--mato-radius); }
.mato-post__content figure { margin: 1.6em 0; }
.mato-post__content .wp-caption { max-width: 100%; }
.mato-post__content figcaption,
.mato-post__content .wp-caption-text {
	margin-top: 8px;
	font-size: 14px;
	color: var(--mato-grey-text);
}
.mato-post__content blockquote {
	margin: 1.6em 0;
	padding: 8px 0 8px 24px;
	border-left: 4px solid var(--mato-red);
	font-size: 21px;
	line-height: 1.5;
	font-weight: 500;
	font-style: normal;
	color: #000;
}
.mato-post__content blockquote p:last-child { margin-bottom: 0; }
.mato-post__content table {
	width: 100%;
	border-collapse: collapse;
	font-size: 16px;
}
.mato-post__content th,
.mato-post__content td {
	padding: 10px 12px;
	border: 1px solid #bbb;
	background: #fff;
	text-align: left;
}
.mato-post__content th { background: #f2f2f2; font-weight: 700; }
.mato-post__content .alignleft { float: left; margin: 0.4em 1.6em 1em 0; }
.mato-post__content .alignright { float: right; margin: 0.4em 0 1em 1.6em; }
.mato-post__content .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.mato-post__content iframe,
.mato-post__content video { max-width: 100%; }
.mato-post__content .wp-block-embed iframe { width: 100%; }
.mato-post__content hr { border: 0; border-top: 2px solid #b8b8b8; margin: 2em 0; }
.mato-post__pages { margin-top: 20px; font-weight: 700; }

/* Related posts */
.mato-related { margin-top: 80px; }
.mato-related__title {
	margin: 0 0 30px;
	font-size: 39px;
	line-height: 1.15;
	font-weight: 700;
	letter-spacing: -0.0415625em;
	color: var(--mato-red);
}

/* CTA box with a button to /kusi-pakkumist (blog pages and the [mato_cta] shortcode) */
.mato-cta { margin-top: 80px; }
.mato-cta__box {
	background: #fff;
	border-radius: var(--mato-radius);
	box-shadow: var(--mato-shadow);
	padding: 40px 44px 42px;
	font-family: Roboto, "Helvetica Neue", Arial, sans-serif;
	color: #000;
}
.mato-cta__box .mato-cta__title {
	margin: 0 0 12px;
	font-family: Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 34px;
	line-height: 1.15;
	font-weight: 700;
	letter-spacing: -0.03em;
	color: var(--mato-red);
}
.mato-cta__box .mato-cta__text { margin: 0 0 24px; font-size: 18px; line-height: 1.55; max-width: 720px; }
.mato-cta__box .mato-cta__actions { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.mato-cta__alt { font-size: 16px; color: var(--mato-grey-text); }
.mato-cta__alt a { color: var(--mato-red); text-decoration: none; font-weight: 700; white-space: nowrap; }
.mato-cta__alt a:hover { text-decoration: underline; }
.mato-btn,
.mato-post__content a.mato-btn {
	display: inline-block;
	padding: 16px 26px;
	background: var(--mato-red);
	color: #fff;
	font-family: Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none;
	line-height: 1.2;
	border: 0;
	transition: background-color 0.15s ease;
}
.mato-btn:hover, .mato-btn:focus,
.mato-post__content a.mato-btn:hover { background: var(--mato-red-hover); color: #fff; text-decoration: none; }
.mato-post__content .mato-cta__box { margin: 2em 0; }
.mato-post__content .mato-cta__box p { margin-bottom: 0; }
.mato-post__content .mato-cta__box .mato-cta__text { margin-bottom: 24px; }
.mato-post__content .mato-cta__box .mato-cta__title { margin-top: 0; }

/* Responsive */
@media (max-width: 1024px) {
	.mato-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
}
@media (max-width: 700px) {
	.mato-blogi { padding: 50px 0 70px; }
	.mato-blogi__title { font-size: 44px; }
	.mato-blogi__intro { font-size: 19px; }
	.mato-cards { grid-template-columns: minmax(0, 1fr); gap: 20px; }
	.mato-card__body { padding: 22px 22px 24px; }
	.mato-related__title { font-size: 30px; }
	.mato-cta__box { padding: 28px 22px 30px; }
	.mato-cta__box .mato-cta__title { font-size: 27px; }
	.mato-related, .mato-cta { margin-top: 60px; }
	.mato-post__content { font-size: 17px; }
	.mato-post__content h2 { font-size: 27px; }
	.mato-post__content h3 { font-size: 22px; }
	.mato-post__content blockquote { font-size: 19px; }
}
