/* MODUL Site Chrome v1.1.1 — header/footer, no clipping on page content. */
:root {
  --modul-header-height: 76px; /* safe fallback before JS measurement */
  --modul-admin-offset: 0px;
  scroll-padding-top: calc(var(--modul-header-height) + var(--modul-admin-offset) + 18px);
}

/* Theme Inspiro's header is no longer used. Keep its WP templates untouched. */
#masthead, #side-nav, .side-nav-overlay, #colophon { display: none !important; }
/* Inspiro writes different inline padding-top on different pages. The new header
   is fixed, so reserve exactly the measured height of our header on EVERY page.
   JS also writes an inline !important value and observes subsequent theme changes. */
#content,
#content.site-content,
body #page .site-content-contain > #content {
  padding-top: var(--modul-header-height, 76px) !important;
  margin-top: 0 !important;
}

.modul-chrome-header, .modul-chrome-header *, .modul-chrome-header *::before, .modul-chrome-header *::after,
.modul-chrome-footer, .modul-chrome-footer *, .modul-chrome-footer *::before, .modul-chrome-footer *::after { box-sizing: border-box; }

#modul-site-header {
  --modul-admin-offset: 0px;
  position: fixed !important;
  top: var(--modul-admin-offset) !important;
  left: 0; right: 0; width: 100%;
  z-index: 9990;
  color: #fff;
  background: rgba(12, 23, 42, .975);
  border-bottom: 1px solid rgba(171, 201, 249, .14);
  box-shadow: 0 8px 34px rgba(5, 14, 29, .16);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  line-height: 1.4;
}
body.admin-bar #modul-site-header { --modul-admin-offset: 32px; }
@media (max-width: 782px) { body.admin-bar #modul-site-header { --modul-admin-offset: 46px; } }

#modul-site-header a { color: inherit; text-decoration: none; }
#modul-site-header a:focus-visible, #modul-site-header summary:focus-visible,
#modul-site-header button:focus-visible,
#modul-site-footer a:focus-visible { outline: 3px solid #88b7ff; outline-offset: 4px; border-radius: 4px; }
#modul-site-header .modul-chrome-header__inner {
  max-width: 1240px;
  min-height: 76px;
  padding: 12px 28px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 26px;
}
.modul-chrome-brand { display: flex; align-items: center; gap: 11px; flex: 0 0 auto; }
.modul-chrome-brand__image {
  display: block; flex: 0 0 auto; width: 48px; height: 44px;
  object-fit: contain; border-radius: 6px; background: #fff;
}
.modul-chrome-brand__name { display: block; font-size: 21px; font-weight: 800; letter-spacing: .09em; line-height: 1.05; color: #fff; }
.modul-chrome-brand__name small { display: block; margin-top: 6px; font-size: 9px; line-height: 1.15; font-weight: 600; letter-spacing: .065em; color: #a7b9d4; }
.modul-chrome-desktop-nav { display: flex; align-items: center; justify-content: center; gap: clamp(14px, 2vw, 29px); flex: 1; }
.modul-chrome-desktop-nav > a, .modul-chrome-service-nav > a {
  display: inline-flex; align-items: center; min-height: 42px; white-space: nowrap; font-size: 13px; font-weight: 650; color: #c5d3e9 !important;
  transition: color .18s ease;
}
.modul-chrome-desktop-nav > a:hover, .modul-chrome-service-nav > a:hover,
.modul-chrome-desktop-nav a[aria-current="page"] { color: #fff !important; }
.modul-chrome-desktop-nav a[aria-current="page"] { position: relative; }
.modul-chrome-desktop-nav a[aria-current="page"]::after { content: ''; position: absolute; bottom: 3px; left: 0; right: 0; height: 2px; background: #83aefb; border-radius: 2px; }
/* Hover area includes both the title and arrow; keyboard focus also opens it. */
.modul-chrome-service-nav { display: flex; align-items: center; position: relative; gap: 2px; }
#modul-site-header .modul-chrome-service-toggle {
  appearance: none; border: 0; background: transparent; padding: 0;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; width: 26px; min-height: 40px; color: #a5b9d8;
}
.modul-chrome-service-toggle svg { display: block; width: 15px; height: 15px; transition: transform .18s ease; }
.modul-chrome-service-nav:hover .modul-chrome-service-toggle svg,
.modul-chrome-service-nav:focus-within .modul-chrome-service-toggle svg,
.modul-chrome-service-nav.is-open .modul-chrome-service-toggle svg { transform: rotate(180deg); }
.modul-chrome-mobile-menu > summary::-webkit-details-marker { display: none; }
.modul-chrome-submenu {
  position: absolute; left: -20px; top: 100%; width: 285px;
  display: grid; gap: 1px; padding: 23px 10px 10px; border-radius: 14px;
  background: #142741; border: 1px solid #2d486f; box-shadow: 0 20px 50px rgba(0,0,0,.26);
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(6px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
/* Top padding spans the cursor's travel from nav to menu: no hover gap. */
.modul-chrome-service-nav:hover .modul-chrome-submenu,
.modul-chrome-service-nav:focus-within .modul-chrome-submenu,
.modul-chrome-service-nav.is-open .modul-chrome-submenu {
  opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0);
}
#modul-site-header .modul-chrome-submenu a { display: block; padding: 11px 12px; border-radius: 8px; font-size: 13px; line-height: 1.4; color: #d4e2f6; }
#modul-site-header .modul-chrome-submenu a:hover { background: #274670; color: #fff; }
.modul-chrome-header__actions { display: flex; align-items: center; gap: 12px; }
#modul-site-header .modul-chrome-header__cta {
  display: inline-flex; justify-content: center; align-items: center; gap: 10px;
  min-height: 43px; padding: 11px 18px; border-radius: 9px; white-space: nowrap;
  background: #fff; color: #132742 !important; font-size: 13px; font-weight: 750;
  transition: background .18s ease, transform .18s ease;
}
#modul-site-header .modul-chrome-header__cta:hover { background: #e5efff; transform: translateY(-1px); }
.modul-chrome-header__cta span { font-size: 18px; line-height: 1; }
.modul-chrome-mobile-menu { display: none; position: relative; }

/* Footer: same night-blue palette as the page hero blocks. */
#modul-site-footer {
  position: relative; width: 100%; margin: 0;
  padding: 76px 0 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  font-size: 14px; line-height: 1.6;
  color: #d0deef; background: #0c172a;
  border-top: 1px solid #274264;
}
#modul-site-footer a { color: #d0deef; text-decoration: none; transition: color .18s ease; }
#modul-site-footer a:hover { color: #fff; }
#modul-site-footer .modul-chrome-footer__inner { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }
.modul-chrome-footer__top { display: grid; grid-template-columns: 1.55fr .8fr 1.1fr 1fr; gap: clamp(24px,3.6vw,55px); padding-bottom: 70px; }
#modul-site-footer .modul-chrome-footer__logo {
  display: inline-flex; align-items: center; gap: 14px;
  font-size: 31px; font-weight: 850; letter-spacing: .08em; line-height: 1.1; color: #fff;
}
#modul-site-footer .modul-chrome-footer__logo > img {
  display: block; flex: 0 0 auto; width: 60px; height: 55px;
  object-fit: contain; border-radius: 7px; background: #fff;
}
#modul-site-footer .modul-chrome-footer__wordmark { color: #fff; }
#modul-site-footer .modul-chrome-footer__wordmark > span { color: #77a7ff; }
.modul-chrome-footer__about p { max-width: 295px; margin: 24px 0 26px; color: #a1b4ce; font-size: 14px; line-height: 1.7; }
#modul-site-footer .modul-chrome-footer__mail { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 680; color: #d8e7ff; overflow-wrap: anywhere; }
.modul-chrome-footer__column { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
#modul-site-footer .modul-chrome-footer__column h2 { margin: 5px 0 10px; font-family: inherit; font-size: 13px; font-weight: 760; line-height: 1.3; letter-spacing: .08em; text-transform: uppercase; color: #fff; }
#modul-site-footer .modul-chrome-footer__column a { font-size: 13px; line-height: 1.45; color: #aabed8; }
#modul-site-footer .modul-chrome-footer__column p { margin: 0; font-size: 13px; line-height: 1.65; color: #aabed8; }
#modul-site-footer .modul-chrome-footer__column a:hover { color: #fff; }
#modul-site-footer .modul-chrome-footer__column .modul-chrome-footer__contacts-link { color: #9ac0ff; margin-top: 8px; font-weight: 750; }
.modul-chrome-footer__bottom { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 24px 0 30px; border-top: 1px solid rgba(177, 203, 245, .16); color: #879ebd; font-size: 12px; }
#modul-site-footer .modul-chrome-footer__bottom a { color: #a4b8d3; }

@media (max-width: 1020px) {
  :root { --modul-header-height: 68px; }
  #modul-site-header .modul-chrome-header__inner { min-height: 68px; padding: 10px 22px; }
  .modul-chrome-desktop-nav { gap: 14px; }
  .modul-chrome-desktop-nav > a, .modul-chrome-service-nav > a { font-size: 12px; }
  #modul-site-header .modul-chrome-header__cta { padding: 11px 13px; font-size: 12px; }
  .modul-chrome-footer__top { grid-template-columns: 1.2fr 1fr 1fr; }
  .modul-chrome-footer__about { grid-column: 1 / -1; }
  .modul-chrome-footer__about p { max-width: 620px; }
}
@media (max-width: 820px) {
  :root { --modul-header-height: 66px; }
  #modul-site-header .modul-chrome-header__inner { min-height: 66px; padding: 10px 18px; }
  .modul-chrome-desktop-nav { display: none; }
  .modul-chrome-mobile-menu { display: block; }
  .modul-chrome-mobile-menu > summary {
    width: 42px; height: 42px; display: flex; align-items: center; justify-content: center;
    list-style: none; border: 1px solid rgba(186,213,248,.30); border-radius: 10px; cursor: pointer;
    color: #fff; background: rgba(255,255,255,.035);
  }
  .modul-chrome-hamburger { display: flex; flex-direction: column; gap: 4px; width: 18px; }
  .modul-chrome-hamburger i { display: block; height: 2px; width: 100%; background: currentColor; border-radius: 2px; }
  .modul-chrome-mobile-panel {
    position: absolute; right: -18px; top: calc(100% + 12px); z-index: 10;
    width: min(370px, calc(100vw - 20px)); max-height: calc(100dvh - var(--modul-header-height) - var(--modul-admin-offset, 0px) - 12px);
    overflow-y: auto; overscroll-behavior: contain;
    background: #142741; border: 1px solid #2d486f; border-radius: 0 0 15px 15px;
    box-shadow: 0 22px 50px rgba(0,0,0,.28); padding: 13px; display: flex; flex-direction: column;
  }
  #modul-site-header .modul-chrome-mobile-panel a { padding: 11px 12px; border-radius: 9px; font-size: 14px; line-height: 1.4; font-weight: 550; color: #dbe7fa; }
  #modul-site-header .modul-chrome-mobile-panel a:hover { background: #25446e; color: #fff; }
  #modul-site-header .modul-chrome-mobile-panel__child { padding-left: 24px; color: #a9c0e0; font-size: 13px; }
  .modul-chrome-mobile-panel__label { padding: 12px 12px 5px; color: #8fa9cb; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; font-weight: 760; }
  #modul-site-header .modul-chrome-mobile-panel .modul-chrome-mobile-panel__mail { margin-top: 7px; padding: 13px 14px; color: #10213b; background: #fff; text-align: center; font-weight: 760; }
}
@media (max-width: 600px) {
  #modul-site-header .modul-chrome-header__cta { display: none; }
  .modul-chrome-footer__top { grid-template-columns: 1fr 1fr; gap: 34px 26px; padding-bottom: 46px; }
  .modul-chrome-footer__about { grid-column: 1 / -1; }
  #modul-site-footer { padding-top: 56px; }
  .modul-chrome-footer__bottom { flex-direction: column; align-items: flex-start; gap: 12px; }
}
@media (max-width: 410px) {
  #modul-site-header .modul-chrome-header__inner { padding: 9px 15px; }
  .modul-chrome-brand__image { width: 36px; height: 33px; }
  .modul-chrome-brand__name { font-size: 19px; }
  .modul-chrome-mobile-panel { right: -15px; }
  #modul-site-footer .modul-chrome-footer__inner { width: calc(100% - 34px); }
  .modul-chrome-footer__top { grid-template-columns: 1fr; gap: 30px; }
  .modul-chrome-footer__about { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
  #modul-site-header a, #modul-site-footer a, .modul-chrome-service-toggle svg { transition: none !important; }
}
