/* AahHope: replacements for behaviour previously provided by the Duda runtime,
   plus accessibility additions. Original colours/typography come from the per-page CSS. */

/* Device-specific header variants (Duda served one per device) */
@media (max-width: 1024px) { .aah-d { display: none !important; } }
@media (min-width: 1025px), (max-width: 767px) { .aah-t { display: none !important; } }
@media (min-width: 768px) { .aah-m { display: none !important; } }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
/* Anchor targets clear the fixed header */
[id] { scroll-margin-top: calc(var(--aah-header-h, 0px) + 8px); }
@media (max-width: 1024px) {
  .js #dmFirstContainer { padding-top: var(--aah-mobile-header-h, 80px); }
}
@media (max-width: 767px) {
  /* Duda applied this direction/centering at runtime to the mobile header. */
  #m-hamburger-header-container .dmRespColsWrapper { flex-direction: row-reverse; }
  #m-hamburger-header-container .u_1003944104 { display: flex !important; align-items: center; }
}

/* Visually hidden helper */
.aah-vh { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; border: 0 !important; }

/* Skip link */
.aah-skip { position: absolute; left: 8px; top: 8px; z-index: 10000; padding: 12px 18px; background: #fff; color: #222; font: 600 16px/1.2 Poppins, sans-serif; text-decoration: underline; transform: translateY(-200%); }
.aah-skip:focus { transform: none; }

/* Visible keyboard focus everywhere */
#dmRoot a:focus-visible, #dmRoot button:focus-visible, #dmRoot input:focus-visible, #dmRoot textarea:focus-visible, #dmRoot [tabindex]:focus-visible {
  outline: 3px solid currentColor !important; outline-offset: 3px !important; box-shadow: 0 0 0 5px rgba(255, 255, 255, .85) !important;
}
#dmRoot #dm_content:focus { outline: none; }
#dmRoot .dmButtonLink:focus-visible { outline-offset: 4px !important; }

/* Underline in-text links so they are distinguishable without colour */
#dmRoot .dmNewParagraph p a, #dmRoot .dmNewParagraph li a { text-decoration: underline !important; }

/* Hamburger button is a real <button>: reset UA styles */
button.layout-drawer-hamburger { -webkit-appearance: none; appearance: none; border: 0; cursor: pointer; }
/* The open menu uses a white close icon; keep the closed hamburger unchanged. */
#dmRoot .layout-drawer-hamburger[aria-expanded="true"] { color: #fff !important; }
.layout-drawer[aria-hidden="true"] { visibility: hidden; }
.layout-drawer_open .layout-drawer { visibility: visible; }

/* Hero background slideshow (export data-gallery-bg) */
.aah-has-bg-stage { isolation: isolate; }
.aah-bg-stage { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aah-bg-layer { position: absolute; inset: 0; background-size: cover; background-position: 50% 50%; background-repeat: no-repeat; opacity: 0; transition: opacity 1s ease-in-out; }
.aah-bg-layer.is-active { opacity: 1; }
.aah-bg-toggle { position: absolute; right: 12px; bottom: 12px; z-index: 3; width: 36px; height: 36px; border: 2px solid rgba(255,255,255,.85); border-radius: 50%; background: rgba(0,0,0,.35); cursor: pointer; padding: 0; opacity: .75; }
.aah-bg-toggle:hover, .aah-bg-toggle:focus-visible { opacity: 1; }
.aah-bg-toggle::before, .aah-bg-toggle::after { content: ""; position: absolute; top: 10px; width: 4px; height: 12px; background: #fff; }
.aah-bg-toggle::before { left: 11px; } .aah-bg-toggle::after { left: 17px; }
.aah-bg-toggle.is-paused::after { display: none; }
.aah-bg-toggle.is-paused::before { left: 12px; width: 0; height: 0; background: none; border-style: solid; border-width: 6px 0 6px 11px; border-color: transparent transparent transparent #fff; }
@media (min-width: 1025px) { .aah-bg-toggle { bottom: 120px; } }

/* Only the home-page hero uses this inherited image; never secondary-page text. */
#dmRoot:not([data-page-alias="home"]) #dm .dmBody div.u_1243667655 {
  background-image: none !important;
}

/* Quote carousel (FlexSlider replacement) */
#dm .flexslider .slides > li.flex-active-slide { display: block; }
#dm .flexslider .slides > li .slide-text:empty { display: none; }
#dm .flexslider .flex-direction-nav, #dm .flexslider .flex-pauseplay { list-style: none; margin: 0; padding: 0; }
#dm .flexslider .flex-direction-nav :is(a, button), #dm .flexslider .flex-pauseplay :is(a, button) { z-index: 5; }
.aah-carousel-ready .flex-direction-nav :is(a, button) { opacity: .7; }
.aah-carousel-ready .flex-direction-nav .flex-prev { left: 10px; }
.aah-carousel-ready .flex-direction-nav .flex-next { right: 10px; }
.aah-carousel-ready .flex-pauseplay :is(a, button) { opacity: .8; }
.flex-direction-nav button, .flex-pauseplay button { border: 0; padding: 0; background: transparent; cursor: pointer; font: inherit; }
.flex-pauseplay button { min-width: 24px; min-height: 24px; }
nav a { min-height: 24px; }
.aah-enter-next { animation: aahSlideNext .6s ease both; }
.aah-enter-prev { animation: aahSlidePrev .6s ease both; }
@keyframes aahSlideNext { from { transform: translateX(100%); } to { transform: none; } }
@keyframes aahSlidePrev { from { transform: translateX(-100%); } to { transform: none; } }

/* Contact form (Formspark markup inside the original Duda form wrapper) */
.aah-contact-form .aah-fieldset { border: 0; margin: 0; padding: 0; min-width: 0; display: contents; }
.aah-contact-form .aah-form-notice { font-size: 14px; line-height: 1.5; margin: 0 0 10px; padding: 0 10px; text-align: left; }
.aah-contact-form .aah-form-label { display: block !important; text-align: left; font-size: 14px; margin: 0 0 4px; }
.aah-contact-form .aah-form-status { width: 100%; padding: 0 10px; text-align: left; min-height: 1px; }
.aah-contact-form .aah-form-status:empty { margin: 0; }
.aah-contact-form .dmforminput.required .aah-form-label::after { content: none; }
.aah-contact-form fieldset:disabled input, .aah-contact-form fieldset:disabled textarea { opacity: .6; cursor: not-allowed; }
.aah-contact-form fieldset:disabled button { opacity: .6; cursor: not-allowed; }
.aah-contact-form .dmformsubmit button { -webkit-appearance: none; appearance: none; }
.aah-contact-form [aria-invalid="true"] { outline: 2px solid currentColor; outline-offset: 1px; }

/* Map */
.aah-map-panel { width: 100%; margin: 20px 0; text-align: left; }
.aah-map-panel p { margin: 0 0 12px; }
.aah-map-notice { font-size: 14px; line-height: 1.5; }
.aah-map-viewport { width: 100%; min-height: 320px; margin-bottom: 12px; display: flex; align-items: center; justify-content: center; border: 1px solid currentColor; }
.aah-map-load { min-height: 44px; padding: 12px 18px; margin: 16px; border: 1px solid currentColor; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.aah-map-load[hidden] { display: none !important; }
.aah-map { display: block; width: 100%; height: 360px; border: 0; }
.aah-map-panel a { text-decoration: underline; }
.no-js .aah-map-viewport { min-height: 0; border: 0; justify-content: flex-start; }

/* Back to top (mobile only, original Duda behaviour) */
.dmBackToTop { position: fixed; right: 16px; bottom: 16px; z-index: 50; width: 44px; height: 44px; border-radius: 50%; background: rgba(0,0,0,.55); opacity: 0; pointer-events: none; transition: opacity .3s; }
.dmBackToTop::before { content: ""; position: absolute; left: 15px; top: 18px; width: 12px; height: 12px; border-left: 3px solid #fff; border-top: 3px solid #fff; transform: rotate(45deg); }
.aah-show-top .dmBackToTop { opacity: 1; pointer-events: auto; }

/* Supporting pages (accessibility, 404) prose */
.aah-prose { text-align: left; max-width: 860px; margin: 0 auto; }
.aah-prose h2 { font-size: 26px; margin: 28px 0 10px; }
.aah-prose ul { padding-left: 22px; margin: 0 0 14px; }
.aah-prose li { margin: 0 0 8px; }
.aah-prose p { margin: 0 0 14px; }
.aah-a11y-link { margin-top: 4px; }

/* Keep footer link text inside its own column when visitors enlarge spacing. */
#dmRoot #dm .dmFooter .main-navigation { min-width: 0 !important; max-width: 100% !important; }
#dmRoot #dm .dmFooter .unifiednav__container,
#dmRoot #dm .dmFooter .unifiednav__item-wrap,
#dmRoot #dm .dmFooter .unifiednav__item,
#dmRoot #dm .dmFooter .nav-item-text { min-width: 0; max-width: 100%; }
#dmRoot #dm .dmFooter .nav-item-text { overflow-wrap: anywhere; }

/* Drawer open state (Duda runtime previously set this inline) */
#dm .runtime-module-container .layout-drawer { transition: transform .3s ease-in-out; }
#dm .runtime-module-container.layout-drawer_open .layout-drawer { transform: translate(0, 0) !important; }

/* ---------- No-JavaScript fallbacks ---------- */
.no-js .layout-drawer-hamburger, .no-js .layout-drawer-overlay, .no-js .flex-direction-nav, .no-js .flex-pauseplay { display: none !important; }
.no-js .hamburger-header-container { position: static !important; }
.no-js #dm .layout-drawer { position: static !important; transform: none !important; visibility: visible !important; width: auto !important; height: auto !important; max-height: none !important; display: block !important; }
.no-js #dm .flexslider, .no-js #dm .flexslider .slides { height: auto !important; }
.no-js #dm .flexslider .slides > li { display: block !important; position: relative !important; height: auto !important; padding: 24px 0; }
.no-js #dm .flexslider .slides > li > img { display: none !important; }
.no-js #dm .flexslider .slides > li .slide-inner { position: relative !important; visibility: visible !important; top: auto !important; left: auto !important; right: auto !important; bottom: auto !important; transform: none !important; margin: 0 auto !important; max-height: none !important; }
