/* =====================================================================
   BF Legale – Header widget
   Mobile-first. Every colour / size is a CSS variable set by the
   Elementor controls (Stile tab). Prefix: .bfh
   ===================================================================== */
.bfh-root{
  --bfh-h:72px;
  --bfh-maxw:1440px;
  --bfh-pad:clamp(20px,5vw,72px);
  --bfh-bg:rgba(251,250,248,.86);
  --bfh-bg-top:rgba(251,250,248,0);
  --bfh-blur:14px;
  --bfh-line:#D6D0C7;
  --bfh-logo-h:36px;
  --bfh-logo-ratio:5;
  --bfh-logo:#900616;
  --bfh-logo-top:#900616;
  --bfh-logo-open:#FFFFFF;
  --bfh-text:#1F2024;
  --bfh-text-top:#1F2024;
  --bfh-accent:#900616;
  --bfh-gap:clamp(18px,2.1vw,38px);
  --bfh-drop-bg:#FFFFFF;
  --bfh-drop-text:#1F2024;
  --bfh-drop-hover:#F0EDE8;
  --bfh-cta-text:#1F2024;
  --bfh-cta-bg:rgba(255,255,255,0);
  --bfh-cta-border:#1F2024;
  --bfh-cta-hover-bg:#900616;
  --bfh-cta-hover-text:#FFFFFF;
  --bfh-panel-bg:#1F2024;
  --bfh-panel-text:#F3F1ED;
  --bfh-panel-mute:#BABCC2;
  --bfh-panel-accent:#EE8A96;
  --bfh-burger-top:#1F2024;
  --bfh-progress:#900616;
  --bfh-progress-h:2px;
  --bfh-font:"Archivo","Helvetica Neue",Arial,sans-serif;
  --bfh-ease:cubic-bezier(.2,.7,.1,1);
  --bfh-top:var(--wp-admin--admin-bar--height,0px);
  /* live state (switched by classes below) */
  --_text:var(--bfh-text);
  --_logo:var(--bfh-logo);
  --_burger:var(--bfh-text);
  position:relative;
  z-index:9990;
  font-family:var(--bfh-font);
}
@media (min-width:768px){.bfh-root{--bfh-h:76px;--bfh-logo-h:42px}}
@media (min-width:1025px){.bfh-root{--bfh-h:88px;--bfh-logo-h:50px}}

.bfh-root *,.bfh-root *::before,.bfh-root *::after{box-sizing:border-box}
.bfh--transparent:not(.is-solid){--_text:var(--bfh-text-top);--_logo:var(--bfh-logo-top);--_burger:var(--bfh-burger-top)}
.bfh-root.is-open{--_logo:var(--bfh-logo-open);--_burger:var(--bfh-panel-text)}

/* ---------- bar ---------- */
.bfh{position:fixed;top:var(--bfh-top);left:0;right:0;z-index:9991;height:var(--bfh-h);background:var(--bfh-bg);-webkit-backdrop-filter:blur(var(--bfh-blur)) saturate(1.2);backdrop-filter:blur(var(--bfh-blur)) saturate(1.2);box-shadow:0 1px 0 var(--bfh-line);transition:background-color .45s var(--bfh-ease),box-shadow .45s var(--bfh-ease),transform .5s var(--bfh-ease);margin:0}
.bfh--transparent:not(.is-solid) .bfh{background:var(--bfh-bg-top);-webkit-backdrop-filter:none;backdrop-filter:none;box-shadow:none}
.bfh-root.is-open .bfh{background:transparent;-webkit-backdrop-filter:none;backdrop-filter:none;box-shadow:none}
.bfh--smart.is-hidden:not(.is-open) .bfh{transform:translateY(-110%)}
.bfh--static .bfh{position:relative;top:auto}
.bfh--editor .bfh{position:relative;top:auto}
.bfh__spacer{display:none}
.bfh--reserve .bfh__spacer{display:block;height:var(--bfh-h)}
.bfh--editor .bfh__spacer{display:none}

.bfh__inner{display:flex;align-items:center;justify-content:space-between;gap:24px;height:100%;width:100%;max-width:var(--bfh-maxw);margin:0 auto;padding:0 var(--bfh-pad)}

/* ---------- logo ---------- */
.bfh__logo{display:inline-flex;align-items:center;flex:none;color:var(--_logo);text-decoration:none;transition:color .45s var(--bfh-ease);line-height:0}
.bfh__logo__mask{display:block;height:var(--bfh-logo-h);width:calc(var(--bfh-logo-h) * var(--bfh-logo-ratio));background-color:currentColor;-webkit-mask-image:var(--bf-logo-src);mask-image:var(--bf-logo-src);-webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:left center;mask-position:left center}
.bfh__logo__img{display:block;height:var(--bfh-logo-h);width:auto;max-width:none}
.bfh__logo:focus-visible{outline:2px solid var(--bfh-accent);outline-offset:6px}

/* ---------- desktop nav ---------- */
.bfh__nav{display:none;margin-left:auto;height:100%}
.bfh__menu{display:flex;align-items:center;gap:var(--bfh-gap);height:100%;margin:0;padding:0;list-style:none}
.bfh__item{position:relative;display:flex;align-items:center;gap:2px;height:100%;margin:0;padding:0}
.bfh__link{position:relative;display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0;margin:0;background:none;border:0;border-radius:0;font-family:inherit;font-size:.8125rem;font-weight:600;letter-spacing:.14em;line-height:1.2;text-transform:uppercase;text-decoration:none;color:var(--_text);cursor:pointer;transition:color .35s var(--bfh-ease)}
.bfh__link::after{content:"";position:absolute;left:0;right:0;bottom:9px;height:1.5px;background:var(--bfh-accent);transform:scaleX(0);transform-origin:right;transition:transform .45s var(--bfh-ease)}
.bfh__item:hover>.bfh__link::after,.bfh__link:focus-visible::after,.bfh__link[aria-current="page"]::after,.bfh__item.is-current>.bfh__link::after{transform:scaleX(1);transform-origin:left}
.bfh__link:focus-visible,.bfh__caret:focus-visible{outline:2px solid var(--bfh-accent);outline-offset:4px}
.bfh__plus{position:relative;display:inline-block;width:9px;height:9px}
.bfh__plus::before,.bfh__plus::after{content:"";position:absolute;left:0;top:4px;width:9px;height:1.5px;background:currentColor;transition:transform .4s var(--bfh-ease)}
.bfh__plus::after{transform:rotate(90deg)}
.bfh__item:hover .bfh__plus::after,.bfh__item.is-open .bfh__plus::after{transform:rotate(0)}
.bfh__caret{display:inline-grid;place-items:center;width:28px;height:28px;padding:0;margin:0;background:none;border:0;color:var(--_text);cursor:pointer}
.bfh__caret i{display:block;width:7px;height:7px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:translateY(-2px) rotate(45deg);transition:transform .4s var(--bfh-ease)}
.bfh__item.is-open .bfh__caret i{transform:translateY(2px) rotate(-135deg)}

.bfh__sub{position:absolute;top:100%;left:-22px;min-width:290px;padding:10px;background:var(--bfh-drop-bg);box-shadow:0 1px 0 var(--bfh-line),0 28px 60px -26px rgba(31,32,36,.32);opacity:0;visibility:hidden;transform:translateY(10px);transition:opacity .35s var(--bfh-ease),transform .45s var(--bfh-ease),visibility 0s .45s}
.bfh__sub::before{content:"";position:absolute;left:22px;top:0;width:34px;height:2px;background:var(--bfh-accent)}
.bfh__item--sub:hover .bfh__sub,.bfh__item--sub:focus-within .bfh__sub,.bfh__item.is-open .bfh__sub{opacity:1;visibility:visible;transform:none;transition:opacity .35s var(--bfh-ease),transform .45s var(--bfh-ease),visibility 0s}
.bfh__sublink{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:15px 14px;color:var(--bfh-drop-text);text-decoration:none;font-family:inherit;font-size:.95rem;font-weight:600;line-height:1.3;transition:background-color .3s,color .3s,padding .4s var(--bfh-ease)}
.bfh__sublink:hover,.bfh__sublink:focus-visible,.bfh__sublink[aria-current="page"]{background:var(--bfh-drop-hover);color:var(--bfh-accent);padding-left:20px;outline:none}
.bfh__subnum{font-size:.75rem;font-weight:700;letter-spacing:.12em;color:var(--bfh-accent);opacity:.8}

/* ---------- CTA ---------- */
.bfh__cta{position:relative;display:none;align-items:center;gap:12px;flex:none;min-height:46px;padding:0 20px;margin-left:calc(var(--bfh-gap) * .9);border:1.5px solid var(--bfh-cta-border);background:var(--bfh-cta-bg);color:var(--bfh-cta-text);font-family:inherit;font-size:.78rem;font-weight:600;letter-spacing:.12em;line-height:1.2;text-transform:uppercase;text-decoration:none;overflow:hidden;isolation:isolate;transition:color .4s var(--bfh-ease),border-color .4s var(--bfh-ease)}
.bfh__cta::before{content:"";position:absolute;inset:0;z-index:-1;background:var(--bfh-cta-hover-bg);transform:scaleX(0);transform-origin:right;transition:transform .55s var(--bfh-ease)}
.bfh__cta:hover,.bfh__cta:focus-visible{color:var(--bfh-cta-hover-text);border-color:var(--bfh-cta-hover-bg)}
.bfh__cta:hover::before,.bfh__cta:focus-visible::before{transform:scaleX(1);transform-origin:left}
.bfh__cta:focus-visible{outline:2px solid var(--bfh-accent);outline-offset:3px}
.bfh__arr{display:inline-block;transition:transform .45s var(--bfh-ease)}
.bfh__cta:hover .bfh__arr{transform:translateX(5px)}

/* ---------- burger ---------- */
.bfh__burger{display:inline-flex;align-items:center;gap:12px;min-height:48px;margin:0 -4px 0 auto;padding:0 4px;background:none;border:0;border-radius:0;color:var(--_burger);font-family:inherit;font-size:.8125rem;font-weight:600;letter-spacing:.14em;text-transform:uppercase;cursor:pointer;transition:color .4s var(--bfh-ease)}
.bfh__burger:focus-visible{outline:2px solid var(--bfh-accent);outline-offset:3px}
.bfh__burger-lines{position:relative;display:block;width:28px;height:12px}
.bfh__burger-lines::before,.bfh__burger-lines::after{content:"";position:absolute;left:0;right:0;height:2px;background:currentColor;transition:transform .45s var(--bfh-ease),top .45s var(--bfh-ease)}
.bfh__burger-lines::before{top:0}
.bfh__burger-lines::after{top:10px}
.bfh-root.is-open .bfh__burger-lines::before{top:5px;transform:rotate(45deg)}
.bfh-root.is-open .bfh__burger-lines::after{top:5px;transform:rotate(-45deg)}

/* breakpoint switch (chosen in "Menu mobile") */
@media (min-width:1024px){.bfh-bp-1024 .bfh__nav{display:block}.bfh-bp-1024 .bfh__cta{display:inline-flex}.bfh-bp-1024 .bfh__burger{display:none}}
@media (min-width:1100px){.bfh-bp-1100 .bfh__nav{display:block}.bfh-bp-1100 .bfh__cta{display:inline-flex}.bfh-bp-1100 .bfh__burger{display:none}}
@media (min-width:1200px){.bfh-bp-1200 .bfh__nav{display:block}.bfh-bp-1200 .bfh__cta{display:inline-flex}.bfh-bp-1200 .bfh__burger{display:none}}
@media (min-width:1366px){.bfh-bp-1366 .bfh__nav{display:block}.bfh-bp-1366 .bfh__cta{display:inline-flex}.bfh-bp-1366 .bfh__burger{display:none}}

/* ---------- mobile panel ---------- */
.bfh__panel{position:fixed;inset:0;z-index:9989;display:flex;flex-direction:column;justify-content:space-between;gap:36px;padding:calc(var(--bfh-top) + var(--bfh-h) + 26px) var(--bfh-pad) 30px;background:var(--bfh-panel-bg);color:var(--bfh-panel-text);overflow-y:auto;overscroll-behavior:contain;clip-path:inset(0 0 100% 0);transition:clip-path .7s var(--bfh-ease)}
.bfh__panel[hidden]{display:none}
.bfh-root.is-open .bfh__panel{clip-path:inset(0 0 0 0)}
.bfh__pnav{width:100%;max-width:var(--bfh-maxw);margin:0 auto}
.bfh__mlist,.bfh__msub{margin:0;padding:0;list-style:none}
.bfh__mlist>li{overflow:hidden;border-bottom:1px solid rgba(255,255,255,.1)}
.bfh__mlink{display:flex;align-items:baseline;gap:16px;padding:13px 0;color:var(--bfh-panel-text);text-decoration:none;font-family:inherit;font-size:clamp(1.8rem,6.6vw,2.8rem);font-weight:600;line-height:1.1;letter-spacing:-.02em;font-stretch:88%;transform:translateY(105%);transition:transform .75s var(--bfh-ease),color .3s}
.bfh__mlink--group{cursor:default}
.bfh__mlink:hover,.bfh__mlink:focus-visible,.bfh__mlink[aria-current="page"]{color:var(--bfh-panel-accent);outline:none}
.bfh__mnum{flex:none;min-width:1.9em;font-size:.8rem;font-weight:700;letter-spacing:.12em;color:var(--bfh-panel-accent);font-stretch:100%}
.bfh__msub{padding:0 0 12px calc(1.9em + 16px)}
.bfh__msub li{overflow:hidden}
.bfh__mlink--sub{padding:7px 0;font-size:clamp(1.15rem,4.4vw,1.6rem);color:var(--bfh-panel-mute)}
.bfh-root.is-open .bfh__mlink{transform:none}
.bfh-root.is-open .bfh__mlist>li:nth-child(2) .bfh__mlink{transition-delay:.05s}
.bfh-root.is-open .bfh__mlist>li:nth-child(3) .bfh__mlink{transition-delay:.1s}
.bfh-root.is-open .bfh__mlist>li:nth-child(4) .bfh__mlink{transition-delay:.15s}
.bfh-root.is-open .bfh__mlist>li:nth-child(5) .bfh__mlink{transition-delay:.2s}
.bfh-root.is-open .bfh__mlist>li:nth-child(6) .bfh__mlink{transition-delay:.25s}
.bfh-root.is-open .bfh__mlist>li:nth-child(7) .bfh__mlink{transition-delay:.3s}
.bfh-root.is-open .bfh__mlist>li:nth-child(n+8) .bfh__mlink{transition-delay:.35s}

.bfh__pfoot{display:grid;gap:22px;width:100%;max-width:var(--bfh-maxw);margin:0 auto;opacity:0;transform:translateY(16px);transition:opacity .6s var(--bfh-ease) .25s,transform .6s var(--bfh-ease) .25s}
.bfh-root.is-open .bfh__pfoot{opacity:1;transform:none}
.bfh__mcta{display:flex;align-items:center;justify-content:space-between;min-height:56px;padding:0 22px;background:var(--bfh-panel-text);color:var(--bfh-panel-bg);text-decoration:none;font-family:inherit;font-size:.875rem;font-weight:700;letter-spacing:.12em;text-transform:uppercase}
.bfh__mcta:focus-visible{outline:2px solid var(--bfh-panel-accent);outline-offset:3px}
.bfh__pcontacts{display:grid;grid-template-columns:1fr;gap:14px}
.bfh__pcontacts a{display:block;color:var(--bfh-panel-text);text-decoration:none;font-size:1.15rem;font-weight:600;line-height:1.35;word-break:break-word}
.bfh__pcontacts a:hover{color:var(--bfh-panel-accent)}
.bfh__pcontacts small,.bfh__poffices strong{display:block;margin-bottom:4px;font-size:.75rem;font-weight:700;letter-spacing:.16em;text-transform:uppercase;color:var(--bfh-panel-accent)}
.bfh__poffices{display:grid;gap:14px}
.bfh__poffices p{margin:0;font-size:.95rem;line-height:1.55;color:var(--bfh-panel-mute)}
@media (min-width:600px){.bfh__pcontacts,.bfh__poffices{grid-template-columns:1fr 1fr;gap:18px 28px}}

/* ---------- reading progress ---------- */
.bfh__progress{position:absolute;left:0;right:0;bottom:0;height:var(--bfh-progress-h);pointer-events:none;overflow:hidden}
.bfh__progress span{display:block;height:100%;background:var(--bfh-progress);transform:scaleX(var(--bfh-p,0));transform-origin:left}
.bfh-root.is-open .bfh__progress{opacity:0}

html.bfh-lock,html.bfh-lock body{overflow:hidden}

@media (prefers-reduced-motion:reduce){
  .bfh-root *,.bfh-root *::before,.bfh-root *::after{transition-duration:.01ms!important;transition-delay:0s!important}
}
