/* ==========================================================================
   ExpoNexa — Animations & Interactive Visual Effects
   ========================================================================== */

/* Keyframe Animations */
@keyframes textShimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes floatGlowOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -25px) scale(1.12); }
  100% { transform: translate(-20px, 20px) scale(0.95); }
}

@keyframes floatGlowOrb2 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-35px, 20px) scale(1.08); }
  100% { transform: translate(25px, -30px) scale(0.92); }
}

@keyframes radarPing {
  0% { transform: scale(0.95); opacity: 0.8; }
  70% { transform: scale(2.4); opacity: 0; }
  100% { transform: scale(2.4); opacity: 0; }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(13, 148, 136, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(13, 148, 136, 0); }
}

@keyframes btnShineSweep {
  0% { transform: rotate(30deg) translateX(-150%); }
  25%, 100% { transform: rotate(30deg) translateX(150%); }
}

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

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

@keyframes pulseGreen {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

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

/* Ambient Luminous Orbs for Hero */
.hero-glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(85px);
  pointer-events: none;
  z-index: 1;
}

.hero-glow-orb-1 {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(13, 148, 136, 0.15) 0%, rgba(6, 164, 184, 0.06) 70%, transparent 100%);
  top: -120px;
  right: -100px;
  animation: floatGlowOrb 14s ease-in-out infinite alternate;
}

.hero-glow-orb-2 {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(5, 150, 105, 0.12) 0%, rgba(13, 148, 136, 0.05) 70%, transparent 100%);
  bottom: -150px;
  left: 5%;
  animation: floatGlowOrb2 16s ease-in-out infinite alternate;
}

/* Shimmering Text Class */
.text-shimmer {
  background: linear-gradient(90deg, #0d9488 0%, #06a4b8 30%, #0a7c72 60%, #0d9488 85%, #06a4b8 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textShimmer 6s linear infinite;
  display: inline-block;
}

/* Button Shine Sweep Effect */
.btn-shine {
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.3);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-shine::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(60deg, transparent 35%, rgba(255, 255, 255, 0.3) 50%, transparent 65%);
  transform: rotate(30deg) translateX(-150%);
  animation: btnShineSweep 5s infinite cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.btn-shine:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.4);
}

/* Radar Ping Dot */
.status-radar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 10px;
  height: 10px;
}

.status-radar-dot {
  width: 7px;
  height: 7px;
  background-color: var(--accent-emerald);
  border-radius: 50%;
  z-index: 2;
}

.status-radar-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  animation: radarPing 2s cubic-bezier(0, 0, 0.2, 1) infinite;
  z-index: 1;
}

/* Scroll-Triggered Reveal Classes */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger Children Animation */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-stagger.is-visible > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0.04s; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.10s; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.16s; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.22s; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 0.28s; }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 0.34s; }
.reveal-stagger.is-visible > *:nth-child(7) { transition-delay: 0.40s; }
.reveal-stagger.is-visible > *:nth-child(8) { transition-delay: 0.46s; }

@keyframes pageEnter {
  from { opacity: 0.8; }
  to { opacity: 1; }
}

#main-content.page-enter {
  animation: pageEnter 0.16s ease-out both;
}

/* Sleek Top Navigation Progress Bar */
#route-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #078B83, #2dd4bf, #10b981);
  z-index: 99999;
  pointer-events: none;
  transition: width 0.22s cubic-bezier(0.1, 0.9, 0.2, 1), opacity 0.2s ease;
  box-shadow: 0 0 10px rgba(7, 139, 131, 0.7);
  opacity: 0;
  width: 0;
}

.faq-answer {
  display: block;
  height: 0;
  overflow: hidden;
  opacity: 0;
  transition: height 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}

.faq-answer-inner {
  padding: 0 1rem 1rem;
}

.faq-answer-wrap .faq-answer-inner {
  padding: 0 20px 18px;
}

.faq-card {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-card.open {
  border-color: #0d9488 !important;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.1);
}

.faq-item.open .faq-answer {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .reveal-on-scroll,
  .reveal-stagger > *,
  #main-content.page-enter,
  .faq-answer,
  .faq-a-panel,
  .faq-answer-wrap {
    animation: none !important;
    transition-duration: 0.01ms !important;
    opacity: 1;
    transform: none;
  }
}

/* Interactive Hover Lift & Radial Spotlight for Cards */
.card, .event-card, .process-card, .trust-card, .edition-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease !important;
}

.card:hover, .event-card:hover, .process-card:hover, .trust-card:hover {
  transform: translateY(-5px) scale(1.005) !important;
  box-shadow: 0 20px 40px -10px rgba(13, 43, 42, 0.1), 0 0 0 1px rgba(13, 148, 136, 0.15) !important;
  border-color: var(--brand-primary-border) !important;
}

.card::after, .event-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(13, 148, 136, 0.04), transparent 40%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.card:hover::after, .event-card:hover::after {
  opacity: 1;
}

/* Sample Table Filter Tabs */
.sample-tabs-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.sample-tab-btn {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.15s ease;
}

.sample-tab-btn:hover {
  background: var(--brand-primary-light);
  color: var(--brand-primary);
  border-color: var(--brand-primary-border);
}

.sample-tab-btn.active {
  background: var(--brand-primary);
  color: #ffffff;
  border-color: var(--brand-primary);
  box-shadow: 0 2px 6px rgba(13, 148, 136, 0.25);
}

/* Sample Table Row Highlight Animation */
.sample-table tbody tr {
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.sample-table tbody tr:hover {
  background-color: #e6f7f5 !important;
}

.sample-table tbody tr.row-hidden {
  display: none;
}

/* Floating Real-Time Verification Badge */
.live-verification-ticker {
  position: fixed;
  bottom: 24px;
  left: 24px;
  background: rgba(13, 43, 42, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(13, 148, 136, 0.3);
  color: #ffffff;
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 500;
  box-shadow: 0 16px 36px rgba(13, 43, 42, 0.4), 0 0 0 1px rgba(13, 148, 136, 0.2);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 1000;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
  animation: slideInTicker 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.live-ticker-close {
  background: none;
  border: none;
  color: #8ab5b3;
  cursor: pointer;
  padding: 0 0.2rem;
  font-size: 1rem;
  line-height: 1;
  display: flex;
  align-items: center;
}

.live-ticker-close:hover {
  color: #ffffff;
}

.live-ticker-text {
  transition: opacity 0.3s ease, transform 0.3s ease;
  display: inline-block;
}

.live-ticker-text.fade-swap {
  opacity: 0;
  transform: translateY(-8px);
}

/* Audience Estimator Widget */
.estimator-slider-wrap {
  margin: 1.5rem 0 1rem 0;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.estimator-stats-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
}

.estimator-count-val {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--brand-primary);
  line-height: 1.1;
}

/* Animated Progress Bar */
.animated-progress-track {
  height: 8px;
  background: #d1e7e5;
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-top: 0.5rem;
}

.animated-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #0d9488 0%, #06a4b8 100%);
  border-radius: var(--radius-pill);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Floating Card Accent Glow */
.glow-card {
  position: relative;
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.glow-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #0d9488, #06a4b8, #0a7c72);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.glow-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 32px -8px rgba(13, 43, 42, 0.1), 0 0 1px 1px rgba(13, 148, 136, 0.12);
}

.glow-card:hover::before {
  opacity: 1;
}

/* Pulsing Live Badge */
.pulse-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(5, 150, 105, 0.1);
  color: #0a7c72;
  border: 1px solid rgba(5, 150, 105, 0.25);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.pulse-badge-dot {
  width: 6px;
  height: 6px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseGreen 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

/* Reading / Scroll Progress Bar */
#scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #0d9488 0%, #06a4b8 50%, #0a7c72 100%);
  z-index: 99999;
  transition: width 0.08s ease-out;
  box-shadow: 0 0 8px rgba(13, 148, 136, 0.5);
  pointer-events: none;
}

/* Infinite Scrolling Ticker Banner */
.events-ticker-wrap {
  width: 100%;
  overflow: hidden;
  background: linear-gradient(135deg, #0d2b2a, #123332);
  border-top: 1px solid rgba(13, 148, 136, 0.2);
  border-bottom: 1px solid rgba(13, 148, 136, 0.2);
  padding: 0.85rem 0;
  position: relative;
  box-shadow: inset 0 1px 0 rgba(13, 148, 136, 0.1);
  user-select: none;
}

.events-ticker-wrap::before,
.events-ticker-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  width: 100px;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.events-ticker-wrap::before {
  left: 0;
  background: linear-gradient(90deg, #0d2b2a 0%, transparent 100%);
}

.events-ticker-wrap::after {
  right: 0;
  background: linear-gradient(270deg, #0d2b2a 0%, transparent 100%);
}

.events-ticker-track {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  width: max-content;
  animation: marqueeTicker 38s linear infinite;
  will-change: transform;
}

.events-ticker-track:hover {
  animation-play-state: paused;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: #8ab5b3;
  font-size: 0.825rem;
  font-weight: 500;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.ticker-item strong {
  color: #ffffff;
  font-weight: 700;
}

.ticker-dot {
  width: 7px;
  height: 7px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 6px #10b981;
  flex-shrink: 0;
}

.ticker-badge {
  background: rgba(13, 148, 136, 0.2);
  color: #99e0d9;
  border: 1px solid rgba(153, 224, 217, 0.3);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  font-size: 0.725rem;
  font-weight: 600;
}
