/* Rank Higher Blog - change colours/fonts here only */
.rhb {
	--rhb-primary: #1e5bff;
	--rhb-primary-dark: #0f2a6b;
	--rhb-ink: #0b1730;
	--rhb-text: #364055;
	--rhb-muted: #6b7487;
	--rhb-line: #e6e9f0;
	--rhb-soft: #f4f7ff;
	--rhb-radius: 14px;
	--rhb-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	font-family: var(--rhb-font);
	color: var(--rhb-text);
	background: #fff;
	-webkit-font-smoothing: antialiased;
}
.rhb *, .rhb *::before, .rhb *::after { box-sizing: border-box; }
/* Reset uses :where() (zero specificity) so component margins below always win over Divi + this reset */
.rhb :where(h1, h2, h3, h4, p, ul, ol, figure) { margin: 0; padding: 0; }
.rhb h1, .rhb h2, .rhb h3, .rhb h4 {
	font-family: var(--rhb-font);
	color: var(--rhb-ink);
	letter-spacing: -0.02em;
}
.rhb a { color: inherit; text-decoration: none; }
.rhb img { max-width: 100%; height: auto; display: block; }

.rhb-wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.rhb-wrap--narrow { max-width: 820px; }
.rhb-wrap--mid { max-width: 1000px; }

.rhb-dot { margin: 0 6px; opacity: .6; }
.rhb-meta { font-size: 14px; color: var(--rhb-muted); display: flex; flex-wrap: wrap; align-items: center; }

.rhb-tag {
	display: inline-block;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--rhb-primary);
	background: var(--rhb-soft);
	padding: 6px 12px;
	border-radius: 999px;
	margin-bottom: 14px;
}
.rhb-tag:hover { background: var(--rhb-primary); color: #fff; }

.rhb-btn {
	display: inline-block;
	background: var(--rhb-primary);
	color: #fff !important;
	font-weight: 600;
	font-size: 16px;
	padding: 14px 26px;
	border-radius: 10px;
	transition: transform .15s, background .15s;
}
.rhb-btn:hover { background: var(--rhb-primary-dark); transform: translateY(-1px); }
.rhb-btn--light { background: #fff; color: var(--rhb-primary-dark) !important; }
.rhb-btn--light:hover { background: var(--rhb-soft); }

/* ---------- Blog index ---------- */
.rhb-head { background: linear-gradient(180deg, var(--rhb-soft), #fff); padding: 72px 0 36px; text-align: center; }
.rhb-eyebrow { display: block; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--rhb-primary); margin-bottom: 14px; }
.rhb .rhb-head .rhb-wrap { text-align: center; }
.rhb .rhb-head__title { font-size: clamp(32px, 5vw, 54px); line-height: 1.12; font-weight: 800; max-width: 820px; margin: 0 auto 18px; padding: 0; text-align: center; }
.rhb .rhb-head__sub { font-size: 18px; line-height: 1.6; max-width: 620px; margin: 0 auto 32px; padding: 0; color: var(--rhb-muted); text-align: center; }
.rhb-cats { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.rhb-cats a { font-size: 14px; font-weight: 600; padding: 9px 18px; border-radius: 999px; border: 1px solid var(--rhb-line); background: #fff; color: var(--rhb-ink); transition: all .15s; }
.rhb-cats a:hover, .rhb-cats a.is-active { background: var(--rhb-primary); border-color: var(--rhb-primary); color: #fff; }

.rhb-list { padding: 24px 0 72px; }

.rhb-hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: center; margin-bottom: 64px; padding-bottom: 64px; border-bottom: 1px solid var(--rhb-line); }
.rhb-hero__img { border-radius: var(--rhb-radius); overflow: hidden; aspect-ratio: 16 / 10; background: var(--rhb-soft); display: block; }
.rhb-hero__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.rhb-hero__img:hover img { transform: scale(1.03); }
.rhb-hero__title { font-size: clamp(26px, 3.2vw, 38px); line-height: 1.15; font-weight: 800; margin-bottom: 14px; }
.rhb-hero__title a:hover { color: var(--rhb-primary); }
.rhb-hero__excerpt { font-size: 17px; line-height: 1.65; margin-bottom: 18px; }
.rhb-hero .rhb-meta { margin-bottom: 24px; }

.rhb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.rhb-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--rhb-line); border-radius: var(--rhb-radius); overflow: hidden; transition: box-shadow .2s, transform .2s; }
.rhb-card:hover { box-shadow: 0 14px 34px rgba(11, 23, 48, .10); transform: translateY(-3px); }
.rhb-card__img { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--rhb-soft); }
.rhb-card__img img { width: 100%; height: 100%; object-fit: cover; }
.rhb-card__ph { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, var(--rhb-primary), var(--rhb-primary-dark)); }
.rhb-hero__img .rhb-card__ph { aspect-ratio: 16 / 10; }
.rhb-card__body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.rhb-card__title { font-size: 20px; line-height: 1.3; font-weight: 700; margin-bottom: 10px; }
.rhb-card__title a:hover { color: var(--rhb-primary); }
.rhb-card__excerpt { font-size: 15px; line-height: 1.6; margin-bottom: 18px; flex: 1; }

.rhb-pagination { margin-top: 56px; }
.rhb-pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.rhb-pagination .page-numbers { font-size: 15px; font-weight: 600; padding: 10px 16px; border: 1px solid var(--rhb-line); border-radius: 10px; color: var(--rhb-ink); }
.rhb-pagination .page-numbers.current, .rhb-pagination a.page-numbers:hover { background: var(--rhb-primary); border-color: var(--rhb-primary); color: #fff; }
.rhb-pagination .screen-reader-text { display: none; }
.rhb-empty { text-align: center; padding: 60px 0; font-size: 18px; }


/* ---------- Single post ---------- */
.rhb-progress { position: fixed; top: 0; left: 0; right: 0; height: 4px; z-index: 99999; background: transparent; }
.rhb-progress span { display: block; height: 100%; width: 0; background: var(--rhb-primary); }

.rhb-post-head { padding: 56px 0 32px; }
.rhb-crumbs { font-size: 14px; color: var(--rhb-muted); margin-bottom: 20px; display: flex; flex-wrap: wrap; gap: 8px; }
.rhb-crumbs a:hover { color: var(--rhb-primary); }
.rhb-post-title { font-size: clamp(30px, 4.6vw, 52px); line-height: 1.12; font-weight: 800; margin-bottom: 26px; }
.rhb-byline { display: flex; align-items: center; gap: 14px; }
.rhb-avatar { border-radius: 50%; }
.rhb-byline__txt { display: flex; flex-direction: column; font-size: 14px; color: var(--rhb-muted); }
.rhb-byline__txt strong { color: var(--rhb-ink); font-size: 16px; }

.rhb-feature { margin: 8px 0 48px; border-radius: var(--rhb-radius); overflow: hidden; }
.rhb-feature img { width: 100%; }

.rhb-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 56px; align-items: start; max-width: 1060px; }
.rhb-layout:not(:has(.rhb-toc)) { grid-template-columns: minmax(0, 760px); justify-content: center; }

.rhb-toc { position: sticky; top: 110px; max-height: calc(100vh - 140px); overflow: auto; border-left: 2px solid var(--rhb-line); padding-left: 20px; }
.rhb-toc__label { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--rhb-muted); margin-bottom: 14px; }
.rhb-toc__toggle { display: none; }
.rhb-toc__list { list-style: none; margin: 0; padding: 0; }
.rhb-toc__list li { padding: 0; margin: 0 0 10px; list-style: none; }
.rhb-toc__list a { font-size: 14.5px; line-height: 1.4; color: var(--rhb-muted); display: block; transition: color .15s; }
.rhb-toc__list .lvl-3 { padding-left: 14px; }
.rhb-toc__list a:hover, .rhb-toc__list a.is-active { color: var(--rhb-primary); font-weight: 600; }

.rhb-content { font-size: 18px; line-height: 1.8; }
.rhb-content > *:first-child { margin-top: 0; }
.rhb-content p { margin: 0 0 24px; }
.rhb-content h2 { font-size: 32px; line-height: 1.2; font-weight: 800; margin: 56px 0 18px; scroll-margin-top: 110px; }
.rhb-content h3 { font-size: 24px; line-height: 1.3; font-weight: 700; margin: 40px 0 14px; scroll-margin-top: 110px; }
.rhb-content h4 { font-size: 20px; font-weight: 700; margin: 32px 0 12px; }
.rhb-content a { color: var(--rhb-primary); text-decoration: underline; text-underline-offset: 3px; }
.rhb-content a:hover { color: var(--rhb-primary-dark); }
.rhb-content ul, .rhb-content ol { margin: 0 0 24px; padding-left: 26px; }
.rhb-content ul { list-style: disc; }
.rhb-content ol { list-style: decimal; }
.rhb-content li { margin-bottom: 10px; padding-left: 4px; }
.rhb-content img { border-radius: 12px; margin: 28px auto; }
.rhb-content figure { margin: 28px 0; }
.rhb-content figcaption { font-size: 14px; color: var(--rhb-muted); text-align: center; margin-top: 8px; }
.rhb-content blockquote { margin: 32px 0; padding: 22px 28px; background: var(--rhb-soft); border-left: 4px solid var(--rhb-primary); border-radius: 0 12px 12px 0; font-size: 20px; color: var(--rhb-ink); }
.rhb-content blockquote p:last-child { margin-bottom: 0; }
.rhb-content table { width: 100%; border-collapse: collapse; margin: 28px 0; font-size: 16px; display: block; overflow-x: auto; }
.rhb-content th, .rhb-content td { border: 1px solid var(--rhb-line); padding: 12px 16px; text-align: left; }
.rhb-content th { background: var(--rhb-soft); color: var(--rhb-ink); font-weight: 700; }
.rhb-content pre { background: #0b1730; color: #e8eefc; padding: 20px; border-radius: 12px; overflow-x: auto; font-size: 15px; margin: 0 0 24px; }
.rhb-content code { background: var(--rhb-soft); padding: 2px 6px; border-radius: 6px; font-size: .9em; }
.rhb-content pre code { background: none; padding: 0; }
.rhb-content hr { border: 0; border-top: 1px solid var(--rhb-line); margin: 48px 0; }

.rhb-cta-box { margin: 56px 0 32px; padding: 40px; border-radius: var(--rhb-radius); background: linear-gradient(135deg, var(--rhb-primary), var(--rhb-primary-dark)); color: #fff; text-align: center; }
.rhb-cta-box h3 { color: #fff; font-size: 28px; font-weight: 800; margin-bottom: 10px; }
.rhb-cta-box p { color: #d6e1ff; font-size: 17px; margin-bottom: 22px; }

.rhb-author { display: flex; gap: 20px; align-items: flex-start; padding: 28px; border: 1px solid var(--rhb-line); border-radius: var(--rhb-radius); }
.rhb-author__label { display: block; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--rhb-muted); margin-bottom: 4px; }
.rhb-author strong { color: var(--rhb-ink); font-size: 18px; }
.rhb-author p { margin-top: 8px; font-size: 15px; line-height: 1.6; }

.rhb-related { background: var(--rhb-soft); padding: 72px 0; margin-top: 72px; }
.rhb-related h2 { font-size: 32px; font-weight: 800; margin-bottom: 32px; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.rhb-grid { grid-template-columns: repeat(2, 1fr); }
	.rhb-hero { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 900px) {
	.rhb-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }
	.rhb-toc { position: static; max-height: none; border: 1px solid var(--rhb-line); border-radius: 12px; padding: 0; }
	.rhb-toc__label { display: none; }
	.rhb-toc__toggle { display: block; width: 100%; text-align: left; background: var(--rhb-soft); border: 0; border-radius: 12px; padding: 14px 18px; font: 600 15px var(--rhb-font); color: var(--rhb-ink); cursor: pointer; }
	.rhb-toc__list { display: none; padding: 16px 18px 6px; }
	.rhb-toc.is-open .rhb-toc__list { display: block; }
}
@media (max-width: 640px) {
	.rhb-head { padding: 48px 0 24px; }
	.rhb-grid { grid-template-columns: 1fr; }
	.rhb-content { font-size: 17px; }
	.rhb-content h2 { font-size: 26px; margin-top: 44px; }
	.rhb-content h3 { font-size: 21px; }
	.rhb-cta-box { padding: 28px 20px; }
	.rhb-author { flex-direction: column; }
	}
