/* 
 * SureEntry.io Homepage Block Animations
 * This file contains animations for the specific blocks on the homepage
 */

/* Logo Block Animation (Blue) */
.logo-block-animation {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #4a6fdc;
  color: white;
  height: 100%;
  width: 100%;
}

.logo-block-animation::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to bottom right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(45deg);
  animation: shine 3s infinite;
}

.logo-block-animation::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.2) 0%, rgba(74, 111, 220, 0) 70%);
  opacity: 0;
  animation: pulse 4s infinite;
}

.logo-block-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 2rem;
}

.logo-block-text {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1rem;
  animation: float 6s ease-in-out infinite;
}

.logo-block-subtext {
  font-size: 1.2rem;
  text-align: center;
  opacity: 0.9;
}

/* Adult System Block Animation (Blue) */
.adult-system-animation {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #4a6fdc;
  color: white;
  height: 100%;
  width: 100%;
}

.adult-system-animation::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: wave 8s infinite linear;
}

.adult-system-dots {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
}

.adult-system-dot {
  position: absolute;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  animation: float-random 10s infinite ease-in-out;
}

.adult-system-dot:nth-child(1) {
  width: 20px;
  height: 20px;
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.adult-system-dot:nth-child(2) {
  width: 15px;
  height: 15px;
  top: 60%;
  left: 20%;
  animation-delay: 1s;
}

.adult-system-dot:nth-child(3) {
  width: 25px;
  height: 25px;
  top: 30%;
  left: 80%;
  animation-delay: 2s;
}

.adult-system-dot:nth-child(4) {
  width: 10px;
  height: 10px;
  top: 70%;
  left: 70%;
  animation-delay: 3s;
}

.adult-system-dot:nth-child(5) {
  width: 18px;
  height: 18px;
  top: 40%;
  left: 50%;
  animation-delay: 4s;
}

.adult-system-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 2rem;
}

.adult-system-text {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1rem;
  animation: scale-pulse 4s infinite ease-in-out;
}

.adult-system-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  animation: bounce 2s infinite;
}

/* Family System Block Animation (Green) */
.family-system-animation {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #34c759;
  color: white;
  height: 100%;
  width: 100%;
}

.family-system-animation::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle at center,
    rgba(255, 255, 255, 0.3) 0%,
    rgba(52, 199, 89, 0) 70%
  );
  animation: pulse-grow 3s infinite;
}

.family-system-circles {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
}

.family-system-circle {
  position: absolute;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  animation: expand 8s infinite ease-out;
  opacity: 0;
}

.family-system-circle:nth-child(1) {
  width: 50px;
  height: 50px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: 0s;
}

.family-system-circle:nth-child(2) {
  width: 100px;
  height: 100px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: 1s;
}

.family-system-circle:nth-child(3) {
  width: 150px;
  height: 150px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: 2s;
}

.family-system-circle:nth-child(4) {
  width: 200px;
  height: 200px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: 3s;
}

.family-system-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 2rem;
}

.family-system-text {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1rem;
  animation: float 6s ease-in-out infinite;
}

.family-system-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  animation: heartbeat 1.5s infinite;
}

/* Scrolling Animations */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.scale-in {
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* Animation Keyframes */
@keyframes shine {
  0% {
    left: -100%;
    opacity: 0;
  }
  20% {
    left: 100%;
    opacity: 0.6;
  }
  100% {
    left: 100%;
    opacity: 0;
  }
}

@keyframes pulse {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

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

@keyframes wave {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

@keyframes float-random {
  0% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(10px, 10px);
  }
  50% {
    transform: translate(-5px, 15px);
  }
  75% {
    transform: translate(-10px, -5px);
  }
  100% {
    transform: translate(0, 0);
  }
}

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

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

@keyframes pulse-grow {
  0% {
    opacity: 0.2;
    transform: scale(0.8);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.1);
  }
  100% {
    opacity: 0.2;
    transform: scale(0.8);
  }
}

@keyframes expand {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0.8;
  }
  100% {
    transform: translate(-50%, -50%) scale(4);
    opacity: 0;
  }
}

@keyframes heartbeat {
  0% {
    transform: scale(1);
  }
  14% {
    transform: scale(1.1);
  }
  28% {
    transform: scale(1);
  }
  42% {
    transform: scale(1.15);
  }
  70% {
    transform: scale(1);
  }
}

/* Employee System Block Animation (Purple/Slate) */
.employee-system-animation {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #5a4fcf; /* Professional purple/slate color */
  color: white;
  height: 100%;
  width: 100%;
}

.employee-system-grid {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 30px 30px;
  opacity: 0.5;
}

.employee-system-scanline {
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
  animation: scan 10s linear infinite;
}

.employee-system-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 2rem;
}

.employee-system-text {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1rem;
}

.employee-system-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  animation: float 6s ease-in-out infinite;
}

/* Keyframes for the scanline */
@keyframes scan {
  0% {
    top: 0;
  }
  50% {
    top: 100%;
  }
  100% {
    top: 0;
  }
}