/*
Theme Name: RBRVS Reference
Theme URI: https://www.rbrvs.com/
Author: Wasserman Medical Publishers, Ltd
Author URI: https://wasserman-medical.com/
Description: Reference theme for RBRVS.com, styled to match the RBRVS EZ-Fees site (rbrvs.net). On activation it creates the RBRVS reference pages, a primary menu and a static front page. Existing pages with the same slugs are never overwritten.
Version: 1.1.1
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: rbrvs-reference
*/

/* ---------- Palette (edit here to match rbrvs.net exactly) ---------- */
:root {
	--rb-navy: #13355b;
	--rb-navy-dark: #0c2440;
	--rb-blue: #1f6fb2;
	--rb-blue-light: #e9f2fa;
	--rb-accent: #f08a24;
	--rb-accent-dark: #d4720f;
	--rb-text: #24323f;
	--rb-muted: #5b6b7a;
	--rb-border: #d6e0ea;
	--rb-bg-alt: #f4f7fa;
	--rb-white: #ffffff;
	--rb-radius: 8px;
	--rb-max: 1140px;
	--rb-font: "Open Sans", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--rb-font-head: "Montserrat", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--rb-font);
	font-size: 17px;
	line-height: 1.65;
	color: var(--rb-text);
	background: var(--rb-white);
}
img { max-width: 100%; height: auto; }
a { color: var(--rb-blue); text-decoration: none; }
a:hover, a:focus { color: var(--rb-navy); text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--rb-font-head); color: var(--rb-navy); line-height: 1.25; margin: 1.6em 0 .6em; }
h1 { font-size: 2.3rem; }
h2 { font-size: 1.65rem; }
h3 { font-size: 1.2rem; }
p, ul, ol, dl, table { margin: 0 0 1.1em; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 999; width: auto; height: auto; clip: auto; background: #fff; padding: 8px 12px; }

.rb-wrap { max-width: var(--rb-max); margin: 0 auto; padding: 0 22px; }

/* ---------- Top bar & header ---------- */
.rb-topbar { background: var(--rb-navy-dark); color: #c9d6e4; font-size: .85rem; }
.rb-topbar .rb-wrap { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 6px; padding-bottom: 6px; flex-wrap: wrap; }
.rb-topbar a { color: #fff; }

.rb-header { background: var(--rb-white); border-bottom: 1px solid var(--rb-border); position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 10px rgba(19,53,91,.06); }
.rb-header .rb-wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 78px; }
.rb-brand { display: flex; align-items: center; gap: 12px; color: var(--rb-navy); }
.rb-brand:hover { text-decoration: none; }
.rb-logo-img { display: block; max-height: 62px; width: auto; }
.rb-logo-mark { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 10px; background: var(--rb-blue); color: #fff; font-family: var(--rb-font-head); font-weight: 800; font-size: 1.05rem; letter-spacing: -.5px; }
.rb-logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.rb-logo-text strong { font-family: var(--rb-font-head); font-size: 1.45rem; color: var(--rb-navy); }
.rb-logo-text strong span { color: var(--rb-accent); }
.rb-logo-text small { white-space: nowrap; font-size: .78rem; color: var(--rb-muted); margin-top: 3px; }

/* ---------- Navigation ---------- */
.rb-nav-toggle { display: none; }
.rb-nav-btn { display: none; cursor: pointer; padding: 8px 10px; border: 1px solid var(--rb-border); border-radius: 6px; color: var(--rb-navy); font-weight: 600; font-size: .9rem; }
.rb-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: nowrap; gap: 2px; align-items: center; }
.rb-nav li { margin: 0; }
.rb-nav a { display: block; padding: 8px 8px; color: var(--rb-navy); font-weight: 600; font-size: .88rem; white-space: nowrap; border-radius: 6px; }
.rb-nav a:hover, .rb-nav .current-menu-item > a, .rb-nav .current_page_item > a { background: var(--rb-blue-light); color: var(--rb-blue); text-decoration: none; }
.rb-nav ul ul { display: none; }

@media (max-width: 1240px) {
	.rb-nav-btn { display: inline-block; }
	.rb-nav { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--rb-border); display: none; }
	.rb-nav ul { flex-direction: column; align-items: stretch; padding: 10px 22px 16px; }
	.rb-nav-toggle:checked ~ .rb-nav { display: block; }
	.rb-header .rb-wrap { position: relative; }
}

/* ---------- Page banner ---------- */
.rb-banner { background: linear-gradient(120deg, var(--rb-navy) 0%, var(--rb-blue) 100%); color: #fff; padding: 46px 0 40px; }
.rb-banner h1 { color: #fff; margin: 0; font-size: 2.1rem; }
.rb-breadcrumb { font-size: .85rem; color: #cfe0f1; margin-bottom: 8px; }
.rb-breadcrumb a { color: #fff; }

.rb-content { padding-top: 34px; padding-bottom: 56px; max-width: 980px; }
.rb-content > h2:first-child, .rb-content > p:first-child { margin-top: 0; }

/* ---------- Hero (front page) ---------- */
.rb-hero { background: linear-gradient(120deg, var(--rb-navy) 0%, var(--rb-blue) 100%); color: #fff; padding: 76px 0 70px; text-align: center; }
.rb-hero h1 { color: #fff; font-size: 2.7rem; margin: .2em auto .4em; max-width: 860px; }
.rb-hero .rb-lead { color: #e3eef9; max-width: 760px; margin-left: auto; margin-right: auto; }
.rb-eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; font-weight: 700; color: #ffd2a6; margin: 0; }
.rb-lead { font-size: 1.15rem; color: var(--rb-muted); }
.rb-hero-buttons { margin-top: 26px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.rb-btn { display: inline-block; padding: 12px 22px; border-radius: 6px; font-weight: 700; font-size: .98rem; border: 2px solid transparent; transition: background .15s, color .15s; }
.rb-btn:hover { text-decoration: none; }
.rb-btn-primary { background: var(--rb-accent); color: #fff; }
.rb-btn-primary:hover { background: var(--rb-accent-dark); color: #fff; }
.rb-btn-ghost { border-color: var(--rb-blue); color: var(--rb-blue); background: #fff; }
.rb-hero .rb-btn-ghost { border-color: #fff; color: #fff; background: transparent; }
.rb-btn-ghost:hover { background: var(--rb-blue); color: #fff; }
.rb-btn-ghost-light { border-color: #fff; color: #fff; }
.rb-btn-ghost-light:hover { background: #fff; color: var(--rb-navy); }

/* ---------- Sections & cards ---------- */
.rb-section { padding: 58px 0; }
.rb-section > .rb-wrap > h2:first-child { margin-top: 0; }
.rb-section-alt { background: var(--rb-bg-alt); }
.rb-center { text-align: center; }
.rb-small { font-size: .9rem; color: var(--rb-muted); }

.rb-cards { display: grid; gap: 20px; margin: 22px 0 26px; }
.rb-cards-2 { grid-template-columns: repeat(2, 1fr); }
.rb-cards-3 { grid-template-columns: repeat(3, 1fr); }
.rb-cards-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .rb-cards-3, .rb-cards-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .rb-cards-2, .rb-cards-3, .rb-cards-4 { grid-template-columns: 1fr; } }

.rb-card { background: #fff; border: 1px solid var(--rb-border); border-radius: var(--rb-radius); padding: 22px 22px 16px; box-shadow: 0 2px 8px rgba(19,53,91,.05); }
.rb-card h3 { margin-top: 0; }
.rb-link-card { color: var(--rb-text); display: block; border-top: 4px solid var(--rb-blue); transition: transform .15s, box-shadow .15s; }
.rb-link-card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: 0 8px 20px rgba(19,53,91,.12); color: var(--rb-text); }

.rb-stat { text-align: center; border-top: 4px solid var(--rb-accent); }
.rb-stat-muted { border-top-color: var(--rb-blue); }
.rb-stat span { display: block; }
.rb-stat-label { font-size: .82rem; font-weight: 700; color: var(--rb-muted); text-transform: uppercase; letter-spacing: .05em; }
.rb-stat-value { font-family: var(--rb-font-head); font-size: 2rem; font-weight: 800; color: var(--rb-navy); margin: 6px 0; }
.rb-stat-note { font-size: .85rem; color: var(--rb-muted); }

.rb-formula { background: var(--rb-navy); color: #fff; border-radius: var(--rb-radius); padding: 22px 26px; text-align: center; font-family: Consolas, "Courier New", monospace; font-size: 1.02rem; margin: 18px 0 24px; }
.rb-formula p { margin: 0; }
.rb-formula strong { color: #ffd2a6; }

.rb-cta { background: var(--rb-navy); color: #e3eef9; }
.rb-cta h2 { color: #fff; margin-top: 0; }
.rb-cta-inner { display: grid; grid-template-columns: 2fr 1fr; gap: 30px; align-items: center; }
.rb-cta-inner p:last-child { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 800px) { .rb-cta-inner { grid-template-columns: 1fr; } .rb-cta-inner p:last-child { justify-content: flex-start; } }

/* ---------- Tables ---------- */
.rb-table { width: 100%; border-collapse: collapse; font-size: .95rem; background: #fff; border: 1px solid var(--rb-border); }
.rb-table th { background: var(--rb-navy); color: #fff; text-align: left; padding: 10px 12px; font-weight: 600; }
.rb-table td { padding: 9px 12px; border-top: 1px solid var(--rb-border); }
.rb-table tbody tr:nth-child(even) td { background: var(--rb-bg-alt); }
.rb-table .rb-total td { font-weight: 700; background: var(--rb-blue-light); }
.rb-table-compact { max-width: 560px; }
@media (max-width: 700px) { .rb-table { display: block; overflow-x: auto; white-space: nowrap; } }

/* ---------- Timeline ---------- */
.rb-timeline { border-left: 3px solid var(--rb-border); margin: 26px 0 10px 8px; }
.rb-tl-item { display: grid; grid-template-columns: 110px 1fr; gap: 18px; position: relative; padding: 0 0 26px 24px; }
.rb-tl-item::before { content: ""; position: absolute; left: -9px; top: 6px; width: 15px; height: 15px; border-radius: 50%; background: var(--rb-blue); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--rb-blue); }
.rb-tl-key::before { background: var(--rb-accent); box-shadow: 0 0 0 2px var(--rb-accent); }
.rb-tl-year { font-family: var(--rb-font-head); font-weight: 800; color: var(--rb-blue); font-size: 1.15rem; padding-top: 1px; }
.rb-tl-key .rb-tl-year { color: var(--rb-accent-dark); }
.rb-tl-item h3 { margin: 0 0 .3em; }
.rb-tl-item p { margin: 0; }
@media (max-width: 600px) { .rb-tl-item { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- Glossary & notes ---------- */
.rb-glossary dt { font-weight: 700; color: var(--rb-navy); margin-top: 16px; }
.rb-glossary dd { margin: 4px 0 0; padding-left: 14px; border-left: 3px solid var(--rb-blue-light); }
.rb-note { font-size: .88rem; color: var(--rb-muted); border-left: 4px solid var(--rb-accent); background: #fff8f1; padding: 10px 14px; border-radius: 0 6px 6px 0; }
.rb-next { margin-top: 30px; font-weight: 700; }

/* ---------- Footer ---------- */
.rb-footer { background: var(--rb-navy-dark); color: #b9c8d8; font-size: .92rem; }
.rb-footer a { color: #fff; }
.rb-footer-cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 34px; padding-top: 46px; padding-bottom: 30px; }
.rb-footer h4 { color: #fff; margin: 0 0 12px; font-size: 1rem; }
.rb-footer ul { list-style: none; padding: 0; margin: 0; }
.rb-footer li { margin-bottom: 6px; }
.rb-footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 16px 0 22px; font-size: .82rem; }
.rb-footer-bottom p { margin: 4px 0; }
@media (max-width: 800px) { .rb-footer-cols { grid-template-columns: 1fr; } }

/* ---------- WordPress core alignment classes ---------- */
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin: 0 auto 1em; }
.wp-caption-text { font-size: .85rem; color: var(--rb-muted); }

/* ---------- Small screens ---------- */
@media (max-width: 600px) {
	body { font-size: 16px; }
	.rb-topbar .rb-wrap > span:first-child, .rb-logo-text small { display: none; }
	.rb-banner h1 { font-size: 1.6rem; }
	.rb-hero h1 { font-size: 1.9rem; }
	h2 { font-size: 1.35rem; }
}

/* ---------- RBRVS EZ-Fees page ---------- */
.rb-ez-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 34px; align-items: center; margin-bottom: 20px; }
.rb-ez-grid h2 { margin-top: 0; }
.rb-ez-video video { width: 100%; border-radius: var(--rb-radius); background: #000; box-shadow: 0 6px 20px rgba(19,53,91,.18); display: block; }
.rb-ez-video p { margin-top: 8px; }
.rb-checks { list-style: none; padding: 0; }
.rb-checks li { padding-left: 30px; position: relative; margin-bottom: 8px; font-weight: 600; color: var(--rb-navy); }
.rb-checks li::before { content: "\2713"; position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--rb-accent); color: #fff; font-size: .8rem; display: flex; align-items: center; justify-content: center; }
.rb-btn-row { display: flex; gap: 12px; flex-wrap: wrap; }
.rb-edition { text-align: center; display: flex; flex-direction: column; }
.rb-edition img { max-height: 190px; width: auto; margin: 0 auto 10px; }
.rb-edition h3 { margin-bottom: 4px; }
.rb-edition p:last-child { margin-top: auto; }
.rb-edition-featured { border: 2px solid var(--rb-accent); box-shadow: 0 8px 22px rgba(240,138,36,.18); }
.rb-price { font-family: var(--rb-font-head); font-size: 2rem; font-weight: 800; color: var(--rb-navy); margin: 0; }
.rb-compare td:not(:first-child), .rb-compare th:not(:first-child) { text-align: center; width: 15%; }
.rb-compare td:not(:first-child) { color: #1a8f3c; font-weight: 800; font-size: 1.1rem; }
.rb-cta-box { background: var(--rb-blue-light); border-radius: var(--rb-radius); padding: 22px; text-align: center; margin-top: 30px; }
.rb-cta-box p { margin: 0 0 10px; font-weight: 600; }
@media (max-width: 800px) { .rb-ez-grid { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .rb-compare { white-space: normal; } }
