/*
Theme Name: YourWeeklyTips
Theme URI: https://yourweeklytips.com/
Description: Block theme for YourWeeklyTips.com. Child theme of Twenty Twenty-Four, styled to match the site's previous Customizr look (header, card grid, single post, footer) with rounded post cards and hero image captions.
Author: YourWeeklyTips.com
Template: twentytwentyfour
Version: 1.3.1
Requires at least: 6.6
Tested up to: 7.1
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: yourweeklytips
*/

/* ---------- Base ---------- */
body {
	-webkit-font-smoothing: antialiased;
}
.ywt-main,
.ywt-header,
.ywt-footer,
.ywt-colophon {
	padding-left: 15px;
	padding-right: 15px;
}
.ywt-main {
	padding-top: 28px;
	padding-bottom: 64px;
}
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

/* ---------- Header ---------- */
.ywt-site-header {
	position: relative;
	z-index: 20;
	background: #fff;
	border-top: 5px solid #568cbf;
	border-bottom: 1px solid rgba(49, 49, 49, 0.09);
	box-shadow: 0 2px 2px rgba(102, 102, 102, 0.08);
}
.ywt-header-row {
	min-height: 96px;
	padding-top: 12px;
	padding-bottom: 12px;
	gap: 24px;
}
.ywt-branding > * {
	margin: 0;
}
.ywt-site-title {
	font-size: 43.2px;
	line-height: 54px;
	font-weight: 400;
	margin: 0;
}
.ywt-site-title a,
.ywt-site-title a:hover {
	color: #313131;
	text-decoration: none;
}
.ywt-tagline {
	margin: 2px 0 0 !important;
	padding-bottom: 4px;
	font-size: 13.5px;
	font-style: italic;
	line-height: normal;
	color: #777;
}
.ywt-header-right {
	gap: 12px;
}
.ywt-nav {
	font-size: 14.25px;
	font-weight: 600;
	letter-spacing: 1px;
	text-transform: uppercase;
	gap: 0;
}
.ywt-nav .wp-block-navigation__container {
	gap: 0;
}
.ywt-nav .wp-block-navigation-item__content {
	display: block;
	padding: 10px 6.25px;
	color: #313131;
	text-decoration: none;
}
.ywt-nav .wp-block-navigation-item__content:hover,
.ywt-nav .current-menu-item > .wp-block-navigation-item__content {
	color: #568cbf;
}
.ywt-nav .wp-block-navigation__responsive-container.is-menu-open {
	padding: 32px 24px;
}
.ywt-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-size: 18px;
	padding: 8px 0;
}
.ywt-search .wp-block-search__button {
	background: transparent;
	color: #313131;
	border: 0;
	padding: 6px;
	margin-left: 0;
}
.ywt-search .wp-block-search__button:hover {
	color: #568cbf;
}
.ywt-search .wp-block-search__button svg {
	width: 22px;
	height: 22px;
	min-width: 22px;
	fill: currentColor;
}
.ywt-search .wp-block-search__input {
	border: 1px solid #e0e0e0;
	border-radius: 3px;
	padding: 6px 10px;
	font-size: 15px;
}
.ywt-search .wp-block-search__inside-wrapper {
	border: 0;
	padding: 0;
}

/* ---------- Breadcrumbs ---------- */
.ywt-breadcrumbs {
	font-size: 14.25px;
	font-weight: 700;
	line-height: 1.55;
	color: #333;
	margin: 0 0 16px;
}
.ywt-breadcrumbs a {
	color: #568cbf;
	text-decoration: none;
}
.ywt-breadcrumbs a:hover {
	text-decoration: underline;
}
.ywt-breadcrumbs .sep {
	color: #777;
	font-weight: 400;
	margin: 0 1px;
}

/* ---------- Post card grid (front page, archives, search) ---------- */
.ywt-grid .wp-block-post-template.ywt-cards {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 40px 30px;
	align-items: stretch;
	margin: 0;
	padding: 0;
}
@media (max-width: 1139px) {
	.ywt-grid .wp-block-post-template.ywt-cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
@media (max-width: 767px) {
	.ywt-grid .wp-block-post-template.ywt-cards {
		grid-template-columns: minmax(0, 1fr);
	}
}
.ywt-cards > li {
	margin: 0;
	display: flex;
}
.ywt-cards > li > .ywt-card {
	flex: 1 1 auto;
}
.ywt-card {
	background: #fff;
	border-bottom: 3px solid #3b6d9d;
	box-shadow: 0 0 6px 2px rgba(0, 0, 0, 0.075);
	border-radius: 8px; /* the one intentional change vs. Customizr */
	overflow: hidden;
	transition: box-shadow 0.2s ease;
}
.ywt-card:hover {
	box-shadow: 0 2px 10px 3px rgba(0, 0, 0, 0.11);
}
.ywt-card > * + * {
	margin-block-start: 0;
}
.ywt-card-image {
	margin: 0;
}
.ywt-card-image img {
	display: block;
	width: 100%;
	aspect-ratio: 350 / 216;
	height: auto;
	object-fit: cover;
	transition: transform 0.4s ease;
}
.ywt-card:hover .ywt-card-image img {
	transform: scale(1.03);
}
.ywt-card-body {
	padding: 16px 33px 22px;
}
.ywt-card-title {
	margin: 0;
	font-size: 21.375px;
	line-height: 1.4;
	/* fixed card height: room for exactly 3 lines, never more */
	height: calc(3 * 1.4em);
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	overflow: hidden;
	font-weight: 400;
	color: #313131;
}
.ywt-card-title a {
	color: #313131;
	text-decoration: none;
}
.ywt-card-title a:hover {
	color: #568cbf;
}
.ywt-load-more-wrap {
	display: flex;
	justify-content: center;
	margin-top: 48px;
}
.ywt-load-more {
	font-family: inherit;
	font-size: 14.25px;
	font-weight: 600;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: #fff;
	background: #568cbf;
	border: 0;
	border-radius: 6px;
	padding: 12px 32px;
	cursor: pointer;
	box-shadow: 0 2px 0 #3b6d9d;
	transition: background 0.2s ease;
}
.ywt-load-more:hover,
.ywt-load-more:focus-visible {
	background: #3b6d9d;
}
.ywt-load-more:focus-visible {
	outline: 2px solid #313131;
	outline-offset: 3px;
}
.ywt-load-more[disabled] {
	opacity: 0.7;
	cursor: wait;
}
.ywt-archive-title {
	margin: 0 0 8px;
	font-size: 37.32px;
}
.ywt-archive-desc {
	color: #777;
	margin-bottom: 28px;
}
.ywt-main--list .ywt-grid {
	margin-top: 0;
}
.ywt-archive-title + .ywt-grid,
.ywt-archive-desc + .ywt-grid {
	margin-top: 28px;
}

/* ---------- Single post / page ---------- */
.ywt-main--single > * {
	margin-block-start: 0;
}
.ywt-hero {
	margin: 0 0 12px;
}
.ywt-hero img {
	display: block;
	border-radius: 8px; /* same rounding as the post cards */
	width: 100%;
	height: 500px;
	object-fit: cover;
}
@media (max-width: 767px) {
	.ywt-hero img {
		height: 260px;
	}
}
.ywt-hero-caption {
	margin: 8px 0 0;
	font-size: 13.5px;
	font-style: italic;
	line-height: 1.45;
	color: #777;
	text-align: left;
	/* always one line; overflow is cut with an ellipsis */
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.ywt-hero .ywt-hero-caption a {
	display: inline;
	height: auto;
	color: #777;
	text-decoration: underline;
}
.ywt-hero .ywt-hero-caption a:hover {
	color: #568cbf;
}

/* Reading column: ~75-80 characters per line at 18px Source Sans Pro */
:root {
	--ywt-measure: 580px;
}
.ywt-main--single > .ywt-cats,
.ywt-main--single > .ywt-entry-title,
.ywt-main--single > .ywt-meta,
.ywt-main--single > .ywt-content,
.ywt-main--single > .ywt-post-nav {
	max-width: var(--ywt-measure);
	margin-left: auto !important;
	margin-right: auto !important;
	box-sizing: border-box;
}
.ywt-main--single > .ywt-content > * {
	max-width: 100%;
}

.ywt-cats {
	margin: 6px 0 4px;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12.5px;
	font-weight: 500;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: #777;
}
.ywt-cats a {
	color: #777;
	text-decoration: none;
}
.ywt-cats a:hover {
	color: #568cbf;
}
.ywt-cats .wp-block-post-terms__separator {
	margin: 0 4px;
}
.ywt-entry-title {
	margin: 0 0 14px;
	font-size: 37.32px;
	line-height: 1.25;
	font-weight: 400;
	color: #303133;
}
.ywt-meta {
	gap: 0 6px;
	margin: 0 0 32px;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12.5px;
	letter-spacing: 1px;
	color: #777;
}
.ywt-meta > * {
	margin: 0;
	font-size: inherit;
	letter-spacing: inherit;
}
.ywt-meta .wp-block-post-author-name,
.ywt-meta .wp-block-post-date {
	color: #555;
}
.ywt-meta a {
	color: inherit;
	text-decoration: none;
}

/* ---------- Article layout: main column + sidebar ---------- */
.ywt-main--article > * {
	margin-block-start: 0;
}
.ywt-single-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	gap: 0 60px;
	align-items: start;
}
.ywt-single-layout > * {
	margin: 0 !important;
}
.ywt-article > * {
	margin-block-start: 0;
}
.ywt-article .ywt-cats {
	margin: 0 0 6px;
}
.ywt-article .ywt-entry-title {
	margin: 0 0 14px;
}
.ywt-lead {
	max-width: 680px;
	margin: 0 0 16px;
	font-size: 21px;
	line-height: 1.5;
	color: #444;
}
.ywt-lead p {
	margin: 0;
}
.ywt-article .ywt-meta {
	margin: 0 0 24px;
}
.ywt-article .ywt-hero {
	margin: 0 0 32px;
}
.ywt-article .ywt-hero img {
	height: auto;
	aspect-ratio: 16 / 9;
}
.ywt-article .ywt-content,
.ywt-article .ywt-post-nav {
	max-width: var(--ywt-measure);
}
.ywt-article .ywt-content > * {
	max-width: 100%;
	margin-left: 0;
	margin-right: 0;
}

/* Sidebar */
.ywt-sidebar {
	padding-left: 30px;
	border-left: 1px solid #e9eaee;
	align-self: stretch;
}
.ywt-sidebar > * + * {
	margin-block-start: 36px;
}
.ywt-ad {
	width: 300px;
	max-width: 100%;
	min-height: 250px;
	margin-left: auto;
	margin-right: auto;
	text-align: center;
}
.ywt-ad::before {
	content: "Advertisement";
	display: block;
	margin-bottom: 4px;
	font-size: 11px;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: #999;
}
.ywt-ad img,
.ywt-ad iframe {
	display: block;
	max-width: 100%;
	height: auto;
	margin: 0 auto;
}
.ywt-sidebar .ywt-widget-title {
	margin: 0 0 16px !important;
}
.ywt-recent-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.ywt-recent-list > li {
	margin: 0;
	padding: 14px 0;
	border-bottom: 1px solid #f0f0f2;
}
.ywt-recent-list > li:first-child {
	padding-top: 0;
}
.ywt-recent-list > li:last-child {
	border-bottom: 0;
}
.ywt-recent-item {
	gap: 14px;
}
.ywt-recent-thumb {
	flex: 0 0 72px;
	width: 72px;
	margin: 0;
	border-radius: 6px;
	overflow: hidden;
}
.ywt-recent-thumb img {
	display: block;
	width: 72px;
	height: 72px;
	object-fit: cover;
	border-radius: 6px;
}
.ywt-recent-text > * {
	margin: 0;
}
.ywt-recent-title {
	font-size: 15px;
	line-height: 1.35;
	font-weight: 600;
	color: #313131;
}
.ywt-recent-title a {
	color: #313131;
	text-decoration: none;
}
.ywt-recent-title a:hover {
	color: #568cbf;
}
.ywt-recent-date {
	margin-top: 4px !important;
	font-size: 12.5px;
	color: #777;
}

@media (max-width: 960px) {
	.ywt-single-layout {
		grid-template-columns: minmax(0, 1fr);
	}
	.ywt-sidebar {
		margin-top: 56px !important;
		padding: 32px 0 0;
		border-left: 0;
		border-top: 1px solid #e9eaee;
	}
}

/* Article content */
.ywt-content {
	font-size: 18px;
	line-height: 1.55;
	color: #444;
}
.ywt-content > * {
	margin-block-start: 0;
	margin-block-end: 16px;
}
.ywt-content h2,
.ywt-content h3,
.ywt-content h4,
.ywt-content h5,
.ywt-content h6 {
	margin-block-start: 46px;
	margin-block-end: 8px;
	color: #303133;
}
.ywt-content h2 {
	font-size: 37.32px;
	line-height: 1.25;
}
.ywt-content h3 {
	font-size: 29.86px;
}
.ywt-content > :first-child {
	margin-block-start: 0;
}
.ywt-content a {
	color: #568cbf;
	text-decoration: underline;
}
.ywt-content a:hover {
	color: #3b6d9d;
}
.ywt-content ul,
.ywt-content ol {
	padding: 8px 0 0 48px;
}
.ywt-content li + li {
	margin-top: 4px;
}
.ywt-content img {
	height: auto;
	max-width: 100%;
}
.ywt-content figcaption {
	color: #777;
	font-size: 13.5px;
	font-style: italic;
}

/* Previous / next */
.ywt-post-nav {
	margin-top: 56px !important;
	padding-top: 24px;
	border-top: 1px solid #e9eaee;
	gap: 16px 32px;
}
.ywt-post-nav.is-layout-flex,
.ywt-post-nav {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 16px 32px;
	align-items: start;
}
.ywt-post-nav > div {
	max-width: none;
	margin: 0;
	font-size: 15px;
	line-height: 1.5;
}
.ywt-post-nav .post-navigation-link-previous {
	grid-column: 1;
	text-align: left;
}
.ywt-post-nav .post-navigation-link-next {
	grid-column: 2;
	text-align: right;
}
@media (max-width: 600px) {
	.ywt-post-nav.is-layout-flex,
	.ywt-post-nav {
		grid-template-columns: minmax(0, 1fr);
	}
	.ywt-post-nav .post-navigation-link-next {
		grid-column: 1;
	}
}
.ywt-post-nav .post-navigation-link__label {
	display: block;
	font-size: 12.5px;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: #777;
}
.ywt-post-nav a {
	color: #313131;
	text-decoration: none;
}
.ywt-post-nav a:hover {
	color: #568cbf;
}

/* ---------- Footer ---------- */
.ywt-site-footer {
	border-top: 1px solid #e9eaee;
	margin-top: 0;
}
.ywt-footer {
	padding-top: 56px;
	padding-bottom: 28px;
}
.ywt-footer .ywt-footer-cols {
	gap: 30px;
	margin: 0;
}
/* Desktop: Categories narrow, Disclaimer close to it, more air before Contact */
@media (min-width: 782px) {
	.ywt-footer .ywt-footer-cols.wp-block-columns {
		display: grid;
		grid-template-columns: 200px minmax(0, 400px) minmax(0, 1fr);
		column-gap: 48px;
	}
	.ywt-footer .ywt-footer-cols > .wp-block-column {
		flex-basis: auto;
		margin: 0;
	}
	.ywt-footer .ywt-footer-cols > .wp-block-column:last-child {
		padding-left: 72px;
	}
}
@media (min-width: 782px) and (max-width: 1023px) {
	.ywt-footer .ywt-footer-cols.wp-block-columns {
		grid-template-columns: 170px minmax(0, 1fr) minmax(0, 0.8fr);
		column-gap: 36px;
	}
	.ywt-footer .ywt-footer-cols > .wp-block-column:last-child {
		padding-left: 24px;
	}
}
.ywt-widget-title {
	margin: 22.5px 0 !important;
	font-size: 18px;
	line-height: 22.5px;
	font-weight: 500;
	color: #303133;
}
.ywt-widget-text {
	font-size: 15px;
	line-height: 23.25px;
	color: #313131;
	margin: 0;
}
.ywt-contact a {
	color: #777;
	text-decoration: none;
}
.ywt-contact a:hover {
	color: #568cbf;
}
.ywt-cat-list {
	list-style: none;
	padding: 0;
	margin: 0;
}
.ywt-cat-list li {
	margin: 0 0 9.375px;
	font-size: 15px;
	line-height: 23.25px;
	letter-spacing: 1px;
	text-transform: uppercase;
}
.ywt-cat-list a {
	color: #777;
	text-decoration: none;
}
.ywt-cat-list a:hover {
	color: #568cbf;
}
.ywt-colophon {
	background: #f7f8f9;
	padding-top: 24px;
	padding-bottom: 24px;
}
.ywt-colophon-row {
	gap: 12px;
}
.ywt-colophon-text > * {
	margin: 0;
}
.ywt-copyright,
.ywt-credits {
	color: #777;
	letter-spacing: 1px;
	line-height: 21px;
}
.ywt-copyright {
	font-size: 13.12px;
}
.ywt-credits {
	font-size: 11.2px;
	margin-top: 8px !important;
}
.ywt-copyright a,
.ywt-credits a {
	color: #777;
	text-decoration: none;
}
.ywt-copyright a:hover,
.ywt-credits a:hover {
	color: #568cbf;
}
.ywt-social {
	margin: 0;
}
.ywt-social .wp-social-link {
	color: #777;
}
.ywt-social .wp-social-link:hover {
	color: #568cbf;
}
.ywt-social .wp-social-link svg {
	width: 20px;
	height: 20px;
}

/* ---------- Small screens ---------- */
@media (max-width: 600px) {
	.ywt-lead {
		font-size: 18.5px;
	}
	.ywt-site-title {
		font-size: 32px;
		line-height: 40px;
	}
	.ywt-header-row {
		min-height: 72px;
	}
	.ywt-tagline {
		display: none;
	}
	.ywt-entry-title,
	.ywt-archive-title,
	.ywt-content h2 {
		font-size: 28px;
	}
	.ywt-content h3 {
		font-size: 24px;
	}
	.ywt-content {
		font-size: 17px;
	}
}
