@keyframes flame {
  0% {
    transform: scale(1) rotate(-1deg);
    opacity: 0.8;
  }

  100% {
    transform: scale(1.05) rotate(1deg);
    opacity: 1;
  }
}

/* Prevent horizontal scrollbars (site-wide and hero) */
html {
  overflow-x: hidden;
}
body {
  overflow-x: hidden;
}
#home,
.logo-field {
  overflow-x: hidden !important;
}

@keyframes glow {
  0% {
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.3);
  }

  100% {
    box-shadow: 0 0 40px rgba(255, 107, 53, 0.6),
      0 0 60px rgba(220, 38, 38, 0.3);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-20px);
  }
}

.flame-bg {
  background: linear-gradient(
    45deg,
    #1f1f1f 0%,
    #4a1e1e 25%,
    #dc2626 50%,
    #ff6b35 75%,
    #fcd34d 100%
  );
  background-size: 400% 400%;
  animation: flame-gradient 8s ease infinite;
}

@keyframes flame-gradient {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.flame-text {
  background: linear-gradient(45deg, #ff6b35, #dc2626, #fcd34d);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: flame-gradient 3s ease infinite;
}

.glass-morphism {
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 107, 53, 0.2);
}

/* Animated logo gradient field */
.logo-field {
  position: relative;
  overflow: hidden;
}
.logo-field .logo-float {
  position: absolute;
  width: 72px;
  height: 72px;
  background-image: url("../../logo.png");
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.08;
  filter: drop-shadow(0 0 10px rgba(255,107,53,0.25));
  animation: drift 20s linear infinite;
}
@keyframes drift {
  0% { transform: translate(0,0) rotate(0deg); }
  25% { transform: translate(40vw, -10vh) rotate(45deg); }
  50% { transform: translate(-10vw, -20vh) rotate(120deg); }
  75% { transform: translate(30vw, 10vh) rotate(200deg); }
  100% { transform: translate(0,0) rotate(360deg); }
}

.hero-bg {
  background: radial-gradient(
      circle at 20% 80%,
      rgba(255, 107, 53, 0.3) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(220, 38, 38, 0.3) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 40% 40%,
      rgba(252, 211, 77, 0.2) 0%,
      transparent 50%
    ),
    linear-gradient(135deg, #1f1f1f 0%, #2d1b1b 100%);
}

.btn-flame {
  background: linear-gradient(45deg, #ff6b35, #dc2626);
  transition: all 0.3s ease;
}

.btn-flame:hover {
  background: linear-gradient(45deg, #dc2626, #ff6b35);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(255, 107, 53, 0.4);
}

.section-glow {
  border: 1px solid rgba(255, 107, 53, 0.3);
  box-shadow: 0 0 30px rgba(255, 107, 53, 0.1);
}

/* Video Background Styles */
.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
  z-index: -1;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(31, 31, 31, 0.7) 0%,
    rgba(45, 27, 27, 0.5) 100%
  );
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 10;
}

/* Floating WhatsApp Button */
.whatsapp-float {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 40px;
  right: 40px;
  background-color: #25d366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
  z-index: 100;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: pulse-whatsapp 2s infinite;
  text-decoration: none;
}

.whatsapp-float:hover {
  background-color: #20ba5a;
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
}

.whatsapp-float:active {
  transform: scale(0.95);
}

.whatsapp-float svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

@keyframes pulse-whatsapp {
  0% {
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3),
      0 0 0 0 rgba(37, 211, 102, 0.7);
  }

  70% {
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3),
      0 0 0 10px rgba(37, 211, 102, 0);
  }

  100% {
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3),
      0 0 0 0 rgba(37, 211, 102, 0);
  }
}

/* Video Styles */
.video-max-height {
  max-height: 100vh;
}

@media screen and (max-width: 768px) {
  .whatsapp-float {
    width: 50px;
    height: 50px;
    bottom: 20px;
    right: 20px;
  }

  .whatsapp-float svg {
    width: 22px;
    height: 22px;
  }
}

/* Glitch Effect for Hero Logo */
.glitch {
  position: relative;
  display: inline-block;
  cursor: pointer;
  transition: all 0.3s ease;
}

.glitch::before,
.glitch::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("../../logo.png");
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.glitch::before {
  animation: glitch-1 4s infinite linear alternate-reverse;
  filter: hue-rotate(90deg) saturate(1.5);
  animation-play-state: paused;
}

.glitch::after {
  animation: glitch-2 6s infinite linear alternate;
  filter: hue-rotate(270deg) saturate(2);
  animation-play-state: paused;
}

.glitch img {
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
}

/* Interactive States */
.glitch:hover::before {
  opacity: 0.4;
  animation-play-state: running;
}

.glitch:hover::after {
  opacity: 0.3;
  animation-play-state: running;
}

.glitch:hover img {
  animation: glitch-main-hover 0.5s infinite linear;
  filter: brightness(1.1) contrast(1.1);
}

.glitch.active::before {
  opacity: 0.8;
  animation-play-state: running;
  animation-duration: 0.2s;
}

.glitch.active::after {
  opacity: 0.6;
  animation-play-state: running;
  animation-duration: 0.3s;
}

.glitch.active img {
  animation: glitch-main-active 0.1s infinite linear;
  filter: brightness(1.3) contrast(1.3) saturate(1.2);
}

/* Header Logo Hover Effect */
.header-logo {
  transition: all 0.3s ease;
  cursor: pointer;
}

.header-logo:hover {
  transform: scale(1.1) rotate(5deg);
  filter: brightness(1.2) drop-shadow(0 0 10px rgba(255, 107, 53, 0.5));
}

.header-logo:active {
  transform: scale(0.95) rotate(-2deg);
}

@keyframes glitch-main-hover {
  0%,
  100% {
    transform: translate(0) skew(0deg);
  }

  25% {
    transform: translate(-1px, 1px) skew(0.5deg);
  }

  50% {
    transform: translate(1px, -1px) skew(-0.5deg);
  }

  75% {
    transform: translate(-1px, -1px) skew(0.3deg);
  }
}

@keyframes glitch-main-active {
  0%,
  100% {
    transform: translate(0) skew(0deg);
  }

  10% {
    transform: translate(-3px, 2px) skew(2deg);
  }

  20% {
    transform: translate(4px, -1px) skew(-1.5deg);
  }

  30% {
    transform: translate(-2px, -3px) skew(1deg);
  }

  40% {
    transform: translate(3px, 2px) skew(-2deg);
  }

  50% {
    transform: translate(-4px, 1px) skew(1.5deg);
  }

  60% {
    transform: translate(2px, -2px) skew(-1deg);
  }

  70% {
    transform: translate(-1px, 3px) skew(2deg);
  }

  80% {
    transform: translate(3px, -3px) skew(-1.5deg);
  }

  90% {
    transform: translate(-2px, 1px) skew(1deg);
  }
}

@keyframes glitch-1 {
  0%,
  100% {
    clip-path: polygon(0 0%, 100% 0%, 100% 5%, 0 5%);
    transform: translate(-2px, 0px);
  }

  5% {
    clip-path: polygon(0 0%, 100% 0%, 100% 10%, 0 10%);
    transform: translate(2px, 0px);
  }

  10% {
    clip-path: polygon(0 10%, 100% 10%, 100% 15%, 0 15%);
    transform: translate(-1px, 0px);
  }

  15% {
    clip-path: polygon(0 15%, 100% 15%, 100% 20%, 0 20%);
    transform: translate(1px, 0px);
  }

  20% {
    clip-path: polygon(0 20%, 100% 20%, 100% 25%, 0 25%);
    transform: translate(-2px, 0px);
  }

  25% {
    clip-path: polygon(0 25%, 100% 25%, 100% 30%, 0 30%);
    transform: translate(2px, 0px);
  }

  30% {
    clip-path: polygon(0 30%, 100% 30%, 100% 35%, 0 35%);
    transform: translate(-1px, 0px);
  }

  35% {
    clip-path: polygon(0 35%, 100% 35%, 100% 40%, 0 40%);
    transform: translate(1px, 0px);
  }

  40% {
    clip-path: polygon(0 40%, 100% 40%, 100% 45%, 0 45%);
    transform: translate(-2px, 0px);
  }

  45% {
    clip-path: polygon(0 45%, 100% 45%, 100% 50%, 0 50%);
    transform: translate(2px, 0px);
  }

  50% {
    clip-path: polygon(0 50%, 100% 50%, 100% 55%, 0 55%);
    transform: translate(-1px, 0px);
  }

  55% {
    clip-path: polygon(0 55%, 100% 55%, 100% 60%, 0 60%);
    transform: translate(1px, 0px);
  }

  60% {
    clip-path: polygon(0 60%, 100% 60%, 100% 65%, 0 65%);
    transform: translate(-2px, 0px);
  }

  65% {
    clip-path: polygon(0 65%, 100% 65%, 100% 70%, 0 70%);
    transform: translate(2px, 0px);
  }

  70% {
    clip-path: polygon(0 70%, 100% 70%, 100% 75%, 0 75%);
    transform: translate(-1px, 0px);
  }

  75% {
    clip-path: polygon(0 75%, 100% 75%, 100% 80%, 0 80%);
    transform: translate(1px, 0px);
  }

  80% {
    clip-path: polygon(0 80%, 100% 80%, 100% 85%, 0 85%);
    transform: translate(-2px, 0px);
  }

  85% {
    clip-path: polygon(0 85%, 100% 85%, 100% 90%, 0 90%);
    transform: translate(2px, 0px);
  }

  90% {
    clip-path: polygon(0 90%, 100% 90%, 100% 95%, 0 95%);
    transform: translate(-1px, 0px);
  }

  95% {
    clip-path: polygon(0 95%, 100% 95%, 100% 100%, 0 100%);
    transform: translate(1px, 0px);
  }
}

@keyframes glitch-2 {
  0%,
  100% {
    clip-path: polygon(0 2%, 100% 2%, 100% 5%, 0 5%);
    transform: translate(2px, 0px);
  }

  10% {
    clip-path: polygon(0 15%, 100% 15%, 100% 20%, 0 20%);
    transform: translate(-2px, 0px);
  }

  20% {
    clip-path: polygon(0 25%, 100% 25%, 100% 35%, 0 35%);
    transform: translate(2px, 0px);
  }

  30% {
    clip-path: polygon(0 45%, 100% 45%, 100% 50%, 0 50%);
    transform: translate(-2px, 0px);
  }

  40% {
    clip-path: polygon(0 60%, 100% 60%, 100% 70%, 0 70%);
    transform: translate(2px, 0px);
  }

  50% {
    clip-path: polygon(0 75%, 100% 75%, 100% 80%, 0 80%);
    transform: translate(-2px, 0px);
  }

  60% {
    clip-path: polygon(0 85%, 100% 85%, 100% 95%, 0 95%);
    transform: translate(2px, 0px);
  }

  70% {
    clip-path: polygon(0 5%, 100% 5%, 100% 15%, 0 15%);
    transform: translate(-2px, 0px);
  }

  80% {
    clip-path: polygon(0 35%, 100% 35%, 100% 45%, 0 45%);
    transform: translate(2px, 0px);
  }

  90% {
    clip-path: polygon(0 65%, 100% 65%, 100% 75%, 0 75%);
    transform: translate(-2px, 0px);
  }
}
