/*
Theme Name: Rolf SI San Diego
Theme URI: https://rolfsi.com/
Author: Archie Underwood
Description: Fast, search-optimized theme for Rolf Structural Integration in San Diego. Local business schema, FAQ schema, breadcrumbs, per-page SEO fields, neighborhood landing-page template, and a Customizer panel for address, hours, rates and booking. Built around the terms Structural Integration, Rolf Method, Rolfing and Rolfer in San Diego.
Version: 1.0.2
Requires at least: 6.2
Tested up to: 6.8
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: rolf-si-sandiego
Tags: one-column, custom-menu, custom-logo, featured-images, accessibility-ready, blog
*/

/* ---------- Tokens ---------- */
:root {
	/* Palette matched to rolfsi.com */
	--ink: #333333;        /* body text */
	--ink-soft: #666666;
	--paper: #ffffff;
	--paper-2: #f0f0f0;
	--line: #cccccc;
	--sea: #008000;        /* deep green – links */
	--sea-deep: #333333;   /* charcoal – dark bands */
	--clay: #008000;       /* buttons (white text passes contrast) */
	--clay-deep: #006400;
	--leaf: #45b35c;       /* logo green – accents, and text on charcoal */
	--white: #ffffff;
	--radius: 10px;
	--shadow: 0 1px 2px rgba(0,0,0,.05), 0 6px 18px rgba(0,0,0,.06);
	--serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
	--sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--wrap: 1120px;
	--gutter: clamp(16px, 4vw, 32px);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font: 18px/1.65 var(--sans);
	text-rendering: optimizeLegibility;
}
img, svg, iframe { max-width: 100%; height: auto; }
a { color: var(--sea); text-underline-offset: 3px; }
a:hover { color: var(--clay-deep); }
:focus-visible { outline: 3px solid var(--clay); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.2; color: var(--ink); margin: 0 0 .5em; font-weight: 600; }
h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.25rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1.1em; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 1000; background: var(--white); padding: 10px 14px; clip: auto; width: auto; height: auto; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap--narrow { max-width: 760px; }
.section { padding: clamp(48px, 8vw, 96px) 0; }
.section--alt { background: var(--paper-2); }
.section--dark { background: var(--sea-deep); color: #e6e6e6; }
.section--dark h2, .section--dark h3 { color: var(--white); }
.section--dark a { color: var(--leaf); }
.eyebrow { font: 600 .78rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--clay-deep); margin-bottom: 14px; display: block; }
.section--dark .eyebrow { color: var(--leaf); }
.section--dark .lead { color: #d6d6d6; }
.section--dark .card__num { color: var(--leaf); }
.lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 62ch; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 14px 24px; border-radius: 999px;
	font: 600 1rem/1 var(--sans); text-decoration: none;
	background: var(--clay); color: var(--white); border: 2px solid var(--clay);
	transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--clay-deep); border-color: var(--clay-deep); color: var(--white); }
.btn--ghost { background: transparent; color: var(--sea); border-color: var(--sea); }
.btn--ghost:hover { background: var(--sea); color: var(--white); border-color: var(--sea); }
.section--dark .btn--ghost { color: var(--white); border-color: rgba(255,255,255,.6); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* ---------- Top bar & header ---------- */
.topbar { background: var(--sea-deep); color: #dddddd; font-size: .88rem; }
.topbar .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 20px; padding-top: 8px; padding-bottom: 8px; }
.topbar a { color: var(--white); text-decoration: none; font-weight: 600; }
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { max-height: 52px; width: auto; }
.brand__mark { flex: none; }
.brand__name { font: italic 600 1.3rem/1.1 var(--serif); color: var(--sea); display: block; }
.brand__tag { white-space: nowrap; font-size: .8rem; color: var(--ink-soft); display: block; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font: 600 .95rem var(--sans); color: var(--ink); cursor: pointer; }
.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.primary-nav a { display: block; white-space: nowrap; padding: 10px 10px; text-decoration: none; color: var(--ink); font-weight: 500; font-size: .98rem; border-radius: 8px; }
.primary-nav a:hover, .primary-nav .current-menu-item > a { color: var(--sea); background: var(--paper-2); }
.primary-nav .menu-cta > a { background: var(--clay); color: var(--white); padding: 10px 18px; border-radius: 999px; margin-left: 6px; }
.primary-nav .menu-cta > a:hover { background: var(--clay-deep); color: var(--white); }
.primary-nav .sub-menu { display: none; }

@media (max-width: 1180px) {
	.nav-toggle { display: inline-block; }
	.primary-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
	.primary-nav.is-open { display: block; }
	.primary-nav ul { flex-direction: column; align-items: stretch; padding: 8px var(--gutter) 16px; }
	.primary-nav .menu-cta > a { margin: 8px 0 0; text-align: center; }
	.site-header .wrap { position: relative; }
}

/* ---------- Hero ---------- */
.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(48px, 7vw, 80px); background: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%); border-bottom: 1px solid var(--line); }
.hero .wrap { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.hero h1 span { color: var(--sea); }
.hero__quote { font-family: var(--serif); font-style: italic; color: var(--ink-soft); border-left: 3px solid var(--leaf); padding-left: 14px; margin: 22px 0 0; font-size: 1.02rem; }
.hero__quote cite { display: block; font-style: normal; font-size: .85rem; margin-top: 4px; }
.hero__art { border-radius: 16px; overflow: hidden; background: var(--paper); aspect-ratio: 4 / 5; box-shadow: var(--shadow); }
.hero__art img, .hero__art svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero__art--logo { display: grid; place-items: center; padding: 12%; border: 1px solid var(--line); }
.hero__art--logo img { object-fit: contain; }
.hero__facts { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 22px; padding: 0; list-style: none; font-size: .92rem; color: var(--ink-soft); }
.hero__facts li::before { content: "✓"; color: var(--sea); font-weight: 700; margin-right: 6px; }
@media (max-width: 820px) {
	.hero .wrap { grid-template-columns: 1fr; }
	.hero__art { aspect-ratio: 16 / 10; order: -1; }
}

/* ---------- Grids & cards ---------- */
.grid { display: grid; gap: 20px; }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 960px) { .grid--4 { grid-template-columns: repeat(2, 1fr); } .grid--3 { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .grid--4, .grid--2 { grid-template-columns: 1fr; } }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.card__num { font: 600 2.2rem/1 var(--serif); color: var(--clay); display: block; margin-bottom: 10px; }
.section--dark .card { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); box-shadow: none; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: start; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

/* ---------- Compare table ---------- */
.compare { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); font-size: .98rem; }
.compare th, .compare td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare thead th { background: var(--sea); color: var(--white); font-family: var(--serif); font-weight: 600; }
.table-scroll { overflow-x: auto; margin-bottom: 1.4em; }

/* ---------- Reviews ---------- */
.review { margin: 0; display: flex; flex-direction: column; }
.review blockquote { margin: 0 0 14px; font-family: var(--serif); font-size: 1.08rem; line-height: 1.55; }
.review blockquote::before { content: "“"; display: block; font-size: 3rem; line-height: .6; color: var(--leaf); margin-bottom: 8px; }
.review figcaption { margin-top: auto; font-size: .9rem; color: var(--ink-soft); font-weight: 600; }

/* ---------- Info list (rates/hours/location) ---------- */
.info-list { list-style: none; margin: 0; padding: 0; }
.info-list li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.info-list li span:first-child { font-weight: 600; }
.section--dark .info-list li { border-color: rgba(255,255,255,.15); }
.price { font: 600 2.6rem/1 var(--serif); color: var(--clay); }
.note { font-size: .9rem; color: var(--ink-soft); }
.section--dark .note { color: #bbbbbb; }
.map-embed { border: 0; width: 100%; aspect-ratio: 4 / 3; border-radius: var(--radius); background: var(--paper-2); }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; }
.faq details { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; }
.faq summary { cursor: pointer; padding: 18px 52px 18px 20px; font: 600 1.08rem/1.4 var(--serif); list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 20px; top: 14px; font: 400 1.6rem/1 var(--sans); color: var(--sea); }
.faq details[open] summary::after { content: "–"; }
.faq .faq__a { padding: 0 20px 18px; color: var(--ink-soft); }

/* ---------- Content pages ---------- */
.page-hero { background: var(--paper-2); padding: clamp(32px, 6vw, 64px) 0 clamp(28px, 5vw, 48px); border-bottom: 1px solid var(--line); }
.page-hero h1 { margin-bottom: .3em; }
.page-hero .lead { margin-bottom: 0; }
.breadcrumbs { font-size: .86rem; color: var(--ink-soft); margin-bottom: 14px; }
.breadcrumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line); }
.breadcrumbs a { color: var(--ink-soft); }
.entry { padding: clamp(32px, 6vw, 64px) 0; }
.entry-content > * { max-width: 760px; margin-left: auto; margin-right: auto; }
.entry-content > .alignwide { max-width: var(--wrap); }
.entry-content > .alignfull { max-width: none; }
.entry-content h2 { margin-top: 1.6em; }
.entry-content h3 { margin-top: 1.4em; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content li { margin-bottom: .4em; }
.entry-content img { border-radius: var(--radius); }
.entry-content blockquote { border-left: 3px solid var(--leaf); margin: 1.5em auto; padding: 4px 0 4px 18px; font-family: var(--serif); font-size: 1.12rem; }
.entry-meta { font-size: .9rem; color: var(--ink-soft); }
.cta-box { background: var(--sea-deep); color: #e6e6e6; border-top: 4px solid var(--leaf); border-radius: 14px; padding: clamp(24px, 4vw, 40px); margin: 48px auto 0; max-width: 760px; }
.cta-box h2 { color: var(--white); margin-top: 0; }
.cta-box .btn--ghost { color: var(--white); border-color: rgba(255,255,255,.6); }

/* ---------- Post list ---------- */
.post-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.post-card img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.post-card__body { padding: 20px 22px 24px; }
.post-card h3 { font-size: 1.2rem; }
.post-card h3 a { text-decoration: none; color: var(--ink); }
.post-card h3 a:hover { color: var(--sea); }
.pagination { margin-top: 32px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.pagination .page-numbers { padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; background: var(--white); }
.pagination .current { background: var(--sea); color: var(--white); border-color: var(--sea); }

/* ---------- Footer ---------- */
.site-footer { background: #2b2b2b; color: #bbbbbb; border-top: 4px solid var(--leaf); font-size: .95rem; padding: 56px 0 28px; }
.site-footer a { color: #ffffff; }
.site-footer a:hover { color: var(--leaf); }
.site-footer h2 { color: var(--white); font-size: 1.15rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 6px; }
.footer-legal { border-top: 1px solid rgba(255,255,255,.1); margin-top: 36px; padding-top: 18px; font-size: .82rem; color: #999999; }
.footer-legal p { margin-bottom: .5em; }

/* ---------- Mobile call bar ---------- */
.callbar { display: none; }
@media (max-width: 640px) {
	.callbar { display: grid; grid-template-columns: 1fr 1fr; position: fixed; bottom: 0; left: 0; right: 0; z-index: 60; box-shadow: 0 -4px 16px rgba(0,0,0,.12); }
	.callbar a { text-align: center; padding: 15px 8px; font-weight: 700; text-decoration: none; color: var(--white); background: var(--sea); }
	.callbar a + a { background: var(--clay); }
	body { padding-bottom: 54px; }
}

/* ---------- WP core alignment ---------- */
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption-text, figcaption { font-size: .88rem; color: var(--ink-soft); }
.search-form { display: flex; gap: 8px; }
.search-form input[type="search"] { flex: 1; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: var(--white); }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* ---------- Small screens ---------- */
@media (max-width: 640px) {
	.brand__tag { display: none; }
	.brand__name { font-size: 1.05rem; }
	.topbar .wrap > span:first-child { display: none; }
	.topbar .wrap { justify-content: center; }
}
@media (min-width: 1181px) { .brand__tag { display: none; } }
.section--dark .btn:not(.btn--ghost), .cta-box .btn:not(.btn--ghost) { color: var(--white); }
.section--dark .btn:not(.btn--ghost):hover, .cta-box .btn:not(.btn--ghost):hover { color: var(--white); }
.hero__art--logo img { width: 100%; height: auto; max-height: 100%; }
@media (max-width: 820px) {
	.hero__art--logo { aspect-ratio: auto; padding: 24px; }
	.hero__art--logo img { width: auto; max-width: 100%; height: 200px; }
}
@media (max-width: 640px) {
	.callbar a { background: var(--sea-deep); }
	.callbar a + a { background: var(--clay); }
}

/* ---------- Legacy content from the previous theme ---------- */
.entry-content { display: flow-root; }          /* contain floats so the footer never slides under content */
.site-footer, .cta-box { clear: both; }

/* Floated boxes (e.g. the green "Archie's Resume" box) stay beside the text, inside the reading column */
.entry-content > .alignright { float: right; margin: 4px max(0px, calc((100% - 760px) / 2)) 16px 24px !important; }
.entry-content > .alignleft  { float: left;  margin: 4px 24px 16px max(0px, calc((100% - 760px) / 2)) !important; }
.entry-content [style*="background"] a { color: inherit; }
@media (max-width: 640px) {
	.entry-content > .alignright, .entry-content > .alignleft { float: none; width: auto !important; margin: 0 0 20px !important; }
}

/* Pages built as two side-by-side div.alignleft columns (Contact) become a responsive two-column grid */
.entry-content:has(> div.alignleft + div.alignleft) {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
	gap: 24px clamp(24px, 5vw, 64px);
	align-items: start;
	max-width: var(--wrap);
	margin: 0 auto;
}
.entry-content:has(> div.alignleft + div.alignleft) > div.alignleft {
	float: none; max-width: none !important; width: auto; margin: 0 !important; display: flow-root;
}
.entry-content:has(> div.alignleft + div.alignleft) > *:not(div.alignleft) { grid-column: 1 / -1; }

/* Old inline indents and empty spacer paragraphs */
.entry-content [style*="padding-left"] { padding-left: 0 !important; }
.entry-content img.alignleft { margin: 0 16px 12px 0; }
.entry-content p:empty, .entry-content p:has(> br:only-child) { display: none; }

/* ---------- Gravity Forms (works with or without the plugin's own CSS) ---------- */
.gform_wrapper { margin: 0; }
.gform_wrapper ul.gform_fields { list-style: none; margin: 0; padding: 0; }
.gform_wrapper li.gfield { margin: 0 0 16px; padding: 0; }
.entry-content .gform_wrapper .gfield_label { display: block; float: none; width: auto; margin: 0 0 6px; padding: 0; font: 600 .95rem/1.3 var(--sans); color: var(--ink); }
.gform_wrapper .gfield_required { color: #b00020; margin-left: 3px; }
.gform_wrapper .ginput_container { margin: 0 !important; width: 100% !important; float: none !important; }
.gform_wrapper input[type="text"], .gform_wrapper input[type="email"], .gform_wrapper input[type="tel"], .gform_wrapper input[type="url"], .gform_wrapper input[type="number"], .gform_wrapper select, .gform_wrapper textarea {
	width: 100% !important; box-sizing: border-box; padding: 12px 14px; font: inherit; font-size: 1rem;
	color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: 8px;
}
.gform_wrapper textarea { min-height: 160px; resize: vertical; }
.gform_wrapper input:focus, .gform_wrapper textarea:focus, .gform_wrapper select:focus { outline: 3px solid rgba(0,128,0,.25); border-color: var(--sea); }
.gform_wrapper .gform_footer { padding: 8px 0 0 !important; margin: 0 !important; }
.gform_wrapper .gform_button, .gform_wrapper button[type="submit"], .gform_wrapper input[type="submit"] {
	display: inline-flex; align-items: center; padding: 14px 28px; border-radius: 999px; border: 2px solid var(--clay);
	background: var(--clay); color: var(--white); font: 600 1rem/1 var(--sans); cursor: pointer; width: auto;
}
.gform_wrapper .gform_button:hover, .gform_wrapper button[type="submit"]:hover { background: var(--clay-deep); border-color: var(--clay-deep); }
.gform_wrapper .ginput_recaptcha { overflow: hidden; max-width: 100%; }
.gform_wrapper .validation_message, .gform_wrapper .gform_validation_errors { color: #b00020; font-size: .9rem; }

/* ---------- Comments ---------- */
.comment-respond textarea, .comment-respond input[type="text"], .comment-respond input[type="email"], .comment-respond input[type="url"] {
	width: 100%; max-width: 100%; box-sizing: border-box; padding: 12px 14px; font: inherit; font-size: 1rem;
	border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--ink);
}
.comment-respond input[type="submit"] { padding: 14px 28px; border-radius: 999px; border: 2px solid var(--clay); background: var(--clay); color: var(--white); font: 600 1rem/1 var(--sans); cursor: pointer; }
.comment-list { list-style: none; padding: 0; }
.brand__name { white-space: nowrap; }
@media (min-width: 1181px) and (max-width: 1440px) {
	.primary-nav a { padding: 10px 7px; font-size: .95rem; }
	.primary-nav .menu-cta > a { padding: 10px 16px; margin-left: 4px; }
}
.card--feature h3 { color: var(--sea); }
