/**
 * Single Tools - styles
 * Programs section ported from single-book.css (.book-programs-*)
 * CTA section ported from rtb.css (.rtb-cta-*)
 * Everything is scoped to .single-tools-page so it cannot leak into other templates.
 */

/* ============================================
   TOKENS + BASE (scoped to template wrapper)
============================================ */
:root {
  --sw_primary: #004976;
  --sw_secondary: #2cccd3;
  --sw_tertiary: #47d7ac;
  --sw_quaternary: #ffa400;
  --sw_accent: #606060;
  --sw_accent-2: #97999b;
  --sw_black: #000;
  --sw_white: #fff;
  --sw_title: "Georgia", serif;
  --sw_body: Arial, Helvetica, sans-serif;
}

.single-tools-page {
  scroll-behavior: smooth;
  /* Fluid root size the ported rem values were authored against. */
  font-size: clamp(12px, calc(12px + 4 * (100vw - 1366px) / 554), 16px);
  line-height: 1.4;
  color: #1a1a1a;
  font-family: var(--sw_body) !important;
  background-color: var(--sw_white) !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.single-tools-page *,
.single-tools-page *::before,
.single-tools-page *::after {
  box-sizing: border-box;
}

.single-tools-page img {
  max-width: 100%;
  height: auto;
  display: block;
}

.single-tools-page .container {
  max-width: 100rem;
  margin: 0 auto;
  padding: 0 2rem;
}

.single-tools-page h1,
.single-tools-page h2,
.single-tools-page h3,
.single-tools-page h4,
.single-tools-page h5,
.single-tools-page h6 {
  font-family: var(--sw_title);
  line-height: 1.2;
  font-weight: normal;
  color: var(--sw_accent);
}

.single-tools-page h2 {
  font-size: 3rem;
}

.single-tools-page h3 {
  font-size: 2.375rem;
}

.single-tools-page h4 {
  font-size: 1.625rem;
}

.single-tools-page a {
  text-decoration: none !important;
  transition: 0.3s;
}

/* Base pill button - the Programs CTA link builds on this. */
.single-tools-page .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 3.75rem;
  min-width: 12.5rem;
  padding: 0 2rem;
  border: 0.125rem solid transparent;
  color: #000;
  border-radius: 100vmax;
  font-size: 1.125rem;
  letter-spacing: 0.0625em;
  text-transform: uppercase;
  text-decoration: none;
  background: #fff;
  cursor: pointer;
  transition: 0.3s;
}

.single-tools-page .btn:hover {
  background: rgba(255 255 255 / 12.5%);
  color: #fff;
  border-color: #fff;
}

/* ============================================
   PROGRAMS SECTION (ACF layout: st_programs)
============================================ */
.single-tools-page .book-programs-section {
  padding: 4.75rem 0 5.25rem;
  background: #fff;
}

.single-tools-page .book-programs-inner {
  background-color: #F2F7FB;
  padding: 60px;
}

.single-tools-page .book-programs-inner--plain {
  background-color: transparent;
  padding: 0;
}

.single-tools-page .book-programs-header {
  text-align: center;
  margin-bottom: 3rem;
}

.single-tools-page .book-programs-header h2 {
  font-family: var(--sw_title);
  font-size: 3.25rem;
  color: var(--sw_accent);
  font-weight: normal;
  margin-bottom: 0.5rem;
}

.single-tools-page .book-programs-header h2 em {
  color: var(--sw_secondary);
  font-style: italic;
}

.single-tools-page .book-programs-header .book-programs-intro {
  max-width: 52rem;
  margin: 1rem auto 0;
  font-family: var(--sw_body);
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--sw_accent);
}

/* Column count follows the authored program count via data-cols (set in
   programs.php); four is the fallback and the cap, so 5+ programs wrap. */
.single-tools-page .book-programs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.single-tools-page .book-programs-grid[data-cols="1"] {
  grid-template-columns: 1fr;
}

.single-tools-page .book-programs-grid[data-cols="2"] {
  grid-template-columns: repeat(2, 1fr);
}

.single-tools-page .book-programs-grid[data-cols="3"] {
  grid-template-columns: repeat(3, 1fr);
}

/* A lone program has no neighbour to divide from and would otherwise run the
   full container width. */
.single-tools-page .book-programs-grid[data-cols="1"] .program-col {
  border-left: none;
  padding-inline: 0;
  max-width: 48rem;
  margin-inline: auto;
}

.single-tools-page .book-programs-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 3rem;
}

.single-tools-page .book-programs-cta .btn {
  background-color: var(--sw_primary);
  color: var(--sw_white);
}

/* The base .btn:hover flips to a white border, so the border is restated here. */
.single-tools-page .book-programs-cta .btn:hover {
  background-color: var(--sw_quaternary);
  border-color: var(--sw_quaternary);
  color: var(--sw_white);
}

.single-tools-page .program-col {
  padding: 0 2rem;
  position: relative;
  border-left: 1px solid black;
}

.single-tools-page .program-media {
  width: 80%;
  border-radius: 0.125rem;
  overflow: hidden;
  aspect-ratio: 16/10;
  margin-bottom: 1.1rem;
}

.single-tools-page .program-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.single-tools-page .program-body h3 {
  font-family: var(--sw_title);
  font-size: 2.375rem;
  color: var(--sw_accent);
  margin-bottom: 0.85rem;
  font-weight: normal;
}

.single-tools-page .program-body p {
  font-family: var(--sw_body);
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 0.9rem;
}

.single-tools-page .program-points {
  list-style: none;
  padding: 10px 8px 10px 15px;
  margin: 0 0 1rem;
  background: #f4f7f8;
}

.single-tools-page .program-points li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-family: var(--sw_body);
  color: #60666d;
  line-height: 1.5;
  padding: 0.25rem 0;
  font-size: 1.125rem;
}

.single-tools-page .program-points li::before {
  content: "";
  width: 5px;
  height: 5px;
  background: var(--sw_secondary);
  flex-shrink: 0;
  margin-top: 0.25rem;
  border-radius: 0px;
  position: relative;
  top: 4px;
}

.single-tools-page .program-footnote {
  font-family: var(--sw_body);
  font-size: 1.2rem;
  color: #8b8f96;
  line-height: 1.5;
  font-weight: 600;
}

/* ============================================
   CTA SECTION (ACF layout: st_cta)
============================================ */
.single-tools-page .rtb-cta-section {
  background: #F3F8FB;
  padding: 5.5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.single-tools-page .rtb-cta-section::before {
  content: "";
  position: absolute;
  left: 15%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(-12deg);
  width: 175px;
    height: 565px;
    pointer-events: none;
    background-image: url('https://www.stonewoodfinancial.com/wp-content/uploads/2026/04/StoneWood_Icon.svg');
    filter: contrast(0.9);
    background-repeat: no-repeat;
    background-size: contain;
}

.single-tools-page .rtb-cta-content {
  position: relative;
  z-index: 2;
}

.single-tools-page .rtb-cta-content h2 {
  color: #2a3a4a;
  font-size: 2.75rem;
  margin-bottom: 0.875rem;
}

.single-tools-page .rtb-cta-content p {
  color: #555;
  font-size: 1.25rem;
  max-width: 70rem;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.single-tools-page .rtb-cta-buttons {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  flex-wrap: wrap;
}

.single-tools-page .cta-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 3.75rem;
  min-width: 12.5rem;
  padding: 0 2rem;
  background: var(--sw_primary);
  color: #fff;
  border-radius: 100vmax;
  font-size: 1.125rem;
  text-transform: uppercase;
  letter-spacing: 0.0625em;
  border: 0.125rem solid var(--sw_primary);
  cursor: pointer;
  transition: 0.3s;
  text-decoration: none;
}

.single-tools-page .cta-btn-primary:hover {
  background: #003560;
  border-color: #003560;
  color: #fff;
}

.single-tools-page .cta-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 3.75rem;
  min-width: 12.5rem;
  padding: 0 2rem;
  background: transparent;
  color: var(--sw_primary);
  border: 0.125rem solid var(--sw_primary);
  border-radius: 100vmax;
  font-size: 1.125rem;
  text-transform: uppercase;
  letter-spacing: 0.0625em;
  cursor: pointer;
  transition: 0.3s;
  text-decoration: none;
}

.single-tools-page .cta-btn-outline:hover {
  background: var(--sw_primary);
  color: #fff;
}

/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 1536px) {
  .single-tools-page .btn {
    height: 3.375rem;
    padding: 0 1.75rem;
    font-size: 1.1rem;
  }
}

@media (max-width: 1365px) {
  .single-tools-page .container {
    padding: 0 1.5rem;
  }

  .single-tools-page .btn {
    min-width: 9.75rem;
    letter-spacing: 0.0325em;
  }
}

@media (max-width: 1200px) {
  .single-tools-page .book-programs-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }

  /* 3 and 4 collapse to two abreast; 1 and 2 already fit, so they are left as
     authored (their desktop rules outrank the one above). */
  .single-tools-page .book-programs-grid[data-cols="3"],
  .single-tools-page .book-programs-grid[data-cols="4"] {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .single-tools-page .book-programs-inner {
    padding: 30px 20px !important;
  }

  /* [data-cols] is needed to outrank the desktop column rules. */
  .single-tools-page .book-programs-grid,
  .single-tools-page .book-programs-grid[data-cols] {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .single-tools-page .book-programs-header h2 {
    font-size: 1.875rem;
  }

  .single-tools-page .book-programs-header .book-programs-intro {
    font-size: 1rem;
  }

  .single-tools-page .program-body h3 {
    font-size: 1.875rem;
  }

  .single-tools-page .program-col {
    padding: 0 0 1.5rem;
    border-left: none;
    border-bottom: 1px solid black;
  }

  .single-tools-page .program-col:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  .single-tools-page .rtb-cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .single-tools-page .rtb-cta-content h2 {
    font-size: 2.375rem;
  }

  .single-tools-page .cta-btn-primary,
  .single-tools-page .cta-btn-outline {
    height: 2.875rem;
    padding: 0 1.25rem;
    font-size: 1.25rem;
  }
}

@media (max-width: 575px) {
  .single-tools-page .book-programs-section {
    padding: 3rem 0 0;
  }

  .single-tools-page .book-programs-inner {
    padding: 20px 15px !important;
  }

  .single-tools-page .book-programs-header {
    margin-bottom: 2rem;
  }

  .single-tools-page .book-programs-grid {
    grid-template-columns: 1fr;
  }

  .single-tools-page .program-col {
    padding-inline: 0;
  }

  .single-tools-page .program-media {
    width: 100%;
    margin-bottom: 1.1rem;
  }

  /* Below this breakpoint the wrapper is bumped to 16px but rem would
     under-scale here - px keeps parity with the single-book port. */
  .single-tools-page .program-body h3 {
    font-size: 24px;
    color: #3f3f3f;
  }

  .single-tools-page .program-body p {
    min-height: auto;
  }

  .single-tools-page .program-body h3 br {
    display: none;
  }

  .single-tools-page .program-points li {
    font-size: 14px;
  }

  .single-tools-page .program-footnote {
    font-size: 19px;
  }

  .single-tools-page .rtb-cta-content h2 {
    font-size: 1.8rem;
  }

  .single-tools-page .cta-btn-primary,
  .single-tools-page .cta-btn-outline {
    /* height: 2.625rem;
    padding: 0 0.625rem;
    font-size: 0.875rem; */
    min-width: 9.75rem;
    letter-spacing: 0.0325em;
  }
}

@media (max-width: 550px) {
  .single-tools-page section.rtb-cta-section {
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* ============================================
   SPLIT CTA (ACF layout: split_cta)
============================================ */
.single-tools-page .st-split {
  background: #F7F4EE;
  padding: 5.5rem 0;
}

.single-tools-page .st-split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.single-tools-page .st-split-heading {
  font-family: var(--sw_title);
  font-size: 3.25rem;
  line-height: 1.15;
  font-weight: normal;
  color: var(--sw_primary);
  margin-bottom: 1.75rem;
}

.single-tools-page .st-split-heading em {
  color: var(--sw_secondary);
  font-style: italic;
}

.single-tools-page .st-split-content {
  font-family: var(--sw_body);
  font-size: 1.125rem;
  line-height: 1.7;
  color: #4a4f55;
}

.single-tools-page .st-split-content p {
  margin: 0 0 1.25rem;
}

.single-tools-page .st-split-content p:last-child {
  margin-bottom: 0;
}

.single-tools-page .st-split-content strong {
  color: var(--sw_primary);
}

.single-tools-page .st-split-cta-heading {
  font-family: var(--sw_title);
  font-size: 1.75rem;
  font-weight: normal;
  color: #2a3a4a;
  margin: 2.25rem 0 0;
}

.single-tools-page .st-split-actions {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.single-tools-page .st-split-actions .btn {
  background-color: var(--sw_primary);
  border-color: var(--sw_primary);
  color: var(--sw_white);
}

/* The base .btn:hover flips to a white border, so the border is restated here. */
.single-tools-page .st-split-actions .btn:hover {
  background-color: var(--sw_quaternary);
  border-color: var(--sw_quaternary);
  color: var(--sw_white);
}

.single-tools-page .st-split-link {
  font-family: var(--sw_body);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.0625em;
  text-transform: uppercase;
  color: var(--sw_primary);
  text-decoration: none;
  padding-bottom: 0.625rem;
  border-bottom: 1px solid var(--sw_primary);
  transition: 0.3s;
}

.single-tools-page .st-split-link::after {
  content: "\2192";
  margin-left: 0.5rem;
  display: inline-block;
  transition: transform 0.3s;
}

.single-tools-page .st-split-link:hover {
  color: var(--sw_quaternary);
  border-bottom-color: var(--sw_quaternary);
}

.single-tools-page .st-split-link:hover::after {
  transform: translateX(0.25rem);
}

/* Natural aspect ratio - authors upload their own crop, so nothing is forced. */
.single-tools-page .st-split-media img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 1200px) {
  .single-tools-page .st-split-grid {
    gap: 2.5rem;
  }

  .single-tools-page .st-split-heading {
    font-size: 2.75rem;
  }
}

@media (max-width: 991px) {
  .single-tools-page .st-split {
    padding: 3.5rem 0;
  }

  .single-tools-page .st-split-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .single-tools-page .st-split-heading {
    font-size: 2.25rem;
  }
}

@media (max-width: 575px) {
  .single-tools-page .st-split {
    padding: 2.5rem 0;
  }

  .single-tools-page .st-split-heading {
    font-size: 26px;
    margin-bottom: 1.25rem;
  }

  .single-tools-page .st-split-content {
    font-size: 15px;
  }

  .single-tools-page .st-split-cta-heading {
    font-size: 20px;
    margin-top: 1.5rem;
  }

  .single-tools-page .st-split-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 1.25rem;
  }

  .single-tools-page .st-split-link {
    font-size: 14px;
  }
}
