/* Apex Injury — theme styles. Tokens come from theme.json (--wp--preset--*). */

:root {
  --apex-radius: 3px;
  --apex-shadow: 0 12px 32px rgba(28, 27, 24, 0.12);
}

html { -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body { margin: 0; }
img { max-width: 100%; height: auto; display: block; }
p { margin-block: 0 1em; }
p:last-child { margin-bottom: 0; }

/* ---------- Utilities ---------- */
.apex-label {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--wp--preset--color--oxblood); margin-bottom: 0.6rem;
}
.apex-muted { color: var(--wp--preset--color--muted); }
.apex-small { font-size: var(--wp--preset--font-size--small); }
.apex-serif { font-family: var(--wp--preset--font-family--serif); }
.apex-stars { color: var(--wp--preset--color--gold); letter-spacing: 1px; }
.apex-card {
  background: var(--wp--preset--color--white);
  border: 1px solid var(--wp--preset--color--line);
  border-radius: var(--apex-radius);
}
.apex-card--accent { border-top: 4px solid var(--wp--preset--color--oxblood); }
.apex-disclaimer { font-size: 0.8rem; color: var(--wp--preset--color--muted); }
.apex-tel { font-weight: 700; text-decoration: none; white-space: nowrap; }

/* Photo placeholders — swap the image, delete the class. */
.apex-photo { background: #D9D2C4; border-radius: var(--apex-radius); overflow: hidden; }
.apex-photo img { width: 100%; height: 100%; object-fit: cover; }

/* Buttons */
.wp-block-button__link { text-decoration: none; line-height: 1.2; }
.is-style-outline .wp-block-button__link,
.wp-block-button.is-style-outline > .wp-block-button__link {
  background: transparent; color: var(--wp--preset--color--ink);
  border: 2px solid var(--wp--preset--color--ink); padding: calc(1rem - 2px) calc(1.6rem - 2px);
}
.is-style-outline .wp-block-button__link:hover { border-color: var(--wp--preset--color--oxblood); color: var(--wp--preset--color--oxblood); background: transparent; }
.apex-on-red .is-style-outline .wp-block-button__link { color: var(--wp--preset--color--paper); border-color: var(--wp--preset--color--paper); }
.apex-on-red .wp-block-button__link:not(.is-style-outline *) { background: var(--wp--preset--color--paper); color: var(--wp--preset--color--oxblood); }

/* ---------- Header ---------- */
.apex-topbar {
  background: var(--wp--preset--color--oxblood); color: var(--wp--preset--color--paper);
  font-size: 0.8125rem; font-weight: 500;
}
.apex-topbar a { color: inherit; }
.apex-topbar .apex-tel { font-size: 1.15rem; }
.apex-header {
  background: var(--wp--preset--color--white);
  border-bottom: 1px solid var(--wp--preset--color--line);
}
.apex-header .wp-block-site-title a { text-decoration: none; color: var(--wp--preset--color--ink); }
.apex-header .apex-tagline {
  font-size: 0.6875rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700;
  color: var(--wp--preset--color--oxblood); margin: 0;
}
.apex-header .wp-block-navigation { font-weight: 600; font-size: 0.9375rem; }
.apex-header .wp-block-navigation a { text-decoration: none; }
.apex-header .wp-block-button__link { padding: 0.75rem 1.25rem; }

/* ---------- Hero ---------- */
.apex-hero { padding-top: var(--wp--preset--spacing--50); }
.apex-hero h1 { margin: 0 0 1rem; }
.apex-hero .apex-lede { font-size: var(--wp--preset--font-size--large); color: var(--wp--preset--color--muted); }
.apex-guarantee {
  display: flex; gap: 1rem; align-items: center;
  padding: 1.1rem 1.25rem; border: 2px solid var(--wp--preset--color--oxblood);
  border-radius: var(--apex-radius); background: var(--wp--preset--color--white); max-width: 34rem;
}
.apex-guarantee svg { flex: 0 0 44px; }
.apex-guarantee strong { font-family: var(--wp--preset--font-family--serif); font-size: 1.3rem; font-weight: 600; display: block; }
.apex-guarantee span { font-size: 0.875rem; color: var(--wp--preset--color--muted); }
.apex-hero-media { position: relative; }
.apex-hero-media .apex-photo { min-height: 520px; }
.apex-hero-form {
  margin-top: -5rem; margin-inline: 0 2rem; position: relative; z-index: 2;
  padding: 1.4rem 1.5rem; box-shadow: var(--apex-shadow);
}
.apex-hero-form h3 { margin: 0 0 0.25rem; font-size: 1.35rem; }

/* ---------- Forms (Fluent Forms / WPForms / any) ---------- */
.apex-form input[type="text"], .apex-form input[type="tel"], .apex-form input[type="email"],
.apex-form select, .apex-form textarea,
.apex-form .ff-el-form-control, .apex-form .wpforms-field input, .apex-form .wpforms-field select, .apex-form .wpforms-field textarea {
  width: 100%; height: 50px; border: 1px solid #C9C2B4; background: #fff; border-radius: var(--apex-radius);
  padding: 0 0.9rem; font: inherit; font-size: 0.9375rem; color: var(--wp--preset--color--ink);
}
.apex-form textarea, .apex-form .ff-el-form-control[rows] { height: auto; min-height: 96px; padding-top: 0.75rem; }
.apex-form input:focus, .apex-form select:focus, .apex-form textarea:focus { outline: 2px solid var(--wp--preset--color--oxblood); outline-offset: 1px; }
.apex-form button[type="submit"], .apex-form .ff-btn-submit, .apex-form .wpforms-submit {
  width: 100%; height: 54px; border: 0; border-radius: var(--apex-radius); cursor: pointer;
  background: var(--wp--preset--color--oxblood); color: var(--wp--preset--color--paper);
  font: inherit; font-weight: 700; font-size: 1rem;
}
.apex-form button[type="submit"]:hover, .apex-form .ff-btn-submit:hover, .apex-form .wpforms-submit:hover { background: var(--wp--preset--color--oxblood-dark); }
.apex-form .ff-el-input--label, .apex-form .wpforms-field-label { font-size: 0.8125rem; font-weight: 600; }
.apex-form .apex-consent { font-size: 0.6875rem; color: #8A8377; line-height: 1.4; margin-top: 0.6rem; }

/* ---------- Badges row ---------- */
.apex-badges { padding: 0 !important; }
.apex-badges .wp-block-column { text-align: center; padding: 1.1rem 0.75rem; border-right: 1px solid var(--wp--preset--color--line); }
.apex-badges .wp-block-column:last-child { border-right: 0; }
.apex-badges .apex-badge-big { font-family: var(--wp--preset--font-family--serif); font-size: 1.75rem; font-weight: 600; line-height: 1; margin: 0 0 0.25rem; }
.apex-badges .apex-badge-sm { font-size: 0.75rem; color: var(--wp--preset--color--muted); line-height: 1.4; margin: 0; }

/* ---------- Practice-area tiles ---------- */
.apex-tiles .wp-block-cover { min-height: 240px; border-radius: var(--apex-radius); overflow: hidden; }
.apex-tiles .wp-block-cover__inner-container { align-self: flex-end; width: 100%; padding: 0; }
.apex-tiles .wp-block-cover h3, .apex-tiles .wp-block-cover p {
  margin: 0; padding: 1rem 1.1rem; background: rgba(28, 27, 24, 0.82); color: var(--wp--preset--color--paper);
  font-family: var(--wp--preset--font-family--serif); font-size: 1.35rem; font-weight: 600;
}
.apex-tiles .wp-block-cover a { color: inherit; text-decoration: none; }
.apex-more-areas { font-size: 0.875rem; font-weight: 600; }
.apex-more-areas a { color: var(--wp--preset--color--oxblood); }

/* ---------- Process ---------- */
.apex-process { padding: 3.5rem 3rem; }
.apex-step { display: grid; grid-template-columns: 56px 1fr; gap: 1rem; padding: 1.2rem 0; border-top: 1px solid var(--wp--preset--color--line); }
.apex-step .apex-step-n { font-family: var(--wp--preset--font-family--serif); font-size: 1.9rem; font-weight: 600; color: var(--wp--preset--color--oxblood); line-height: 1; }
.apex-step h3 { font-size: 1.2rem; margin: 0 0 0.3rem; }
.apex-step p { font-size: 0.875rem; color: var(--wp--preset--color--muted); margin: 0; }

/* ---------- Results ---------- */
.apex-result { padding: 1.6rem 1.4rem; }
.apex-result .apex-amount { font-family: var(--wp--preset--font-family--serif); font-size: 2.5rem; font-weight: 600; line-height: 1; margin: 0 0 0.5rem; }
.apex-result .apex-type { font-weight: 700; font-size: 0.9375rem; margin: 0 0 0.35rem; }
.apex-result p:last-child { font-size: 0.875rem; color: var(--wp--preset--color--muted); }

/* ---------- Team ---------- */
.apex-person { overflow: hidden; }
.apex-person .apex-photo { min-height: 380px; border-radius: 0; }
.apex-person .apex-person-body { padding: 1rem 1.4rem 1.4rem; }
.apex-person h3 { font-size: 1.5rem; margin: 0 0 0.2rem; }
.apex-person .apex-role { color: var(--wp--preset--color--oxblood); font-weight: 700; font-size: 0.875rem; margin: 0 0 0.5rem; }
.apex-person p { font-size: 0.875rem; }

/* ---------- Reviews ---------- */
.apex-review { padding: 1.6rem; background: var(--wp--preset--color--paper); }
.apex-review p { margin: 0.6rem 0 0; }
.apex-review .apex-quote { font-size: 1rem; line-height: 1.55; }

/* ---------- Red band (Spanish) ---------- */
.apex-band-red { background: var(--wp--preset--color--oxblood); color: var(--wp--preset--color--paper); }
.apex-band-red h2, .apex-band-red h3 { color: var(--wp--preset--color--paper); }
.apex-band-red .apex-label { color: #E8C9CC; }
.apex-band-red p { color: #E8C9CC; }

/* ---------- Footer ---------- */
.apex-footer { background: var(--wp--preset--color--ink); color: #B8B2A6; font-size: 0.875rem; line-height: 1.7; }
.apex-footer a { color: #B8B2A6; text-decoration: none; }
.apex-footer a:hover { color: var(--wp--preset--color--paper); }
.apex-footer .wp-block-site-title a, .apex-footer strong { color: var(--wp--preset--color--paper); }
.apex-footer .apex-tel { color: var(--wp--preset--color--paper); }

/* ---------- Blog ---------- */
.apex-post-list .wp-block-post-title { font-size: 1.35rem; margin: 0 0 0.3rem; }
.apex-post-list .wp-block-post-title a { text-decoration: none; }
.apex-post-list .wp-block-post-date { font-size: 0.8125rem; color: var(--wp--preset--color--muted); }
.apex-prose { max-width: 720px; }
.apex-prose p, .apex-prose li { font-size: 1.0625rem; line-height: 1.7; }
.apex-prose h2 { margin-top: 2rem; }

/* ---------- Sticky mobile CTA ---------- */
.apex-sticky-cta { display: none; }
@media (max-width: 782px) {
  body { padding-bottom: 76px; }
  .apex-sticky-cta {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 999;
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px 16px;
    background: rgba(28, 27, 24, 0.96); border-top: 1px solid rgba(122, 31, 38, 0.6);
  }
  .apex-sticky-cta a {
    display: flex; align-items: center; justify-content: center; height: 50px;
    border-radius: var(--apex-radius); font-weight: 700; font-size: 0.9375rem; text-decoration: none;
  }
  .apex-sticky-cta__call { color: var(--wp--preset--color--paper); border: 1px solid rgba(251, 249, 244, 0.35); }
  .apex-sticky-cta__form { background: var(--wp--preset--color--oxblood); color: var(--wp--preset--color--paper); }
}

/* ---------- Responsive ---------- */
@media (max-width: 782px) {
  .apex-hero-form { margin: 1rem 0 0; }
  .apex-hero-media .apex-photo { min-height: 260px; }
  .apex-badges .wp-block-column { border-right: 0; border-bottom: 1px solid var(--wp--preset--color--line); }
  .apex-badges .wp-block-column:last-child { border-bottom: 0; }
  .apex-process { padding: 2rem 1.25rem; }
  .apex-topbar .apex-topbar-left { display: none; }
  .apex-header .wp-block-button { display: none; }
}
