/* ==========================================================================
   Ronnbrothers Theme — Core Stylesheet
   Pure modern CSS (Grid, Flexbox, Custom Properties). Zero framework bloat.
   ========================================================================== */

:root {
	--rb-primary: #0f766e;
	--rb-accent: #ea580c;
	--rb-bg: #f8fafc;
	--rb-surface: #ffffff;
	--rb-text: #0f172a;
	--rb-text-muted: #475569;
	--rb-link: #0f766e;
	--rb-link-hover: #115e59;
	--rb-header-bg: #ffffff;
	--rb-footer-bg: #0f172a;
	--rb-border: rgba(15, 23, 42, 0.1);
	--rb-maxw: 1200px;
	--rb-radius: 12px;
	--rb-font-size: 17px;
	--rb-font-body: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--rb-font-head: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--rb-shadow: 0 4px 20px -6px rgba(15, 23, 42, 0.08);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--rb-bg);
	color: var(--rb-text);
	font-family: var(--rb-font-body);
	font-size: var(--rb-font-size);
	line-height: 1.7;
	text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--rb-link); text-decoration-thickness: 1.5px; text-underline-offset: 2px; transition: color 0.15s ease; }
a:hover { color: var(--rb-link-hover); }

h1, h2, h3, h4 {
	font-family: var(--rb-font-head);
	line-height: 1.25;
	color: var(--rb-text);
	margin: 0 0 0.75rem;
	letter-spacing: -0.015em;
}
h1 { font-size: clamp(1.85rem, 3.2vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 2.2vw, 1.85rem); margin-top: 2rem; }
h3 { font-size: clamp(1.15rem, 1.6vw, 1.35rem); margin-top: 1.5rem; }

.rb-sr-only, .rb-skip-link {
	position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.rb-skip-link:focus {
	position: fixed; top: 12px; left: 12px; z-index: 9999;
	width: auto; height: auto; clip: auto; padding: 10px 16px;
	background: var(--rb-primary); color: #fff; border-radius: 8px;
}

/* Container & Layout */
.rb-container { width: 100%; max-width: var(--rb-maxw); margin: 0 auto; padding: 0 20px; }
.rb-site-wrap { padding: 28px 0 64px; min-height: 65vh; }

.rb-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; align-items: start; }
.rb-has-sidebar .rb-layout { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 980px) {
	.rb-has-sidebar .rb-layout { grid-template-columns: minmax(0, 1fr) 320px; }
}

/* Header & Navigation */
.rb-header {
	background: var(--rb-header-bg);
	border-bottom: 1px solid var(--rb-border);
	z-index: 100;
}
.rb-sticky-header .rb-header { position: sticky; top: 0; backdrop-filter: blur(8px); }
.rb-header__inner { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 16px; }

.rb-brand__title { font-weight: 800; font-size: 1.35rem; color: var(--rb-text); text-decoration: none; letter-spacing: -0.02em; }
.rb-brand img { max-height: 44px; width: auto; }

.rb-nav__list { display: flex; flex-wrap: wrap; gap: 22px; list-style: none; margin: 0; padding: 0; }
.rb-nav__list a { color: var(--rb-text); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.rb-nav__list a:hover { color: var(--rb-primary); }

.rb-nav-toggle {
	display: none; flex-direction: column; gap: 5px;
	background: transparent; border: 1px solid var(--rb-border); border-radius: 8px;
	padding: 9px 10px; cursor: pointer;
}
.rb-nav-toggle span { display: block; width: 20px; height: 2px; background: var(--rb-text); border-radius: 2px; }

@media (max-width: 820px) {
	.rb-nav-toggle { display: flex; }
	.rb-nav {
		display: none; position: absolute; top: 68px; left: 0; right: 0;
		background: var(--rb-header-bg); border-bottom: 1px solid var(--rb-border);
		padding: 16px 20px; box-shadow: var(--rb-shadow);
	}
	.rb-nav.is-open { display: block; }
	.rb-nav__list { flex-direction: column; gap: 12px; }
}

/* Buttons & Forms */
.rb-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	padding: 11px 20px; border-radius: 8px; border: 0;
	font-weight: 700; font-size: 0.95rem; line-height: 1.2;
	text-decoration: none; cursor: pointer; transition: transform 0.12s ease, opacity 0.15s ease;
}
.rb-btn:hover { transform: translateY(-1px); opacity: 0.93; }
.rb-btn--primary { background: var(--rb-primary); color: #fff; }
.rb-btn--primary:hover { color: #fff; }
.rb-btn--accent { background: var(--rb-accent); color: #fff; }
.rb-btn--accent:hover { color: #fff; }
.rb-btn--sm { padding: 8px 14px; font-size: 0.85rem; }

.rb-search-form { display: flex; gap: 8px; }
.rb-search-form__input {
	flex: 1; min-width: 0; padding: 10px 14px;
	border: 1px solid var(--rb-border); border-radius: 8px;
	background: var(--rb-surface); color: var(--rb-text); font-size: 0.95rem;
}

/* Hero & Cards */
.rb-hero {
	background: linear-gradient(135deg, color-mix(in srgb, var(--rb-primary) 10%, var(--rb-surface)), var(--rb-bg));
	border-bottom: 1px solid var(--rb-border);
	padding: 48px 0;
	margin-top: -28px;
	margin-bottom: 36px;
}
.rb-hero__inner { max-width: 720px; text-align: center; }
.rb-hero__desc { color: var(--rb-text-muted); font-size: 1.1rem; margin: 0 0 22px; }
.rb-hero__search { max-width: 480px; margin: 0 auto; }

.rb-section { margin-top: 24px; }
.rb-section__head { margin-bottom: 20px; display: flex; align-items: baseline; justify-content: space-between; }

.rb-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 24px; }
.rb-card-item {
	background: var(--rb-surface); border: 1px solid var(--rb-border);
	border-radius: var(--rb-radius); overflow: hidden;
	box-shadow: var(--rb-shadow); display: flex; flex-direction: column;
}
.rb-card-item__media { aspect-ratio: 16 / 9; overflow: hidden; background: rgba(0, 0, 0, 0.04); }
.rb-card-item__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.25s ease; }
.rb-card-item:hover .rb-card-item__media img { transform: scale(1.03); }
.rb-card-item__body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.rb-card-item__title { font-size: 1.15rem; margin: 8px 0 10px; }
.rb-card-item__title a { color: var(--rb-text); text-decoration: none; }
.rb-card-item__title a:hover { color: var(--rb-primary); }
.rb-card-item__excerpt { color: var(--rb-text-muted); font-size: 0.92rem; margin: 0 0 14px; flex: 1; }
.rb-card-item__meta { font-size: 0.82rem; color: var(--rb-text-muted); display: flex; gap: 8px; align-items: center; }

.rb-cat-pill {
	display: inline-block; width: fit-content;
	padding: 3px 10px; border-radius: 999px;
	background: color-mix(in srgb, var(--rb-primary) 12%, transparent);
	color: var(--rb-primary); font-size: 0.76rem; font-weight: 700; text-decoration: none;
	text-transform: uppercase; letter-spacing: 0.04em;
}

/* Breadcrumbs */
.rb-breadcrumbs { margin-bottom: 16px; font-size: 0.85rem; color: var(--rb-text-muted); }
.rb-breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; }
.rb-breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 6px; opacity: 0.5; }
.rb-breadcrumbs a { color: var(--rb-text-muted); text-decoration: none; }
.rb-breadcrumbs a:hover { color: var(--rb-primary); }

/* Single Article & GEO Blocks */
.rb-article {
	background: var(--rb-surface); border: 1px solid var(--rb-border);
	border-radius: var(--rb-radius); padding: clamp(20px, 3vw, 38px);
	box-shadow: var(--rb-shadow);
}
.rb-article__meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 0.88rem; color: var(--rb-text-muted); margin-top: 8px; }
.rb-article__hero { margin: 22px 0; border-radius: 10px; overflow: hidden; }
.rb-article__hero img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }

.rb-entry-content p { margin: 0 0 1.2em; }
.rb-entry-content ul, .rb-entry-content ol { margin: 0 0 1.25em; padding-left: 1.4em; }
.rb-entry-content blockquote {
	margin: 1.5em 0; padding: 14px 20px; border-left: 4px solid var(--rb-primary);
	background: color-mix(in srgb, var(--rb-primary) 6%, var(--rb-surface)); border-radius: 0 8px 8px 0;
}
.rb-entry-content h2, .rb-entry-content h3 { scroll-margin-top: 84px; }

/* Key Takeaways (TL;DR) */
.rb-tldr {
	margin: 22px 0 26px; padding: 18px 22px;
	border-radius: 10px;
	border: 1px solid color-mix(in srgb, var(--rb-primary) 28%, transparent);
	border-left: 5px solid var(--rb-primary);
	background: color-mix(in srgb, var(--rb-primary) 6%, var(--rb-surface));
}
.rb-tldr__title { margin: 0 0 10px; font-weight: 800; font-size: 1rem; color: var(--rb-primary); text-transform: uppercase; letter-spacing: 0.04em; }
.rb-tldr__list { margin: 0; padding-left: 1.25rem; }
.rb-tldr__list li { margin-bottom: 6px; }

/* Lightweight TOC */
.rb-toc {
	margin: 0 0 26px; padding: 14px 18px;
	background: var(--rb-bg); border: 1px solid var(--rb-border); border-radius: 10px;
}
.rb-toc__title { font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.rb-toc__title::after { content: "▾"; font-size: 0.9rem; }
.rb-toc[open] .rb-toc__title::after { content: "▴"; }
.rb-toc__list { margin: 12px 0 0; padding-left: 1.25rem; font-size: 0.93rem; }
.rb-toc__list li { margin-bottom: 5px; }
.rb-toc__sub { margin-left: 16px; list-style-type: disc; }

/* FAQ & HowTo */
.rb-faq { margin: 12px 0; border: 1px solid var(--rb-border); border-radius: 10px; padding: 12px 16px; background: var(--rb-bg); }
.rb-faq__q { font-weight: 700; cursor: pointer; }
.rb-faq__a { margin-top: 10px; color: var(--rb-text-muted); }

.rb-howto { margin: 24px 0; padding: 20px; border: 1px solid var(--rb-border); border-radius: 10px; background: var(--rb-bg); }
.rb-howto__title { margin-top: 0; }
.rb-howto__steps { padding-left: 1.4rem; margin: 0; }
.rb-howto__steps li { margin-bottom: 12px; }

/* Author E-E-A-T Box */
.rb-author-box {
	margin-top: 28px; padding: 22px; display: flex; gap: 18px; align-items: flex-start;
	background: var(--rb-surface); border: 1px solid var(--rb-border); border-radius: var(--rb-radius);
}
.rb-author-box__avatar img { border-radius: 50%; flex-shrink: 0; }
.rb-author-box__head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rb-author-box__name { margin: 0; font-size: 1.1rem; }
.rb-author-box__role { font-size: 0.8rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: color-mix(in srgb, var(--rb-primary) 12%, transparent); color: var(--rb-primary); }
.rb-author-box__cred { margin: 4px 0 8px; font-size: 0.85rem; color: var(--rb-text-muted); font-weight: 600; }
.rb-author-box__bio { margin: 0 0 10px; font-size: 0.93rem; color: var(--rb-text-muted); }
.rb-author-box__links { display: flex; flex-wrap: wrap; gap: 10px; font-size: 0.84rem; }

/* Affiliate Amazon Product Card */
.rb-product-card {
	position: relative; margin: 28px 0; padding: 22px;
	background: var(--rb-surface); border: 2px solid color-mix(in srgb, var(--rb-primary) 24%, var(--rb-border));
	border-radius: var(--rb-radius); box-shadow: var(--rb-shadow);
}
.rb-product-card__badge, .rb-badge {
	display: inline-block; padding: 3px 10px; border-radius: 999px;
	background: var(--rb-primary); color: #fff; font-size: 0.74rem; font-weight: 700;
	text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 10px;
}
.rb-product-card__top { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 20px; align-items: center; }
@media (max-width: 600px) { .rb-product-card__top { grid-template-columns: 1fr; } }
.rb-product-card__media img { border-radius: 8px; margin: 0 auto; max-height: 180px; object-fit: contain; }
.rb-product-card__title { margin: 0 0 8px; font-size: 1.25rem; }
.rb-product-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 14px; }
.rb-product-card__price { font-size: 1.25rem; font-weight: 800; color: var(--rb-text); }

.rb-stars { display: inline-flex; align-items: center; gap: 2px; color: #f59e0b; font-size: 1rem; }
.rb-stars__num { color: var(--rb-text-muted); font-size: 0.85rem; font-weight: 700; margin-left: 5px; }

.rb-proscons {
	display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 16px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--rb-border);
}
.rb-proscons__heading { margin: 0 0 8px; font-weight: 800; font-size: 0.88rem; text-transform: uppercase; }
.rb-proscons__col--pros .rb-proscons__heading { color: #15803d; }
.rb-proscons__col--cons .rb-proscons__heading { color: #b91c1c; }
.rb-proscons ul { margin: 0; padding-left: 1.15rem; font-size: 0.92rem; }

/* Responsive Sortable Comparison Table */
.rb-ctable-wrap { margin: 28px 0; overflow-x: auto; border: 1px solid var(--rb-border); border-radius: var(--rb-radius); background: var(--rb-surface); }
.rb-ctable { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
.rb-ctable th, .rb-ctable td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--rb-border); vertical-align: middle; }
.rb-ctable thead th { background: var(--rb-bg); font-weight: 700; white-space: nowrap; }
.rb-ctable th[data-sort-col] { cursor: pointer; user-select: none; }
.rb-ctable__row--highlight { background: color-mix(in srgb, var(--rb-primary) 7%, var(--rb-surface)); }
.rb-ctable__prod { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.rb-ctable__prod img { border-radius: 6px; object-fit: contain; }
.rb-ctable__pro { display: block; color: #15803d; margin-top: 4px; font-weight: 600; }

@media (max-width: 720px) {
	.rb-ctable thead { display: none; }
	.rb-ctable, .rb-ctable tbody, .rb-ctable tr, .rb-ctable td { display: block; width: 100%; }
	.rb-ctable tr { padding: 14px; border-bottom: 2px solid var(--rb-border); }
	.rb-ctable td { padding: 8px 0; border-bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
	.rb-ctable td::before { content: attr(data-label); font-weight: 700; color: var(--rb-text-muted); font-size: 0.82rem; }
}

/* Sidebar, Related, Footer, Back to Top */
.rb-sidebar { display: flex; flex-direction: column; gap: 20px; }
.rb-widget { background: var(--rb-surface); border: 1px solid var(--rb-border); border-radius: var(--rb-radius); padding: 20px; }
.rb-widget__title { font-size: 1rem; margin: 0 0 12px; }
.rb-recent-list { list-style: none; margin: 0; padding: 0; }
.rb-recent-list li { padding: 8px 0; border-bottom: 1px solid var(--rb-border); font-size: 0.92rem; }
.rb-recent-list li:last-child { border-bottom: 0; }

.rb-related { margin-top: 36px; }
.rb-ad-slot { margin: 22px 0; text-align: center; }

.rb-footer { background: var(--rb-footer-bg); color: rgba(255, 255, 255, 0.84); padding: 48px 0 28px; }
.rb-footer a { color: rgba(255, 255, 255, 0.9); text-decoration: none; }
.rb-footer a:hover { text-decoration: underline; }
.rb-footer__widgets { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 28px; margin-bottom: 32px; }
.rb-footer-widget__title { color: #fff; font-size: 1rem; margin: 0 0 12px; }
.rb-footer__bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.14); padding-top: 20px;
	display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; font-size: 0.88rem;
}
.rb-footer__menu { display: flex; flex-wrap: wrap; gap: 16px; list-style: none; margin: 0; padding: 0; }

.rb-back-top {
	position: fixed; right: 20px; bottom: 20px; width: 42px; height: 42px;
	border-radius: 50%; border: 0; background: var(--rb-primary); color: #fff;
	font-size: 1.1rem; cursor: pointer; box-shadow: var(--rb-shadow); z-index: 90;
}

.rb-404 { text-align: center; padding: 60px 20px; }
.rb-404 h1 { font-size: 4rem; color: var(--rb-primary); }
.rb-404__search { max-width: 440px; margin: 20px auto; }
