/* =========================================================
   Alterations Plus PH - Navbar Only Fix
   No duplicate Book Now CTA.
   Top state: logo left + liquid-glass pill links.
   After 15% scroll: clean minimalist horizontal navbar.
   ========================================================= */

:root {
  --aph-nav-crimson: var(--crimson, #8B0000);
  --aph-nav-red: var(--red-btn, #A40E0E);
  --aph-nav-cream: var(--cream, #FFF5E6);
  --aph-nav-dark: var(--dark, #111111);
  --aph-nav-text: var(--text, #1D1714);
  --aph-nav-muted: var(--muted, #756B63);
  --aph-nav-line: var(--line, #E7DDD2);
  --aph-nav-font: var(--font-body, "Montserrat", Arial, sans-serif);
  --aph-nav-shadow: 0 22px 54px rgba(24, 18, 14, 0.16);
}

/* Neutralize older split-navbar rules if earlier CSS is still loaded. */
.split-public-header,
.split-nav-inner,
.split-nav-pill,
.split-nav-toggle,
.split-nav-logo-link,
.split-nav-logo {
  all: unset;
  box-sizing: border-box;
}

/* Main fixed header */
.aph-public-navbar {
  position: fixed;
  top: 18px;
  left: 0;
  width: 100%;
  z-index: 1200;
  padding-inline: clamp(16px, 4vw, 64px);
  pointer-events: none;
  transition:
    top 360ms cubic-bezier(.22, 1, .36, 1),
    padding-inline 360ms cubic-bezier(.22, 1, .36, 1),
    filter 360ms ease;
}

.aph-nav-shell {
  width: min(1440px, 100%);
  margin-inline: auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(18px, 3vw, 48px);
  pointer-events: none;
  transition:
    min-height 360ms cubic-bezier(.22, 1, .36, 1),
    padding 360ms cubic-bezier(.22, 1, .36, 1),
    background 360ms ease,
    border-color 360ms ease,
    box-shadow 360ms ease,
    backdrop-filter 360ms ease,
    border-radius 360ms ease;
}

/* Logo: always separate, no pill. */
.aph-nav-logo-link {
  pointer-events: auto;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  transition:
    transform 360ms cubic-bezier(.22, 1, .36, 1),
    opacity 260ms ease;
}

.aph-nav-logo-link:hover {
  transform: translateY(-1px);
}

.aph-nav-logo-img {
  display: block;
  height: clamp(52px, 5vw, 74px);
  width: auto;
  max-width: min(250px, 42vw);
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(24, 18, 14, 0.16));
  transition:
    height 360ms cubic-bezier(.22, 1, .36, 1),
    filter 360ms ease;
}

.aph-nav-logo-text {
  color: var(--aph-nav-crimson);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
}

.aph-nav-logo-text small {
  color: #16110f;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

/* Right side container */
.aph-nav-right {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

/* Top state: liquid-glass pill containing Home to Track. */
.aph-nav-links {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 62px;
  padding: 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.42), rgba(255, 245, 230, 0.24)),
    rgba(255, 255, 255, 0.25);
  box-shadow:
    0 24px 54px rgba(24, 18, 14, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    inset 0 -1px 0 rgba(139, 0, 0, 0.06);
  backdrop-filter: blur(22px) saturate(1.35);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
  transition:
    min-height 360ms cubic-bezier(.22, 1, .36, 1),
    padding 360ms cubic-bezier(.22, 1, .36, 1),
    border-radius 360ms cubic-bezier(.22, 1, .36, 1),
    border-color 360ms ease,
    background 360ms ease,
    box-shadow 360ms ease,
    backdrop-filter 360ms ease,
    gap 360ms ease;
}

.aph-nav-links a {
  min-height: 44px;
  padding: 0 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #211a17;
  font-family: var(--aph-nav-font);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  white-space: nowrap;
  line-height: 1;
  transition:
    color 260ms ease,
    background 260ms ease,
    box-shadow 260ms ease,
    transform 260ms ease,
    padding 360ms cubic-bezier(.22, 1, .36, 1),
    min-height 360ms cubic-bezier(.22, 1, .36, 1),
    border-color 260ms ease;
}

.aph-nav-links a:hover {
  color: var(--aph-nav-crimson);
  background: rgba(255, 255, 255, 0.38);
  transform: translateY(-1px);
}

.aph-nav-links a.active {
  color: #ffffff !important;
  background: linear-gradient(135deg, #da1717 0%, var(--aph-nav-crimson) 100%);
  box-shadow: 0 12px 22px rgba(139, 0, 0, 0.26);
}

.aph-nav-links a.aph-nav-logout {
  color: var(--aph-nav-crimson);
  border: 1px solid rgba(139, 0, 0, 0.18);
  background: rgba(255, 255, 255, 0.58);
}

.aph-nav-links a.aph-nav-logout:hover {
  color: #ffffff;
  background: linear-gradient(135deg, #da1717 0%, var(--aph-nav-crimson) 100%);
  box-shadow: 0 12px 22px rgba(139, 0, 0, 0.20);
}

/* Scrolled state after 15%: minimalist horizontal navbar. */
.aph-public-navbar.is-scrolled {
  top: 0;
  padding-inline: 0;
}

.aph-public-navbar.is-scrolled .aph-nav-shell {
  width: 100%;
  max-width: none;
  min-height: 76px;
  padding: 0 clamp(22px, 5vw, 80px);
  border-radius: 0;
  border-bottom: 1px solid rgba(139, 0, 0, 0.10);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 252, 248, 0.92));
  box-shadow: 0 14px 34px rgba(24, 18, 14, 0.08);
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
}

.aph-public-navbar.is-scrolled .aph-nav-logo-img {
  height: 54px;
  filter: drop-shadow(0 7px 12px rgba(24, 18, 14, 0.10));
}

.aph-public-navbar.is-scrolled .aph-nav-links {
  min-height: 54px;
  padding: 0;
  gap: clamp(18px, 2.8vw, 34px);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.aph-public-navbar.is-scrolled .aph-nav-links a {
  min-height: 54px;
  padding: 0;
  border-radius: 0;
  color: #2b211d;
  background: transparent;
  box-shadow: none;
  position: relative;
}

.aph-public-navbar.is-scrolled .aph-nav-links a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 10px;
  width: 0;
  height: 2px;
  border-radius: 99px;
  background: var(--aph-nav-crimson);
  transform: translateX(-50%);
  transition: width 240ms ease;
}

.aph-public-navbar.is-scrolled .aph-nav-links a:hover,
.aph-public-navbar.is-scrolled .aph-nav-links a.active {
  color: var(--aph-nav-crimson) !important;
  transform: none;
}

.aph-public-navbar.is-scrolled .aph-nav-links a:hover::after,
.aph-public-navbar.is-scrolled .aph-nav-links a.active::after {
  width: 100%;
}

/* Mobile toggle */
.aph-nav-toggle {
  display: none;
  pointer-events: auto;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(139, 0, 0, 0.12);
  border-radius: 999px;
  background: rgba(255, 252, 247, 0.94);
  box-shadow: 0 16px 34px rgba(24, 18, 14, 0.14);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.aph-nav-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 99px;
  background: var(--aph-nav-crimson);
  transition: transform 240ms ease, opacity 180ms ease;
}

.aph-public-navbar.menu-open .aph-nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.aph-public-navbar.menu-open .aph-nav-toggle span:nth-child(2) {
  opacity: 0;
}

.aph-public-navbar.menu-open .aph-nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Responsive */
@media (max-width: 1080px) {
  .aph-nav-links a {
    padding-inline: 15px;
  }

  .aph-public-navbar.is-scrolled .aph-nav-links {
    gap: 22px;
  }
}

@media (max-width: 920px) {
  .aph-public-navbar,
  .aph-public-navbar.is-scrolled {
    top: 12px;
    padding-inline: 16px;
  }

  .aph-public-navbar.is-scrolled .aph-nav-shell {
    width: min(1440px, 100%);
    min-height: 66px;
    padding: 0;
    border-radius: 0;
    border-bottom: none;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .aph-nav-logo-img,
  .aph-public-navbar.is-scrolled .aph-nav-logo-img {
    height: 50px;
  }

  .aph-nav-toggle {
    display: inline-flex;
  }

  .aph-nav-right {
    position: absolute;
    top: calc(100% + 12px);
    left: 16px;
    right: 16px;
    display: grid;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-10px);
    transition:
      opacity 240ms ease,
      transform 240ms ease;
  }

  .aph-public-navbar.menu-open .aph-nav-right {
    pointer-events: auto;
    opacity: 1;
    transform: translateY(0);
  }

  .aph-nav-links,
  .aph-public-navbar.is-scrolled .aph-nav-links {
    display: grid;
    width: 100%;
    min-height: unset;
    padding: 12px;
    gap: 8px;
    border-radius: 26px;
    border: 1px solid rgba(139, 0, 0, 0.10);
    background: rgba(255, 252, 247, 0.98);
    box-shadow: var(--aph-nav-shadow);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }

  .aph-nav-links a,
  .aph-public-navbar.is-scrolled .aph-nav-links a {
    width: 100%;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 16px;
    color: #241d1a;
    background: rgba(139, 0, 0, 0.04);
  }

  .aph-public-navbar.is-scrolled .aph-nav-links a::after {
    display: none;
  }

  .aph-nav-links a.active,
  .aph-public-navbar.is-scrolled .aph-nav-links a.active {
    color: #ffffff !important;
    background: linear-gradient(135deg, #da1717 0%, var(--aph-nav-crimson) 100%);
  }
}

@media (max-width: 560px) {
  .aph-public-navbar,
  .aph-public-navbar.is-scrolled {
    top: 10px;
    padding-inline: 14px;
  }

  .aph-nav-shell {
    min-height: 58px;
  }

  .aph-nav-logo-img,
  .aph-public-navbar.is-scrolled .aph-nav-logo-img {
    height: 44px;
    max-width: 190px;
  }

  .aph-nav-toggle {
    width: 48px;
    height: 48px;
  }

  .aph-nav-right {
    left: 14px;
    right: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .aph-public-navbar,
  .aph-nav-shell,
  .aph-nav-logo-img,
  .aph-nav-links,
  .aph-nav-links a,
  .aph-nav-toggle span {
    transition: none !important;
  }
}
