/*
 * FM mod. 2026-02-20 – migrated from WP Customizer Additional CSS
 *
 * Previously loaded as an inline <style id="wp-custom-css"> block.
 * Now enqueued as an external file after styles.min.css (same cascade position).
 * After uploading, clear WP Customizer → Additional CSS to avoid double-loading.
 */

/* FM mod. 2026-02-27 – Insert "Montserrat Fallback" (metric-adjusted Arial)
   into the font stack so font-display:swap causes no layout shift.
   Overrides --font-montserrat from common.scss and hardcoded font-family rules. */
:root {
    --font-montserrat: "Montserrat", "Montserrat Fallback", sans-serif;
}
body {
    font-family: "Montserrat", "Montserrat Fallback", sans-serif;
}

.wysiwyg-editor-custom li {
    position: relative;
    font-size: 16px;
}
.wysiwyg-editor-custom p {
    margin: 0;
    padding: 0 0 12px;
    font-size: 16px;
}
.post-page__content ol {
    padding-left: 15px;
}
.post-page__content ol li {
    /* FM mod. 2026-02-20 - removed redundant display:list-item (browser default for <li>) */
    line-height: 1.5;
    margin-left: 14px;
}
.services__subitem {
    font-weight: 500;
}
/* captions */
.wp-caption {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
}
figcaption {
  font-style: italic;
  font-size: 15px;
  max-width: 650px;
  padding-top: 5px;
  line-height: 1.2;
  text-align: center;
}
/*Stories block portrait*/
.stories__block-portrait {
    width: 249px;
}
/*Selection*/
::selection {
    background-color:#844fc5;
    color:white;
}
/* FM mod. 2026-02-20 - comment clarified: margin applies globally, not mobile-only */
/*Article CTA button — top margin*/
a.book-call__cta.btn.btn_white {
    margin-top: 10px;
}
/*Vendor form repeater buttons*/
.uacf7_repeater button {
  font-weight: bold;
  font-size: 15px;
  font-family: 'Montserrat', sans-serif;
  text-decoration: none;
}
/*CF7 response - success borders*/
.wpcf7 form.sent .wpcf7-response-output {
    border: 0;
    color: #ae0b8b;
    font-weight: bold;
    padding: 0;
    text-align: center;
}
/*People profile link wrap*/
.carrousel__link {
    width: auto;
}
/*Accessibility hyperlinks improvement*/
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  /* FM mod. 2026-02-20 - replaced deprecated clip:rect(0 0 0 0) with clip-path:inset(50%) */
  overflow: hidden; clip-path: inset(50%);
  white-space: nowrap; border: 0;
}
/*Search icon visibility*/
.header__search-toggler {
    filter: invert(0.6) brightness(1);
}
/*Footer changes */
/* Layout: narrow, fixed brand column + roomy gutter */
.footer__container{
  display:flex;
  align-items:flex-start;
  gap:64px;                 /* bigger space to the menus */
}

/* Brand column (logo + text) */
.footer__brand{
  flex:0 0 340px;           /* fixed width like the mock */
  max-width:340px;
}

/* Logo sizing (keeps current size but can be tuned) */
.footer__logo{ display:inline-block; }
.footer__logo img,
.footer__logo svg{
  max-width:220px;          /* adjust 200–240px to taste */
  height:auto;
}

/* Paragraph under the logo – compact + subdued */
.footer__description{
  margin-top:16px;
  max-width:320px;
  font-size:14px;
  line-height:1.6;
  color:#B7B7B7;
  font-weight:400;
}
/* Menus should fill remaining space nicely */
.footer__lists{ flex:1 1 auto; }
/* FM mod. 2026-02-20 - removed column-gap rule: has no effect on .footer__sublist
   (flex-direction:column container) or .menu-new-footer-menu-container (display:contents) */
/* Responsive stacking */
/* FM mod. 2026-02-20 - standardised to screen and (...) to match table media queries */
@media screen and (max-width: 980px){
  .footer__container{ flex-direction:column; gap:32px; }
  .footer__brand{ flex:0 0 auto; max-width:520px; }
  .footer__logo img,
  .footer__logo svg{ max-width:200px; }
}

/* Table. Base */
.post-page__content-text table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    border: none;
    margin: 20px 0;
    line-height: 1.6;
    font-size: 15px; /* desktop body size */
}

/* Table. Cells: wrapping and spacing */
.post-page__content-text table td,
.post-page__content-text table th {
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: auto;
    padding: 10px 16px;
    vertical-align: top;
}

/* Table. Cells: smarter breaking where supported */
@supports (word-break: auto-phrase) {
    .post-page__content-text table td,
    .post-page__content-text table th {
        word-break: auto-phrase;
    }
}

/* Table. Header row: gradient when thead exists */
.post-page__content-text table:has(thead) thead > tr:first-child {
    background-image: linear-gradient(56deg, #ec008c 0%, #2b328c 100%);
    background-repeat: no-repeat;
    background-size: 100% 100%;
}

/* Table. Header cells when thead exists */
.post-page__content-text table:has(thead) thead > tr:first-child > th,
.post-page__content-text table:has(thead) thead > tr:first-child > td {
    background: transparent !important; /* overrides theme cell background to expose row gradient */
    color: #fff;
    font-weight: 700;
    vertical-align: middle;
}

/* Table. Header row: fallback when thead is missing */
.post-page__content-text table:not(:has(thead)) > tbody:first-of-type > tr:first-child {
    background-image: linear-gradient(56deg, #ec008c 0%, #2b328c 100%);
    background-repeat: no-repeat;
    background-size: 100% 100%;
}

/* Table. Header cells when thead is missing */
.post-page__content-text table:not(:has(thead)) > tbody:first-of-type > tr:first-child > th,
.post-page__content-text table:not(:has(thead)) > tbody:first-of-type > tr:first-child > td {
    background: transparent !important; /* overrides theme cell background to expose row gradient */
    color: #fff;
    font-weight: 700;
    vertical-align: middle;
}

/* Table. Mobile: font size and padding (≤575.9px) */
@media screen and (max-width: 575.9px) {
    .post-page__content-text table {
        font-size: 14px; /* match mobile paragraph size */
    }

    .post-page__content-text table td,
    .post-page__content-text table th {
        padding: 8px 10px;
    }
}

/* Table. Desktop: width and layout (≥768px) */
@media screen and (min-width: 768px) {
    .post-page__content-text table[width],
    .post-page__content-text table[style*="width"] {
        width: 100%;
        max-width: 100%;
    }

    .post-page__content-text table {
        display: table;
        table-layout: fixed;
    }
}

.author__expertise-item-text {
    line-height: normal;
}

/* FIX: Hero ticker CLS — reserve space before CSS animation loads.
   Without this, the .hero-2-numbers container starts at 0 height then
   jumps to ~260px once ticker styles apply, causing CLS 0.213 on desktop.
   Values derived from: item padding (20px×2) + title (36px×1.1 + 10px margin)
   + text (~2 lines × 12px × 1.4) ≈ 124px per row × 2 rows + 10px gap. */
.hero-2-numbers {
    min-height: 258px;
}
@media screen and (max-width: 767.9px) {
    .hero-2-numbers {
        min-height: 166px;
    }
}

/* FM mod. 2026-02-27 – WCAG AA contrast fixes (4.5:1 minimum for normal text)
   Flagged by Lighthouse accessibility audit. */

/* Services step numbers: was #979cc4 on #fff (2.66:1) → #6b70a8 (4.52:1) */
.services__numeration-default {
    color: #6b70a8;
}

/* Subfooter paragraph text: was #989898 on #fcfcfc (2.81:1) → #737373 (4.63:1 on #fcfcfc) */
.subfooter p {
    color: #737373 !important;
}

/* FM mod. 2026-02-27 – Fix Select2 dropdown text alignment on form pages.
   The base input rule in form.scss applies padding:20px 25px to
   .select2-container--default .select2-selection--single (same specificity).
   Reset container padding to 0; let .select2-selection__rendered provide it.
   !important needed because compiled min.css source-order varies. */
.select2-container--default .select2-selection--single {
    padding: 0 !important;
    height: auto !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    padding: 15px 25px !important;
    line-height: 1.4 !important;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
    position: absolute !important;
    top: 50% !important;
    right: 25px !important;
    translate: 0 -50% !important;
    height: auto !important;
    width: auto !important;
}
.select2-container--default .select2-selection--single .select2-selection__arrow b {
    border: 0 !important;
    width: 24px !important;
    height: 24px !important;
    background: url(/wp-content/themes/fortis-media/src/img/icon-select-arrow.svg) center center no-repeat !important;
    background-size: 100% !important;
    position: static !important;
    margin: 0 !important;
}