/**
 * @file
 * Case-study-matching styling for 4 specific pages: Our Services
 * (node/107), Our Approach (node/103), About (node/7), and Contact
 * (the core contact module's /about/contact page).
 *
 * Scoped entirely via the body classes Drupal core already prints for
 * these routes (confirmed against real rendered output, not guessed):
 *   - body.path-node-107  -> Our Services
 *   - body.path-node-103  -> Our Approach
 *   - body.path-node-7    -> About
 *   - body.path-contact   -> Contact (core contact.site_page route,
 *                            no node id)
 * so nothing here can leak onto any other page. Same --xx-navy /
 * --xx-success / gold palette as case-studies.css and home.css
 * (kept as its own --sp-* set, not shared globals, for the same
 * reason home.css keeps its own --hp-* set: a future palette edit to
 * one page shouldn't silently reflow the others).
 *
 * Attached only on these 4 routes via hes_w3css_preprocess_html().
 */

body.path-node-107,
body.path-node-103,
body.path-node-7,
body.path-contact {
  --sp-navy: #0c426f;
  --sp-navy-dark: #082d4d;
  --sp-navy-tint: #eef3f7;
  --sp-gold: #b8860b;
  --sp-ink: #1c2b36;
  --sp-muted: #5b6b76;
  --sp-border: rgba(12, 66, 111, 0.14);
  --sp-success: #1e8a5f;
  --sp-radius: 12px;
  --sp-shadow: 0 2px 14px rgba(12, 66, 111, 0.08);
}

/* ---------------------------------------------------------------- *
 * Hero -- the page-title block that Our Services / Our Approach /
 * About each already print ("Services", "Approach", "About"). No
 * markup change, just restyling h1.page-title itself.
 *
 * Contact is the exception: confirmed against real rendered output
 * that route (contact.site_page, not a node) never renders the
 * page-title block at all -- its only page-level heading is the
 * "Contact Us" <h1> inside the hes_w3css_contactusadditions custom
 * block's body field, so that's the hero target there instead.
 * ---------------------------------------------------------------- */

body.path-node-107 h1.page-title,
body.path-node-103 h1.page-title,
body.path-node-7 h1.page-title,
body.path-contact #block-hes-w3css-contactusadditions h1 {
  background: linear-gradient(135deg, var(--sp-navy) 0%, var(--sp-navy-dark) 100%);
  color: #fff;
  border-radius: var(--sp-radius);
  padding: 2rem 2rem;
  margin: 1rem 0 1.5rem;
  font-weight: 800;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  box-shadow: var(--sp-shadow);
}

/* ---------------------------------------------------------------- *
 * Section headings -- blue-underline pattern, matching
 * case-studies.css's .cs-section__title. Applied to:
 *  - the service/approach row titles (h2 inside field_service_title
 *    / field_approach_title)
 *  - the About and Contact pages' own body-field headings (h2, and
 *    h3 for About's "Solutions We Provide" sub-sections)
 * ---------------------------------------------------------------- */

body.path-node-107 .field--name-field-service-title h2,
body.path-node-103 .field--name-field-approach-title h2,
body.path-node-7 .field--name-body h2,
body.path-contact .field--name-body h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--sp-navy);
  margin: 0 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 3px solid var(--sp-navy);
  display: inline-block;
}

body.path-node-7 .field--name-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--sp-navy);
  margin: 1.5rem 0 0.5rem;
}

/* ---------------------------------------------------------------- *
 * Row cards -- Our Services / Our Approach rows get the same white
 * card treatment as home.css's .views-row / case-studies.css's
 * .cs-card.
 * ---------------------------------------------------------------- */

body.path-node-107 .view-our-services-block-content .views-row,
body.path-node-103 .view-our-approach-block-content .views-row {
  background: #fff;
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius);
  box-shadow: var(--sp-shadow);
  padding: 1.75rem 1.75rem 0.5rem;
  margin-bottom: 1.75rem;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

body.path-node-107 .view-our-services-block-content .views-row:hover,
body.path-node-103 .view-our-approach-block-content .views-row:hover {
  box-shadow: 0 8px 28px rgba(12, 66, 111, 0.14);
  transform: translateY(-2px);
}

/* ---------------------------------------------------------------- *
 * Checkmark bullet lists -- every service/approach row's description
 * ends in a <ul> of specifics ("What's included?", outcomes, etc.).
 * Same check glyph + green as home.css / case-studies.css.
 * ---------------------------------------------------------------- */

body.path-node-107 .field--name-field-service-description ul,
body.path-node-103 .field--name-field-approach-description ul {
  margin: 0.75rem 0 0;
  padding-left: 0;
  list-style: none;
}

body.path-node-107 .field--name-field-service-description li,
body.path-node-103 .field--name-field-approach-description li {
  position: relative;
  margin-bottom: 0.6rem;
  padding-left: 1.6rem;
}

body.path-node-107 .field--name-field-service-description li::before,
body.path-node-103 .field--name-field-approach-description li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--sp-success);
  font-weight: 700;
}

/* ---------------------------------------------------------------- *
 * Row graphics -- sizing for the inline flat SVGs printed by the two
 * new field templates (field--block-content--field-service-graphic--
 * service.html.twig and field--block-content--field-approach-
 * graphics--our-approach.html.twig).
 * ---------------------------------------------------------------- */

body.path-node-107 .sp-graphic svg,
body.path-node-103 .sp-graphic svg {
  width: 100%;
  max-width: 220px;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* ---------------------------------------------------------------- *
 * Our Approach view's own header/footer (the view prints these
 * itself -- see views.view.our_approach_block_content.yml). Styled
 * as a lead-in / closing panel rather than a second full hero, since
 * the page-title block above already carries the hero treatment.
 * ---------------------------------------------------------------- */

body.path-node-103 .view-our-approach-block-content .view-header {
  background: var(--sp-navy-tint);
  border-left: 4px solid var(--sp-navy);
  border-radius: 0 var(--sp-radius) var(--sp-radius) 0;
  padding: 1.5rem 1.75rem;
  margin-bottom: 2rem;
}

body.path-node-103 .view-our-approach-block-content .view-header h1 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--sp-navy);
}

body.path-node-103 .view-our-approach-block-content .view-header p {
  margin: 0;
  color: var(--sp-ink);
}

body.path-node-103 .view-our-approach-block-content .view-footer {
  text-align: center;
  padding: 1.5rem 0 0.5rem;
}

body.path-node-103 .view-our-approach-block-content .view-footer h2 {
  color: var(--sp-navy);
  font-size: 1.4rem;
  font-weight: 700;
}

/* ---------------------------------------------------------------- *
 * CTA buttons -- pill style matching case-studies.css's .cs-download
 * / home.css's mailto CTA. Two existing text links get this:
 *  - Our Approach footer: "Schedule a Free Consultation Today"
 *    (-> /about/contact)
 *  - Contact page: "Schedule a Meeting" (a Google Calendar link
 *    currently hardcoded with an inline Bootstrap-blue style in a
 *    custom block's body field -- overridden with !important since
 *    an inline style attribute otherwise wins on specificity; not
 *    editing that block's content).
 * ---------------------------------------------------------------- */

body.path-node-103 .view-our-approach-block-content .view-footer a[href="/about/contact"] {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  background: var(--sp-navy);
  color: #fff !important;
  font-weight: 700;
  text-decoration: none;
  padding: 0.75rem 1.75rem;
  border-radius: 999px;
  box-shadow: var(--sp-shadow);
  transition: background-color 0.15s ease, transform 0.15s ease;
}

body.path-node-103 .view-our-approach-block-content .view-footer a[href="/about/contact"]:hover,
body.path-node-103 .view-our-approach-block-content .view-footer a[href="/about/contact"]:focus {
  background: var(--sp-navy-dark);
  transform: translateY(-1px);
}

body.path-contact a[href^="https://calendar.app.google"] {
  background-color: var(--sp-navy) !important;
  border-radius: 999px !important;
  padding: 0.75rem 1.75rem !important;
  font-weight: 700 !important;
  box-shadow: var(--sp-shadow);
  transition: background-color 0.15s ease, transform 0.15s ease;
}

body.path-contact a[href^="https://calendar.app.google"]:hover {
  background-color: var(--sp-navy-dark) !important;
  transform: translateY(-1px);
}

/* ---------------------------------------------------------------- *
 * Responsive breakpoints
 * ---------------------------------------------------------------- */

@media (max-width: 768px) {
  body.path-node-107 h1.page-title,
  body.path-node-103 h1.page-title,
  body.path-node-7 h1.page-title,
  body.path-contact #block-hes-w3css-contactusadditions h1 {
    padding: 1.5rem 1.5rem;
    font-size: 1.75rem !important;
  }

  body.path-node-107 .view-our-services-block-content .views-row,
  body.path-node-103 .view-our-approach-block-content .views-row {
    padding: 1.25rem 1.25rem 0.25rem;
  }
}
