/* =====================================================
   ВАШ АГЕНТ — Анимации (v2.0)
   ===================================================== */

/* ── Page Load Intro ───────────────────────────── */
@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Floating Blobs ────────────────────────────── */
@keyframes blobFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(40px, -30px) scale(1.05); }
  66%       { transform: translate(-20px, 20px) scale(0.97); }
}
@keyframes blobFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(-30px, 40px) scale(1.08); }
  66%       { transform: translate(20px, -20px) scale(0.95); }
}
.blob-1 { animation: blobFloat1 12s ease-in-out infinite; }
.blob-2 { animation: blobFloat2 15s ease-in-out infinite; }

/* ── Hero Room Card ────────────────────────────── */
.hero-room-card {
  animation: heroFadeIn 1s 0.5s ease both;
}
.room-plant {
  animation: plantSway 4s ease-in-out infinite;
  transform-origin: bottom center;
}
@keyframes plantSway {
  0%, 100% { transform: rotate(-3deg); }
  50%       { transform: rotate(3deg); }
}
.room-lamp::after {
  animation: lampGlow 3s ease-in-out infinite alternate;
}
@keyframes lampGlow {
  from { opacity: 0.7; box-shadow: 0 0 0 rgba(232,221,208,0); }
  to   { opacity: 1; box-shadow: 0 4px 20px rgba(232,221,208,0.6); }
}

/* ── Counter Number Roll ───────────────────────── */
@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.stat-num { animation: countUp 0.5s ease both; }

/* ── Service Card Hover ────────────────────────── */
.service-card {
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.35s ease,
              border-color 0.35s ease;
}
.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, transparent, rgba(94,130,129,0.04));
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.service-card:hover::before { opacity: 1; }

/* ── Portfolio Hover Zoom ──────────────────────── */
.portfolio-img {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.portfolio-item:hover .portfolio-img { transform: scale(1.05); }
.portfolio-overlay {
  transition: opacity 0.4s ease;
}

/* ── Showcase Stage subtle pulse ───────────────── */
@keyframes stagePulse {
  0%, 100% { background-position: 50% 50%; }
  50%       { background-position: 50% 60%; }
}

/* ── Showcase tab indicator ────────────────────── */
.showcase-tab {
  transition: background 0.25s ease, border-color 0.25s ease;
}
.showcase-tab.active .tab-num {
  animation: tabPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes tabPop {
  from { transform: scale(0.85); opacity: 0.5; }
  to   { transform: scale(1); opacity: 1; }
}

/* ── Showcase info content swap ────────────────── */
.showcase-info.swap-in {
  animation: infoSwap 0.4s ease both;
}
@keyframes infoSwap {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Dashboard KPI Card ────────────────────────── */
.kpi-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(36,83,88,0.1);
}
@keyframes kpiCountUp {
  from { opacity: 0; transform: scale(0.8); }
  to   { opacity: 1; transform: scale(1); }
}
.kpi-value.counting { animation: kpiCountUp 0.3s ease both; }

/* ── Progress Bar Fill ─────────────────────────── */
@keyframes progressFill {
  from { width: 0 !important; }
}
.project-progress-fill { animation: progressFill 1.2s 0.3s ease both; }

/* ── Chart Appear ──────────────────────────────── */
@keyframes chartAppear {
  from { opacity: 0; transform: scaleY(0.5); transform-origin: bottom; }
  to   { opacity: 1; transform: scaleY(1); }
}

/* ── Payment Step Transition ───────────────────── */
@keyframes stepSlideIn {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}
.form-step.active { animation: stepSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) both; }

/* ── Payment Success Animation ─────────────────── */
@keyframes successCheckBounce {
  0%   { transform: scale(0) rotate(-45deg); opacity: 0; }
  60%  { transform: scale(1.2) rotate(5deg); }
  80%  { transform: scale(0.9); }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
.success-ring {
  animation: ringScale 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  border-color: var(--c-teal) !important;
}
@keyframes ringScale {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
@keyframes ringPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.08); opacity: 0.7; }
}
.success-check { animation: successCheckBounce 0.5s 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both; }

/* ── Confetti Particles on Success ─────────────── */
@keyframes confettiFall {
  0%   { transform: translateY(-20px) rotate(0); opacity: 1; }
  100% { transform: translateY(80px) rotate(360deg); opacity: 0; }
}
.confetti-piece {
  position: absolute;
  width: 6px; height: 6px;
  border-radius: 1px;
  animation: confettiFall 1s ease forwards;
}

/* ── Payment Icons Hover ───────────────────────── */
.pay-icon {
  transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}
.pay-icon:hover {
  transform: translateY(-3px);
  background: var(--c-mist);
  border-color: var(--c-teal);
  color: var(--c-dark);
}

/* ── Online Consultant Button Pulse ────────────── */
@keyframes consultantPulse {
  0%  { box-shadow: 0 0 0 0 rgba(36,83,88,0.5); }
  70% { box-shadow: 0 0 0 14px rgba(36,83,88,0); }
  100% { box-shadow: 0 0 0 0 rgba(36,83,88,0); }
}
.consultant-btn { animation: consultantPulse 2.5s 3s ease-out 2; }

/* ── Chat Message Appear ───────────────────────── */
@keyframes msgSlideUp {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.chat-msg { animation: msgSlideUp 0.3s ease both; }

/* ── Typing Indicator ──────────────────────────── */
@keyframes typingDot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30%           { transform: translateY(-5px); opacity: 1; }
}
.typing-dots { display: inline-flex; gap: 3px; align-items: center; }
.typing-dot {
  width: 5px; height: 5px;
  background: var(--c-teal);
  border-radius: 50%;
  animation: typingDot 1.2s infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

/* ── Navbar Scroll Shadow ──────────────────────── */
.navbar { transition: background 0.4s ease, box-shadow 0.4s ease; }

/* ── Filter Button Active State ────────────────── */
.filter-btn {
  transition: background 0.25s ease, color 0.25s ease,
              border-color 0.25s ease, transform 0.15s ease;
}
.filter-btn:active { transform: scale(0.95); }

/* ── Plan Card Hover ───────────────────────────── */
.plan-card {
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

/* ── Contact Card ──────────────────────────────── */
.contact-card {
  transition: background 0.3s ease, transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* ── Loading Spinner (for API calls) ───────────── */
@keyframes spin {
  to { transform: rotate(360deg); }
}
.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(94,130,129,0.3);
  border-top-color: var(--c-teal);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

/* ── Shimmer / Skeleton Loading ────────────────── */
@keyframes shimmer {
  from { background-position: -400px 0; }
  to   { background-position: 400px 0; }
}
.skeleton {
  background: linear-gradient(90deg,
    var(--c-border) 25%,
    #e8f0ef 50%,
    var(--c-border) 75%
  );
  background-size: 400px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* ── 3D Showcase hint fade ─────────────────────── */
.showcase-hint {
  animation: hintFade 4s 2s ease both;
}
@keyframes hintFade {
  0%, 100% { opacity: 0; transform: translateY(4px); }
  15%, 80% { opacity: 1; transform: translateY(0); }
}

/* ── Estimate Price Update Flash ───────────────── */
@keyframes priceFlash {
  0%   { color: var(--c-teal); transform: scale(1.08); }
  100% { color: var(--c-dark); transform: scale(1); }
}
.price-flash { animation: priceFlash 0.5s ease; }

/* ── FAQ summary animation ─────────────────────── */
.faq-item {
  transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

/* ── Review Card ───────────────────────────────── */
.review-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* ── Mobile Drawer slide ───────────────────────── */
/* Already in style.css with transform transitions */

/* ── Trust Card subtle float ───────────────────── */
@keyframes trustFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-4px); }
}
.trust-card .trust-icon {
  display: inline-block;
  animation: trustFloat 4s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}
.trust-card:nth-child(2) .trust-icon { animation-delay: 0.5s; }
.trust-card:nth-child(3) .trust-icon { animation-delay: 1s; }
.trust-card:nth-child(4) .trust-icon { animation-delay: 1.5s; }

/* ── Process Step pulse on hover ───────────────── */
.process-step__num {
  transition: color 0.3s ease, transform 0.3s ease;
}
.process-step:hover .process-step__num {
  color: var(--c-white);
  transform: scale(1.1);
}

/* ── Design Card hover lift ────────────────────── */
.design-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

/* ── Burger toggle ─────────────────────────────── */
.burger span { transition: transform 0.3s ease, opacity 0.2s ease; }
