/* ═══════════════════════════════════════════════════════════════
   PROPACK ELECTRONICS – Advanced Animations & Visual Enhancements
   Supplements style.css and inner.css
═══════════════════════════════════════════════════════════════ */

/* ─── KEYFRAME DEFINITIONS ──────────────────────────────────── */

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-14px); }
}

@keyframes floatYSlow {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%       { transform: translateY(-20px) rotate(6deg); }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(214,43,43,0); }
  50%       { box-shadow: 0 0 0 14px rgba(214,43,43,0.12); }
}

@keyframes pulseRing {
  0%   { transform: scale(1); opacity: .7; }
  100% { transform: scale(1.9); opacity: 0; }
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes bounceIn {
  0%   { transform: scale(0.5); opacity: 0; }
  60%  { transform: scale(1.08); opacity: 1; }
  80%  { transform: scale(0.96); }
  100% { transform: scale(1); }
}

@keyframes slideInLeft {
  from { transform: translateX(-60px); opacity: 0; }
  to   { transform: translateX(0);     opacity: 1; }
}

@keyframes slideInRight {
  from { transform: translateX(60px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

@keyframes fadeInUp {
  from { transform: translateY(30px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

@keyframes fadeInDown {
  from { transform: translateY(-20px); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

@keyframes drawLine {
  from { width: 0; }
  to   { width: 100%; }
}

@keyframes gradientShift {
  0%   { background-position: 0%   50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0%   50%; }
}

@keyframes typewriter {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0% 0 0); }
}

@keyframes zoomIn {
  from { transform: scale(1.08); }
  to   { transform: scale(1); }
}

@keyframes particleFloat {
  0%   { transform: translateY(0) translateX(0) scale(1); opacity: .6; }
  33%  { transform: translateY(-30px) translateX(10px) scale(1.2); opacity: .4; }
  66%  { transform: translateY(-15px) translateX(-8px) scale(.8); opacity: .7; }
  100% { transform: translateY(0) translateX(0) scale(1); opacity: .6; }
}

@keyframes countUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes borderRotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes waveMove {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ─── HERO ENHANCEMENTS ─────────────────────────────────────── */

/* Hero slide zoom effect on active */
.hero-slide.active {
  animation: zoomIn 6s ease-out forwards;
}

/* Animated gradient overlay on hero */
.hero-overlay {
  background: linear-gradient(
    135deg,
    rgba(0,0,0,.85) 0%,
    rgba(0,0,0,.65) 40%,
    rgba(214,43,43,.15) 70%,
    rgba(0,0,0,.5) 100%
  );
}

/* Hero badge pulse ring */
.hero-badge {
  position: relative;
  display: inline-block;
  animation: fadeInDown .7s ease forwards;
}
.hero-badge::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  animation: pulseRing 2.5s ease-out infinite;
  border: 2px solid var(--red, #D62B2B);
  pointer-events: none;
}

/* Hero title animated underline */
.hero-title .text-red {
  position: relative;
}
.hero-title .text-red::after {
  content: '';
  position: absolute;
  left: 0; bottom: -4px;
  height: 3px;
  background: var(--red, #D62B2B);
  animation: drawLine 1.2s ease 1s forwards;
  width: 0;
}

/* ─── STATS BAR ENHANCEMENTS ────────────────────────────────── */
.stats-bar {
  position: relative;
  overflow: hidden;
}
.stats-bar::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(214,43,43,.06), transparent);
  animation: shimmer 3.5s ease infinite;
  pointer-events: none;
}

.stat-item {
  animation: countUp .6s ease backwards;
}
.stat-item:nth-child(1) { animation-delay: .1s; }
.stat-item:nth-child(2) { animation-delay: .25s; }
.stat-item:nth-child(3) { animation-delay: .4s; }
.stat-item:nth-child(4) { animation-delay: .55s; }

/* ─── SECTION LABELS ANIMATED ───────────────────────────────── */
.section-label {
  position: relative;
  overflow: hidden;
}
.section-label::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0;
  height: 1px;
  width: 0;
  background: currentColor;
  transition: width .5s ease;
}
.section-header:hover .section-label::after,
.section-header.centered .section-label::after {
  width: 100%;
}

/* ─── ABOUT SECTION ENHANCEMENTS ────────────────────────────── */
.about-img-wrap {
  position: relative;
  overflow: visible;
}
.about-img-wrap::before {
  content: '';
  position: absolute;
  top: -16px; left: -16px;
  right: 40px; bottom: 40px;
  border: 3px solid var(--red, #D62B2B);
  border-radius: 18px;
  z-index: 0;
  transition: all .4s ease;
}
.about-img-wrap:hover::before {
  top: -22px; left: -22px;
  opacity: .6;
}
.about-img {
  position: relative;
  z-index: 1;
  border-radius: 16px;
  transition: transform .5s ease;
}
.about-img-wrap:hover .about-img {
  transform: scale(1.02);
}

/* About floating badge enhanced */
.about-exp-badge {
  animation: floatY 4s ease-in-out infinite;
  box-shadow: 0 8px 32px rgba(214,43,43,.35) !important;
  z-index: 10 !important;
}

/* About feature checkmarks */
.about-feat i {
  transition: transform .3s ease, color .3s ease;
}
.about-feat:hover i {
  transform: scale(1.3) rotate(-8deg);
  color: var(--red, #D62B2B);
}

/* ─── USP CARDS ENHANCED ────────────────────────────────────── */
.usp-card {
  position: relative;
  overflow: hidden;
}
.usp-card::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--red, #D62B2B), #ff6b6b);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s ease;
}
.usp-card:hover::before {
  transform: scaleX(1);
}
.usp-card::after {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(214,43,43,.05) 0%, transparent 60%);
  opacity: 0;
  transition: opacity .4s ease;
  pointer-events: none;
}
.usp-card:hover::after {
  opacity: 1;
}

.usp-icon-wrap {
  transition: transform .4s cubic-bezier(.34,1.56,.64,1);
  animation: pulseGlow 3s ease-in-out infinite;
}
.usp-card:hover .usp-icon-wrap {
  transform: scale(1.18) rotate(6deg);
}

/* ─── PRODUCT CARDS ENHANCED ────────────────────────────────── */
.prod-card {
  position: relative;
  overflow: hidden;
}
.prod-card::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent);
  transition: left .5s ease;
  pointer-events: none;
  z-index: 1;
}
.prod-card:hover::before {
  left: 150%;
}

/* Product image area hover parallax */
.prod-img {
  overflow: hidden;
  transition: all .4s ease;
}
.prod-card:hover .prod-img {
  transform: none; /* handled by ::before shimmer */
}

/* Product image backgrounds with real photo-like overlays */
.prod-img-photo {
  background-size: cover !important;
  background-position: center !important;
}
.prod-img-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,.35) 0%, transparent 60%);
  transition: opacity .3s ease;
}
.prod-card:hover .prod-img-photo::after {
  opacity: .5;
}

/* ─── SERVICE CARDS ENHANCED ────────────────────────────────── */
.service-card {
  position: relative;
  overflow: hidden;
  transition: all .35s cubic-bezier(.25,.8,.25,1) !important;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 0;
  background: var(--red, #D62B2B);
  transition: height .4s ease;
}
.service-card:hover::before {
  height: 100%;
}
.service-card .svc-num {
  transition: all .4s ease;
}
.service-card:hover .svc-num {
  color: var(--red, #D62B2B);
  transform: scale(1.15);
}
.service-card .svc-icon i {
  transition: transform .4s cubic-bezier(.34,1.56,.64,1);
}
.service-card:hover .svc-icon i {
  transform: scale(1.25) rotate(-8deg);
}

/* ─── INDUSTRIES CARDS ENHANCED ─────────────────────────────── */
.ind-card {
  position: relative;
  overflow: hidden;
  transition: all .35s ease !important;
}
.ind-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, var(--red, #D62B2B) 0%, transparent 50%);
  opacity: 0;
  transition: opacity .4s ease;
  pointer-events: none;
}
.ind-card:hover::after {
  opacity: .08;
}

.ind-img {
  position: relative;
  overflow: hidden;
}
.ind-img i {
  transition: transform .4s cubic-bezier(.34,1.56,.64,1) !important;
}
.ind-card:hover .ind-img i {
  transform: scale(1.25) !important;
}

/* ─── TESTIMONIAL CARDS ─────────────────────────────────────── */
.testi-card {
  position: relative;
  transition: all .35s ease !important;
}
.testi-card::before {
  content: '\201C';
  position: absolute;
  top: 8px; left: 16px;
  font-size: 5rem;
  font-family: Georgia, serif;
  color: var(--red, #D62B2B);
  opacity: .08;
  line-height: 1;
  pointer-events: none;
}
.testi-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(0,0,0,.12) !important;
}

/* ─── FLOORING BANNER ENHANCEMENTS ─────────────────────────── */
.flooring-banner {
  background-attachment: fixed !important; /* Parallax */
}
@media (max-width: 768px) {
  .flooring-banner {
    background-attachment: scroll !important;
  }
}
.f-stat {
  position: relative;
  overflow: hidden;
}
.f-stat::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: var(--red, #D62B2B);
  opacity: 0;
  transition: opacity .3s ease;
}
.f-stat:hover::before {
  opacity: 1;
}
.f-stat i {
  transition: transform .4s cubic-bezier(.34,1.56,.64,1);
}
.f-stat:hover i {
  transform: scale(1.3) rotate(12deg);
}

/* ─── CTA BAND ANIMATED BACKGROUND ──────────────────────────── */
.cta-band {
  background-size: 200% 200% !important;
  animation: gradientShift 8s ease infinite;
}
.cta-band::before {
  animation: floatYSlow 6s ease-in-out infinite;
}
.cta-band::after {
  content: '';
  position: absolute;
  bottom: -60px; right: -60px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(214,43,43,.2), transparent 70%);
  pointer-events: none;
  animation: floatYSlow 8s ease-in-out infinite reverse;
}

/* ─── BUTTON ENHANCEMENTS ───────────────────────────────────── */
.btn-primary {
  position: relative;
  overflow: hidden;
}
.btn-primary::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  background: rgba(255,255,255,.15);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width .5s ease, height .5s ease;
}
.btn-primary:hover::before {
  width: 300px; height: 300px;
}

/* ─── SECTION BACKGROUND PATTERNS ───────────────────────────── */

/* Dot grid pattern for light sections */
.section-dot-bg {
  background-image: radial-gradient(circle, rgba(214,43,43,.07) 1px, transparent 1px);
  background-size: 30px 30px;
}

/* Diagonal stripe accent */
.section-stripe-bg {
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 40px,
    rgba(214,43,43,.02) 40px,
    rgba(214,43,43,.02) 80px
  );
}

/* ─── FLOATING PARTICLES (decorative blobs) ─────────────────── */
.particles-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.particle {
  position: absolute;
  border-radius: 50%;
  opacity: .08;
  background: var(--red, #D62B2B);
  animation: particleFloat linear infinite;
}
.particle:nth-child(1)  { width:80px;  height:80px;  top:10%; left:5%;  animation-duration:9s;  animation-delay:0s; }
.particle:nth-child(2)  { width:50px;  height:50px;  top:30%; left:90%; animation-duration:12s; animation-delay:2s; }
.particle:nth-child(3)  { width:120px; height:120px; top:70%; left:15%; animation-duration:15s; animation-delay:4s; }
.particle:nth-child(4)  { width:40px;  height:40px;  top:80%; left:80%; animation-duration:10s; animation-delay:1s; }
.particle:nth-child(5)  { width:60px;  height:60px;  top:50%; left:50%; animation-duration:11s; animation-delay:3s; }

/* Dark section particles */
.particles-wrap.light .particle { background: #fff; opacity: .04; }

/* ─── SCROLL REVEAL – ENHANCED ───────────────────────────────── */
/* The .reveal class from product.css works with IntersectionObserver in inner.js */
/* Here we add stagger and scale variants */

.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal-scale.visible,
.reveal-scale.revealed {
  opacity: 1;
  transform: scale(1);
}

.reveal-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal-up.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ─── ANIMATED GRADIENT HEADINGS ─────────────────────────────── */
.gradient-text {
  background: linear-gradient(90deg, var(--red, #D62B2B) 0%, #ff6b6b 50%, var(--red, #D62B2B) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s linear infinite;
}

/* ─── NUMBER COUNTER GLOW ────────────────────────────────────── */
.stat-number {
  position: relative;
  display: inline-block;
}
.stat-item:hover .stat-number {
  animation: pulseGlow .5s ease;
  color: var(--red, #D62B2B);
}

/* ─── IMAGE HOVER ZOOM ───────────────────────────────────────── */
.img-zoom-wrap {
  overflow: hidden;
  border-radius: inherit;
}
.img-zoom-wrap img {
  transition: transform .6s cubic-bezier(.25,.46,.45,.94);
}
.img-zoom-wrap:hover img {
  transform: scale(1.07);
}

/* ─── CARD TILT (subtle 3D effect via CSS only) ─────────────── */
.tilt-card {
  transition: transform .3s ease, box-shadow .3s ease;
  transform-style: preserve-3d;
}
.tilt-card:hover {
  transform: perspective(600px) rotateY(-3deg) rotateX(2deg) translateY(-4px);
  box-shadow: 8px 16px 40px rgba(0,0,0,.14) !important;
}

/* ─── ANIMATED BORDER CARD ───────────────────────────────────── */
.animated-border {
  position: relative;
  border-radius: var(--radius-lg, 18px);
}
.animated-border::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--radius-lg, 18px) + 2px);
  background: linear-gradient(90deg, var(--red, #D62B2B), transparent, var(--red, #D62B2B));
  background-size: 300% 100%;
  animation: shimmer 3s linear infinite;
  opacity: 0;
  z-index: -1;
  transition: opacity .4s ease;
}
.animated-border:hover::before {
  opacity: 1;
}

/* ─── PAGE HERO (inner pages) ───────────────────────────────── */
.page-hero-section {
  position: relative;
  overflow: hidden;
}
.page-hero-section::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 4px;
  background: linear-gradient(90deg, var(--red, #D62B2B), #ff6b6b, var(--red, #D62B2B));
  background-size: 200% 100%;
  animation: shimmer 3s linear infinite;
}

/* ─── SCROLL PROGRESS BAR ────────────────────────────────────── */
#scrollProgress {
  position: fixed;
  top: 0; left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--red, #D62B2B), #ff6b6b);
  z-index: 9999;
  transition: width .1s linear;
  box-shadow: 0 0 8px rgba(214,43,43,.6);
}

/* ─── NAV MEGA MENU ENHANCED ─────────────────────────────────── */
.mega-menu {
  animation: fadeInDown .2s ease;
}
.mega-col ul li a {
  position: relative;
  padding-left: 0;
  transition: padding-left .2s ease, color .2s ease !important;
}
.mega-col ul li a::before {
  content: '→';
  position: absolute;
  left: -16px;
  opacity: 0;
  font-size: .75rem;
  color: var(--red, #D62B2B);
  transition: left .2s ease, opacity .2s ease;
}
.mega-col ul li a:hover {
  padding-left: 14px !important;
  color: var(--red, #D62B2B) !important;
}
.mega-col ul li a:hover::before {
  left: 0;
  opacity: 1;
}

/* ─── FOOTER ENHANCEMENTS ────────────────────────────────────── */
.footer {
  position: relative;
  overflow: hidden;
}
.footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--red, #D62B2B), transparent);
  opacity: .5;
}

/* ─── CONTACT FORM FOCUS EFFECTS ────────────────────────────── */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(214,43,43,.12) !important;
  transition: all .3s ease !important;
}

/* ─── LOADING SKELETON SHIMMER ───────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
}

/* ─── TOOLTIP STYLE ──────────────────────────────────────────── */
[data-tooltip] {
  position: relative;
}
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: var(--dark, #1a1a1a);
  color: #fff;
  font-size: .75rem;
  padding: 5px 10px;
  border-radius: 5px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 100;
}
[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ─── RESPONSIVE ANIMATION TWEAKS ───────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media (max-width: 768px) {
  .flooring-banner {
    background-attachment: scroll !important;
  }
  .about-img-wrap::before {
    display: none;
  }
  .particle {
    display: none;
  }
}
