/* Base animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideDown {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideLeft {
  from {
    transform: translateX(50px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideRight {
  from {
    transform: translateX(-50px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

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

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes glow {
  0% {
    box-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
  }
  50% {
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.8);
  }
  100% {
    box-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
  }
}

@keyframes fadeInOut {
  0% {
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

/* Billboard specific animations */
@keyframes billboardGlow {
  0% {
    box-shadow: 0 0 5px rgba(255, 0, 0, 0.3);
  }
  50% {
    box-shadow: 0 0 25px rgba(255, 0, 0, 0.7);
  }
  100% {
    box-shadow: 0 0 5px rgba(255, 0, 0, 0.3);
  }
}

@keyframes dayNightTransition {
  0% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(0.7) hue-rotate(30deg);
  }
  100% {
    filter: brightness(1);
  }
}

@keyframes zoomInOut {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

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

@keyframes flipCard {
  0% {
    transform: rotateY(0deg);
  }
  100% {
    transform: rotateY(180deg);
  }
}

/* Animation classes */
.animate-fade-in {
  animation: fadeIn 1s ease-out forwards;
}

.animate-slide-up {
  animation: slideUp 1s ease-out forwards;
}

.animate-slide-down {
  animation: slideDown 1s ease-out forwards;
}

.animate-slide-left {
  animation: slideLeft 1s ease-out forwards;
}

.animate-slide-right {
  animation: slideRight 1s ease-out forwards;
}

.animate-pulse {
  animation: pulse 2s infinite ease-in-out;
}

.animate-float {
  animation: float 3s infinite ease-in-out;
}

.animate-rotate {
  animation: rotate 10s linear infinite;
}

.animate-bounce {
  animation: bounce 2s infinite ease-in-out;
}

.animate-glow {
  animation: glow 2s infinite ease-in-out;
}

.animate-fade-in-out {
  animation: fadeInOut 8s infinite;
}

/* Billboard specific animation classes */
.billboard-glow {
  animation: billboardGlow 3s infinite ease-in-out;
}

.day-night-transition {
  animation: dayNightTransition 10s infinite alternate;
}

.zoom-in-out {
  animation: zoomInOut 15s infinite ease-in-out;
}

.rotate-y {
  animation: rotateY 15s infinite linear;
  transform-style: preserve-3d;
}

.flip-card-container {
  perspective: 1000px;
}

.flip-card {
  position: relative;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.flip-card:hover {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
}

.flip-card-back {
  transform: rotateY(180deg);
}

/* Scroll reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 1s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Hover effects */
.hover-scale {
  transition: transform 0.3s ease;
}

.hover-scale:hover {
  transform: scale(1.05);
}

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

.hover-lift:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.hover-rotate {
  transition: transform 0.5s ease;
}

.hover-rotate:hover {
  transform: rotate(5deg);
}

/* 3D Billboard effect */
.billboard-3d {
  transform-style: preserve-3d;
  perspective: 1000px;
}

.billboard-3d-inner {
  transition: transform 0.5s ease;
}

.billboard-3d:hover .billboard-3d-inner {
  transform: rotateY(20deg) rotateX(10deg);
}

/* Parallax effect */
.parallax {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

/* Rotating background for hero sections */
.rotating-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
}

.rotating-bg-1 {
  animation: fadeInOut 24s infinite;
  animation-delay: 0s;
}

.rotating-bg-2 {
  animation: fadeInOut 24s infinite;
  animation-delay: 6s;
}

.rotating-bg-3 {
  animation: fadeInOut 24s infinite;
  animation-delay: 12s;
}

.rotating-bg-4 {
  animation: fadeInOut 24s infinite;
  animation-delay: 18s;
}

/* Text gradient animation */
.text-gradient {
  background: linear-gradient(90deg, #ff0000, #ff8000, #ffff00, #ff0000);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientText 6s ease infinite;
}

@keyframes gradientText {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Spotlight effect for billboards */
.spotlight {
  position: relative;
  overflow: hidden;
}

.spotlight::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0) 70%);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.spotlight:hover::after {
  opacity: 1;
  animation: spotlightMove 3s infinite linear;
}

@keyframes spotlightMove {
  0% {
    transform: translate(-30%, -30%) rotate(0deg);
  }
  100% {
    transform: translate(-30%, -30%) rotate(360deg);
  }
}

/* LED billboard effect */
.led-glow {
  animation: ledGlow 2s infinite alternate;
}

@keyframes ledGlow {
  0% {
    box-shadow: 0 0 5px rgba(255, 0, 0, 0.5), 0 0 10px rgba(255, 0, 0, 0.3), 0 0 15px rgba(255, 0, 0, 0.1);
  }
  100% {
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.7), 0 0 20px rgba(255, 0, 0, 0.5), 0 0 30px rgba(255, 0, 0, 0.3);
  }
}

/* Flip card for two-sided billboards */
.two-sided-billboard {
  perspective: 1000px;
  height: 100%;
  width: 100%;
}

.two-sided-billboard-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.two-sided-billboard:hover .two-sided-billboard-inner {
  transform: rotateY(180deg);
}

.two-sided-billboard-front,
.two-sided-billboard-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
}

.two-sided-billboard-back {
  transform: rotateY(180deg);
}

/* Modern glass effect */
.glass-effect {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Modern shadow */
.modern-shadow {
  box-shadow: 0 10px 30px -15px rgba(0, 0, 0, 0.3);
}

/* Animated underline for links */
.animated-underline {
  position: relative;
  display: inline-block;
}

.animated-underline::after {
  content: "";
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: currentColor;
  transform-origin: bottom right;
  transition: transform 0.3s ease-out;
}

.animated-underline:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

/* Typing animation */
.typing-animation {
  overflow: hidden;
  border-right: 2px solid;
  white-space: nowrap;
  animation: typing 3.5s 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: currentColor;
  }
}
