/* =============================================
   NEXFIT — Global UX/UI Enhancements
   ============================================= */

html, body {
  min-height: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body > main {
  flex: 1 0 auto;
}

body > footer {
  margin-top: auto;
  flex-shrink: 0;
}

/* ── Logo Presence ───────────────────────── */
.nf-site-logo {
  display: block;
  isolation: isolate;
  transform: translateZ(0);
  filter:
    drop-shadow(0 1px 0 rgba(118, 95, 75, 0.42))
    drop-shadow(0 8px 18px rgba(82, 66, 52, 0.16))
    contrast(1.08)
    saturate(1.06);
}

.nf-site-logo--nav {
  filter:
    drop-shadow(0 1px 0 rgba(118, 95, 75, 0.48))
    drop-shadow(0 10px 22px rgba(76, 60, 47, 0.17))
    contrast(1.1)
    saturate(1.08);
}

.nf-site-logo--footer {
  filter:
    drop-shadow(0 1px 0 rgba(91, 73, 57, 0.52))
    drop-shadow(0 12px 24px rgba(63, 52, 42, 0.18))
    contrast(1.12)
    saturate(1.08);
}

.nf-services-split-card {
  min-height: 100%;
}

.nf-services-split-image {
  margin-top: auto !important;
}

.nf-restoration-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 768px) {
  .nf-restoration-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.nf-service-media {
  aspect-ratio: 4 / 5;
  width: 100%;
  overflow: hidden;
  border-radius: 0.75rem;
  display: block;
}

.nf-service-media > img,
.nf-service-media > video {
  display: block;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center center;
}

.nf-nails-menu {
  display: grid;
  gap: 1.05rem;
}

.nf-nails-section {
  border-left: 2px solid rgba(47, 90, 55, 0.22);
  background: transparent;
  padding: 0.1rem 0 0.1rem 1rem;
}

.nf-nails-section h4 {
  margin: 0 0 0.65rem;
  color: #2f5a37;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.35;
  text-transform: uppercase;
}

.nf-nails-section ul {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nf-nails-section li {
  position: relative;
  color: #6e5647;
  font-size: 0.86rem;
  line-height: 1.45;
  padding-left: 0.85rem;
}

.nf-nails-section li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.25rem;
  height: 0.25rem;
  border-radius: 9999px;
  background: #2f5a37;
  opacity: 0.58;
}

.nf-nails-section strong {
  color: #45362e;
  font-weight: 700;
}

.nf-nails-section--design {
  border-color: rgba(194, 137, 89, 0.34);
}

/* ── Tablet + Mobile Readiness ───────────── */
@media (max-width: 1023px) {
  .reveal,
  .reveal-group > *,
  .reveal.visible,
  .reveal-group.visible > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  body.nf-page-ready {
    animation: none !important;
  }

  #nf-back-to-top {
    right: 1rem;
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    width: 44px;
    height: 44px;
  }

  .nf-carousel-track {
    gap: 1rem !important;
    padding-bottom: 1rem !important;
  }

  .nf-carousel-track > * {
    min-width: min(22rem, calc(100vw - 2rem)) !important;
    width: min(22rem, calc(100vw - 2rem)) !important;
  }

  .nf-pilates-showcase {
    gap: 1rem !important;
  }

  .nf-site-logo--nav {
    filter:
      drop-shadow(0 1px 0 rgba(118, 95, 75, 0.42))
      drop-shadow(0 8px 18px rgba(76, 60, 47, 0.14))
      contrast(1.08)
      saturate(1.05);
  }

  .nf-service-list {
    max-width: 100%;
  }

  .nf-service-list li {
    align-items: flex-start !important;
  }

  .nf-service-list span:last-child {
    line-height: 1.45;
    overflow-wrap: anywhere;
  }

  .nf-services-split-image {
    min-height: 18rem;
  }

  .nf-nails-section {
    padding: 0.05rem 0 0.05rem 0.9rem;
  }
}

@media (max-width: 767px) {
  nav > div[class*="max-w-screen-2xl"] {
    padding: 0.875rem 1rem !important;
    gap: 0.75rem;
  }

  nav .flex.items-center.gap-4 {
    gap: 0.5rem !important;
    flex-shrink: 0;
  }

  nav img {
    height: 2rem !important;
  }

  nav a.rounded-full {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 0.72rem 0.95rem !important;
    font-size: 0.72rem !important;
    line-height: 1.1;
    white-space: nowrap;
    transform: none !important;
  }

  .nf-service-list {
    display: grid;
    gap: 0.9rem !important;
  }

  .nf-service-list li {
    gap: 0.8rem !important;
  }

  .nf-service-list .material-symbols-outlined {
    font-size: 1.45rem !important;
    margin-top: 0.05rem !important;
  }

  .nf-service-list span:last-child {
    font-size: 0.98rem;
  }

  .nf-pilates-copy {
    padding: 1.25rem 1.1rem !important;
    border-radius: 1.5rem !important;
  }

  .nf-pilates-copy-inner {
    max-width: none !important;
  }

  .nf-pilates-title {
    font-size: clamp(1.7rem, 9vw, 2.2rem) !important;
    line-height: 0.98 !important;
    letter-spacing: -0.03em;
    text-wrap: balance;
    overflow-wrap: anywhere;
    margin-bottom: 1rem !important;
  }

  .nf-pilates-text {
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
    margin-bottom: 1rem !important;
  }

  .nf-pilates-text p {
    overflow-wrap: anywhere;
  }

  .nf-pilates-tags {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem !important;
  }

  .nf-pilates-tags span {
    min-height: 2.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.68rem 0.8rem !important;
    text-align: center;
    font-size: 0.74rem !important;
    line-height: 1.15;
    white-space: normal;
  }

  .nf-pilates-media {
    min-height: 16rem !important;
    border-radius: 1.5rem !important;
  }

  .nf-pilates-media img {
    object-position: center top !important;
  }

  main[class*="pt-32"] {
    padding-top: 6.5rem !important;
  }

  main[class*="pt-24"] {
    padding-top: 5.75rem !important;
  }

  section[class*="min-h-screen"] {
    min-height: auto !important;
  }

  section[class*="py-40"] {
    padding-top: 5rem !important;
    padding-bottom: 5rem !important;
  }

  section[class*="py-32"],
  header[class*="py-32"] {
    padding-top: 4.75rem !important;
    padding-bottom: 4.75rem !important;
  }

  section[class*="py-24"],
  header[class*="py-24"] {
    padding-top: 3.75rem !important;
    padding-bottom: 3.75rem !important;
  }

  #nf-toast {
    max-width: calc(100vw - 2rem);
    padding: 0.875rem 1rem;
    white-space: normal;
    text-align: center;
    border-radius: 1rem;
  }

  footer > div[class*="px-12"] {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  footer > div[class*="pt-12"] {
    padding-top: 2rem !important;
  }

  footer > div[class*="pb-6"] {
    padding-bottom: 1rem !important;
  }

  footer > div[class*="pt-5"] {
    padding-top: 1rem !important;
  }

  footer > div[class*="pb-2"] {
    padding-bottom: calc(0.875rem + env(safe-area-inset-bottom, 0px)) !important;
  }
}

#nf-floating-ui {
  position: fixed;
  inset: 0;
  z-index: 99000;
  pointer-events: none;
}

/* ── Scroll Reveal ────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.22,1,0.36,1), transform 0.7s cubic-bezier(0.22,1,0.36,1);
}

.reveal.reveal--left {
  transform: translateX(-40px);
}

.reveal.reveal--right {
  transform: translateX(40px);
}

.reveal.reveal--scale {
  transform: scale(0.93);
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* Staggered children */
.reveal-group > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.22,1,0.36,1), transform 0.6s cubic-bezier(0.22,1,0.36,1);
}

.reveal-group.visible > *:nth-child(1) { transition-delay: 0s; }
.reveal-group.visible > *:nth-child(2) { transition-delay: 0.1s; }
.reveal-group.visible > *:nth-child(3) { transition-delay: 0.2s; }
.reveal-group.visible > *:nth-child(4) { transition-delay: 0.3s; }
.reveal-group.visible > *:nth-child(5) { transition-delay: 0.4s; }

.reveal-group.visible > * {
  opacity: 1;
  transform: none;
}

/* ── Back-to-Top Button ───────────────────── */
#nf-back-to-top {
  position: absolute;
  bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #2f5a37;
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(47,90,55,0.35);
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
  transition: opacity 0.35s ease, transform 0.35s ease, background 0.2s ease;
}

#nf-back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

#nf-back-to-top:hover {
  background: #c28959;
}

#nf-back-to-top .material-symbols-outlined {
  font-size: 22px;
}

/* ── Mobile Top Menu ─────────────────────── */
#nf-mobile-nav-toggle,
#nf-mobile-topmenu {
  display: none;
}

@media (max-width: 767px) {
  #nf-mobile-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 4.6rem;
    height: 2.5rem;
    padding: 0 0.95rem;
    border-radius: 9999px;
    border: 1px solid rgba(47, 90, 55, 0.15);
    background: rgba(255, 255, 255, 0.72);
    color: #2f5a37;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 22px rgba(30, 36, 32, 0.08);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
  }

  #nf-mobile-nav-toggle.is-open {
    background: #2f5a37;
    color: #f5f4eb;
    border-color: #2f5a37;
  }

  #nf-mobile-topmenu {
    display: block;
    position: fixed;
    left: 1rem;
    right: 1rem;
    top: var(--nf-mobile-menu-top, 4.75rem);
    z-index: 49;
    padding: 0.85rem;
    border-radius: 1.35rem;
    border: 1px solid rgba(144, 106, 79, 0.14);
    background: rgba(245, 244, 235, 0.92);
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 42px rgba(30, 36, 32, 0.12);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-12px);
    transition: opacity 0.25s ease, transform 0.25s ease;
  }

  #nf-mobile-topmenu.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nf-mobile-topmenu-links {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
  }

  #nf-mobile-topmenu a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.8rem;
    padding: 0.8rem 1rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(144, 106, 79, 0.12);
    color: #5a4231;
    font-size: 0.86rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.01em;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  }

  #nf-mobile-topmenu a.nf-mobile-link-active {
    background: #2f5a37;
    border-color: #2f5a37;
    color: #f5f4eb;
  }
}

/* ── Toast Notification ───────────────────── */
#nf-toast {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #1e2420;
  color: #f5f4eb;
  padding: 1rem 2rem;
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  display: none;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  transition: transform 0.4s cubic-bezier(0.22,1,0.36,1), opacity 0.4s ease;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
}

#nf-toast.show {
  display: flex;
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

#nf-toast .toast-icon {
  width: 20px;
  height: 20px;
  background: #2f5a37;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}

/* ── Page Progress Bar ────────────────────── */
#nf-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, #2f5a37, #c28959);
  z-index: 99999;
  transition: width 0.1s linear;
  pointer-events: none;
}

/* ── Image Lazy Load Fade ─────────────────── */
img.lazy-img {
  opacity: 0;
  transition: opacity 0.6s ease;
}

img.lazy-img.loaded {
  opacity: 1;
}

/* ── Smooth hover underline for nav links ─── */
nav a:not(.rounded-full) {
  position: relative;
}

nav a:not(.rounded-full)::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: #2f5a37;
  transition: width 0.3s ease;
}

nav a:not(.rounded-full):hover::after {
  width: 100%;
}

/* ── Active Nav Link ──────────────────────── */
nav a.nf-nav-active:not(.rounded-full) {
  color: #2f5a37;
  font-weight: 600;
}

nav a.nf-nav-active:not(.rounded-full)::after {
  width: 100%;
}

/* ── No scrollbar utility ─────────────────── */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ── Animated Hero Background Orbs ──────── */
.nf-orb-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.nf-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.13;
  animation: nfOrbFloat 14s ease-in-out infinite alternate;
  will-change: transform;
}

.nf-orb-1 {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, #2f5a37, #6d8c74);
  top: -180px;
  right: -80px;
  animation-delay: 0s;
  animation-duration: 16s;
}

.nf-orb-2 {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, #c28959, #d4a574);
  bottom: -100px;
  left: -60px;
  animation-delay: -5s;
  animation-duration: 12s;
}

.nf-orb-3 {
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, #45362e, #6e5647);
  top: 30%;
  left: 35%;
  animation-delay: -9s;
  animation-duration: 18s;
  opacity: 0.07;
}

@media (max-width: 767px) {
  .nf-orb-container {
    display: none;
  }
}

@keyframes nfOrbFloat {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(20px, -30px) scale(1.05); }
  66%  { transform: translate(-15px, 20px) scale(0.97); }
  100% { transform: translate(30px, -15px) scale(1.08); }
}

/* ── Page Transition Overlay ─────────────── */
#nf-page-transition {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: #1e2420;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

#nf-page-transition.fade-out {
  opacity: 1;
  pointer-events: all;
}

/* Page enters with fade */
@keyframes nfPageEnter {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

body.nf-page-ready {
  animation: nfPageEnter 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ── Carousel functional ──────────────────── */
.nf-carousel-track {
  scroll-behavior: smooth;
}
