/* HS PRO Global Responsive Rules
   Centralized breakpoints for shell, header, mega menu and footer. */

html,
body {
  max-width: 100%;
  overflow-x: clip;
}

img,
video,
iframe {
  max-width: 100%;
}

/* RESPONSIVE */

@media (max-width: 1050px) {
  .hs-topbar {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand language"
      "nav nav";
  }

  .hs-brand {
    grid-area: brand;
  }

  .hs-nav {
    grid-area: nav;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .hs-language {
    grid-area: language;
  }

  .hs-footer {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .hs-topbar {
    padding: 16px;
  }

  .hs-brand {
    font-size: 32px;
  }

  .hs-nav {
    gap: 8px;
  }

  .hs-nav a {
    padding: 9px 11px;
    font-size: 11px;
  }

  .hs-footer {
    grid-template-columns: 1fr;
    padding: 36px 20px 24px;
  }

  .footer-brand {
    grid-column: auto;
  }

  .footer-bottom {
    grid-column: auto;
  }
}

/* FINAL BURGER NAVIGATION + FULL WIDTH MEGA MENU */

/*
  Desktop > 1180px:
  - Full-width mega menu below the fixed header
  - Hover/focus opens the mega menu

  Tablet / phone / narrow browser <= 1180px:
  - Navigation collapses into burger menu
  - Burger opens fullscreen navigation overlay
  - Mega menus expand inline inside the overlay
  - Works for phone portrait/landscape, tablet portrait/landscape and scaled desktop windows
*/

:root {
  --hs-header-desktop-height: 79px;
  --hs-header-mobile-height: 76px;
}

.hs-burger {
  display: none;
}

.hs-mega-close {
  display: none;
}

/* DESKTOP FULL-WIDTH MEGA MENU */

@media (min-width: 1181px) {
  .page {
    padding-top: 80px;
  }

  .hs-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
  }

  .hs-nav-item {
    position: static;
  }

  .hs-mega-menu {
    position: fixed;
    top: var(--hs-header-desktop-height);
    left: 0;
    right: 0;
    display: none;
    width: 100vw;
    max-width: none;
    transform: none;
    padding: 0;
    z-index: 9998;
    background: #000000;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.55);
  }

  .hs-mega-holder:hover .hs-mega-menu,
  .hs-mega-holder:focus-within .hs-mega-menu {
    display: block;
  }

  .hs-mega-menu::before {
    content: "";
    position: absolute;
    top: -18px;
    left: 0;
    right: 0;
    height: 18px;
  }

  .hs-mega-inner {
    width: min(1500px, calc(100vw - 64px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    border: 0;
    background: black;
    box-shadow: none;
  }

  .hs-mega-inner a {
    min-height: 144px;
    padding: 26px 28px;
    border: 0;
    border-radius: 0;
    background: black;
  }

  .hs-mega-inner a:hover {
    background: black;
  }

  .hs-mega-inner span {
    font-size: clamp(22px, 2vw, 34px);
    line-height: 0.9;
  }

  .hs-mega-inner small {
    margin-top: 10px;
    font-size: 11px;
  }

  .hs-mega-inner em {
    margin-top: 14px;
  }
}

/* BURGER NAVIGATION FOR TABLET / PHONE / SCALED WINDOWS */

@media (max-width: 1180px) {
  html,
  body {
    overflow-x: hidden;
  }

  body.menu-open {
    overflow: hidden;
  }

  .page {
    padding-top: var(--hs-header-mobile-height);
  }

  .hs-topbar {
    grid-template-columns: 1fr auto auto;
    grid-template-areas: "brand language burger";
    align-items: center;
    gap: 10px;
    min-height: var(--hs-header-mobile-height);
    padding: 12px 14px;
    background: #000000;
  }

  .hs-brand {
    grid-area: brand;
    font-size: clamp(30px, 7vw, 42px);
  }

  .hs-language {
    grid-area: language;
    justify-self: end;
    z-index: 100003;
  }

  .language-toggle {
    min-width: 70px;
    height: 40px;
    min-height: 40px;
    padding: 0 12px;
  }

  .language-menu {
    z-index: 100010;
  }

  .hs-burger {
    grid-area: burger;
    position: relative;
    z-index: 100003;
    display: inline-flex;
    width: 44px;
    height: 40px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.055);
    cursor: pointer;
  }

  .hs-burger span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: #ffffff;
    transition:
      transform 0.22s ease,
      opacity 0.22s ease;
  }

  .hs-topbar.nav-open .hs-burger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .hs-topbar.nav-open .hs-burger span:nth-child(2) {
    opacity: 0;
  }

  .hs-topbar.nav-open .hs-burger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .hs-nav {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
    width: 100vw;
    height: 100dvh;
    padding: 96px 18px 24px;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 10px;
    overflow-y: auto;
    overflow-x: hidden;
    background:
      radial-gradient(circle at 86% 16%, rgba(209, 19, 40, 0.24), transparent 28%),
      #050505;
    -webkit-overflow-scrolling: touch;
  }

  .hs-topbar.nav-open .hs-nav {
    display: flex;
  }

  .hs-nav-item {
    position: static;
    width: 100%;
  }

  .hs-nav-link,
  .hs-nav a,
  .hs-mega-toggle {
    width: 100%;
    min-height: 54px;
    justify-content: space-between;
    padding: 0 18px;
    border-radius: 18px;
    font-size: 13px;
    text-align: left;
  }

  .hs-mega-toggle::after {
    content: "+";
    margin-left: 14px;
    color: var(--hs-red);
    font-size: 20px;
    line-height: 1;
  }

  .hs-mega-holder.open .hs-mega-toggle::after {
    content: "–";
  }

  .hs-mega-holder:hover .hs-mega-menu,
  .hs-mega-holder:focus-within .hs-mega-menu {
    display: none;
  }

  .hs-mega-holder.open .hs-mega-menu {
    display: block;
  }

  .hs-mega-menu {
    position: static;
    display: none;
    width: 100%;
    max-width: none;
    height: auto;
    max-height: none;
    transform: none;
    padding: 10px 0 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    overflow: visible;
  }

  .hs-mega-close {
    display: none;
  }

  .hs-mega-inner {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    margin: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .hs-mega-inner a {
    min-height: 112px;
    align-items: flex-start;
    justify-content: space-between;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    background:
      linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
      #080808;
  }

  .hs-mega-inner span {
    font-size: clamp(23px, 5vw, 34px);
  }

  .hs-mega-inner small {
    font-size: 11px;
  }

  .hs-footer {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 38px 20px 26px;
  }

  .footer-brand,
  .footer-bottom {
    grid-column: auto;
  }

  .footer-logo {
    font-size: 30px;
  }
}

/* PHONE PORTRAIT */

@media (max-width: 620px) {
  :root {
    --hs-header-mobile-height: 72px;
  }

  .hs-topbar {
    padding: 12px;
  }

  .hs-brand {
    font-size: 30px;
  }

  .language-toggle {
    min-width: 64px;
    padding: 0 10px;
  }

  .hs-nav {
    padding: 88px 12px 22px;
  }

  .hs-mega-inner {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .hs-mega-inner a {
    min-height: 94px;
    padding: 20px;
  }
}

/* PHONE LANDSCAPE / LOW VIEWPORT HEIGHT */

@media (max-height: 520px) and (max-width: 1180px) {
  .hs-nav {
    padding-top: 78px;
  }

  .hs-nav-link,
  .hs-nav a,
  .hs-mega-toggle {
    min-height: 46px;
  }

  .hs-mega-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hs-mega-inner a {
    min-height: 86px;
  }
}

/* VERY SMALL PHONES */

@media (max-width: 380px) {
  .hs-brand {
    font-size: 27px;
  }

  .hs-burger {
    width: 40px;
  }

  .language-toggle {
    min-width: 58px;
    font-size: 11px;
  }

  .hs-nav-link,
  .hs-nav a,
  .hs-mega-toggle {
    font-size: 12px;
    padding: 0 14px;
  }
}
