/* =============================================
   EVNET.AZ – SVG ANIMATION SYSTEM v1.0
   Global micro-interactions & SVG effects
   ============================================= */

/* ── 1. HERO PARTICLE FIELD ──────────────────── */
.evnet-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.evnet-particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(129, 216, 208, 0.5);
  animation: particleDrift var(--dur, 8s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  opacity: 0;
  transform-origin: center;
}
@keyframes particleDrift {
  0%   { opacity: 0;    transform: translateY(0) scale(0.6); }
  15%  { opacity: 0.9; }
  85%  { opacity: 0.7; }
  100% { opacity: 0;    transform: translateY(-120px) scale(1.1) translateX(var(--drift, 20px)); }
}

/* ── 2. SVG WAVE DIVIDER ─────────────────────── */
.wave-divider {
  display: block;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  position: relative;
  z-index: 1;
}
.wave-divider svg {
  display: block;
  width: 100%;
  height: 60px;
}
.wave-path {
  stroke-dasharray: 2000;
  stroke-dashoffset: 2000;
  animation: waveDraw 2.5s ease forwards;
}
@keyframes waveDraw {
  to { stroke-dashoffset: 0; }
}
.wave-fill {
  animation: waveFill 1.2s ease forwards 0.4s;
  opacity: 0;
}
@keyframes waveFill {
  to { opacity: 1; }
}

/* ── 3. NAV LINK SVG UNDERLINE ───────────────── */
.nav-link {
  position: relative;
  overflow: visible;
}
.nav-svg-line {
  position: absolute;
  bottom: -2px;
  left: 10%;
  width: 80%;
  height: 2px;
  pointer-events: none;
  overflow: visible;
}
.nav-svg-line path {
  stroke: var(--tiffany-400, #6DCAC2);
  stroke-width: 2;
  fill: none;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-link:hover .nav-svg-line path,
.nav-link.active .nav-svg-line path {
  stroke-dashoffset: 0;
}

/* ── 4. BUTTON RIPPLE ────────────────────────── */
.evnet-ripple-wrap {
  position: relative !important;
  overflow: hidden !important;
  /* Fix Safari overflow bug with border-radius */
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  isolation: isolate;
}
.evnet-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  pointer-events: none;
  transform: scale(0);
  animation: rippleOut 0.6s cubic-bezier(0.2, 0.8, 0.4, 1) forwards;
  z-index: 10;
}
@keyframes rippleOut {
  to { transform: scale(4); opacity: 0; }
}

/* ── 5. STAT RING (behind .stat-num) ─────────── */
.evnet-ring-container {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 72px;  /* Reserves layout space so SVGs don't overlap dividers */
  height: 72px; /* Reserves layout space */
  margin-bottom: 4px; /* Space between number circle and label */
}
.stat-ring-svg {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 72px;
  height: 72px;
  min-width: 72px;
  min-height: 72px;
  flex-shrink: 0;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0.18;
  z-index: 0;
}
.stat-num {
  position: relative;
  z-index: 1;
}
.stat-ring-svg circle {
  fill: none;
  stroke: #81D8D0;
  stroke-width: 1.5;
  stroke-dasharray: 250;
  stroke-dashoffset: 250;
  stroke-linecap: round;
  animation: ringDraw 2s ease forwards;
  animation-delay: var(--ring-delay, 0.3s);
}
@keyframes ringDraw {
  to { stroke-dashoffset: 0; }
}

/* ── 6. CARD BORDER TRACE ────────────────────── */
.listing-card,
.agent-card,
.perk-card,
.job-card,
.new-build-card {
  position: relative;
}
.card-svg-border {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  overflow: visible;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.2s;
}
.card-svg-border rect {
  fill: none;
  stroke: #81D8D0;
  stroke-width: 1.5;
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  transition: stroke-dashoffset 0s;
  rx: inherit;
}
.listing-card:hover .card-svg-border,
.agent-card:hover .card-svg-border,
.perk-card:hover .card-svg-border,
.job-card:hover .card-svg-border,
.new-build-card:hover .card-svg-border {
  opacity: 1;
}
.listing-card:hover .card-svg-border rect,
.agent-card:hover .card-svg-border rect,
.perk-card:hover .card-svg-border rect,
.job-card:hover .card-svg-border rect,
.new-build-card:hover .card-svg-border rect {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── 7. LOGO NODE PULSE ──────────────────────── */
.logo-icon circle,
.logo-icon line {
  transition: opacity 0.3s;
}
.logo:hover .logo-icon circle {
  animation: nodePulse 1.2s ease-in-out infinite alternate;
}
.logo:hover .logo-icon circle:nth-child(2) { animation-delay: 0.1s; }
.logo:hover .logo-icon circle:nth-child(3) { animation-delay: 0.25s; }
.logo:hover .logo-icon circle:nth-child(4) { animation-delay: 0.4s; }
.logo:hover .logo-icon circle:nth-child(5) { animation-delay: 0.15s; }
@keyframes nodePulse {
  0%   { r: 1.2; opacity: 0.7; }
  100% { r: 2.2; opacity: 1; }
}

/* ── 8. SECTION REVEAL ANIMATION ────────────── */
.evnet-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.evnet-reveal.revealed {
  opacity: 1;
  transform: none;
}
.evnet-reveal:nth-child(2) { transition-delay: 0.08s; }
.evnet-reveal:nth-child(3) { transition-delay: 0.16s; }
.evnet-reveal:nth-child(4) { transition-delay: 0.24s; }
.evnet-reveal:nth-child(5) { transition-delay: 0.32s; }
.evnet-reveal:nth-child(6) { transition-delay: 0.40s; }

/* ── 9. FLOATING SHAPE DECO ──────────────────── */
.svg-float {
  position: absolute;
  pointer-events: none;
  opacity: 0.07;
}
.svg-float-a { animation: floatShapeA 10s ease-in-out infinite; }
.svg-float-b { animation: floatShapeB 13s ease-in-out infinite; }
.svg-float-c { animation: floatShapeC 8s  ease-in-out infinite; }
@keyframes floatShapeA {
  0%,100% { transform: translateY(0)   rotate(0deg);  }
  50%     { transform: translateY(-22px) rotate(8deg);  }
}
@keyframes floatShapeB {
  0%,100% { transform: translateY(0)   rotate(0deg);  }
  50%     { transform: translateY(18px)  rotate(-6deg); }
}
@keyframes floatShapeC {
  0%,100% { transform: translateY(0)   rotate(0deg) scale(1);   }
  50%     { transform: translateY(-14px) rotate(12deg) scale(1.06); }
}

/* ── 10. SEARCH BUTTON PULSE RING ─────────────── */
.btn-search {
  position: relative;
}
.btn-search::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  border: 2px solid rgba(129, 216, 208, 0);
  transition: border-color 0.3s, inset 0.3s;
  pointer-events: none;
}
.btn-search:hover::before {
  inset: -6px;
  border-color: rgba(129, 216, 208, 0.4);
  animation: searchPing 1.5s ease-in-out infinite;
}
@keyframes searchPing {
  0%,100% { opacity: 1; inset: -4px; }
  50%     { opacity: 0.4; inset: -9px; }
}

/* ── 11. HEART / SAVE ICON ANIMATION ────────── */
.card-fav-btn {
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.card-fav-btn:hover {
  transform: scale(1.3);
}
.card-fav-btn.saved {
  animation: heartPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  color: #e53e3e;
}
@keyframes heartPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.5); }
  100% { transform: scale(1); }
}

/* ── 12. ANIMATED GRID LINES (hero bg) ───────── */
.hero-grid-svg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.04;
}
.hero-grid-svg line {
  stroke: #81D8D0;
  stroke-width: 0.5;
}

/* ── 13. TYPING CURSOR BLINK ──────────────────── */
.evnet-cursor::after {
  content: '|';
  color: #81D8D0;
  animation: cursorBlink 1s step-end infinite;
  font-weight: 300;
  margin-left: 1px;
}
@keyframes cursorBlink {
  0%,100% { opacity: 1; }
  50%     { opacity: 0; }
}

/* ── 14. TIFFANY SHIMMER on cards on scroll ─── */
@keyframes cardShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.shimmer-once {
  background: linear-gradient(
    90deg,
    transparent 30%,
    rgba(129,216,208,0.12) 50%,
    transparent 70%
  );
  background-size: 200% 100%;
  animation: cardShimmer 0.8s ease forwards;
}

/* ── 15. FLOATING BADGE BOUNCE ────────────────── */
.card-badge {
  animation: badgeBounceIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  animation-fill-mode: both;
}
@keyframes badgeBounceIn {
  0%   { transform: scale(0) translateY(-4px); opacity: 0; }
  100% { transform: scale(1) translateY(0);    opacity: 1; }
}

/* ══════════════════════════════════════════════
   EVNET ANIMATIONS v2.0 — Section Enhancements
   ══════════════════════════════════════════════ */

/* ── HOW-CARD SVG ICONS ──────────────────────── */
.how-card {
  position: relative;
  overflow: hidden;
}
.how-card-svg-bg {
  position: absolute;
  right: -16px;
  bottom: -16px;
  width: 90px;
  height: 90px;
  pointer-events: none;
  opacity: 0.05;
  transition: opacity 0.4s;
}
.how-card:hover .how-card-svg-bg { opacity: 0.12; }

.how-icon-svg {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px; height: 56px;
  margin: 0 auto 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(129,216,208,0.15), rgba(129,216,208,0.05));
  position: relative;
  flex-shrink: 0;
}
.how-icon-svg svg {
  width: 28px; height: 28px;
  stroke: #81D8D0;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.how-card:hover .how-icon-svg {
  background: linear-gradient(135deg, rgba(129,216,208,0.25), rgba(129,216,208,0.1));
}
.how-card:hover .how-icon-svg svg {
  animation: howIconWiggle 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes howIconWiggle {
  0%   { transform: scale(1) rotate(0deg); }
  30%  { transform: scale(1.2) rotate(-8deg); }
  60%  { transform: scale(1.15) rotate(6deg); }
  100% { transform: scale(1) rotate(0deg); }
}

/* ── STEP CONNECTOR DOTS ─────────────────────── */
.how-connector {
  position: absolute;
  top: 50%;
  right: -12px;
  transform: translateY(-50%);
  z-index: 2;
  pointer-events: none;
}

/* ── SECTION-TITLE ANIMATED UNDERLINE ───────── */
.section-title-wrap {
  position: relative;
  display: inline-block;
}
.section-title-svg-line {
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 4px;
  overflow: visible;
  pointer-events: none;
}
.section-title-svg-line path {
  fill: none;
  stroke: url(#titleLineGrad);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
  transition: stroke-dashoffset 0.9s cubic-bezier(0.16,1,0.3,1);
}
.section-title-wrap.in-view .section-title-svg-line path {
  stroke-dashoffset: 0;
}

/* ── SECTION FLOATING DECO ───────────────────── */
.section-deco {
  position: absolute;
  pointer-events: none;
  z-index: 0;
}
.section-deco svg {
  overflow: visible;
}

/* ── HOW-SECTION BACKGROUND ──────────────────── */
.how-section {
  position: relative;
  overflow: hidden;
}
.how-section-bg-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 1;
}

/* ── FEATURED SECTION DECO ───────────────────── */
.featured-section {
  position: relative;
  overflow: hidden;
}

/* ── LISTING-CARD ENTER ANIMATION ────────────── */
.listing-card.evnet-reveal {
  transition: opacity 0.55s cubic-bezier(0.16,1,0.3,1),
              transform 0.55s cubic-bezier(0.16,1,0.3,1),
              box-shadow 0.3s;
}

/* ── HOW CARD STEP NUMBER FLOAT ──────────────── */
.how-step-num {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 3.5rem;
  font-weight: 900;
  color: rgba(129,216,208,0.07);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  transition: color 0.3s;
}
.how-card:hover .how-step-num {
  color: rgba(129,216,208,0.13);
}

/* ── ANIMATED DOT TRAIL (section separators) ─── */
.dot-trail {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 24px auto 0;
  width: fit-content;
}
.dot-trail span {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #81D8D0;
  opacity: 0.25;
  animation: dotTrailPulse 1.8s ease-in-out infinite;
}
.dot-trail span:nth-child(1) { animation-delay: 0s; }
.dot-trail span:nth-child(2) { animation-delay: 0.2s; }
.dot-trail span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotTrailPulse {
  0%,100% { opacity: 0.2; transform: scale(1); }
  50%     { opacity: 0.9; transform: scale(1.4); }
}

/* ── CORNER BRACKET DECO on how-cards ───────── */
.bracket-deco {
  position: absolute;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}
.how-card:hover .bracket-deco { opacity: 1; }
