﻿@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes marquee {
    0% {
      transform: translateX(0);
    }
    100% {
      transform: translateX(-50%);
    }
  }

.animate-marquee {
    animation: marquee 30s linear infinite;
}

  .animate-marquee:hover {
    animation-play-state: paused;
  }
 
  @media (max-width: 768px) {
    .animate-marquee {
      animation-duration: 20s;
    }
  }


@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes buildHouse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 193, 7, 0.3);
    }

    50% {
        box-shadow: 0 0 40px rgba(255, 193, 7, 0.6);
    }
}

@keyframes loadingDots {
    0%, 20% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

@keyframes bounceGentle {
    0%, 100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-5px);
    }
}

@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 193, 7, 0.4);
    }

    50% {
        box-shadow: 0 0 30px rgba(255, 193, 7, 0.8);
    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

    .animate-on-scroll.animate {
        opacity: 1;
        transform: translateY(0);
    }

.stagger-1 {
    animation-delay: 0.1s;
}

.stagger-2 {
    animation-delay: 0.2s;
}

.stagger-3 {
    animation-delay: 0.3s;
}

.stagger-4 {
    animation-delay: 0.4s;
}

.loading-dot:nth-child(1) {
    animation-delay: 0s;
}

.loading-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dot:nth-child(3) {
    animation-delay: 0.4s;
}

/* Parallax Effects */
.parallax-element {
    will-change: transform;
}

.parallax-slow {
    transform: translateY(0px);
}

.parallax-medium {
    transform: translateY(0px);
}

.parallax-fast {
    transform: translateY(0px);
}

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 0;
}

/* Floating elements for construction theme */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-10px) rotate(2deg);
    }
}

.floating {
    animation: float 6s ease-in-out infinite;
}

    .floating:nth-child(2) {
        animation-delay: -2s;
    }

    .floating:nth-child(3) {
        animation-delay: -4s;
    }

/* Construction particles */
.construction-particle {
    position: absolute;
    background: #FFC107;
    border-radius: 50%;
    opacity: 0.6;
    animation: constructionFloat 8s linear infinite;
}

@keyframes constructionFloat {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 0.6;
    }

    90% {
        opacity: 0.6;
    }

    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* Animación del martillo */
@keyframes hammerStrike {
    0%, 70%, 100% {
        transform: rotate(-15deg) translateY(0px);
    }

    15% {
        transform: rotate(-45deg) translateY(8px);
    }

    30% {
        transform: rotate(-15deg) translateY(0px);
    }
}

@keyframes impactFlash {
    0%, 70%, 100% {
        opacity: 0;
        transform: scale(0.5);
    }

    15%, 30% {
        opacity: 1;
        transform: scale(1.2);
    }
}

.hammer-animation {
    animation: hammerStrike 3s ease-in-out infinite;
    transform-origin: bottom center;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
}

.impact-effect div {
    animation: impactFlash 3s ease-in-out infinite;
}

    .impact-effect div:nth-child(2) {
        animation-delay: 0.1s;
    }

    .impact-effect div:nth-child(3) {
        animation-delay: 0.2s;
    }

/* Efecto de vibración en la P cuando es golpeada */
@keyframes letterShake {
    0%, 70%, 100% {
        transform: translateY(0px);
    }

    15% {
        transform: translateY(2px);
    }

    30% {
        transform: translateY(0px);
    }
}

h1 span:has(.hammer-animation) {
    animation: letterShake 3s ease-in-out infinite;
}

/* Enhanced Hover Effects */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

    .hover-lift:hover {
        transform: translateY(-8px);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    }

.hover-glow {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

    .hover-glow::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 193, 7, 0.2), transparent);
        transition: left 0.5s;
    }

    .hover-glow:hover::before {
        left: 100%;
    }

    .hover-glow:hover {
        box-shadow: 0 0 30px rgba(255, 193, 7, 0.3);
        transform: scale(1.02);
    }

.stat-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

    .stat-card:hover {
        transform: translateY(-10px) scale(1.05);
        background: linear-gradient(135deg, #FFC107, #FFD54F);
        color: #1a1a1a;
        box-shadow: 0 25px 50px rgba(255, 193, 7, 0.4);
    }

.interactive-button {
    transition: all 0.3s ease;
}

    .interactive-button::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 50%;
        transform: translate(-50%, -50%);
        transition: width 0.6s, height 0.6s;
    }

    .interactive-button:hover::after {
        width: 300px;
        height: 300px;
    }

    .interactive-button:hover {
        transform: translateY(-3px);
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    }

/* Custom cursor for interactive elements */
.cursor-pointer-custom {
    cursor: pointer;
}

    .cursor-pointer-custom:hover {
        cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><circle cx="16" cy="16" r="10" fill="%23FFC107"/><text x="16" y="20" text-anchor="middle" font-size="16" fill="white">👆</text></svg>'), auto;
    }

/* Parallax specific for about section */
.about-parallax-bg {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1), rgba(255, 193, 7, 0.05));
    border-radius: 20px;
    transition: all 0.3s ease;
}

    .about-parallax-bg:hover {
        background: linear-gradient(135deg, rgba(255, 193, 7, 0.2), rgba(255, 193, 7, 0.1));
        transform: scale(1.02);
    }

/* Responsive adjustments */
@media (max-width: 768px) {
    .hammer-animation {
        width: 30px;
        height: 30px;
    }
}

@media (max-width: 480px) {
    .hammer-animation {
        width: 25px;
        height: 25px;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .hammer-animation,
    .floating,
    .construction-particle,
    .animate-bounce-gentle,
    .animate-glow-pulse {
        animation: none;
    }
}

/* Custom Hammer Cursor */
* {
}

.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 32px;
    height: 32px;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.1s ease;
    transform-origin: bottom center;
}

    .custom-cursor.clicking {
        animation: hammerClick 0.3s ease-out;
    }

@keyframes hammerClick {
    0% {
        transform: rotate(-15deg) scale(1);
    }

    50% {
        transform: rotate(-45deg) scale(1.2);
    }

    100% {
        transform: rotate(-15deg) scale(1);
    }
}

.custom-cursor.hovering {
    transform: scale(1.2) rotate(-5deg);
}

/* Button click animation */
.button-hammer-effect {
    position: relative;
    overflow: visible;
}

    .button-hammer-effect::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        background: radial-gradient(circle, rgba(255, 193, 7, 0.6) 0%, transparent 70%);
        border-radius: 50%;
        transform: translate(-50%, -50%);
        animation: hammerImpact 0.4s ease-out;
        pointer-events: none;
    }

@keyframes hammerImpact {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }

    50% {
        width: 60px;
        height: 60px;
        opacity: 0.8;
    }

    100% {
        width: 100px;
        height: 100px;
        opacity: 0;
    }
}

.hammer-shake {
    animation: buttonShake 0.3s ease-in-out;
}

@keyframes buttonShake {
    0%, 100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-2px) translateY(-1px);
    }

    75% {
        transform: translateX(2px) translateY(1px);
    }
}

/* Cursor variations for different contexts */
.custom-cursor.text-cursor {
    transform: rotate(45deg) scale(0.8);
}

.custom-cursor.loading {
    animation: hammerSpin 1s linear infinite;
}

@keyframes hammerSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}
