/* ===================================================================
   MODERN EFFECTS & ANIMATIONS
   Advanced visual effects for K-9 Internacional Website
   =================================================================== */

/* ===== GLASSMORPHISM EFFECTS ===== */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-dark {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===== SMOOTH SCROLL REVEAL ===== */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* ===== PARALLAX SCROLLING ===== */
.parallax-element {
    transition: transform 0.1s ease-out;
    will-change: transform;
}

/* ===== HOVER LIFT EFFECT ===== */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

/* ===== GRADIENT BORDERS ===== */
.gradient-border {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
}

.gradient-border::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 12px;
    padding: 2px;
    background: linear-gradient(135deg, #f0b45a 0%, #e49f3c 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

/* ===== ANIMATED UNDERLINES ===== */
.animated-underline {
    position: relative;
    display: inline-block;
}

.animated-underline::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #f0b45a 0%, #e49f3c 100%);
    transition: width 0.3s ease;
}

.animated-underline:hover::after {
    width: 100%;
}

/* ===== SHINE EFFECT ===== */
.shine-effect {
    position: relative;
    overflow: hidden;
}

.shine-effect::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    transition: left 0.6s ease;
}

.shine-effect:hover::before {
    left: 150%;
}

/* ===== FLOATING ANIMATION ===== */
@keyframes floating {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

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

/* ===== GLOW EFFECT ===== */
.glow-effect {
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%,
    100% {
        box-shadow: 0 0 20px rgba(240, 180, 90, 0.5);
    }
    50% {
        box-shadow: 0 0 40px rgba(240, 180, 90, 0.8),
            0 0 60px rgba(240, 180, 90, 0.4);
    }
}

/* ===== MORPHING BACKGROUND ===== */
@keyframes morphBackground {
    0%,
    100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.morphing-bg {
    background-size: 200% 200%;
    animation: morphBackground 15s ease infinite;
}

/* ===== 3D CARD TILT ===== */
.card-3d {
    transform-style: preserve-3d;
    transition: all 0.3s ease;
}

.card-3d:hover {
    transform: perspective(1000px) rotateX(0deg) rotateY(0deg) scale(1.02);
}

/* ===== MAGNETIC BUTTON EFFECT ===== */
.magnetic-btn {
    transition: transform 0.1s ease;
}

/* ===== 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.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

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

/* ===== TEXT GRADIENT ===== */
.gradient-text {
    background: linear-gradient(135deg, #f0b45a 0%, #e49f3c 50%, #f0b45a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% {
        background-position: 0% center;
    }
    100% {
        background-position: 200% center;
    }
}

/* ===== STAGGER ANIMATIONS ===== */
.stagger-item {
    opacity: 0;
    transform: translateY(20px);
}

.stagger-item.animate {
    animation: staggerFadeIn 0.5s ease forwards;
}

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

@keyframes staggerFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== BLOB ANIMATION ===== */
@keyframes blobMove {
    0%,
    100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
    25% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }
    50% {
        border-radius: 50% 60% 30% 60% / 30% 60% 70% 40%;
    }
    75% {
        border-radius: 60% 40% 60% 40% / 70% 40% 50% 60%;
    }
}

.blob {
    animation: blobMove 10s ease-in-out infinite;
}

/* ===== SCROLL PROGRESS BAR ===== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #f0b45a 0%, #e49f3c 100%);
    z-index: 9998;
    transform-origin: 0%;
    transition: transform 0.1s ease;
}

/* ===== IMAGE ZOOM ON HOVER ===== */
.zoom-image-wrapper {
    overflow: hidden;
    border-radius: 12px;
}

.zoom-image {
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.zoom-image-wrapper:hover .zoom-image {
    transform: scale(1.1);
}

/* ===== NEON GLOW ===== */
.neon-glow {
    animation: neonPulse 2s ease-in-out infinite;
}

@keyframes neonPulse {
    0%,
    100% {
        text-shadow: 0 0 10px rgba(240, 180, 90, 0.8),
            0 0 20px rgba(240, 180, 90, 0.6), 0 0 30px rgba(240, 180, 90, 0.4);
    }
    50% {
        text-shadow: 0 0 20px rgba(240, 180, 90, 1),
            0 0 30px rgba(240, 180, 90, 0.8), 0 0 40px rgba(240, 180, 90, 0.6);
    }
}

/* ===== SMOOTH PAGE TRANSITIONS ===== */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #192339 0%, #0f172a 100%);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
}

.page-transition.active {
    opacity: 1;
    visibility: visible;
}

/* ===== CURSOR TRAIL EFFECT ===== */
.cursor-dot {
    width: 8px;
    height: 8px;
    background: #f0b45a;
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 99999;
    transition: all 0.1s ease;
    mix-blend-mode: difference;
}

/* ===== SECTION DIVIDERS ===== */
.section-divider {
    height: 2px;
    width: 100%;
    background: linear-gradient(90deg, transparent, #f0b45a, transparent);
    margin: 60px 0;
}

.section-divider-wavy {
    height: 100px;
    overflow: hidden;
}

.section-divider-wavy svg {
    width: 100%;
    height: 100%;
}

/* ===== COUNT-UP ANIMATION ===== */
.count-up {
    font-size: 48px;
    font-weight: 800;
    color: #f0b45a;
}

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

@keyframes skeletonLoad {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ===== TOOLTIP STYLES ===== */
.tooltip-modern {
    position: relative;
}

.tooltip-modern::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: 8px 12px;
    background: rgba(15, 23, 42, 0.95);
    color: white;
    font-size: 13px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.tooltip-modern::after {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(15, 23, 42, 0.95);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.tooltip-modern:hover::before,
.tooltip-modern:hover::after {
    opacity: 1;
    visibility: visible;
}

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

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
    .auto-dark {
        background: #1f2937;
        color: #f3f4f6;
    }
}

/* ===== HIGH PERFORMANCE GPU ACCELERATION ===== */
.gpu-accelerated {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: transform;
}

/* ===== FOCUS VISIBLE (MODERN ACCESSIBILITY) ===== */
*:focus-visible {
    outline: 3px solid rgba(240, 180, 90, 0.6);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ===== LOADING SPINNER ===== */
.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(240, 180, 90, 0.2);
    border-top-color: #f0b45a;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
