/**
 * Faulkner – Global utility classes
 * Spacing, display, sizing, color, and layout helpers.
 * Relies on :root variables in style.css.
 */

/* ===== DISPLAY ===== */
.block-important {
  display: block !important;
}
.flex {
  display: flex;
}
.width-auto {
  width: auto;
}
.flex-direction-column {
  flex-direction: column;
}
.inline-block {
  display: inline-block;
}

/* ===== SPACING (margin / padding) ===== */
.mb-0 {
  margin-bottom: 0;
}
.mb-15 {
  margin-bottom: 15px;
}
.mb-30 {
  margin-bottom: 30px;
}
.mb-50 {
  margin-bottom: 50px;
}
.mt-0 {
  margin-top: 0;
}
.mr-0 {
  margin-right: 0;
}
.ml-0 {
  margin-left: 0;
}
.p-0 {
  padding: 0;
}
.pt-0 {
  padding-top: 0;
}
.pb-0 {
  padding-bottom: 0;
}
.pb-10 {
  padding-bottom: 10px;
}
.pr-0 {
  padding-right: 0;
}
.pr-30 {
  padding-right: 30px;
}
.pl-0 {
  padding-left: 0;
}

/* Responsive spacing: md = 768px+, lg = 981px+ */
@media (min-width: 768px) {
  .md-mb-0 {
    margin-bottom: 0;
  }
  .md-mb-15 {
    margin-bottom: 15px;
  }
  .md-mb-30 {
    margin-bottom: 30px;
  }
  .md-mb-50 {
    margin-bottom: 50px;
  }
  .md-mt-0 {
    margin-top: 0;
  }
  .md-mr-0 {
    margin-right: 0;
  }
  .md-ml-0 {
    margin-left: 0;
  }
  .md-p-0 {
    padding: 0;
  }
  .md-pt-0 {
    padding-top: 0;
  }
  .md-pb-0 {
    padding-bottom: 0;
  }
  .md-pb-10 {
    padding-bottom: 10px;
  }
  .md-pr-0 {
    padding-right: 0;
  }
  .md-pr-30 {
    padding-right: 30px;
  }
  .md-pl-0 {
    padding-left: 0;
  }
}

@media (min-width: 981px) {
  .lg-mb-0 {
    margin-bottom: 0;
  }
  .lg-mb-15 {
    margin-bottom: 15px;
  }
  .lg-mb-30 {
    margin-bottom: 30px;
  }
  .lg-mb-50 {
    margin-bottom: 50px;
  }
  .lg-mt-0 {
    margin-top: 0;
  }
  .lg-mr-0 {
    margin-right: 0;
  }
  .lg-ml-0 {
    margin-left: 0;
  }
  .lg-p-0 {
    padding: 0;
  }
  .lg-pt-0 {
    padding-top: 0;
  }
  .lg-pb-0 {
    padding-bottom: 0;
  }
  .lg-pb-10 {
    padding-bottom: 10px;
  }
  .lg-pr-0 {
    padding-right: 0;
  }
  .lg-pr-30 {
    padding-right: 30px;
  }
  .lg-pl-0 {
    padding-left: 0;
  }
}

/* ===== SIZING ===== */
.w-100 {
  width: 100%;
}
.h-100 {
  height: 100%;
}
.max-w-100 {
  max-width: 100%;
}
.max-h-100 {
  max-height: 100%;
}
.min-w-100 {
  min-width: 100%;
}
.min-h-100 {
  min-height: 100%;
}

/* ===== BORDER ===== */
.bottom-border,
.et-db #et-boc .et-l .bottom-border {
  border-bottom: 1px solid rgba(0, 93, 170, 0.3);
}

/* ===== COLOR (primary blue) ===== */
.primary-blue {
  color: var(--Primary-Blue);
}
.bg-primary-blue {
  background-color: var(--Primary-Blue);
}

/* ===== LAYOUT HELPERS ===== */
.justify-left {
  justify-content: start;
}
.two-button-row {
  display: flex;
  margin-bottom: auto;
  margin-top: 0;
}
/* Rows without justify-left: keep buttons centered (original behavior) */
.two-button-row:not(.justify-left) {
  justify-content: center;
}
/* justify-left must win on desktop; center on mobile (narrower than Divi tablet break) */
.two-button-row.justify-left {
  justify-content: flex-start;
}
@media only screen and (max-width: 980px) {
  .two-button-row.justify-left {
    justify-content: center;
  }
}
.two-button-row .et_pb_column {
  width: auto !important;
  margin: 0;
}

/**
 * Optional: add class "stack-mobile" on the same Divi row as "two-button-row"
 * (Row → Advanced → CSS Class: two-button-row stack-mobile).
 * Below 981px: stack columns, center the button group, kill Divi / style.css gutters.
 *
 * Recommended class string (example):
 *   two-button-row stack-mobile
 * With footer-style alignment on large screens + centered stack on phone:
 *   two-button-row stack-mobile justify-left
 */
@media only screen and (max-width: 980px) {
  .two-button-row.stack-mobile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
  }

  .two-button-row.stack-mobile .et_pb_column {
    width: auto !important;
    max-width: 100%;
    margin: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* style.css uses .two-button-row .et_pb_column:last-child { margin-left: 20px } — higher specificity without :last-child override */
  .two-button-row.stack-mobile .et_pb_column:last-child {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

/* ===== HOVER: thin animated underline ===== */
/* Wrappers: .chs-resources-row.hover-animated-underline | .hover-animated-underline */
/* Targets: .et_pb_text.et_clickable h4 and any descendant <a> */
:is(.chs-resources-row.hover-animated-underline, .hover-animated-underline)
  .et_pb_text.et_clickable
  h4,
:is(.chs-resources-row.hover-animated-underline, .hover-animated-underline) a {
  position: relative;
  display: inline-block;
  padding-bottom: 0.15em;
  margin-bottom: 0;
}

:is(.chs-resources-row.hover-animated-underline, .hover-animated-underline) a {
  text-decoration: none;
}

:is(.chs-resources-row.hover-animated-underline, .hover-animated-underline)
  .et_pb_text.et_clickable
  h4::after,
:is(.chs-resources-row.hover-animated-underline, .hover-animated-underline)
  a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background-color: currentColor;
  opacity: 0.9;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Link wrapping h4: one line only (from h4) */
:is(.chs-resources-row.hover-animated-underline, .hover-animated-underline)
  a:has(h4)::after {
  content: none;
}

:is(.chs-resources-row.hover-animated-underline, .hover-animated-underline)
  .et_pb_text.et_clickable:hover
  h4::after,
:is(.chs-resources-row.hover-animated-underline, .hover-animated-underline)
  .et_pb_text.et_clickable:focus-within
  h4::after,
:is(.chs-resources-row.hover-animated-underline, .hover-animated-underline)
  a:hover
  h4::after,
:is(.chs-resources-row.hover-animated-underline, .hover-animated-underline)
  a:focus-visible
  h4::after,
:is(.chs-resources-row.hover-animated-underline, .hover-animated-underline)
  a:hover::after,
:is(.chs-resources-row.hover-animated-underline, .hover-animated-underline)
  a:focus-visible::after {
  transform: scaleX(1);
}

@media (prefers-reduced-motion: reduce) {
  :is(.chs-resources-row.hover-animated-underline, .hover-animated-underline)
    .et_pb_text.et_clickable
    h4::after,
  :is(.chs-resources-row.hover-animated-underline, .hover-animated-underline)
    a::after {
    transition-duration: 0.01ms;
  }
}
