/*
Theme Name: SBAMatchPro
Theme URI: https://sbamatchpro.com
Author: MD5TO
Description: Bilingual (English/Spanish) theme for SBAMatchPro. Navy brand bar, scrollable section menu, tool cards on the home page and a clean reading column. Made for the SBAMatchPro plugin.
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: sbamatchpro-theme
*/

/* Layout: sticky brand bar, scrollable section menu, one centered reading column (760px; 1080px for the bars and footer). */
:root {
  --pv-bg: #f4f6fa;
  --pv-surface: #ffffff;
  --pv-ink: #14213d;
  --pv-ink-2: #3d4a66;
  --pv-muted: #6b7690;
  --pv-line: #dfe3ec;
  --pv-accent: #e8873a;
  --pv-display: "Fraunces", Georgia, "Times New Roman", serif;
  --pv-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}
html, body { background: var(--pv-bg); color: var(--pv-ink); }
body { font-family: var(--pv-body); font-size: 17px; line-height: 1.6; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--pv-ink); }
.pv-wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.pv-col { max-width: 760px; margin: 0 auto; }
.pv-bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--pv-ink); color: #fff; }
.pv-bar .pv-col { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 12px; }
.pv-brand { font-family: var(--pv-display); font-weight: 700; font-size: 1.35rem; color: #fff; text-decoration: none; letter-spacing: -.01em; }
.pv-brand b { color: var(--pv-accent); font-weight: 700; }
.pv-nav { background: var(--pv-surface); border-bottom: 1px solid var(--pv-line); position: sticky; top: calc(env(safe-area-inset-top, 0px) + 56px); z-index: 19; }
.pv-nav .pv-col { display: flex; gap: 4px; overflow-x: auto; padding-block: 8px; scrollbar-width: none; }
.pv-nav a { flex: none; padding: 8px 12px; border-radius: 999px; text-decoration: none; color: var(--pv-ink-2); font-weight: 600; font-size: .92rem; white-space: nowrap; }
.pv-nav a[aria-current="page"] { background: var(--pv-ink); color: #fff; }
.pv-nav a:focus-visible, .pv-bar a:focus-visible { outline: 3px solid var(--pv-accent); outline-offset: 2px; }
.pv-note { background: #fff6ee; border-bottom: 1px solid #f1d2b4; color: #7a3f10; font-size: .88rem; }
.pv-note .pv-col { padding-block: 8px; }
main.pv-wrap { padding-block: 24px 120px; }
.pv-page h1 { font-family: var(--pv-display); font-weight: 700; font-size: clamp(1.9rem, 5vw, 2.6rem); line-height: 1.15; letter-spacing: -.015em; margin: 0 0 16px; text-wrap: balance; }
.pv-page h2 { font-family: var(--pv-display); font-weight: 650; font-size: 1.45rem; line-height: 1.25; margin: 32px 0 10px; text-wrap: balance; }
.pv-page h3 { font-size: 1.08rem; margin: 22px 0 6px; }
.pv-page p, .pv-page li { max-width: 68ch; }
.pv-page a { color: #1d4f9c; }
.pv-page table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.pv-page .wp-block-table { margin: 16px 0; overflow-x: auto; }
.pv-page .wp-block-table th, .pv-page .wp-block-table td { border: 1px solid var(--pv-line); padding: 8px 10px; text-align: left; vertical-align: top; }
.pv-page .wp-block-table th { background: #eef1f7; }
.pv-hero { display: grid; gap: 18px; padding-block: 8px 24px; }
.pv-hero .kicker { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--pv-accent); }
.pv-hero h1 { font-size: clamp(2.1rem, 6vw, 3.1rem); }
.pv-hero p { font-size: 1.1rem; color: var(--pv-ink-2); margin: 0; }
.pv-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.pv-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin: 8px 0 28px; }
.pv-tool { display: grid; gap: 4px; padding: 16px; background: var(--pv-surface); border: 1px solid var(--pv-line); border-radius: 12px; text-decoration: none; color: var(--pv-ink) !important; }
.pv-tool strong { font-size: 1.05rem; }
.pv-tool > span { color: var(--pv-muted); font-size: .92rem; }
.pv-tool:hover { border-color: var(--pv-ink); }
.pv-feature { display: grid; gap: 10px; text-decoration: none; color: var(--pv-ink) !important; }
.pv-feature img { border-radius: 12px; display: block; width: 100%; height: auto; }
.pv-feature strong { font-family: var(--pv-display); font-size: 1.3rem; }
.pv-img { border-radius: 12px; display: block; width: 100%; height: auto; margin: 0 0 18px; }
.pv-cat h2 small { font-family: var(--pv-body); font-size: .85rem; color: var(--pv-muted); font-weight: 600; }
.pv-cat ol { padding-left: 1.3em; margin: 0; display: grid; gap: 4px; }
.pv-cat li::marker { color: var(--pv-muted); font-variant-numeric: tabular-nums; }
.pv-cat span { color: var(--pv-ink-2); }
.pv-cat a { color: var(--pv-ink); text-decoration: none; }
.pv-cat a:hover { color: #1d4f9c; text-decoration: underline; }
.pv-kicker { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--pv-accent); margin: 0 0 8px; }
.pv-foot { border-top: 1px solid var(--pv-line); margin-top: 40px; padding-top: 16px; color: var(--pv-muted); font-size: .88rem; }
.sbamp .sbamp-promo { right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---- Theme additions ---- */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
img { max-width: 100%; height: auto; }
a { color: #1d4f9c; }
.pv-col-wide { max-width: 1080px; }
.sbt-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sbt-skip { position: absolute; left: -9999px; top: 0; z-index: 100; background: #fff; color: var(--pv-ink); padding: 8px 12px; }
.sbt-skip:focus { left: 8px; top: 8px; }
.sbt-muted, .sbt-lead { color: var(--pv-ink-2); }
.sbt-lead { font-size: 1.1rem; margin: 0 0 8px; }

/* Menu (wp_nav_menu or fallback) */
.pv-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.pv-nav li { flex: none; }
.pv-nav .pv-col::-webkit-scrollbar { display: none; }
.pv-nav a[aria-current="page"], .pv-nav .current-menu-item > a { background: var(--pv-ink); color: #fff; }

/* Content */
.sbt-content > *:first-child { margin-top: 0; }
.sbt-content h2 { font-family: var(--pv-display); }
.sbt-content blockquote { margin: 16px 0; padding: 12px 16px; border-left: 4px solid var(--pv-accent); background: #fff; border-radius: 0 10px 10px 0; }
.sbt-content .wp-block-table table { min-width: 520px; }
.pv-kicker a { color: inherit; text-decoration: none; }
.sbt-back { margin-top: 32px; }

/* Home */
.pv-feature { margin: 0 0 20px; }
.pv-feature .sbt-muted { font-size: .98rem; }
.sbt-topics { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: 8px 0 16px; }
.sbt-topic { display: grid; gap: 2px; padding: 14px 16px; background: var(--pv-surface); border: 1px solid var(--pv-line); border-radius: 12px; text-decoration: none; color: var(--pv-ink); }
.sbt-topic span { color: var(--pv-muted); font-size: .9rem; }
.sbt-topic:hover { border-color: var(--pv-ink); }
.pv-page .sbamp-newsletter { margin-top: 32px; }

/* Blog and archives */
.pv-cat h2 a { color: inherit; text-decoration: none; }
.sbt-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin: 20px 0; }
.sbt-card { display: grid; gap: 6px; align-content: start; padding: 0 0 16px; background: var(--pv-surface); border: 1px solid var(--pv-line); border-radius: 12px; overflow: hidden; text-decoration: none; color: var(--pv-ink); }
.sbt-card img { display: block; width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; }
.sbt-card strong, .sbt-card span { padding: 0 16px; }
.sbt-card strong { font-size: 1.05rem; line-height: 1.3; margin-top: 10px; }
.sbt-card span { color: var(--pv-muted); font-size: .92rem; }
.sbt-card:hover { border-color: var(--pv-ink); }
.sbt-pages .nav-links { display: flex; gap: 6px; flex-wrap: wrap; }
.sbt-pages .page-numbers { padding: 6px 12px; border: 1px solid var(--pv-line); border-radius: 8px; text-decoration: none; background: #fff; }
.sbt-pages .current { background: var(--pv-ink); color: #fff; border-color: var(--pv-ink); }
.search-form { display: flex; gap: 8px; margin: 12px 0; }
.search-form input[type="search"] { flex: 1; min-height: 44px; padding: 8px 12px; border: 1px solid #c9cfdc; border-radius: 10px; font: inherit; }
.search-form input[type="submit"] { min-height: 44px; padding: 8px 16px; border: 0; border-radius: 10px; background: var(--pv-ink); color: #fff; font: inherit; font-weight: 700; }

/* Footer */
.sbt-footer { background: var(--pv-ink); color: #d5dbe8; padding-block: 36px 24px; margin-top: 40px; }
.sbt-footer a { color: #fff; }
.sbt-foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }
.sbt-foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sbt-foot-grid p { margin: 8px 0 0; font-size: .95rem; }
.sbt-foot-brand { font-size: 1.3rem; }
.sbt-foot-title { font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: .06em; font-size: .78rem !important; margin: 0 0 10px !important; }
.sbt-copy { border-top: 1px solid rgba(255, 255, 255, .15); margin: 24px 0 0; padding-top: 16px; font-size: .85rem; }
main.pv-wrap { padding-block: 24px 40px; }
body .sbamp-footnote { background: var(--pv-bg); }
@media (max-width: 720px) {
	.sbt-foot-grid { grid-template-columns: 1fr; }
}
.pv-page .sbt-topic, .pv-page .sbt-card { color: var(--pv-ink); }

/* Business card band on the home page */
.pv-cards-band { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: center; margin: 36px 0; padding: 28px; border-radius: 18px; background: linear-gradient(135deg, #14213d 0%, #26375c 100%); color: #fff; }
.pv-cards-band h2 { color: #fff; margin: 6px 0 8px; }
.pv-cards-band p { color: #d5dbe8; margin: 0 0 16px; }
.pv-cards-band .kicker { color: #f4b37a; }
.pv-cards-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pv-cards-links a { display: block; padding: 11px 14px; border-radius: 10px; background: rgba(255,255,255,.08); color: #fff; text-decoration: none; font-weight: 600; }
.pv-cards-links a:hover { background: rgba(255,255,255,.16); }
@media (max-width: 720px) { .pv-cards-band { grid-template-columns: 1fr; padding: 22px 18px; } }
