/* smuga.com.ua -- Custom styles */

/* Beam animation -- narrow bright line rotating around border */
@keyframes beam-rotate {
  0% { --beam-angle: 0deg; }
  100% { --beam-angle: 360deg; }
}

@property --beam-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

/* Legacy fallback */
@keyframes rainbow-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(168, 85, 247, 0.3); }
  50% { box-shadow: 0 0 40px rgba(168, 85, 247, 0.6); }
}

.rainbow-border {
  position: relative;
  border: 1px solid #374151;
  background-clip: padding-box;
}

.rainbow-border::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  background: conic-gradient(from var(--beam-angle, 0deg), transparent 0%, transparent 70%, #3b82f6 78%, #60a5fa 82%, #93c5fd 85%, #60a5fa 88%, #3b82f6 92%, transparent 100%);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
  animation: beam-rotate 3s linear infinite;
}

.rainbow-border::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: inherit;
  background: #1f2937;
  z-index: -1;
}

.rainbow-border:hover::before {
  opacity: 1;
}

.rainbow-border:hover {
  border-color: transparent;
}

.rainbow-bg-hover {
  position: relative;
  overflow: hidden;
}

.rainbow-bg-hover::after {
  content: '';
  position: absolute;
  inset: -3px;
  background: conic-gradient(from var(--beam-angle, 0deg), transparent 0%, transparent 70%, #3b82f6 78%, #60a5fa 82%, #93c5fd 85%, #60a5fa 88%, #3b82f6 92%, transparent 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  animation: beam-rotate 3s linear infinite;
  border-radius: inherit;
  z-index: -1;
}

.rainbow-bg-hover:hover::after {
  opacity: 1;
}

.btn-rainbow {
  position: relative;
  transition: all 0.3s ease;
  background: transparent !important;
  border: none !important;
  isolation: isolate;
}

.btn-rainbow::before {
  content: '';
  position: absolute;
  inset: -3px;
  background: conic-gradient(from var(--beam-angle, 0deg), transparent 0%, transparent 65%, #b45309 72%, #d97706 76%, #f59e0b 80%, #fbbf24 84%, #fef3c7 87%, #fbbf24 90%, #d97706 93%, #b45309 96%, transparent 100%);
  animation: beam-rotate 2s linear infinite;
  border-radius: inherit;
  z-index: -2;
}

.btn-rainbow::after {
  content: '';
  position: absolute;
  inset: 3px;
  background: white;
  border-radius: inherit;
  z-index: -1;
  transition: background 0.3s ease;
}

.btn-rainbow:hover::after {
  background: #111827;
}

.btn-rainbow:hover {
  color: white;
}

.btn-rainbow span {
  position: relative;
  z-index: 1;
}

.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Lightbox */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
}

.lightbox-close {
  position: fixed;
  top: 20px;
  right: 20px;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  z-index: 10000;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  border: none;
}

.animate-in {
  animation: fade-in-up 0.6s ease forwards;
  opacity: 0;
}

.animate-in:nth-child(1) { animation-delay: 0.1s; }
.animate-in:nth-child(2) { animation-delay: 0.2s; }
.animate-in:nth-child(3) { animation-delay: 0.3s; }
.animate-in:nth-child(4) { animation-delay: 0.4s; }
.animate-in:nth-child(5) { animation-delay: 0.5s; }

/* Calculator slider */
.slider-track {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, #6366f1, #a855f7, #ec4899);
  outline: none;
}

.slider-track::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease;
}

.slider-track::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.slider-track::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Package highlight */
.package-recommended {
  position: relative;
}

.package-recommended::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 0.75rem;
  background: conic-gradient(from var(--beam-angle, 0deg), transparent 0%, transparent 70%, #3b82f6 78%, #60a5fa 82%, #93c5fd 85%, #60a5fa 88%, #3b82f6 92%, transparent 100%);
  z-index: -1;
  animation: beam-rotate 3s linear infinite;
}

.package-recommended::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 0.65rem;
  background: #1f2937;
  z-index: -1;
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Mobile nav */
.mobile-nav {
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.mobile-nav.open {
  transform: translateX(0);
}

/* Active nav link */
.nav-link-active {
  color: #a855f7 !important;
}

/* Form focus */
input:focus, textarea:focus, select:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.5);
}

/* Certificate grid */
.cert-placeholder {
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Process step connector */
.step-connector {
  position: absolute;
  left: 1.25rem;
  top: 3rem;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, #6366f1, transparent);
}
