/*
 * Champion Fitness: native block library styles (no ACF, no build step).
 * Loaded on the front end and inside the block editor.
 * Measurements match the existing theme (Tailwind classes used by the ACF blocks):
 * container 1440px, cards p-6 / rounded-xl / gap-6, buttons px-6 py-2, h2 32px (36px at 992px+),
 * body 18px/27px, card text 14px/20px, no letter spacing anywhere.
 * Colors read the theme's CSS variables and fall back to the brand values.
 */
:root {
  --cf-blue: var(--primary-color, #0058b3);
  --cf-red: var(--secondary-color, #b9191b);
  --cf-sky: var(--accent-color, #eaf4fb);
  --cf-white: var(--light-color, #ffffff);
  --cf-line: #e5e7eb;
  --cf-head: "League Spartan", sans-serif;
  --cf-body: "Inter", sans-serif;
}

/* ---------- page + sections ---------- */
.cf-page { overflow-x: clip; }
.cf-section { padding: 40px 16px; color: var(--cf-blue); background: #fff; font-family: var(--cf-body); }
.cf-section.is-style-cf-sky { background: var(--cf-sky); }
.cf-section.is-style-cf-blue { background: var(--cf-blue); color: #fff; }
.cf-section.is-style-cf-red { background: var(--cf-red); color: #fff; }
.cf-wrap { max-width: 1360px; margin: 0 auto; }
.cf-wrap--narrow { max-width: 820px; }
.cf-center { text-align: center; }
.cf-center .wp-block-buttons { justify-content: center; }

/* The theme header is fixed (about 116px tall), so the first section needs room beneath it. */
.cf-page > .cf-section:first-child { padding-top: 120px; }

/* neutralise WordPress default block-gap margins; spacing is set explicitly below */
.cf-section :where(.wp-block-group, .wp-block-buttons, .wp-block-image, .wp-block-heading, .wp-block-details, .wp-block-list, p, figure) { margin-block-start: 0 !important; }

/* ---------- type (no letter spacing) ---------- */
.cf-section h1, .cf-section h2, .cf-section h3, .cf-section h4 {
  font-family: var(--cf-head); font-weight: 700; text-transform: uppercase; color: inherit;
  letter-spacing: normal; line-height: 1.12; margin: 0 0 16px;
}
.cf-section h1, .cf-section h2 { font-size: 32px; line-height: 40px; }
.cf-section h3 { font-size: 18px; line-height: 27px; margin-bottom: 4px; }
.cf-section h4 { font-size: 16px; line-height: 24px; margin-bottom: 0; }
.cf-section p { margin: 0 0 20px; font-size: 18px; line-height: 27px; letter-spacing: normal; }
.cf-section a { color: inherit; }
.cf-section .has-secondary-color { color: var(--cf-red); }
.cf-lede { max-width: 60ch; }
.cf-micro { font-size: 14px !important; line-height: 20px !important; }
.cf-eyebrow { font: 700 14px/20px var(--cf-head) !important; letter-spacing: normal !important; text-transform: uppercase; color: var(--cf-red); margin-bottom: 8px !important; }
.cf-section.is-style-cf-blue .cf-eyebrow { color: #fff; }
.cf-strip { background: #fff; border-top: 1px solid var(--cf-line); border-bottom: 1px solid var(--cf-line); padding: 20px 16px; }
.cf-strip__text { margin: 0 !important; text-align: center; font: 700 16px/24px var(--cf-head) !important; letter-spacing: normal !important; text-transform: uppercase; color: var(--cf-blue); }
.cf-disclaimer { padding: 8px 16px 24px; max-width: 1360px; margin: 0 auto; color: var(--cf-blue); opacity: .85; }

/* ---------- layout helpers ---------- */
.cf-split { display: grid; grid-template-columns: 1fr; gap: 32px; align-items: center; }
.cf-split__media { display: grid; gap: 16px; }
.cf-grid { display: grid; gap: 24px; }
.cf-grid--2, .cf-grid--3, .cf-grid--4 { grid-template-columns: 1fr; }
.cf-grid--keep2 { grid-template-columns: repeat(2, 1fr); }
.cf-grid--narrow { max-width: 900px; margin-left: auto; margin-right: auto; }
.cf-section .cf-center + .cf-grid, .cf-section .cf-center + .wp-block-group { margin-top: 32px !important; }
.cf-section .cf-grid + .cf-center { margin-top: 32px !important; }
.cf-section .cf-center > :last-child { margin-bottom: 0 !important; }

/* ---------- cards (same look as the ACF Cards block) ---------- */
.cf-card { background: var(--cf-sky); border: 1px solid var(--cf-blue); border-radius: 12px; padding: 24px; color: var(--cf-blue); transition: box-shadow .3s ease-in-out; }
.cf-card:hover { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -4px rgba(0, 0, 0, .1); }
.cf-card.is-style-cf-card-blue { background: var(--cf-blue); border-color: var(--cf-blue); color: #fff; }
.cf-card.is-style-cf-card-sky { background: var(--cf-sky); border-color: var(--cf-blue); }
.cf-section.is-style-cf-sky .cf-card:not(.is-style-cf-card-blue):not(.is-style-cf-card-sky):not(.cf-card--glass) { background: #fff; }
.cf-card--edge-blue { border-top: 6px solid var(--cf-blue); }
.cf-card--edge-red { border-top: 6px solid var(--cf-red); }
.cf-card--glass { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .3); color: #fff; }
.cf-card > :last-child { margin-bottom: 0 !important; }
.cf-card h3 { margin-bottom: 4px; }
.cf-card p { font-size: 14px; line-height: 20px; margin-bottom: 20px; }
.cf-card .wp-block-buttons { margin: 4px 0 0; }

/* ---------- images ---------- */
.cf-section .wp-block-image { margin: 0 0 16px; }
.cf-img { margin: 0; }
.cf-img img { width: 100%; height: auto; border-radius: 12px; display: block; }
.cf-img--hero img { aspect-ratio: 4 / 3; object-fit: cover; }
.cf-img--square img { aspect-ratio: 1; object-fit: cover; }
.cf-icon img { width: 64px; height: 64px; object-fit: contain; border-radius: 0; }
.cf-icon { margin-bottom: 16px; }
.cf-map { width: 100%; border: 0; border-radius: 12px; min-height: 300px; display: block; }

/* ---------- people (photo beside text on wide screens) ---------- */
.cf-person { display: grid; grid-template-columns: 1fr; gap: 0; }
.cf-person h3 { margin: 12px 0 2px; }
.cf-role { font-weight: 600; color: var(--cf-red) !important; font-size: 16px !important; margin-bottom: 8px !important; }
.cf-person .cf-img--square img { max-width: 100%; }

/* ---------- steps ---------- */
.cf-step > :last-child { margin-bottom: 0 !important; }
.cf-num { width: 44px; height: 44px; border-radius: 50%; background: var(--cf-red); color: #fff !important; display: grid; place-items: center; font: 700 20px/1 var(--cf-head) !important; margin: 0 0 12px !important; }
.cf-step h3 { margin-bottom: 4px; }
.cf-step p:not(.cf-num) { font-size: 16px; line-height: 24px; }

/* ---------- chips ---------- */
.cf-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.cf-chip { margin: 0 !important; background: var(--cf-sky); color: var(--cf-blue); border: 1px solid var(--cf-blue); border-radius: 9999px; padding: 4px 14px; font: 500 14px/20px var(--cf-body) !important; }

/* ---------- quotes ---------- */
.cf-quote { font-size: 16px !important; line-height: 24px !important; }
.cf-cite { font-weight: 600; font-size: 14px !important; line-height: 20px !important; }

/* ---------- lists ---------- */
.cf-section .wp-block-list { list-style: none; margin: 0 0 20px; padding: 0; }
.cf-section .wp-block-list li { position: relative; list-style: none; margin: 0 !important; padding: 8px 0 8px 28px; border-bottom: 1px solid var(--cf-line); font-size: 18px; line-height: 27px; }
.cf-section .wp-block-list li::before { content: ""; position: absolute; left: 4px; top: 16px; width: 12px; height: 12px; border-radius: 50%; background: var(--cf-red); }

/* ---------- FAQ (native Details block) ---------- */
.cf-section .wp-block-details { border-bottom: 1px solid var(--cf-line); padding: 4px 0; margin: 0; }
.cf-section .wp-block-details summary { cursor: pointer; list-style: none; padding: 16px 40px 16px 0; min-height: 48px; position: relative; font: 600 18px/27px var(--cf-body); letter-spacing: normal; color: var(--cf-blue); }
.cf-section .wp-block-details summary::-webkit-details-marker { display: none; }
.cf-section .wp-block-details summary::after { content: "+"; position: absolute; right: 8px; top: 12px; font: 700 26px/1 var(--cf-body); color: var(--cf-red); }
.cf-section .wp-block-details[open] summary::after { content: "\2212"; }
.cf-section .wp-block-details p { padding: 0 0 16px; margin: 0; font-size: 16px; line-height: 24px; }
.cf-section .wp-block-details summary:focus-visible { outline: 3px solid var(--cf-blue); outline-offset: 3px; }

/* ---------- callout ---------- */
.cf-callout { background: var(--cf-red); color: #fff; border-radius: 12px; padding: 32px 24px; display: grid; grid-template-columns: 1fr; gap: 20px; align-items: center; }
.cf-callout h2, .cf-callout p { color: #fff; }
.cf-callout__text > :last-child { margin-bottom: 0 !important; }
.cf-callout .wp-block-buttons { margin: 0; }

/* ---------- buttons (match .btn-* in the theme: px-6 py-2, 16px, pill, 1px border) ---------- */
.cf-section .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 16px; margin: 24px 0 16px; }
.cf-section .wp-block-button .wp-block-button__link {
  display: inline-flex; align-items: center; justify-content: center; width: fit-content;
  padding: 8px 24px; border-radius: 9999px; border: 1px solid var(--cf-blue); background: transparent; color: var(--cf-blue);
  font: 400 16px/24px var(--cf-body); letter-spacing: normal; text-decoration: none;
  transition: background-color .3s ease-in-out, color .3s ease-in-out, opacity .3s ease-in-out;
}
.cf-section .wp-block-button.is-style-cf-outline .wp-block-button__link:hover { background: var(--cf-blue); color: #fff; }
.cf-section .wp-block-button.is-style-cf-red .wp-block-button__link { background: var(--cf-red); border-color: var(--cf-red); color: #fff; }
.cf-section .wp-block-button.is-style-cf-red .wp-block-button__link:hover { opacity: .9; }
.cf-section .wp-block-button.is-style-cf-blue .wp-block-button__link { background: var(--cf-blue); border-color: var(--cf-blue); color: #fff; }
.cf-section .wp-block-button.is-style-cf-blue .wp-block-button__link:hover { opacity: .9; }
.cf-section .wp-block-button.is-style-cf-white .wp-block-button__link { background: #fff; border-color: #fff; color: var(--cf-blue); }
.cf-section .wp-block-button.is-style-cf-white .wp-block-button__link:hover { background: transparent; color: #fff; }
.cf-section .wp-block-button.is-style-cf-outline-light .wp-block-button__link { border-color: #fff; color: #fff; background: transparent; }
.cf-section .wp-block-button.is-style-cf-outline-light .wp-block-button__link:hover { background: #fff; color: var(--cf-blue); }
.cf-section .wp-block-button .wp-block-button__link:focus-visible { outline: 3px solid var(--cf-blue); outline-offset: 3px; }
.cf-section.is-style-cf-blue .wp-block-button .wp-block-button__link:focus-visible,
.cf-callout .wp-block-button .wp-block-button__link:focus-visible { outline-color: #fff; }

/* ---------- mobile call bar (printed by the page template) ---------- */
.cf-sticky-bar { display: none; }
.cf-sticky-bar a { display: flex; align-items: center; justify-content: center; padding: 8px 24px; min-height: 46px; border-radius: 9999px; font: 400 16px/24px var(--cf-body); text-decoration: none; border: 1px solid var(--cf-blue); color: var(--cf-blue); background: #fff; }
.cf-sticky-bar a.is-primary { background: var(--cf-red); border-color: var(--cf-red); color: #fff; }

/* ---------- small screens: full-width buttons, sticky bar, centered headings like the live site ---------- */
@media (max-width: 991px) {
  .cf-page { padding-bottom: 72px; }
  .cf-section .wp-block-buttons .wp-block-button, .cf-section .wp-block-buttons .wp-block-button__link { width: 100%; }
  .cf-sticky-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: #fff; border-top: 1px solid var(--cf-line); padding: 10px; box-shadow: 0 -4px 14px rgba(0, 0, 0, .08); }
}
@media (min-width: 576px) {
  .cf-grid--2, .cf-grid--3, .cf-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .cf-person { grid-template-columns: 180px 1fr; column-gap: 24px; align-items: start; }
  .cf-person > .wp-block-image { grid-column: 1; grid-row: 1 / span 5; margin: 0; }
  .cf-person > :not(.wp-block-image) { grid-column: 2; }
  .cf-person h3 { margin-top: 0; }
}
@media (min-width: 992px) {
  .cf-section { padding: 64px 40px; }
  .cf-section h1, .cf-section h2 { font-size: 36px; }
  .cf-page > .cf-section:first-child { padding-top: 128px; }
  .cf-split { grid-template-columns: 1fr 1fr; gap: 64px; }
  .cf-hero .cf-split { gap: 96px; }
  .cf-grid--3 { grid-template-columns: repeat(3, 1fr); }
  .cf-grid--4 { grid-template-columns: repeat(4, 1fr); }
  .cf-callout { grid-template-columns: 1fr auto; padding: 32px; }
  .cf-section .cf-center .wp-block-buttons { justify-content: center; }
}
@media (min-width: 1200px) {
  .cf-hero .cf-split { gap: 160px; }
}
@media (prefers-reduced-motion: reduce) {
  .cf-card, .cf-section .wp-block-button .wp-block-button__link { transition: none; }
}
