/* Górne menu (mobile + desktop)
   Wymagane elementy w HTML (przykład struktury):

   <nav class="topbar" aria-label="Główna nawigacja">
     <div class="topbar__left">
       <a class="topbar__item" href="tel:+45334225256">...</a>
       <a class="topbar__item" href="mailto:info@3dshinelab.pl">...</a>
     </div>

     <a class="topbar__brand" href="/">
       <img src="assets/img/logo.png" alt="3D Shine Lab" />
     </a>

     <button class="topbar__burger" type="button" aria-label="Otwórz menu" aria-expanded="false" aria-controls="topbar-menu">
       <span></span><span></span><span></span>
     </button>

     <div class="topbar__right" id="topbar-menu">
       <a class="topbar__link" href="#o-nas">O nas</a>
       <a class="topbar__link" href="#oferta">Oferta</a>
       <a class="topbar__link" href="#technologia">Technologia</a>
       <a class="topbar__cta" href="#kontakt">Kontakt</a>
     </div>
   </nav>

   Jeśli chcesz mieć "wycięcie" (SVG) pod logo jak na grafice,
   umieść nawigację wewnątrz `.hero` (po logo/island) i dodaj w HTML SVG jako element `.topbar__island`.
*/
html {
    scroll-behavior: smooth;
}

.hero .lang-switch {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 8px;
    text-decoration: none;
    color: #fff;
    font-size: 18px;
    font-weight: 500;
    transition: all 200ms ease
}

.hero .lang-btn {
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    opacity: 0.3;
    transition: opacity 0.2s ease, transform 0.2s ease;
    line-height: 0;
}

.hero .lang-btn.active {
    opacity: 1;
}

.hero .lang-btn:hover {
    opacity: 0.8;
}

.hero .lang-btn:focus-visible {
    outline: 2px solid #333;
    outline-offset: 3px;
    border-radius: 6px;
}

.hero .lang-btn svg {
    display: block;
    width: 32px;
    height: 32px;
}

:root {
  --menu-bg: rgba(29, 38, 55, 0.55);
  --menu-border: rgba(255, 255, 255, 0.08);
  --menu-text: rgba(255, 255, 255, 0.9);
  --menu-text-muted: rgba(255, 255, 255, 0.7);
  --menu-primary: #0360d9;

  --menu-radius: 999px;
  --menu-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
  --menu-blur: 18px;
}

/* kontener nawigacji */
.topbar {
  position: absolute;
  top: 18px;
  left: 24px;
  right: 24px;
  z-index: 5;

  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;

  padding: 12px 18px;
  border-radius: var(--menu-radius);
  background: var(--menu-bg);
  border: 1px solid var(--menu-border);
  box-shadow: var(--menu-shadow);
  backdrop-filter: blur(var(--menu-blur));
  -webkit-backdrop-filter: blur(var(--menu-blur));
}

.topbar a {
  color: var(--menu-text);
  text-decoration: none;
}

/* lewa strona */
.topbar__left {
  display: flex;
  gap: 18px;
  align-items: center;
  min-width: 0;
}

.topbar__item {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
  color: var(--menu-text-muted);
}

.topbar__item svg,
.topbar__item img {
  width: 18px;
  height: 18px;
  display: block;
  opacity: 0.9;
}

/* brand */
.topbar__brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(29, 38, 55, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.topbar__brand img {
  width: 42px;
  height: 42px;
  display: block;
}

/* prawa strona (desktop) */
.topbar__right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 22px;
}

.topbar__link {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.2px;
  opacity: 0.9;
}

.topbar__link:hover {
  opacity: 1;
}

.topbar__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 18px;
  border-radius: var(--menu-radius);
  background: linear-gradient(180deg, rgba(3, 96, 217, 1), rgba(3, 96, 217, 0.75));
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 14px;
  font-weight: 600;
}

.topbar__cta:hover {
  filter: brightness(1.08);
}

/* burger (mobile) */
.topbar__burger {
  display: none;
  justify-self: end;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(29, 38, 55, 0.55);
  color: var(--menu-text);
  padding: 10px;
}

.topbar__burger span {
  display: block;
  height: 2px;
  width: 100%;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 2px;
}

.topbar__burger span + span {
  margin-top: 6px;
}

/* RESPONSYWNOŚĆ */
@media (max-width: 900px) {
  .topbar {
    left: 12px;
    right: 12px;
    grid-template-columns: 1fr auto auto;
    padding: 10px 12px;
  }

  .topbar__left {
    gap: 12px;
  }

  .topbar__item {
    font-size: 0;
    gap: 0;
  }

  .topbar__item svg,
  .topbar__item img {
    width: 20px;
    height: 20px;
  }

  .topbar__right {
    display: none; /* otwierane przez JS/klasę */
  }

  .topbar__burger {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
  }

  /* Panel menu po otwarciu (dodaj klasę .topbar--open na .topbar) */
  .topbar.topbar--open {
    border-radius: 26px;
  }

  .topbar.topbar--open .topbar__right {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;

    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;

    padding: 14px;
    border-radius: 26px;
    background: rgba(29, 38, 55, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--menu-shadow);
    backdrop-filter: blur(var(--menu-blur));
    -webkit-backdrop-filter: blur(var(--menu-blur));
  }

  .topbar.topbar--open .topbar__link {
    padding: 10px 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
  }

  .topbar.topbar--open .topbar__cta {
    height: 44px;
  }
}

.menu-right {
    display: flex;
    flex-direction: column;
    gap: 16px
}

@media(min-width: 1024px) {
    .menu-right {
        flex-direction: row;
        align-items: center;
        gap: 24px
    }
}

.menu-right>li {
    position: relative
}

.menu-right>li>a {
    font-weight: 500;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0
}

@media(min-width: 768px) {
    .menu-right>li>a {
        font-size: 12px;
        padding: 12px 0;
        justify-content: flex-start
    }
}

@media(min-width: 1720px) {
    .menu-right>li>a {
        font-size: 16px
    }
}

.menu-right>li>a:hover {
    color: #0360d9
}

.menu-right .menu-item-has-children>a::after {
        content: "▾";
        font-size: 16px;
        margin-left: 4px
}

.menu-right .menu-item-has-children .sub-menu {
    display: none;
    padding-left: 16px;
    margin-top: 8px;
    background: #1d2637;
    padding: 12px;
    list-style-type: none;
    border-radius: 6px;
    min-width: 15vw;
}

@media(min-width: 1024px) {
    .menu-right .menu-item-has-children .sub-menu {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        background: #1d2637;
        box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
        border-top: 2px solid #0360d9;
        padding: 0;
        margin-top: 0;
        opacity: 0;
        visibility: hidden;
        transform: translateY(15px);
        transition: all .3s ease;
        margin-left: 0;
        z-index: 100
    }
}

.menu-right .menu-item-has-children .sub-menu li {
    position: relative;
    text-decoration: none;
}

.menu-right .menu-item-has-children .sub-menu a {
    display: block;
    padding: 8px 12px;
    font-size: 12px;
    color: white;
    border-bottom: 1px solid #eaeaeb
}

@media(min-width: 1444px) {
    .menu-right .menu-item-has-children .sub-menu a {
        padding: 14px 20px;
        font-size: 15px;
    }
}

.menu-right .menu-item-has-children .sub-menu a:hover {
    color: #0360d9;
    background-color: #f8f9fa;
    border-radius: 6px;
}

.menu-right .menu-item-has-children .sub-menu li:last-child>a {
    border-bottom: none
}

@media(min-width: 1024px) {
    .menu-right .menu-item-has-children .sub-menu .sub-menu {
        top: 0;
        left: 100%;
        transform: translateX(15px)
    }
}

@media(min-width: 1024px) {
    .menu-right .menu-item-has-children:hover>.sub-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0)
    }

    .menu-right .menu-item-has-children .menu-item-has-children:hover>.sub-menu {
        transform: translateX(0)
    }
}
