/* ============================================
   123WebMobile — "WOW" Layer
   Animated hero, tilt cards, magnetic buttons,
   sticky mobile CTA, popups, marquee, counters
   ============================================ */

/* === ANIMATED GRADIENT MESH HERO BACKGROUND === */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(0,201,167,0.35) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 60%, rgba(245,166,35,0.25) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 80%, rgba(0,201,167,0.2) 0%, transparent 60%);
  animation: meshFlow 18s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}
.hero-inner { position: relative; z-index: 1; }
@keyframes meshFlow {
  0%   { transform: scale(1) translate(0,0); opacity: 1; }
  50%  { transform: scale(1.15) translate(2%,-2%); opacity: 0.85; }
  100% { transform: scale(1.05) translate(-2%,3%); opacity: 1; }
}

/* Page headers get a subtle version */
.page-hero { position: relative; overflow: hidden; }
.page-hero::after {
  content: '';
  position: absolute;
  top: -40%; right: -20%;
  width: 70%; height: 140%;
  background: radial-gradient(circle, rgba(0,201,167,0.22) 0%, transparent 60%);
  animation: floatOrb 16s ease-in-out infinite;
  pointer-events: none;
}
@keyframes floatOrb {
  0%, 100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(-8%, 5%) scale(1.1); }
}

/* === 3D TILT CARDS (service / blog / testimonial) === */
.service-card, .blog-card, .testimonial-card, .case-card {
  transform-style: preserve-3d;
  transition: transform 0.35s cubic-bezier(.25,.46,.45,.94), box-shadow 0.35s, border-color 0.35s;
  will-change: transform;
}

/* === MAGNETIC BUTTONS === */
.btn-primary, .btn-secondary, .nav-cta {
  transition: transform 0.25s cubic-bezier(.25,.46,.45,.94), box-shadow 0.25s, background 0.3s;
  will-change: transform;
}

/* === SCROLL-TRIGGERED COUNTER STATS === */
.stat-num {
  display: inline-block;
  transition: color 0.3s;
}
.stat-num.counting { color: var(--teal); }

/* === TESTIMONIAL MARQUEE === */
.marquee-wrap {
  overflow: hidden;
  padding: 20px 0;
  mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
}
.marquee-track {
  display: flex;
  gap: 24px;
  animation: marquee 48s linear infinite;
  width: max-content;
}
.marquee-track:hover { animation-play-state: paused; }
.marquee-card {
  flex-shrink: 0;
  width: 360px;
  padding: 24px;
  background: var(--white);
  border-radius: 14px;
  box-shadow: var(--shadow);
  border: 1px solid var(--light-gray);
}
html[data-theme="dark"] .marquee-card { background: var(--off-white); border-color: rgba(255,255,255,0.1); }
.marquee-card .stars { color: #f5a623; font-size: 14px; margin-bottom: 8px; letter-spacing: 2px; }
.marquee-card p { font-size: 14px; color: var(--text); line-height: 1.6; margin-bottom: 12px; font-style: italic; }
.marquee-card .author { font-size: 13px; color: var(--text-light); font-weight: 600; }
.marquee-card .author strong { color: var(--text); font-weight: 700; }
@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(calc(-100% / 2)); }
}

/* === STICKY MOBILE ACTION BAR === */
.mobile-action-bar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 950;
  background: var(--white);
  border-top: 1px solid var(--light-gray);
  padding: 10px 12px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
  backdrop-filter: blur(10px);
}
html[data-theme="dark"] .mobile-action-bar { background: var(--off-white); border-top-color: rgba(255,255,255,0.1); }
.mobile-action-bar .row { display: flex; gap: 8px; max-width: 500px; margin: 0 auto; }
.mobile-action-bar a {
  flex: 1;
  text-align: center;
  padding: 12px 8px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  transition: transform 0.2s;
}
.mobile-action-bar a:active { transform: scale(0.96); }
.mobile-action-bar .call  { background: var(--teal); color: var(--deep); }
.mobile-action-bar .quote { background: var(--deep); color: #fff; }
.mobile-action-bar .chat  { background: #25d366; color: #fff; }
.mobile-action-bar .ico   { font-size: 16px; line-height: 1; }
@media (max-width: 768px) {
  .mobile-action-bar { display: block; }
  body { padding-bottom: 76px; padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .whatsapp-float { bottom: 88px !important; }
  .pwa-install-float { bottom: 146px !important; }
}

/* === LIVE ACTIVITY NOTIFICATIONS === */
.live-activity {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 950;
  max-width: 320px;
  background: var(--white);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.12);
  border: 1px solid var(--light-gray);
  display: flex;
  gap: 12px;
  align-items: center;
  transform: translateX(-120%);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(.25,.46,.45,.94), opacity 0.4s;
}
html[data-theme="dark"] .live-activity { background: var(--off-white); border-color: rgba(255,255,255,0.1); }
.live-activity.show { transform: translateX(0); opacity: 1; }
.live-activity-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.live-activity-text { font-size: 13px; color: var(--text); line-height: 1.4; }
.live-activity-text strong { font-weight: 700; }
.live-activity-time { font-size: 11px; color: var(--text-light); margin-top: 2px; }
@media (max-width: 768px) {
  .live-activity { bottom: 88px; left: 12px; max-width: calc(100% - 24px); }
}

/* === EXIT-INTENT POPUP === */
.exit-popup {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(10,22,40,0.75);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s;
}
.exit-popup.show { display: flex; }
.exit-popup-card {
  background: var(--white);
  border-radius: 20px;
  max-width: 480px;
  width: 100%;
  padding: 40px 32px;
  text-align: center;
  position: relative;
  box-shadow: 0 30px 80px rgba(0,0,0,0.3);
  animation: popIn 0.4s cubic-bezier(.34,1.56,.64,1);
}
html[data-theme="dark"] .exit-popup-card { background: var(--off-white); }
.exit-popup-close {
  position: absolute;
  top: 12px; right: 16px;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--text-light);
  line-height: 1;
  padding: 4px 10px;
}
.exit-popup-close:hover { color: var(--text); }
.exit-popup .badge {
  display: inline-block;
  padding: 5px 14px;
  background: rgba(0,201,167,0.15);
  color: var(--teal-dark);
  border-radius: 50px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 16px;
}
.exit-popup h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  line-height: 1.2;
  margin-bottom: 12px;
  color: var(--text);
}
.exit-popup p { color: var(--text-light); margin-bottom: 24px; font-size: 0.95rem; }
.exit-popup input {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--light-gray);
  border-radius: 50px;
  font-size: 15px;
  font-family: inherit;
  margin-bottom: 12px;
  outline: none;
  background: var(--white);
  color: var(--text);
}
.exit-popup input:focus { border-color: var(--teal); }
.exit-popup button {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  color: #fff;
  border: none;
  border-radius: 50px;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
}
.exit-popup button:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,201,167,0.35); }
.exit-popup-footer { font-size: 12px; color: var(--text-light); margin-top: 12px; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { transform: scale(0.9) translateY(20px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }

/* === TRUST BADGE BAR === */
.trust-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
  padding: 32px 20px;
  background: var(--off-white);
  border-top: 1px solid var(--light-gray);
  border-bottom: 1px solid var(--light-gray);
}
html[data-theme="dark"] .trust-badges { background: var(--off-white); border-color: rgba(255,255,255,0.08); }
.trust-badge-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-light);
  font-size: 13px;
  font-weight: 600;
  opacity: 0.75;
  transition: opacity 0.2s;
}
.trust-badge-item:hover { opacity: 1; color: var(--teal); }
.trust-badge-item .icon { font-size: 20px; }

/* === REVIEW STARS (INLINE) === */
.inline-reviews {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: rgba(245,166,35,0.08);
  border-radius: 12px;
  margin: 20px 0;
}
.inline-reviews .stars { color: #f5a623; font-size: 18px; letter-spacing: 2px; }
.inline-reviews .count { font-size: 14px; color: var(--text); font-weight: 600; }
.inline-reviews .link { font-size: 13px; color: var(--teal); font-weight: 600; margin-left: auto; }

/* === BEFORE/AFTER SLIDER === */
.ba-slider {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 40px auto;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16/9;
  cursor: ew-resize;
  user-select: none;
  box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}
.ba-slider img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ba-after-wrap { position: absolute; inset: 0; width: 50%; overflow: hidden; border-right: 3px solid var(--teal); }
.ba-handle {
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  width: 48px;
  margin-left: -24px;
  cursor: ew-resize;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ba-handle-dot {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--teal);
  color: var(--deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 900;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.ba-label {
  position: absolute;
  top: 16px;
  padding: 4px 14px;
  background: rgba(10,22,40,0.85);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  border-radius: 50px;
  z-index: 1;
}
.ba-label.before { left: 16px; }
.ba-label.after  { right: 16px; }

/* === HIDE EVERYTHING WHEN PRINTING === */
@media print {
  .hero::before, .page-hero::after,
  .marquee-wrap, .mobile-action-bar, .live-activity,
  .exit-popup, .trust-badges, .ba-slider {
    display: none !important;
  }
}
