@import url('https://fonts.googleapis.com/css2?family=Afacad+Flux:wght@400;500;600;700&family=Faculty+Glyphic&display=swap');

/* ST. MELLION CAREERS — replace the previous custom.css in full.
   Uses the existing Recruit Genie slider, navigation, search and forms. */
:root {
  --sm-navy: #283959;
  --sm-navy-dark: #1d2b45;
  --sm-cream: #f2e9d8;
  --sm-ink: #283959;
  --sm-muted: #59616c;
  --sm-line: #d8d9d9;
  --sm-body-font: 'Afacad Flux', sans-serif;
  --sm-heading-font: 'Faculty Glyphic', sans-serif;
  --sm-hero-height: max(460px, calc(100vh - 300px));
}
body { font-family: var(--sm-body-font); font-size: 17px; line-height: 1.6; letter-spacing: .01em; color: var(--sm-ink); background: #fff; padding-top: 112px; }
body.sm-has-hero, body.jobs:has(.slider.fullscreen) { padding-top: 0; }
a { color: var(--sm-navy); transition: color .2s, background-color .2s, border-color .2s; }
a:hover { color: var(--sm-navy-dark); }
a:focus-visible, button:focus-visible { outline: 3px solid #94753c !important; outline-offset: 4px; }
input:focus, select:focus, textarea:focus { outline: none !important; box-shadow: 0 0 0 4px rgba(40,57,89,.12) !important; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6, .header-font { font-family: var(--sm-heading-font); font-weight: 400; line-height: 1.3; letter-spacing: 0; color: var(--sm-navy); }
h1, .h1 { font-size: clamp(27px, 3vw, 40px); }
h2, .h2 { font-size: clamp(23px, 2.4vw, 32px); }
h3, .h3 { font-size: 23px; }
h4, .h4, h5, .h5, h6, .h6 { font-size: 19px; }
.body-font, input, select, textarea, optgroup { font-family: var(--sm-body-font); }
.btn, button { border-radius: 0; }
.btn { font-family: var(--sm-heading-font); font-size: 12px; font-weight: 400; line-height: 1.5; letter-spacing: .07em; text-transform: uppercase; padding: 14px 24px; white-space: normal; }
.btn-primary, #accordionExample .btn-primary { background: var(--sm-navy) !important; border: 1px solid var(--sm-navy) !important; color: var(--sm-cream) !important; }
.btn-primary:hover, .btn-primary:focus, .btn-primary:active { background: var(--sm-navy-dark) !important; border-color: var(--sm-navy-dark) !important; color: var(--sm-cream) !important; }
.btn.btn-secondary { background: var(--sm-cream) !important; border: 1px solid var(--sm-cream) !important; color: var(--sm-navy) !important; }
.btn.btn-secondary:hover, .btn.btn-secondary:focus, .btn.btn-secondary:active { background: #e4d6bb !important; border-color: #e4d6bb !important; color: var(--sm-navy) !important; }
.btn-outline-primary { color: var(--sm-navy); border-color: var(--sm-navy); }
.btn-outline-primary:hover { background: var(--sm-navy); color: var(--sm-cream); }
.bg-primary, .ui-bg-primary { background-color: var(--sm-navy) !important; }
.text-primary { color: var(--sm-navy) !important; }
.text-secondary { color: #716757 !important; }
.bg-secondary, .ui-bg-secondary { background-color: var(--sm-cream) !important; }

/* Header: centred estate logo, menu/contact left, recruitment actions right. */
#header { position: fixed; inset: 0 0 auto; z-index: 999; background: #fffdf8; box-shadow: 0 1px 0 rgba(40,57,89,.12); transition: background-color .25s, box-shadow .25s; }
.jobs #header.fancy-header:not(.fixed-header) { background: transparent; box-shadow: none; }
#header .sm-header-inner { display: grid; grid-template-columns: minmax(0,1fr) 180px minmax(0,1fr); align-items: center; gap: 24px; max-width: 1800px; margin: 0 auto; min-height: 112px; padding: 12px 30px; transition: min-height .25s; }
.jobs #header.fancy-header:not(.fixed-header) .sm-header-inner { min-height: 184px; align-items: start; padding-top: 30px; }
.jobs #header.fixed-header .sm-header-inner { min-height: 88px; }
#header .sm-header-left { display: flex; align-items: center; gap: 24px; min-width: 0; }
.jobs #header.fancy-header:not(.fixed-header) .sm-header-left, .jobs #header.fancy-header:not(.fixed-header) .sm-header-actions { padding-top: 22px; }
#header .sm-header-logo { display: block; justify-self: center; text-align: center; }
#header .sm-header-logo img { display: block; width: auto; max-width: 100%; height: 86px; object-fit: contain; }
#header .sm-header-logo .sm-logo-light { display: none; }
.jobs #header.fancy-header:not(.fixed-header) .sm-header-logo .sm-logo-light { display: block; height: 140px; }
.jobs #header.fancy-header:not(.fixed-header) .sm-header-logo .sm-logo-dark { display: none; }
.jobs #header.fixed-header .sm-header-logo img { height: 64px; }
#header .navbar { padding: 0; position: static; }
#header nav .navbar-toggler { display: inline-flex !important; align-items: center; justify-content: center; gap: 12px; margin: 0 !important; padding: 14px 20px !important; width: auto !important; min-width: 120px; min-height: 48px; border: 1px solid var(--sm-navy); background: var(--sm-navy); border-radius: 0; vertical-align: middle; }
#header .navbar-toggler span, #header .navbar-toggler i, #header.active nav .navbar-toggler i, #header.active nav .navbar-toggler .navbar-toggler-icon-text { color: var(--sm-cream) !important; }
#header .navbar-toggler-icon { display: inline-flex; align-items: center; justify-content: center; position: static !important; flex: 0 0 24px; width: 24px; height: auto; margin: 0 !important; font-size: 24px; background: none; transform: none; }
#header .navbar-toggler-icon-text { position: static !important; margin: 0 !important; float: none !important; font-family: var(--sm-heading-font); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
#header .sm-contact-links { display: flex; align-items: center; white-space: nowrap; }
#header .sm-contact-links a { color: var(--sm-navy); text-transform: uppercase; font-size: 14px; line-height: 1; }
#header .sm-contact-links a + a { margin-left: 15px; padding-left: 15px; border-left: 1px solid currentColor; }
.jobs #header.fancy-header:not(.fixed-header) .sm-contact-links a { color: var(--sm-cream); }
#header .sm-contact-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
#header .sm-header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 24px; }
#header .sm-header-actions .btn { white-space: nowrap; }
.sm-mobile-label { display: none; }

/* Retain the platform's slide-out menu and close control. */
#header #mainnav, #header .fixed-vertical-mobile-menu .navbar-collapse.expanded { background: var(--sm-cream) !important; width: min(440px, 100vw) !important; max-width: 100vw; z-index: 1100; }
#header #mainnav ul.navbar-nav { padding: 20px 40px 40px; }
#header #mainnav .nav-item a { display: block; font-family: var(--sm-heading-font); color: var(--sm-navy) !important; font-size: 20px !important; font-weight: 400 !important; line-height: 1.5; letter-spacing: .03em !important; text-transform: none !important; text-align: left !important; padding: 14px 0 !important; margin: 0; border-bottom: 1px solid rgba(40,57,89,.16); }
#header #mainnav .nav-item a:hover { color: var(--sm-navy-dark) !important; text-decoration: underline; text-underline-offset: 5px; }
#header #mainnav .close-button { padding: 28px 40px 12px; text-align: left !important; }
#header #mainnav .close-button a { color: var(--sm-navy) !important; font-family: var(--sm-heading-font); font-size: 13px; }

/* Open menu: dim the full page, with the drawer and persistent toggle above it. */
html { scrollbar-gutter: stable; }
body.sm-menu-open { overflow: hidden; }
#header.sm-menu-open { z-index: 100010; }
#header .sm-menu-backdrop { position: fixed; inset: 0; z-index: 1000; background: rgba(12,20,33,.58); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .2s, visibility .2s; }
#header.sm-menu-open .sm-menu-backdrop { opacity: 1; visibility: visible; pointer-events: auto; }
#header.sm-menu-open nav .navbar-toggler { position: relative; z-index: 1200; }
#header.sm-menu-open #mainnav.expanded { z-index: 1100; }

/* Existing jobs slider: text only in the CMS; presentation handled here.
   Normal flow prevents platform inline top/height values leaving gaps. */
.jobs .slider.fullscreen { position: relative !important; inset: auto !important; height: auto !important; }
.jobs .slider.fullscreen .carousel-inner .carousel-item .img { height: var(--sm-hero-height) !important; min-height: 460px; background-size: cover; background-position: center; }
.jobs .slider.fullscreen .carousel-item { position: relative; }
.jobs .slider.fullscreen .carousel-item .img::before { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg,rgba(16,25,38,.48) 0%,rgba(16,25,38,.08) 42%,rgba(16,25,38,.65) 100%); }
.jobs .slider.fullscreen .carousel-item .carousel-caption { display: flex !important; flex-direction: column; align-items: flex-start; justify-content: flex-end; position: absolute; inset: 0; width: auto; max-width: none; margin: 0 !important; padding: 200px max(30px, calc((100vw - 1220px) / 2)) 42px; text-align: left; z-index: 2; }
.jobs .slider .carousel-caption h1 { font-family: var(--sm-heading-font); color: var(--sm-cream) !important; font-size: clamp(32px,4vw,54px) !important; font-weight: 400; line-height: 1.2; margin: 0 0 14px; text-transform: none; letter-spacing: 0; }
.jobs .slider .carousel-caption p { font-family: var(--sm-body-font); color: var(--sm-cream) !important; font-size: 20px; line-height: 1.4; max-width: 580px; margin: 0; }
.jobs .slider .carousel-caption .sm-hero-eyebrow { font-size: 13px; font-weight: 500; letter-spacing: .15em; text-transform: uppercase; margin-bottom: 12px; }
.slider .carousel-control-prev, .slider .carousel-control-next { display: none; }
.jobs .body-wrapper.fullscreen { position: relative !important; inset: auto !important; margin-top: 0; }
.body-wrapper { margin-top: 40px; }
/* Internal pages: normal-flow header, no sticky/shrinking state or hero offset. */
body:not(.jobs) { padding-top: 0 !important; }
body:not(.jobs) #header { position: relative; inset: auto; padding: 0; background: #fffdf8; transition: none; }
body:not(.jobs) #header .sm-header-inner { min-height: 112px; transition: none; }
body:not(.jobs) .body-wrapper { margin-top: 56px; }
body:not(.jobs) .body-wrapper.fullscreen { position: relative !important; inset: auto !important; }
.jobs .body-wrapper > .container { padding-top: 44px; }
@media (min-width: 1200px) { .container { max-width: 1220px; } }

/* Vacancies and generated recruitment forms. */
.jobs .job-search-filter-wrapper, .jobs .job-results-wrapper { width: 100%; max-width: 100%; flex: 0 0 100%; }
.jobs h1.title { text-align: center; font-size: 28px; margin-bottom: 30px; }
.job-search-filter, .jobs .job-search-filter-v2 { margin: 0 0 36px; padding: 26px; background: #faf7f1; border: 1px solid #e4dccd; }
.body-wrapper .card { border-color: var(--sm-line); border-radius: 0; background: #fff; }
.body-wrapper .form-control, .body-wrapper input[type='text'], .body-wrapper input[type='email'], .body-wrapper input[type='password'], .body-wrapper input[type='tel'], .body-wrapper textarea, .job-search-filter select, .job-search-filter .flagstrap { background: #fff; border: 1px solid #a8adb4; border-radius: 0; color: var(--sm-ink); font-family: var(--sm-body-font); font-size: 17px; }
.body-wrapper input.form-control, .body-wrapper select.form-control { min-height: 48px; }
.body-wrapper .form-control:focus { border-color: var(--sm-navy); outline: none !important; box-shadow: 0 0 0 4px rgba(40,57,89,.12) !important; }
.body-wrapper label { font-weight: 500; }
.job-search-filter .advanced-filters-button a, .jobs .job-search-filter-v2 .advanced-filters-button a { font-size: 16px; text-decoration: underline; text-underline-offset: 4px; }

/* Recruit Genie search v2: includes generated multiselect dropdown controls.
   Target the visible wrapper, leaving the plugin's hidden native select intact. */
.jobs .job-search-filter-v2 .form-control, .jobs .job-search-filter-v2 .flagstrap { min-height: 48px; border: 1px solid #a8adb4; border-radius: 0; background-color: #fff; color: var(--sm-ink); font-family: var(--sm-body-font); font-size: 17px; line-height: 1.4; }
.jobs .job-search-filter-v2 .multiselect-wrapper > .multiselect { display: flex; align-items: center; padding: 10px 36px 10px 12px; cursor: pointer; }
.jobs .job-search-filter-v2 .multiselect-selected-text { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.jobs .job-search-filter-v2 .multiselect-arrow { position: absolute; right: 12px; top: 50%; margin: 0; transform: translateY(-50%); font-size: 13px; }
.jobs .job-search-filter-v2 .form-control:focus, .jobs .job-search-filter-v2 .multiselect-wrapper.show > .multiselect { border-color: var(--sm-navy); outline: none !important; box-shadow: 0 0 0 4px rgba(40,57,89,.12) !important; }
.jobs .job-search-filter-v2 .multiselect-container { border: 1px solid #a8adb4; border-radius: 0; background: #fff; color: var(--sm-ink); box-shadow: 0 6px 20px rgba(40,57,89,.12); }
.jobs .job-search-filter-v2 .multiselect-container .dropdown-item { color: var(--sm-ink); font-family: var(--sm-body-font); font-size: 17px; line-height: 1.4; white-space: normal; text-align: left; }
.jobs .job-search-filter-v2 .multiselect-container .dropdown-item:hover, .jobs .job-search-filter-v2 .multiselect-container .dropdown-item:focus, .jobs .job-search-filter-v2 .multiselect-container .dropdown-item.active { background: var(--sm-cream) !important; color: var(--sm-navy); }
.jobs .job-search-filter-v2 input[type='checkbox'] { accent-color: var(--sm-navy); }
.jobs .job-search-filter-v2 .advanced .af-location-wrapper { display: none !important; }
.jobs .job-search-filter-v2 .sm-departments-empty .multiselect-selected-text { color: var(--sm-navy); }
#jobList > ul.job-list > li { padding: 0; border: 1px solid var(--sm-line); margin-bottom: 30px; background: #fff; }
#jobList > ul.job-list > li hr, #jobList > ul.job-list > li .row-1, #jobList > ul.job-list > li .brand-img { display: none !important; }
#jobList > ul.job-list > li .row-2 { display: flex; align-items: stretch; }
#jobList > ul.job-list > li .row-2 > div { float: none !important; margin: 0 !important; width: 50%; min-width: 0; padding: 36px; }
#jobList > ul.job-list > li .row-2 .header-img { display: block !important; min-height: 320px; padding: 0; background-color: var(--sm-cream); background-size: cover; background-position: center; }
#jobList > ul.job-list > li .row-2 h2, #jobList > ul.job-list > li .row-2 .btn-apply-2 { display: block !important; float: none !important; }
#jobList .row-2 h2 { margin-bottom: 16px; }
#jobList .row-2 h2 a { font-size: inherit; color: var(--sm-navy); }
#jobList .branch-name { color: var(--sm-muted); }
#jobList .points { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--sm-muted); margin: 12px 0; }
#jobList .overview { margin-bottom: 24px; }
.jobs .paging li a { border: 1px solid var(--sm-line) !important; background: #fff !important; color: var(--sm-navy); border-radius: 0; }
.jobs .paging li.active a { background: var(--sm-navy) !important; color: var(--sm-cream) !important; }
.job-details .slider, .job-details .video-container { display: none !important; }
.job-details .body-wrapper.fullscreen { position: relative !important; inset: auto !important; }
#divSelectCV #div_connect .btn { max-width: 100%; white-space: normal; }

/* Footer matches the estate's cream gradient and navy base. */
#footer { margin-top: 64px; padding: 0; border: 0; color: var(--sm-navy); }
#footer .sm-footer-main { background: linear-gradient(180deg,#fff 0%,var(--sm-cream) 80%); text-align: center; padding: 56px 24px 64px; }
#footer .sm-footer-logo { display: inline-block; }
#footer .sm-footer-logo img { width: 203px; height: 173px; max-width: 100%; }
#footer .sm-footer-contacts { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px 0; list-style: none; padding: 0; margin: 30px 0; }
#footer .sm-footer-contacts li { font-size: 16px; }
#footer .sm-footer-contacts li + li::before { content: '|'; margin: 0 24px; }
#footer a { color: var(--sm-navy); }
#footer a:hover { color: var(--sm-navy-dark); text-decoration: underline; text-underline-offset: 4px; }
#footer .sm-social-links { display: flex; justify-content: center; gap: 12px; list-style: none; padding: 0; margin: 0; }
#footer .sm-social-links a { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 1px solid var(--sm-navy); border-radius: 50%; font-size: 17px; }
#footer .sm-social-links a:hover { background: var(--sm-navy); color: var(--sm-cream); text-decoration: none; }
#footer .sm-partners { margin-top: 64px; }
#footer .sm-partners-label { font-family: var(--sm-heading-font); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 32px; }
#footer .sm-partner-logos { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 30px; }
#footer .sm-partner-logos img { max-width: 170px; max-height: 90px; width: auto; height: auto; object-fit: contain; }
#footer .sm-footer-bottom { background: var(--sm-navy); padding: 24px 30px; color: var(--sm-cream); }
#footer .sm-footer-bottom .copyrights { margin: 0; padding: 0; border: 0; }
#footer .sm-footer-bottom, #footer .sm-footer-bottom a, #footer .sm-footer-bottom span { color: var(--sm-cream) !important; font-size: 14px; }

@media (max-width: 1199.98px) {
  #header .sm-contact-links { display: none; }
  #header .sm-header-actions { gap: 12px; }
  #header .sm-header-inner { gap: 16px; }
}
@media (max-width: 767.98px) {
  body { padding-top: 100px; }
  #header .sm-header-inner, .jobs #header.fancy-header:not(.fixed-header) .sm-header-inner, .jobs #header.fixed-header .sm-header-inner, body:not(.jobs) #header .sm-header-inner { grid-template-columns: minmax(0,1fr) 96px minmax(0,1fr); gap: 8px; min-height: 100px; padding: 12px 16px; align-items: center; }
  .jobs #header.fancy-header:not(.fixed-header) .sm-header-left, .jobs #header.fancy-header:not(.fixed-header) .sm-header-actions { padding-top: 0; }
  #header .sm-header-logo img, .jobs #header.fixed-header .sm-header-logo img, .jobs #header.fancy-header:not(.fixed-header) .sm-header-logo .sm-logo-light { height: 72px; }
  body:not(.jobs) .body-wrapper { margin-top: 32px; }
  #header nav .navbar-toggler { min-width: 84px; min-height: 44px; padding: 10px 12px !important; gap: 6px; }
  #header.sm-menu-open #mainnav, #header.sm-menu-open .fixed-vertical-mobile-menu .navbar-collapse.expanded { width: min(440px, calc(100vw - 116px)) !important; }
  #header #mainnav ul.navbar-nav { padding-right: 24px; padding-left: 24px; }
  #header #mainnav .close-button { padding-right: 24px; padding-left: 24px; }
  #header .navbar-toggler-icon { flex-basis: 20px; width: 20px; font-size: 20px; }
  #header .navbar-toggler-icon-text { font-size: 10px; letter-spacing: .03em; }
  #header .sm-header-actions .sm-register, .sm-desktop-label { display: none; }
  .sm-mobile-label { display: inline; }
  #header .sm-header-actions .btn { font-size: 10px; padding: 12px 14px; min-height: 44px; }
  .jobs .slider.fullscreen .carousel-item .carousel-caption { padding: 126px 24px 32px; }
  .jobs .slider .carousel-caption h1 { font-size: 34px !important; }
  .jobs .slider .carousel-caption p { font-size: 18px; max-width: 460px; }
  .jobs .slider .carousel-caption .sm-hero-eyebrow { font-size: 11px; }
  .jobs .body-wrapper > .container { padding-top: 32px; }
  .jobs h1.title { font-size: 24px; }
  .job-search-filter, .jobs .job-search-filter-v2 { padding: 20px; }
  #jobList > ul.job-list > li .row-2 { flex-direction: column; }
  #jobList > ul.job-list > li .row-2 > div { width: 100%; padding: 26px; }
  #jobList > ul.job-list > li .row-2 .header-img { min-height: 230px; }
  #footer { margin-top: 44px; }
  #footer .sm-footer-contacts { flex-direction: column; }
  #footer .sm-footer-contacts li + li::before { content: none; }
  #footer .sm-partner-logos { gap: 24px; }
  #footer .sm-partner-logos img { max-width: 130px; max-height: 75px; }
  #footer .sm-footer-main { padding: 40px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  #header, #header .sm-header-inner, #header .sm-menu-backdrop, a, .carousel-item { transition: none !important; animation: none !important; }
}
