/* Nav — przycisk rezerwacji (desktop: header, mobile: pływający bar) */

:root {
  --jh-cta-sand: #8f7d6b;
  --jh-cta-sand-dark: #756654;
  --jh-cta-cream: rgba(251, 248, 241, 0.94);
}

/* Right-side nav cluster: language dropdown + book CTA (single grid cell) */
.jh-nav-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  justify-self: end;
  align-self: center;
  flex-wrap: nowrap;
  min-width: 0;
  position: relative;
  z-index: 130;
  overflow: visible !important;
}

/* ── Desktop: elegancki pill w nagłówku ── */
@media (min-width: 992px) {
  .nav_cta {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 0.72rem 1.55rem;
    min-height: 48px;
    min-width: 10rem;
    background-color: var(--jh-cta-sand);
    color: #fff !important;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 22px rgba(111, 93, 74, 0.28);
    text-decoration: none;
    transition: background-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  }

  .nav_cta:hover {
    background-color: var(--jh-cta-sand-dark);
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 8px 28px rgba(111, 93, 74, 0.34);
  }

  .nav_cta .text-weight-medium {
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    line-height: 1.2;
    color: inherit !important;
    white-space: nowrap;
  }

  .nav_menu {
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .jh-book-float {
    display: none !important;
  }
}

/* ── Mobile: schowany header CTA, pływający bar na dole ── */
@media (max-width: 991px) {
  .nav_cta {
    display: none !important;
  }

  .jh-nav-actions {
    justify-self: end;
    gap: 0;
  }

  /* Villa pages — czytelny pasek nawigacji na jasnym tle zdjęcia */
  .page-villa .nav_component {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(251, 248, 241, 0.9);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(12, 12, 12, 0.08);
    box-shadow: 0 4px 24px rgba(12, 12, 12, 0.08);
  }

  .page-villa .nav_padding {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
    padding-top: max(0.4rem, env(safe-area-inset-top));
    padding-bottom: 0.4rem;
  }

  .page-villa .nav_wrapper {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
  }

  .page-villa .nav {
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.65rem;
  }

  .page-villa .nav_menu {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0;
    min-height: 44px;
    min-width: 44px;
    padding: 0.5rem 0.95rem;
    border-radius: 999px;
    background: #0c0c0c;
    color: #fbf8f1 !important;
    box-shadow: 0 2px 14px rgba(12, 12, 12, 0.2);
    cursor: pointer;
    line-height: 1;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  .page-villa .nav_menu .text-weight-medium {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    margin: 0;
    padding: 0;
    line-height: 1;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: inherit !important;
  }

  .page-villa .jh-nav-menu__text {
    display: block;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    color: inherit !important;
    line-height: 1;
  }

  .page-villa .jh-nav-menu__icon {
    display: inline-flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 3px;
    width: 16px;
    height: 12px;
    flex-shrink: 0;
    align-self: center;
  }

  .page-villa .jh-nav-menu__icon span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 1px;
    background: currentColor;
  }

  .page-villa .nav_brand {
    justify-self: center;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .page-villa .nav_brand-image-wrapper {
    width: 2.85rem !important;
    height: 2.85rem !important;
    border-radius: 50%;
    background: #fff;
    padding: 0.22rem;
    box-shadow: 0 2px 12px rgba(12, 12, 12, 0.12);
    border: 1px solid rgba(12, 12, 12, 0.08);
    box-sizing: border-box;
  }

  .page-villa .jh-nav-home {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 44px;
    padding: 0.55rem 0.85rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid rgba(12, 12, 12, 0.12);
    color: #0c0c0c;
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    line-height: 1;
    box-shadow: 0 2px 12px rgba(12, 12, 12, 0.08);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    white-space: nowrap;
  }

  .page-villa .jh-nav-home__icon {
    font-size: 0.95rem;
    line-height: 1;
    opacity: 0.85;
  }

  /* Overlay menu — pełny ekran, czytelny układ */
  .page-villa .nav-menu_component {
    z-index: 200;
    background: #fbf8f1;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .page-villa .nav-menu_component.is-open {
    display: flex !important;
  }

  body.menu-open .page-villa .nav_component {
    visibility: hidden;
    pointer-events: none;
  }

  .page-villa .nav-menu {
    width: 100% !important;
    max-width: 100%;
    height: 100%;
    min-height: 100dvh;
    background: #fbf8f1;
    padding:
      max(1rem, env(safe-area-inset-top))
      max(1.25rem, env(safe-area-inset-right))
      max(1.5rem, env(safe-area-inset-bottom))
      max(1.25rem, env(safe-area-inset-left));
    grid-column-gap: 0;
    grid-row-gap: 0;
    gap: 0;
    justify-content: flex-start;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .page-villa .nav-menu_top {
    width: 100%;
    flex-shrink: 0;
  }

  .page-villa .nav-menu_top .spacer-xlarge {
    display: none !important;
  }

  .page-villa .jh-menu-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(12, 12, 12, 0.08);
  }

  .page-villa .jh-menu-header__brand {
    grid-column: 2;
    justify-self: center;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.85rem;
    height: 2.85rem;
    border-radius: 50%;
    background: #fff;
    padding: 0.22rem;
    box-shadow: 0 2px 12px rgba(12, 12, 12, 0.1);
    border: 1px solid rgba(12, 12, 12, 0.08);
    text-decoration: none;
  }

  .page-villa .jh-menu-header__brand img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
  }

  .page-villa .jh-menu-header__actions {
    grid-column: 3;
    justify-self: end;
    display: flex;
    align-items: center;
  }

  .page-villa .nav-menu_close {
    justify-content: flex-end;
    margin: 0;
  }

  .page-villa .nav-menu_close-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    background: #0c0c0c;
    color: #fbf8f1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  .page-villa .nav-menu_close-text .text-weight-medium {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: inherit !important;
    line-height: 1;
  }

  .page-villa .nav-menu_list {
    width: 100%;
    flex: 1;
    gap: 0;
    grid-column-gap: 0;
    grid-row-gap: 0;
    padding-top: 0.25rem;
  }

  .page-villa .nav_menu-list-item {
    display: block;
    width: 100%;
    padding: 0.9rem 0;
    border-bottom: 1px solid rgba(12, 12, 12, 0.06);
    color: #0c0c0c !important;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
  }

  .page-villa .nav_menu-list-item:active {
    opacity: 0.65;
  }

  .page-villa .nav_menu-list-item p,
  .page-villa .nav_menu-list-item .text-size-large {
    margin: 0;
    color: #0c0c0c !important;
    font-size: 1.1rem !important;
    letter-spacing: 0.1em;
    line-height: 1.3;
  }

  .page-villa .nav-menu_bottom {
    width: 100%;
    flex-shrink: 0;
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(12, 12, 12, 0.08);
    align-items: flex-start;
    gap: 0.65rem;
  }

  .page-villa .nav-menu_contact-title .text-color-tertiary {
    color: rgba(12, 12, 12, 0.45) !important;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
  }

  .page-villa .nav-menu_contact-item {
    text-decoration: none;
    color: #0c0c0c !important;
  }

  .page-villa .nav-menu_contact-item p,
  .page-villa .nav-menu_contact-item .text-size-medium {
    margin: 0;
    color: #0c0c0c !important;
    font-size: 0.95rem !important;
    line-height: 1.5;
  }

  .nav_menu {
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  body.has-book-float {
    padding-bottom: calc(5.25rem + env(safe-area-inset-bottom));
  }

  body.menu-open .jh-book-float {
    opacity: 0;
    pointer-events: none;
    transform: translateY(120%);
  }

  .jh-book-float {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: max(1rem, env(safe-area-inset-bottom));
    z-index: 90;
    display: flex;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transform: translateY(110%);
    transition: opacity 0.35s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .jh-book-float.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .jh-book-float__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    width: 100%;
    max-width: 22rem;
    min-height: 52px;
    padding: 0.85rem 1.5rem;
    border-radius: 999px;
    background: var(--jh-cta-cream);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(143, 125, 107, 0.35);
    box-shadow:
      0 8px 32px rgba(12, 12, 12, 0.12),
      0 2px 8px rgba(143, 125, 107, 0.15);
    color: #0c0c0c;
    text-decoration: none;
    font-family: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  }

  .jh-book-float__btn:active {
    transform: scale(0.98);
  }

  .jh-book-float__label {
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap;
  }

  .jh-book-float__accent {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: var(--jh-cta-sand);
    color: #fff;
    font-size: 0.95rem;
    line-height: 1;
    flex-shrink: 0;
  }
}

@media (max-width: 380px) {
  .jh-book-float__label {
    font-size: 0.74rem;
    letter-spacing: 0.11em;
  }

  .page-villa .jh-nav-home__text {
    display: none;
  }

  .page-villa .jh-nav-home {
    min-width: 44px;
    padding: 0.55rem 0.7rem;
  }

  .page-villa .nav_menu {
    padding: 0.5rem 0.8rem;
  }
}
