/* ===== ANIMAȚII AVANSATE PENTRU SITE ===== */

/* Variabile pentru animații */
:root {
  --animation-duration: 0.6s;
  --animation-easing: cubic-bezier(0.4, 0, 0.2, 1);
  --animation-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --glow-color: rgba(255, 215, 0, 0.3);
  --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* ===== ANIMAȚII LA SCROLL ===== */

/* Elemente care apar de jos în sus */
@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translateY(60px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Elemente care apar din stânga */
@keyframes slideLeftFade {
  from {
    opacity: 0;
    transform: translateX(-60px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Elemente care apar din dreapta */
@keyframes slideRightFade {
  from {
    opacity: 0;
    transform: translateX(60px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Animație de scalare cu fade */
@keyframes scaleFade {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Animație de rotație subtilă */
@keyframes rotateFade {
  from {
    opacity: 0;
    transform: rotate(-5deg) scale(0.9);
  }
  to {
    opacity: 1;
    transform: rotate(0deg) scale(1);
  }
}

/* ===== CLASE PENTRU ANIMAȚII ===== */

/* Clase de bază pentru animații */
.animate-on-scroll {
  opacity: 0;
  transition: all var(--animation-duration) var(--animation-easing);
}

.animate-on-scroll.animated {
  opacity: 1;
}

/* Animații specifice */
.slide-up {
  transform: translateY(60px);
}

.slide-up.animated {
  transform: translateY(0);
}

.slide-left {
  transform: translateX(-60px);
}

.slide-left.animated {
  transform: translateX(0);
}

.slide-right {
  transform: translateX(60px);
}

.slide-right.animated {
  transform: translateX(0);
}

.scale-in {
  transform: scale(0.8);
}

.scale-in.animated {
  transform: scale(1);
}

.rotate-in {
  transform: rotate(-5deg) scale(0.9);
}

.rotate-in.animated {
  transform: rotate(0deg) scale(1);
}

/* ===== EFECTE HOVER AVANSATE PENTRU CARDURI ===== */

/* Carduri cu efect 3D */
.card-3d {
  transition: all 0.4s var(--animation-easing);
  transform-style: preserve-3d;
  perspective: 1000px;
}

.card-3d:hover {
  transform: translateY(-8px) rotateX(5deg);
  box-shadow: var(--shadow-hover);
}

/* Carduri cu efect glow */
.card-glow {
  transition: all 0.3s var(--animation-easing);
  position: relative;
  overflow: hidden;
}

.card-glow::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    var(--glow-color),
    transparent
  );
  transition: left 0.6s var(--animation-easing);
  z-index: 1;
}

.card-glow:hover::before {
  left: 100%;
}

.card-glow:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 35px rgba(255, 215, 0, 0.2);
  border-color: #ffd700;
}

/* Carduri cu efect bounce */
.card-bounce {
  transition: all 0.3s var(--animation-bounce);
}

.card-bounce:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: var(--shadow-hover);
}

/* ===== ANIMAȚII PENTRU BUTOANE ===== */

/* Buton cu efect ripple */
.btn-ripple {
  position: relative;
  overflow: hidden;
  transition: all 0.3s var(--animation-easing);
}

.btn-ripple::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-ripple:active::before {
  width: 300px;
  height: 300px;
}

/* Buton cu efect glow */
.btn-glow {
  transition: all 0.3s var(--animation-easing);
  position: relative;
}

.btn-glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(255, 215, 0, 0.4);
}

.btn-glow:active {
  transform: translateY(0);
}

/* ===== ANIMAȚII PENTRU TEXT ===== */

/* Text care apare cu delay */
.text-reveal {
  opacity: 1;
  transform: translateY(20px);
  transition: all 0.6s var(--animation-easing);
}

.text-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Text cu efect typewriter */
.typewriter {
  overflow: hidden;
  border-right: 2px solid #ffd700;
  white-space: nowrap;
  animation: typing 3s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink-caret {
  from,
  to {
    border-color: transparent;
  }
  50% {
    border-color: #ffd700;
  }
}

/* ===== ANIMAȚII PENTRU ICONIȚE ===== */

/* Iconițe care se rotesc la hover */
.icon-spin {
  transition: transform 0.3s var(--animation-easing);
}

.icon-spin:hover {
  transform: rotate(360deg);
}

/* Iconițe care se măresc */
.icon-scale {
  transition: transform 0.3s var(--animation-bounce);
}

.icon-scale:hover {
  transform: scale(1.2);
}

/* ===== ANIMAȚII PENTRU SLIDER-URI ===== */

/* Tranziții smooth pentru slider-uri */
.slider-transition {
  transition: transform 0.5s var(--animation-easing);
}

/* Efect de fade pentru slide-uri */
.slide-fade {
  opacity: 1;
  transform: translateX(30px);
  transition: all 0.4s var(--animation-easing);
}

.slide-fade.active {
  opacity: 1;
  transform: translateX(0);
}

/* ===== ANIMAȚII PENTRU FORMULAR ===== */

/* Câmpuri de input cu focus animat */
.input-focus {
  transition: all 0.3s var(--animation-easing);
  position: relative;
}

.input-focus:focus {
  transform: scale(1.02);
  box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.2);
}

/* Label care se mișcă */
.label-float {
  transition: all 0.3s var(--animation-easing);
  transform-origin: left top;
}

.input-focus:focus + .label-float,
.input-focus:not(:placeholder-shown) + .label-float {
  transform: translateY(-20px) scale(0.85);
  color: #ffd700;
}

/* ===== ANIMAȚII PENTRU LOADING ===== */

/* Spinner rotativ */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 215, 0, 0.3);
  border-top: 4px solid #ffd700;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Pulsare pentru elemente importante */
.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* ===== ANIMAȚII PENTRU NAVIGAȚIE ===== */

/* Link-uri cu underline animat */
.nav-link-animated {
  position: relative;
  transition: color 0.3s var(--animation-easing);
}

.nav-link-animated::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: #ffd700;
  transition: width 0.3s var(--animation-easing);
}

.nav-link-animated:hover::after,
.nav-link-animated.active::after {
  width: 100%;
}

/* ===== ANIMAȚII PENTRU MOBILE ===== */

/* Reduce animațiile pe mobile pentru performanță */
@media (max-width: 768px) {
  .animate-on-scroll {
    transition-duration: 0.3s;
  }

  .card-3d:hover {
    transform: translateY(-4px);
  }

  .card-bounce:hover {
    transform: translateY(-6px) scale(1.01);
  }
}

/* ===== ANIMAȚII PENTRU DARK MODE ===== */

.dark .card-glow:hover {
  box-shadow: 0 15px 35px rgba(255, 215, 0, 0.3);
}

.dark .btn-glow:hover {
  box-shadow: 0 10px 25px rgba(255, 215, 0, 0.5);
}

/* ===== UTILITARE PENTRU DELAY ===== */

.delay-100 {
  animation-delay: 0.1s;
}
.delay-200 {
  animation-delay: 0.2s;
}
.delay-300 {
  animation-delay: 0.3s;
}
.delay-400 {
  animation-delay: 0.4s;
}
.delay-500 {
  animation-delay: 0.5s;
}

/* ===== ANIMAȚII PENTRU PARTICULE (OPȚIONAL) ===== */

.particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #ffd700;
  border-radius: 50%;
  animation: float 6s infinite linear;
  opacity: 0.6;
}

@keyframes float {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(-100px) rotate(360deg);
    opacity: 0;
  }
}
