/* ===================================
   NAV / PAW-TRAIL MENU (DESKTOP + MOBILE SWIPER)
=================================== */

/* Box sizing */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ===================================
   MAIN MENU BAR
=================================== */
.main-menu {
  display: flex;
  width: 100%;
  background-color: rgba(173,216,230,0.8);
  /* Removed broken image reference: url('../images/.png'); */
  background-repeat: repeat-x;
  background-size: cover;
  background-position: top;

  position: sticky;
  top: 0;
  z-index: 1000;

  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  height: 140px;
  border: 2px solid #c2a27c;
  padding: 0 20px;

  align-items: center;
  justify-content: center;
}

/* If you truly need this for your layout, keep it.
   For sticky headers it is usually NOT needed, but leaving it here as you had it. */
.menu-placeholder {
  height: 140px;
  position: relative;
}

/* ===================================
   MENU LIST (DESKTOP DEFAULT)
=================================== */
.menu {
  display: flex;
  justify-content: space-between;

  list-style: none;
  padding: 0 20px;
  margin: 20px;
  gap: 24px;
}

.menu-item,
#start-paw,
#end-paw {
  position: relative;
  text-align: center;
  min-width: 100px;
  height: 100%;
  margin: 0 5px;
}

.menu-link {
  position: relative;
  z-index: 2;

  text-decoration: none;
  color: #001f4d;

  display: flex;
  margin-top: 25px;

  align-items: center;
  justify-content: center;

  height: 100%;
  max-width: 200px;

  font-family: "Cormorant Garamond", serif;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.2;

  flex-direction: column;
  padding: 10px;
}

/* Hover effect */
.menu-link:hover {
  color: #c8e1f5 !important;
  text-shadow: 0 0 12px rgba(109, 176, 243, 0.6);
  transition: color 0.8s ease, text-shadow 0.8s ease;
  font-weight: 900 !important;
}

/* ===================================
   PAW GLOW WRAPPER
=================================== */
.paw-glow-wrapper {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);

  width: 150px;
  height: 140px;

  display: flex;
  justify-content: center;
  align-items: center;

  z-index: 1;
  pointer-events: none;

  margin-top: -20px;

  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  perspective: 1000px;
  transform-style: preserve-3d;
}

/* ===================================
   BASE PAWPRINT STATE
=================================== */
.pawprint {
  width: 100px;
  height: auto;

  opacity: 0;
  transition: none !important;

  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: opacity, filter;
}

/* ===================================
   STAGGERED GAIT (permanent)
=================================== */
.menu-item[data-step="1"] .pawprint,
.menu-item[data-step="3"] .pawprint,
.menu-item[data-step="5"] .pawprint,
.menu-item[data-step="7"] .pawprint,
.menu-item[data-step="9"] .pawprint,
#start-paw .pawprint {
  transform: translateY(-10px) rotate(-5deg) !important;
}

.menu-item[data-step="2"] .pawprint,
.menu-item[data-step="4"] .pawprint,
.menu-item[data-step="6"] .pawprint,
.menu-item[data-step="8"] .pawprint,
.menu-item[data-step="10"] .pawprint,
#end-paw .pawprint {
  transform: translateY(10px) rotate(5deg) !important;
}

/* ===================================
   VISITED PAWS — permanent dim blue glow
=================================== */
.menu-item.visited .pawprint {
  opacity: 0.35 !important;
  filter:
    drop-shadow(0 0 5px #f7eec8)
    drop-shadow(0 0 10px #cae2f5)
    drop-shadow(0 0 15px #99cdf8);
}

/* Start paw — always softly glowing */
#start-paw .pawprint.visible {
  opacity: 0.35 !important;
  filter:
    drop-shadow(0 0 5px #f7eec8)
    drop-shadow(0 0 10px #cae2f5);
}

/* End paw — appears at the end, stays visible */
#end-paw .pawprint.visible {
  opacity: 0.35 !important;
}

/* ===================================
   SMOOTH FADE-IN (only on first visit)
=================================== */
.pawprint.fade-in-active {
  opacity: 0;
  animation: fadeInPaw 1.4s ease-in-out forwards;
}

@keyframes fadeInPaw {
  to { opacity: 0.35; }
}

#end-paw .pawprint.fade-in-active {
  animation: fadeInPawEnd 2.2s ease-in-out forwards;
}

@keyframes fadeInPawEnd {
  to { opacity: 0.35; }
}

/* ===================================
   COMPLETION NORMAL GLOW
=================================== */
.paw-glow-wrapper.completed .pawprint {
  opacity: 0.5 !important;
  filter:
    drop-shadow(0 0 10px #f7eec8)
    drop-shadow(0 0 20px #cae2f5)
    drop-shadow(0 0 30px #99cdf8);
  transition: filter 1.2s ease, opacity 0.8s ease;
}

/* Final dim state for end + start after completion */
#end-paw.completed .pawprint,
#start-paw.completed .pawprint {
  opacity: 0.5 !important;
  filter:
    drop-shadow(0 0 10px #f7eec8)
    drop-shadow(0 0 20px #cae2f5)
    drop-shadow(0 0 30px #99cdf8);
}

/* ===================================
   VERY BRIGHT GLOW (smooth brighten)
=================================== */
.paw-glow-wrapper.completed.glow-bright .pawprint {
  opacity: 1 !important;
  filter:
    drop-shadow(0 0 22px #f7eec8)
    drop-shadow(0 0 40px #cae2f5)
    drop-shadow(0 0 55px #48a0f7)
    drop-shadow(0 0 70px #037ffa);
  transition: filter 2.5s ease, opacity 2s ease;
}

/* ===================================
   SPARKLES (during bright phase)
=================================== */
.paw-glow-wrapper.completed.glow-bright .spark {
  position: absolute;
  width: 3px;
  height: 3px;
  background: radial-gradient(circle, #e6f9fa 0%, #9becf7 35%, #00ffff 65%, transparent 100%);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  animation: sparkFloat 10s ease-out forwards;
  z-index: 10;
  top: 50%;
  left: 50%;
  box-shadow: 0 0 12px #3b76f7, 0 0 20px #00ffff;
}

@keyframes sparkFloat {
  0% { transform: translate(0, 0) scale(1); opacity: 0; }
  20% { opacity: 0.9; }
  100% {
    transform: translate(var(--x), var(--y)) scale(0.4) translateY(-100px);
    opacity: 0;
  }
}

/* ===================================
   CURRENT PAGE HIGHLIGHT
=================================== */
.menu-item.active .menu-link {
  color: #ffd39b !important;
  font-weight: 800 !important;
  transition: color 0.6s ease, text-shadow 0.6s ease;
}

.menu-item.active .menu-link:hover {
  color: #c8e1f5 !important;
  text-shadow: 0 0 12px rgba(109, 176, 243, 0.6);
}

/* ===================================
   MOBILE: MINI SIDE-SWIPER VERSION
   (paw-trail only; no hamburger)
=================================== */
@media (max-width: 768px) {

  .main-menu{
    height: 84px;                 /* shorter bar on mobile */
    padding: 0 10px;
    justify-content: flex-start;  /* left aligned so swipe feels natural */
  }

  /* If you keep placeholder, match the mobile height too */
  .menu-placeholder{
    height: 84px;
  }

  /* UL becomes swipe strip */
  .menu{
    width: 100%;
    margin: 0;
    padding: 0 6px;

    display: flex;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 12px;

    overflow-x: auto;
    overflow-y: hidden;

    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;

    touch-action: pan-x;
  }

  /* Hide scrollbars but keep swipe */
  .menu::-webkit-scrollbar { height: 0; }
  .menu { scrollbar-width: none; }

  /* Each item becomes a compact “chip” that snaps */
  .menu-item,
  #start-paw,
  #end-paw{
    flex: 0 0 auto;
    min-width: 130px;             /* tweak: 120–160 depending on your labels */
    height: 84px;
    margin: 0;
    scroll-snap-align: start;
  }

  .menu-link{
    margin-top: 0;
    padding: 10px 10px;

    font-size: 14px;
    letter-spacing: 0.08em;
    line-height: 1.1;

    max-width: 160px;
  }

  /* Paw art scales down and tucks in */
  .paw-glow-wrapper{
    width: 92px;
    height: 84px;
    margin-top: -10px;
  }

  .pawprint{
    width: 62px;
  }

  /* Optional: subtle fade edges to hint “swipe” */
  .main-menu{
    -webkit-mask-image: linear-gradient(to right,
      transparent 0, black 18px, black calc(100% - 18px), transparent 100%);
    mask-image: linear-gradient(to right,
      transparent 0, black 18px, black calc(100% - 18px), transparent 100%);
  }
}

/* ===================================
   IMPORTANT:
   Removed the conflicting mobile block that was forcing .menu visible
   and hiding the hamburger. We are paw-trail only now.
=================================== */