/*
Theme Name: Jeff Patton & Associates
Theme URI: https://jpattonassociates.com/
Author: Jeff Patton & Associates
Description: A clean, lightweight block theme for jpattonassociates.com. Edit pages in the block editor; header, footer, and home page sections are editable in Appearance > Editor. Styles The Events Calendar to match.
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.1.7
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: jpa
*/

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }
img { height: auto; max-width: 100%; }
:where(a) { text-underline-offset: 0.15em; }
:focus-visible { outline: 3px solid var(--wp--preset--color--accent-bright); outline-offset: 2px; }

/* ---------- Header ---------- */
.jpa-header { border-bottom: 1px solid var(--wp--preset--color--line); }
.jpa-header .wp-block-site-title a { text-decoration: none; }
.jpa-header .wp-block-navigation a:hover { color: var(--wp--preset--color--accent); }
.jpa-header .wp-block-navigation .current-menu-item > a { color: var(--wp--preset--color--accent); font-weight: 600; }
.jpa-header .nav-cta > a,
.jpa-header .nav-cta .wp-block-navigation-item__content {
  background: var(--wp--preset--color--ink); color: #fff !important;
  padding: 10px 18px; border-radius: 8px; font-weight: 600;
}
.jpa-header .nav-cta > a:hover { background: var(--wp--preset--color--accent); }

/* ---------- Eyebrow labels ---------- */
.is-style-eyebrow {
  font-size: 14px !important; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--wp--preset--color--accent-dark);
}

/* ---------- Cards ---------- */
.is-style-jpa-card {
  border: 1px solid var(--wp--preset--color--line); border-radius: 14px;
  background: #fff; transition: border-color .15s ease, box-shadow .15s ease;
}
.is-style-jpa-card:hover { border-color: #d9d2ca; box-shadow: 0 8px 24px rgba(27,26,25,.06); }
.jpa-card-link a { text-decoration: none; font-weight: 600; }
.jpa-arrow-list a { text-decoration: none; }

/* Whole-card links: the card's heading link stretches over the card */
.jpa-stretch { position: relative; }
.jpa-stretch .wp-block-heading a { color: inherit; text-decoration: none; }
.jpa-stretch .wp-block-heading a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }

/* ---------- Hero illustration ---------- */
.jpa-cycle a { display: block; text-decoration: none; }
.jpa-cycle svg { display: block; width: 100%; height: auto; }
.jpa-cycle svg text { font-family: var(--wp--preset--font-family--caveat); }

/* ---------- Next class card (shortcode) ---------- */
.jpa-classes { display: flex; flex-direction: column; gap: 16px; }
.jpa-class {
  display: flex; gap: 24px; align-items: flex-start; background: #fff;
  border-radius: 14px; padding: 28px; box-shadow: 0 1px 2px rgba(27,26,25,.06);
}
.jpa-class__date {
  flex: none; width: 76px; text-align: center; border-radius: 10px;
  background: var(--wp--preset--color--ink); color: #fff; padding: 12px 0; line-height: 1.1;
}
.jpa-class__month { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.jpa-class__day { font-family: var(--wp--preset--font-family--archivo); font-size: 32px; font-weight: 800; }
.jpa-class__body { min-width: 0; }
.jpa-class__meta { margin: 0 0 6px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--wp--preset--color--accent-dark); }
.jpa-class__title { margin: 0 0 8px; font-family: var(--wp--preset--font-family--archivo); font-size: 22px; font-weight: 700; line-height: 1.25; }
.jpa-class__title a { color: inherit; text-decoration: none; }
.jpa-class__when { margin: 0 0 18px; color: var(--wp--preset--color--ink-soft); font-size: 15px; }
.jpa-class__actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.jpa-btn {
  display: inline-block; background: var(--wp--preset--color--accent); color: #fff !important;
  text-decoration: none; padding: 11px 18px; border-radius: 8px; font-weight: 600; font-size: 15px;
}
.jpa-btn:hover { background: var(--wp--preset--color--accent-dark); }
.jpa-link { font-weight: 600; font-size: 15px; text-decoration: none; }
@media (max-width: 520px) { .jpa-class { flex-direction: column; padding: 22px; } }

/* ---------- Recent writing + Most popular (home) ---------- */
.jpa-list-heading { margin-bottom: 8px !important; }
.jpa-list-heading + .wp-block-query { margin-top: 0 !important; }
.jpa-writing .wp-block-post-template > li { margin: 0 !important; padding: 6px 0; border: 0; }
.jpa-writing .wp-block-post-title { margin: 0 !important; line-height: 1.3; }
.jpa-writing .wp-block-post-date { margin: 2px 0 0 !important; font-size: 14px; }
.jpa-writing .wp-block-post-title a { text-decoration: none; color: inherit; }
.jpa-writing .wp-block-post-title a:hover { color: var(--wp--preset--color--accent); }

/* ---------- Post lists (blog, archives, search) ---------- */
.jpa-post-list .wp-block-post-template > li { margin: 0 !important; padding: 14px 0; border: 0; }
.jpa-post-row { gap: 24px; }
.jpa-post-thumb { flex: 0 0 200px; width: 200px; margin: 0 !important; }
.jpa-post-thumb img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 8px; display: block; }
.jpa-post-text { flex: 1 1 auto; min-width: 0; }
.jpa-post-text > * { margin-block: 0 !important; }
.jpa-post-list .wp-block-post-title { line-height: 1.2; }
.jpa-post-list .wp-block-post-date { margin-top: 4px !important; }
.jpa-post-list .wp-block-post-excerpt { margin-top: 8px !important; }
.jpa-post-list .wp-block-post-excerpt__excerpt { margin: 0; }
.jpa-post-list .wp-block-post-excerpt__more-text { margin: 4px 0 0; }
@media (max-width: 600px) {
  .jpa-post-row { flex-direction: column; gap: 12px; }
  .jpa-post-thumb { flex-basis: auto; width: 100%; }
}
.jpa-post-list .wp-block-post-title a { text-decoration: none; color: inherit; }
.jpa-post-list .wp-block-post-title a:hover { color: var(--wp--preset--color--accent); }

/* ---------- Article content ---------- */
.entry-content blockquote, .wp-block-post-content blockquote {
  border-left: 4px solid var(--wp--preset--color--accent); margin-left: 0; padding: 4px 0 4px 22px;
  font-size: 1.15em; color: var(--wp--preset--color--ink);
}
.wp-block-post-content figure { margin-block: 2em; }

/* ---------- Footer ---------- */
.jpa-footer a { color: #dcd5ce; text-decoration: none; }
.jpa-footer a:hover { color: #fff; }

/* ---------- The Events Calendar ---------- */
:root {
  --tec-color-accent-primary: #B4541A;
  --tec-color-accent-primary-hover: #8A3F12;
  --tec-color-accent-primary-active: #8A3F12;
  --tec-color-button-primary: #B4541A;
  --tec-color-button-primary-hover: #8A3F12;
  --tec-color-link-accent: #B4541A;
  --tec-color-link-accent-hover: #8A3F12;
  --tec-color-text-primary: #1B1A19;
  --tec-color-text-secondary: #4A4643;
  --tec-color-border-default: #ECE7E1;
  --tec-color-background-events-bar-submit-button: #B4541A;
  --tec-color-background-events-bar-submit-button-hover: #8A3F12;
  --tec-font-family-sans-serif: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --tec-font-family-base: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --tec-border-radius-default: 8px;
}
.tribe-common .tribe-common-h1, .tribe-common .tribe-common-h2, .tribe-common .tribe-common-h3,
.tribe-common .tribe-common-h4, .tribe-common .tribe-common-h5, .tribe-common .tribe-common-h6,
.tribe-events-single-event-title {
  font-family: var(--wp--preset--font-family--archivo) !important; letter-spacing: -0.015em;
}
.tribe-events .tribe-events-calendar-list__event-title-link { text-decoration: none; }
.tribe-events-single, .tribe-events-pg-template { max-width: 1200px; margin-inline: auto; }
.tribe-events-single .tribe-events-single-event-title { font-weight: 800; font-size: clamp(30px, 4vw, 44px); line-height: 1.1; }
.tribe-common .tribe-events-c-subscribe-dropdown .tribe-events-c-subscribe-dropdown__button {
  border-color: var(--wp--preset--color--accent); color: var(--wp--preset--color--accent);
}
.tribe-common .tribe-events-c-subscribe-dropdown .tribe-events-c-subscribe-dropdown__button:hover,
.tribe-common .tribe-events-c-subscribe-dropdown .tribe-events-c-subscribe-dropdown__button:focus-within {
  background: var(--wp--preset--color--accent); color: #fff;
}
.tribe-common .tribe-events-c-subscribe-dropdown .tribe-events-c-subscribe-dropdown__button-text { color: inherit; }
.tribe-events-c-subscribe-dropdown__button svg path { fill: currentColor; }
.jpa-cycle { max-width: 560px; margin-inline: auto; }

/* ---------- Headings: slightly smaller, tighter to the text below ---------- */
h1, h2, h3, h4, h5, h6 { margin-bottom: 0; }
.wp-block-post-content :is(h1, h2, h3, h4, h5, h6) + *,
:is(h1, h2, h3, h4, h5, h6).wp-block-heading + * { margin-block-start: 10px !important; }

/* ---------- Article sidebar ---------- */
.jpa-article-cols { align-items: flex-start; }
.jpa-article-main { min-width: 0; }
.jpa-article-main > .wp-block-post-title + .wp-block-post-date { margin-top: 10px !important; }
.jpa-sidebar { font-size: 15px; }
.jpa-sidebar > * { margin-block: 0 !important; }
.jpa-side-heading {
  font-family: var(--wp--preset--font-family--inter) !important; font-size: 15px !important; font-weight: 600 !important;
  letter-spacing: 0.08em !important; text-transform: uppercase; color: var(--wp--preset--color--accent-dark) !important;
  margin: 32px 0 2px !important;
}
.jpa-sidebar .jpa-side-heading + * { margin-top: 0 !important; }
.jpa-sidebar > .jpa-side-heading:first-child { margin-top: 0 !important; }
.jpa-side-list .wp-block-post-template > li { margin: 0 !important; padding: 5px 0; }
.jpa-side-list .wp-block-post-title { margin: 0 !important; font-family: var(--wp--preset--font-family--inter); font-size: 15px !important; font-weight: 500; line-height: 1.35; letter-spacing: 0; }
.jpa-side-list .wp-block-post-title a { text-decoration: none; color: var(--wp--preset--color--ink); }
.jpa-side-list .wp-block-post-title a:hover { color: var(--wp--preset--color--accent); }
.jpa-classes--compact { gap: 0; }
.jpa-class-mini { padding: 5px 0; }
.jpa-class-mini p { margin: 0; }
.jpa-class-mini__when { font-size: 13px; color: var(--wp--preset--color--muted); }
.jpa-class-mini__title { font-weight: 500; line-height: 1.35; }
.jpa-class-mini__title a { text-decoration: none; color: var(--wp--preset--color--ink); }
.jpa-class-mini__title a:hover { color: var(--wp--preset--color--accent); }
.jpa-class-mini__all { margin: 8px 0 0 !important; font-size: 14px; }
@media (max-width: 781px) {
  .jpa-sidebar { border-top: 1px solid var(--wp--preset--color--line); padding-top: 32px; }
}

/* ---------- Home hero drawing ---------- */
.jpa-hero-drawing { max-width: 560px; margin-inline: auto; }
.jpa-hero-drawing img { width: 100%; height: auto; display: block; }
.jpa-hero-drawing a { display: block; }

/* ---------- About strip photo (home) ---------- */
.jpa-about { gap: 20px; }
.jpa-about__photo { flex: none; width: 96px; margin: 0 !important; }
.jpa-about__photo img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; display: block; }
.jpa-about__photo a { display: block; border-radius: 50%; }
.jpa-about__photo a:hover img { box-shadow: 0 0 0 3px var(--wp--preset--color--accent-bright); }
.jpa-about > p { margin: 0 !important; }

/* ---------- Product thinking page drawing ---------- */
.jpa-page-drawing { max-width: 720px; margin-inline: auto; margin-bottom: 0 !important; }
.jpa-page-drawing img { width: 100%; height: auto; display: block; }

/* ---------- Home book cover ---------- */
.jpa-book-cover { margin: 0 !important; }
.jpa-book-cover img { width: 100%; max-width: 300px; height: auto; display: block; margin-inline: auto; }
