/**
 * ToolClinic.in — Corporate Redesign Layer
 * Loads AFTER ui-enhanced.css. Reuses its tokens (--brand, --slate-*, --radius-*, --shadow-*).
 * Adds: type ramp, spacing rhythm, hero/slider rebuild, focus states, responsive hardening.
 * No new brand colours are invented — navy is derived as the corporate neutral anchor.
 */

/* =========================================================
   0. DARK-SURFACE TEXT GUARD
   style.css:10228 declares `p { color: #000 !important }` globally. Because
   of the !important, no amount of specificity beats it, so text on any dark
   panel renders black-on-dark. The footer already ships its own !important
   override for this reason.
   Put .tc-on-dark on any dark container and its text stays legible.
   ========================================================= */
.tc-on-dark,
.tc-on-dark p,
.tc-on-dark li,
.tc-on-dark span:not([class*="badge"]):not([class*="btn"]),
.tc-on-dark dd {
    color: rgba(255, 255, 255, 0.82) !important;
}

.tc-on-dark h1, .tc-on-dark h2, .tc-on-dark h3,
.tc-on-dark h4, .tc-on-dark strong {
    color: #fff !important;
}

.tc-on-dark a:not(.btn) { color: #ffd9c4 !important; }

/* =========================================================
   1. TOKENS — extend, don't replace
   ========================================================= */
:root {
    /* Corporate navy anchor (matches the logo + "List your machine here" button) */
    --navy-900: #0b1f3a;
    --navy-800: #12305a;
    --navy-700: #1b4079;
    --navy-50:  #eef3fa;

    /* Type ramp — 1.25 ratio, fluid */
    --fs-display: clamp(2rem, 1.35rem + 2.6vw, 3.25rem);
    --fs-h1:      clamp(1.75rem, 1.25rem + 2vw, 2.6rem);
    --fs-h2:      clamp(1.5rem, 1.15rem + 1.4vw, 2.05rem);
    --fs-h3:      clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem);
    --fs-body:    clamp(0.95rem, 0.92rem + 0.15vw, 1.0625rem);
    --fs-sm:      0.9rem;
    --fs-xs:      0.8rem;

    /* 4/8 spacing scale */
    --sp-1: 4px;   --sp-2: 8px;   --sp-3: 12px;  --sp-4: 16px;
    --sp-5: 24px;  --sp-6: 32px;  --sp-7: 48px;  --sp-8: 64px;  --sp-9: 96px;

    --section-y: clamp(var(--sp-7), 4vw, var(--sp-9));
    --focus-ring: 0 0 0 3px rgba(226, 81, 1, 0.35);
}

/* =========================================================
   2. BASE RHYTHM & MEASURE
   ========================================================= */
body { font-size: var(--fs-body); }

/* Space above a heading > space below it — headings belong to what follows */
h1, h2, h3, h4 { margin-top: 0; text-wrap: balance; }
h1 { font-size: var(--fs-h1); line-height: 1.15; }
h2 { font-size: var(--fs-h2); line-height: 1.2; }
h3 { font-size: var(--fs-h3); line-height: 1.3; }

/* Constrain measure so prose never runs the full viewport */
.tc-measure { max-width: 68ch; }
.tc-measure-center { max-width: 68ch; margin-left: auto; margin-right: auto; }

/* Consistent vertical rhythm between sections */
.ftco-section { padding-top: var(--section-y); padding-bottom: var(--section-y); }

/* =========================================================
   3. HERO / SLIDER — rebuilt
   Replaces the 88vh fixed height + object-fit:contain letterboxing.
   ========================================================= */
/* NOTE: .sliders keeps its margin-top from style.css so it clears the fixed navbar. */

/* The absolutely-positioned dots and arrows need this as their anchor,
   otherwise they position against a further ancestor and hang off-screen.

   max-width matters for more than looks: the slides are 16:9, so full-bleed
   at 1920px would be 1080px tall (the whole viewport). Capping the width and
   letting height follow the ratio keeps the hero to a sane size AND means the
   artwork fills its box exactly - no white bars at any breakpoint. */
.tc-hero-slider {
    position: relative;
    overflow: hidden;
    width: 100%;
}

/* Aspect-ratio container: no letterboxing, no viewport-height guesswork */
/* Height is capped rather than derived from aspect-ratio.
   A 16:9 frame at full-bleed width is 1080px tall on a 1920px screen, which
   pushes the whole page below the fold. Driving height directly keeps the
   hero to roughly half the viewport and lets the rest of the page show.
   `contain` is kept because the slides are infographics with text at the
   edges - cropping them would cut copy. */
/* Full-bleed: the frame spans the viewport and takes its height from the 16:9
   artwork, so every slide fills the width edge to edge with no side bars.
   No max-height here on purpose - capping the height with object-fit:contain
   shrinks the image and reintroduces the bars this is meant to avoid. */
.tc-hero-slider .item {
    height: auto;
    aspect-ratio: 16 / 9;
    background-color: #fff;
    overflow: hidden;
}

.tc-hero-slider .bg-item img,
.tc-hero-slider .slider-img-zoom {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

/* Legibility scrim — only as strong as it needs to be */
.tc-hero-slider .slider-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(11, 31, 58, 0.10) 0%,
        rgba(11, 31, 58, 0.00) 35%,
        rgba(11, 31, 58, 0.55) 100%
    );
    pointer-events: none;
    z-index: 1;
}

/* --- Pagination dots (requested) --- */
.tc-hero-slider .owl-dots {
    position: absolute;
    left: 0; right: 0;
    bottom: clamp(12px, 2.2vw, 28px);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--sp-2);
    z-index: 5;
}

.tc-hero-slider .owl-dots .owl-dot { outline: none; }

.tc-hero-slider .owl-dots .owl-dot span {
    display: block;
    width: 9px; height: 9px;
    margin: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
    transition: width .22s ease-out, background-color .22s ease-out;
}

.tc-hero-slider .owl-dots .owl-dot.active span {
    width: 28px;
    border-radius: 999px;
    background: var(--brand) !important;
}

.tc-hero-slider .owl-dots .owl-dot:hover span { background: #fff !important; }

.tc-hero-slider .owl-dots .owl-dot:focus-visible span {
    box-shadow: var(--focus-ring);
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* --- Prev/next arrows --- */
.tc-hero-slider .owl-nav { z-index: 5; }

.tc-hero-slider .owl-nav button.owl-prev,
.tc-hero-slider .owl-nav button.owl-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px; height: 44px;          /* ≥44px touch target */
    display: flex !important;
    align-items: center; justify-content: center;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.92) !important;
    color: var(--navy-900) !important;
    border: none !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    transition: background-color .2s ease-out, transform .2s ease-out;
}

.tc-hero-slider .owl-nav button.owl-prev { left: clamp(8px, 2vw, 24px); }
.tc-hero-slider .owl-nav button.owl-next { right: clamp(8px, 2vw, 24px); }

.tc-hero-slider .owl-nav button:hover {
    background: var(--brand) !important;
    color: #fff !important;
}

.tc-hero-slider .owl-nav button:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
    box-shadow: var(--focus-ring);
}

/* The old absolutely-positioned inline "Read More" — normalise it */
.tc-hero-slider .read-more.slider-btn {
    z-index: 4;
    bottom: clamp(44px, 7vw, 72px) !important;
    padding: 10px 22px;
    font-weight: 600;
    font-size: var(--fs-sm);
    border-radius: 999px !important;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

/* =========================================================
   4. STAT / VALUE CARD ICONS
   These were hairline outline glyphs at 28px in brand orange on a 10%-opacity
   orange tile — technically rendering, but with almost no visual weight.
   Solid `-fill` glyphs plus a stronger tile give them real presence.
   ========================================================= */
.icon-wrapper {
    flex: 0 0 auto;                 /* never squashed by the flex row beside it */
    line-height: 1;
}

/* Dark glyph on a light neutral tile. The glyphs were always rendering -
   verified present in remixicon v3.3.0 - but brand orange at 10% alpha on a
   near-white tile gave them almost no contrast. Dark navy matches the stat
   numbers beside them and passes AA comfortably.
   !important is deliberate: several older rules in style.css / ui-enhanced.css
   set colour on these elements and would otherwise win on source order. */
.icon-wrapper > span,
.icon-wrapper > i,
.icon-wrapper > span::before,
.icon-wrapper > i::before {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    line-height: 1;
    color: #0f2547 !important;
}

.icon-wrapper,
.modern-counter-card .icon-wrapper,
.ftco-section .icon-wrapper {
    background: #eaeff6 !important;
    border: 1px solid #d6dfeb;
    color: #0f2547 !important;
}

/* Hover keeps the brand accent, inverted so the glyph stays legible. */
.modern-counter-card:hover .icon-wrapper {
    background: var(--brand) !important;
    border-color: var(--brand);
}

.modern-counter-card:hover .icon-wrapper > span,
.modern-counter-card:hover .icon-wrapper > i,
.modern-counter-card:hover .icon-wrapper > span::before,
.modern-counter-card:hover .icon-wrapper > i::before {
    color: #fff !important;
}

/* =========================================================
   5. JOB CARDS
   The title had max-height:56px + overflow:hidden, which cut the third line
   clean through the middle of the letterforms. Titles now show in full and
   the cards stretch to match each other instead.
   ========================================================= */
.tc-job-grid > [class*="col-"] { margin-bottom: 1.5rem; }

.tc-job-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    height: 100%;                    /* equal-height cards across the row */
    min-height: 0;                   /* overrides the old min-height:180px */
    border-radius: 14px;
}

.tc-job-title {
    font-size: 1.15rem !important;   /* the global h2 ramp is too big here */
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 12px;
    max-height: none;                /* the clipping rule */
    overflow: visible;
    color: var(--slate-800);
    overflow-wrap: break-word;
    hyphens: auto;
}

.tc-job-title a { color: inherit; text-decoration: none; }
.tc-job-title a:hover,
.tc-job-title a:focus-visible { color: var(--brand); text-decoration: underline; }

.tc-job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    font-size: 0.875rem;
    color: var(--slate-500);
    margin-bottom: 16px;
}

.tc-job-meta li { display: inline-flex; align-items: center; gap: 6px; }
.tc-job-meta [class^="ri-"] { color: var(--brand); font-size: 1rem; line-height: 1; }

/* Pushed to the bottom so every card's CTA lines up regardless of title length */
.tc-job-cta {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--brand);
    text-decoration: none;
    padding: 6px 0;
    min-height: 32px;
}

.tc-job-cta [class^="ri-"] { transition: transform .18s ease-out; }
.tc-job-card:hover .tc-job-cta [class^="ri-"] { transform: translateX(3px); }
.tc-job-cta:hover { color: var(--brand-hover); text-decoration: underline; }

/* Empty state - the section used to render a bare "No jobs available" div */
.tc-empty-state {
    padding: var(--sp-8) var(--sp-5);
    background: #fff;
    border: 1px dashed var(--slate-300);
    border-radius: var(--radius-lg);
    color: var(--slate-500);
}

.tc-empty-state [class^="ri-"] {
    display: block;
    font-size: 2.5rem;
    color: var(--slate-300);
    margin-bottom: var(--sp-3);
}

/* =========================================================
   6. EXPERT CARDS
   Cards were ragged: the bio had a hard height:65px, names/roles wrapped to
   different line counts, so the Read More buttons sat at different heights.
   Fixed rows + reserved space for each field lines everything up.
   ========================================================= */
.carousel-experts .owl-stage { display: flex; align-items: stretch; }
.carousel-experts .owl-item { display: flex; height: auto; }
.carousel-experts .item { display: flex; width: 100%; }

.tc-expert-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 28px 20px 24px;
    background: #fff;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-lg);
    transition: box-shadow .22s ease-out, transform .22s ease-out, border-color .22s ease-out;
}

.tc-expert-card:hover {
    border-color: rgba(226, 81, 1, 0.3);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.09);
    transform: translateY(-3px);
}

/* Uniform circular avatar regardless of the source image's ratio.
   Centred explicitly (auto margins + self-center) rather than relying on the
   parent's align-items, so it stays centred even if a card's flex context
   is overridden elsewhere. */
.tc-expert-pic {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--slate-100);
    border: 1px solid var(--slate-200);
    flex: 0 0 auto;
    align-self: center;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tc-expert-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;   /* keeps faces in frame on portrait crops */
    display: block;
}

.tc-expert-name {
    font-size: 1.05rem !important;
    font-weight: 700;
    line-height: 1.3;
    color: var(--slate-800);
    margin: 0 0 4px;
    /* two lines reserved so a long name doesn't shove the card taller */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
}

.tc-expert-role {
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--slate-500);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin: 0 0 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--slate-200);
    width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(2.7em + 14px);
}

.tc-expert-bio {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--slate-500);
    margin: 0 0 18px;
    height: auto;                  /* was a hard 65px, which clipped mid-line */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 4.8em;
}

/* margin-top:auto pins every CTA to the same baseline across the row */
.tc-expert-cta {
    margin-top: auto;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 26px;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 0.875rem;
}

@media (max-width: 575.98px) {
    .tc-expert-pic { width: 96px; height: 96px; }
    .tc-expert-card { padding: 22px 16px 20px; }
}

/* =========================================================
   7. SVG ICON SYSTEM + FIVE PILLARS
   Replaces five mismatched cartoon rasters with one stroke-icon family.
   ========================================================= */
.tc-svg-icon {
    display: block;
    flex: 0 0 auto;
    color: inherit;
}

/* Icon above label, icon in a tinted disc — same language as the stat tiles */
.tc-pillars {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
}

.tc-pillar { display: flex; }

.tc-pillar-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    width: 100%;
    padding: 28px 16px;
    background: #fff;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-lg);
    text-decoration: none !important;
    transition: transform .22s ease-out, box-shadow .22s ease-out, border-color .22s ease-out;
}

.tc-pillar-link:hover,
.tc-pillar-link:focus-visible {
    transform: translateY(-4px);
    border-color: var(--brand);
    box-shadow: 0 12px 28px rgba(226, 81, 1, 0.16);
}

.tc-pillar-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: #eaeff6;
    border: 1px solid #d6dfeb;
    color: #0f2547;
    transition: background-color .22s ease-out, color .22s ease-out;
}

.tc-pillar-link:hover .tc-pillar-icon {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.tc-pillar-label {
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--slate-800);
    text-align: center;
    text-wrap: balance;
}

.tc-pillar-link:hover .tc-pillar-label { color: var(--brand); }

@media (max-width: 991.98px) {
    .tc-pillars { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 575.98px) {
    .tc-pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .tc-pillar-link { padding: 20px 12px; gap: 12px; }
    .tc-pillar-icon { width: 56px; height: 56px; }
    .tc-pillar-label { font-size: 0.82rem; }
}

/* =========================================================
   8. SEARCH TYPE-AHEAD
   ========================================================= */
.tc-suggest-wrap { position: relative; }

.tc-suggest-list {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 60;
    margin: 0;
    padding: 6px;
    list-style: none;
    max-height: 330px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    box-shadow: 0 16px 40px rgba(15, 37, 71, 0.16);
}

.tc-suggest-item { margin: 0; }

.tc-suggest-link {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    text-decoration: none !important;
    color: var(--slate-800);
    min-height: 44px;
    justify-content: center;
}

.tc-suggest-item.is-active .tc-suggest-link,
.tc-suggest-link:hover,
.tc-suggest-link:focus-visible {
    background: #eaeff6;
    color: #0f2547;
}

.tc-suggest-label {
    font-size: 0.925rem;
    font-weight: 600;
    line-height: 1.3;
}

.tc-suggest-meta {
    font-size: 0.78rem;
    color: var(--slate-500);
    line-height: 1.3;
}

.tc-suggest-empty {
    padding: 14px 12px;
    font-size: 0.875rem;
    color: var(--slate-500);
    text-align: center;
}

/* The dropdown must escape the tab panel, which clips by default */
.tab-content, .tab-pane, .ftco-search .tab-wrap { overflow: visible !important; }

/* Screen-reader-only helper for the live region + link context */
.sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* =========================================================
   9. BLOG CARDS + ARTICLE PAGE
   ========================================================= */
.tc-blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 24px;
}

.tc-blog-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform .22s ease-out, box-shadow .22s ease-out, border-color .22s ease-out;
}

.tc-blog-card:hover {
    transform: translateY(-4px);
    border-color: rgba(226, 81, 1, 0.3);
    box-shadow: 0 14px 32px rgba(15, 37, 71, 0.12);
}

/* Fixed 16:9 media box — the old cards used a background-image div with no
   reserved height, so rows jumped as images arrived. */
.tc-blog-media {
    display: block;
    aspect-ratio: 16 / 9;
    background: var(--slate-100);
    overflow: hidden;
}

.tc-blog-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease-out;
}

.tc-blog-card:hover .tc-blog-media img { transform: scale(1.04); }

.tc-blog-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 18px 20px 20px;
}

.tc-blog-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--slate-500);
    margin-bottom: 10px;
}

.tc-blog-cat {
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    background: #eaeff6;
    color: #0f2547;
    letter-spacing: 0.02em;
}

.tc-blog-title {
    font-size: 1.05rem !important;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 10px;
    color: var(--slate-800);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: break-word;
}

.tc-blog-title a { color: inherit; text-decoration: none; }
.tc-blog-title a:hover, .tc-blog-title a:focus-visible { color: var(--brand); text-decoration: underline; }

.tc-blog-excerpt {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--slate-500);
    margin: 0 0 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tc-blog-cta {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--brand);
    text-decoration: none !important;
    min-height: 32px;
}

.tc-blog-cta [class^="ri-"] { transition: transform .18s ease-out; }
.tc-blog-card:hover .tc-blog-cta [class^="ri-"] { transform: translateX(3px); }

/* ---- article body: readable measure + real typographic rhythm ---- */
.tc-article-body {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--slate-700);
    max-width: 68ch;
}

.tc-article-body > * + * { margin-top: 1.15em; }

.tc-article-body h2 {
    font-size: 1.4rem !important;
    font-weight: 800;
    line-height: 1.3;
    color: var(--slate-800);
    margin-top: 2em;
    margin-bottom: 0.6em;
}

.tc-article-body h3 {
    font-size: 1.15rem !important;
    font-weight: 700;
    color: var(--slate-800);
    margin-top: 1.6em;
}

.tc-article-body ul,
.tc-article-body ol { padding-left: 1.35em; }
.tc-article-body li + li { margin-top: 0.5em; }
.tc-article-body li::marker { color: var(--brand); }

.tc-article-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: 1.5em 0;
}

.tc-article-body a { color: var(--brand); text-decoration: underline; }

.tc-article-body blockquote {
    margin-left: 0;
    padding: 4px 0 4px 20px;
    border-left: 3px solid var(--brand);
    color: var(--slate-700);
    font-style: italic;
}

.tc-article-cover {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: var(--radius-md);
    background: var(--slate-100);
    margin-bottom: 1.75rem;
}

@media (max-width: 575.98px) {
    .tc-blog-grid { grid-template-columns: 1fr; gap: 18px; }
    .tc-article-body { font-size: 1rem; }
}

/* =========================================================
   10. JOBS LISTING PAGE
   Restructured so the listing leads and the marketing copy follows.
   ========================================================= */

/* Hero badge — replaces sme-logo.png (1000x528 raster) with type.
   Its styles used to live in the page's own @section('css'); they belong
   here so the badge cannot render unstyled again. */
.sme-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    padding: 6px 8px 6px 6px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    backdrop-filter: blur(4px);
}

.sme-hero-mark {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    line-height: 1.4;
}

.sme-hero-label {
    padding-right: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
}

@media (max-width: 575.98px) {
    .sme-hero-label { white-space: normal; font-size: 0.7rem; }
    .sme-hero-mark { font-size: 0.75rem; padding: 3px 10px; }
}
.tc-jobs-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

/* ---- filter rail ---- */
.tc-filters {
    background: #fff;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-lg);
    padding: 20px;
    position: sticky;
    top: 96px;
}

.tc-filters-head { display: flex; align-items: center; justify-content: space-between; }
.tc-filters-title { font-size: 1rem !important; font-weight: 800; margin: 0; color: var(--slate-800); }
.tc-filters-toggle { display: none; }

.tc-filter-group { border: 0; padding: 0; margin: 18px 0 0; }
.tc-filter-group legend {
    font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
    color: var(--slate-500); margin-bottom: 8px; width: auto; float: none;
}
.tc-filter-group .form-control { height: 42px; font-size: 0.9rem; }

.tc-checklist { display: flex; flex-direction: column; gap: 2px; max-height: 220px; overflow-y: auto; }

.tc-check {
    display: flex; align-items: center; gap: 10px;
    margin: 0; padding: 7px 8px; border-radius: var(--radius-sm);
    font-size: 0.875rem; font-weight: 500; color: var(--slate-700);
    cursor: pointer; min-height: 36px;
}
.tc-check:hover { background: var(--slate-50); }
.tc-check input { width: 16px; height: 16px; accent-color: var(--brand); flex: 0 0 auto; margin: 0; }

.tc-filter-actions { display: flex; align-items: center; gap: 14px; margin-top: 20px; }
.tc-filter-apply { flex: 1 1 auto; min-height: 44px; }
.tc-filter-clear { font-size: 0.85rem; font-weight: 600; color: var(--slate-500); text-decoration: underline; }
.tc-filter-clear:hover { color: var(--brand); }

.tc-filter-count {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 20px; height: 20px; padding: 0 6px; margin-left: 6px;
    border-radius: 999px; background: var(--brand); color: #fff;
    font-size: 0.72rem; font-weight: 800;
}

/* ---- results ---- */
.tc-results-head { margin-bottom: 16px; }
.tc-results-count { font-size: 1.05rem !important; font-weight: 800; color: var(--slate-800); margin: 0; }

.tc-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.tc-chip {
    padding: 4px 12px; border-radius: 999px;
    background: #eaeff6; color: #0f2547;
    font-size: 0.78rem; font-weight: 600;
}

.tc-job-list { display: flex; flex-direction: column; gap: 14px; margin: 0; }

.tc-joblist-card {
    display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
    padding: 20px 22px;
    background: #fff;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-lg);
    transition: border-color .2s ease-out, box-shadow .2s ease-out, transform .2s ease-out;
}
.tc-joblist-card:hover {
    border-color: rgba(226, 81, 1, 0.3);
    box-shadow: 0 10px 26px rgba(15, 37, 71, 0.1);
    transform: translateY(-2px);
}

.tc-joblist-main { flex: 1 1 320px; min-width: 0; }

.tc-joblist-title {
    font-size: 1.1rem !important; font-weight: 700; line-height: 1.35;
    margin: 8px 0 8px; color: var(--slate-800); overflow-wrap: break-word;
}
.tc-joblist-title a { color: inherit; text-decoration: none; }
.tc-joblist-title a:hover, .tc-joblist-title a:focus-visible { color: var(--brand); text-decoration: underline; }

.tc-joblist-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.tc-save-btn {
    width: 44px; height: 44px;                 /* was an icon-only <a> with no name */
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%; border: 1px solid var(--slate-200);
    background: var(--slate-50); color: var(--slate-500);
    font-size: 1.15rem; cursor: pointer; text-decoration: none;
    transition: all .18s ease-out;
}
.tc-save-btn:hover { background: #fff0ef; border-color: #f3a58c; color: var(--brand); }

.tc-apply-btn { min-height: 44px; padding: 10px 26px; border-radius: var(--radius-pill); font-weight: 700; }

/* already-applied: clearly a done state, not a clickable CTA */
.tc-applied-btn {
    min-height: 44px; padding: 10px 22px; border-radius: var(--radius-pill);
    display: inline-flex; align-items: center; gap: 6px; font-weight: 700;
    background: #e8f7ee; color: #157347; border: 1px solid #bfe6cc; cursor: default;
}
.tc-applied-btn .ri-check-line { font-size: 1.15rem; }
/* saved: filled heart in brand colour */
.tc-save-btn.is-saved { background: #fff0ef; border-color: #f3a58c; color: var(--brand); }

.tc-pagination { margin-top: 28px; display: flex; justify-content: center; }

/* ---- marketing copy, demoted ---- */
.tc-about-sme {
    margin-top: 48px; padding: 32px;
    background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius-lg);
    max-width: 78ch;
}
.tc-about-title { font-size: 1.35rem !important; font-weight: 800; color: var(--slate-800); margin: 0 0 12px; }

.tc-details { border-top: 1px solid var(--slate-200); padding: 14px 0 0; margin-top: 18px; }
.tc-details summary {
    cursor: pointer; font-weight: 700; color: var(--slate-800);
    padding: 6px 0; min-height: 36px; list-style: revert;
}
.tc-details summary:hover { color: var(--brand); }
.tc-details-body { padding-top: 8px; color: var(--slate-700); line-height: 1.7; }
.tc-details-body h3 { font-size: 1rem !important; font-weight: 700; margin: 18px 0 6px; color: var(--slate-800); }

@media (max-width: 991.98px) {
    .tc-jobs-layout { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .tc-filters { position: static; padding: 14px 16px; }
    .tc-filters-toggle {
        display: inline-flex; align-items: center; gap: 8px;
        min-height: 40px; padding: 8px 16px;
        border: 1px solid var(--slate-200); border-radius: var(--radius-pill);
        background: var(--slate-50); color: var(--slate-800);
        font-size: 0.875rem; font-weight: 700; cursor: pointer;
    }
    /* collapsed by default on small screens so the jobs stay in view */
    .tc-filters-body { display: none; }
    .tc-filters-body.is-open { display: block; }
    .tc-joblist-actions { width: 100%; margin-left: 0; }
    .tc-apply-btn { flex: 1 1 auto; }
    .tc-about-sme { padding: 22px 18px; }
}

/* =========================================================
   11. CMS CONTENT PAGES (FMTOS / ITDMS / Training / MilServe / Magnet)
   These render WYSIWYG output. The stored HTML carries inline styles from a
   Word/CKEditor paste — fixed pixel widths, floats and hardcoded font sizes —
   which broke the layout below ~1300px. Neutralised here rather than by
   rewriting the client's copy, so future edits are safe too.
   ========================================================= */
.tc-page-card {
    display: block;
    background: #fff;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-lg);
    padding: clamp(20px, 3vw, 44px);
    margin: 0 auto;
    max-width: 900px;
}

/* --- neutralise hostile inline styles from the editor --- */
.tc-cms img {
    max-width: 100% !important;
    width: auto !important;          /* kills width:1323px */
    height: auto !important;         /* kills height:496px */
    float: none !important;          /* kills float:left */
    display: block;
    margin: 1.5rem auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--slate-200) !important;
}

/* An <img> that failed to load (e.g. a file:/// paste) collapses instead of
   showing a broken-image glyph mid-paragraph. */
.tc-cms img[src^="file:"] { display: none !important; }

.tc-cms [style*="font-size"] { font-size: inherit !important; }
.tc-cms [style*="font-family"] { font-family: inherit !important; }
.tc-cms [style*="width"]:not(img) { width: auto !important; max-width: 100% !important; }

.tc-cms {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--slate-700);
    overflow-wrap: break-word;
}

.tc-cms > p:empty,
.tc-cms > p:has(> br:only-child) { display: none; }   /* empty spacer paragraphs */

.tc-cms h1, .tc-cms h2, .tc-cms h3, .tc-cms h4 {
    color: var(--slate-800);
    font-weight: 800;
    line-height: 1.3;
    margin-top: 2em;
    margin-bottom: 0.6em;
}
.tc-cms h2 { font-size: 1.35rem !important; }
.tc-cms h3 { font-size: 1.15rem !important; }
.tc-cms h4 { font-size: 1.05rem !important; }

/* The copy uses <strong><em> as pseudo-headings; give them room to breathe */
.tc-cms p > strong:only-child,
.tc-cms p > em:only-child > strong,
.tc-cms p > strong:only-child > em {
    display: inline-block;
    margin-top: 0.4em;
    color: var(--slate-800);
    font-style: normal;
    font-size: 1.1rem;
}

/* Lead paragraph: sets up the page before the detail */
.tc-cms > p.lead:first-child,
.tc-cms > p.lead {
    font-size: 1.2rem !important;
    line-height: 1.65;
    color: var(--slate-800) !important;
    font-weight: 500;
    padding-bottom: 1.25em;
    margin-bottom: 1.5em;
    border-bottom: 1px solid var(--slate-200);
}

/* Numbered process steps read better as a real sequence than a bare list */
.tc-cms ol {
    counter-reset: tc-step;
    list-style: none;
    padding-left: 0;
}

.tc-cms ol > li {
    counter-increment: tc-step;
    position: relative;
    padding-left: 46px;
    min-height: 32px;
}

.tc-cms ol > li::before {
    content: counter(tc-step);
    position: absolute;
    left: 0;
    top: 1px;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #eaeff6;
    border: 1px solid #d6dfeb;
    color: #0f2547;
    font-size: 0.85rem;
    font-weight: 800;
    line-height: 1;
}

.tc-cms ul, .tc-cms ol { padding-left: 1.35em; margin-bottom: 1.1em; }
.tc-cms ol { padding-left: 0; }
.tc-cms li + li { margin-top: 0.45em; }
.tc-cms li::marker { color: var(--brand); }
.tc-cms a { color: var(--brand); text-decoration: underline; }

.tc-cms table {
    width: 100% !important;
    max-width: 100%;
    display: block;
    overflow-x: auto;                /* wide tables scroll, page never does */
    border-collapse: collapse;
}
.tc-cms td, .tc-cms th { border: 1px solid var(--slate-200); padding: 8px 10px; }

.tc-page-logo { max-width: 190px; height: auto; object-fit: contain; }

/* --- closing CTA --- */
.tc-page-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    max-width: 900px;
    margin: 32px auto 0;
    padding: clamp(20px, 3vw, 32px);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #0b1f3a 0%, #1b4079 100%);
    color: #fff;
}

.tc-page-cta-text { flex: 1 1 320px; }
.tc-page-cta-text h2 {
    font-size: 1.25rem !important;
    font-weight: 800;
    color: #fff !important;
    margin: 0 0 6px;
}

/* !important is required, not stylistic: style.css:10228 declares
   `p { color: #000 !important }` globally, which beats any specificity.
   The footer already carries its own !important override for the same
   reason. Without this the copy renders black on navy. */
.tc-page-cta-text p {
    margin: 0;
    color: rgba(255, 255, 255, 0.82) !important;
    font-size: 0.95rem;
}

.tc-page-cta-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.tc-page-cta-primary { min-height: 46px; padding: 12px 28px; border-radius: var(--radius-pill); font-weight: 700; }
.tc-page-cta-secondary {
    display: inline-flex; align-items: center; gap: 6px;
    color: #fff; font-weight: 600; font-size: 0.9rem;
    text-decoration: underline; min-height: 44px;
}
.tc-page-cta-secondary:hover { color: #ffd9c4; }

@media (max-width: 575.98px) {
    .tc-cms { font-size: 1rem; }
    .tc-page-cta { flex-direction: column; align-items: flex-start; }
    .tc-page-cta-actions { width: 100%; }
    .tc-page-cta-primary { flex: 1 1 auto; text-align: center; }
}

/* =========================================================
   12. SERVICES PAGE
   Card styles previously lived in the page's own @section('css'); they are
   here so a template rewrite cannot orphan them (as happened with the SME
   hero badge).
   ========================================================= */
.tc-svc-intro {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    position: relative;
    overflow: hidden;
    padding: clamp(24px, 4vw, 44px);
    margin-bottom: 44px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #0b1f3a 0%, #1b4079 100%);
}

.tc-svc-intro::before {
    content: '';
    position: absolute;
    top: -70px; right: -70px;
    width: 280px; height: 280px;
    border-radius: 50%;
    background: rgba(226, 81, 1, 0.14);
    pointer-events: none;
}

.tc-svc-intro-text { flex: 1 1 460px; position: relative; z-index: 1; }
.tc-svc-intro-text h2 { font-size: 1.5rem !important; font-weight: 800; margin: 6px 0 10px; }
.tc-svc-intro-text p { margin: 0; max-width: 62ch; line-height: 1.7; }
.tc-svc-intro-cta { position: relative; z-index: 1; min-height: 48px; padding: 13px 30px; border-radius: var(--radius-pill); font-weight: 700; }

.tc-svc-group { margin-bottom: 44px; }
.tc-svc-group-title { font-size: 1.35rem !important; font-weight: 800; color: var(--slate-800); margin: 0 0 4px; }
.tc-svc-group-blurb { color: var(--slate-500); margin: 0 0 22px; font-size: 0.95rem; }

.tc-svc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 20px;
    margin: 0;
}

.tc-svc-grid > li { display: flex; }

.tc-svc-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    padding: 26px 24px 22px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-lg);
    text-decoration: none !important;
    transition: transform .25s ease-out, box-shadow .25s ease-out, border-color .25s ease-out;
}

/* Accent bar draws in on hover/focus, but the card is never dependent on it */
.tc-svc-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--brand), #ff8c42);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .3s ease-out;
}

.tc-svc-card:hover::before,
.tc-svc-card:focus-visible::before { transform: scaleX(1); }

.tc-svc-card:hover,
.tc-svc-card:focus-visible {
    transform: translateY(-5px);
    border-color: rgba(226, 81, 1, 0.32);
    box-shadow: 0 16px 38px rgba(15, 37, 71, 0.13);
}

.tc-svc-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px; height: 60px;
    margin-bottom: 18px;
    border-radius: 15px;
    background: #eaeff6;
    border: 1px solid #d6dfeb;
    color: #0f2547;
    flex: 0 0 auto;
    transition: background-color .25s ease-out, color .25s ease-out, transform .25s ease-out;
}

.tc-svc-card:hover .tc-svc-icon {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    transform: rotate(-6deg) scale(1.08);
}

.tc-svc-title {
    font-size: 1rem !important;
    font-weight: 700;
    line-height: 1.4;
    color: var(--slate-800);
    margin: 0 0 8px;
    overflow-wrap: break-word;
}

.tc-svc-card:hover .tc-svc-title { color: var(--brand); }

.tc-svc-desc {
    font-size: 0.875rem;
    line-height: 1.65;
    color: var(--slate-500);
    margin: 0 0 18px;
}

/* Was opacity:0 until hover — invisible on touch, where there is no hover */
.tc-svc-arrow {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--brand);
    min-height: 28px;
}

.tc-svc-arrow [class^="ri-"] { transition: transform .18s ease-out; }
.tc-svc-card:hover .tc-svc-arrow [class^="ri-"] { transform: translateX(4px); }

@media (max-width: 575.98px) {
    .tc-svc-grid { grid-template-columns: 1fr; }
    .tc-svc-intro-cta { width: 100%; text-align: center; }
}

/* =========================================================
   13. PRODUCT / MACHINE LISTINGS
   ========================================================= */
.tc-listing-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 14px;
    padding: 18px 20px;
    margin-bottom: 22px;
    background: #fff;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-lg);
}

.tc-listing-field { flex: 1 1 220px; display: flex; flex-direction: column; gap: 6px; }
.tc-listing-field label {
    font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em;
    text-transform: uppercase; color: var(--slate-500); margin: 0;
}
.tc-listing-field .form-control { height: 44px; font-size: 0.9rem; }
.tc-listing-actions { display: flex; align-items: center; gap: 14px; }
.tc-listing-actions .btn { min-height: 44px; padding: 11px 28px; }

.tc-prod-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 22px;
    margin: 0;
}
.tc-prod-grid-2 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.tc-prod-grid > li { display: flex; }

.tc-prod-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: #fff;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform .22s ease-out, box-shadow .22s ease-out, border-color .22s ease-out;
}
.tc-prod-card:hover {
    transform: translateY(-4px);
    border-color: rgba(226, 81, 1, 0.3);
    box-shadow: 0 14px 32px rgba(15, 37, 71, 0.12);
}

/* Fixed ratio box: the old markup used inline style="height:250px" on the
   <img>, which distorted anything not 4:3 */
.tc-prod-media {
    display: block;
    aspect-ratio: 4 / 3;
    background: var(--slate-100);
    overflow: hidden;
}
.tc-prod-media img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease-out;
}
.tc-prod-card:hover .tc-prod-media img { transform: scale(1.04); }

.tc-prod-body { display: flex; flex-direction: column; flex: 1 1 auto; padding: 16px 18px 18px; }

.tc-prod-cat {
    align-self: flex-start;
    padding: 3px 10px;
    margin-bottom: 8px;
    border-radius: var(--radius-pill);
    background: #eaeff6;
    color: #0f2547;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

/* Was .text-truncate — a single line, so most titles were cut mid-word */
.tc-prod-title {
    font-size: 1rem !important;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 8px;
    color: var(--slate-800);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: break-word;
}
.tc-prod-title a { color: inherit; text-decoration: none; }
.tc-prod-title a:hover, .tc-prod-title a:focus-visible { color: var(--brand); text-decoration: underline; }

.tc-prod-spec {
    font-size: 0.85rem;
    line-height: 1.55;
    color: var(--slate-500);
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tc-prod-code { font-size: 0.8rem; color: var(--slate-500); margin: 0 0 12px; }
.tc-prod-code span { font-weight: 700; color: var(--slate-700); }

/* One primary action. The old card had two full-width buttons side by side,
   giving equal weight to "Enquire Now" and "Enquire as Guest". */
.tc-prod-actions { margin-top: auto; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.tc-prod-cta { min-height: 44px; padding: 11px 26px; border-radius: var(--radius-pill); font-weight: 700; font-size: 0.875rem; }
.tc-prod-alt { font-size: 0.8rem; color: var(--slate-500); text-decoration: underline; min-height: 28px; display: inline-flex; align-items: center; }
.tc-prod-alt:hover { color: var(--brand); }

.tc-hero-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px; margin-top: 6px; }
.tc-hero-actions .btn { min-height: 46px; padding: 12px 26px; border-radius: var(--radius-pill); font-weight: 700; }
.tc-hero-alt { color: #fff !important; font-size: 0.875rem; font-weight: 600; text-decoration: underline; min-height: 44px; display: inline-flex; align-items: center; }
.tc-hero-alt:hover { color: #ffd9c4 !important; }

@media (max-width: 575.98px) {
    .tc-prod-grid, .tc-prod-grid-2 { grid-template-columns: 1fr; }
    .tc-listing-actions { width: 100%; }
    .tc-listing-actions .btn { flex: 1 1 auto; }
}

/* =========================================================
   14. NAVBAR — stop the CTAs wrapping mid-phrase
   The markup is navbar-expand-xl now, so the bar only goes horizontal
   once there is genuinely room for 7 links + 2 CTAs.
   ========================================================= */

/* Keep everything on one optical baseline */
#ftco-navbar .navbar-nav { align-items: center; }

/* CTA labels are short phrases — never break them across lines */
#ftco-navbar .nav-item.cta .nav-link {
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;          /* both CTAs match, regardless of label length */
    line-height: 1.2;
}

/* Tighten link padding in the band just above the breakpoint so the row
   has breathing space instead of being squeezed. */
@media (min-width: 1200px) and (max-width: 1399.98px) {
    #ftco-navbar .ftco_navbar .nav-link,
    #ftco-navbar .navbar-nav .nav-link { padding-left: 0.7rem !important; padding-right: 0.7rem !important; }
    #ftco-navbar .nav-item.cta .nav-link { font-size: 0.78rem !important; padding: 0.4rem 0.85rem !important; }
}

/* Collapsed menu (below 1200px): stack the CTAs full width, comfortable targets.
   ui-enhanced.css only styles the collapsed panel below 992px, but the breakpoint
   is now 1200px — without this the 992–1199px band would render the menu with no
   background, unreadable over the page beneath it. */
@media (max-width: 1199.98px) {
    #ftco-navbar .navbar-nav { align-items: stretch; }

    #ftco-navbar .navbar-collapse {
        background: #fff;
        border-radius: var(--radius-md);
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
        padding: 1rem;
        margin-top: 8px;
    }

    #ftco-navbar .navbar-collapse .nav-link { color: var(--slate-800) !important; }

    #ftco-navbar .navbar-collapse .nav-link:hover,
    #ftco-navbar .navbar-collapse .nav-item.show > .nav-link {
        background: var(--brand-light);
        color: var(--brand) !important;
        border-radius: var(--radius-sm);
    }

    /* The coloured CTA keeps its brand fill and white label */
    #ftco-navbar .navbar-collapse .nav-item.cta.cta-colored .nav-link { color: #fff !important; }
    #ftco-navbar .navbar-collapse .nav-item.cta:not(.cta-colored) .nav-link {
        border-color: var(--slate-300) !important;
        color: var(--slate-800) !important;
    }

    /* Underline animation is meaningless in a stacked menu */
    #ftco-navbar .navbar-collapse .nav-link::after { display: none; }

    #ftco-navbar .nav-item.cta { margin: 4px 0 0 0; }

    #ftco-navbar .nav-item.cta .nav-link {
        width: 100%;
        margin-left: 0;
        min-height: 46px;       /* ≥44px touch target */
        font-size: 0.9rem !important;
    }

    /* Dropdowns inside the collapsed menu: indent, don't float over content */
    #ftco-navbar .dropdown-menu {
        position: static !important;
        float: none;
        width: 100%;
        box-shadow: none !important;
        border-left: 2px solid var(--brand-light) !important;
        border-radius: 0 !important;
        margin: 2px 0 6px 10px !important;
        animation: none;
    }

    #ftco-navbar .navbar-collapse {
        max-height: 78vh;       /* long menu must not trap the page */
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* The toggler is a real control — make it look and behave like one */
    #ftco-navbar .navbar-toggler {
        min-height: 44px;
        padding: 8px 14px;
        border-radius: var(--radius-sm);
    }
}

/* The dropdown parent is a link with no href; show it is interactive */
#ftco-navbar .dropdown-toggle { cursor: pointer; }

/* =========================================================
   5. FOCUS STATES — the site had none
   ========================================================= */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
    border-radius: 4px;
}

.navbar a:focus-visible { outline-offset: -2px; }

/* Skip link for keyboard users */
.tc-skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 1000;
    background: var(--navy-900);
    color: #fff !important;
    padding: 12px 20px;
    border-radius: 0 0 var(--radius-sm) 0;
    font-weight: 600;
}
.tc-skip-link:focus {
    left: 0;
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

/* =========================================================
   6. ALIGNMENT & OVERFLOW HARDENING
   ========================================================= */
html, body { overflow-x: hidden; max-width: 100%; }

img, svg, video { max-width: 100%; height: auto; }

/* Long unbroken strings (URLs, part numbers) must not blow out layout */
p, li, td, th, h1, h2, h3, h4, .card-title { overflow-wrap: break-word; }

/* Tables scroll inside their own container instead of the page */
.table-responsive { -webkit-overflow-scrolling: touch; }

/* Equal-height card rows — kills ragged bottoms in listings */
.tc-row-equal { display: flex; flex-wrap: wrap; }
.tc-row-equal > [class*="col-"] { display: flex; }
.tc-row-equal > [class*="col-"] > * { width: 100%; }

/* =========================================================
   7. RESPONSIVE
   ========================================================= */
/* The frame keeps the artwork's ratio at every width, so the slide is always
   shown whole — no bars, no cropped text. Only the controls adapt. */
@media (max-width: 767.98px) {
    .tc-hero-slider .owl-nav button.owl-prev,
    .tc-hero-slider .owl-nav button.owl-next { display: none !important; }

    /* Centre the CTA and lift it clear of the dots */
    .tc-hero-slider .read-more.slider-btn {
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%);
        bottom: 38px !important;
        padding: 8px 18px;
    }

    /* Dots sit just below the artwork rather than on top of it */
    .tc-hero-slider .owl-dots { bottom: 10px; }
}

/* =========================================================
   8. MOTION — respect the OS setting
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
    .slider-img-zoom { transition: none !important; transform: none !important; }
}
