/*
Theme Name: SP Agency
Theme URI: https://thespagency.com/
Author: SP Agency
Author URI: https://thespagency.com/
Description: A clean, mobile-first WordPress theme for SP Agency, an Indiana insurance agency. Built for lead generation: personal auto, commercial auto, and employee group health plans. Burgundy brand styling to match the agency's printed materials. Includes shortcode lead forms that email the agency.
Version: 2.5
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: thespagency
Tags: insurance, business, responsive, custom-logo, custom-menu
*/

/* ---------- Base ---------- */
* { box-sizing: border-box; }
:root {
  --burgundy: #7b1e2b;
  --burgundy-dark: #5c1620;
  --burgundy-bright: #9c2436;
  --gold: #d4a017;
  --gold-dark: #b3870e;
  --ink: #1f1f1f;
  --light: #faf6f7;
  --border: #e7dcdc;
  --text: #232323;
  --muted: #5c5c5c;
  --white: #ffffff;
}
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
}
a { color: var(--burgundy); }
a:hover { color: var(--burgundy-bright); }
img { max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.25; color: var(--ink); font-family: Georgia, "Times New Roman", serif; }
h1 { font-size: 2.1rem; }
h2 { font-size: 1.6rem; margin-top: 2.2rem; }
h3 { font-size: 1.25rem; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---------- Top bar ---------- */
.topbar { background: var(--burgundy); color: #fff; text-align: center; font-size: 0.95rem; padding: 9px 20px; }
.topbar a { color: #fff; font-weight: 700; text-decoration: none; }
.topbar a:hover { text-decoration: underline; }

/* ---------- Header ---------- */
.site-header { background: var(--white); color: var(--ink); }
.site-branding { text-align: center; padding: 22px 20px 14px; }
.site-branding a { color: var(--ink); text-decoration: none; }
.site-branding .sp-emblem { max-height: 110px; width: auto; }
.site-branding .custom-logo { max-height: 110px; width: auto; }
.site-title { font-size: 1.9rem; font-weight: 700; margin: 6px 0 0; line-height: 1.2; font-family: Georgia, "Times New Roman", serif; }
.site-tagline { font-size: 1rem; font-style: italic; color: var(--burgundy); margin: 2px 0 0; font-family: Georgia, "Times New Roman", serif; }
.main-nav { background: #f7f2f2; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.main-nav li a { display: block; color: var(--ink); text-decoration: none; padding: 12px 16px; font-weight: 600; font-size: 0.92rem; text-transform: uppercase; letter-spacing: 0.04em; }
.main-nav li a:hover { color: var(--burgundy); }
.main-nav .current-menu-item a, .main-nav .current_page_item a { color: var(--burgundy); font-weight: 800; }

/* ---------- Hero ---------- */
.hero { background-image: url("assets/hero.jpg"); background-size: cover; background-position: center; color: #fff; padding: 56px 0; }
.hero .container { display: flex; justify-content: flex-end; }
.hero-panel { background: var(--burgundy); padding: 40px 38px; margin: 8px 0; max-width: 580px; }
.hero h1 { color: #fff; font-size: 2.4rem; margin: 0 0 12px; max-width: 720px; text-transform: uppercase; letter-spacing: 0.02em; }
.hero p { font-size: 1.15rem; color: #f6e8ea; max-width: 680px; }
.hero .btn { margin-right: 10px; margin-top: 8px; }
.btn { display: inline-block; background: #fff; color: #1f1f1f !important; text-decoration: none; font-weight: 700; padding: 14px 24px; border-radius: 6px; border: 2px solid var(--burgundy); cursor: pointer; font-size: 1rem; }
.btn:hover { background: #f6e8ea; color: #1f1f1f !important; }
.btn-outline { background: transparent; border: 2px solid #fff; color: #fff !important; }
.btn-outline:hover { background: rgba(255,255,255,0.15); }

/* ---------- Sections ---------- */
.section { padding: 44px 0; }
.section-light { background: var(--light); }
.section h2 { margin-top: 0; }
.cards { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 24px; }
.card { border: 1px solid var(--border); border-radius: 10px; padding: 26px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.card h3 { margin-top: 0; }
.card h3 a { text-decoration: none; color: var(--ink); }
.card h3 a:hover { color: var(--burgundy); }
.steps { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 24px; }
.step { border-top: 4px solid var(--burgundy); padding-top: 10px; }
.step-num { font-size: 2rem; font-weight: 800; color: var(--burgundy); line-height: 1; }
.faq details { border: 1px solid var(--border); border-radius: 8px; padding: 14px 18px; margin-bottom: 12px; background: #fff; }
.faq summary { font-weight: 700; cursor: pointer; color: var(--ink); }
.contact-strip { background: var(--burgundy); color: #fff; padding: 36px 0; text-align: center; }
.contact-strip h2 { color: #fff; margin: 0 0 8px; }
.contact-strip a { color: #fff; font-weight: 700; }
.page-content { padding: 36px 0 56px; }
.page-header { background: var(--light); padding: 36px 0 24px; border-bottom: 1px solid var(--border); }
.page-header h1 { margin: 0; }
.towns { font-size: 1.05rem; }

/* ---------- Forms ---------- */
.sp-form { max-width: 640px; margin: 28px auto; padding: 1.5rem; border: 1px solid #e6dada; border-radius: 12px; background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
.sp-form .btn { width: 100%; text-align: center; }
.sp-form .field { margin-bottom: 16px; }
.sp-form label { display: block; font-weight: 700; margin-bottom: 5px; }
.sp-form input[type="text"],
.sp-form input[type="tel"],
.sp-form input[type="email"],
.sp-form input[type="number"],
.sp-form textarea,
.sp-form select { width: 100%; padding: 11px 12px; font-size: 1rem; border: 1px solid #b9c6cf; border-radius: 6px; font-family: inherit; background: #fff; }
.sp-form input:focus, .sp-form textarea:focus, .sp-form select:focus { outline: none; border-color: var(--burgundy); box-shadow: 0 0 0 3px rgba(123,30,43,0.18); }
.sp-form textarea { min-height: 110px; }
.sp-form .consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 0.95rem; }
.sp-form .consent input { margin-top: 4px; flex-shrink: 0; }
.sp-form .hp { display: none !important; }
.sp-notice { border-radius: 8px; padding: 16px 20px; margin: 24px 0; }
.sp-notice-success { background: #f3e8ea; border: 1px solid #c98a94; color: #571420; }
.sp-notice-error { background: #fdecea; border: 1px solid #e5a49f; color: #7a231d; }
.form-note { font-size: 0.9rem; color: var(--muted); }
.sp-step-error { color: #7a231d; font-weight: 700; }
.sp-form .sp-step-nav { display: flex; gap: 12px; align-items: center; }
.sp-form .sp-back { background: none; border: none; color: var(--burgundy); font-weight: 700; cursor: pointer; font-size: 1rem; padding: 0; }

/* ---------- Sticky mobile quote bar ---------- */
.sticky-quote-bar { display: none; }
@media (max-width: 700px) {
  body { padding-bottom: 58px; }
  .sticky-quote-bar { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 100; background: #fff; border-top: 1px solid var(--border); box-shadow: 0 -2px 8px rgba(0,0,0,0.08); }
  .sticky-quote-bar a { flex: 1; text-align: center; padding: 16px 8px; font-weight: 700; text-decoration: none; font-size: 1rem; }
  .sticky-quote-bar .sq-call { color: var(--ink); }
  .sticky-quote-bar .sq-quote { background: #fff; color: #1f1f1f; border: 2px solid var(--burgundy); }
}

/* ---------- Footer ---------- */
.site-footer { background: #231f20; color: #d8c9cb; padding: 36px 0; font-size: 0.95rem; }
.site-footer a { color: #fff; }
.site-footer .disclaimer { font-size: 0.85rem; color: #a8979a; margin-top: 14px; }

/* ---------- Blog / posts ---------- */
.post-list article { border-bottom: 1px solid var(--border); padding: 24px 0; }
.post-list h2 { margin: 0 0 6px; }
.post-list h2 a { text-decoration: none; color: var(--ink); }
.post-meta { color: var(--muted); font-size: 0.9rem; }

/* ---------- Responsive ---------- */
@media (min-width: 700px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .hero h1 { font-size: 2.9rem; }
  h1 { font-size: 2.4rem; }
}

/* ---------- Pop-out menu (v2.2) ---------- */
.site-header { position: relative; }
.menu-toggle { position: absolute; top: 26px; right: 20px; z-index: 120; width: 48px; height: 48px; background: none; border: 2px solid var(--burgundy); border-radius: 8px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.menu-toggle span { display: block; width: 24px; height: 3px; background: var(--burgundy); border-radius: 2px; }
.nav-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 200; }
body.nav-open .nav-overlay { display: block; }
body.nav-open { overflow: hidden; }
.site-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(340px, 86vw); background: var(--burgundy-dark); color: #fff; z-index: 210; transform: translateX(105%); transition: transform 0.25s ease; overflow-y: auto; padding: 20px 24px 32px; box-shadow: -4px 0 16px rgba(0,0,0,0.25); }
body.nav-open .site-drawer { transform: translateX(0); }
.drawer-close { background: none; border: none; color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; float: right; padding: 0 0 8px 8px; }
.site-drawer ul { list-style: none; margin: 48px 0 0; padding: 0; }
.site-drawer li a { display: block; color: #fff; text-decoration: none; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 700; font-size: 1.1rem; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.15); }
.site-drawer li a:hover { color: var(--gold); }
.site-drawer .current-menu-item a, .site-drawer .current_page_item a { color: var(--gold); }
.drawer-cta { margin-top: 28px; }
.drawer-cta .btn { width: 100%; text-align: center; }
.drawer-cta p { margin-top: 20px; text-align: center; }
.drawer-cta p a { color: #fff; text-decoration: none; font-weight: 700; }

/* ---------- Photo hero, small screens (v2.3, v2.4 buttons centered) ---------- */
@media (max-width: 700px) {
	.hero { padding: 28px 0; }
	.hero .container { display: block; }
	.hero-panel { margin: 0 16px; max-width: none; padding: 28px 24px; }
	.hero h1 { font-size: 1.9rem; }
	.hero-panel p:last-of-type { text-align: center; }
	.hero .btn { margin-right: 5px; margin-left: 5px; }
}
