/* =====================================================
   MODERN ANIMÁCIÓK ÉS UX FEJLESZTÉSEK - REBELT.HU
   ===================================================== */

/* === GLOBÁLIS ANIMÁCIÓK === */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

/* === SCROLL REVEAL ANIMÁCIÓK === */
.animate-on-scroll {
  opacity: 0;
  transition: all 0.8s ease-out;
}

.animate-on-scroll.visible {
  opacity: 1;
}

.fade-in {
  animation: fadeIn 0.8s ease-out forwards;
}

.slide-in-left {
  animation: slideInLeft 0.8s ease-out forwards;
}

.slide-in-right {
  animation: slideInRight 0.8s ease-out forwards;
}

.scale-in {
  animation: scaleIn 0.6s ease-out forwards;
}

/* === HOVER EFFEKTEK === */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.hover-grow {
  transition: transform 0.3s ease;
}

.hover-grow:hover {
  transform: scale(1.05);
}

.hover-glow {
  position: relative;
  transition: all 0.3s ease;
}

.hover-glow::before {
  content: '';
  position: absolute;
  inset: -4px;
  background: linear-gradient(45deg, #4ade80, #22c55e, #16a34a);
  border-radius: inherit;
  opacity: 0;
  z-index: -1;
  filter: blur(20px);
  transition: opacity 0.3s ease;
}

.hover-glow:hover::before {
  opacity: 0.7;
}

/* === GOMB ANIMÁCIÓK === */
button, .btn {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

button::after, .btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

button:active::after, .btn:active::after {
  width: 300px;
  height: 300px;
}

/* === LOADING SPINNER === */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(45, 95, 63, 0.1);
  border-top-color: #2d5f3f;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* === FORM ELEMEK FEJLESZTÉSEK === */
input, textarea, select {
  transition: all 0.3s ease;
  border: 2px solid #e5e7eb;
}

input:focus, textarea:focus, select:focus {
  border-color: #2d5f3f;
  box-shadow: 0 0 0 3px rgba(45, 95, 63, 0.1);
  transform: scale(1.02);
  outline: none;
}

input:invalid:not(:placeholder-shown) {
  border-color: #ef4444;
}

input:valid:not(:placeholder-shown) {
  border-color: #22c55e;
}

/* === PROGRESS BAR === */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, #4ade80, #22c55e);
  z-index: 9999;
  transition: width 0.3s ease;
}

/* === PARALLAX EFFEKT === */
.parallax {
  transition: transform 0.5s ease-out;
  will-change: transform;
}

/* === KÉPEK LAZY LOADING === */
img {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

img[loading="lazy"] {
  opacity: 0;
}

img.loaded {
  opacity: 1;
}

/* === SKELETON LOADING === */
.skeleton {
  background: linear-gradient(
    90deg,
    #f3f4f6 0%,
    #e5e7eb 50%,
    #f3f4f6 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

/* === TOOLTIP ANIMÁCIÓ === */
.tooltip {
  position: relative;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  padding: 8px 12px;
  background: #1f2937;
  color: white;
  border-radius: 6px;
  font-size: 14px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}

.tooltip:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-5px);
}

/* === CARD EFFEKTEK === */
.card {
  transition: all 0.3s ease;
  border-radius: 16px;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

/* === SMOOTH SCROLL BEHAVIOR === */
html {
  scroll-behavior: smooth;
}

/* === ACCESSIBILITY - FOCUS VISIBLE === */
*:focus-visible {
  outline: 3px solid #4ade80;
  outline-offset: 2px;
}

/* === MOBILE OPTIMALIZÁCIÓ === */
@media (max-width: 768px) {
  .hover-lift:active {
    transform: scale(0.95);
  }
  
  button, .btn {
    min-height: 48px;
    min-width: 48px;
  }
  
  input, textarea, select {
    font-size: 16px; /* Prevents zoom on iOS */
  }
}

/* === DARK MODE SUPPORT === */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* === SUCCESS/ERROR FEEDBACK === */
.success-feedback {
  animation: scaleIn 0.5s ease-out;
  background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
  color: white;
  padding: 16px 24px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(34, 197, 94, 0.3);
}

.error-feedback {
  animation: scaleIn 0.5s ease-out;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  padding: 16px 24px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(239, 68, 68, 0.3);
}

/* === FROSTED GLASS EFFEKT === */
.glass-effect {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* === GRADIENT TEXT === */
.gradient-text {
  background: linear-gradient(135deg, #4ade80, #22c55e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* === HOVER SHINE EFFECT === */
.shine-effect {
  position: relative;
  overflow: hidden;
}

.shine-effect::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transform: translateX(-100%) translateY(-100%) rotate(45deg);
  transition: transform 0.6s ease;
}

.shine-effect:hover::before {
  transform: translateX(100%) translateY(100%) rotate(45deg);
}
