/* Animaciones interactivas para mayor interactividad */

/* Animación de fade in al cargar */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

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

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

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

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

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Clase para animaciones al cargar */
.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-fadeInDown {
    animation: fadeInDown 0.6s ease-out forwards;
}

.animate-slideInLeft {
    animation: slideInLeft 0.6s ease-out forwards;
}

.animate-slideInRight {
    animation: slideInRight 0.6s ease-out forwards;
}

/* Efecto hover en elementos interactivos */
.section-header {
    animation: fadeInDown 0.8s ease-out;
}

.section-title {
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #FF6B35, #F7931E);
    bottom: -8px;
    left: 0;
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.section:hover .section-title::after {
    transform: scaleX(1);
}

/* Animación en carruseles */
.carousel {
    position: relative;
}

.carousel-track {
    animation: fadeInUp 0.7s ease-out;
}

.carousel-arrow {
    transition: all 0.3s ease;
}

.carousel-arrow:hover {
    transform: scale(1.1);
    background: linear-gradient(135deg, #FF6B35, #F7931E);
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.3);
}

/* Animación en cards de productos */
.product-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.product-image {
    overflow: hidden;
    position: relative;
}

.product-image img {
    transition: transform 0.4s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.08);
}

.product-badge {
    animation: float 3s ease-in-out infinite;
}

/* Animación de botones */
.btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.4s ease;
    z-index: -1;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(255, 107, 53, 0.4);
}

/* Animación en sección About */
.about-content {
    animation: fadeInUp 0.8s ease-out;
}

.about-text {
    animation: slideInLeft 0.7s ease-out;
}

.about-gallery {
    animation: slideInRight 0.7s ease-out;
}

.gallery-image {
    transition: all 0.4s ease;
    overflow: hidden;
    position: relative;
}

.gallery-image img {
    transition: transform 0.5s ease;
}

.gallery-image:hover img {
    transform: scale(1.05) rotate(1deg);
}

.gallery-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 107, 53, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-image:hover::after {
    opacity: 1;
}

/* Animación en sección de servicios */
.service-tab {
    transition: all 0.3s ease;
    position: relative;
}

.service-tab:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.2);
}

.service-tab.active {
    animation: bounce 0.6s ease-out;
}

.service-content {
    animation: fadeInUp 0.5s ease-out;
}

.service-content-icon {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 1rem;
    animation: float 3s ease-in-out infinite;
}

/* Animación en el hero search */
.hero-search-box {
    animation: slideInUp 0.7s ease-out;
}

.hero-search-input:focus {
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1), 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    animation: glow 2s ease-in-out;
}

.hero-search-btn:active {
    animation: bounce 0.4s ease;
}

/* Animación en footer */
.footer {
    animation: fadeInUp 0.8s ease-out;
}

.footer-content {
    transition: all 0.3s ease;
}

.footer-section p {
    transition: all 0.3s ease;
}

.footer-section p:hover {
    color: var(--brand-primary);
    transform: translateX(5px);
}

/* Efecto de carga progresiva */
@keyframes loadingPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: loadingPulse 1.5s ease-in-out infinite;
}

/* Animación de scroll reveal */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Mejora de transiciones generales */
button, a, input, select, textarea {
    transition: all 0.2s ease;
}

/* Efecto en links */
a {
    position: relative;
}

a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--brand-primary);
    transition: width 0.3s ease;
}

a:hover::after {
    width: 100%;
}

/* Animación de entrada para elementos de lista */
.dropdown-item {
    animation: slideInLeft 0.3s ease-out;
}

.dropdown-item:nth-child(1) { animation-delay: 0.05s; }
.dropdown-item:nth-child(2) { animation-delay: 0.1s; }
.dropdown-item:nth-child(3) { animation-delay: 0.15s; }
.dropdown-item:nth-child(4) { animation-delay: 0.2s; }

/* Animación para modales/overlays */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal, .overlay {
    animation: fadeInScale 0.3s ease-out;
}

/* Efecto parallax suave */
.hero-bg {
    will-change: transform;
}

@media (max-width: 768px) {
    .section-title::after {
        display: none;
    }
    
    .product-card:hover {
        transform: translateY(-4px);
    }
}
