/* ==========================================================================
   THREE SOLUTIONS — Utility Classes
   ========================================================================== */

/* ---- Display ------------------------------------------------------------- */
.d-flex   { display: flex; }
.d-grid   { display: grid; }
.d-none   { display: none; }
.d-block  { display: block; }

/* ---- Flex helpers -------------------------------------------------------- */
.flex-center   { display: flex; align-items: center; justify-content: center; }
.flex-between  { display: flex; align-items: center; justify-content: space-between; }
.flex-col      { flex-direction: column; }
.flex-wrap     { flex-wrap: wrap; }
.gap-sm        { gap: var(--space-sm); }
.gap-md        { gap: var(--space-md); }
.gap-lg        { gap: var(--space-lg); }
.gap-xl        { gap: var(--space-xl); }

/* ---- Text ---------------------------------------------------------------- */
.text-center  { text-align: center; }
.text-left    { text-align: left; }
.text-right   { text-align: right; }
.text-white   { color: var(--color-white); }
.text-muted   { color: var(--color-text-muted); }
.text-cyan    { color: var(--color-cyan); }
.text-green   { color: var(--color-green); }
.text-navy    { color: var(--color-navy); }
.text-sm      { font-size: var(--font-size-sm); }
.text-xs      { font-size: var(--font-size-xs); }
.text-lg      { font-size: var(--font-size-lg); }
.font-bold    { font-weight: var(--font-weight-bold); }
.font-semi    { font-weight: var(--font-weight-semibold); }

/* ---- Backgrounds --------------------------------------------------------- */
.bg-white        { background-color: var(--color-white); }
.bg-off-white    { background-color: var(--color-off-white); }
.bg-dark         { background-color: var(--color-anthracite-dark); }
.bg-anthracite   { background-color: var(--color-anthracite); }
.bg-navy-light   { background-color: var(--color-navy-light); }
.bg-green-light  { background-color: var(--color-green-light); }
.bg-gray-100     { background-color: var(--color-gray-100); }
.bg-gradient-dark { background: var(--gradient-dark); }
.bg-gradient-hero { background: var(--gradient-hero); }

/* ---- Spacing ------------------------------------------------------------- */
.mt-sm  { margin-top: var(--space-sm); }
.mt-md  { margin-top: var(--space-md); }
.mt-lg  { margin-top: var(--space-lg); }
.mt-xl  { margin-top: var(--space-xl); }
.mb-sm  { margin-bottom: var(--space-sm); }
.mb-md  { margin-bottom: var(--space-md); }
.mb-lg  { margin-bottom: var(--space-lg); }
.mb-xl  { margin-bottom: var(--space-xl); }
.pt-3xl { padding-top: var(--space-3xl); }
.pb-3xl { padding-bottom: var(--space-3xl); }

/* ---- Borders ------------------------------------------------------------- */
.border-top    { border-top: 1px solid var(--color-gray-200); }
.border-bottom { border-bottom: 1px solid var(--color-gray-200); }
.rounded-sm    { border-radius: var(--radius-sm); }
.rounded-md    { border-radius: var(--radius-md); }
.rounded-lg    { border-radius: var(--radius-lg); }
.rounded-full  { border-radius: var(--radius-full); }

/* ---- Width / Max-Width --------------------------------------------------- */
.w-full     { width: 100%; }
.max-w-sm   { max-width: 400px; }
.max-w-md   { max-width: 640px; }
.max-w-lg   { max-width: 800px; }
.mx-auto    { margin-inline: auto; }

/* ---- Shadows ------------------------------------------------------------- */
.shadow-sm  { box-shadow: var(--shadow-sm); }
.shadow-md  { box-shadow: var(--shadow-md); }
.shadow-lg  { box-shadow: var(--shadow-lg); }

/* ---- Overflow ------------------------------------------------------------ */
.overflow-hidden { overflow: hidden; }

/* ---- Screen-reader only (BFSG) ------------------------------------------ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---- Responsive helpers -------------------------------------------------- */
@media (max-width: 480px) {
    .hide-mobile { display: none !important; }
}
@media (min-width: 481px) and (max-width: 900px) {
    .hide-tablet { display: none !important; }
}
@media (min-width: 901px) {
    .hide-desktop { display: none !important; }
}

/* Mobile contact bar leaves room for content and device safe areas. */
.ts-mobile-cta { display: none; }
@media (max-width: 768px) {
    .ts-mobile-cta:not([hidden]) {
        position: fixed; bottom: 0; left: 0; right: 0; z-index: 90;
        display: flex; gap: 8px; background: #fff;
        padding: 8px 16px calc(8px + env(safe-area-inset-bottom, 0px));
        box-shadow: 0 -2px 12px rgba(0,0,0,.15);
    }
    .ts-mobile-cta a {
        display: flex; align-items: center; justify-content: center; flex: 1;
        min-height: 48px; border: 2px solid #0472ab; border-radius: 8px;
        color: #0472ab; font-weight: 600; text-decoration: none;
    }
    .ts-mobile-cta a:last-child { background: #0472ab; color: #fff; }
    .ts-mobile-cta a:focus-visible { outline: 3px solid #1a2028; outline-offset: 2px; }
    body.ts-has-mobile-cta { padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px)); }
}
