/* ==========================================================
   PREMIUM UI ENHANCEMENT LAYER
   - Adds subtle 3D depth, glassmorphism, motion & micro-interactions
   - Works WITH the existing dynamic theme engine (no colors hardcoded
     in a way that breaks theme switching — uses currentColor / the
     same Tailwind theme-* utility classes / rgba(0,0,0,*) overlays)
   - Pure CSS, no extra JS, no extra HTTP requests, GPU-friendly
     (only transform/opacity/filter are animated)
   ========================================================== */

/* ---------- Global perf-safe motion defaults ---------- */
:root {
  --pui-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --pui-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --pui-depth-1: 0 1px 2px rgba(0,0,0,0.06);
  --pui-depth-2: 0 6px 16px -4px rgba(0,0,0,0.18), 0 2px 6px -2px rgba(0,0,0,0.12);
  --pui-depth-3: 0 18px 40px -12px rgba(0,0,0,0.35), 0 8px 18px -8px rgba(0,0,0,0.22);
  --pui-depth-inset: inset 0 1px 0 rgba(255,255,255,0.06), inset 0 -1px 0 rgba(0,0,0,0.18);
}

/* Stronger blur radius (not opacity) on fixed bars so scrolling content
   underneath reads as a soft frosted blur instead of a sharp, distracting
   bleed-through. Opacity stays exactly as set by the theme engine. */
nav.fixed.top-0,
.lg\:hidden.fixed.bottom-0 {
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* Subtle page-load fade so the whole experience feels premium, not abrupt */
body { animation: pui-body-in .5s var(--pui-ease) both; }
@keyframes pui-body-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ==========================================================
   1) NAVBAR — layered glass + soft elevation on scroll feel
   ========================================================== */
nav.fixed.top-0 {
  box-shadow: var(--pui-depth-2);
  background-image: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0) 60%);
  transition: box-shadow .35s var(--pui-ease), backdrop-filter .35s var(--pui-ease);
}

/* Logo / brand mark gets a touch of lift */
nav a.flex.items-center.gap-2 {
  transition: transform .35s var(--pui-ease-spring);
}
nav a.flex.items-center.gap-2:hover {
  transform: translateY(-1px) scale(1.015);
}

/* Nav links: animated underline instead of flat color swap */
nav .hidden.lg\:flex a {
  position: relative;
  padding-bottom: 4px;
}
nav .hidden.lg\:flex a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  opacity: .85;
  transition: right .35s var(--pui-ease);
}
nav .hidden.lg\:flex a:hover::after,
nav .hidden.lg\:flex a.text-theme-primary::after {
  right: 0;
}

/* Currency / profile trigger buttons: tactile raised chip */
#headerCurrencyBtn,
#headerProfileBtn {
  box-shadow: var(--pui-depth-1);
  transition: transform .25s var(--pui-ease), box-shadow .25s var(--pui-ease), filter .25s var(--pui-ease);
}
#headerCurrencyBtn:hover {
  transform: translateY(-1px);
  box-shadow: var(--pui-depth-2);
}
#headerProfileBtn:hover {
  transform: translateY(-1px) scale(1.03);
  box-shadow: var(--pui-depth-2), 0 0 0 4px rgba(255,255,255,0.06);
}
#headerProfileBtn:active,
#headerCurrencyBtn:active {
  transform: translateY(0) scale(0.97);
}

/* Dropdown popovers: deeper glass + 3D pop-in (keeps Tailwind animate-in, just adds depth) */
#headerProfilePopover,
#headerCurrencyPopover {
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow: var(--pui-depth-3), var(--pui-depth-inset);
  transform-origin: top right;
}
#headerProfilePopover a,
#headerCurrencyPopover a {
  transition: transform .2s var(--pui-ease), background-color .2s var(--pui-ease);
}
#headerProfilePopover a:hover,
#headerCurrencyPopover a:hover {
  transform: translateX(2px);
}

/* Register CTA in navbar: subtle glossy sheen sweep on hover */
nav a[href="register.php"] {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
nav a[href="register.php"]::before {
  content: "";
  position: absolute;
  top: 0; left: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(115deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: skewX(-18deg);
  transition: left .6s var(--pui-ease);
  z-index: 1;
  pointer-events: none;
}
nav a[href="register.php"]:hover::before { left: 120%; }

/* ==========================================================
   2) MARQUEE — gentle depth so it doesn't look flat-pasted
   ========================================================== */
.marquee-container {
  box-shadow: var(--pui-depth-1);
}
.marquee-content a,
.marquee-content span {
  box-shadow: var(--pui-depth-1);
  transition: transform .3s var(--pui-ease-spring), box-shadow .3s var(--pui-ease);
}
.marquee-content a:hover {
  transform: translateY(-1px) scale(1.04);
  box-shadow: var(--pui-depth-2);
}

/* ==========================================================
   3) GLASS CARDS (index.php "glass-card-elite") — true 3D tilt feel
   ========================================================== */
.glass-card-elite {
  position: relative;
  box-shadow: var(--pui-depth-2), var(--pui-depth-inset);
  transform: translateZ(0);
  will-change: transform, box-shadow;
}
.glass-card-elite::before {
  /* faint top sheen for glass realism — purely decorative, no color override */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(160deg, rgba(255,255,255,0.07), rgba(255,255,255,0) 40%);
  pointer-events: none;
  opacity: .8;
  transition: opacity .4s var(--pui-ease);
}
.glass-card-elite:hover::before { opacity: 1; }

/* icon boxes get extra dimensional shadow on parent hover (kept from existing rotate/scale logic) */
.icon-box-elite {
  box-shadow: var(--pui-depth-1);
  transition: transform .4s var(--pui-ease-spring), box-shadow .4s var(--pui-ease), background-color .4s, color .4s;
}
.glass-card-elite:hover .icon-box-elite {
  box-shadow: var(--pui-depth-2);
}

/* Buttons sitewide using the theme button style: pressed/raised tactile depth */
.hero-cta,
a[class*="rounded-2xl"][class*="font-bold"],
button[id="support-main-btn"] {
  position: relative;
}

/* Primary hero buttons (matched via existing utility combo, theme-safe) */
section a[href="register.php"].rounded-2xl,
section a[href="new-order.php"].rounded-2xl {
  box-shadow: var(--pui-depth-2);
  transition: transform .3s var(--pui-ease-spring), box-shadow .3s var(--pui-ease), filter .3s var(--pui-ease);
}
section a[href="register.php"].rounded-2xl:hover,
section a[href="new-order.php"].rounded-2xl:hover {
  box-shadow: var(--pui-depth-3);
  filter: brightness(1.06);
}
section a[href="register.php"].rounded-2xl:active,
section a[href="new-order.php"].rounded-2xl:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: var(--pui-depth-1);
}

/* "View Services" glass button next to hero CTA */
section a.glass-card-elite[href="services.php"] {
  transition: transform .3s var(--pui-ease-spring), box-shadow .3s var(--pui-ease);
}
section a.glass-card-elite[href="services.php"]:hover {
  transform: translateY(-3px);
}

/* ==========================================================
   4) STAT COUNTERS — soft floating depth, staggered breathing glow
   ========================================================== */
.glass-card-elite:has(.counter-val) {
  text-align: center;
}
.counter-val { display: inline-block; }

/* ==========================================================
   5) REVIEW CARDS — avatar badge gets real elevation off the card
   ========================================================== */
.glass-card-elite .absolute.-top-10 {
  box-shadow: var(--pui-depth-3);
  transition: transform .4s var(--pui-ease-spring);
}
.glass-card-elite:hover .absolute.-top-10 {
  transform: translateY(-3px) rotate(-3deg) scale(1.04);
}

/* ==========================================================
   6) FAQ ACCORDION — smoother elevation + open-state lift
   ========================================================== */
details.glass-card-elite {
  transition: box-shadow .35s var(--pui-ease), transform .35s var(--pui-ease);
}
details.glass-card-elite[open] {
  box-shadow: var(--pui-depth-3);
  transform: translateY(-1px);
}
details.glass-card-elite summary {
  transition: color .25s var(--pui-ease);
}
details.glass-card-elite summary svg,
details.glass-card-elite summary i {
  transition: transform .45s var(--pui-ease-spring);
}

/* ==========================================================
   7) FOOTER — soft top separation glow + link micro-lift
   ========================================================== */
footer {
  position: relative;
}
footer::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.18) 35%, rgba(255,255,255,0.18) 65%, transparent);
}
footer a {
  display: inline-block;
  transition: transform .25s var(--pui-ease), color .25s var(--pui-ease);
}
footer a:hover {
  transform: translateX(3px);
}
footer .flex.flex-wrap.gap-4 a {
  box-shadow: var(--pui-depth-1);
  border-radius: 10px;
  padding: 6px;
  transition: transform .3s var(--pui-ease-spring), box-shadow .3s var(--pui-ease);
}
footer .flex.flex-wrap.gap-4 a:hover {
  transform: translateY(-3px) scale(1.08);
  box-shadow: var(--pui-depth-2);
}

/* Footer brand logo block: tiny dimensional nudge */
footer .md\:col-span-2 .flex.items-center.gap-2 {
  text-shadow: 0 1px 0 rgba(255,255,255,0.06);
}

/* ==========================================================
   8) MOBILE BOTTOM NAV — raised glass dock instead of flat bar
   ========================================================== */
.lg\:hidden.fixed.bottom-0 {
  box-shadow: 0 -8px 30px -8px rgba(0,0,0,0.35), var(--pui-depth-inset);
}
.lg\:hidden.fixed.bottom-0 a {
  transition: transform .3s var(--pui-ease-spring), opacity .3s var(--pui-ease);
}
.lg\:hidden.fixed.bottom-0 a:active {
  transform: scale(0.92);
}
.lg\:hidden.fixed.bottom-0 a i,
.lg\:hidden.fixed.bottom-0 a svg {
  transition: transform .35s var(--pui-ease-spring), filter .35s var(--pui-ease);
}
.lg\:hidden.fixed.bottom-0 a.text-theme-primary i,
.lg\:hidden.fixed.bottom-0 a.text-theme-primary svg {
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.25));
}

/* ==========================================================
   9) FLOATING SUPPORT WIDGET — buoyant 3D button
   ========================================================== */
#support-main-btn {
  box-shadow: var(--pui-depth-3);
  transition: transform .35s var(--pui-ease-spring), box-shadow .35s var(--pui-ease);
}
#support-main-btn:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 22px 45px -14px rgba(0,0,0,0.45), var(--pui-depth-inset);
}
#support-main-btn:active {
  transform: translateY(0) scale(0.95);
}
#support-sub-buttons a > div {
  box-shadow: var(--pui-depth-2);
  transition: transform .3s var(--pui-ease-spring), box-shadow .3s var(--pui-ease);
}
#support-sub-buttons a:hover > div {
  transform: translateY(-4px) scale(1.12);
  box-shadow: var(--pui-depth-3);
}
#support-sub-buttons a span {
  box-shadow: var(--pui-depth-2);
}

/* Gentle ambient float so the support button feels alive without being noisy */
@keyframes pui-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
#support-main-btn:not(:hover) {
  animation: pui-float 4.5s ease-in-out infinite;
}

/* ==========================================================
   10) POPUP MODAL — true elevated glass card feel
   ========================================================== */
[id^="site_dynamic_popup_"] > div {
  box-shadow: var(--pui-depth-3), var(--pui-depth-inset);
}

/* ==========================================================
   11) SCROLLBAR-LESS PAGES — keep perceived depth on long content
       via a faint top fade under the fixed navbar
   ========================================================== */
main.pt-20::before {
  content: "";
  position: fixed;
  top: 80px;
  left: 0; right: 0;
  height: 14px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.10), transparent);
  z-index: 40;
  pointer-events: none;
}

/* ==========================================================
   12) Respect small screens — slightly reduce hover-lift travel
       distance so mobile tap states don't feel jumpy, and skip
       the ambient float animation to save battery/CPU on mobile
   ========================================================== */
/* ==========================================================
   13) EYEBROW WITH SIDE LINES — "— LABEL —" pattern used above
       section headings (hero trust badge, "Social Proof",
       "Got Questions?" etc). Center text flanked by short
       horizontal lines. Uses theme-primary color so it stays
       correct across every theme/color the admin picks.
   ========================================================== */
.eyebrow-lines {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 14px;
}
.eyebrow-lines .eyebrow-text {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  white-space: nowrap;
  color: inherit;
}
.eyebrow-lines .eyebrow-line {
  height: 1px;
  width: 28px;
  background: currentColor;
  opacity: 0.55;
  border-radius: 1px;
  flex-shrink: 0;
}
@media (max-width: 480px) {
  .eyebrow-lines .eyebrow-line { width: 18px; }
}

/* ==========================================================
   14) TOUCH-DEVICE HOVER FIX — mobile browsers keep :hover
       "stuck" after a tap (no mouse to trigger :hover-leave),
       which made card glows/borders stay lit after scrolling
       past them. Restrict the colored hover effects to real
       pointer devices; touch devices get a quick tap-feedback
       via :active instead, which always resets on touch-end.
   ========================================================== */
@media (hover: none), (pointer: coarse) {
  .glass-card-elite:hover {
    transform: none;
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    box-shadow: var(--pui-depth-2), var(--pui-depth-inset);
  }
  .glass-card-elite:hover .icon-box-elite {
    background: rgba(255, 255, 255, 0.05);
    color: inherit;
    transform: none;
  }
  .glass-card-elite:active {
    transform: scale(0.98);
    transition: transform .15s var(--pui-ease);
  }
  .card:hover,
  .tool-list li:hover,
  nav .hidden.lg\:flex a:hover::after {
    transform: none !important;
  }
}

