/* ========== ANIMACIONES IMPRESIONANTES Y MODERNAS ========== */

/* ========== KEYFRAMES AVANZADOS ========== */

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Slide Up Animation */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide Down Animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide In Left */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide In Right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* Scale Up */
@keyframes scaleUp {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

/* Pulse Glow */
@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(196, 53, 74, 0.4);
    }
    50% {
        box-shadow: 0 0 25px rgba(196, 53, 74, 0.8);
    }
}

/* Shake Animation */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

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

/* Rotate Animation */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Gradient Animation */
@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Shimmer Effect */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Float Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    33% {
        transform: translateY(-10px) rotate(1deg);
    }
    66% {
        transform: translateY(-5px) rotate(-1deg);
    }
}

/* Pulse Icon Animation */
@keyframes pulseIcon {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.9;
    }
}

/* Bounce Social Animation */
@keyframes bounceSocial {
    0%, 100% {
        transform: translateX(0) translateY(0);
    }
    25% {
        transform: translateX(5px) translateY(-3px);
    }
    50% {
        transform: translateX(0) translateY(-6px);
    }
    75% {
        transform: translateX(-3px) translateY(-3px);
    }
}

/* Glow Social Animation */
@keyframes glowSocial {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2),
                    0 0 0 rgba(255, 255, 255, 0);
    }
    50% {
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4),
                    0 0 20px rgba(255, 255, 255, 0.3);
    }
}

/* Glow Animation */
@keyframes glow {
    from {
        box-shadow: 0 0 5px rgba(196, 53, 74, 0.5), 0 0 10px rgba(196, 53, 74, 0.3);
    }
    to {
        box-shadow: 0 0 20px rgba(196, 53, 74, 0.8), 0 0 30px rgba(196, 53, 74, 0.5);
    }
}

/* Slide In From Top */
@keyframes slideInTop {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In Scale */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Rotate In */
@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-200deg) scale(0.8);
    }
    to {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

/* Zoom In */
@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Wobble */
@keyframes wobble {
    0%, 100% {
        transform: translateX(0%);
    }
    15% {
        transform: translateX(-25%) rotate(-5deg);
    }
    30% {
        transform: translateX(20%) rotate(3deg);
    }
    45% {
        transform: translateX(-15%) rotate(-3deg);
    }
    60% {
        transform: translateX(10%) rotate(2deg);
    }
    75% {
        transform: translateX(-5%) rotate(-1deg);
    }
}

/* Fade In Up */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In Down */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== ANIMATION CLASSES ========== */
.animate-fade-in {
    animation: fadeIn 0.6s ease-out;
}

.animate-slide-up {
    animation: slideUp 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-slide-down {
    animation: slideDown 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-slide-in-left {
    animation: slideInLeft 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-slide-in-right {
    animation: slideInRight 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-slide-in-top {
    animation: slideInTop 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-scale-in {
    animation: scaleIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-scale-up {
    animation: scaleUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-fade-in-scale {
    animation: fadeInScale 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-zoom-in {
    animation: zoomIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-rotate-in {
    animation: rotateIn 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-fade-in-down {
    animation: fadeInDown 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-pulse-glow {
    animation: pulseGlow 2s ease-in-out infinite;
}

.animate-shake {
    animation: shake 0.5s ease-in-out;
}

.animate-bounce {
    animation: bounce 1s ease-in-out infinite;
}

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

.animate-glow {
    animation: glow 2s ease-in-out infinite alternate;
}

.animate-wobble {
    animation: wobble 1s ease-in-out;
}

/* ========== STAGGER ANIMATIONS ========== */
.news-item {
    opacity: 0;
    animation: slideUp 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.news-item:nth-child(1) { animation-delay: 0.1s; }
.news-item:nth-child(2) { animation-delay: 0.2s; }
.news-item:nth-child(3) { animation-delay: 0.3s; }
.news-item:nth-child(4) { animation-delay: 0.4s; }
.news-item:nth-child(5) { animation-delay: 0.5s; }
.news-item:nth-child(6) { animation-delay: 0.6s; }
.news-item:nth-child(7) { animation-delay: 0.7s; }
.news-item:nth-child(8) { animation-delay: 0.8s; }

/* ========== HOVER EFFECTS IMPRESIONANTES ========== */

/* Lift Effect */
.hover-lift {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2), 0 5px 15px rgba(196, 53, 74, 0.2);
}

/* Scale Effect */
.hover-scale {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* Glow Effect */
.hover-glow {
    transition: box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(196, 53, 74, 0.6), 
                0 0 50px rgba(196, 53, 74, 0.4);
    transform: scale(1.03);
}

/* Shine Effect */
.hover-shine {
    position: relative;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-shine::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.hover-shine:hover::before {
    left: 100%;
}

.hover-shine:hover {
    transform: translateY(-5px);
}

/* Rotate Effect */
.hover-rotate {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-rotate:hover {
    transform: rotate(5deg) scale(1.05);
}

/* Tilt Effect */
.hover-tilt {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.hover-tilt:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(5deg) scale(1.02);
}

/* ========== LOADING ANIMATIONS ========== */
.skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: 8px;
}

.skeleton-news {
    height: 200px;
    border-radius: 12px;
    margin-bottom: 1rem;
    animation: shimmer 1.5s ease-in-out infinite;
}

.skeleton-text {
    height: 20px;
    border-radius: 4px;
    margin-bottom: 10px;
    animation: shimmer 1.5s ease-in-out infinite;
}

.skeleton-title {
    height: 30px;
    border-radius: 4px;
    margin-bottom: 15px;
    width: 70%;
    animation: shimmer 1.5s ease-in-out infinite;
}

/* ========== SCROLL ANIMATIONS ========== */
.fade-in-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.scale-in-on-scroll {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scale-in-on-scroll.visible {
    opacity: 1;
    transform: scale(1);
}

.slide-in-left-on-scroll {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-in-left-on-scroll.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right-on-scroll {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-in-right-on-scroll.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ========== BUTTON ANIMATIONS ========== */
.btn-animate {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-animate::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: translate(-50%, -50%);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
                height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-animate:hover::before {
    width: 400px;
    height: 400px;
}

.btn-animate:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Ripple Effect */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: translate(-50%, -50%);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
                height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.ripple:active::after {
    width: 400px;
    height: 400px;
}

/* ========== TEXT ANIMATIONS ========== */
.text-reveal {
    overflow: hidden;
}

.text-reveal span {
    display: inline-block;
    opacity: 0;
    transform: translateY(100%);
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.text-reveal span:nth-child(1) { animation-delay: 0.1s; }
.text-reveal span:nth-child(2) { animation-delay: 0.2s; }
.text-reveal span:nth-child(3) { animation-delay: 0.3s; }
.text-reveal span:nth-child(4) { animation-delay: 0.4s; }
.text-reveal span:nth-child(5) { animation-delay: 0.5s; }

/* Typing Effect */
@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: #C4354A;
    }
}

.typing-effect {
    overflow: hidden;
    border-right: 3px solid #C4354A;
    white-space: nowrap;
    animation: typing 3s steps(40, end), blink 0.75s step-end infinite;
}

/* ========== CARD ANIMATIONS ========== */

/* Card Flip */
.card-flip {
    perspective: 1000px;
}

.card-flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.card-flip:hover .card-flip-inner {
    transform: rotateY(180deg);
}

.card-flip-front,
.card-flip-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 12px;
}

.card-flip-back {
    transform: rotateY(180deg);
}

/* Card Tilt */
.card-tilt {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.card-tilt:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(5deg);
}

/* ========== PROGRESS BAR ANIMATION ========== */
.progress-bar {
    height: 4px;
    background: linear-gradient(
        90deg,
        #C4354A 0%,
        #E94560 50%,
        #C4354A 100%
    );
    background-size: 200% 100%;
    animation: gradient 2s linear infinite;
    border-radius: 2px;
}

/* ========== PARTICLE EFFECTS ========== */
@keyframes particle {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) translateX(var(--tx)) rotate(360deg);
        opacity: 0;
    }
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #C4354A;
    border-radius: 50%;
    animation: particle 2s ease-out forwards;
    --tx: 50px;
}

/* ========== HEADER ANIMATIONS ========== */
.header-slide-down {
    animation: slideDown 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== MENU ANIMATIONS ========== */
.menu-slide-in {
    animation: slideInLeft 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-slide-out {
    animation: slideInRight 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== NEWS ITEM ANIMATIONS ========== */
.news-item-enter {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* ========== MODAL ANIMATIONS ========== */
.modal-fade-in {
    animation: fadeInScale 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-slide-up {
    animation: slideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== LOADER ANIMATIONS ========== */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    border: 4px solid rgba(196, 53, 74, 0.1);
    border-top-color: #C4354A;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* ========== PERFORMANCE OPTIMIZATIONS ========== */
.animate,
.animate-fade-in,
.animate-slide-up,
.animate-scale-in {
    will-change: transform, opacity;
}

.animate-fade-in.animated,
.animate-slide-up.animated,
.animate-scale-in.animated {
    will-change: auto;
}

