/* ============================================
   VEPRIX - SMOOTHNESS & ANIMATIONS
   Applies to ALL pages
   ============================================ */

/* ---------- 1. GLOBAL SMOOTH TRANSITIONS ---------- */
*{
  transition-property:color, background-color, border-color, transform, box-shadow, opacity;
  transition-duration:200ms;
  transition-timing-function:cubic-bezier(.4, 0, .2, 1);
}

/* Except for elements that shouldn't animate */
img, video, iframe{
  transition:none;
}

/* ---------- 2. SMOOTH SCROLL ---------- */
html{
  scroll-behavior:smooth;
  scroll-padding-top:80px;
}

/* ---------- 3. PAGE LOAD FADE-IN ---------- */
body{
  opacity:0;
  animation:pageLoadFade .5s ease forwards;
}

@keyframes pageLoadFade{
  from{opacity:0}
  to{opacity:1}
}

/* ---------- 4. SMOOTH HOVER EFFECTS ---------- */

a{
  transition:color .2s ease, background-color .2s ease, opacity .2s ease;
}

button{
  transition:all .25s cubic-bezier(.4, 0, .2, 1);
}

button:hover{
  transform:translateY(-1px);
}

button:active{
  transform:translateY(0) scale(.98);
}

/* ---------- 5. SMOOTH CARD HOVER ---------- */

.product-card,
.category-card,
.pick-card,
.feature-box,
.contact-info-card,
.stat-card,
.adv-card,
.team-card,
.faq-item{
  transition:transform .3s cubic-bezier(.2, .8, .3, 1),
             box-shadow .3s cubic-bezier(.2, .8, .3, 1),
             border-color .3s ease;
  will-change:transform;
}

/* ---------- 6. IMAGE SMOOTH LOADING ---------- */

img{
  opacity:0;
  animation:imageLoadFade .6s ease forwards;
}

@keyframes imageLoadFade{
  from{
    opacity:0;
    filter:blur(8px);
  }
  to{
    opacity:1;
    filter:blur(0);
  }
}

img[data-loaded="true"],
img[src=""]{
  animation:none;
  opacity:1;
}

/* ---------- 7. SCROLL-TRIGGERED FADE-IN ---------- */

.fade-in{
  opacity:0;
  transform:translateY(30px);
  transition:opacity .7s cubic-bezier(.2, .8, .3, 1),
             transform .7s cubic-bezier(.2, .8, .3, 1);
}

.fade-in.visible{
  opacity:1;
  transform:translateY(0);
}

/* ---------- 8. STAGGERED DELAYS ---------- */

.stagger > *:nth-child(1){transition-delay:0ms}
.stagger > *:nth-child(2){transition-delay:60ms}
.stagger > *:nth-child(3){transition-delay:120ms}
.stagger > *:nth-child(4){transition-delay:180ms}
.stagger > *:nth-child(5){transition-delay:240ms}
.stagger > *:nth-child(6){transition-delay:300ms}
.stagger > *:nth-child(7){transition-delay:360ms}
.stagger > *:nth-child(8){transition-delay:420ms}

/* ---------- 9. SMOOTH SEARCH FOCUS ---------- */

input[type="text"],
input[type="email"],
input[type="tel"],
textarea{
  transition:border-color .25s ease,
             box-shadow .25s ease,
             background-color .25s ease;
}

/* ---------- 10. SMOOTH DROPDOWN ---------- */

.nav-dropdown-menu,
.dropdown-menu{
  transition:opacity .25s ease,
             visibility .25s ease,
             transform .25s cubic-bezier(.2, .8, .3, 1);
}

/* ---------- 11. SMOOTH SLIDER TRANSITIONS ---------- */

.hero-slide{
  transition:opacity .8s cubic-bezier(.4, 0, .2, 1),
             visibility .8s cubic-bezier(.4, 0, .2, 1);
}

.ap-hero,
.quotation-banner{
  transition:all .3s ease;
}

/* ---------- 12. REDUCE MOTION (Accessibility) ---------- */

@media (prefers-reduced-motion:reduce){
  *,
  *::before,
  *::after{
    animation-duration:.01ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.01ms !important;
    scroll-behavior:auto !important;
  }
}

/* ---------- 13. MOBILE TOUCH FEEDBACK ---------- */

@media (hover:none){
  button:active,
  a:active,
  .product-card:active,
  .category-card:active{
    transform:scale(.98);
    transition-duration:100ms;
  }
}

/* ---------- 14. SMOOTH PERFORMANCE ---------- */

.product-card,
.category-card,
.pick-card,
.hero-slide,
.feature-box,
.quotation-banner{
  transform:translateZ(0);
  backface-visibility:hidden;
}

/* ---------- 15. CUSTOM SCROLLBAR ---------- */
::-webkit-scrollbar{
  width:10px;
  height:10px;
}
::-webkit-scrollbar-track{
  background:#F5F8FC;
}
::-webkit-scrollbar-thumb{
  background:linear-gradient(180deg,#063B70,#0A75D1);
  border-radius:5px;
  border:2px solid #F5F8FC;
}
::-webkit-scrollbar-thumb:hover{
  background:linear-gradient(180deg,#07549A,#18A8F0);
}