/*
Theme Name: YourBrandUS.ai Blog
Theme URI: https://yourbrandus.ai/blogs/
Author: YourBrandUS.ai
Description: Blog theme for YourBrandUS.ai with the yourbrandus.ai header and footer. One clean blog page (with category and search pages), one clean post page and a footer newsletter sign-up. Brand colors can be changed in Appearance > Customize > YourBrandUS.ai Brand.
Version: 1.2.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: yourbrandus-blog
*/

/* Brand colors from the YourBrandUS.ai logo. Change them in Appearance > Customize > YourBrandUS.ai Brand (these are only fallbacks). */
:root {
	--yb-navy: #21458F;
	--yb-sky: #00ADEF;
	--yb-ink: #0B0B0F;
	--yb-sky-text: #0077A8; /* sky blue dark enough to read on white */
	--yb-btn: color-mix(in srgb, var(--yb-sky) 55%, var(--yb-navy)); /* deeper sky blue so white button text stays readable */
	--yb-silver: #C0C6CF;
	--yb-cloud: #F4F7FB;
	--yb-text: #1D2433;
	--yb-muted: #5B6476;
	--yb-line: #E1E6EF;
	--yb-white: #FFFFFF;
	--yb-head: "Manrope", "Segoe UI", Arial, sans-serif;
	--yb-body: "Inter", "Segoe UI", Arial, sans-serif;
	--yb-radius: 18px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--yb-white);
	color: var(--yb-text);
	font-family: var(--yb-body);
	font-size: 16px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--yb-sky-text); }
:focus-visible { outline: 3px solid var(--yb-sky); outline-offset: 3px; }

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}
.screen-reader-text:focus,
.skip-link:focus {
	background: #fff;
	color: #000;
	clip: auto;
	clip-path: none;
	height: auto;
	width: auto;
	left: 8px;
	top: 8px;
	padding: 12px 18px;
	z-index: 100000;
}

/* ---------- Buttons ---------- */
.yb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 28px;
	border: 0;
	border-radius: 999px;
	background: var(--yb-btn);
	color: #fff;
	font-family: var(--yb-head);
	font-weight: 700;
	font-size: 0.95rem;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.2s ease;
}
.yb-btn:hover,
.yb-main a.yb-btn:hover { background: var(--yb-navy); color: #fff; }
.yb-main a.yb-btn { color: #fff; }

/* ---------- Header ---------- */
.yb-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--yb-white);
	border-bottom: 1px solid var(--yb-line);
}
.admin-bar .yb-header { top: 32px; }
.yb-header__inner {
	display: flex;
	align-items: center;
	gap: 32px;
	max-width: 1240px;
	min-height: 88px;
	margin: 0 auto;
	padding: 10px 24px;
}
.yb-logo { display: inline-flex; flex-shrink: 0; }
.yb-logo__img { display: block; width: auto; height: auto; max-height: 64px; max-width: 220px; }
.yb-nav { flex: 1; }
.yb-nav__list {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 6px 34px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.yb-nav__list a {
	position: relative;
	display: inline-block;
	padding: 6px 0;
	color: var(--yb-ink);
	font-family: var(--yb-head);
	font-weight: 600;
	font-size: 1rem;
	text-decoration: none;
	transition: color 0.2s ease;
}
.yb-nav__list a:hover,
.yb-nav__list a.is-current { color: var(--yb-sky-text); }
.yb-nav__list a.is-current::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 2px;
	border-radius: 2px;
	background: var(--yb-sky);
}
.yb-btn--nav-mobile { display: none; }
.yb-burger { display: none; }

/* ---------- Blog area ---------- */
.yb-main { min-height: 60vh; padding: 64px 0 96px; }
.yb-main a { text-decoration: none; }
.yb-wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.yb-wrap--narrow { max-width: 780px; }

/* Small label + uppercase heading with a sky-blue second half, as on yourbrandus.ai. */
.yb-intro { max-width: 760px; margin-bottom: 48px; }
.yb-intro__kicker {
	display: inline-block;
	margin: 0 0 14px;
	padding: 5px 14px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--yb-sky) 12%, #fff);
	color: var(--yb-sky-text);
	font-family: var(--yb-head);
	font-weight: 700;
	font-size: 0.9rem;
}
.yb-intro__title {
	margin: 0 0 14px;
	color: var(--yb-navy);
	font-family: var(--yb-head);
	font-weight: 800;
	font-size: clamp(2rem, 4.4vw, 3rem);
	line-height: 1.12;
	letter-spacing: -0.01em;
	text-transform: uppercase;
}
.yb-intro__title span { color: var(--yb-sky); }
.yb-intro__lead { margin: 0; color: var(--yb-muted); font-size: 1.12rem; }

.yb-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px; }

.yb-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	overflow: hidden;
	background: var(--yb-white);
	border: 1px solid var(--yb-line);
	border-radius: var(--yb-radius);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.yb-card:hover { border-color: color-mix(in srgb, var(--yb-sky) 50%, var(--yb-line)); box-shadow: 0 10px 30px rgba(33, 69, 143, 0.08); }
.yb-card__img { display: block; overflow: hidden; background: var(--yb-cloud); }
.yb-card__img img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	transition: transform 0.5s ease;
}
.yb-card:hover .yb-card__img img { transform: scale(1.04); }
.yb-card__img--contain { background: #fff; }
.yb-card__img--contain img { object-fit: contain; padding: 18px; }
.yb-card__body { display: flex; flex: 1; flex-direction: column; padding: 26px 28px 30px; }
.yb-card__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 14px;
	margin: 0 0 12px;
	color: var(--yb-muted);
	font-size: 0.88rem;
}
.yb-tag {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--yb-navy) 9%, #fff);
	color: var(--yb-navy);
	font-family: var(--yb-head);
	font-weight: 700;
	font-size: 0.8rem;
}
.yb-main a.yb-tag:hover { background: var(--yb-navy); color: #fff; }
.yb-card__body h2 {
	margin: 0 0 10px;
	font-family: var(--yb-head);
	font-weight: 700;
	font-size: 1.32rem;
	line-height: 1.35;
}
.yb-card__body h2 a { color: var(--yb-ink); }
.yb-card__body h2 a:hover { color: var(--yb-navy); }
.yb-excerpt { flex: 1; margin: 0 0 22px; color: var(--yb-muted); line-height: 1.7; }
.yb-excerpt p { margin: 0; }
.yb-readmore { align-self: flex-start; padding: 10px 24px; }
.yb-empty { padding: 60px 0; text-align: center; color: var(--yb-muted); }

.yb-pagination { margin-top: 56px; }
.yb-pagination .nav-links,
.yb-pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.yb-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	padding: 0 12px;
	border: 1px solid var(--yb-line);
	border-radius: 999px;
	color: var(--yb-navy);
	font-weight: 600;
}
.yb-pagination .page-numbers.current { background: var(--yb-navy); border-color: var(--yb-navy); color: #fff; }
.yb-pagination a.page-numbers:hover { border-color: var(--yb-sky); color: var(--yb-sky-text); }

/* ---------- Post page ---------- */
.yb-back { display: inline-block; margin-bottom: 26px; color: var(--yb-muted); font-size: 0.92rem; font-weight: 600; }
.yb-main .yb-back:hover { color: var(--yb-sky-text); }
.yb-wrap--narrow > .yb-tag { margin-bottom: 14px; }
.yb-title {
	margin: 0 0 14px;
	color: var(--yb-navy);
	font-family: var(--yb-head);
	font-weight: 800;
	font-size: clamp(1.9rem, 4vw, 2.7rem);
	line-height: 1.18;
	letter-spacing: -0.01em;
}
.yb-meta { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0 0 32px; color: var(--yb-muted); font-size: 0.92rem; }
.yb-cover { display: block; width: 100%; height: auto; margin-bottom: 42px; border-radius: var(--yb-radius); }
.yb-content { font-size: 1.07rem; line-height: 1.85; }
.yb-content > *:first-child { margin-top: 0; }
.yb-content p, .yb-content ul, .yb-content ol { margin: 0 0 1.4em; }
.yb-content ul, .yb-content ol { padding-left: 1.4em; }
.yb-content li { margin-bottom: 0.45em; }
.yb-content li::marker { color: var(--yb-sky); }
.yb-content h2, .yb-content h3, .yb-content h4 {
	margin: 1.8em 0 0.6em;
	color: var(--yb-navy);
	font-family: var(--yb-head);
	font-weight: 700;
	line-height: 1.3;
}
.yb-content h2 { font-size: 1.55rem; }
.yb-content h3 { font-size: 1.25rem; }
.yb-content strong { color: var(--yb-ink); }
.yb-main .yb-content a { color: var(--yb-sky-text); text-decoration: underline; text-underline-offset: 3px; }
.yb-content img, .yb-content video, .yb-content iframe { max-width: 100%; height: auto; border-radius: 12px; }
.yb-content blockquote {
	margin: 1.6em 0;
	padding: 18px 24px;
	border-left: 4px solid var(--yb-sky);
	border-radius: 0 12px 12px 0;
	background: var(--yb-cloud);
	font-style: italic;
}
.yb-content blockquote p:last-child { margin-bottom: 0; }
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin: 0 auto 1.4em; }
.wp-caption { max-width: 100%; }
.wp-caption-text, .yb-content figcaption { margin-top: 8px; color: var(--yb-muted); font-size: 0.85rem; text-align: center; }

.yb-cta {
	margin: 56px 0 0;
	padding: 38px 38px 40px;
	border-radius: 22px;
	background:
		radial-gradient(60% 90% at 100% 0%, color-mix(in srgb, var(--yb-sky) 45%, transparent), transparent 70%),
		var(--yb-navy);
	color: #fff;
}
.yb-cta__kicker { margin: 0 0 6px !important; color: color-mix(in srgb, var(--yb-sky) 60%, #fff) !important; font-family: var(--yb-head); font-weight: 700; }
.yb-cta h2 { margin: 0 0 10px; color: #fff; font-family: var(--yb-head); font-weight: 800; font-size: 1.7rem; line-height: 1.2; }
.yb-cta p { margin: 0 0 24px; color: rgba(255, 255, 255, 0.85); }
.yb-main .yb-cta a.yb-btn:hover { background: #fff; color: var(--yb-navy); }

.yb-postnav { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 40px; }
.yb-postnav a {
	display: block;
	padding: 20px 22px;
	border: 1px solid var(--yb-line);
	border-radius: 14px;
	color: var(--yb-navy);
	font-family: var(--yb-head);
	font-weight: 700;
	line-height: 1.4;
}
.yb-postnav a:hover { border-color: var(--yb-sky); }
.yb-postnav span { display: block; margin-bottom: 4px; color: var(--yb-muted); font-family: var(--yb-body); font-weight: 500; font-size: 0.85rem; }
.yb-postnav__next { grid-column: 2; text-align: right; }

.yb-404 { text-align: center; padding: 40px 24px; }

/* ---------- Footer: royal navy; the logo sits on a white plate so its navy lettering stays visible ---------- */
.yb-footer { background: var(--yb-navy); color: rgba(255, 255, 255, 0.82); }
.yb-footer__inner {
	display: grid;
	grid-template-columns: 1fr 1.1fr;
	gap: 56px;
	max-width: 1240px;
	margin: 0 auto;
	padding: 72px 24px 48px;
}
.yb-footer .yb-logo { padding: 14px 20px; border-radius: 16px; background: var(--yb-white); }
.yb-footer .yb-logo__img { max-height: 70px; }
.yb-footer p { margin: 18px 0 0; line-height: 1.7; }
.yb-footer__brand p { max-width: 420px; }
.yb-footer h2 { margin: 0 0 8px; color: #fff; font-family: var(--yb-head); font-weight: 800; font-size: 1.45rem; }
.yb-footer__news > p { margin-top: 0; }
.yb-newsletter { display: flex; gap: 10px; margin-top: 20px; }
.yb-newsletter input[type="email"] {
	flex: 1;
	min-width: 0;
	height: 52px;
	padding: 0 22px;
	border: 1px solid rgba(255, 255, 255, 0.35);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
	font: inherit;
}
.yb-newsletter input[type="email"]::placeholder { color: rgba(255, 255, 255, 0.65); }
.yb-newsletter input[type="email"]:focus { outline: none; border-color: var(--yb-sky); background: rgba(255, 255, 255, 0.12); }
.yb-newsletter .yb-btn { height: 52px; padding: 0 28px; }
.yb-newsletter .yb-btn:hover { background: #fff; color: var(--yb-navy); }
.yb-newsletter__trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.yb-newsletter__msg { margin-top: 14px !important; padding: 12px 16px; border-radius: 12px; background: rgba(255, 255, 255, 0.12); color: #fff; font-weight: 600; }
.yb-newsletter__msg--ok { border-left: 4px solid var(--yb-sky); }
.yb-newsletter .yb-btn[disabled] { opacity: 0.6; cursor: wait; }
.yb-newsletter__msg--error { color: #FFD3D3; }
.yb-footer a { color: #fff; text-decoration: none; }
.yb-footer a:hover { color: color-mix(in srgb, var(--yb-sky) 60%, #fff); }
.yb-footer__menu {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px 32px;
	max-width: 1240px;
	margin: 0 auto;
	padding: 24px;
	border-top: 1px solid rgba(255, 255, 255, 0.16);
	font-family: var(--yb-head);
	font-weight: 600;
}
.yb-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 10px 24px;
	max-width: 1240px;
	margin: 0 auto;
	padding: 20px 24px 28px;
	border-top: 1px solid rgba(255, 255, 255, 0.16);
	font-size: 0.9rem;
}
.yb-footer__bottom p { margin: 0; }
.yb-footer__legal { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; padding: 0; list-style: none; }

.yb-top {
	position: fixed;
	right: 22px;
	bottom: 22px;
	z-index: 40;
	width: 46px;
	height: 46px;
	border: 0;
	border-radius: 50%;
	background: var(--yb-sky);
	color: #fff;
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, visibility 0.2s ease;
}
.yb-top.is-visible { opacity: 1; visibility: visible; }

/* ---------- Tablet & mobile ---------- */
@media (max-width: 960px) {
	.yb-header__cta { display: none; }
	.yb-burger {
		display: inline-flex;
		flex-direction: column;
		justify-content: center;
		gap: 5px;
		width: 46px;
		height: 46px;
		margin-left: auto;
		padding: 0 11px;
		border: 0;
		background: transparent;
		cursor: pointer;
	}
	.yb-burger__bar { display: block; height: 2px; border-radius: 2px; background: var(--yb-navy); transition: transform 0.2s ease, opacity 0.2s ease; }
	.yb-menu-open .yb-burger__bar:nth-child(2) { transform: translateY(7px) rotate(45deg); }
	.yb-menu-open .yb-burger__bar:nth-child(3) { opacity: 0; }
	.yb-menu-open .yb-burger__bar:nth-child(4) { transform: translateY(-7px) rotate(-45deg); }
	.yb-nav {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		display: none;
		padding: 12px 24px 28px;
		border-bottom: 1px solid var(--yb-line);
		background: var(--yb-white);
	}
	.yb-menu-open .yb-nav { display: block; }
	.yb-nav__list { flex-direction: column; gap: 0; }
	.yb-nav__list a { display: block; padding: 13px 0; font-size: 1.05rem; }
	.yb-nav__list a.is-current::after { display: none; }
	.yb-btn--nav-mobile { display: inline-flex; margin-top: 14px; }
	.yb-footer__inner { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 782px) {
	.admin-bar .yb-header { top: 46px; }
}
@media (max-width: 767px) {
	.yb-header__inner { min-height: 72px; }
	.yb-logo__img { max-height: 48px; max-width: 170px; }
	.yb-main { padding: 44px 0 72px; }
	.yb-wrap { padding: 0 18px; }
	.yb-intro { margin-bottom: 32px; }
	.yb-grid { grid-template-columns: 1fr; gap: 26px; }
	.yb-card__body { padding: 22px; }
	.yb-cta { padding: 30px 24px; }
	.yb-postnav { grid-template-columns: 1fr; }
	.yb-postnav__next { grid-column: auto; text-align: left; }
	.yb-footer__inner { padding-top: 56px; }
	.yb-newsletter { flex-direction: column; }
	.yb-newsletter input[type="email"] { flex: none; width: 100%; }
	.yb-footer__bottom { flex-direction: column; text-align: center; }
	.yb-footer__legal { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.yb-card, .yb-card__img img, .yb-btn, .yb-nav__list a, .yb-burger__bar { transition: none; }
	.yb-card:hover .yb-card__img img { transform: none; }
}
