/* ===========================================================================
   Sofyt — design layer  ("Tonal Blue")
   ---------------------------------------------------------------------------
   Loads LAST, after theme.css and custom.css, so it wins on equal specificity
   without needing !important. One hue family throughout: navy for headings,
   blue for anything interactive, pale blue-grey for quiet ground.
   =========================================================================== */

:root {
  /* ---- colour ---------------------------------------------------------- */
  --sf-navy:        #0F2740;   /* headings, dark bands, footer              */
  --sf-blue:        #1B5E96;   /* primary — links, buttons, active state    */
  --sf-blue-dark:   #154B78;   /* hover                                     */
  --sf-bright:      #3D86C6;   /* accents, focus rings, on dark grounds     */
  --sf-tint:        #EEF3F8;   /* quiet section ground                      */
  --sf-tint-deep:   #DFE9F2;   /* hairline fills                            */
  --sf-surface:     #FFFFFF;
  --sf-ink:         #1C2A38;   /* body text — a navy-leaning near-black     */
  --sf-ink-2:       #5C6B7A;   /* secondary text                            */
  --sf-ink-3:       #8795A3;   /* captions, placeholders                    */
  --sf-line:        #D8E1EA;   /* borders                                   */
  --sf-line-soft:   #E8EEF4;

  /* semantic — separate from the accent, used only for state */
  --sf-ok:          #2E7D5B;
  --sf-ok-bg:       #E8F3EE;
  --sf-err:         #B5444A;
  --sf-err-bg:      #F8ECED;

  /* ---- type scale ------------------------------------------------------ */
  --sf-font: 'Montserrat', ui-sans-serif, -apple-system, BlinkMacSystemFont,
             'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --sf-xs:   0.75rem;     /* 12 — uppercase labels      */
  --sf-sm:   0.875rem;    /* 14 — captions, table text  */
  --sf-base: 1rem;        /* 16 — body                  */
  --sf-lead: 1.125rem;    /* 18 — .lead                 */
  --sf-h4:   1.25rem;     /* 20 */
  --sf-h3:   1.5rem;      /* 24 */
  --sf-h2:   1.875rem;    /* 30 */
  --sf-h1:   clamp(2rem, 4.5vw, 2.875rem);

  --sf-tight: -0.022em;
  --sf-wide:  0.14em;

  /* ---- shape ----------------------------------------------------------- */
  /* ---- one content gutter for the whole site ----------------------------
     Bootstrap 3 steps the container between 750 / 970 / 1170px, so content
     jumped to a different left edge at each breakpoint while the full-bleed
     sections stayed put. One width, one gutter, everywhere. */
  --sf-container: 1180px;
  --sf-gutter: 24px;

  --sf-radius: 5px;
  --sf-radius-lg: 8px;
  --sf-shadow: 0 1px 2px rgba(15, 39, 64, .05), 0 6px 18px rgba(15, 39, 64, .06);
}

/* ===========================================================================
   1. Base typography
   =========================================================================== */

body {
  font-family: var(--sf-font);
  font-size: var(--sf-base);
  font-weight: 400;
  line-height: 1.65;
  color: var(--sf-ink);
  background: var(--sf-surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: var(--sf-font);
  color: var(--sf-navy);
  letter-spacing: var(--sf-tight);
  text-wrap: balance;
  margin-top: 0;
}

h1, .h1 { font-size: var(--sf-h1); font-weight: 900; line-height: 1.08; margin-bottom: .5em; }
h2, .h2 { font-size: var(--sf-h2); font-weight: 900; line-height: 1.15; margin-bottom: .55em; }
h3, .h3 { font-size: var(--sf-h3); font-weight: 700; line-height: 1.25; margin-bottom: .6em; }
h4, .h4 { font-size: var(--sf-h4); font-weight: 700; line-height: 1.3;  margin-bottom: .6em; }
h5, .h5 { font-size: var(--sf-base); font-weight: 700; line-height: 1.4; margin-bottom: .6em; }
h6, .h6 { font-size: var(--sf-sm); font-weight: 700; letter-spacing: var(--sf-wide);
          text-transform: uppercase; color: var(--sf-ink-2); margin-bottom: .7em; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

/* .lead is used 51 times, but NOT as an intro paragraph -- on About,
   Services and most inner pages it is the main body copy. So it is set as
   comfortable reading text, with a measure so long paragraphs do not run
   the full width of a desktop screen. */
.lead {
  font-size: 1.0625rem;   /* 17 */
  font-weight: 400;
  line-height: 1.78;
  color: var(--sf-ink);
  letter-spacing: 0;
  max-width: 76ch;
}
.lead + .lead { margin-top: 1.25em; }
.text-center .lead, .lead.text-center { margin-left: auto; margin-right: auto; }
/* Inside narrow columns and cards, let it fill the space it is given */
.col-sm-3 .lead, .col-sm-4 .lead, .col-md-4 .lead,
.feature .lead, .boxed .lead, .imagebg .lead { max-width: none; }

strong, b { font-weight: 700; }
small, .text-sm { font-size: var(--sf-sm); }

a { color: var(--sf-blue); text-decoration: none; transition: color .15s ease; }
a:hover, a:focus { color: var(--sf-blue-dark); }
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--sf-bright);
  outline-offset: 2px;
}

hr { border: 0; border-top: 1px solid var(--sf-line); margin: 2em 0; }

/* ===========================================================================
   2. Section grounds
   =========================================================================== */

.bg--secondary { background: var(--sf-tint); }
.bg--primary, .bg--primary-1 { background: var(--sf-blue); color: #fff; }
.bg--primary h1, .bg--primary h2, .bg--primary h3, .bg--primary h4,
.bg--primary .h2, .bg--primary-1 h1, .bg--primary-1 h2,
.bg--primary-1 h3, .bg--primary-1 .h2 { color: #fff; }
.bg--primary p, .bg--primary .lead,
.bg--primary-1 p, .bg--primary-1 .lead { color: #D6E4F0; }
.bg--dark { background: var(--sf-navy); color: #fff; }

/* Text sitting over a background photograph */
.imagebg h1, .imagebg h2, .imagebg h3, .imagebg .h2 { color: #fff; }
.imagebg .lead, .imagebg p { color: rgba(255,255,255,.88); }
.banner, .banner h1, .banner h2 { color: #fff; }

/* ===========================================================================
   3. Buttons
   =========================================================================== */

.btn,
.btn--primary,
.btn-primary,
.btn--success,
.btn-success,
a.btn {
  font-family: var(--sf-font);
  font-size: var(--sf-sm);
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.2;
  padding: .78em 1.6em;
  border-radius: var(--sf-radius);
  border: 1px solid transparent;
  text-transform: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
  cursor: pointer;
}

.btn--primary, .btn-primary,
.btn--success, .btn-success,
.btn.btn--primary, .btn.btn-primary {
  background: var(--sf-blue);
  border-color: var(--sf-blue);
  color: #fff;
}
.btn--primary:hover, .btn-primary:hover,
.btn--success:hover, .btn-success:hover {
  background: var(--sf-blue-dark);
  border-color: var(--sf-blue-dark);
  color: #fff;
}

.btn--secondary, .btn-default {
  background: transparent;
  border-color: var(--sf-line);
  color: var(--sf-ink);
}
.btn--secondary:hover, .btn-default:hover {
  border-color: var(--sf-blue);
  color: var(--sf-blue);
}

/* Buttons on a dark or photographic ground */
.imagebg .btn--primary, .bg--primary .btn--primary,
.imagebg .btn-primary,  .bg--primary .btn-primary {
  background: #fff;
  border-color: #fff;
  color: var(--sf-blue);
}
.imagebg .btn--primary:hover, .bg--primary .btn--primary:hover {
  background: var(--sf-tint);
  border-color: var(--sf-tint);
  color: var(--sf-blue-dark);
}

.btn__text { font-weight: 700; }
.btn-sm, .btn--sm { font-size: var(--sf-xs); padding: .65em 1.2em; }
.btn-lg, .btn--lg { font-size: var(--sf-base); padding: .9em 2em; }

/* ===========================================================================
   4. Cards, boxes, feature blocks
   =========================================================================== */

.boxed, .feature, .card {
  background: var(--sf-surface);
  border-radius: var(--sf-radius-lg);
}
.boxed--border, .feature.boxed--border, .card {
  border: 1px solid var(--sf-line);
}
.boxed--lg { padding: 2rem; }

.feature-3, .feature {
  border-top: 3px solid var(--sf-blue);
  transition: box-shadow .18s ease, transform .18s ease;
}
.feature-3:hover, .feature:hover { box-shadow: var(--sf-shadow); }

.feature h4, .feature h3, .card-header h4 { color: var(--sf-navy); }
.feature p { color: var(--sf-ink-2); font-size: var(--sf-sm); }

.card { box-shadow: none; }
.card-header {
  background: var(--sf-tint);
  border-bottom: 1px solid var(--sf-line);
  font-weight: 700;
  color: var(--sf-navy);
}
.card-body { background: var(--sf-surface); }

/* ===========================================================================
   5. Navigation
   =========================================================================== */

.sf-nav.bar, .sf-nav {
  /* theme.css sets .bar { padding: 1.857em 0 } -- roughly 60px of extra
     height on top of our own. Reset it and control the height here. */
  padding: 0;
  background: var(--sf-surface);
  border-bottom: 1px solid var(--sf-line);
  position: sticky;
  top: 0;
  z-index: 900;
  padding: 0;
}

.sf-nav__inner {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  min-height: 80px;
  padding: .5rem 0;
}

/* The logo is a wordmark with the company name and tagline baked in, so it
   is sized by WIDTH. Research puts horizontal header logos at 160-250px wide;
   46px tall worked out to ~111px wide, which is why the words were unreadable.
   The source file is only 278x115, so 175px is about as large as it can go
   before it softens on a retina screen -- see the note about getting an SVG. */
.sf-nav__brand { flex: 0 0 auto; line-height: 0; }
.sf-logo { display: block; line-height: 0; }
.sf-nav__brand img { width: 146px; height: auto; max-width: 100%; }

.sf-nav__menu { flex: 1 1 auto; display: flex; justify-content: center; min-width: 0; }

.sf-menu {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
  float: none;
}
.sf-menu > li { position: relative; float: none; margin: 0; padding: 0; }

.sf-menu > li > a,
.sf-menu > li > .dropdown__trigger,
.bar-1 .menu-horizontal > li > a,
.bar-1 .menu-horizontal > li > .dropdown__trigger {
  display: block;
  font-family: var(--sf-font);
  /* Uppercase and letter-spaced reads larger and more confident than
     sentence case at the same size -- this is what the old header had. */
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--sf-ink);
  padding: 0;
  line-height: 1.4;
  cursor: pointer;
  transition: color .15s ease;
  /* "SCHOOLS & PARTNERS" was wrapping onto a second line, and the dropdown
     chevron was dropping below "WHO ARE WE" -- both pushed the bar out of
     alignment. Keep every item on one line. */
  white-space: nowrap;
}
.sf-menu > li > .dropdown__trigger {
  display: inline-flex;
  align-items: center;
}

/* The active/hover indicator lives on the li, positioned out of flow.
   It cannot go on .dropdown__trigger::after -- theme.css already uses that
   pseudo-element for the little chevron glyph, and its selector is more
   specific, so the two collided and rendered the arrow inside the bar.
   Keeping it off the flow also stops it adding height to each item, which
   was pushing the menu text above the vertical centre of the bar. */
.sf-menu > li::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -9px;
  height: 2px;
  border-radius: 2px;
  background: var(--sf-blue);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .18s ease;
  pointer-events: none;
}
.sf-menu > li:hover::after,
.sf-menu > li.is-active::after { transform: scaleX(1); }

.sf-menu > li:hover > a,
.sf-menu > li:hover > .dropdown__trigger,
.sf-menu > li.is-active > a,
.sf-menu > li.is-active > .dropdown__trigger { color: var(--sf-blue); }

/* theme's chevron -- keep it, just make it quiet */
.sf-menu > .dropdown > .dropdown__trigger:after {
  margin-left: .45em;
  bottom: 0;
  opacity: .5;
}

/* ---- dropdown panel -------------------------------------------------------
   theme.css already gives .dropdown__content a white background. The card
   styling belongs there, NOT on .dropdown__container -- the container holds a
   full-width Bootstrap .container, so styling it produced a second, much wider
   white panel sitting behind the real one.
   -------------------------------------------------------------------------- */
.sf-menu .dropdown__container {
  background: none;
  border: 0;
  box-shadow: none;
  padding: 0;
  left: 0;
  width: auto;
  min-width: 210px;
}
.sf-menu .dropdown__container::before { display: none; }
.sf-menu .dropdown__container > .container {
  width: auto;
  max-width: none;
  padding: 0;
  margin: 0;
}
.sf-menu .dropdown__container > .container > .row { margin: 0; }

.sf-menu .dropdown__content,
.sf-menu .dropdown .dropdown__content:not([class*='bg-']) {
  background: var(--sf-surface);
  border: 1px solid var(--sf-line);
  border-radius: var(--sf-radius-lg);
  box-shadow: 0 2px 4px rgba(15,39,64,.05), 0 14px 34px rgba(15,39,64,.12);
  padding: .5rem;
  width: auto;
  min-width: 210px;
  float: none;
  margin-top: 10px;
}

.menu-vertical { list-style: none; margin: 0; padding: 0; }
.menu-vertical li a,
.dropdown .dropdown__content:not([class='bg--dark']) .menu-vertical a {
  display: block;
  font-size: var(--sf-sm);
  font-weight: 600;
  color: var(--sf-ink-2);
  padding: .6rem .8rem;
  border-radius: var(--sf-radius);
  transition: color .15s ease, background-color .15s ease;
  white-space: nowrap;
}
.menu-vertical li a:hover,
.dropdown .dropdown__content:not([class='bg--dark']) .menu-vertical a:hover {
  color: var(--sf-blue);
  background: var(--sf-tint);
}

/* right-hand actions */
.sf-nav__action {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 1.1rem;
}
.sf-nav__phone {
  display: inline-block;
  white-space: nowrap;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--sf-navy);
  border: 1.5px solid var(--sf-line);
  border-radius: 999px;
  padding: .85em 1.6em;
  transition: border-color .15s ease, color .15s ease, background-color .15s ease;
}
.sf-nav__phone:hover {
  border-color: var(--sf-blue);
  color: var(--sf-blue);
  background: var(--sf-tint);
}

.sf-nav__user {
  font-size: var(--sf-sm);
  font-weight: 600;
  color: var(--sf-ink-2);
  padding-right: 1.1rem;
  border-right: 1px solid var(--sf-line);
  white-space: nowrap;
}
.sf-nav__logout { font-size: var(--sf-sm); font-weight: 600; color: var(--sf-blue); }
.sf-hidden { display: none; }

/* mobile bar in the layout */
.bar--sm.visible-xs { background: var(--sf-surface); border-bottom: 1px solid var(--sf-line); padding: .6rem 0; }
.bar--sm.visible-xs img { width: 140px; height: auto; }
/* 48px minimum tap target on mobile */
.hamburger-toggle { display: inline-flex; align-items: center; justify-content: center;
                    min-width: 48px; min-height: 48px; }
.hamburger-toggle i { color: var(--sf-navy); }

@media (max-width: 991px) {
  .sf-nav__inner { flex-wrap: wrap; gap: 1rem; }
  .sf-nav__menu { order: 3; width: 100%; justify-content: flex-start; }
  .sf-menu { flex-wrap: wrap; gap: 1.1rem; }
  .sf-nav__action { margin-left: auto; }
}

/* ===========================================================================
   5b. Inner page header
   ---------------------------------------------------------------------------
   The background images here are wide, short strips (about.png is 3600x350),
   so inside a 260px band they rendered as a stripe with navy above and below
   it -- the "bar inside a bar". They are textures, not photographs, and add
   nothing, so the band is a flat navy field instead.
   =========================================================================== */

.banner {
  position: relative;
  padding: 0;
  min-height: 210px;
  display: flex;
  align-items: center;
  background: var(--sf-navy);
  background-image: linear-gradient(135deg, #0F2740 0%, #1A3A5C 100%);
  overflow: hidden;
}
.banner .background-image-holder { display: none; }
.banner::after { content: none; }
.banner > .container {
  position: relative;
  z-index: 2;
  padding-top: 2.75rem;
  padding-bottom: 2.75rem;
}
.banner h1 {
  color: #fff;
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  font-weight: 900;
  margin-bottom: .3em;
}
.banner .lead { color: rgba(255,255,255,.82); max-width: 54ch; }
.banner .lead:empty { display: none; }
.banner .col-sm-6, .banner .col-md-5 { width: auto; float: none; }

/* ===========================================================================
   6. Forms
   =========================================================================== */

input[type="text"], input[type="email"], input[type="password"],
input[type="tel"], input[type="number"], input[type="date"],
select, textarea, .form-control {
  font-family: var(--sf-font);
  font-size: 1.0625rem;
  color: var(--sf-ink);
  background: var(--sf-surface);
  border: 1px solid #C3D0DC;
  border-radius: 8px;
  padding: .85em 1.05em;
  margin: 0 0 .25em;
  min-height: 56px;
  line-height: 1.5;
  transition: border-color .15s ease, box-shadow .15s ease;
  width: 100%;
}
input:hover, select:hover, textarea:hover { border-color: #B8C7D6; }
input:focus, select:focus, textarea:focus, .form-control:focus {
  border-color: var(--sf-blue);
  box-shadow: 0 0 0 3px rgba(27, 94, 150, .15);
  outline: none;
}
::placeholder { color: var(--sf-ink-3); }

/* Sentence case at 14px. The tiny uppercase treatment was unreadable on
   long labels like "highest level of school your mother completed", and the
   blades were overriding it inline to 16px on some forms anyway. */
label, .col-form-label {
  font-family: var(--sf-font);
  font-size: var(--sf-sm);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--sf-ink);
  margin-bottom: .45em;
  display: block;
  line-height: 1.45;
}

.g-recaptcha { margin: 1rem 0; }

/* ===========================================================================
   7. Alerts  (partials/errors.blade.php)
   =========================================================================== */

.alert {
  border-radius: var(--sf-radius);
  border: 1px solid transparent;
  padding: 1rem 1.15rem;
  font-size: var(--sf-sm);
  margin-bottom: 1.4rem;
}
.alert.bg--error, .alert.bg--danger {
  background: var(--sf-err-bg); border-color: #E7C6C9; color: var(--sf-err);
}
.alert.bg--success {
  background: var(--sf-ok-bg); border-color: #C3DFD2; color: var(--sf-ok);
}
.alert ul { margin: 0; padding-left: 1.1rem; }
.alert__close { cursor: pointer; opacity: .55; }
.alert__close:hover { opacity: 1; }

/* ===========================================================================
   8. Tables  (admin lists)
   =========================================================================== */

table { font-size: var(--sf-sm); }
table th {
  font-size: var(--sf-xs);
  font-weight: 700;
  letter-spacing: var(--sf-wide);
  text-transform: uppercase;
  color: var(--sf-ink-2);
  border-bottom: 1px solid var(--sf-line);
}
table td { border-bottom: 1px solid var(--sf-line-soft); color: var(--sf-ink); }
table td, table th { padding: .75rem .85rem; vertical-align: middle; }

/* ===========================================================================
   9. Pagination
   =========================================================================== */

.pagination > li > a, .pagination > li > span {
  color: var(--sf-blue);
  border-color: var(--sf-line);
  font-size: var(--sf-sm);
  font-weight: 600;
}
.pagination > .active > a, .pagination > .active > span {
  background: var(--sf-blue);
  border-color: var(--sf-blue);
  color: #fff;
}

/* ===========================================================================
   10. Testimonial carousel indicators (kept from custom.css, recoloured)
   =========================================================================== */

#quote-carousel .carousel-indicators li { background: var(--sf-tint-deep); }
#quote-carousel .carousel-indicators .active { background: var(--sf-blue); }

/* ===========================================================================
   11. Accessibility
   =========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

/* ===========================================================================
   12. Form furniture
   =========================================================================== */

.sf-form .row > [class*="col-"] { margin-bottom: .9rem; }
.sf-form__submit { margin-top: .6rem; }
.sf-optional {
  font-size: var(--sf-xs);
  font-weight: 500;
  color: var(--sf-ink-3);
  text-transform: none;
  letter-spacing: 0;
  margin-left: .35em;
}

/* Side note beside a form */
.sf-note {
  background: var(--sf-tint);
  border: 1px solid var(--sf-line);
  border-left: 3px solid var(--sf-blue);
  border-radius: var(--sf-radius);
  padding: 1.4rem 1.5rem;
}
.sf-note .lead { font-size: var(--sf-base); margin-bottom: .5em; max-width: none; }
.sf-note .h4, .sf-note .typed-text { font-size: var(--sf-sm); color: var(--sf-ink-2); font-weight: 400; }

/* Select elements need the native arrow back after the border reset */
select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235C6B7A' d='M1.4 0 6 4.6 10.6 0 12 1.4 6 7.4 0 1.4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .9em center;
  padding-right: 2.4em;
}

/* ===========================================================================
   13. Typography, specificity-hardened
   ---------------------------------------------------------------------------
   theme.css sizes .lead in em units and several of its rules carry two
   classes, which outranked a bare .lead. Scoping under body raises ours
   enough to win consistently, so a paragraph is the same size on Services
   as it is on About.
   =========================================================================== */

body .lead,
body p.lead,
body .feature .lead,
body .cta .lead,
body .cover .lead {
  font-size: 1.0625rem;
  line-height: 1.78;
  font-weight: 400;
  color: var(--sf-ink);
}
body .imagebg .lead, body .banner .lead { color: rgba(255,255,255,.82); }

body h1, body .h1 { font-size: var(--sf-h1); font-weight: 900; }
body h2, body .h2 { font-size: var(--sf-h2); font-weight: 900; color: var(--sf-navy); }
body h3, body .h3 { font-size: var(--sf-h3); font-weight: 700; color: var(--sf-navy); }
body h4, body .h4 { font-size: var(--sf-h4); font-weight: 700; color: var(--sf-navy); }
body .imagebg h1, body .imagebg h2, body .imagebg h3,
body .banner h1, body .bg--primary h2 { color: #fff; }

/* span.h2 is used as a heading in a few places */
span.h2, span.h4 { display: inline-block; }

/* ===========================================================================
   14. Forms as cards
   ---------------------------------------------------------------------------
   The forms are the product. They get a raised card, real padding and
   larger controls so filling one in feels deliberate rather than cramped.
   =========================================================================== */

.sf-form {
  background: var(--sf-surface);
  border: 1px solid var(--sf-line);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15,39,64,.04), 0 12px 32px rgba(15,39,64,.08);
  padding: 2.75rem 2.5rem 2.5rem;
  margin-bottom: 2rem;
}
@media (max-width: 767px) {
  .sf-form { padding: 1.75rem 1.25rem; border-radius: 10px; }
}

.sf-form .row > [class*="col-"] { margin-bottom: 1.15rem; }

.sf-form label,
.sf-form .col-form-label {
  font-size: var(--sf-sm);
  font-weight: 600;
  color: var(--sf-ink);
  margin-bottom: .5em;
}

.sf-form input[type="text"], .sf-form input[type="email"],
.sf-form input[type="password"], .sf-form input[type="tel"],
.sf-form input[type="number"], .sf-form input[type="date"],
.sf-form select, .sf-form textarea {
  font-size: 1.0625rem;      /* 17 -- a selected option has to be readable */
  line-height: 1.5;
  height: auto;
  min-height: 56px;
  padding: .85em 1.05em;
  border: 1px solid #C3D0DC;
  border-radius: 8px;
  background: var(--sf-surface);
  color: var(--sf-ink);
  margin: 0;
}
.sf-form select { min-height: 56px; }
.sf-form select option { font-size: 1rem; color: var(--sf-ink); }
.sf-form select { padding-right: 2.6em; }
.sf-form textarea { min-height: 7.5rem; resize: vertical; }
.sf-form input:focus, .sf-form select:focus, .sf-form textarea:focus {
  border-color: var(--sf-blue);
  box-shadow: 0 0 0 4px rgba(27,94,150,.14);
}

.sf-form .btn, .sf-form button[type="submit"] {
  font-size: 1rem;
  padding: 1em 2.4em;
  border-radius: 8px;
}
.sf-form__submit { margin-top: 1rem; }
.sf-captcha { margin: .5rem 0 1rem; }
.sf-field-error { color: var(--sf-err); font-size: var(--sf-sm); display: block; margin-top: .5rem; }

/* the section a form sits in gets a quiet ground so the card lifts off it */
.switchable:has(.sf-form), section:has(> .container > .row > div > .sf-form) {
  background: var(--sf-tint);
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
}

/* textarea should grow, not sit at the 56px control height */
textarea, .sf-form textarea { min-height: 8rem; }

/* ===========================================================================
   15. Page alignment
   ---------------------------------------------------------------------------
   Header, content sections and footer all sit on the same vertical line, and
   the full-bleed colour panels pull their text onto that line too instead of
   starting at their own edge.
   =========================================================================== */

@media (min-width: 992px) {
  .container {
    width: 100%;
    max-width: var(--sf-container);
    padding-left: var(--sf-gutter);
    padding-right: var(--sf-gutter);
  }
}
@media (max-width: 991px) {
  .container { padding-left: var(--sf-gutter); padding-right: var(--sf-gutter); }
}

/* Full-bleed 50/50 split (the Welcome block).
   The panel keeps its full-width colour; its inner content is pinned so its
   left edge lands exactly on the container's left edge:
   50vw - (container/2 - gutter) == (100vw - container)/2 + gutter */
.elaborate-form-1 .row--gapless > [class*="col-sm-6"] > .pos-vertical-center {
  max-width: calc(var(--sf-container) / 2 - var(--sf-gutter));
  margin-left: auto;
  margin-right: 0;
  padding: 3.5rem 3rem 3.5rem 0;
  float: none;
}
.elaborate-form-1 .row--gapless > [class*="col-sm-6"]:last-child > .pos-vertical-center {
  margin-left: 0;
  margin-right: auto;
  padding: 3.5rem 0 3.5rem 3rem;
}
/* kill the Bootstrap offsets inside -- they were the second, competing indent */
.elaborate-form-1 .pos-vertical-center > [class*="col-"] {
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
  float: none;
}
@media (max-width: 767px) {
  .elaborate-form-1 .row--gapless > [class*="col-sm-6"] > .pos-vertical-center,
  .elaborate-form-1 .row--gapless > [class*="col-sm-6"]:last-child > .pos-vertical-center {
    max-width: none;
    margin: 0;
    padding: 2.5rem var(--sf-gutter);
  }
}

/* the nav sits in the same container, flush with everything else */
.sf-nav > .container { max-width: var(--sf-container); }

/* buttons stacked in a .row inside a coloured panel were inheriting the grid's
   negative margin, which pushed them left of the text above them */
.elaborate-form-1 .pos-vertical-center .row { margin-left: 0; margin-right: 0; }
.elaborate-form-1 .pos-vertical-center .row + .row { margin-top: .75rem; }

/* contrast for buttons sitting on the blue panel */
.bg--primary .btn--secondary, .bg--primary-1 .btn--secondary {
  background: transparent;
  border-color: rgba(255,255,255,.55);
  color: #fff;
}
.bg--primary .btn--secondary:hover {
  background: rgba(255,255,255,.12);
  border-color: #fff;
  color: #fff;
}
.btn { white-space: normal; }

/* ===========================================================================
   16. Welcome panel -- taking back what the old homepage did well
   =========================================================================== */

/* Two-tone split, as the original had: lighter left, deeper right. */
.elaborate-form-1 .row--gapless > [class*="col-sm-6"]:first-child { background: #2E6FA8; }
.elaborate-form-1 .row--gapless > [class*="col-sm-6"]:last-child  { background: #1B5E96; }

.elaborate-form-1 .h2, .elaborate-form-1 h2 {
  color: #fff;
  font-size: 2rem;
  font-weight: 900;
  display: block;
  margin-bottom: .6rem;
}
.elaborate-form-1 p, .elaborate-form-1 .lead {
  color: rgba(255,255,255,.92);
  font-size: 1.125rem;        /* 18 -- the old panel text was larger, and clearer for it */
  line-height: 1.72;
  font-weight: 400;
  max-width: 46ch;
}

/* Every nested column in this panel: no grid padding, no offsets, no floats.
   A leftover 15px of column padding was what indented "Read More..." away
   from the paragraph above it. */
.elaborate-form-1 .pos-vertical-center [class*="col-"] {
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
  float: none;
}
.elaborate-form-1 .pos-vertical-center form { margin: 1.6rem 0 0; }

/* Equal-width, solid, inviting. The old pair were full width and matched;
   ours were shrink-to-fit, so one was longer than the other. */
.elaborate-form-1 .btn {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 1.15em 1.5em;
  border-radius: 8px;
  border: 2px solid transparent;
}
.elaborate-form-1 .btn + .btn { margin-top: .75rem; }

/* primary: white on blue is the highest-contrast, most inviting pairing here */
.elaborate-form-1 .btn--primary {
  background: #fff;
  border-color: #fff;
  color: var(--sf-blue);
}
.elaborate-form-1 .btn--primary:hover {
  background: var(--sf-tint);
  border-color: var(--sf-tint);
  color: var(--sf-navy);
}

/* secondary: solid navy, still clearly a button */
.elaborate-form-1 .btn--secondary {
  background: var(--sf-navy);
  border-color: var(--sf-navy);
  color: #fff;
}
.elaborate-form-1 .btn--secondary:hover {
  background: #081A2C;
  border-color: #081A2C;
  color: #fff;
}

/* "Read More" is a single action, not a full-width block */
.elaborate-form-1 .row--gapless > [class*="col-sm-6"]:first-child .btn {
  display: inline-block;
  width: auto;
  min-width: 190px;
}

/* ===========================================================================
   17. Button label colour
   ---------------------------------------------------------------------------
   theme.css sets `.btn .btn__text { color: #252525 }` on the inner span. A
   colour on the span always beats one inherited from the button, so setting
   the colour on .btn alone left dark grey labels -- invisible on the navy
   button and on anything dark. Every button colour below is stated on the
   span as well.
   =========================================================================== */

.btn .btn__text { color: inherit; }

.btn--primary .btn__text, .btn-primary .btn__text,
.btn--success .btn__text, .btn-success .btn__text { color: #fff; }
.btn--secondary .btn__text, .btn-default .btn__text { color: var(--sf-ink); }

.imagebg .btn--primary .btn__text,
.bg--primary .btn--primary .btn__text { color: var(--sf-blue); }
.bg--primary .btn--secondary .btn__text { color: #fff; }

.elaborate-form-1 .btn--primary .btn__text { color: var(--sf-blue); }
.elaborate-form-1 .btn--primary:hover .btn__text { color: var(--sf-navy); }
.elaborate-form-1 .btn--secondary .btn__text { color: #fff; }

.sf-form .btn .btn__text, .sf-form button[type="submit"] .btn__text { color: #fff; }

/* ===========================================================================
   18. Admin tables
   =========================================================================== */

.sf-table-wrap {
  background: var(--sf-surface);
  border: 1px solid var(--sf-line);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15,39,64,.04), 0 10px 28px rgba(15,39,64,.06);
  overflow-x: auto;
  margin-bottom: 2rem;
}
.sf-table-wrap > table { margin: 0; width: 100%; border: 0; }

table.table, table.display {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--sf-sm);
}
table.table thead th, table.display thead th {
  background: var(--sf-tint);
  font-size: var(--sf-xs);
  font-weight: 700;
  letter-spacing: var(--sf-wide);
  text-transform: uppercase;
  color: var(--sf-ink-2);
  border-bottom: 1px solid var(--sf-line);
  padding: 1rem 1.1rem;
  white-space: nowrap;
  text-align: left;
}
table.table tbody td, table.display tbody td {
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--sf-line-soft);
  color: var(--sf-ink);
  font-size: var(--sf-base);
  vertical-align: middle;
}
table.table tbody tr:last-child td { border-bottom: 0; }
table.table tbody tr:hover td { background: #F7FAFD; }

/* row actions */
.sf-actions { white-space: nowrap; text-align: right; }
.sf-action-form { display: inline-block; margin: 0; }
.sf-action {
  display: inline-block;
  font-family: var(--sf-font);
  font-size: var(--sf-xs);
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: .6em 1.1em;
  border-radius: 6px;
  border: 1.5px solid transparent;
  background: none;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.sf-action--view { color: var(--sf-blue); border-color: var(--sf-line); margin-right: .4rem; }
.sf-action--view:hover { background: var(--sf-tint); border-color: var(--sf-blue); color: var(--sf-blue); }
.sf-action--delete { color: var(--sf-err); border-color: #E7C6C9; }
.sf-action--delete:hover { background: var(--sf-err-bg); border-color: var(--sf-err); }

/* "add new" button that used to be a bare "+" in a table header */
.sf-add {
  display: inline-block;
  font-size: var(--sf-xs);
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  background: var(--sf-blue);
  color: #fff;
  padding: .65em 1.2em;
  border-radius: 6px;
}
.sf-add:hover { background: var(--sf-blue-dark); color: #fff; }

/* detail pages: a definition table, not a data grid */
table.table--alternate-column td:first-child,
table.table--alternate-row td:first-child {
  width: 34%;
  font-size: var(--sf-xs);
  font-weight: 700;
  letter-spacing: var(--sf-wide);
  text-transform: uppercase;
  color: var(--sf-ink-2);
  background: var(--sf-tint);
  white-space: normal;
}
table.table--alternate-column td,
table.table--alternate-row td {
  padding: .95rem 1.1rem;
  border-bottom: 1px solid var(--sf-line-soft);
  vertical-align: top;
}

/* ===========================================================================
   19. Content pages: prose cards, facts, finder, CTA band
   =========================================================================== */

.sf-section { padding: 4rem 0 4.5rem; background: var(--sf-tint); }

/* ---- prose on a card instead of loose on the page ---- */
.sf-prose-card {
  background: var(--sf-surface);
  border: 1px solid var(--sf-line);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15,39,64,.04), 0 12px 32px rgba(15,39,64,.07);
  padding: 3.25rem 3.5rem;
  max-width: none;
  margin: 0;
}
@media (max-width: 767px) { .sf-prose-card { padding: 1.75rem 1.4rem; border-radius: 10px; } }

.sf-prose-card p {
  font-size: 1.0625rem;
  line-height: 1.82;
  color: var(--sf-ink);
  max-width: none;          /* fill the card rather than stopping at 76ch */
  margin: 0 0 1.35em;
}
.sf-prose-card p:last-child { margin-bottom: 0; }

/* All paragraphs read at one size. The first used to be enlarged and
   recoloured, which looked inconsistent once the page was trimmed back to
   the original copy. */
.sf-prose-lead {
  font-size: 1.0625rem !important;
  line-height: 1.82 !important;
  font-weight: 400;
  color: var(--sf-ink) !important;
  padding-bottom: 0;
  border-bottom: 0;
}

/* ---- fact strip ---- */
.sf-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
  max-width: 980px;
  margin: 2rem auto 0;
}
.sf-fact {
  background: var(--sf-surface);
  border: 1px solid var(--sf-line);
  border-top: 3px solid var(--sf-blue);
  border-radius: 10px;
  padding: 1.6rem 1.5rem;
}
.sf-fact__value {
  display: block;
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.035em;
  color: var(--sf-blue);
  font-variant-numeric: tabular-nums;
}
.sf-fact__label {
  display: block;
  margin-top: .7rem;
  font-size: var(--sf-sm);
  line-height: 1.55;
  color: var(--sf-ink-2);
}

/* ---- search ---- */
.sf-finder { max-width: 980px; margin: 0 auto 2rem; }
.sf-finder__label {
  display: block;
  font-size: var(--sf-xs);
  font-weight: 700;
  letter-spacing: var(--sf-wide);
  text-transform: uppercase;
  color: var(--sf-ink-2);
  margin-bottom: .6rem;
}
.sf-finder__input {
  width: 100%;
  font-size: 1.0625rem;
  min-height: 60px;
  padding: .9em 1.1em;
  border: 1px solid #C3D0DC;
  border-radius: 10px;
  background: var(--sf-surface);
  color: var(--sf-ink);
}
.sf-finder__input:focus {
  border-color: var(--sf-blue);
  box-shadow: 0 0 0 4px rgba(27,94,150,.14);
  outline: none;
}
.sf-finder__count {
  margin: .85rem 0 0;
  font-size: var(--sf-sm);
  color: var(--sf-ink-2);
}
.sf-finder__empty {
  max-width: 980px;
  margin: 1.5rem auto 0;
  padding: 1.75rem;
  text-align: center;
  background: var(--sf-surface);
  border: 1px dashed var(--sf-line);
  border-radius: 10px;
  color: var(--sf-ink-2);
}

/* ---- partner grid ---- */
.sf-partners {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.1rem;
  max-width: 980px;
  margin: 0 auto;
}
/* A `display` set here beats the browser's own `[hidden] { display: none }`,
   so cards the search tried to hide stayed on screen. This rule is what
   makes the filter actually work. */
.sf-partner[hidden],
.sf-service[hidden],
.sf-gallery__item[hidden] { display: none !important; }

.sf-partner {
  display: flex;
  flex-direction: column;
  background: var(--sf-surface);
  border: 1px solid var(--sf-line);
  border-radius: 10px;
  padding: 1.5rem 1.5rem 1.25rem;
  transition: box-shadow .18s ease, border-color .18s ease;
}
.sf-partner:hover {
  border-color: #B9CBDC;
  box-shadow: 0 2px 4px rgba(15,39,64,.05), 0 14px 30px rgba(15,39,64,.09);
}
.sf-partner__name {
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--sf-navy);
  margin: 0 0 .5rem;
  letter-spacing: -.01em;
}
.sf-partner__desc {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--sf-ink-2);
  margin: 0 0 1rem;
  max-width: none;
}
.sf-partner__link {
  margin-top: auto;
  align-self: flex-start;
  font-size: var(--sf-xs);
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--sf-blue);
  border: 1.5px solid var(--sf-line);
  border-radius: 6px;
  padding: .6em 1.1em;
  transition: border-color .15s ease, background-color .15s ease;
}
.sf-partner__link:hover { border-color: var(--sf-blue); background: var(--sf-tint); color: var(--sf-blue); }

/* ---- closing CTA band ---- */
.sf-cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  max-width: 980px;
  margin: 2.5rem auto 0;
  padding: 2.25rem 2.5rem;
  background: var(--sf-navy);
  border-radius: 14px;
}
.sf-cta-band h3 { color: #fff; margin: 0 0 .4rem; font-size: 1.4rem; }
.sf-cta-band p { color: #A8BDD0; margin: 0; font-size: var(--sf-sm); max-width: 48ch; line-height: 1.6; }
.sf-cta-band__actions { display: flex; gap: .75rem; flex-wrap: wrap; }
.sf-cta-band .btn--primary { background: #fff; border-color: #fff; }
.sf-cta-band .btn--primary .btn__text { color: var(--sf-navy); }
.sf-cta-band .btn--secondary { background: transparent; border: 1.5px solid rgba(255,255,255,.45); }
.sf-cta-band .btn--secondary .btn__text { color: #fff; }
.sf-cta-band .btn--secondary:hover { background: rgba(255,255,255,.12); border-color: #fff; }
@media (max-width: 767px) { .sf-cta-band { padding: 1.75rem 1.4rem; } }

/* ===========================================================================
   20. Pagination
   ---------------------------------------------------------------------------
   simplePaginate() only ever renders Previous / Next, so reaching page 6 of a
   list meant clicking Next five times with no idea how far the list ran.
   Numbered pages plus a position summary.
   =========================================================================== */

.sf-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin: 1.5rem 0 2.5rem;
}
.sf-pager__summary {
  margin: 0;
  font-size: var(--sf-sm);
  color: var(--sf-ink-2);
  font-variant-numeric: tabular-nums;
}
.sf-pager__summary strong { color: var(--sf-ink); font-weight: 700; }

.sf-pager__list {
  display: flex;
  align-items: center;
  gap: .35rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.sf-pager__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 42px;
  padding: 0 .8em;
  font-size: var(--sf-sm);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--sf-blue);
  background: var(--sf-surface);
  border: 1px solid var(--sf-line);
  border-radius: 8px;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
a.sf-pager__link:hover { background: var(--sf-tint); border-color: var(--sf-blue); color: var(--sf-blue); }
.sf-pager__link.is-current {
  background: var(--sf-blue);
  border-color: var(--sf-blue);
  color: #fff;
  cursor: default;
}
.sf-pager__link.is-disabled {
  color: var(--sf-ink-3);
  background: var(--sf-tint);
  border-color: var(--sf-line-soft);
  cursor: not-allowed;
}
.sf-pager__gap {
  display: inline-flex;
  align-items: flex-end;
  min-height: 42px;
  padding: 0 .35rem;
  color: var(--sf-ink-3);
  font-weight: 700;
}
@media (max-width: 600px) {
  .sf-pager { justify-content: center; }
  .sf-pager__summary { width: 100%; text-align: center; }
}

/* ===========================================================================
   21. Services grid and gallery
   =========================================================================== */

.sf-services {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.35rem;
  max-width: 980px;
  margin: 0 auto;
}
.sf-service {
  background: var(--sf-surface);
  border: 1px solid var(--sf-line);
  border-top: 3px solid var(--sf-blue);
  border-radius: 12px;
  padding: 2.25rem 2.1rem;
  transition: box-shadow .18s ease, border-color .18s ease;
}
.sf-service:hover {
  box-shadow: 0 2px 4px rgba(15,39,64,.05), 0 14px 30px rgba(15,39,64,.09);
}
/* These were 14px, which is fine for a dense table but too small for a card
   someone is meant to read. Matched to the About page's body size. */
.sf-service__name {
  font-size: 1.25rem;        /* 20 */
  font-weight: 700;
  line-height: 1.3;
  color: var(--sf-navy);
  margin: 0 0 .8rem;
  letter-spacing: -.015em;
}
.sf-service__desc {
  font-size: 1.0625rem;      /* 17 -- same as the About prose */
  line-height: 1.75;
  color: var(--sf-ink);
  margin: 0;
  max-width: none;
}

.sf-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: .9rem;
  max-width: 980px;
  margin: 0 auto;
}
.sf-gallery__item {
  display: block;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid var(--sf-line);
  background: var(--sf-surface);
  aspect-ratio: 4 / 3;
  transition: box-shadow .18s ease, border-color .18s ease;
}
.sf-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.sf-gallery__item:hover { border-color: var(--sf-blue); box-shadow: 0 10px 26px rgba(15,39,64,.12); }
.sf-gallery__item:hover img { transform: scale(1.04); }
@media (prefers-reduced-motion: reduce) { .sf-gallery__item:hover img { transform: none; } }

/* ===========================================================================
   22. Roles and admin toolbar
   =========================================================================== */

.sf-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.sf-toolbar__count { margin: 0; font-size: var(--sf-sm); color: var(--sf-ink-2); }

.sf-role {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  padding: .35em .75em;
  border-radius: 999px;
  border: 1px solid transparent;
}
.sf-role--admin { background: #E7EFF7; border-color: #BFD5E8; color: var(--sf-blue); }
.sf-role--staff { background: var(--sf-tint); border-color: var(--sf-line); color: var(--sf-ink-2); }

.sf-nav__role {
  display: block;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--sf-ink-3);
  margin-top: 2px;
}
.sf-nav__user { line-height: 1.25; }

/* ===========================================================================
   23. Mobile fixes
   =========================================================================== */
@media (max-width: 767px) {

  /* The Welcome split panel used the theme's fixed half-screen height plus
     vertical centring, which on a phone left large empty blue areas above
     and below the text. Let it size to its content instead. */
  .elaborate-form-1 .row--gapless > [class*="col-sm-6"] { height: auto !important; min-height: 0 !important; }
  .elaborate-form-1 .pos-vertical-center {
    position: static !important;
    transform: none !important;
    top: auto !important;
    padding: 2.5rem var(--sf-gutter) !important;
    max-width: none !important;
    margin: 0 !important;
  }
  .elaborate-form-1 .height-50 { height: auto !important; }
  .elaborate-form-1 .h2, .elaborate-form-1 h2 { font-size: 1.6rem; }
  .elaborate-form-1 p, .elaborate-form-1 .lead { font-size: 1rem; }

  /* Buttons were running edge to edge with no gap between them */
  .elaborate-form-1 .btn { font-size: .8rem; padding: 1.05em 1rem; letter-spacing: .03em; }
  .elaborate-form-1 .btn + .btn { margin-top: .85rem; }

  .banner { min-height: 150px; }
  .banner > .container { padding-top: 2rem; padding-bottom: 2rem; }

  /* Footer columns were stacking into very tall wrapped lists */
  .tp-footer, footer .container { text-align: left; }
  footer .col-sm-6, footer .col-md-4, footer .col-xs-6 { margin-bottom: 1.75rem; }

  .sf-prose-card { padding: 1.5rem 1.25rem; }
  .sf-section { padding: 2.5rem 0; }
}

/* Submit buttons were wrapping mid-word ("Send / Enquiry") and spilling out
   of the button box, because .btn was set to white-space: normal. */
.btn, .sf-form .btn, button[type="submit"] {
  white-space: nowrap;
  line-height: 1.25;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.elaborate-form-1 .btn { white-space: normal; }
@media (max-width: 420px) {
  .btn, button[type="submit"] { white-space: normal; padding-inline: 1.1em; }
}

/* ===========================================================================
   24. Mobile, second pass
   =========================================================================== */
@media (max-width: 767px) {

  /* The buttons sat flush to the screen edge because the Bootstrap .row
     inside the panel carries -15px side margins, which cancelled the
     padding on the panel. Zero the row and inset the content instead. */
  .elaborate-form-1 .pos-vertical-center .row,
  .elaborate-form-1 .pos-vertical-center form .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  .elaborate-form-1 .pos-vertical-center [class*="col-"] {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .elaborate-form-1 .pos-vertical-center { padding: 2.75rem 1.5rem !important; }

  /* Match the inset the Key Areas cards have */
  .elaborate-form-1 .btn { border-radius: 6px; }

  /* Slider: the markup sets height="500px" on the img, which stretches the
     photo on a narrow screen. Crop to a sensible ratio instead. */
  .slider, .slides, .slides li { height: auto !important; }
  .slides li img {
    width: 100% !important;
    height: 230px !important;
    object-fit: cover !important;
    object-position: center;
  }

  /* Footer: one full-width column per block */
  footer .row > [class*="col-"] {
    width: 100% !important;
    float: none !important;
    max-width: none !important;
    flex: 0 0 100% !important;
    padding-left: 0;
    padding-right: 0;
    margin-bottom: 2rem;
  }
  footer .container { padding-left: 1.5rem; padding-right: 1.5rem; }
  footer h4, footer .h4 { margin-bottom: .9rem; }
  footer ul li { margin-bottom: .5rem; }
}

/* ===========================================================================
   25. Mobile — Welcome panel and footer gutters
   ---------------------------------------------------------------------------
   The inner wrapper carries Bootstrap offset classes (col-md-offset-2,
   col-sm-offset-1). Those apply a percentage margin-left, so a 100%-wide
   button inside it overflowed the panel on the right. Everything inside the
   panel is reset to full width with no offset, and the panel itself takes the
   same gutter the Key Areas cards sit on.
   =========================================================================== */
@media (max-width: 767px) {

  .elaborate-form-1 .pos-vertical-center > [class*="col-"],
  .elaborate-form-1 .pos-vertical-center [class*="col-md-offset"],
  .elaborate-form-1 .pos-vertical-center [class*="col-sm-offset"] {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    left: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    float: none !important;
  }

  /* same inset as .container, which is what the Key Areas cards sit in */
  .elaborate-form-1 .pos-vertical-center {
    padding: 2.75rem var(--sf-gutter) !important;
    box-sizing: border-box;
  }

  .elaborate-form-1 .btn {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .elaborate-form-1 .h2,
  .elaborate-form-1 h2,
  .elaborate-form-1 p { padding-left: 0; padding-right: 0; }

  /* Footer links were sitting hard against the screen edge too */
  footer .container,
  footer .row { padding-left: 0 !important; padding-right: 0 !important; margin-left: 0 !important; margin-right: 0 !important; }
  footer > .container { padding-left: var(--sf-gutter) !important; padding-right: var(--sf-gutter) !important; }
  footer .row > [class*="col-"] { padding-left: 0 !important; padding-right: 0 !important; }

  /* nothing may push past the viewport */
  body { overflow-x: hidden; }
}
