/* ===== CODANEX TECH — Custom CSS (Tailwind handles the rest) ===== */

/* Gradient Text */
.gradient-text {
  background: linear-gradient(135deg, #2563EB, #06B6D4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Keyframes */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-16px); }
}
@keyframes pulseBlob {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.2); opacity: 1; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer {
  from { background-position: -200% 0; }
  to { background-position: 200% 0; }
}

/* Named animation classes */
.animate-float { animation: float 5s ease-in-out infinite; }
.animate-fadeInUp { animation: fadeInUp 0.65s ease forwards; }

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Hero animated blobs */
.hero-blob-1 {
  position: absolute; top: -180px; right: -180px;
  width: 650px; height: 650px;
  background: radial-gradient(circle, rgba(37,99,235,0.28) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: pulseBlob 6s ease-in-out infinite;
}
.hero-blob-2 {
  position: absolute; bottom: -130px; left: -80px;
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(6,182,212,0.18) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: pulseBlob 8s ease-in-out infinite reverse;
}

/* Spinner */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  display: inline-block;
  vertical-align: middle;
}

/* Scroll-to-top */
#scrollTop {
  position: fixed; bottom: 1.75rem; right: 1.75rem;
  width: 44px; height: 44px;
  background: #2563EB;
  color: #fff; border: none;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  opacity: 0; transform: translateY(16px);
  transition: all 0.3s ease;
  box-shadow: 0 8px 28px rgba(37,99,235,0.45);
  z-index: 999;
}
#scrollTop.show { opacity: 1; transform: translateY(0); }
#scrollTop:hover { background: #1D4ED8; transform: translateY(-3px) !important; }

/* Mobile menu */
#mobileMenu {
  display: none;
  position: fixed;
  top: 68px; left: 0; right: 0;
  background: rgba(15,23,42,0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 1.25rem 1.5rem 1.75rem;
  z-index: 998;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
#mobileMenu.open { display: block; }

/* Navbar transition */
#navbar { transition: all 0.3s ease; }
#navbar.scrolled {
  background: rgba(15,23,42,0.97) !important;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 4px 30px rgba(0,0,0,0.35);
  padding-top: 0.65rem !important;
  padding-bottom: 0.65rem !important;
}

/* Progress bar animation */
.progress-fill { transition: width 1.5s ease 0.3s; }

/* Template card filter */
.template-card { transition: all 0.35s ease; }
.template-card.hidden-card { display: none !important; }

/* Form field validation */
.field-error { color: #EF4444; font-size: 0.76rem; margin-top: 4px; display: none; }
.field-error.show { display: block; }
.input-invalid { border-color: #EF4444 !important; }
.input-invalid:focus { box-shadow: 0 0 0 3px rgba(239,68,68,0.15) !important; }

/* Portfolio hover overlay */
.portfolio-overlay {
  position: absolute; inset: 0;
  background: rgba(15,23,42,0.88);
  display: flex; align-items: center; justify-content: center;
  gap: 0.85rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.portfolio-card:hover .portfolio-overlay { opacity: 1; }

/* Custom scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #F1F5F9; }
::-webkit-scrollbar-thumb { background: #2563EB; border-radius: 3px; }

/* Testimonial card hover */
.testimonial-card { transition: all 0.3s ease; }
.testimonial-card:hover { transform: translateY(-5px); }

/* Service card top bar */
.service-card-bar {
  height: 3px;
  background: linear-gradient(90deg, #2563EB, #06B6D4);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.service-detail-card:hover .service-card-bar { transform: scaleX(1); }
