/* =====================================================================
   Dunes Training & Consulting: site-wide styles: fonts, design tokens, base,
   header, footer, search popup. Loaded on every page.
   Page content uses components.css; homepage-only sections use home.css.
   ===================================================================== */

/* ---------- Fonts (self-hosted, latin subset) ---------- */
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/roboto-latin.woff2?v=2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Roboto"; font-style: italic; font-weight: 100 900; font-display: swap;
  src: url("../fonts/roboto-latin-italic.woff2?v=2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Libre Caslon Text"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/librecaslon-400.woff2?v=2") format("woff2"); }
@font-face { font-family: "Libre Caslon Text"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/librecaslon-700.woff2?v=2") format("woff2"); }

/* ---------- Design tokens (Elementor global kit) ---------- */
:root {
  --c-primary: #1B3D7D;
  --c-secondary: #54595F;
  --c-text: #7A7A7A;
  --c-accent: #C5A01B;
  --c-sky: #72B9E7;
  /* Accessible variants (4.5:1 with white text / on white): use for text and backgrounds behind text.
     The light originals stay for decoration (bars, tints, borders, effects). */
  --c-sky-strong: #1F7CB8;
  --c-accent-strong: #8E7313;
  --c-grey-strong: #767676;
  --c-white: #FFFFFF;
  --c-link: #CC3366;
  --f-serif: "Libre Caslon Text", serif;
  --f-sans: "Roboto", sans-serif;
  --content: 1280px;
}

/* ---------- Base (hello-elementor reset) ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { line-height: 1.15; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: #fff; color: #333;
  font-family: var(--f-sans); font-size: 1rem; font-weight: 400; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, h5, h6 { margin-block: .5rem 1rem; font-weight: 700; line-height: 1.2; color: inherit; }
h1 { font-size: 2.5rem; } h2 { font-size: 2rem; } h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; } h5 { font-size: 1.25rem; } h6 { font-size: 1rem; }
h1 { font-family: var(--f-serif); }
p { margin-block: 0 .9rem; }
a { color: var(--c-link); text-decoration: none; background: transparent; }
a:hover { color: #336; }
img { border-style: none; height: auto; max-width: 100%; }
.site-header ul, .site-footer ul, .search-modal ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; }
.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; }
.icon { display: block; width: 1em; height: 1em; fill: currentColor; }

/* =====================================================================
   Header (Elementor template 6627): sticky on all devices
   ===================================================================== */
.site-header { position: sticky; top: 0; z-index: 99; }

/* Top bar */
.topbar { display: flex; background: var(--c-primary); padding: 0 3vw; }
.topbar-col { display: flex; align-items: center; width: 50%; }
.topbar-left { margin: 5px 0 5px 5px; }
.topbar-right { margin: 5px 5px 5px 0; justify-content: flex-end; }
.tagline {
  margin: 0 10px 0 0; font-family: var(--f-serif); font-weight: 700;
  font-size: 15px; line-height: 1; color: #fff;
}
.social-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; padding: 0; border: 0; border-radius: 10%;
  background: #fff; color: var(--c-primary); font-size: 12px; line-height: 1;
  transition: opacity .3s;
}
.social-icon:hover { opacity: .9; color: var(--c-primary); }
.social-icons { display: flex; gap: 5px; }

.top-menu { margin: -10px 0; }
.top-menu ul { display: flex; }
.top-menu li { display: flex; }
.top-menu li:not(:last-child)::after {
  content: ""; align-self: center; height: 10px; border-left: 2px solid #fff;
}
.top-menu a {
  display: flex; align-items: center; padding: 13px 8px;
  font-size: 12px; line-height: 20px; color: #fff; transition: .4s;
}
.top-menu a:hover, .top-menu a.active { color: var(--c-sky); }

/* Main bar */
.mainbar { position: relative; display: flex; background: #fff; padding: 0 3vw; }
.mainbar-logo { display: flex; align-items: center; width: 33.333%; }
.mainbar-logo a { display: inline-block; line-height: 0; }
.mainbar-logo img { width: 230px; height: auto; }
.mainbar-nav { display: flex; align-items: center; justify-content: flex-end; width: 66.666%; }

.main-menu { display: flex; flex-wrap: wrap; justify-content: flex-end; position: relative; z-index: 2; }
.main-menu > li { position: relative; display: flex; }
.main-menu > li:not(:last-child)::after {
  content: ""; align-self: center; height: 30px; border-left: 2px solid var(--c-primary);
}
.main-menu > li:not(:last-child) > a { margin-inline-end: 2px; }
.main-menu > li:not(:first-child) > a { margin-inline-start: 2px; }
.main-menu a.nav-item {
  position: relative; display: flex; align-items: center; flex-grow: 1; white-space: nowrap;
  padding: 13px 20px; font-size: 16px; line-height: 20px; color: var(--c-secondary);
  transition: .4s; z-index: 0;
}
/* pointer: background, fade */
.main-menu a.nav-item::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--c-sky-strong); opacity: 0; transition: .3s cubic-bezier(.58,.3,.005,1);
}
.main-menu > li:hover > a.nav-item, .main-menu a.nav-item:focus-visible, .main-menu > li.open > a.nav-item { color: #fff; }
.main-menu > li:hover > a.nav-item::before, .main-menu a.nav-item:focus-visible::before, .main-menu > li.open > a.nav-item::before { opacity: 1; }

.sub-arrow {
  display: flex; align-items: center; line-height: 1;
  margin-block: -10px; padding: 10px 0 10px 10px;
}
.sub-arrow .icon { width: 1em; height: 1em; }

/* Dropdowns */
.main-menu .sub-menu {
  display: none; position: absolute; top: 100%; inset-inline-start: 2px;
  width: max-content; min-width: 12em; background: #fff; font-size: 13px; z-index: 10;
}
.main-menu > li > .sub-menu.sub-menu--flip { inset-inline-start: auto; inset-inline-end: 2px; } /* right-aligned when no room */
.main-menu .sub-menu .sub-menu { top: 0; inset-inline-start: 100%; }
.main-menu .sub-menu .sub-menu.sub-menu--flip { inset-inline-start: auto; inset-inline-end: 100%; } /* opens left when no room */
.main-menu li:hover > .sub-menu, .main-menu li.open > .sub-menu,
.main-menu li:focus-within > .sub-menu { display: block; }          /* keyboard: Tab walks into the dropdown */
.main-menu li.is-dismissed > .sub-menu { display: none; }            /* closed with Esc until focus/mouse leaves */
.main-menu .sub-menu li { position: relative; }
.main-menu a.nav-sub-item {
  display: flex; align-items: center; padding: 8px 20px; line-height: 20px; white-space: nowrap;
  color: var(--c-primary); transition: .4s;
}
.main-menu a.nav-sub-item:hover, .main-menu a.nav-sub-item:focus-visible, .main-menu li.open > a.nav-sub-item { background: #3f444b; color: #fff; }
.main-menu .sub-menu .sub-arrow .icon { transform: rotate(-90deg); }
.main-menu .sub-menu .sub-arrow { margin-inline-start: auto; }

/* Mobile toggle + dropdown */
.menu-toggle {
  display: none; align-items: center; justify-content: center;
  margin-left: auto; padding: .25em; border: 0; border-radius: 3px;
  background: transparent; color: var(--c-secondary); font-size: 30px;
}
.menu-toggle:hover { color: var(--c-sky-strong); }
.menu-toggle .menu-toggle-close { display: none; }
.menu-toggle[aria-expanded="true"] .menu-toggle-open { display: none; }
.menu-toggle[aria-expanded="true"] .menu-toggle-close { display: block; }
.mobile-nav {
  position: absolute; top: 100%; left: 0; right: 0; margin-top: 10px;
  background: #fff; font-size: 13px; max-height: calc(100vh - 120px); overflow-y: auto;
  box-shadow: 0 10px 20px rgba(0,0,0,.08);
}
.mobile-nav[hidden] { display: none; }
.mobile-menu ul { display: none; }
.mobile-menu li.open > ul { display: block; }
.mobile-menu a {
  display: flex; align-items: center; padding: 8px 20px; line-height: 20px;
  border-inline-start: 8px solid transparent; color: var(--c-primary);
}
.mobile-menu a:hover, .mobile-menu li.open > a { background: #3f444b; color: #fff; }
.mobile-menu ul a { font-size: .85em; border-inline-start-width: 16px; }
.mobile-menu ul ul a { border-inline-start-width: 24px; }
.mobile-menu .sub-arrow { margin-inline-start: auto; }

/* Search popup (Elementor popup 1807) */
.search-modal {
  position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center;
  background: rgba(114, 185, 231, .52); animation: fadeIn .3s;
}
.search-modal[hidden] { display: none; }
.search-dialog { position: relative; width: 640px; max-width: calc(100% - 40px); background: #fff; padding: 10px; box-shadow: 2px 8px 23px 3px rgba(0,0,0,.2); }
.search-close {
  position: absolute; top: -30px; right: -30px; display: flex; padding: 0; border: 0; background: none;
  color: #fff; font-size: 20px;
}
.search-form { display: flex; align-items: center; min-height: 50px; border-radius: 3px; background: rgba(0,0,0,.05); }
.search-form-icon { display: flex; padding-left: calc(50px / 3); color: #333; font-size: 16px; opacity: .6; }
.search-form input {
  flex: 1; min-width: 0; height: 50px; padding: 0 calc(50px / 3); border: 0; background: none;
  font: inherit; font-size: 15px; color: #55595c; outline: none;
}
.search-form:focus-within { outline: 2px solid var(--c-sky); outline-offset: 1px; } /* the input itself has no outline */

/* Skip link: hidden until focused with the keyboard */
.skip-link {
  position: absolute; top: -100px; left: 8px; z-index: 1000; padding: 10px 16px;
  background: var(--c-primary); color: #fff; font-weight: 700;
}
.skip-link:focus { top: 8px; color: #fff; }
main:focus { outline: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* =====================================================================
   Footer (Elementor template 206)
   ===================================================================== */
.site-footer { background: #EBEBEB; padding-top: 10px; }
.footer-cols { display: flex; padding: 0 4% 1%; }
/* Column padding is 2% of the column itself (= 0.4% of the row). Widgets are spaced 5px,
   paragraphs keep their 14.4px bottom margin, headings carry 10px above and below. */
.footer-col { display: flex; flex-direction: column; align-items: stretch; width: 20%; padding-right: .4%; color: var(--c-secondary); }
.footer-col > * { margin: 0 0 5px; }
.footer-col > img { align-self: flex-start; }
.footer-col > p { margin-bottom: 19.4px; }
.footer-col > p:last-child { margin-bottom: 14.4px; }
.footer-col > .footer-title { margin: 10px 0; }
.footer-col > .footer-privacy { margin-bottom: 6.4px; }
.footer-col > :last-child:not(p) { margin-bottom: 0; }
.footer-title { font-size: 19px; line-height: 1; font-weight: 700; color: var(--c-secondary); }
.footer-logo { width: 140px; max-width: 140px; }
.footer-badge { width: 150px; max-width: 150px; }
.footer-hours { color: #333; }
.footer-contact a.plain { color: inherit; }
.footer-menu a { display: flex; padding: 1px; line-height: 20px; }
/* Same pink as --c-link, one shade deeper: #CC3366 on the grey footer is 4.16:1, below the 4.5:1 minimum */
.site-footer a:not(.plain) { color: #BF2F5E; }
.site-footer a:not(.plain):hover, .site-footer a:not(.plain):focus-visible { color: #336; }
.footer-bottom { display: flow-root; background: var(--c-primary); padding: 0 3vw; }
.footer-bottom p { margin: 10px 0 14.4px; font-size: 12px; line-height: 18px; color: #fff; text-align: center; }
.site-footer .footer-credit a { color: #fff; text-decoration: none; }   /* beats .site-footer a:not(.plain) (pink on blue fails contrast) */
.site-footer .footer-credit a:hover, .site-footer .footer-credit a:focus-visible { color: #fff; text-decoration: underline; }

/* =====================================================================
   Tablet ≤1024px
   ===================================================================== */
@media (max-width: 1024px) {
  .topbar, .mainbar { padding: 0 1vw; }
  .main-menu a.nav-item { font-size: 12px; padding-left: 6px; padding-right: 6px; }
}

/* Footer on tablets: logo + two licence badges in one row, contact + privacy in the next */
@media (min-width: 768px) and (max-width: 1024px) {
  .footer-cols { flex-wrap: wrap; row-gap: 10px; }
  .footer-col { width: 33.333%; padding-right: 2%; }
  .footer-col:nth-child(n+4) { width: 50%; }
  .footer-badge, .footer-logo { max-width: 100%; }
}

/* =====================================================================
   Mobile ≤767px
   ===================================================================== */
@media (max-width: 767px) {
  .topbar { flex-wrap: wrap; padding: 5px 0; }
  .topbar-col { width: 100%; justify-content: center; }
  .topbar-left .social-icon { display: none; }   /* search icon hidden on mobile */
  .tagline { text-align: center; }
  .top-menu { display: none; }
  .mainbar { padding: 5px 0; }
  .mainbar-logo { width: 60%; }
  .mainbar-nav { width: 40%; }
  .main-nav { display: none; }
  .menu-toggle { display: flex; }

  .footer-cols { flex-wrap: wrap; }
  .footer-col { width: 100%; padding-right: 2%; }
}
