/* ===== ANIMACIONES CSS ===== */

/* Portfolio hover effect */
.project-card {
    position: relative;
    overflow: hidden;
}
.project-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 224, 0.3); /* Pale yellow */
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.project-card:hover::after {
    opacity: 1;
}

/* New animations to replace GSAP */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

.animated {
    animation-duration: 1s;
    animation-fill-mode: both;
}

.fadeInUp {
    animation-name: fadeInUp;
}

.float {
    animation-name: float;
    animation-duration: 3s;
    animation-iteration-count: infinite;
}

/* Animaciones de entrada */

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@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 slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animaciones de hover */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes wiggle {
    0%, 7% {
        transform: rotateZ(0);
    }
    15% {
        transform: rotateZ(-15deg);
    }
    20% {
        transform: rotateZ(10deg);
    }
    25% {
        transform: rotateZ(-10deg);
    }
    30% {
        transform: rotateZ(6deg);
    }
    35% {
        transform: rotateZ(-4deg);
    }
    40%, 100% {
        transform: rotateZ(0);
    }
}

/* === ANIMACIONES MINIMALISTAS Y OPTIMIZADAS === */

/* Micro-interacciones en botones */
.btn {
    transition: background 0.3s cubic-bezier(0.4,0,0.2,1), color 0.3s cubic-bezier(0.4,0,0.2,1), transform 0.2s cubic-bezier(0.4,0,0.2,1);
    will-change: transform;
}
.btn:hover {
    transform: translateY(-2px) scale(1.04);
    background: var(--color-green, #799969);
    color: var(--color-white, #fff);
}

/* Aparición suave de secciones al hacer scroll */
.scroll-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s cubic-bezier(0.4,0,0.2,1), transform 0.5s cubic-bezier(0.4,0,0.2,1);
    will-change: opacity, transform;
}
.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Hover sutil en tarjetas */
.card-hover, .client-card, .portfolio-card {
    transition: box-shadow 0.3s cubic-bezier(0.4,0,0.2,1), transform 0.2s cubic-bezier(0.4,0,0.2,1);
    will-change: transform;
}
.card-hover:hover, .client-card:hover, .portfolio-card:hover {
    transform: scale(1.03) translateY(-4px);
    box-shadow: 0 8px 24px rgba(121,153,105,0.10);
}

/* Eliminar animaciones complejas y pesadas */
/* Comentadas para referencia, no se usan en el minimalismo */
/*
@keyframes float { ... }
@keyframes rotate { ... }
@keyframes morph { ... }
@keyframes wave { ... }
@keyframes shimmer { ... }
*/

/* Clases de animación */
.animate-fade-in-up {
    animation: fadeInUp 0.8s ease forwards;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.8s ease forwards;
}

.animate-fade-in-right {
    animation: fadeInRight 0.8s ease forwards;
}

.animate-scale-in {
    animation: scaleIn 0.6s ease forwards;
}

.animate-slide-in-up {
    animation: slideInUp 0.8s ease forwards;
}

/* Efectos de hover */
.hover-pulse:hover {
    animation: pulse 0.6s ease;
}

.hover-wiggle:hover {
    animation: wiggle 0.6s ease;
}

.hover-float:hover {
    animation: float 2s ease infinite;
}

.hover-rotate:hover {
    animation: rotate 2s linear infinite;
}

/* Efectos de shimmer */
.shimmer {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* Animaciones de scroll */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Animaciones de carga */
@keyframes loading {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(121,153,105,0.2);
    border-top: 4px solid var(--color-green);
    border-radius: 50%;
    animation: loading 1s linear infinite;
}

/* Animaciones de texto */
@keyframes typewriter {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink {
    0%, 50% {
        border-color: transparent;
    }
    51%, 100% {
        border-color: var(--color-green);
    }
}

.typewriter {
    overflow: hidden;
    border-right: 2px solid var(--color-green);
    white-space: nowrap;
    animation: typewriter 3s steps(40) 1s forwards, blink 0.75s step-end infinite;
}

/* Animaciones de partículas */
@keyframes particle-float {
    0% {
        transform: translateY(0px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--color-green);
    border-radius: 50%;
    animation: particle-float 3s ease-out infinite;
}

/* Animaciones de gradiente */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.animated-gradient {
    background: linear-gradient(-45deg, var(--color-green), var(--color-yellow), var(--color-orange), var(--color-green));
    background-size: 400% 400%;
    animation: gradient-shift 4s ease infinite;
}

/* Animaciones de morphing */
@keyframes morph {
    0% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
    50% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }
    100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
}

.morphing-shape {
    animation: morph 8s ease-in-out infinite;
}

/* Animaciones de ondas */
@keyframes wave {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.wave-effect {
    position: relative;
    overflow: hidden;
}

.wave-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transform: translateX(-100%);
    animation: wave 2s infinite;
}

/* Animaciones de entrada escalonada */
.stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.stagger-children > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.5s; }

/* Animaciones de tarjetas */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* Animaciones de botones */
.btn-animated {
    position: relative;
    overflow: hidden;
}

.btn-animated::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-animated:hover::before {
    left: 100%;
}

/* Animaciones de navegación */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Animaciones de scroll suave */
.smooth-scroll {
    scroll-behavior: smooth;
}

/* Animaciones de carga de página */
@keyframes pageLoad {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-content {
    animation: pageLoad 0.8s ease-out;
}

/* Animaciones de validación de formulario */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

.shake {
    animation: shake 0.6s ease-in-out;
}

@keyframes success {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-animation {
    animation: success 0.5s ease-out;
}

/* Animaciones de parallax */
.parallax {
    transform: translateZ(0);
    will-change: transform;
}

/* Animaciones de elementos decorativos */
@keyframes leaf-float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-15px) rotate(5deg);
    }
}

.leaf-animation {
    animation: leaf-float 4s ease-in-out infinite;
}

/* Animaciones de contador */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.count-animation {
    animation: countUp 0.8s ease-out;
}

/* Animaciones de modal */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-animation {
    animation: modalFadeIn 0.3s ease-out;
}

/* Animaciones de tooltip */
@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tooltip-animation {
    animation: tooltipFadeIn 0.3s ease-out;
}

/* Animaciones de progreso */
@keyframes progressFill {
    from {
        width: 0%;
    }
    to {
        width: var(--progress-width, 100%);
    }
}

.progress-animation {
    animation: progressFill 1s ease-out forwards;
}

/* Animaciones de galería */
@keyframes galleryZoom {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.1);
    }
}

.gallery-zoom {
    transition: transform 0.3s ease;
}

.gallery-zoom:hover {
    animation: galleryZoom 0.3s ease forwards;
}

/* Animaciones de menú móvil */
@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.mobile-menu-animation {
    animation: slideInDown 0.3s ease-out;
}

/* Animaciones de notificaciones */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-animation {
    animation: slideInRight 0.3s ease-out;
}

/* Animaciones de carga de imágenes */
@keyframes imageLoad {
    from {
        opacity: 0;
        filter: blur(10px);
    }
    to {
        opacity: 1;
        filter: blur(0);
    }
}

.image-load-animation {
    animation: imageLoad 0.5s ease-out;
}

/* Animaciones de estado de carga */
@keyframes skeleton {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.skeleton-animation {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: skeleton 1.5s infinite;
} 