/* Shared template header behavior and language controls. Loaded with runtime header. */
/* The shared footer owns open/closed state at every breakpoint. */
#mxd-footer .footer-dropdown > .footer-submenu {display:none!important;list-style:none;padding-left:1.5rem;margin-top:1rem;}
#mxd-footer .footer-dropdown.is-open > .footer-submenu {display:block!important;}
#mxd-footer .footer-dropdown > span[role="button"] {cursor:pointer;}
#mxd-footer .footer-dropdown > span[role="button"]:focus-visible {outline:2px solid currentColor;outline-offset:5px;}
#mxd-footer .footer-dropdown > span > svg {display:inline-block!important;transition:transform .2s ease;}
#mxd-footer .footer-dropdown.is-open > span > svg {transform:rotate(180deg);}
#header.mxd-header {max-width:calc(100vw - 11.6rem)}
#header .mxd-logo__image {width:13rem;height:auto}
#header .mxd-header__controls {display:flex;align-items:center;gap:1rem}
#header .bd-lang-inline,.mxd-nav__wrap .bd-lang-menu {display:inline-flex;align-items:stretch;gap:0;padding:0;overflow:hidden;border-radius:999px;height:4.6rem;line-height:1;vertical-align:middle}
#header .bd-lang-inline {border:1.5px solid rgba(255,255,255,.4);background:transparent;margin:0 1.2rem 0 0}
#header .bd-lang-inline a,.mxd-nav__wrap .bd-lang-menu a {display:inline-flex;align-items:center;justify-content:center;min-width:4.6rem;padding:0 1.6rem;font-size:1.4rem;font-weight:600;line-height:1;text-decoration:none;letter-spacing:.05em}
#header .bd-lang-inline a {color:#fff;background:transparent}
#header .bd-lang-inline a.active {color:#161616;background:#fff}
.mxd-nav__wrap .main-menu__accordion > .bd-menu-language {display:block;margin:0 0 2.4rem;padding:0;line-height:1}
.mxd-nav__wrap .main-menu__accordion > .bd-menu-language .bd-lang-menu {margin:0!important;background:#161616!important;border:1.5px solid #DAF561!important}
.mxd-nav__wrap .bd-lang-menu a {background:transparent!important;color:#fff!important}
.mxd-nav__wrap .bd-lang-menu a.active {background:#DAF561!important;color:#161616!important}
.mxd-nav__wrap .bd-lang-menu a:hover:not(.active) {background:rgba(218,245,97,.18)!important;color:#DAF561!important}
.mxd-nav__wrap .bd-lang-menu a:focus-visible,#header .bd-lang-inline a:focus-visible {outline:2px solid currentColor;outline-offset:-4px}
body:has(.mxd-nav__hamburger.nav-open) #header {visibility:hidden;pointer-events:none}
@media(min-width:768px){#header.mxd-header {max-width:calc(100vw - 19.6rem)}#header .bd-lang-inline {height:5rem}}
@media(max-width:991px){#header .mxd-header__controls > a.btn-outline,#header .mxd-header__controls > .bd-lang-inline {display:none!important}}
@media(max-width:767px){#header .mxd-logo__image {width:10rem}.mxd-nav__wrap .main-menu__accordion > .bd-menu-language {margin-bottom:2rem}}
/* A short desktop viewport must not clip the last menu destinations. */
@media(min-width:1200px) and (max-height:850px) {
  .mxd-nav__wrap .mxd-menu__inner {min-height:0;padding-bottom:7.2rem;}
  .mxd-nav__wrap .mxd-menu__left {min-height:0;overflow-y:auto;padding-top:2.4rem;}
  .mxd-nav__wrap .mxd-menu__caption {font-size:1.8rem;line-height:1.4;margin-bottom:2rem;}
  .mxd-nav__wrap .main-menu__accordion {gap:.8rem;}
  .mxd-nav__wrap .main-menu__accordion > .bd-menu-language {margin-bottom:1.2rem;}
  .mxd-nav__wrap .main-menu__link {font-size:3.4rem;height:4.2rem;line-height:4.2rem;}
  .mxd-nav__wrap .main-menu__link .btn-caption {height:4.2rem;line-height:4.2rem;}
}
@media(max-width:1199px) {
  .mxd-nav__wrap .mxd-menu__inner {min-height:0;overflow-y:auto;overscroll-behavior-y:contain;}
  .mxd-nav__wrap .mxd-menu__left {flex-shrink:0;}
}
/* Desktop menu, owner's mock-up (30.10.2026): greeting top right, the ball under it, rights line bottom right */
.mxd-nav__wrap .bd-menu-hello,.mxd-nav__wrap .bd-menu-rights__text {display:none}
@media (min-width:1200px) {
  .mxd-nav__wrap .mxd-menu__caption,.mxd-nav__wrap .menu-promo__content,.mxd-nav__wrap .bd-menu-made {display:none}
  .mxd-nav__wrap .bd-menu-hello {display:flex;flex-direction:column;align-items:flex-end;gap:2.4rem;height:100%;padding:clamp(6rem,11vh,10.4rem) 0 6rem}
  html body .mxd-nav__wrap p.bd-menu-hello__title {margin:0;font-family:"Unbounded",sans-serif!important;font-weight:600;font-size:clamp(2.8rem,2.1vw,4rem);line-height:1.05;letter-spacing:-.01em;text-align:right;color:var(--t-opp-bright)}
  .mxd-nav__wrap .bd-menu-hello__ball {flex:1 1 0;min-height:0;width:100%;max-height:56rem;align-self:center;object-fit:contain;object-position:center}
  .mxd-nav__wrap .mxd-menu__data {justify-content:flex-end;bottom:9.6rem}
  html body .mxd-nav__wrap .bd-menu-rights__text {display:inline;margin-right:.8rem;font-family:"Unbounded",sans-serif!important;font-weight:600;font-size:1.5rem;color:var(--t-opp-bright)}
  html[lang|="en"] body .mxd-nav__wrap p.bd-menu-hello__title,html[lang|="en"] body .mxd-nav__wrap .bd-menu-rights__text {font-family:Syne,sans-serif!important;font-weight:700}
}
/* Desktop menu: language pill on its own at the top, the list centred in the white panel (owner, 01.11.2026) */
@media (min-width:1200px) {
  .mxd-nav__wrap .mxd-menu__inner {padding-bottom:0}
  .mxd-nav__wrap .mxd-menu__left {display:flex;flex-direction:column;padding-top:clamp(6rem,11vh,10.4rem);padding-bottom:clamp(6rem,11vh,10.4rem)}
  .mxd-nav__wrap .mxd-menu__left > .main-menu,.mxd-nav__wrap .main-menu__content {flex:1 0 auto;display:flex;flex-direction:column}
  .mxd-nav__wrap #main-menu {flex:1 0 auto;padding-bottom:7rem}
  .mxd-nav__wrap #main-menu > .bd-menu-language {margin:0 0 2.4rem}
  .mxd-nav__wrap #main-menu > .bd-menu-language + .main-menu__item {margin-top:auto}
  .mxd-nav__wrap #main-menu > .main-menu__item:last-child {margin-bottom:auto}
  .mxd-nav__wrap .bd-menu-hello {padding-bottom:15rem}
}
/* Typography contract (owner, 01.11.2026): long text in page content 20px, descriptions under titles 22px (phones 18/19px) */
html body #mxd-page-content p.t-small {font-size:clamp(1.8rem,1.5rem + .4vw,2rem)}
html body #mxd-page-content .bd-blog-discovery__intro,html body #mxd-page-content .mxd-section-title__hrdescr,html body #mxd-page-content .mxd-project__subtitle {font-size:clamp(1.9rem,1.4rem + .6vw,2.2rem)}
/* Preserve icon glyphs against page-level Bulgarian text-family selectors. */
html body [class~="ph"],html body [class~="ph"]::before,html body [class~="ph"]::after{font-family:"Phosphor"!important}
html body [class~="ph-bold"],html body [class~="ph-bold"]::before,html body [class~="ph-bold"]::after{font-family:"Phosphor-Bold"!important}
html body [class~="ph-fill"],html body [class~="ph-fill"]::before,html body [class~="ph-fill"]::after{font-family:"Phosphor-Fill"!important}
html body [class~="ph-light"],html body [class~="ph-light"]::before,html body [class~="ph-light"]::after{font-family:"Phosphor-Light"!important}
html body [class~="ph-thin"],html body [class~="ph-thin"]::before,html body [class~="ph-thin"]::after{font-family:"Phosphor-Thin"!important}
html body [class~="ph-duotone"],html body [class~="ph-duotone"]::before,html body [class~="ph-duotone"]::after{font-family:"Phosphor-Duotone"!important}

/* One layout contract for email links, independent of page/language typography. */
html body a[href^="mailto:"] {
  min-width:0;
  max-width:100%;
  overflow-wrap:anywhere;
  word-break:normal;
  white-space:normal;
}
/* Headline email: one readable line within the heading column (EN/BG). */
html body a.btn-line-headline[href^="mailto:"] {
  display:inline-flex;
  min-width:0;
  max-width:100%;
  height:auto;
  align-items:center;
  gap:.35em;
  font-size:clamp(1.6rem,3.2vw,5.2rem)!important;
  white-space:nowrap;
}
html body a.btn-line-headline[href^="mailto:"] > .btn-caption {
  display:block;
  flex:0 1 auto;
  min-width:0;
  max-width:100%;
  height:auto;
  font-size:inherit!important;
  overflow-wrap:normal;
  word-break:normal;
  white-space:nowrap;
  line-height:1.15;
}
html body a.btn-line-headline[href^="mailto:"] > i {
  flex:0 0 auto;
  font-size:.85em!important;
  line-height:1;
}
/* Keep the already smaller dedicated Contact-page treatment. */
html body.bd-main-refresh[data-bd-page="contact"] a.btn-line-headline[href^="mailto:"] {
  font-size:clamp(1.6rem,2vw,2.8rem)!important;
}
html body .mxd-point-subtitle:has(> a[href^="mailto:"]) {min-width:0;max-width:100%;}
html body .mxd-point-subtitle > a[href^="mailto:"] {min-width:0;flex:1 1 auto;}
html body .mxd-point-subtitle:has(> a[href^="mailto:"]) > svg {flex:0 0 1.9rem;}

/* B2A Brand owns the third-level creative services in both site menus. */
.bd-service-parent{display:flex;align-items:center;justify-content:space-between;gap:1.2rem;}
.bd-service-parent > a{flex:1 1 auto;min-width:0;}
.bd-service-toggle{display:inline-flex;align-items:center;justify-content:center;flex:0 0 3.2rem;width:3.2rem;height:3.2rem;padding:.4rem;border:0;background:transparent;color:inherit;cursor:pointer;}
.bd-service-toggle svg{display:block;flex:none;width:1.6rem;height:1.6rem;transition:transform .2s ease;}
.bd-service-toggle[aria-expanded="true"] svg{transform:rotate(45deg);}
.bd-service-toggle:focus-visible{outline:2px solid currentColor;outline-offset:2px;}
.bd-service-submenu{list-style:none;margin:1rem 0 .4rem;padding-left:1.5rem;}
.bd-service-submenu[hidden]{display:none!important;}
.bd-service-submenu:not([hidden]){display:block;}
.bd-service-submenu > li{margin:0 0 .8rem;}
.bd-service-submenu > li:last-child{margin-bottom:0;}

/* Keyboard equivalent of the existing submenu plus control. */
.bd-menu-section-toggle{display:inline-flex;align-items:center;justify-content:center;flex:0 0 4.4rem;width:4.4rem;height:4.4rem;border:0;padding:1.2rem;background:transparent;color:inherit;cursor:pointer;}
.bd-menu-section-toggle svg{display:block;flex:none;}
.bd-menu-section-toggle:focus-visible{outline:2px solid currentColor;outline-offset:2px;}

/* Site typography contract: Syne / Unbounded headings, Inter body copy. */
@font-face{font-family:Inter;font-style:normal;font-weight:400 700;font-display:swap;src:url(/fonts/inter-cyrillic-ext.woff2) format('woff2');unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}
@font-face{font-family:Inter;font-style:normal;font-weight:400 700;font-display:swap;src:url(/fonts/inter-cyrillic.woff2) format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:Inter;font-style:normal;font-weight:400 700;font-display:swap;src:url(/fonts/inter-latin-ext.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:Inter;font-style:normal;font-weight:400 700;font-display:swap;src:url(/fonts/inter-latin.woff2) 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}
html body,
html body p,html body p :is(a,span,strong,em,b),
html body li,html body li :is(a,span,strong,em,b),
html body dd,html body dt,html body td,html body th,
html body blockquote,html body figcaption {font-family:Inter!important}
html[lang|="en"] body :is(h1,h2,h3,h4,h5,h6),
html[lang|="en"] body :is(h1,h2,h3,h4,h5,h6) :is(span,strong,em,b) {font-family:Syne!important}
html[lang|="bg"] body :is(h1,h2,h3,h4,h5,h6),
html[lang|="bg"] body :is(h1,h2,h3,h4,h5,h6) :is(span,strong,em,b) {font-family:Unbounded!important}

/* Contact button as an arrow circle (26.10.2026). */
html body #header .mxd-header__controls a.bd-contact-arrow{width:56px;height:56px;min-width:56px;padding:0;justify-content:center;border-radius:50%}
html body #header .mxd-header__controls a.bd-contact-arrow i{margin:0}
/* AI Support Live (28.10.2026): the header button opens the site chat; the same live dot and block on the home page and /expert-ai-agent. */
html body #header .mxd-header__controls .bd-ai-support{display:inline-flex;align-items:center;gap:.8rem;height:48px;padding:0 1.8rem;border:1px solid #daf561;border-radius:100px;background:transparent;color:#fff;font-family:inherit;font-size:1.5rem;font-weight:600;line-height:1;white-space:nowrap;cursor:pointer;transition:background-color .2s,color .2s}
html body #header .mxd-header__controls .bd-ai-support:hover,html body #header .mxd-header__controls .bd-ai-support:focus-visible{background:#daf561;color:#151515}
.bd-ai-support__dot{position:relative;display:inline-block;flex:0 0 8px;width:8px;height:8px;border-radius:50%;background:#3ddc84}
.bd-ai-support__dot::after{content:"";position:absolute;inset:0;border-radius:50%;background:inherit;animation:bd-ai-live 1.8s ease-out infinite}
@keyframes bd-ai-live{0%{transform:scale(1);opacity:.7}100%{transform:scale(2.6);opacity:0}}
@media(prefers-reduced-motion:reduce){.bd-ai-support__dot::after{animation:none}}
@media(max-width:767px){html body #header .mxd-header__controls .bd-ai-support{height:40px;gap:.6rem;padding:0 1.2rem;font-size:1.3rem}}
@media(max-width:374px){html body #header .mxd-header__controls .bd-ai-support{padding:0 1rem;font-size:1.2rem}}
.bd-ai-live{max-width:820px;margin:0 0 3.2rem}
.bd-ai-live__eyebrow{display:flex;align-items:center;gap:1rem;margin:0 0 1.2rem;color:#daf561;font-size:clamp(1.3rem,1.2vw,1.5rem);font-weight:600;letter-spacing:.08em;text-transform:uppercase}
.bd-ai-live__text{margin:0 0 2rem;color:rgba(245,243,236,.9);font-size:clamp(1.8rem,1.6vw,2.4rem);line-height:1.4}
/* Main menu (owner, 30.10.2026): every item fits on the screen, at a size that reads as a menu, not a headline.
   The row height follows the font, so the theme's hover roll keeps its geometry. */
.mxd-nav__wrap {--bd-menu-row:calc(clamp(2.2rem,2.9vh,3.2rem) * 1.25);}
.mxd-nav__wrap .main-menu__link {font-size:clamp(2.2rem,2.9vh,3.2rem);height:1.25em;line-height:1.25em;}
.mxd-nav__wrap .main-menu__link .btn-caption {height:1.25em;line-height:1.25em;}
/* the "+" keeps its 44px touch area, but the row keeps the height of the plain rows */
.mxd-nav__wrap .main-menu__toggle .bd-menu-section-toggle {margin-block:min(0px, calc((var(--bd-menu-row) - 4.4rem) / 2));}
/* Submenus: each level a step smaller than the one above it (owner, 30.10.2026) */
.mxd-nav__wrap .bd-service-submenu > li > a {font-size:1.6rem;line-height:1.3;}
@media (min-width:1400px) {.mxd-nav__wrap .bd-service-submenu > li > a {font-size:2rem;}}
@media (max-width:767px) {
  .mxd-nav__wrap .submenu__item a {font-size:1.7rem;}
  .mxd-nav__wrap .bd-service-submenu > li > a {font-size:1.5rem;}
}
/* phones: smaller words, more air between the rows (owner, 30.10.2026) */
@media (max-width:767px) {
  .mxd-nav__wrap {--bd-menu-row:calc(2rem * 1.25);}
  .mxd-nav__wrap .main-menu__link {font-size:2rem;}
  .mxd-nav__wrap .main-menu__accordion {gap:clamp(1.4rem,2.6vh,2.8rem);}
}
