/* =========================================================
   TOPBAR (always visible)
========================================================= */
.p8-topbar {
  position: sticky;
  top: 0;
  z-index: 10000;
  background: #111;
  padding: 6px 0;
  text-align: center;

  color: #FFF;
  font-feature-settings: 'liga' off, 'clig' off;
  font-family: e-Ukraine;
  font-size: 12px;
  font-style: normal;
  font-weight: 300;
  line-height: 140%;
  letter-spacing: -0.24px;
}

.custom-logo-link {
	 height: 17px;
}

.fu-header-button{
  margin-top: 0px !important;
}

/* =========================================================
   MAIN HEADER (overlay)
========================================================= */
.p8-header {
  position: fixed;
  left: 0;
  right: 0;
  top: 0; /* JS sets real offset = topbar height */
  z-index: 9999;
  width: 90%;
  margin: auto;
}

.p8-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0;

  /* NEW: smooth padding transition */
  transition: padding 200ms ease;
}

/* Main bar */
.p8-bar {
  padding: 16px 0;
  transition: padding 200ms ease;
}

.p8-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
/*   gap: 18px; */
}

/* Brand */
.p8-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.p8-brand img {
  display: block;
  height: 34px;
  width: auto;
}

/* Desktop nav */
.p8-nav--desktop {
  flex: 1;
  display: flex;
/*   justify-content: flex-end; */
justify-content: center;
}

.p8-menu {
  display: flex;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
/*   margin-right: 65px; */
}

.p8-menu a {
  text-decoration: none;
  opacity: 0.92;
  color: #FFF;
  font-family: e-Ukraine;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  letter-spacing: -0.5px;
}

.p8-menu a:hover {
  opacity: 1;
}

/* CTA */
.p8-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.p8-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: #FDDB31;
  color: #000;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.4px;
  white-space: nowrap;
}

/* =========================================================
   BURGER BUTTON (transforms to close)
========================================================= */
.p8-burger {
  display: none;
  position: relative;
  width: 40px;
  height: 40px;
  border: 2px solid #FDDB31;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  padding: 10px;
  box-sizing: border-box;
  transition: transform 200ms ease;
}

.p8-burger span {
  display: block;
  height: 2px;
  background: #FDDB31;
  border-radius: 2px;
  margin: 1px 0 !important;
  transition: all 300ms ease;
  transform-origin: center;
}

/* When menu is open, hide the burger button */
.p8-burger[aria-expanded="true"] {
  opacity: 0;
  pointer-events: none;
}

/* Close button - positioned at same coordinates as burger */
.p8-mobile__close {
  position: fixed;
  border-radius: 999px;
  border: 2px solid #FDDB31;
  background: transparent;
  color: #FDDB31;
  font-size: 25px;
  width: 40px;
  height: 40px;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 30000;
/*   line-height: 1; */
}

/* =========================================================
   TRANSFORM ON SCROLL
========================================================= */
.p8-header.is-scrolled .p8-bar {
   padding: 10px 8px;
}

/* NEW: when scrolled, increase container side padding */
.p8-header.is-scrolled .p8-container {
  padding-left: 22px;
  padding-right: 22px;
}

.p8-header.is-scrolled .p8-bar .p8-container {
  background: rgba(90, 75, 65, 0.75);
  backdrop-filter: blur(10px);
  border-radius: 28px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.22);
  padding-top: 10px;
  padding-bottom: 10px;
}

/* =========================================================
   MOBILE OVERLAY MENU
========================================================= */
/* Hard rule: hidden must ALWAYS hide, even if theme resets it */
.p8-mobile[hidden] {
  display: none !important;
}

.p8-mobile {
  position: fixed;
  inset: 0;
  z-index: 20000; /* above topbar, below burger when open */
  background: rgba(0,0,0,0.70);

  display: grid;
  place-items: start end;
  padding: 14px;
}

.p8-mobile__panel {
  width: min(420px, 92vw);
  height: 100%;
  background: rgba(18, 18, 18, 0.96);
  backdrop-filter: blur(12px);
/*   border-radius: 18px; */
  padding: 18px;
  overflow: auto;
}

.p8-menu--mobile {
  display: grid;
  gap: 30px;
  margin-top: 40px;
  justify-items: center;
  text-align: center;
}

.p8-menu--mobile a {
  font-size: 20px;
  color: #fff;
  opacity: 0.92;
}

.p8-menu--mobile a:hover {
  opacity: 1;
}

.p8-mobile__cta {
  margin-top: 40px;
  display: flex;
  justify-content: center;
}

/* =========================================================
   LOCK SCROLL WHEN MENU OPEN
========================================================= */
html.p8-menu-open,
body.p8-menu-open {
  overflow: hidden;
}

/* ===============================
   Mobile burger: logo centered
   =============================== */
.p8-mobile__panel .p8-brand--mobile,
.p8-mobile__panel .custom-logo-link {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* spacing above menu items */
.p8-mobile__panel .p8-brand--mobile,
.p8-mobile__panel .custom-logo-link {
  margin: 70px 0 0;
}

/* text fallback ("Patron8") */
.p8-mobile__panel .p8-brand--mobile .p8-brand__text {
  display: inline-block;
  color: #fff;
  font-weight: 700;
  font-size: 22px;
  line-height: 1;
  text-align: center;
}

/* custom logo image */
.p8-mobile__panel .custom-logo {
  display: block;
  height: auto;
  max-width: 180px;
  width: 140px;
}
.p8-nav--mobile{
  margin: 70px 0 70px 0;
}


/* =========================================================
   RESPONSIVE
========================================================= */
/* =========================================================
   TABLET ONLY (768px - 820px): actions left, logo right
========================================================= */
@media (min-width: 1440px) and (max-width: 1520px) {
/* 	.p8-container {
	  padding: 0 12px;
	} */
	
	.p8-header {
	  width: 100%;
	  padding-left: 80px;
      padding-right: 80px;
	}
}

@media (max-width: 1023px) {
  .p8-nav--desktop { display: none; }
  .p8-burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    aspect-ratio: 1/1;
  }
  
  .fu-header-button{
    height: 40px!important;
    padding: 8px!important;
  }
  
  .p8-header{
    width: 100%;
  }
  
  .p8-bar__inner {
    justify-content: unset;
    gap: 15px;
  }
  
/*   .p8-header.is-scrolled .p8-container {
    padding-left: 5px;
    padding-right: 5px;
  } */
}

@media (min-width: 360px) and (max-width: 767px) {
 .p8-mobile {
  place-items: unset;
  padding: unset;
}
	
	.p8-mobile__panel {
  width: unset;
}
}

@media (max-width: 375px) {
  .p8-header.is-scrolled .p8-container {
    padding-left: 17px;
    padding-right: 17px;
  }
}

@media (min-width: 390px) and (max-width: 820px) {
  .p8-header.is-scrolled .p8-container {
    padding-left: 32px;
    padding-right: 32px;
  }
  
  .p8-bar__inner {
    justify-content: space-between;
  }

  .p8-actions {
    order: 1;
  }

  .p8-brand {
    order: 1;
    margin-left: auto;
  }
  
  .p8-container {
    padding: 0 22px;
  }
}

@media (max-width: 1439px) {
	.p8-menu {
    margin-right: unset;
  }
	.p8-nav--desktop {
	  justify-content: center;
	}
}


/* Desktop safety: never render overlay menu */
@media (min-width: 1024px) {
  .p8-mobile {
    display: none !important;
  }
}


:root { --p8-scroll-offset: 120px; }

html {
  scroll-padding-top: var(--p8-scroll-offset);
  scroll-behavior: smooth;
}
