/*
 * Acierto Marketing - Animaciones y Efectos Modernos
 * Archivo de mejoras visuales
 */

/* ============================================
   ANIMACIONES KEYFRAMES
   ============================================ */

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

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

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

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

/* ============================================
   CLASES PARA ANIMACIONES AL SCROLL
   ============================================ */

.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
}

.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

.fade-in-left {
    animation: fadeInLeft 0.8s ease forwards;
}

.fade-in-right {
    animation: fadeInRight 0.8s ease forwards;
}

.scale-in {
    animation: scaleIn 0.6s ease forwards;
}

.slide-down {
    animation: slideDown 0.6s ease forwards;
}

/* ============================================
   TRANSICIONES SUAVES GLOBALES
   ============================================ */

a, button, .menu-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

img {
    transition: transform 0.4s ease, filter 0.4s ease;
}

/* ============================================
   EFECTOS HOVER EN NAVEGACIÓN
   ============================================ */

.menu-sitio .menu-item a {
    position: relative;
    display: inline-block;
    overflow: hidden;
}

.menu-sitio .menu-item a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #ffffff;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-sitio .menu-item a:hover::before,
.menu-sitio .menu-item a:focus::before {
    width: 100%;
}

.menu-sitio .menu-item a:hover {
    transform: translateX(5px);
}

/* ============================================
   EFECTOS EN REDES SOCIALES
   ============================================ */

.redes-sociales ul li {
    transition: transform 0.3s ease;
}

.redes-sociales ul li:hover {
    transform: scale(1.2) rotate(5deg);
}

.redes-sociales ul li img {
    filter: brightness(1);
    transition: filter 0.3s ease, transform 0.3s ease;
}

.redes-sociales ul li:hover img {
    filter: brightness(1.2) drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
    transform: scale(1.1);
}

/* ============================================
   EFECTOS EN BOTONES Y CTAs
   ============================================ */

.n2-ss-button-container a,
button,
.btn,
input[type="submit"] {
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.n2-ss-button-container a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.n2-ss-button-container a:hover::before {
    width: 300px;
    height: 300px;
}

.n2-ss-button-container a:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 130, 16, 0.3);
}

.n2-ss-button-container a:active {
    transform: translateY(-1px);
}

/* ============================================
   EFECTOS EN IMÁGENES
   ============================================ */

.ico_elegirnos img,
.img-somos img,
.contenido-servicios img,
.equipo img {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                filter 0.5s ease;
}

.ico_elegirnos:hover img {
    transform: scale(1.1) rotate(5deg);
    filter: brightness(1.1);
}

.img-somos:hover img,
.contenido-servicios:hover img {
    transform: scale(1.05);
    filter: brightness(1.1) saturate(1.2);
}

.equipo:hover img {
    transform: scale(1.05);
    filter: grayscale(0%) brightness(1.1);
}

/* ============================================
   ANIMACIÓN FLOTANTE EN ICONOS
   ============================================ */

/* Desactivada temporalmente para evitar problemas de layout
.ico_elegirnos {
    animation: float 3s ease-in-out infinite;
}

.ico_elegirnos:nth-child(2) {
    animation-delay: 0.5s;
}

.ico_elegirnos:nth-child(3) {
    animation-delay: 1s;
}
*/

/* ============================================
   EFECTOS EN TARJETAS Y SECCIONES
   ============================================ */

.seccion-somos,
.contenido-servicios,
.equipo,
.seccion-clientes {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contenido-servicios:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

/* ============================================
   SLIDER - EFECTOS MEJORADOS
   ============================================ */

.n2-ss-slide {
    animation: fadeIn 1s ease;
}

.nextend-arrow {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nextend-arrow:hover {
    transform: scale(1.2);
    filter: drop-shadow(0 5px 15px rgba(255, 255, 255, 0.4));
}

.nextend-arrow:active {
    transform: scale(1.1);
}

/* ============================================
   EFECTO PARALLAX SUAVE
   ============================================ */

.parallax-section {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    transition: transform 0.1s ease-out;
}

/* ============================================
   EFECTOS EN TEXTO
   ============================================ */

h1, h2, h3 {
    transition: color 0.3s ease, transform 0.3s ease;
}

.seccion-somos h2:hover,
.contenido-elegirnos h2:hover {
    color: #ff8210;
    transform: scale(1.05);
}

/* ============================================
   LÍNEAS DECORATIVAS ANIMADAS
   ============================================ */

hr.naranja,
hr.dotted {
    position: relative;
    overflow: hidden;
}

hr.naranja::after,
hr.dotted::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 130, 16, 0.5), transparent);
    transition: left 0.8s ease;
}

.seccion-somos:hover hr.naranja::after,
.quienes-texto:hover hr.dotted::after {
    left: 100%;
}

/* ============================================
   EFECTOS DE CARGA SUAVE
   ============================================ */

.lazy {
    opacity: 0;
    transition: opacity 0.6s ease;
}

.lazy.loaded {
    opacity: 1;
}

/* ============================================
   SCROLL SMOOTH BEHAVIOR
   ============================================ */

html {
    scroll-behavior: smooth;
}

/* ============================================
   MEJORAS EN FORMULARIOS DE CONTACTO
   ============================================ */

input, textarea {
    transition: all 0.3s ease;
}

input:focus, textarea:focus {
    transform: scale(1.02);
    box-shadow: 0 5px 20px rgba(255, 130, 16, 0.2);
    border-color: #ff8210;
}

/* ============================================
   CURSOR POINTER EN ELEMENTOS INTERACTIVOS
   ============================================ */

a, button, .menu-item, .ico_elegirnos, .nextend-arrow,
input[type="submit"], .n2-ss-button-container {
    cursor: pointer;
}

/* ============================================
   ANIMACIONES DE ENTRADA INICIAL
   ============================================ */

/* Desactivadas temporalmente
.logo {
    animation: slideDown 0.8s ease;
}

.menu-sitio {
    animation: fadeInLeft 1s ease 0.3s backwards;
}

.redes-sociales {
    animation: fadeInLeft 1s ease 0.6s backwards;
}
*/

/* ============================================
   RESPONSIVE - REDUCIR ANIMACIONES EN MÓVIL
   ============================================ */

@media (max-width: 768px) {
    .animate-on-scroll,
    .ico_elegirnos {
        animation: none !important;
    }

    a, button, .menu-item, img {
        transition-duration: 0.2s !important;
    }

    /* Desactivar hover effects en móvil */
    .ico_elegirnos:hover img,
    .img-somos:hover img,
    .contenido-servicios:hover img,
    .equipo:hover img {
        transform: none !important;
        filter: none !important;
    }
}

/* ============================================
   EFECTO RIPPLE EN BOTONES
   ============================================ */

.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple-animation 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ============================================
   BARRA DE PROGRESO AL HACER SCROLL
   ============================================ */

.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff8210, #ffb366);
    z-index: 9999;
    transition: width 0.1s ease;
    box-shadow: 0 2px 10px rgba(255, 130, 16, 0.5);
}

/* ============================================
   ACCESIBILIDAD - RESPETAR PREFERENCIAS
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
