/* =========================================================
   MENU / HEADER (fixed)
   Ten plik odpowiada za górne menu widoczne na wszystkich stronach.

   WAŻNE:
   - menu jest position: fixed i nachodzi na content
   - wysokość menu jest sterowana przez zmienną: --menu-h
   - inne sekcje (np. hero, news) kompensują to padding-topem
   ========================================================= */


/* =========================================================
   1) GŁÓWNY BAR MENU (kontener)
   ========================================================= */

.menu__top {
  display: flex;
  justify-content: space-between;
  align-items: center;

  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;

  height: var(--menu-h);
  box-sizing: border-box;
  padding: 8px 18px;

  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;

  color: rgba(255,255,255,0.92);
}


/* =========================================================
   2) TŁO MENU (gradient overlay)
   ========================================================= */

.menu__top::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;

  background: linear-gradient(
    to bottom,
    rgba(10, 12, 14, 0.70) 0%,
    rgba(10, 12, 14, 0.35) 55%,
    rgba(10, 12, 14, 0.00) 100%
  );
}


/* =========================================================
   3) CIEŃ TEKSTU (globalny dla menu)
   ========================================================= */

.menu__top,
.menu__top a {
  text-shadow: 0 2px 12px rgba(0,0,0,0.35);
}


/* =========================================================
   4) BRAND (logo + tekst)
   ========================================================= */

.menu__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-logo {
  height: 26px;
  width: auto;
  opacity: 0.9;
  display: block;
  transform: translateY(-1px);
}

.logo-text {
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
}


/* =========================================================
   5) PRAWA STRONA (nav + social)
   ========================================================= */

.menu__right {
  display: flex;
  align-items: center;
  gap: 22px;
}


/* =========================================================
   6) PANEL MENU (desktop)
   - trzyma nav + social w jednej linii
   ========================================================= */

.menu__panel {
  display: flex;
  align-items: center;
  gap: 22px;
}


/* =========================================================
   7) NAV (linki)
   ========================================================= */

.menu__nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.menu__nav a {
  color: rgba(255,255,255,0.92);
  text-decoration: none;

  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;

  padding: 6px 0;
  transition: color 160ms ease, text-shadow 160ms ease;
}

.menu__nav a:hover {
  color: rgba(255,255,255,0.7);
  text-shadow:
    0 1px 2px rgba(0,0,0,0.25),
    0 2px 6px rgba(0,0,0,0.25);
}


/* =========================================================
   8) SOCIAL (ikony)
   ========================================================= */

.menu__socials {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: 24px;
}

.menu__socials a {
  display: inline-flex;
  color: rgba(255,255,255,0.92);
  opacity: 0.85;
  transition: opacity 140ms ease;
}

.menu__socials a:hover {
  opacity: 0.6;
}

.menu__socials .icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
}


/* =========================================================
   9) HAMBURGER (przycisk)
   - domyślnie ukryty (desktop)
   - pokazujemy go tylko na urządzeniach dotykowych w media query
   ========================================================= */

.menu__toggle {
  display: none !important;
  width: 42px;
  height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.menu__toggle-bars {
  position: relative;
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: currentColor;
}

.menu__toggle-bars::before,
.menu__toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: currentColor;
}

.menu__toggle-bars::before { top: -6px; }
.menu__toggle-bars::after  { top:  6px; }


/* =========================================================
   10) BACKDROP (zamykanie menu)
   - musi mieć domyślny stan, inaczej pojawia się na desktopie
   ========================================================= */

.menu__backdrop {
  display: none;
}


/* =========================================================
   11) MOBILE
   - warunek dotyku ogranicza sytuacje typu desktop + zoom
   ========================================================= */

@media (max-width: 820px) and (hover: none) and (pointer: coarse) {

  /* hamburger */
  .menu__toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }

  /* panel */
  .menu__panel {
    position: fixed;
    top: var(--menu-h);
    left: 0;
    right: 0;

    display: block;
    padding: 14px 18px 18px;

    background: rgba(10, 12, 14, 0.86);
    backdrop-filter: blur(10px);

    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;

    transition: transform 180ms ease, opacity 180ms ease;
  }

  body.menu-open .menu__panel {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  /* backdrop */
  .menu__backdrop {
    display: block;
    position: fixed;
    top: var(--menu-h);
    left: 0;
    right: 0;
    bottom: 0;

    background: transparent;
    border: 0;
    padding: 0;
  }

  /* treść panelu nad backdropem */
  .menu__panel > *:not(.menu__backdrop) {
    position: relative;
    z-index: 1;
  }

  /* układ linków */
  .menu__nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .menu__nav a {
    padding: 10px 0;
  }

  .menu__socials {
    margin-left: 0;
    margin-top: 12px;
  }

  body.menu-open {
    overflow: hidden;
  }
}

@media (max-width: 360px) {
  .logo-text {
     font-size: 0.7rem;
    font-weight: 350;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.75);
    line-height: 1.1;
  }
}