/*
Theme Name: Tru Blog
Theme URI: https://wordpress.org/themes/twentytwentyfive/
Template: twentytwentyfive
Description: Blog layout for Tru Filtered Air, built as a child theme of Twenty Twenty-Five. Blog home with a featured post and two-column grid, and an article page with a category menu beside the post.
Version: 1.1.0
Requires at least: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tru-blog
*/

/* ------------------------------------------------------------------
   Tokens
   ------------------------------------------------------------------ */
:root {
	--tru-ink: var(--wp--preset--color--accent-1, #224348);
	--tru-text: var(--wp--preset--color--contrast, #1c3132);
	--tru-teal: var(--wp--preset--color--accent-2, #03bdca);
	--tru-meta: var(--wp--preset--color--accent-4, #666666);
	--tru-rule: var(--wp--preset--color--accent-6, #6f6f6f);
	--tru-footer: var(--wp--preset--color--accent-3, #363636);
	--tru-radius: 10px;
	--tru-heading: var(--wp--preset--font-family--anton, Anton, Impact, sans-serif);
	--tru-sans: var(--wp--preset--font-family--inter, Inter, sans-serif);
	--tru-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 12'%3E%3Cpath d='M0 6h18M13 1l5 5-5 5' fill='none' stroke='black' stroke-width='1.6'/%3E%3C/svg%3E");
	--tru-lock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 13'%3E%3Cpath d='M2.5 5.5V3.75a2.5 2.5 0 015 0V5.5' fill='none' stroke='black' stroke-width='1.6'/%3E%3Crect x='0.5' y='5.5' width='9' height='7.5' rx='1' fill='black'/%3E%3C/svg%3E");
}

/* The footer sits directly under the page content. */
.wp-site-blocks > :has(> .tru-footer) {
	margin-block-start: 0;
}

/* Blocks in the main areas sit flush; spacing below is set per element. */
.tru-blog-index > *,
.tru-article > * {
	margin-block-start: 0;
}

/* ------------------------------------------------------------------
   Header
   ------------------------------------------------------------------ */
.tru-header {
	padding-top: 38px;
	padding-bottom: 20px;
}

.tru-header .tru-logo img {
	display: block;
}

.tru-main-nav {
	font-size: 14px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #283233;
}

.tru-main-nav .wp-block-navigation__container {
	gap: 30px;
}

.tru-main-nav .wp-block-navigation-item__content {
	color: inherit;
	text-decoration: none;
}

.tru-main-nav .wp-block-navigation-item__content:hover,
.tru-main-nav .wp-block-navigation-item__content:focus {
	color: var(--tru-teal);
}

.tru-login .wp-block-navigation-item__content::after {
	content: "";
	display: inline-block;
	width: 9px;
	height: 12px;
	margin-left: 9px;
	vertical-align: -1px;
	background-color: currentColor;
	-webkit-mask: var(--tru-lock) no-repeat center / contain;
	mask: var(--tru-lock) no-repeat center / contain;
}

/* ------------------------------------------------------------------
   Shared pieces
   ------------------------------------------------------------------ */
.tru-read-more {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--tru-teal);
	font-size: 16px;
	font-weight: 400;
	letter-spacing: 0.01em;
	text-transform: uppercase;
	text-decoration: none;
}

.tru-read-more::after {
	content: "";
	width: 19px;
	height: 12px;
	background-color: currentColor;
	-webkit-mask: var(--tru-arrow) no-repeat center / contain;
	mask: var(--tru-arrow) no-repeat center / contain;
	transition: transform 0.15s ease;
}

.tru-read-more:hover,
.tru-read-more:focus {
	color: var(--tru-ink);
}

.tru-read-more:hover::after {
	transform: translateX(3px);
}

.wp-block-separator.tru-rule {
	width: 100%;
	max-width: none;
	margin: 0;
	border: 0;
	border-top: 1px solid var(--tru-rule);
	opacity: 1;
	background: none;
}

.tru-card__image,
.tru-mini-card__image,
.tru-article__image {
	margin: 0;
}

.tru-card__image img,
.tru-mini-card__image img,
.tru-article__image img {
	display: block;
	width: 100%;
	height: auto;
	object-fit: cover;
	border-radius: var(--tru-radius);
}

.tru-card__title a,
.tru-mini-card__title a {
	color: inherit;
	text-decoration: none;
}

.tru-card__title a:hover,
.tru-mini-card__title a:hover {
	color: var(--tru-teal);
}

/* ------------------------------------------------------------------
   Blog home / archives
   ------------------------------------------------------------------ */
.tru-blog-index {
	padding-top: 8px;
	padding-bottom: 65px;
}

.tru-page-title {
	margin: 0;
	font-size: 48px;
	line-height: 1.2;
	text-align: center;
}

/* Category row under the title */
.wp-block-categories.tru-cat-row {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px 59px;
	margin: 42px 0 0;
	padding: 0;
	list-style: none;
	font-size: 14px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.tru-cat-row li {
	margin: 0;
}

.tru-cat-row a {
	color: #283233;
	text-decoration: none;
}

.tru-cat-row a:hover,
.tru-cat-row .current-cat > a {
	color: var(--tru-teal);
}

/* Grid */
.tru-posts {
	margin-top: 46px;
}

.wp-block-post-template.tru-post-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 102px 13px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tru-post-grid > li {
	margin: 0;
}

.tru-card__image img {
	aspect-ratio: 602 / 333;
}

.tru-card__body {
	padding-top: 22px;
}

.tru-card__body > * {
	margin-block: 0;
}

.tru-card__cats {
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0;
	text-transform: uppercase;
	color: var(--tru-meta);
}

.tru-card__cats a {
	color: inherit;
	text-decoration: none;
}

.tru-card__cats a:hover {
	color: var(--tru-teal);
}

.tru-card__title {
	max-width: 510px;
	margin-top: 29px !important;
	font-size: 44px;
	line-height: 1.28;
	color: var(--tru-ink);
}

.tru-card__excerpt {
	max-width: 370px;
	margin-top: 29px !important;
	font-size: 19.5px;
	line-height: 1.3;
	color: var(--tru-text);
}

.tru-card__excerpt p {
	margin: 0;
}

.tru-card__body .tru-read-more {
	margin-top: 42px !important;
}

/* Featured post: the first post on the first page */
body:not(.paged) .tru-post-grid > li:first-child {
	grid-column: 1 / -1;
	padding-bottom: 89px;
	margin-bottom: -15px;
	border-bottom: 1px solid var(--tru-rule);
}

body:not(.paged) .tru-post-grid > li:first-child .tru-card {
	display: grid;
	grid-template-columns: 704fr 463fr;
	column-gap: 49px;
	align-items: center;
}

/* A featured post without an image just shows its text. */
body:not(.paged) .tru-post-grid > li:first-child .tru-card:not(:has(.tru-card__image)) {
	display: block;
}

body:not(.paged) .tru-post-grid > li:first-child .tru-card__image img {
	aspect-ratio: 704 / 471;
}

body:not(.paged) .tru-post-grid > li:first-child .tru-card__body {
	padding-top: 0;
}

body:not(.paged) .tru-post-grid > li:first-child .tru-card__title {
	max-width: 420px;
	margin-top: 29px !important;
}

body:not(.paged) .tru-post-grid > li:first-child .tru-card__excerpt {
	margin-top: 21px !important;
}

body:not(.paged) .tru-post-grid > li:first-child .tru-read-more {
	margin-top: 43px !important;
}

/* Pagination */
.tru-pagination {
	gap: 10px;
	margin-top: 100px;
	font-size: 16px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.tru-pagination a,
.tru-pagination span {
	color: var(--tru-ink);
	text-decoration: none;
}

.tru-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 6px;
	border-radius: 20px;
}

.tru-pagination .page-numbers.current {
	background: var(--tru-ink);
	color: #fff;
}

.tru-pagination a:hover {
	color: var(--tru-teal);
}

.tru-pagination .wp-block-query-pagination-previous,
.tru-pagination .wp-block-query-pagination-next {
	color: var(--tru-teal);
}

/* ------------------------------------------------------------------
   Article page
   ------------------------------------------------------------------ */
.tru-article {
	padding-top: 68px;
	padding-bottom: 65px;
}

.tru-article__image img {
	aspect-ratio: 16 / 9;
}

.tru-article__grid {
	display: grid;
	grid-template-columns: 307px minmax(0, 1fr);
	margin-top: 71px !important;
}

.tru-article__grid > * {
	margin: 0;
}

/* Category menu in the left column */
.wp-block-categories.tru-cat-menu {
	max-width: 160px;
	margin: -6px 0 0;
	padding: 0;
	list-style: none;
	font-size: 13px;
	line-height: 27px;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.tru-cat-menu li {
	margin: 0;
}

.tru-cat-menu a {
	color: #283233;
	text-decoration: none;
}

.tru-cat-menu a:hover,
.tru-cat-menu .current-cat > a {
	color: var(--tru-teal);
}

.tru-article__main > * {
	margin-block: 0;
}

.tru-article__cats {
	padding-top: 2px;
	font-size: 13px;
	font-weight: 400;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.tru-article__cats a {
	color: #283233;
	text-decoration: none;
}

.tru-article__cats a:hover {
	color: var(--tru-teal);
}

.tru-article__title {
	margin-top: 20px !important;
	font-size: 44px;
	line-height: 1.28;
	color: var(--tru-ink);
}

.tru-article__date {
	margin-top: 29px !important;
	font-size: 13px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #283233;
}

.tru-article__main > .tru-rule {
	margin-top: 40px !important;
}

.tru-article__content {
	margin-top: 56px !important;
	font-size: 19.5px;
	line-height: 1.28;
	color: var(--tru-text);
}

.tru-article__content > * {
	margin-block: 0 26px;
}

.tru-article__content > :last-child {
	margin-bottom: 0;
}

.tru-article__content h2,
.tru-article__content h3,
.tru-article__content h4 {
	margin-top: 45px;
	margin-bottom: 20px;
}

/* Heading, quote and pullquote sizes come from theme.json, so they can be
   changed in Appearance > Editor > Styles without editing this file. */

.tru-article__content .wp-block-pullquote p {
	margin: 0;
}

.tru-article__content a {
	color: var(--tru-ink);
	text-decoration: underline;
	text-decoration-color: var(--tru-teal);
	text-underline-offset: 3px;
}

.tru-article__content a:hover {
	color: var(--tru-teal);
}

.tru-article__content img {
	border-radius: var(--tru-radius);
}

/* Related posts */
.tru-related {
	margin-top: 88px !important;
}

.tru-related > * {
	margin-block: 0;
}

.tru-related__heading {
	font-size: 48px;
	line-height: 1.1;
	color: var(--tru-ink);
}

.tru-related > .tru-rule {
	margin-top: 26px !important;
}

.tru-related-query {
	margin-top: 44px !important;
}

.wp-block-post-template.tru-related-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 48px 13px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tru-related-grid > li {
	margin: 0;
}

.tru-mini-card > * {
	margin-block: 0;
}

.tru-mini-card__image img {
	aspect-ratio: 3 / 2;
}

.tru-mini-card__title {
	margin-top: 25px !important;
	font-family: var(--tru-sans);
	font-size: 26px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.005em;
	text-transform: none;
	color: var(--tru-ink);
}

.tru-mini-card .tru-read-more {
	margin-top: 14px !important;
}

/* ------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------ */
.tru-footer {
	color: #fff;
}

.tru-footer > * {
	margin-block: 0;
}

.tru-footer a {
	color: inherit;
	text-decoration: none;
}

.tru-footer a:hover {
	color: var(--tru-teal);
}

.tru-footer__main {
	background: var(--tru-footer);
	padding-top: 54px;
	padding-bottom: 74px;
}

.tru-footer__cols {
	display: grid;
	grid-template-columns: 242px 210px 262px minmax(0, 1fr);
}

.tru-footer__col > * {
	margin-block: 0;
}

.tru-footer__links,
.tru-footer__social,
.tru-footer__signup {
	margin-top: 13px;
}

.tru-footer__signup {
	margin-top: 15px;
}

.tru-footer__logo img {
	display: block;
	/* Turns the dark logo white. Replace with a white logo file if you prefer. */
	filter: brightness(0) invert(1);
}

/* Footer menu: first item is the larger "ORDER NOW" */
.tru-footer-nav .wp-block-navigation__container {
	gap: 0;
}

.tru-footer-nav .wp-block-navigation-item {
	font-size: 12px;
	line-height: 22px;
	letter-spacing: 0.1em;
	color: #ececec;
}

.tru-footer-nav .wp-block-navigation-item:first-child {
	margin-bottom: 0;
	font-size: 16px;
	line-height: 22px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #fff;
}

.tru-footer__label {
	font-size: 16px;
	line-height: 22px;
	letter-spacing: 0.04em;
	color: #fff;
}

.tru-footer__chat {
	margin-top: 26px !important;
	text-transform: uppercase;
	letter-spacing: 0.1em;
}

.tru-footer__phone {
	margin-top: 4px !important;
	font-size: 12px;
	letter-spacing: 0.12em;
}

.tru-footer__phone a {
	color: var(--tru-teal);
}

.tru-footer__phone a:hover {
	color: #fff;
}

.wp-block-social-links.tru-social {
	gap: 18px;
	margin-top: 10px !important;
	padding-left: 6px;
}

.wp-block-social-links.tru-social .wp-social-link {
	margin: 0;
}

.wp-block-social-links.tru-social .wp-block-social-link-anchor {
	padding: 0;
}

.wp-block-social-links.tru-social .wp-block-social-link-anchor svg {
	width: 13px;
	height: 13px;
}

/* Newsletter sign-up */
.tru-signup {
	display: flex;
	width: 222px;
	max-width: 100%;
}

.tru-signup input {
	flex: 1;
	min-width: 0;
	height: 23px;
	padding: 0 7px;
	border: 0;
	border-radius: 0;
	background: #fff;
	font-family: var(--tru-sans);
	font-size: 9px;
	color: #333;
}

.tru-signup input::placeholder {
	color: #777;
}

.tru-signup button {
	width: 40px;
	height: 23px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: var(--tru-teal);
	font-family: var(--tru-heading);
	font-size: 12px;
	line-height: 23px;
	color: #fff;
	cursor: pointer;
}

.tru-signup button span {
	font-family: var(--tru-sans);
	font-size: 14px;
}

.tru-signup button:hover {
	background: var(--tru-ink);
}

/* Bottom bar */
.tru-footer__bar {
	background: var(--wp--preset--color--black, #000);
	padding-top: 15px;
	padding-bottom: 15px;
	font-size: 9px;
	font-weight: 500;
	line-height: 15px;
}

.tru-footer__legal {
	margin-right: 27px !important;
}

.tru-footer__legal span {
	padding: 0 5px;
}

.tru-footer__bar p {
	margin: 0;
}

/* ------------------------------------------------------------------
   Tablet
   ------------------------------------------------------------------ */
@media (max-width: 1100px) {
	.tru-card__title,
	.tru-article__title,
	.tru-page-title {
		font-size: 44px;
	}

	.tru-related__heading {
		font-size: 48px;
	}

	.tru-article__grid {
		grid-template-columns: 220px minmax(0, 1fr);
	}

	.tru-footer__cols {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 40px 24px;
	}
}

/* ------------------------------------------------------------------
   Phone
   ------------------------------------------------------------------ */
@media (max-width: 781px) {
	.tru-header {
		padding-top: 24px;
	}

	.tru-header .tru-logo img {
		width: 130px;
	}

	.tru-card__title,
	.tru-article__title,
	.tru-page-title,
	.tru-related__heading {
		font-size: 36px;
	}

	.wp-block-post-template.tru-post-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 64px;
	}

	body:not(.paged) .tru-post-grid > li:first-child {
		padding-bottom: 64px;
		margin-bottom: 0;
	}

	body:not(.paged) .tru-post-grid > li:first-child .tru-card {
		display: block;
	}

	body:not(.paged) .tru-post-grid > li:first-child .tru-card__body {
		padding-top: 30px;
	}

	.tru-card__body {
		padding-top: 30px;
	}

	.tru-card__title {
		margin-top: 20px !important;
	}

	.tru-card__excerpt {
		margin-top: 20px !important;
	}

	.tru-card__body .tru-read-more {
		margin-top: 24px !important;
	}

	.tru-article {
		padding-top: 32px;
	}

	.tru-article__grid {
		display: flex;
		flex-direction: column;
		margin-top: 40px !important;
	}

	/* On phones the category menu moves below the article. */
	.tru-article__aside {
		order: 2;
		margin-top: 56px !important;
		padding-top: 24px;
		border-top: 1px solid var(--tru-rule);
	}

	.tru-article__content {
		font-size: 18px;
	}

	.wp-block-post-template.tru-related-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.tru-related {
		margin-top: 64px !important;
	}

	.tru-footer__cols {
		grid-template-columns: minmax(0, 1fr);
	}

	.tru-footer__bar .wp-block-group {
		flex-direction: column;
		align-items: flex-start;
		gap: 4px;
	}
}

/* Long category names may wrap instead of overflowing on small screens. */
.tru-card__cats a,
.tru-article__cats a {
	white-space: normal;
}
