/* ==========================================================
   PASEK REBRANDOWY GRUPA LION
   Sticky bar nad menu strony lion-ochrona.pl
   Wersja 1.2 — maj 2026
   ========================================================== */

/* Reset i zmienne */
:root {
  --rebrand-bar-height-desktop: 64px;
  --rebrand-bar-height-mobile: 80px;
  --rebrand-gold-light: #B89500;
  --rebrand-gold-mid: #8B7300;
  --rebrand-gold-dark: #4A3F00;
  --rebrand-text: #FFFFFF;
  --rebrand-z-index: 999999;
}

/* Sam pasek */
#grupa-lion-rebrand-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: var(--rebrand-bar-height-desktop);
  z-index: var(--rebrand-z-index);

  /* Gradient odtworzony z grafiki Grupy Lion */
  background:
    radial-gradient(ellipse 60% 100% at 50% 100%, rgba(184, 149, 0, 0.45) 0%, transparent 70%),
    linear-gradient(135deg, var(--rebrand-gold-dark) 0%, var(--rebrand-gold-mid) 50%, var(--rebrand-gold-dark) 100%);

  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  font-family: 'Figtree', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  animation: rebrandBarSlideDown 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Subtelny błysk światła po lewej (efekt głębi gradientu) */
#grupa-lion-rebrand-bar::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 35%;
  background: radial-gradient(ellipse at 30% 50%, rgba(221, 193, 142, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

/* Kontener z treścią — wycentrowany, dość szeroki, żeby loga sięgały blisko krawędzi strony */
.rebrand-bar-inner {
  position: relative;
  z-index: 2;
  max-width: 1600px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  gap: 24px;
}

/* Wrapper-link wokół logotypów — klikalne, prowadzi na stronę główną */
.rebrand-bar-logo-link {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  text-decoration: none;
  outline: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  cursor: pointer;
}

.rebrand-bar-logo-link:hover {
  opacity: 0.85;
  transform: scale(1.03);
}

.rebrand-bar-logo-link:focus-visible {
  outline: 2px solid #FFFFFF;
  outline-offset: 4px;
  border-radius: 2px;
}

/* Nowe logo Grupa Lion — po lewej stronie wewnętrznego kontenera */
.rebrand-bar-logo-new {
  height: 36px;
  width: auto;
  display: block;
}

/* Stare logo Lion Ochrony — po prawej stronie wewnętrznego kontenera */
.rebrand-bar-logo-old {
  height: 48px;
  width: auto;
  display: block;
}

/* Tekst — wycentrowany w środku, rozciąga się żeby zająć przestrzeń między logami */
.rebrand-bar-text {
  flex: 1;
  text-align: center;
  color: var(--rebrand-text);
  font-size: 17px;
  line-height: 1.35;
  letter-spacing: 0.2px;
  font-weight: 400;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.rebrand-bar-text strong {
  font-weight: 700;
  color: #FFFFFF;
}

/* Łamanie linii w tekście — tylko na mobile, desktop trzyma jedną linię */
.rebrand-mobile-break {
  display: none;
}

/* Opcjonalny CTA — odkomentuj w pliku JS jeśli potrzebny */
.rebrand-bar-cta {
  display: inline-block;
  margin-left: 14px;
  padding: 6px 14px;
  background: #FFFFFF;
  color: var(--rebrand-gold-dark);
  text-decoration: none;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-radius: 4px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.rebrand-bar-cta:hover {
  background: var(--rebrand-gold-light);
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Animacja wjazdu paska */
@keyframes rebrandBarSlideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Spychanie strony w dół o wysokość paska */
body.rebrand-bar-active {
  padding-top: var(--rebrand-bar-height-desktop) !important;
}

body.rebrand-bar-active header,
body.rebrand-bar-active nav.fixed,
body.rebrand-bar-active .header-fixed,
body.rebrand-bar-active .navbar-fixed-top,
body.rebrand-bar-active .sticky-header {
  top: var(--rebrand-bar-height-desktop) !important;
}

/* ==========================================================
   NADPISANIE STYLÓW NAVBARA STRONY LION-OCHRONA.PL
   - ukrywa stare logo z navbara (jest teraz w pasku)
   - centruje menu względem strony (na desktop)
   - na mobile pozostawia hamburger po prawej
   ========================================================== */

/* Ukryj <a> zawierający stare logo z navbara — wszędzie */
nav a:has(> img[alt="Logo"]) {
  display: none !important;
}

/* DESKTOP (>= 769px): Wycentruj zawartość navbara po usunięciu loga */
@media (min-width: 769px) {
  nav.flex.flex-wrap.gap-10.justify-between {
    justify-content: center !important;
  }
}

/* MOBILE (<= 768px): Hamburger po prawej (typowy wzorzec mobilny) */
@media (max-width: 768px) {
  nav.flex.flex-wrap.gap-10.justify-between {
    justify-content: flex-end !important;
  }
}

/* ==========================================================
   RESPONSYWNOŚĆ — TABLET
   ========================================================== */
@media (max-width: 1024px) {
  .rebrand-bar-inner {
    max-width: 100%;
    padding: 0 20px;
    gap: 16px;
  }

  .rebrand-bar-logo-new {
    height: 32px;
  }

  .rebrand-bar-logo-old {
    height: 42px;
  }

  .rebrand-bar-text {
    font-size: 13px;
  }
}

/* ==========================================================
   RESPONSYWNOŚĆ — MOBILE (<=720px)
   Bar adaptuje wysokość, oba loga widoczne większe,
   tekst w 2 liniach przez wymuszony <br>
   ========================================================== */
@media (max-width: 720px) {
  :root {
    --rebrand-bar-height-mobile: 72px;
  }

  #grupa-lion-rebrand-bar {
    height: auto;
    min-height: var(--rebrand-bar-height-mobile);
  }

  /* Mniej intensywny błysk po lewej na mobile */
  #grupa-lion-rebrand-bar::before {
    width: 50%;
    opacity: 0.6;
  }

  .rebrand-bar-inner {
    padding: 6px 12px;
    gap: 10px;
    max-width: 100%;
  }

  .rebrand-bar-logo-new {
    height: 28px;
  }

  .rebrand-bar-logo-old {
    height: 48px;
  }

  .rebrand-bar-text {
    font-size: 12px;
    line-height: 1.35;
  }

  /* Włącz wymuszone łamanie linii */
  .rebrand-mobile-break {
    display: inline;
  }

  body.rebrand-bar-active {
    padding-top: var(--rebrand-bar-height-mobile) !important;
  }

  body.rebrand-bar-active header,
  body.rebrand-bar-active nav.fixed,
  body.rebrand-bar-active .header-fixed,
  body.rebrand-bar-active .navbar-fixed-top,
  body.rebrand-bar-active .sticky-header {
    top: var(--rebrand-bar-height-mobile) !important;
  }
}

/* ==========================================================
   RESPONSYWNOŚĆ — BARDZO MAŁE EKRANY (<=420px)
   Loga lekko mniejsze, padding minimalny
   ========================================================== */
@media (max-width: 420px) {
  .rebrand-bar-inner {
    padding: 6px 10px;
    gap: 8px;
  }

  .rebrand-bar-logo-new {
    height: 24px;
  }

  .rebrand-bar-logo-old {
    height: 42px;
  }

  .rebrand-bar-text {
    font-size: 11px;
    line-height: 1.3;
  }
}
