.navbar {
  width: 100%;
  position: fixed;
  top: 0;
  z-index: 1000;
  background: rgba(30, 30, 30, 0.2);
  transition: background 0.3s, backdrop-filter 0.3s, box-shadow 0.3s;
  backdrop-filter: blur(4px);
}

/* Пригнічуємо всі анімації під час початкового рендеру (знімається через JS) */
.navbar.is-notransition,
.navbar.is-notransition * {
    transition: none !important;
}

.navbar-transparent {
    background: rgba(35, 39, 43, 0.85);
    transition: background 0.3s;
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
}

.navbar-container {
    display: flex;
    padding: 0 1.5rem;
    align-items: center;
    justify-content: space-between;
    min-height: 74px;
    transition: min-height 0.3s ease;
}

/* Condensed state after scroll */
.navbar.is-scrolled .navbar-container {
    min-height: 54px;
}
.navbar.is-scrolled .logo {
    max-height: 38px;
    width: auto;
}

@media (max-width: 600px) {
    .navbar-container { padding: 0 .75rem; }
}

.navbar-brand {
    color: var(--pub-cta-dark, #ffb300);
    font-size: 1.4rem;
    font-weight: bold;
    text-decoration: none;
    margin-right: 2rem;
    letter-spacing: 1px;
}

.navbar-menu {
    margin-left: auto;
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    flex: 1;
    justify-content: flex-end;
}
.navbar-menu li {
  display: inline-block;
  margin-right: 10px;
}

.navbar-menu li a {
  position: relative;
  color: var(--pub-nav-text, #fff5c3);
  text-decoration: none;
  padding: 8px 0;
  transition: color 0.2s;
  font-weight: 500;
}

.navbar-menu li a::after {
  content: '';
  display: block;
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--pub-cta-dark, #ffb300);
  transform: scaleX(0);
  transition: transform 0.3s cubic-bezier(.4,0,.2,1);
  border-radius: 2px;
}

.navbar-menu li a:hover,
.navbar-menu li a:focus {
  color: var(--pub-cta, #ffcc00);
}

.navbar-menu li a:hover::after,
.navbar-menu li a:focus::after {
  transform: scaleX(1);
}

/* Active page link */
.navbar-menu li a.nav-active {
    color: var(--pub-cta, #ffcc00);
}
.navbar-menu li a.nav-active::after {
    transform: scaleX(1);
    background: var(--pub-cta, #ffcc00);
}

/* ── Navbar right group ────────────────────── */
.navbar-right {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-shrink: 0;
    margin-left: 1rem;
}

/* Phone pill */
.navbar-phone-pill {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .82rem;
    font-weight: 700;
    color: var(--pub-cta, #ffcc00);
    border: 1.5px solid rgba(255,204,0,.3);
    border-radius: 999px;
    padding: .38rem .9rem;
    text-decoration: none;
    white-space: nowrap;
    transition: background .18s, border-color .18s, color .18s;
    letter-spacing: .02em;
}
.navbar-phone-pill:hover {
    background: rgba(255,204,0,.1);
    border-color: rgba(255,204,0,.6);
    color: var(--pub-nav-text, #fff5c3);
    text-decoration: none;
}
.navbar-phone-pill i {
    font-size: .75rem;
    animation: phonePulse 2.5s ease-in-out infinite;
}
@keyframes phonePulse {
    0%, 100% { transform: rotate(0deg) scale(1); }
    10%       { transform: rotate(-12deg) scale(1.1); }
    20%       { transform: rotate(10deg) scale(1.1); }
    30%       { transform: rotate(0deg) scale(1); }
}

.navbar-btn {
    margin-left: 2rem;
    white-space: nowrap;
}

.logo {
    width: auto;
    max-height: 100px;
    display: block;
    /* Плавне зменшення при прокрутці */
    transition: max-height 0.3s ease;
}

/* ── Кнопка адмінки в navbar-right (іконка на десктопі) ── */
.navbar-admin-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    background: rgba(34,197,94,.12);
    border: 1.5px solid rgba(34,197,94,.3);
    border-radius: 8px;
    padding: .42rem .7rem;
    color: #4ade80;
    text-decoration: none;
    font-size: .8rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background .18s, border-color .18s;
}
.navbar-admin-icon:hover {
    background: rgba(34,197,94,.22);
    border-color: rgba(34,197,94,.55);
    color: #86efac;
    text-decoration: none;
}
.navbar-admin-icon svg { flex-shrink: 0; }

/* ── Адаптивні хелпери ── */
.nb-desktop  { display: none !important; }
.nb-mobile   { display: inherit; }
/* Мобільна CTA прихована завжди, показується тільки в .menu-open через медіа */
.nb-mobile-cta { display: none !important; }
@media (min-width: 901px) {
    .nb-desktop { display: inline-flex !important; }
    .nb-mobile  { display: none !important; }
}

/* ...існуючий код... */

/* Бургер-іконка */
.burger-icon {
    display: none;
    flex-direction: column;
    justify-content: center;
    width: 44px;
    height: 44px;
    cursor: pointer;
    margin-left: auto;
    z-index: 1100;
    background: none;
    border: none;
    padding: 4px;
    border-radius: 8px;
    transition: background .18s;
}
.burger-icon:hover { background: rgba(255,179,0,.12); }
.burger-icon span {
    display: block;
    height: 3px;
    width: 100%;
    background: var(--pub-cta-dark, #ffb300);
    margin: 5px 0;
    border-radius: 2px;
    transition: transform .28s ease, opacity .2s ease;
    transform-origin: center;
}

/* Burger → X animation when .menu-open */
.navbar.menu-open .burger-icon span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.navbar.menu-open .burger-icon span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.navbar.menu-open .burger-icon span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Сховати чекбокс */
.burger-toggle {
    display: none;
}

/* ── Адаптивність ── */
@media (max-width: 900px) {
    .burger-icon {
        display: flex;
    }
    .navbar-menu,
    .btn-cta.nb-mobile-cta {
        display: none;
    }
    /* Phone pill — hidden on mobile (sticky call button at bottom) */
    .navbar-phone-pill {
        display: none;
    }
    /* Hide записатись btn in navbar on mobile */
    .navbar-right .btn-cta {
        display: none;
    }
    /* Hide right group spacing extra */
    .navbar-right {
        gap: .4rem;
        margin-left: .5rem;
    }

    /* Відкрите меню */
    .navbar.menu-open .navbar-menu {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        background: #1e2124;
        border-top: 1px solid rgba(255,204,0,.15);
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 1000;
        padding: .5rem 0 1rem;
        box-shadow: 0 8px 24px rgba(0,0,0,.35);
        gap: 0;
    }
    .navbar.menu-open .navbar-menu li {
        margin: 0;
        display: block;
    }
    .navbar.menu-open .navbar-menu li a {
        display: block;
        padding: .85rem 1.5rem;
        font-size: 1rem;
        border-bottom: 1px solid rgba(255,255,255,.04);
        min-height: 48px;
    }
    .navbar.menu-open .navbar-menu li a:hover {
        background: rgba(255,204,0,.08);
    }
    .navbar.menu-open .navbar-menu li a::after {
        display: none;
    }
    .navbar.menu-open .btn-cta.nb-mobile-cta {
        display: flex !important;
        margin: .75rem 1rem 0;
        border-radius: 10px;
        width: calc(100% - 2rem);
        padding: .85rem;
        font-size: 1rem;
        min-height: 48px;
    }
    .navbar-container {
        position: relative;
    }
}
