.animate {
    opacity: 0;
    will-change: transform, opacity;
}

/* Cuando entra en pantalla */
.animate.is-visible {
    opacity: 1;
}




.fade-up {
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.is-visible {
    transform: translateY(0);
}

.fade-down {
    transform: translateY(-30px);
    transition: all 0.8s ease;
}

.fade-down.is-visible {
    transform: translateY(0);
}


.fade-in {
    transition: opacity 1s ease;
}



.card-rise {
    transform: translateY(40px) scale(0.97);
    transition: all 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.card-rise.is-visible {
    transform: translateY(0) scale(1);
}

.card-rise.is-visible:hover {
    transform: translateY(-10px) scale(1.015);
}


.card-zoom {
    transform: scale(0.9);
    transition: all 0.7s ease;
}

.card-zoom.is-visible {
    transform: scale(1);
}


.slide-right {
    transform: translateX(-60px);
    transition: all 0.9s ease;
}

.slide-right.is-visible {
    transform: translateX(0);
}


.slide-left {
    transform: translateX(60px);
    transition: all 0.9s ease;
}

.slide-left.is-visible {
    transform: translateX(0);
}


@keyframes floatSoft {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.float-soft {
    animation: floatSoft 6s ease-in-out infinite;
}


.stagger>.animate {
    transition-delay: calc(var(--i) * 0.15s);
}

.stagger>.animate.is-visible:hover,
.stagger>.animate.is-visible:focus-within,
.stagger>.animate.is-visible.no-delay {
    transition-delay: 0s !important;
}


/* Fade de imagen desde abajo */
.mask-fade-image {
    -webkit-mask-image: linear-gradient(to bottom,
            rgba(0, 0, 0, 1) 60%,
            rgba(0, 0, 0, 0) 100%);
    mask-image: linear-gradient(to bottom,
            rgba(0, 0, 0, 1) 60%,
            rgba(0, 0, 0, 0) 100%);
}


/* =============================================
   Counter Up — Animated Number Counter
   ============================================= */

/**
 * Base style for counter elements.
 * Uses tabular-nums to prevent layout jump as digits change width.
 * Pair with .animate + .fade-up or .fade-in for entry animation,
 * or use standalone — counter.js has its own IntersectionObserver.
 */
.counter-up {
    font-variant-numeric: tabular-nums;
    display: inline-block;
}
/* =============================================
   Background & Ambient Animations
   ============================================= */

@keyframes slow-zoom {
    0% { transform: scale(1.05); }
    100% { transform: scale(1.15); }
}

.animate-slow-zoom {
    animation: slow-zoom 20s linear infinite alternate;
}

@keyframes pulse-slow {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

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

@keyframes attention-shake {
    0%, 85%, 100% { transform: rotate(0); }
    88% { transform: rotate(-15deg); }
    91% { transform: rotate(15deg); }
    94% { transform: rotate(-15deg); }
    97% { transform: rotate(15deg); }
}

.shake-attention {
    animation: attention-shake 4s ease-in-out infinite;
    display: inline-block;
}

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

.svg-hover-bounce {
    transition: transform 0.3s ease;
}

.group:hover .svg-hover-bounce,
.svg-hover-bounce:hover {
    animation: svg-bounce 0.6s ease-in-out infinite;
    /* Use dark contrast color when background becomes primary */
    color: #00363f;
}

/* =============================================
   Button Icon Hover Animations
   ============================================= */

/* Slide Animation for Arrow Icons */
.btn-icon-slide {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (hover: hover) {
    a:hover .btn-icon-slide,
    button:hover .btn-icon-slide {
        transform: translateX(0.5rem);
    }
}

/* Spin Animation for Reload/Settings Icons */
.btn-icon-spin {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (hover: hover) {
    a:hover .btn-icon-spin,
    button:hover .btn-icon-spin {
        transform: rotate(45deg);
    }
}

/* Wiggle Animation for Phone Icons etc. */
@keyframes icon-wiggle {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

.btn-icon-wiggle {
    transition: transform 0.3s ease;
}

@media (hover: hover) {
    a:hover .btn-icon-wiggle,
    button:hover .btn-icon-wiggle {
        animation: icon-wiggle 0.5s ease-in-out infinite;
    }
}

/* =============================================
   Specific Brand Animations
   ============================================= */

@keyframes pulse-gold {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1); 
        box-shadow: 0 0 0 0 rgba(179, 142, 93, 0.4); 
    }
    50% { 
        opacity: 0.7; 
        transform: scale(1.2); 
        box-shadow: 0 0 10px 4px rgba(179, 142, 93, 0.2); 
    }
}

.animate-pulse-gold {
    animation: pulse-gold 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    display: inline-block;
}

/* =============================================
   Global Lightbox Modal (Ultra-Premium Gallery)
   ============================================= */

#global-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(10, 15, 17, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#global-lightbox.is-open {
    opacity: 1;
    pointer-events: auto;
}

#global-lightbox .lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    transform: scale(0.92);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

#global-lightbox.is-open .lightbox-content {
    transform: scale(1);
}

#global-lightbox img {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 1.5rem;
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

#global-lightbox .lightbox-caption {
    margin-top: 1.25rem;
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 500;
    text-align: center;
    padding: 0.5rem 1.5rem;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#global-lightbox .lightbox-btn {
    position: absolute;
    z-index: 50;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

#global-lightbox .lightbox-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.45);
}

#global-lightbox .lightbox-close {
    top: 1.5rem;
    right: 1.5rem;
}

#global-lightbox .lightbox-prev {
    left: 2rem;
}

#global-lightbox .lightbox-next {
    right: 2rem;
}

@media (max-width: 768px) {
    #global-lightbox .lightbox-prev {
        left: 0.75rem;
        width: 3rem;
        height: 3rem;
    }
    #global-lightbox .lightbox-next {
        right: 0.75rem;
        width: 3rem;
        height: 3rem;
    }
    #global-lightbox .lightbox-close {
        top: 1rem;
        right: 1rem;
        width: 3rem;
        height: 3rem;
    }
}

