/* Lucis core: site header, navigation (with sub-menus), search, social icons and footer.
   Everything is driven by CSS variables so themes and the Header & footer screen can restyle it. */

/* ---------- Social icons ---------- */
.social-icons { list-style: none; display: flex; flex-wrap: wrap; gap: .45rem; margin: 0; padding: 0; align-items: center; }
.social-icons a { display: inline-flex; align-items: center; justify-content: center; width: var(--si-size, 34px); height: var(--si-size, 34px); color: inherit; text-decoration: none; border-radius: 50%; transition: background-color .2s, color .2s, border-color .2s, transform .2s; }
.social-icons a:hover { transform: translateY(-2px); }
.si-plain a:hover { color: var(--lc-primary, #2563eb); }
.si-circle a { border: 1.5px solid currentColor; opacity: .85; }
.si-circle a:hover { background: var(--lc-primary, #2563eb); border-color: var(--lc-primary, #2563eb); color: var(--lc-primary-contrast, #fff); opacity: 1; }
.si-filled a { background: var(--lc-primary, #2563eb); color: var(--lc-primary-contrast, #fff); }
.si-filled a:hover { filter: brightness(1.12); }
.si-svg { display: block; flex: none; }

/* ---------- Header ---------- */
.site-header { background: var(--lc-header-bg, #fff); color: var(--lc-header-text, #111827); z-index: 50; position: relative; }
.site-header.hdr-sticky { position: sticky; top: 0; }
.site-header.hdr-border { border-bottom: 1px solid var(--lc-border, #e5e7eb); }
.site-header.hdr-shadow { box-shadow: 0 2px 14px rgba(0, 0, 0, .08); }
.hdr-wide { width: 100%; padding: 0 var(--lc-gutter, 20px); }
.hdr-inner { display: grid; align-items: center; column-gap: 1.5rem; min-height: var(--hdr-h, 76px); }
.hdr-drawer { display: contents; }
.hdr-logo { grid-area: logo; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.hdr-nav { grid-area: nav; display: flex; min-width: 0; }
.hdr-actions { grid-area: actions; display: flex; align-items: center; gap: 1rem; justify-content: flex-end; }
.nav-toggle { grid-area: toggle; }
.hdr-mobile-actions { grid-area: macts; display: none; align-items: center; gap: .3rem; }

.brand { color: inherit; text-decoration: none; font-weight: 700; font-size: 1.25rem; display: inline-flex; align-items: center; gap: .6rem; }
.brand-logo { display: block; height: var(--hdr-logo-h, 42px); width: auto; max-width: 100%; }
.brand-tagline { font-size: .78rem; opacity: .65; line-height: 1.2; margin-top: 2px; }

/* Layout variants: logo position x menu position */
.hdr-menu-inline.hdr-logo-left .hdr-inner { grid-template-columns: auto 1fr auto; grid-template-areas: "logo nav actions"; }
.hdr-menu-inline.hdr-logo-right .hdr-inner { grid-template-columns: 1fr auto auto; grid-template-areas: "nav actions logo"; }
.hdr-menu-inline.hdr-logo-center .hdr-inner { grid-template-columns: 1fr auto 1fr; grid-template-areas: "nav logo actions"; }
.hdr-menu-below .hdr-inner { min-height: 0; row-gap: .2rem; }
.hdr-menu-below.hdr-logo-left .hdr-inner { grid-template-columns: 1fr auto; grid-template-areas: "logo actions" "nav nav"; }
.hdr-menu-below.hdr-logo-right .hdr-inner { grid-template-columns: 1fr auto; grid-template-areas: "actions logo" "nav nav"; }
.hdr-menu-below.hdr-logo-center .hdr-inner { grid-template-columns: 1fr auto 1fr; grid-template-areas: ". logo actions" "nav nav nav"; }
.hdr-menu-below .hdr-logo { padding: .9rem 0 .3rem; }
.hdr-menu-below .hdr-actions { padding-top: .6rem; align-self: start; }
.hdr-logo-center .hdr-logo { align-items: center; text-align: center; }
.hdr-logo-right .hdr-logo { align-items: flex-end; }
.hdr-align-left .hdr-nav { justify-content: flex-start; }
.hdr-align-center .hdr-nav { justify-content: center; }
.hdr-align-right .hdr-nav { justify-content: flex-end; }
.hdr-menu-inline.hdr-logo-center .hdr-nav { justify-content: flex-start; }

/* Menu */
.menu, .sub-menu { list-style: none; margin: 0; padding: 0; }
.menu { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem 1.4rem; }
.menu-item { position: relative; display: flex; align-items: center; }
.menu a { color: inherit; text-decoration: none; font-weight: 500; font-size: var(--hdr-menu-size, 16px); padding: .5em 0; border-bottom: 2px solid transparent; display: block; }
.hdr-upper .menu > .menu-item > a { text-transform: uppercase; letter-spacing: .04em; font-size: calc(var(--hdr-menu-size, 16px) * .88); }
.hdr-mstyle-underline .menu a:hover, .hdr-mstyle-underline .menu .current > a, .hdr-mstyle-underline .menu .current-ancestor > a { border-bottom-color: var(--lc-primary, #2563eb); }
.hdr-mstyle-pill .menu > .menu-item > a { padding: .45em 1em; border-radius: 99px; border: 0; }
.hdr-mstyle-pill .menu > .menu-item > a:hover, .hdr-mstyle-pill .menu > .current > a, .hdr-mstyle-pill .menu > .current-ancestor > a { background: var(--lc-primary, #2563eb); color: var(--lc-primary-contrast, #fff); }
.hdr-mstyle-plain .menu a:hover, .hdr-mstyle-plain .menu .current > a { color: var(--lc-primary, #2563eb); }

/* Sub-menus (desktop dropdown) */
.submenu-toggle { background: none; border: 0; color: inherit; cursor: pointer; padding: .3rem .35rem; margin-left: -.15rem; display: inline-flex; align-items: center; }
.submenu-toggle span { width: .5em; height: .5em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); display: block; transition: transform .2s; }
.sub-menu { position: absolute; left: 0; top: 100%; min-width: 230px; background: var(--lc-header-bg, #fff); color: var(--lc-header-text, #111827); border: 1px solid var(--lc-border, #e5e7eb); border-radius: var(--lc-radius, 8px); box-shadow: 0 12px 30px rgba(0, 0, 0, .14); padding: .4rem 0; z-index: 60; opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .18s, transform .18s, visibility .18s; }
.sub-menu .menu-item { display: flex; }
.sub-menu a { padding: .55em 1.1em; width: 100%; border: 0; font-size: .95em; white-space: nowrap; }
.sub-menu a:hover, .sub-menu .current > a { background: var(--lc-surface, #f3f4f6); color: var(--lc-primary, #2563eb); }
.sub-menu .submenu-toggle { position: absolute; right: .3rem; top: 50%; transform: translateY(-50%) rotate(-90deg); }
.sub-menu .sub-menu { left: 100%; top: -.4rem; }
.menu-item:hover > .sub-menu, .menu-item:focus-within > .sub-menu, .menu-item.is-open > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.menu-item:hover > .submenu-toggle span { transform: rotate(225deg) translateY(2px); }
.hdr-align-right .menu > .menu-item:last-child > .sub-menu, .hdr-menu-inline.hdr-logo-left .menu > .menu-item:nth-last-child(-n+2) > .sub-menu { left: auto; right: 0; }
.sub-menu { display: block; }
.sub-menu .menu-item { position: relative; }
.sub-menu .has-children > a { padding-right: 2.2em; }

/* Actions: search, social, language, call to action */
.hdr-search { position: relative; display: flex; align-items: center; }
.search-toggle, .hdr-search-submit { background: none; border: 0; color: inherit; cursor: pointer; padding: .45rem; display: inline-flex; border-radius: 50%; }
.search-toggle:hover, .hdr-search-submit:hover { color: var(--lc-primary, #2563eb); }
.hdr-search-form { display: flex; align-items: center; }
.hdr-search-form input { font: inherit; border: 0; background: transparent; color: inherit; padding: .4em .5em; min-width: 0; }
.hdr-search-form input:focus { outline: none; }
.hdr-search-inline .hdr-search-form { border: 1px solid var(--lc-border, #d1d5db); border-radius: 99px; padding-left: .8rem; }
.hdr-search-inline input { width: 9.5rem; }
.hdr-search:not(.hdr-search-inline) .hdr-search-form { position: absolute; right: 0; top: calc(100% + 12px); background: var(--lc-header-bg, #fff); border: 1px solid var(--lc-border, #e5e7eb); border-radius: var(--lc-radius, 8px); box-shadow: 0 12px 30px rgba(0, 0, 0, .14); padding: .3rem .3rem .3rem .8rem; width: 280px; opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .18s, transform .18s, visibility .18s; z-index: 60; }
.hdr-search:not(.hdr-search-inline) .hdr-search-form input { flex: 1; }
.hdr-search.is-open .hdr-search-form { opacity: 1; visibility: visible; transform: none; }
.hdr-social { gap: .3rem; }
.lang-switcher { list-style: none; display: flex; gap: .5rem; margin: 0; padding: 0; font-size: .85rem; font-weight: 600; }
.hdr-actions .lang-switcher { padding-left: 1rem; border-left: 1px solid var(--lc-border, #e5e7eb); }
.lang-switcher a { color: inherit; text-decoration: none; opacity: .65; }
.lang-switcher a:hover, .lang-switcher .current span { opacity: 1; }
.hdr-cta { display: inline-block; text-decoration: none; font-weight: 600; padding: .6em 1.3em; border-radius: var(--lc-radius, 8px); border: 2px solid var(--lc-primary, #2563eb); white-space: nowrap; transition: filter .2s, background-color .2s, color .2s; }
.hdr-cta-solid { background: var(--lc-primary, #2563eb); color: var(--lc-primary-contrast, #fff); }
.hdr-cta-solid:hover { filter: brightness(1.1); }
.hdr-cta-outline { color: var(--lc-primary, #2563eb); background: transparent; }
.hdr-cta-outline:hover { background: var(--lc-primary, #2563eb); color: var(--lc-primary-contrast, #fff); }

/* Top bar */
.hdr-topbar { background: var(--lc-primary, #2563eb); color: var(--lc-primary-contrast, #fff); font-size: .86rem; }
.tb-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 38px; flex-wrap: wrap; }
.tb-left, .tb-right { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.tb-link { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: .4rem; }
.tb-link:hover { text-decoration: underline; }
.hdr-topbar .lang-switcher a, .hdr-topbar .lang-switcher .current span { color: inherit; }
.hdr-topbar .social-icons a { --si-size: 28px; }
.hdr-topbar .social-icons a:hover { color: inherit; opacity: .8; }

/* Footer menus on small screens: the header drawer rules (stacked, with separators) must not apply here */
@media (max-width: 900px) {
    .site-footer .menu { flex-direction: row; flex-wrap: wrap; align-items: center; gap: .25rem 1.2rem; width: auto; }
    .site-footer .menu-item { border-bottom: 0; flex-wrap: nowrap; }
    .site-footer .menu-item > a { flex: none; padding: .35em 0; border: 0; }
    .ftr-bar-menu .menu { justify-content: center; }
    .ftr-cols .menu { flex-direction: column; align-items: flex-start; gap: .1rem; }
}
@media (max-width: 560px) {
    .ftr-bar-inner { gap: .6rem; }
    .ftr-bar .footer-text { font-size: .9rem; line-height: 1.55; }
    .ftr-credit { display: block; margin-top: .15rem; opacity: .85; }
    .ftr-credit .ftr-sep:first-child { display: none; }
}

/* Top bar on small screens: one compact line, no wrapping stack inside the sticky header */
@media (max-width: 700px) {
    .hdr-topbar { font-size: .8rem; line-height: 1.3; }
    .tb-inner { min-height: 0; padding-top: .35rem; padding-bottom: .35rem; gap: .2rem .9rem; justify-content: center; text-align: center; }
    .tb-left { gap: .2rem .9rem; justify-content: center; }
    .tb-left .tb-link:not([href^="tel"]) { display: none; }
    .tb-right .social-icons { display: none; }
    .tb-right:empty { display: none; }
}

/* Mobile toggle */
.nav-toggle { display: none; background: none; border: 0; padding: .6rem; cursor: pointer; color: inherit; }
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after { display: block; width: 24px; height: 2px; background: currentColor; content: ""; position: relative; transition: transform .2s, background-color .2s; }
.nav-toggle-bar::before { position: absolute; top: -7px; } .nav-toggle-bar::after { position: absolute; top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
    .hdr-inner, .hdr-menu-inline.hdr-logo-left .hdr-inner, .hdr-menu-inline.hdr-logo-right .hdr-inner, .hdr-menu-inline.hdr-logo-center .hdr-inner,
    .hdr-menu-below.hdr-logo-left .hdr-inner, .hdr-menu-below.hdr-logo-right .hdr-inner, .hdr-menu-below.hdr-logo-center .hdr-inner { grid-template-columns: 1fr auto; grid-template-areas: "logo toggle"; min-height: 64px; row-gap: 0; }
    .hdr-logo, .hdr-menu-below .hdr-logo { padding: .5rem 0; align-items: flex-start; text-align: left; }
    .brand-logo { height: var(--hdr-logo-hm, 32px); }
    .nav-toggle { display: block; }
    .hdr-main .hdr-inner.hdr-inner:has(> .hdr-mobile-actions) { grid-template-columns: 1fr auto auto; grid-template-areas: "logo macts toggle"; }
    .hdr-mobile-actions { display: flex; }
    .hdr-drawer { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--lc-header-bg, #fff); color: var(--lc-header-text, #111827); padding: .6rem var(--lc-gutter, 20px) 1.4rem; border-bottom: 1px solid var(--lc-border, #e5e7eb); box-shadow: 0 14px 24px rgba(0, 0, 0, .1); max-height: calc(100vh - 80px); overflow-y: auto; flex-direction: column; gap: 1rem; }
    .hdr-drawer.is-open { display: flex; }
    .hdr-nav, .hdr-align-center .hdr-nav, .hdr-align-right .hdr-nav { justify-content: flex-start; }
    .menu { flex-direction: column; align-items: stretch; gap: 0; width: 100%; }
    .menu-item { flex-wrap: wrap; border-bottom: 1px solid var(--lc-border, #e5e7eb); }
    .menu-item > a { flex: 1; padding: .8em 0; }
    .hdr-mstyle-pill .menu > .menu-item > a { border-radius: 0; padding: .8em 0; }
    .hdr-mstyle-pill .menu > .menu-item > a:hover, .hdr-mstyle-pill .menu > .current > a { background: none; color: var(--lc-primary, #2563eb); }
    .submenu-toggle { padding: .8rem; margin: 0; }
    .sub-menu, .sub-menu .sub-menu { position: static; box-shadow: none; border: 0; border-radius: 0; background: transparent; min-width: 0; width: 100%; padding: 0 0 .4rem 1rem; opacity: 1; visibility: visible; transform: none; display: none; }
    .menu-item.is-open > .sub-menu { display: block; }
    .menu-item:hover > .sub-menu { display: none; } .menu-item.is-open:hover > .sub-menu { display: block; }
    .menu-item:focus-within > .sub-menu { display: none; } .menu-item.is-open:focus-within > .sub-menu { display: block; }
    .sub-menu .menu-item { border-bottom: 0; }
    .sub-menu .submenu-toggle { position: static; transform: none; }
    .sub-menu a { padding: .6em 0; white-space: normal; }
    .menu-item.is-open > .submenu-toggle span { transform: rotate(225deg) translateY(2px); }
    .hdr-actions { flex-wrap: wrap; justify-content: flex-start; }
    .hdr-actions .lang-switcher { border: 0; padding-left: 0; }
    .hdr-search { width: 100%; }
    .hdr-search:not(.hdr-search-inline) { flex-wrap: wrap; }
    .hdr-search:not(.hdr-search-inline) .search-toggle { display: none; }
    .hdr-search:not(.hdr-search-inline) .hdr-search-form, .hdr-search-inline .hdr-search-form { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; width: 100%; border: 1px solid var(--lc-border, #d1d5db); border-radius: 99px; padding: .15rem .3rem .15rem .9rem; }
    .hdr-search input, .hdr-search-inline input { flex: 1; width: auto; }
    .hdr-cta { width: 100%; text-align: center; }
    .tb-inner { justify-content: center; text-align: center; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--lc-footer-bg, #111827); color: var(--lc-footer-text, #d1d5db); font-size: .94rem; position: relative; }
.site-footer a { color: var(--ftr-link, var(--lc-footer-text, #d1d5db)); }
.container.ftr-cols, .ftr-cols { display: grid; gap: 2.4rem; padding-top: var(--ftr-pad, 48px); padding-bottom: var(--ftr-pad, 48px); grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); }
.ftr-cols-1 { --cols: 1; } .ftr-cols-2 { --cols: 2; } .ftr-cols-3 { --cols: 3; } .ftr-cols-4 { --cols: 4; }
.ftr-title { color: inherit; font-size: 1.05rem; margin: 0 0 1rem; text-transform: none; font-family: var(--lc-font-heading, inherit); }
.ftr-col p { margin: 0 0 .8em; }
.ftr-col .brand { color: inherit; margin-bottom: .8rem; }
.ftr-col .menu { flex-direction: column; align-items: flex-start; gap: .1rem; }
.ftr-col .menu a { color: var(--ftr-link, inherit); font-weight: 400; font-size: 1em; padding: .25em 0; border: 0; }
.ftr-col .menu a:hover { text-decoration: underline; }
.ftr-col .submenu-toggle { display: none; }
.ftr-col .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; background: none; border: 0; box-shadow: none; padding: 0 0 0 1rem; min-width: 0; }
.ftr-col .menu-item { flex-direction: column; align-items: flex-start; }
.ftr-contact { list-style: none; margin: 0; padding: 0; }
.ftr-contact li { display: flex; gap: .7rem; align-items: flex-start; margin-bottom: .6rem; }
.ftr-contact .si-svg { margin-top: .15rem; opacity: .8; }
.ftr-col .social-icons a { color: inherit; }
.ftr-bar { background: var(--ftr-bar-bg, transparent); border-top: 1px solid rgba(255, 255, 255, .12); }
.ftr-cols + .ftr-bar { }
.container.ftr-bar-inner, .ftr-bar-inner { display: flex; align-items: center; flex-wrap: wrap; gap: .8rem 1.6rem; padding-top: 1.1rem; padding-bottom: 1.1rem; }
.ftr-bar-between { justify-content: space-between; }
.ftr-bar-center { justify-content: center; text-align: center; flex-direction: column; }
.footer-text { margin: 0; }
.ftr-credit { white-space: nowrap; }
.ftr-credit a { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .35); }
.ftr-credit a:hover { border-bottom-color: currentColor; }
.ftr-bar-menu .menu { gap: .2rem 1.2rem; }
.ftr-bar-menu .menu a { color: var(--ftr-link, inherit); font-weight: 400; font-size: 1em; padding: .2em 0; border: 0; }
.ftr-bar .social-icons a { color: inherit; }
.ftr-bar .lang-switcher a, .ftr-bar .lang-switcher .current span { color: inherit; }
.to-top { position: fixed; right: 20px; bottom: 20px; width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; background: var(--lc-primary, #2563eb); color: var(--lc-primary-contrast, #fff); box-shadow: 0 6px 18px rgba(0, 0, 0, .25); display: flex; align-items: center; justify-content: center; z-index: 40; opacity: 0; transform: translateY(10px); transition: opacity .2s, transform .2s; }
.to-top.is-visible { opacity: 1; transform: none; }
.to-top[hidden] { display: none; }
@media (max-width: 900px) { .container.ftr-cols, .ftr-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 1.6rem; } }
@media (max-width: 560px) { .container.ftr-cols, .ftr-cols { grid-template-columns: 1fr; gap: 1.8rem; padding-top: calc(var(--ftr-pad, 48px) * .75); padding-bottom: calc(var(--ftr-pad, 48px) * .75); } .ftr-bar-inner { flex-direction: column; text-align: center; } .ftr-col p { word-break: normal; overflow-wrap: break-word; } }

/* Header actions: keep icons on one line; centred logo stays centred */
.hdr-actions .social-icons { flex-wrap: nowrap; }
.hdr-search-inline .hdr-search-form input { width: 9.5rem; }
.hdr-logo-center .hdr-inner { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
.hdr-logo-center .hdr-actions { flex-wrap: wrap; min-width: 0; }
.hdr-logo-center .hdr-nav { justify-content: center; }
@media (min-width: 901px) { .hdr-menu-inline.hdr-logo-center .hdr-nav { justify-content: flex-start; } }

/* Long contact values (e-mail) must wrap on narrow screens */
.ftr-cols, .ftr-cols > *, .ftr-contact li, .ftr-contact a { min-width: 0; overflow-wrap: anywhere; }

/* Footer pinned to the bottom of the viewport on short pages */
body.footer-stick { min-height: 100vh; display: flex; flex-direction: column; }
body.footer-stick > .site-main { flex: 1 0 auto; min-height: 0; }
body.footer-stick > .site-footer { margin-top: auto; flex-shrink: 0; }
