/* ============================================================
   TrustPayZ — enhance.css
   Premium animations & polish layer (loads after styles.css)
   Adds: gradient shimmer, card lifts, button shine, scroll
   progress, staggered reveals, glow effects, micro-interactions
   ============================================================ */

/* ── SCROLL PROGRESS BAR (top of page) ── */
#scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--gold2), var(--teal));
  z-index: 200; transition: width .1s ease-out;
  box-shadow: 0 0 10px rgba(201,168,76,.5);
}

/* ── ANIMATED GRADIENT on hero headline highlight ── */
.hl {
  background: linear-gradient(90deg, #E8C96A 0%, #F5DD8F 25%, #C9A84C 50%, #F5DD8F 75%, #E8C96A 100%);
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 4s linear infinite;
}
@keyframes shimmer {
  to { background-position: 200% center; }
}

/* ── BUTTON SHINE SWEEP on hover ── */
.btn { position: relative; overflow: hidden; }
.btn::after {
  content: ""; position: absolute; top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.35), transparent);
  transition: left .6s ease;
}
.btn:hover::after { left: 100%; }

/* ── PRIMARY BUTTON pulse glow ── */
.btn-primary {
  box-shadow: 0 4px 14px rgba(13,43,94,0.18);
}
.hero-cta .btn-primary, .nav-act .btn-primary {
  animation: gentlePulse 2.6s ease-in-out infinite;
}
@keyframes gentlePulse {
  0%, 100% { box-shadow: 0 4px 14px rgba(13,43,94,0.18); }
  50% { box-shadow: 0 6px 22px rgba(201,168,76,0.35); }
}

/* ── ENHANCED CARD HOVER (services, why, reviews) ── */
.scard, .wcard, .stp, .acard {
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s ease, border-color .35s ease;
  will-change: transform;
}
.scard:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 18px 40px rgba(13,43,94,0.16);
}
.wcard:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 36px rgba(13,43,94,0.14);
  border-color: var(--gold);
}
.acard:hover {
  transform: translateY(-5px) scale(1.04);
  box-shadow: 0 16px 32px rgba(13,43,94,0.22);
}

/* ── SERVICE ICON animated on card hover ── */
.scard .si, .wcard .wi {
  transition: transform .4s cubic-bezier(.2,.8,.2,1), background .3s ease;
}
.scard:hover .si {
  transform: rotate(-6deg) scale(1.08);
  background: var(--gold);
}
.scard:hover .si svg { stroke: var(--navy); }
.wcard:hover .wi { transform: scale(1.12); background: rgba(201,168,76,.18); }

/* ── REVIEW CARDS lift + gold edge ── */
.reviews-grid > div {
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s ease, border-color .35s ease;
  position: relative;
}
.reviews-grid > div:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 36px rgba(13,43,94,0.13);
  border-color: var(--gold) !important;
}
.reviews-grid > div::before {
  content: "\201C"; position: absolute; top: 6px; right: 16px;
  font-family: Georgia, serif; font-size: 3rem; color: var(--gold);
  opacity: .12; line-height: 1;
}

/* ── STAR rating subtle shimmer ── */
.reviews-grid > div > div:first-child {
  animation: starGlow 3s ease-in-out infinite;
}
@keyframes starGlow {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(245,158,11,0)); }
  50% { filter: drop-shadow(0 0 4px rgba(245,158,11,.4)); }
}

/* ── STAT NUMBERS glow on reveal ── */
.statbox .v, .hstat .v, .pc-amt {
  text-shadow: 0 0 18px rgba(232,201,106,0.15);
}

/* ── RIBBON items hover ── */
.ritem {
  transition: transform .3s ease, background .3s ease;
  border-radius: 10px;
}
.ritem:hover {
  transform: translateY(-3px);
  background: rgba(13,43,94,.04);
}
.ritem:hover svg { animation: wiggle .5s ease; }
@keyframes wiggle {
  0%,100% { transform: rotate(0); }
  25% { transform: rotate(-8deg); }
  75% { transform: rotate(8deg); }
}

/* ── STAGGERED REVEAL (children animate in sequence) ── */
.rv { transition: opacity .6s cubic-bezier(.2,.8,.2,1), transform .6s cubic-bezier(.2,.8,.2,1); }
.svc .rv:nth-child(1) { transition-delay: 0s; }
.svc .rv:nth-child(2) { transition-delay: .08s; }
.svc .rv:nth-child(3) { transition-delay: .16s; }
.svc .rv:nth-child(4) { transition-delay: .24s; }
.svc .rv:nth-child(5) { transition-delay: .32s; }
.why-grid .rv:nth-child(1) { transition-delay: 0s; }
.why-grid .rv:nth-child(2) { transition-delay: .1s; }
.why-grid .rv:nth-child(3) { transition-delay: .2s; }
.why-grid .rv:nth-child(4) { transition-delay: .3s; }

/* ── FLOATING payment card (hero) gentle bob ── */
.pcard { animation: floatBob 5s ease-in-out infinite; }
@keyframes floatBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.float-chip.fc-1 { animation: floatBob 5s ease-in-out infinite .5s; }
.float-chip.fc-2 { animation: floatBob 5s ease-in-out infinite 1s; }

/* ── BADGE shine for non-utility warning ── */
.badge {
  transition: transform .3s ease;
}
.badge:hover { transform: scale(1.03); }

/* ── WHATSAPP FLOAT pulse ring ── */
.wa-float { position: fixed; }
.wa-float::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: #25D366; z-index: -1;
  animation: waPulse 2s ease-out infinite;
}
@keyframes waPulse {
  0% { transform: scale(1); opacity: .6; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* ── NAV brand logo subtle spin on hover ── */
.brand-mark { transition: transform .5s ease; }
.brand:hover .brand-mark { transform: rotate(360deg); }

/* ── SECTION HEADINGS underline grow on reveal ── */
.head h2 { position: relative; display: inline-block; }
.head h2::after {
  content: ""; position: absolute; bottom: -10px; left: 50%;
  width: 0; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold2));
  transform: translateX(-50%); transition: width .7s ease .2s;
}
.head.visible h2::after { width: 60px; }

/* ── PRICING table row hover ── */
.ptable tbody tr, .rtable tbody tr {
  transition: background .25s ease;
}
.ptable tbody tr:hover, .rtable tbody tr:hover {
  background: rgba(201,168,76,.07);
}

/* ── AMOUNT IN WORDS fade in ── */
#eq-amount-words {
  transition: opacity .3s ease;
  animation: fadeInWord .4s ease;
}
@keyframes fadeInWord {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── TRUST BADGES (pills) hover ── */
section .wrap span[style*="border-radius:100px"] {
  transition: transform .25s ease, background .25s ease;
  cursor: default;
}

/* ── FORM inputs focus glow ── */
.fld input:focus, .fld select:focus,
.efield input:focus, .egroup input:focus,
.price-in input:focus {
  box-shadow: 0 0 0 3px rgba(201,168,76,.15);
}

/* ── SUBMIT buttons success state ── */
.enq-submit, #f-submit {
  transition: all .3s ease;
}

/* ── REDUCE MOTION for accessibility ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .hl { -webkit-text-fill-color: var(--gold2); }
}

/* ============================================================
   MOBILE OVERFLOW & ALIGNMENT HARDENING
   ============================================================ */

/* Prevent any horizontal scroll/overflow site-wide */
html, body { max-width: 100%; overflow-x: hidden; }
* { max-width: 100%; }
img, svg, iframe { max-width: 100%; height: auto; }

/* Reviews grid responsive (overrides inline-ish layout) */
.reviews-grid { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) {
  .reviews-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .reviews-grid { grid-template-columns: 1fr; }
}

/* Services & why grids hard reset on small screens */
@media (max-width: 900px) {
  .svc { grid-template-columns: 1fr 1fr; }
  .why-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .svc { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .scard.wide { grid-column: span 1; flex-direction: column; }
}

/* Footer columns stack cleanly */
@media (max-width: 760px) {
  .fgrid { grid-template-columns: 1fr; gap: 28px; }
  .fbrand p { max-width: 100%; }
}

/* Trust badge pills wrap and shrink on mobile */
@media (max-width: 640px) {
  section .wrap span[style*="border-radius:100px"] {
    font-size: .78rem; padding: 6px 12px;
  }
  /* Stat band stacks */
  .statband { flex-direction: column; gap: 14px; }
  .statbox { width: 100%; }
}

/* Hero badges never overflow */
.badge { max-width: 100%; white-space: normal; height: auto; line-height: 1.4; }

/* Tables scroll horizontally instead of breaking layout */
@media (max-width: 640px) {
  .ptable table, .rtable table { font-size: .82rem; }
  td, th { padding: 9px 10px; }
}

/* Pricing custom box buttons full width on mobile */
@media (max-width: 640px) {
  .cbtns { width: 100%; }
  .cbtns .btn { width: 100%; justify-content: center; }
}

/* ============================================================
   SHOW HERO PAYMENT CARD ON MOBILE (scaled)
   ============================================================ */
@media (max-width: 900px) {
  .pcard-wrap { display: block !important; margin-top: 32px; max-width: 380px; }
}
@media (max-width: 420px) {
  .pcard-wrap { transform: scale(.92); transform-origin: top center; }
  .float-chip { display: none; } /* chips can overflow on tiny screens */
}

/* ============================================================
   ANIMATED SHOWCASE SECTION
   Floating cards + POS swipe + card-to-bank flow
   ============================================================ */
.showcase {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy2) 60%, var(--navy) 100%);
  position: relative; overflow: hidden; padding: 72px 0;
}
.showcase .grid-bg {
  position: absolute; inset: 0; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 44px 44px;
}
.showcase .head h2 { color: var(--white); }
.showcase .head p { color: #B9C8E2; }

.show-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  position: relative; z-index: 2; margin-top: 16px;
}
@media (max-width: 900px) { .show-grid { grid-template-columns: 1fr; gap: 40px; max-width: 420px; margin-left:auto; margin-right:auto; } }

.show-card {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px; padding: 28px 24px; text-align: center;
  backdrop-filter: blur(8px);
  display: flex; flex-direction: column; align-items: center;
}
.show-card h3 { color: var(--white); font-size: 1.05rem; margin: 18px 0 8px; }
.show-card p { color: #8BA4C8; font-size: .86rem; line-height: 1.6; }
.show-stage {
  width: 100%; height: 150px; position: relative;
  display: flex; align-items: center; justify-content: center;
}

/* ── 1. FLOATING CREDIT CARDS (stacked, bobbing) ── */
.fc-card {
  position: absolute; width: 150px; height: 94px; border-radius: 12px;
  box-shadow: 0 14px 30px rgba(0,0,0,.35);
  padding: 12px; color: #fff; overflow: hidden;
}
.fc-card .chip { width: 24px; height: 18px; border-radius: 4px; background: linear-gradient(135deg,#F5DD8F,#C9A84C); margin-bottom: 14px; }
.fc-card .num { font-size: .6rem; letter-spacing: 1.5px; font-family: monospace; opacity: .9; }
.fc-card .brand { position: absolute; bottom: 10px; right: 12px; font-weight: 800; font-size: .7rem; font-style: italic; opacity: .95; }
.fc-card.c1 { background: linear-gradient(135deg,#0D2B5E,#1E4D8C); transform: translate(-30px,-12px) rotate(-10deg); animation: floatCard1 4.5s ease-in-out infinite; z-index: 1; }
.fc-card.c2 { background: linear-gradient(135deg,#C9A84C,#E8C96A); transform: translate(30px,12px) rotate(8deg); animation: floatCard2 4.5s ease-in-out infinite; z-index: 2; }
.fc-card.c2 .num, .fc-card.c2 .brand { color: #0D2B5E; }
.fc-card.c2 .chip { background: linear-gradient(135deg,#0D2B5E,#1E4D8C); }
@keyframes floatCard1 {
  0%,100% { transform: translate(-30px,-12px) rotate(-10deg); }
  50% { transform: translate(-34px,-20px) rotate(-12deg); }
}
@keyframes floatCard2 {
  0%,100% { transform: translate(30px,12px) rotate(8deg); }
  50% { transform: translate(34px,4px) rotate(10deg); }
}

/* ── 2. POS MACHINE with card swiping ── */
.pos {
  position: relative; width: 100px; height: 130px;
}
.pos-body {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 76px; height: 96px; border-radius: 12px;
  background: linear-gradient(160deg,#22324d,#0D2B5E);
  border: 1px solid rgba(255,255,255,.15);
  box-shadow: 0 10px 24px rgba(0,0,0,.4);
}
.pos-screen {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  width: 54px; height: 30px; border-radius: 5px;
  background: #0A1F45; border: 1px solid rgba(45,212,191,.4);
  overflow: hidden;
}
.pos-screen::after {
  content: "✓"; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--teal); font-size: 1rem; font-weight: bold;
  opacity: 0; animation: posApprove 3s ease-in-out infinite;
}
.pos-keys {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  width: 54px; display: grid; grid-template-columns: repeat(3,1fr); gap: 4px;
}
.pos-keys i { height: 8px; border-radius: 2px; background: rgba(255,255,255,.18); }
.pos-slot {
  position: absolute; top: 4px; left: 50%; transform: translateX(-50%);
  width: 70px; height: 5px; border-radius: 3px; background: rgba(0,0,0,.5);
  z-index: 4;
}
.swipe-card {
  position: absolute; top: -8px; left: 50%; width: 64px; height: 40px;
  border-radius: 7px; background: linear-gradient(135deg,#C9A84C,#E8C96A);
  box-shadow: 0 6px 14px rgba(0,0,0,.35); z-index: 3;
  transform: translateX(-130%);
  animation: swipe 3s ease-in-out infinite;
}
.swipe-card .mag { position:absolute; top:8px; left:0; right:0; height:8px; background:rgba(0,0,0,.55); }
@keyframes swipe {
  0% { transform: translateX(-130%); }
  35% { transform: translateX(-20%); }
  55% { transform: translateX(-20%); }
  100% { transform: translateX(90%); }
}
@keyframes posApprove {
  0%,45% { opacity: 0; }
  60%,90% { opacity: 1; }
  100% { opacity: 0; }
}

/* ── 3. CARD → BANK money flow ── */
.flow-stage { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 0 10px; }
.flow-ic {
  width: 56px; height: 56px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.flow-ic.card { background: rgba(201,168,76,.2); }
.flow-ic.card svg { width: 28px; height: 28px; stroke: var(--gold2); fill: none; stroke-width: 1.6; }
.flow-ic.bank { background: rgba(45,212,191,.2); }
.flow-ic.bank svg { width: 28px; height: 28px; stroke: var(--teal); fill: none; stroke-width: 1.6; }
.flow-track { flex: 1; height: 3px; background: rgba(255,255,255,.12); margin: 0 8px; position: relative; border-radius: 3px; }
.flow-coin {
  position: absolute; top: 50%; left: 0; width: 18px; height: 18px;
  border-radius: 50%; background: linear-gradient(135deg,#F5DD8F,#C9A84C);
  transform: translate(-50%,-50%); box-shadow: 0 0 10px rgba(232,201,106,.6);
  display: flex; align-items: center; justify-content: center;
  font-size: .6rem; font-weight: bold; color: #0D2B5E;
  animation: coinFlow 2.4s ease-in-out infinite;
}
.flow-coin::after { content: "₹"; }
@keyframes coinFlow {
  0% { left: 0; opacity: 0; transform: translate(-50%,-50%) scale(.5); }
  15% { opacity: 1; transform: translate(-50%,-50%) scale(1); }
  85% { opacity: 1; transform: translate(-50%,-50%) scale(1); }
  100% { left: 100%; opacity: 0; transform: translate(-50%,-50%) scale(.5); }
}

@media (prefers-reduced-motion: reduce) {
  .fc-card, .swipe-card, .pos-screen::after, .flow-coin { animation: none !important; }
  .swipe-card { transform: translateX(-20%); }
}
