:root {
  --nav-ink: #15222b;
  --nav-muted: #6b7280;
  --nav-accent: #b9a3ff;
  --nav-border: rgba(210, 220, 235, 0.85);
  --nav-shadow: 0 10px 24px rgba(20, 35, 55, 0.08);
  --nav-radius: 18px;
  --nav-font: "Manrope", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

/* Mobile (minimal): sakrij centrirani meni i pusti da bude wrap */
@media (max-width: 820px) {
  .site-header .header-inner {
    flex-wrap: wrap;
  }
  .site-navigation {
    width: 100%;
    margin-left: 0;
  }
  .site-navigation ul.menu {
    justify-content: flex-start;
  }
}

/* --- Premium Mobile Bottom Nav (app-like) --- */
.byf-bottom-nav {
  display: none;
}

@media (max-width: 820px) {
  .site-navigation--desktop {
    display: none;
  }

  /* bar */
  .byf-bottom-nav {
    display: block;
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 999;

    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);

    border: 1px solid rgba(220, 230, 245, 0.95);
    border-radius: 22px;

    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    box-shadow: 0 18px 50px rgba(16, 24, 40, 0.14),
      0 1px 0 rgba(255, 255, 255, 0.35) inset;
  }

  /* grid */
  .byf-bottom-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr 1.05fr 1fr 1fr; /* centar blago širi */
    gap: 6px;
    align-items: center;
  }

  .byf-bottom-menu > li {
    margin: 0;
    padding: 0;
  }

  /* link */
  .byf-bottom-menu > li > a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 4px;
    padding: 6px 4px;

    text-decoration: none;
    font-family: var(--nav-font, system-ui);
    font-weight: 650;
    font-size: 11px;
    line-height: 1.05;
    letter-spacing: -0.2px;

    color: rgba(25, 35, 45, 0.62);
    border-radius: 16px;

    transition: background-color 0.12s ease, transform 0.12s ease,
      color 0.12s ease;
    -webkit-tap-highlight-color: transparent;
  }

  .byf-nav-ico {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: rgba(25, 35, 45, 0.62);
  }

  .byf-bottom-menu svg {
    width: 20px;
    height: 20px;
  }

  /* active pill (subtle, premium) */
  .byf-bottom-menu > li.current-menu-item > a,
  .byf-bottom-menu > li.current_page_parent > a {
    background: rgba(185, 163, 255, 0.22);
    color: rgba(25, 35, 45, 0.92);
  }
  .byf-bottom-menu > li.current-menu-item .byf-nav-ico,
  .byf-bottom-menu > li.current_page_parent .byf-nav-ico {
    color: rgba(25, 35, 45, 0.92);
  }

  /* hover/tap */
  .byf-bottom-menu > li > a:active {
    transform: scale(0.98);
  }

  /* Center button: Zajednica (istaknuta ali sofisticirano) */
  .byf-bottom-menu > li.is-center > a {
    background: rgba(185, 163, 255, 0.28);
    color: rgba(25, 35, 45, 0.95);
    border-radius: 18px;
    box-shadow: 0 16px 35px rgba(185, 163, 255, 0.22);
  }

  .byf-bottom-menu > li.is-center .byf-nav-ico {
    width: 20px;
    height: 20px;
    color: rgba(25, 35, 45, 0.95);
  }

  .byf-bottom-menu > li.is-center svg {
    width: 20px;
    height: 20px;
  }
}
.byf-nav-ico {
  color: rgba(25, 35, 45, 0.55); /* malo svetlije, premium */
}

.byf-bottom-menu svg {
  width: 20px;
  height: 20px;
  opacity: 0.95; /* suptilno */
}

.byf-bottom-menu > li.current-menu-item .byf-nav-ico,
.byf-bottom-menu > li.current_page_parent .byf-nav-ico {
  color: rgba(25, 35, 45, 0.92);
}

.byf-bottom-menu > li.is-center .byf-nav-ico {
  color: rgba(25, 35, 45, 0.95);
}

/* Desktop: header layout */
.byf-header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
}

.byf-avatar-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.byf-avatar {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(220, 230, 245, 0.95);
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.1);
}

/* Mobile top bar */
.byf-mobile-top {
  display: none;
}

@media (max-width: 820px) {
  /* sakrij desktop meni + desktop right */
  .site-navigation--desktop,
  .byf-header-right {
    display: none;
  }

  .byf-mobile-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
  }

  .byf-burger {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid rgba(220, 230, 245, 0.95);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .byf-burger svg {
    width: 20px;
    height: 20px;
    color: rgba(25, 35, 45, 0.9);
  }

  .byf-mobile-title {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
  }

  .byf-mobile-name {
    font-weight: 800;
    letter-spacing: -0.3px;
    font-size: 13px;
    color: rgba(25, 35, 45, 0.92);
    max-width: 45vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .byf-mobile-sub {
    font-size: 12px;
    color: rgba(25, 35, 45, 0.6);
    letter-spacing: -0.2px;
  }

  .byf-avatar {
    width: 40px;
    height: 40px;
  }

  /* Mobile drawer (dropdown) */
  .byf-mobile-drawer {
    position: fixed;
    left: 12px;
    right: 12px;
    top: 72px;
    z-index: 999;
  }

  .byf-mobile-drawer-inner {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px) saturate(140%);
    border: 1px solid rgba(220, 230, 245, 0.95);
    border-radius: 18px;
    box-shadow: 0 18px 50px rgba(16, 24, 40, 0.14);
    padding: 10px;
  }

  .byf-mobile-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .byf-mobile-menu a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 12px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 750;
    letter-spacing: -0.2px;
    color: rgba(25, 35, 45, 0.85);
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(220, 230, 245, 0.55);
  }

  .byf-mobile-menu li.current-menu-item a,
  .byf-mobile-menu li.current_page_parent a {
    background: rgba(185, 163, 255, 0.22);
    border-color: rgba(185, 163, 255, 0.35);
  }

  /* body space: bottom nav already uses padding-bottom, keep it */
}

@media (max-width: 820px) {
  .site-navigation--desktop {
    display: none !important;
  }
}

/* ===== Desktop Header: clean premium container + chips ===== */
@media (min-width: 821px) {
  /* cela gornja zona */
  .site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: transparent; /* važan: nema "stakla" preko cele širine */
    border-bottom: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  /* pravi header kao kartica */
  .site-header .header-inner {
    max-width: 1120px;
    margin: 15px auto 0; /* malo prostora odozgo, premium */
    padding: 8px 10px; /* tanak */
    display: flex;
    align-items: center;
    gap: 10px;

    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(224, 232, 245, 1);
    border-radius: 18px;
    box-shadow: 0 1px 20px rgba(16, 24, 40, 0.08);
  }

  /* branding levo - diskretno (možeš i skroz hide ako želiš) */
  .site-branding {
    display: flex;
    align-items: center;
    padding: 0 8px;
  }
  .site-branding a {
    font-family: "Manrope", system-ui, -apple-system, Segoe UI, Roboto,
      sans-serif;
    font-weight: 800;
    letter-spacing: -0.7px;
    font-size: 15px;
    color: rgba(16, 24, 40, 0.88);
    text-decoration: none;
    opacity: 0.9;
  }

  /* meni ide desno, ali ostaje “u istoj grupi” sa avatarom */
  .site-navigation--desktop {
    margin-left: auto;
    margin-right: 6px;
  }

  .site-navigation ul.menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 8px; /* kompaktno */
    justify-content: flex-end;
  }

  /* link kao chip */
  .site-navigation ul.menu > li > a {
    font-family: "Manrope", system-ui, -apple-system, Segoe UI, Roboto,
      sans-serif;
    font-weight: 700;
    letter-spacing: -0.7px;
    font-size: 14px;

    color: rgba(16, 24, 40, 0.7);
    text-decoration: none;

    padding: 8px 12px; /* TANAK chip */
    border-radius: 999px;
    border: 1px solid transparent;
    background: transparent;
    transition: background-color 0.12s ease, border-color 0.12s ease,
      color 0.12s ease;
  }

  .site-navigation ul.menu > li > a:hover {
    background: rgba(185, 163, 255, 0.14);
    border-color: rgba(185, 163, 255, 0.18);
    color: rgba(16, 24, 40, 0.92);
  }

  /* active: čist chip (bez senke, bez underline) */
  .site-navigation ul.menu > li.current-menu-item > a,
  .site-navigation ul.menu > li.current_page_parent > a {
    background: rgba(185, 163, 255, 0.22);
    border-color: rgba(185, 163, 255, 0.28);
    color: rgba(16, 24, 40, 0.92);
  }

  /* avatar: kvadrat + premium frame */
  .byf-avatar {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    object-fit: cover;

    border: 1px solid rgba(224, 232, 245, 1);
    background: #fff;
    box-shadow: 0 14px 26px rgba(16, 24, 40, 0.1);
    margin-bottom: 0px !important;
  }

  /* ukloni bilo kakve ranije underline efekte */
  .site-navigation ul.menu > li > a::after {
    content: none !important;
  }
}

/* ================================
   MOBILE TOP BAR (Premium app feel)
   ================================ */

@media (max-width: 820px) {
  /* sakrij desktop meni i desktop avatar blok */
  .site-navigation--desktop,
  .byf-header-right {
    display: none !important;
  }

  /* header: tanji, bez “web” osećaja */
  .site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border-bottom: 1px solid rgba(224, 232, 245, 0.9);
  }

  .site-header .header-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 3px 14px; /* kompaktno */
    display: flex;
    align-items: center;
    gap: 10px;
  }

  /* branding (ime sajta) na telefonu ti ne treba – smeta */
  .site-branding {
    display: none !important;
  }

  /* mobile top bar wrapper (hamburger + title + avatar) */
  .byf-mobile-top {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 10px;
    margin-left: 0 !important;
  }

  /* Hamburger: ghost icon (bez bordera!) */
  .byf-burger {
    width: 38px;
    height: 38px;
    border: 0 !important;
    background: transparent !important;
    border-radius: 12px;
    padding: 0px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
  }

  .byf-burger svg {
    width: 22px;
    height: 22px;
    color: rgba(16, 24, 40, 0.92);
  }

  .byf-burger:active {
    transform: scale(0.98);
  }

  /* Title block (hijerarhija: Dan je primaran, ime sekundarno) */
  .byf-mobile-title {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.05;
  }

  .byf-mobile-sub {
    font-family: "Manrope", system-ui, -apple-system, Segoe UI, Roboto,
      sans-serif;
    font-weight: 800;
    letter-spacing: -0.6px;
    font-size: 13px;
    color: rgba(16, 24, 40, 0.92);
  }

  .byf-mobile-name {
    font-family: "Manrope", system-ui, -apple-system, Segoe UI, Roboto,
      sans-serif;
    font-weight: 600;
    letter-spacing: -0.3px;
    font-size: 12px;
    color: rgba(16, 24, 40, 0.55);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 64vw;
  }

  /* Avatar: manji, diskretniji, “app” */
  .byf-avatar-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
  }

  .byf-avatar {
    width: 38px !important;
    height: 38px !important;
    border-radius: 12px !important; /* kvadrat feel */
    object-fit: cover;
    border: 1px solid rgba(224, 232, 245, 0.95);
    box-shadow: 0 10px 26px rgba(16, 24, 40, 0.1);
    background: #fff;
  }

  /* ================================
     MOBILE DROPDOWN MENU (drawer)
     ================================ */

  /* drawer “panel” ispod headera */
  .byf-mobile-drawer {
    position: fixed;
    left: 12px;
    right: 12px;
    top: 64px; /* približno visina headera; po potrebi 60–72px */
    z-index: 999;
  }

  .byf-mobile-drawer[hidden] {
    display: none !important;
  }

  .byf-mobile-drawer-inner {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border: 1px solid rgba(224, 232, 245, 0.95);
    border-radius: 18px;
    box-shadow: 0 18px 50px rgba(16, 24, 40, 0.14);
    padding: 10px;
    margin-top: 40px;
  }

  .byf-mobile-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .byf-mobile-menu li {
    margin: 0;
    padding: 0;
  }

  .byf-mobile-menu a {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 12px 12px;
    border-radius: 14px;

    text-decoration: none;
    font-family: "Manrope", system-ui, -apple-system, Segoe UI, Roboto,
      sans-serif;
    font-weight: 750;
    letter-spacing: -0.4px;
    font-size: 13px;

    color: rgba(16, 24, 40, 0.85);
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(224, 232, 245, 0.7);
  }

  .byf-mobile-menu li.current-menu-item a,
  .byf-mobile-menu li.current_page_parent a {
    background: rgba(185, 163, 255, 0.22);
    border-color: rgba(185, 163, 255, 0.3);
  }
}

/* ======================================
   MOBILE TOP BAR (final, app-like)
   ====================================== */
@media (max-width: 820px) {
  /* sakrij desktop elemente */
  .site-navigation--desktop,
  .byf-header-right,
  .site-branding {
    display: none !important;
  }

  /* header pozadina + tanak separator */
  .site-header {
    position: sticky;
    top: 0;
    z-index: 120;
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border-bottom: 1px solid rgba(224, 232, 245, 0.95);
  }

  .site-header .header-inner {
    padding: 3px 6px !important;
    display: flex;
    align-items: center;
  }

  /* GRID: burger | title | avatar */
  .byf-mobile-top {
    display: grid !important;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    width: 100%;
    gap: 10px;
    margin-left: 0 !important;
  }

  /* Burger: ghost, ali “tap” zona 44px */
  .byf-burger {
    width: 44px;
    height: 44px;
    border: 0 !important;
    margin-top: 5px !important;
    background: transparent !important;
    border-radius: 14px;
    padding: 0px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
  }
  .byf-burger svg {
    width: 22px;
    height: 22px;
    color: rgba(16, 24, 40, 0.92);
  }
  .byf-burger:active {
    transform: scale(0.98);
    background: rgba(185, 163, 255, 0.12) !important;
  }

  /* Title: centriran, jasna hijerarhija */
  .byf-mobile-title {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* promeni u center ako želiš baš centrirano */
    justify-content: center;
    min-width: 0;
    line-height: 1.05;
    gap: 3px;
  }

  /* Primarno: DAN */
  .byf-mobile-sub {
    font-family: "Manrope", system-ui, -apple-system, Segoe UI, Roboto,
      sans-serif;
    font-weight: 850;
    letter-spacing: -0.6px;
    font-size: 14px;
    color: rgba(16, 24, 40, 0.95);
  }

  /* Sekundarno: ime */
  .byf-mobile-name {
    font-family: "Manrope", system-ui, -apple-system, Segoe UI, Roboto,
      sans-serif;
    font-weight: 650;
    letter-spacing: -0.35px;
    font-size: 13px;
    color: rgba(16, 24, 40, 0.62);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 68vw;
  }

  /* Avatar: malo veći + premium frame */
  .byf-avatar-link {
    justify-self: end;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
  }

  .byf-avatar {
    width: 44px !important;
    height: 44px !important;
    border-radius: 14px !important;
    object-fit: cover;
    background: #fff;
    border: 1px solid rgba(224, 232, 245, 0.95);
    box-shadow: 0 14px 28px rgba(16, 24, 40, 0.1);
    margin-top: 9px !important;
  }
}
.site-header {
  padding-block-end: 0px !important;
  padding-block-start: 0px !important;
}

@media (max-width: 575px) {
  .page-header .entry-title,
  .site-footer .footer-inner,
  .site-footer:not(.dynamic-footer),
  .site-header .header-inner,
  .site-header:not(.dynamic-header),
  body:not([class*="elementor-page-"]) .site-main {
    padding-inline-end: 0px;
    padding-inline-start: 0px;
  }
}

@media (max-width: 820px) {
  /* 1) ikonice-only: sakrij label u meniju */
  .byf-bottom-menu .byf-nav-label {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }

  /* 2) malo zbijeniji bar kad nema teksta */
  .byf-bottom-nav {
    padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
  }

  .byf-bottom-menu > li > a {
    position: relative;
    gap: 0; /* nema razmaka za label */
    padding: 12px 8px; /* lep tap target */
    border-radius: 16px;
  }

  .byf-nav-ico {
    width: 26px;
    height: 26px;
  }
  .byf-bottom-menu svg {
    width: 22px;
    height: 22px;
  }

  /* 3) Tooltip bubble (iz aria-label) */
  .byf-bottom-menu > li > a::after {
    content: attr(aria-label);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translateX(-50%) translateY(6px);
    opacity: 0;
    pointer-events: none;

    padding: 8px 10px;
    border-radius: 14px;

    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(224, 232, 245, 0.95);
    box-shadow: 0 18px 40px rgba(16, 24, 40, 0.14);

    font-family: "Manrope", system-ui, -apple-system, Segoe UI, Roboto,
      sans-serif;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: -0.4px;
    color: rgba(16, 24, 40, 0.92);
    white-space: nowrap;

    transition: opacity 0.14s ease, transform 0.14s ease;
  }

  /* mali "rep" */
  .byf-bottom-menu > li > a::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: calc(100% + 4px);
    transform: translateX(-50%) translateY(6px);
    opacity: 0;
    pointer-events: none;

    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.92);
    border-left: 1px solid rgba(224, 232, 245, 0.95);
    border-bottom: 1px solid rgba(224, 232, 245, 0.95);
    transform-origin: center;
    rotate: 45deg;

    transition: opacity 0.14s ease, transform 0.14s ease;
  }

  /* 4) Kada je aktivno – pokaži tooltip (kao na BigMama) */
  .byf-bottom-menu > li.current-menu-item > a::after,
  .byf-bottom-menu > li.current_page_parent > a::after,
  .byf-bottom-menu > li.current-menu-item > a::before,
  .byf-bottom-menu > li.current_page_parent > a::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }

  /* 5) Kada korisnik tapne – pokaži tooltip na 1.2s (JS doda klasu) */
  .byf-bottom-menu > li.is-tapped > a::after,
  .byf-bottom-menu > li.is-tapped > a::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }

  /* 6) Active pill suptilniji (jer sad nema label) */
  .byf-bottom-menu > li.current-menu-item > a,
  .byf-bottom-menu > li.current_page_parent > a {
    background: rgb(248 246 254);
  }

  /* Center ostaje istaknut ali “manje blok” */
  .byf-bottom-menu > li.is-center > a {
    box-shadow: 0 14px 30px rgba(185, 163, 255, 0.18);
  }
}
